/* ──────────────────────────────────────────────────────────
 * Viewership UI: foundation, Neutral preset
 * The original Beautiful UI look: cool greys, Inter and a blue accent.
 *
 * Generated from the viewership-ui/theme v1 contract (preset "neutral").
 * A drop-in replacement for foundation.css with this preset as the
 * default: same tokens, keyframes and utilities. Paper unless
 * data-vs-mode="dark" or <html data-theme="dark">; otherwise follows the OS.
 * One preset only: data-vs-theme alternates (neutral and the themes.css
 * presets) are not included.
 * ────────────────────────────────────────────────────────── */

:root,
[data-vs-mode="light"] {
  color-scheme: light;
  --vs-page: oklch(0.985 0.001 286.376);
  --vs-canvas: oklch(0.961 0.002 247.84);
  --vs-surface: oklch(1 0 0);
  --vs-inset: oklch(0.979 0.002 247.839);
  --vs-field: oklch(0.961 0.001 286.375);
  --vs-hover: oklch(0.97 0.002 247.839);
  --vs-hover-2: oklch(0.933 0.003 247.86);
  --vs-ink: oklch(0.247 0.006 258.361);
  --vs-ink-2: oklch(0.506 0.01 264.477);
  --vs-ink-3: oklch(0.695 0.009 264.505);
  --vs-ink-inverse: oklch(0.985 0.001 286.376);
  --vs-line: oklch(0.946 0.003 264.542);
  --vs-line-strong: oklch(0.912 0.005 258.326);
  --vs-line-soft: oklch(0.966 0.002 264.542);
  --vs-accent: oklch(0.626 0.205 254.947);
  --vs-accent-ink: oklch(0.556 0.187 255.617);
  --vs-accent-tint: oklch(0.96 0.019 252.878);
  --vs-on-accent: #ffffff;
  --vs-green: oklch(0.603 0.155 150.883);
  --vs-green-tint: oklch(0.958 0.017 159.118);
  --vs-orange: oklch(0.689 0.179 49.902);
  --vs-orange-tint: oklch(0.964 0.021 67.581);
  --vs-red: oklch(0.621 0.192 23.042);
  --vs-red-tint: oklch(0.956 0.017 17.462);
  --vs-tooltip-bg: oklch(0.272 0.008 264.435);
  --vs-tooltip-fg: oklch(0.976 0.002 247.839);
  --vs-tooltip-muted: oklch(0.731 0.008 260.731);
  --vs-tooltip-border: oklch(0.356 0.007 264.474);
  --vs-elev-ring: oklch(0.946 0.003 264.542);
  --vs-elev-ring-strong: oklch(0.912 0.005 258.326);
  --vs-shadow-xs: 0 1px 1px oklch(0 0 0 / 0.04), 0 1px 2px oklch(0 0 0 / 0.04);
  --vs-shadow-sm: 0 1px 2px oklch(0 0 0 / 0.04), 0 2px 4px oklch(0 0 0 / 0.04);
  --vs-shadow-md: 0 2px 4px oklch(0 0 0 / 0.04), 0 6px 14px oklch(0 0 0 / 0.06);
  --vs-shadow-lg: 0 4px 8px oklch(0 0 0 / 0.05), 0 16px 36px oklch(0 0 0 / 0.1);
  --vs-shadow-inset-field: inset 0 1px 2px oklch(0 0 0 / 0.12);
  --vs-font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --vs-font-stretch: 100%;
  --vs-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --vs-radius-chip: 6px;
  --vs-radius-control: 8px;
  --vs-radius-card: 10px;
  --vs-radius-window: 14px;
  --vs-radius-pill: 999px;
  --vs-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --vs-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --vs-ease-link: cubic-bezier(0.16, 1, 0.3, 1);
  --vs-duration-fast: 150ms;
  --vs-duration: 300ms;
}

