/* Oction Studio UI v3 — design tokens.
   The ONLY place raw colour, radius, shadow and type values live.
   Components read these variables; never hard-code a hex in a component. */
:root {
  /* Colour: surfaces */
  --os-bg: #F3F4F5;            /* app background */
  --os-surface: #FFFFFF;       /* cards, bars, sheets */
  --os-surface-soft: #EEF0F1;  /* icon tiles, quiet fills, progress track */
  --os-track: #E7E9EC;         /* segmented control track, folder tiles */
  --os-line: #E4E5E8;          /* card and bar borders */
  --os-line-soft: #EEF0F1;     /* dividers between rows */

  /* Colour: text */
  --os-ink: #0A0A0B;           /* primary text, primary buttons */
  --os-muted: #5B5F67;         /* secondary text (about 5.9:1 on --os-bg) */
  --os-placeholder: #8A8E96;   /* input placeholder only */

  /* Colour: the dark "hero" surface (stays dark in both themes) */
  --os-hero: #0A0A0B;
  --os-hero-2: #1E1F22;        /* buttons and wells on the hero */
  --os-hero-line: #34363B;
  --os-on-hero: #FFFFFF;
  --os-on-hero-muted: #C4C7CC;

  /* Colour: accent (teal) */
  --os-accent: #00C2A8;        /* marks, charts, switches. Never as text on white */
  --os-accent-strong: #08705F; /* teal text and links on light surfaces */
  --os-accent-soft: #DDF5F0;   /* chips, avatar tint */
  --os-accent-mid: #8FD9CE;    /* secondary chart series */
  --os-on-accent: #0A0A0B;     /* text and icons on --os-accent and --os-warn-soft, in both themes */

  /* Colour: status */
  --os-warn: #FFC857;          /* chart series */
  --os-warn-soft: #FFE2A8;     /* "stuck", "hot", "must" chips (ink text) */
  --os-alert: #E5484D;         /* unread badges and dots only */
  --os-on-alert: #FFFFFF;
  --os-off: #C4C7CC;           /* switch off, unchecked box border */

  /* Radius */
  --os-r-xs: 9px;    /* checkbox */
  --os-r-sm: 12px;   /* buttons, icon tiles */
  --os-r-md: 14px;   /* large buttons */
  --os-r-lg: 18px;   /* stat tiles, banners */
  --os-r-xl: 22px;   /* cards */
  --os-r-2xl: 24px;  /* hero cards */
  --os-r-pill: 999px;

  /* Space */
  --os-s-1: 4px; --os-s-2: 8px; --os-s-3: 12px; --os-s-4: 14px;
  --os-s-5: 16px; --os-s-6: 18px; --os-s-7: 20px; --os-s-8: 24px;
  --os-gutter: 20px;           /* screen side padding on phones */
  --os-touch: 44px;            /* minimum tap target */

  /* Type */
  --os-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --os-font-brand: 'Technor', 'Manrope', sans-serif; /* wordmark only */
  --os-t-11: 11px; --os-t-12: 12px; --os-t-13: 13px; --os-t-14: 14px;
  --os-t-15: 15px; --os-t-17: 17px; --os-t-19: 19px; --os-t-24: 24px;
  --os-t-28: 28px; --os-t-34: 34px;
  --os-w-regular: 500; --os-w-semi: 600; --os-w-bold: 700; --os-w-heavy: 800;

  /* Elevation */
  --os-shadow-card: 0 1px 2px rgba(10, 10, 11, .05);
  --os-shadow-float: 0 8px 24px rgba(10, 10, 11, .10);

  /* Glass (S77): see-through surfaces over a soft glow. A part opts in with these; --os-surface
     stays solid for anything that must hide what is behind it (a menu, a knob, a badge's ring).
     The fallbacks at the end of this file make them solid. */
  --os-glow-1: rgba(0, 194, 168, .22);     /* teal, top left */
  --os-glow-2: rgba(143, 217, 206, .38);   /* mint, top right */
  --os-glow-3: rgba(255, 200, 87, .18);    /* amber, bottom right */
  --os-backdrop: radial-gradient(52% 38% at 8% 0%, var(--os-glow-1), transparent 72%),
    radial-gradient(46% 36% at 100% 14%, var(--os-glow-2), transparent 72%),
    radial-gradient(50% 40% at 92% 96%, var(--os-glow-3), transparent 72%);
  --os-glass: rgba(255, 255, 255, .56);       /* cards, widgets, buttons, tiles: tinted, not blurred */
  --os-glass-bar: rgba(246, 248, 248, .68);   /* the top bar, the tab bar, the dock: blurred */
  --os-glass-sheet: rgba(250, 251, 251, .9);  /* sheets: nearly solid, a form sits on them */
  --os-glass-edge: rgba(255, 255, 255, .7);   /* the lit rim of a glass part */
  --os-glass-line: rgba(10, 10, 11, .07);     /* the outline around it */
  --os-glass-blur: blur(24px) saturate(180%);
  --os-glass-scrim: rgba(10, 10, 11, .34);    /* behind an open sheet */
  --os-glass-hero-tint: rgba(10, 10, 11, .9); /* the dark card as smoked glass, from this */
  --os-glass-hero-tint-2: rgba(16, 22, 24, .86); /* to this; lighter fails --os-on-hero-muted (v3-glass.test.js) */
  --os-glass-hero-glow: rgba(0, 194, 168, .2);
  --os-glass-hero: radial-gradient(120% 90% at 100% 0%, var(--os-glass-hero-glow), transparent 60%),
    linear-gradient(145deg, var(--os-glass-hero-tint), var(--os-glass-hero-tint-2));
  --os-shadow-glass: inset 0 1px 0 var(--os-glass-edge), 0 0 0 1px var(--os-glass-line), 0 14px 32px -16px rgba(10, 10, 11, .16);
  --os-shadow-glass-float: inset 0 1px 0 var(--os-glass-edge), 0 0 0 1px var(--os-glass-line), 0 24px 48px -18px rgba(10, 10, 11, .28);
  --os-shadow-glass-hero: inset 0 1px 0 rgba(255, 255, 255, .16), 0 22px 44px -18px rgba(10, 10, 11, .5);
  --os-shadow-accent: 0 12px 24px -10px rgba(0, 194, 168, .55);
}