[data-vs-mode="dark"],
:root[data-theme="dark"] {
  color-scheme: dark;
  --vs-page: oklch(0.209 0.004 264.477);
  --vs-canvas: oklch(0.231 0.004 264.487);
  --vs-surface: oklch(0.26 0.006 271.191);
  --vs-inset: oklch(0.243 0.004 264.492);
  --vs-field: oklch(0.293 0.006 271.223);
  --vs-hover: oklch(0.289 0.006 271.22);
  --vs-hover-2: oklch(0.318 0.007 274.747);
  --vs-ink: oklch(0.964 0.002 247.839);
  --vs-ink-2: oklch(0.731 0.008 260.731);
  --vs-ink-3: oklch(0.541 0.01 264.484);
  --vs-ink-inverse: oklch(0.231 0.004 264.487);
  --vs-line: oklch(0.308 0.006 258.354);
  --vs-line-strong: oklch(0.356 0.007 264.474);
  --vs-line-soft: oklch(0.278 0.006 258.354);
  --vs-accent: oklch(0.68 0.173 253.301);
  --vs-accent-ink: oklch(0.788 0.113 248.33);
  --vs-accent-tint: oklch(0.68 0.173 253.301 / 0.16);
  --vs-green: oklch(0.705 0.154 153.814);
  --vs-green-tint: oklch(0.705 0.154 153.814 / 0.14);
  --vs-orange: oklch(0.746 0.156 55.642);
  --vs-orange-tint: oklch(0.746 0.156 55.642 / 0.14);
  --vs-red: oklch(0.666 0.18 21.433);
  --vs-red-tint: oklch(0.666 0.18 21.433 / 0.14);
  --vs-tooltip-bg: oklch(0.182 0.004 264.459);
  --vs-tooltip-border: oklch(0.308 0.006 258.354);
  --vs-elev-ring: oklch(1 0 0 / 0.11);
  --vs-elev-ring-strong: oklch(1 0 0 / 0.15);
  --vs-shadow-xs: 0 1px 2px oklch(0 0 0 / 0.3);
  --vs-shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2), 0 2px 6px oklch(0 0 0 / 0.2);
  --vs-shadow-md: 0 2px 10px oklch(0 0 0 / 0.22);
  --vs-shadow-lg: 0 8px 28px oklch(0 0 0 / 0.34);
  --vs-shadow-inset-field: inset 0 1px 2px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --vs-page: oklch(0.209 0.004 264.477);
    --vs-canvas: oklch(0.231 0.004 264.487);
    --vs-surface: oklch(0.26 0.006 271.191);
    --vs-inset: oklch(0.243 0.004 264.492);
    --vs-field: oklch(0.293 0.006 271.223);
    --vs-hover: oklch(0.289 0.006 271.22);
    --vs-hover-2: oklch(0.318 0.007 274.747);
    --vs-ink: oklch(0.964 0.002 247.839);
    --vs-ink-2: oklch(0.731 0.008 260.731);
    --vs-ink-3: oklch(0.541 0.01 264.484);
    --vs-ink-inverse: oklch(0.231 0.004 264.487);
    --vs-line: oklch(0.308 0.006 258.354);
    --vs-line-strong: oklch(0.356 0.007 264.474);
    --vs-line-soft: oklch(0.278 0.006 258.354);
    --vs-accent: oklch(0.68 0.173 253.301);
    --vs-accent-ink: oklch(0.788 0.113 248.33);
    --vs-accent-tint: oklch(0.68 0.173 253.301 / 0.16);
    --vs-green: oklch(0.705 0.154 153.814);
    --vs-green-tint: oklch(0.705 0.154 153.814 / 0.14);
    --vs-orange: oklch(0.746 0.156 55.642);
    --vs-orange-tint: oklch(0.746 0.156 55.642 / 0.14);
    --vs-red: oklch(0.666 0.18 21.433);
    --vs-red-tint: oklch(0.666 0.18 21.433 / 0.14);
    --vs-tooltip-bg: oklch(0.182 0.004 264.459);
    --vs-tooltip-border: oklch(0.308 0.006 258.354);
    --vs-elev-ring: oklch(1 0 0 / 0.11);
    --vs-elev-ring-strong: oklch(1 0 0 / 0.15);
    --vs-shadow-xs: 0 1px 2px oklch(0 0 0 / 0.3);
    --vs-shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2), 0 2px 6px oklch(0 0 0 / 0.2);
    --vs-shadow-md: 0 2px 10px oklch(0 0 0 / 0.22);
    --vs-shadow-lg: 0 8px 28px oklch(0 0 0 / 0.34);
    --vs-shadow-inset-field: inset 0 1px 2px oklch(0 0 0 / 0.4);
  }
}