/* Dark theme: set data-theme="dark" on <html> or on the app root. */
[data-theme="dark"] {
  --os-bg: #0A0A0B;
  --os-surface: #17181B;
  --os-surface-soft: #232428;
  --os-track: #232428;
  --os-line: #2A2B2F;
  --os-line-soft: #232428;
  --os-ink: #FFFFFF;
  --os-muted: #A9ADB4;
  --os-accent-strong: #5FE3D0;
  --os-accent-soft: #0E3A34;
  --os-shadow-card: none;
  --os-shadow-float: none;
  --os-glow-1: rgba(0, 194, 168, .26);
  --os-glow-2: rgba(8, 112, 95, .42);
  --os-glow-3: rgba(255, 200, 87, .10);
  --os-glass: rgba(255, 255, 255, .06);
  --os-glass-bar: rgba(16, 18, 20, .64);
  --os-glass-sheet: rgba(24, 26, 28, .9);
  --os-glass-edge: rgba(255, 255, 255, .10);
  --os-glass-line: rgba(255, 255, 255, .06);
  --os-glass-scrim: rgba(0, 0, 0, .5);
  --os-glass-hero-tint: rgba(255, 255, 255, .12);
  --os-glass-hero-tint-2: rgba(255, 255, 255, .05);
  --os-glass-hero-glow: rgba(0, 194, 168, .16);
  --os-shadow-glass: inset 0 1px 0 var(--os-glass-edge), 0 0 0 1px var(--os-glass-line), 0 18px 40px -18px rgba(0, 0, 0, .7);
  --os-shadow-glass-float: inset 0 1px 0 var(--os-glass-edge), 0 0 0 1px var(--os-glass-line), 0 28px 56px -18px rgba(0, 0, 0, .85);
  --os-shadow-glass-hero: inset 0 1px 0 rgba(255, 255, 255, .14), 0 22px 44px -18px rgba(0, 0, 0, .7);
}

/* Glass fallbacks (S77). Last in the file, so they win over both themes above; var() reads the
   theme's own solid value. A browser that cannot blur gets solid bars and sheets (cards are not
   blurred, so they keep their tint). A person who has asked for less transparency gets every
   glass part solid and no glow. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --os-glass-bar: var(--os-surface);
    --os-glass-sheet: var(--os-surface);
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root {
    --os-backdrop: none;
    --os-glass: var(--os-surface);
    --os-glass-bar: var(--os-surface);
    --os-glass-sheet: var(--os-surface);
    --os-glass-hero: var(--os-hero);
    --os-glass-blur: none;
  }
}