/* Derived tokens, re-declared on every scope so they resolve against its palette. */
:root,
[data-vs-mode],
[data-vs-theme] {
  --vs-grid-line: color-mix(in srgb, var(--vs-line) 78%, transparent);
  --vs-shadow-hairline: 0 0 0 1px var(--vs-line);
  --vs-shadow-btn: 0 0 0 1px var(--vs-elev-ring-strong), var(--vs-shadow-xs);
  --vs-shadow-card: 0 0 0 1px var(--vs-elev-ring), var(--vs-shadow-sm);
  --vs-shadow-raised: 0 0 0 1px var(--vs-elev-ring), var(--vs-shadow-md);
  --vs-shadow-overlay: 0 0 0 1px var(--vs-elev-ring-strong), var(--vs-shadow-lg);
  --vs-focus-ring: 0 0 0 2px var(--vs-surface), 0 0 0 3.5px var(--vs-accent);
}

[data-vs-mode],
[data-vs-theme] {
  color: var(--vs-ink);
  font-family: var(--vs-font-sans);
  font-stretch: var(--vs-font-stretch);
}

/* Structure tokens, on :root only so a nested mode scope still inherits them. */
:root {
  --vs-container: 1160px;
  --vs-gutter: clamp(20px, 5cqi, 48px);
  --vs-section-y: clamp(56px, 9cqi, 112px);
  --vs-border-w: 1px;
  --vs-display-weight: 500;
  --vs-display-stretch: 100%;
  --vs-display-tracking: -0.025em;
  --vs-display-leading: 1.05;
  --vs-display-transform: none;
  --vs-accent-style: normal;
}

/* ── Shared keyframes (prefixed so they never collide with app CSS) ── */

@keyframes vs-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes vs-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes vs-pop-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes vs-shimmer-text {
  from { background-position: 150% center; }
  to { background-position: -50% center; }
}
@keyframes vs-pixel-on {
  0%, 100% { opacity: 0.15; }
  18%, 42% { opacity: 1; }
  62% { opacity: 0.15; }
}
@keyframes vs-spin {
  to { transform: rotate(360deg); }
}
@keyframes vs-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes vs-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ── Shared utilities ── */

/* `hidden` always wins, even over a component's own `display` rule. */
:where([hidden]) {
  display: none !important;
}

/* Visually hidden but announced by screen readers. */
.vs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Display type for section headlines. Themes change the face, weight, case
 * and how an <em> accent word is drawn (italic serif, highlighter, colour). */
.vs-display {
  font-family: var(--vs-font-display, var(--vs-font-sans));
  font-weight: var(--vs-display-weight);
  font-stretch: var(--vs-display-stretch);
  letter-spacing: var(--vs-display-tracking);
  line-height: var(--vs-display-leading);
  text-transform: var(--vs-display-transform);
  text-wrap: balance;
  margin: 0;
}
.vs-display em {
  font-style: var(--vs-accent-style);
  font-family: var(--vs-accent-family, inherit);
  color: var(--vs-em-color, var(--vs-accent-ink));
  background: var(--vs-em-bg, none);
  padding-inline: var(--vs-em-pad, 0);
}

/* ── Reduced motion: components still render their end state ── */
@media (prefers-reduced-motion: reduce) {
  :root {
    --vs-duration-fast: 0ms;
    --vs-duration: 0ms;
  }
}
