/*
 * AUTO-GENERATED by scripts/sync-design-tokens.mjs
 * Source: devdocs.work apps/site/src/app/(site)/globals.css
 * Do not edit by hand — re-run the sync script.
 * Repo: https://github.com/devdocsorg/devdocs.work
 */

:root {
/* ===== PRIMITIVES — brand (exact hex, do not derive) ===== */
  --brand-orange: #ff5c00;
  --brand-red: #df3e3c;
  --brand-navy: #1d2a71;
  --brand-navy-deep: #0a1549;
  --brand-blue: #07a4fd;
  --brand-purple: #3b109e;
  --brand-lavender: #8992c1;
  --brand-white: #ffffff;
  --brand-orange-strong: #c24100;
  --brand-red-strong: #d43431;

  /* ===== SIGNATURE BRAND STOPS — DevDocs.ai design system, .work palette =====
   * These mirror the devdocsai-design source tokens while staying inside the
   * public site's approved eight-color brand set. Use gradients for signature
   * moments only; durable UI chrome should consume semantic tokens below.
   */
  --stop-azure-light: var(--brand-blue);
  --stop-azure-dark: var(--brand-navy);
  --stop-sunset-warm: var(--brand-orange);
  --stop-sunset-magenta: var(--brand-red);
  --stop-sunset-indigo: var(--brand-purple);
  --brand-deep: var(--brand-navy-deep);
  --brand-soft: var(--brand-lavender);
  --gradient-azure: linear-gradient(
    135deg,
    var(--stop-azure-light) 0%,
    var(--stop-azure-dark) 100%
  );
  --gradient-sunset: linear-gradient(
    135deg,
    var(--stop-sunset-warm) 0%,
    var(--stop-sunset-magenta) 46%,
    var(--stop-sunset-indigo) 92%
  );
  --gradient-conic: conic-gradient(
    from 180deg,
    var(--stop-azure-light),
    var(--stop-azure-dark),
    var(--stop-sunset-indigo),
    var(--stop-sunset-magenta),
    var(--stop-sunset-warm),
    var(--stop-azure-light)
  );
  --brand-rainbow-line: linear-gradient(
    90deg,
    var(--stop-azure-light) 0%,
    var(--stop-sunset-indigo) 28%,
    var(--stop-sunset-magenta) 62%,
    var(--stop-sunset-warm) 100%
  );
  --active-bg: color-mix(in oklch, var(--stop-sunset-indigo) 10%, transparent);
  --active-bg-strong: color-mix(
    in oklch,
    var(--stop-sunset-magenta) 14%,
    transparent
  );
  --active-border: color-mix(
    in oklch,
    var(--stop-sunset-indigo) 40%,
    transparent
  );

  /* ===== PRIMITIVES — neutral ramp =====
   * Matches devdocsai-design: chrome stays true neutral so the brand
   * gradients can carry the color work without tinting the whole UI navy.
   */
  --neutral-0: var(--brand-white);
  --neutral-50: #fafafa;
  --neutral-100: #f4f4f5;
  --neutral-150: #ededef;
  --neutral-200: #e4e4e7;
  --neutral-300: #d4d4d8;
  --neutral-400: #a1a1aa;
  --neutral-500: #71717a;
  --neutral-600: #52525b;
  --neutral-700: #3f3f46;
  --neutral-800: #27272a;
  --neutral-850: #1f1f22;
  --neutral-900: #18181b;
  --neutral-950: #0a0a0a;
  --neutral-1000: #000000;

  /* Derived link color (AA-safe blue on white) */
  --brand-blue-strong: color-mix(
    in oklch,
    var(--brand-blue),
    var(--brand-navy-deep) 35%
  );

  /* ===== SEMANTICS — surface ===== */
  --surface-default: var(--neutral-0);
  --surface-muted: var(--neutral-50);
  --surface-subtle: var(--neutral-100);
  --surface-inverse: var(--neutral-950);

  /* ===== SEMANTICS — content ===== */
  --content-default: var(--neutral-900);
  --content-muted: var(--neutral-600);
  --content-subtle: var(--neutral-400);
  --content-inverse: var(--brand-white);

  /* ===== SEMANTICS — border ===== */
  --border-default: var(--neutral-200);
  --border-subtle: color-mix(in oklch, var(--neutral-200), transparent 40%);
  --border-strong: var(--neutral-400);
  --border-focus: var(--brand-blue);

  /* ===== SEMANTICS — accent ===== */
  --accent-primary: var(--neutral-1000);
  --accent-primary-fg: var(--brand-white);
  --accent-primary-hover: var(--neutral-800);

  --accent-secondary: var(--brand-orange-strong);
  --accent-secondary-fg: var(--brand-navy-deep);

  --accent-info: var(--brand-blue);
  --accent-info-strong: var(--brand-blue-strong);

  --accent-violet: var(--brand-purple);

  /* ===== SEMANTICS — feedback ===== */
  --feedback-danger: var(--brand-red-strong);
  --feedback-danger-fg: var(--brand-white);

  /* ===== SEMANTICS — link & focus ===== */
  --link: var(--content-default);
  --link-hover: var(--stop-sunset-indigo);
  --focus-ring: var(--brand-blue);

  /* ===== DESIGN-SYSTEM POLISH ===== */
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-sm: 0 2px 4px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 6px 16px rgb(0 0 0 / 0.07), 0 2px 4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 18px 40px rgb(0 0 0 / 0.1), 0 4px 8px rgb(0 0 0 / 0.05);
  --shadow-focus:
    0 0 0 1px var(--active-border),
    0 0 0 4px color-mix(in oklch, var(--stop-sunset-indigo) 16%, transparent),
    0 0 0 7px color-mix(in oklch, var(--stop-sunset-magenta) 8%, transparent);
  --ease-standard: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* ===== SHADCN BRIDGE — do NOT rename these. shadcn components expect them. ===== */
  --background: var(--surface-default);
  --foreground: var(--content-default);
  --card: var(--surface-default);
  --card-foreground: var(--content-default);
  --popover: var(--surface-default);
  --popover-foreground: var(--content-default);
  --primary: var(--accent-primary);
  --primary-foreground: var(--accent-primary-fg);
  --secondary: var(--surface-subtle);
  --secondary-foreground: var(--content-default);
  --muted: var(--surface-muted);
  --muted-foreground: var(--content-muted);
  --accent: var(--surface-subtle);
  --accent-foreground: var(--content-default);
  --destructive: var(--feedback-danger);
  --border: var(--border-default);
  --input: var(--border-default);
  --ring: var(--focus-ring);
  --chart-1: var(--brand-orange);
  --chart-2: var(--brand-blue);
  --chart-3: var(--brand-purple);
  --chart-4: var(--brand-red);
  --chart-5: var(--brand-lavender);
  --radius: 0.5rem;

  /* Sidebar tokens — aliased for shadcn compatibility; the site doesn't
   * use a sidebar, but future `shadcn add` components may. */
  --sidebar: var(--surface-muted);
  --sidebar-foreground: var(--content-default);
  --sidebar-primary: var(--accent-primary);
  --sidebar-primary-foreground: var(--accent-primary-fg);
  --sidebar-accent: var(--surface-subtle);
  --sidebar-accent-foreground: var(--content-default);
  --sidebar-border: var(--border-default);
  --sidebar-ring: var(--focus-ring);
}

.dark {
--surface-default: #131c30;
  --surface-muted: #0b1120;
  --surface-subtle: #1a2640;
  --surface-inverse: var(--neutral-1000);

  --content-default: var(--neutral-100);
  --content-muted: var(--neutral-300);
  --content-subtle: var(--neutral-400);
  --content-inverse: var(--brand-white);

  --border-default: #253554;
  --border-subtle: #1e2d4a;
  --border-strong: #2e4060;

  --accent-primary: var(--brand-white);
  --accent-primary-fg: var(--neutral-950);
  --accent-primary-hover: var(--neutral-200);

  --link: var(--content-default);
  --link-hover: var(--brand-soft);

  --stop-sunset-indigo: var(--brand-lavender);

  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-sm: 0 2px 4px rgb(0 0 0 / 0.26), 0 1px 2px rgb(0 0 0 / 0.32);
  --shadow-md: 0 10px 24px rgb(0 0 0 / 0.35), 0 2px 4px rgb(0 0 0 / 0.28);
  --shadow-lg: 0 18px 40px rgb(0 0 0 / 0.42), 0 4px 8px rgb(0 0 0 / 0.32);
  --shadow-focus: 0 0 0 3px rgb(255 255 255 / 0.16);
}


/* ===== QDC Edge Lab aliases (map chrome → devdocs.work semantics) ===== */
:root,
html[data-theme="light"] {
  --bg: var(--surface-default);
  --bg-elevated: var(--surface-default);
  --panel: var(--surface-default);
  --fg: var(--content-default);
  --muted: var(--content-muted);
  --border: var(--border-default);
  --border-strong: var(--border-strong);
  --accent: var(--brand-blue);
  --accent-2: var(--brand-purple);
  --ok: #0d9488;
  --bad: var(--feedback-danger);
  --warn: var(--brand-orange);
  --ring: var(--focus-ring);
  --shadow: var(--shadow-md);
  --radius: var(--radius);
  --radius-card: calc(var(--radius) * 1.5);
  --radius-pill: 999px;
  --sidebar: var(--brand-navy-deep);
  --sidebar-fg: var(--brand-white);
  --sidebar-muted: color-mix(in oklab, var(--brand-lavender) 70%, var(--brand-white));
  --sidebar-active: color-mix(in oklab, var(--brand-navy) 55%, var(--brand-navy-deep));
  --font-sans: var(--font-dm-sans), "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-heading: var(--font-jost), "Jost", var(--font-sans);
  --font-mono: var(--font-jetbrains-mono), "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-standard: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gradient-splash: linear-gradient(160deg, var(--brand-navy-deep) 0%, #131c30 42%, var(--brand-navy) 100%);
  --sans: var(--font-sans);
  --mono: var(--font-mono);
}


/* data-theme=dark mirrors .dark from work (+ lab aliases) */
html[data-theme="dark"] {
  color-scheme: dark;
  --surface-default: #131c30;
  --surface-muted: #0b1120;
  --surface-subtle: #1a2640;
  --surface-inverse: var(--neutral-1000);
  --content-default: var(--neutral-100);
  --content-muted: var(--neutral-300);
  --content-subtle: var(--neutral-400);
  --content-inverse: var(--brand-white);
  --border-default: #253554;
  --border-subtle: #1e2d4a;
  --border-strong: #2e4060;
  --accent-primary: var(--brand-white);
  --accent-primary-fg: var(--neutral-950);
  --accent-primary-hover: var(--neutral-200);
  --background: var(--surface-default);
  --foreground: var(--content-default);
  --card: var(--surface-default);
  --card-foreground: var(--content-default);
  --muted-foreground: var(--content-muted);
  --border: var(--border-default);
  --bg: var(--surface-default);
  --bg-elevated: var(--surface-subtle);
  --panel: var(--surface-subtle);
  --fg: var(--content-default);
  --muted: var(--content-muted);
  --border-strong: var(--border-strong);
  --shadow: var(--shadow-md);
  --sidebar: #070b16;
  --sidebar-fg: var(--neutral-100);
  --sidebar-muted: var(--neutral-400);
  --sidebar-active: #1a2748;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-default: #131c30;
    --surface-muted: #0b1120;
    --surface-subtle: #1a2640;
    --content-default: var(--neutral-100);
    --content-muted: var(--neutral-300);
    --content-subtle: var(--neutral-400);
    --border-default: #253554;
    --border-subtle: #1e2d4a;
    --border-strong: #2e4060;
    --background: var(--surface-default);
    --foreground: var(--content-default);
    --card: var(--surface-default);
    --bg: var(--surface-default);
    --bg-elevated: var(--surface-subtle);
    --panel: var(--surface-subtle);
    --fg: var(--content-default);
    --muted: var(--content-muted);
    --border: var(--border-default);
    --sidebar: #070b16;
    --sidebar-fg: var(--neutral-100);
    --sidebar-muted: var(--neutral-400);
    --sidebar-active: #1a2748;
  }
}

/* Typography scale (shared) */
:root {
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --leading-tight: 1.25;
  --leading-normal: 1.55;
  --leading-relaxed: 1.65;
  --tracking-tight: -0.02em;
  --tracking-label: 0.08em;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
}

/* QDC Edge Lab chrome — all colors/fonts via design tokens */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  background: var(--bg);
  color: var(--fg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold);
  color: var(--fg);
  line-height: var(--leading-tight);
}
a { color: var(--link, var(--accent)); text-decoration: none; }
a:hover { color: var(--link-hover, var(--accent-2)); text-decoration: underline; }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid color-mix(in oklab, var(--sidebar) 80%, #fff 8%);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .18s ease;
  z-index: 30;
}
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .brand-powered,
.sidebar.collapsed .brand-title .brand-accent { display: none; }
.sidebar.collapsed .brand-title { font-size: 0.72rem; letter-spacing: 0.04em; }
/* Hover tooltips only when collapsed (native title is slow; CSS is immediate) */
.sidebar.collapsed .nav-item {
  position: relative;
  justify-content: center;
}
.sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}
.sidebar.collapsed .nav-item::before {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--fg);
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-item:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.sidebar.collapsed .nav-item:hover::before,
.sidebar.collapsed .nav-item:focus-visible::before {
  opacity: 1;
  visibility: visible;
}
/* Vertical pill on the rail edge, vertically centered in the viewport */
.sidebar-pill {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 28px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--fg);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 40;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.sidebar-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.sidebar-pill .pill-chevron {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
  transition: transform .18s ease;
  display: block;
}
.sidebar.collapsed .sidebar-pill .pill-chevron { transform: rotate(180deg); }
.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: 1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
  color: var(--sidebar-fg); font-weight: 700; letter-spacing: .02em; text-decoration: none;
  min-width: 0;
}
.brand:hover { text-decoration: none; color: var(--sidebar-fg); }
.brand-title { font-size: 1rem; line-height: 1.15; }
.brand-accent { color: var(--accent); }
.brand-powered {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 500; line-height: 1;
}
.brand-powered-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--sidebar-muted); font-weight: 600;
}
/* Official DevDocs wordmark pair (hosted-docs DevDocsWordmark convention) */
.dd-wordmark { display: inline-flex; align-items: center; line-height: 0; }
.dd-wordmark img { display: block; height: auto; width: auto; max-height: 1.15rem; }
/* Light mode: dark-text mark; dark mode: light-text mark */
.dd-logo-dark { display: none; }
html[data-theme="dark"] .dd-logo-light { display: none; }
html[data-theme="dark"] .dd-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .dd-logo-light { display: none; }
  html:not([data-theme="light"]) .dd-logo-dark { display: block; }
}
/* Sidebar is always navy — force light-text wordmark for contrast */
.sidebar .dd-logo-light { display: none !important; }
.sidebar .dd-logo-dark { display: block !important; }
.sidebar-nav { padding: .75rem .55rem; overflow: auto; flex: 1; }
.nav-group { margin-bottom: 1rem; }
.nav-group-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sidebar-muted); padding: .35rem .55rem; font-weight: 600;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: .55rem;
  color: var(--sidebar-muted); border-radius: 8px;
  padding: .55rem .6rem; margin: .15rem 0; text-decoration: none;
  font-size: .92rem; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
/* Expanded hover: soft fill + brand rainbow underline (same idea as devdocs.work .dd-header-link) */
.nav-item::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-rainbow-line, linear-gradient(90deg, var(--brand-blue, #07a4fd) 0%, var(--brand-purple, #3b109e) 28%, var(--brand-red, #df3e3c) 62%, var(--brand-orange, #ff5c00) 100%));
  opacity: 0;
  transform: scaleX(0.92);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.nav-item:hover,
.nav-item:focus-visible {
  background: var(--sidebar-active);
  color: var(--sidebar-fg);
  text-decoration: none;
  outline: none;
}
.nav-item:hover::after,
.nav-item:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-fg);
  box-shadow: inset 3px 0 0 var(--accent);
}
/* Active keeps left accent; underline still shows on hover for consistency */
.nav-item.active:hover::after,
.nav-item.active:focus-visible::after { opacity: 1; }
.nav-ico { width: 1.25rem; text-align: center; opacity: .9; flex-shrink: 0; }
/* Collapsed icon rail: no rainbow underline (tooltips only) */
.sidebar.collapsed .nav-item::after { display: none; }
.pipeline {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 1rem 0;
}
.pipeline-step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  position: relative;
}
.pipeline-step .step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 18%, var(--panel));
  color: var(--accent); font-size: .75rem; font-weight: 700; margin-bottom: .4rem;
}
.pipeline-step h3 { margin: 0 0 .25rem; font-size: .98rem; color: var(--fg); }
.pipeline-step p { margin: 0; font-size: .88rem; }
.pipeline-step.blocked { border-color: color-mix(in oklab, var(--bad) 45%, var(--border)); }
.pipeline-step.ready { border-color: color-mix(in oklab, var(--ok) 45%, var(--border)); }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 650; flex: 1; min-width: 0; }
.topbar-actions { display: flex; gap: .65rem; align-items: center; flex-shrink: 0; }
/* Theme toggle — same pattern as devdocs.work ThemeToggle (single sun/moon icon, no text) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.theme-toggle:hover {
  border-color: var(--border-strong, var(--border));
  background: color-mix(in oklab, var(--panel) 70%, var(--bg));
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring, var(--accent));
}
.theme-toggle .theme-icon { display: none; width: 1rem; height: 1rem; flex-shrink: 0; }
/* Light surface → moon (click for dark). Dark surface → sun (click for light). */
html[data-theme="light"] .theme-toggle .theme-icon-moon { display: block; color: var(--brand-blue, #07a4fd); }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; color: var(--brand-orange, #ff5c00); }
@media (prefers-color-scheme: light) {
  html:not([data-theme]) .theme-toggle .theme-icon-moon { display: block; color: var(--brand-blue, #07a4fd); }
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-toggle .theme-icon-sun { display: block; color: var(--brand-orange, #ff5c00); }
}
.user-chip {
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0.2rem 0.5rem; border: 1px solid var(--border); border-radius: 999px;
}
/* Account avatar menu */
.account-menu { position: relative; }
.avatar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 2px solid var(--border); border-radius: 999px;
  background: transparent; cursor: pointer; width: 2.25rem; height: 2.25rem;
  overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease;
}
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 999px; overflow: hidden;
  background: color-mix(in oklab, var(--accent) 22%, var(--panel));
  color: var(--fg); font-size: 0.72rem; font-weight: 700;
}
.avatar-lg { width: 2.5rem; height: 2.5rem; flex-shrink: 0; font-size: 0.85rem; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials { line-height: 1; letter-spacing: 0.02em; }
.account-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 260px; max-width: min(320px, 92vw);
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); z-index: 50; padding: 0.4rem 0;
}
.account-dropdown[hidden] { display: none !important; }
.account-dropdown-head {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.75rem 0.9rem 0.65rem;
}
.account-meta { min-width: 0; }
.account-name {
  font-weight: 650; font-size: 0.92rem; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-email {
  font-size: 0.78rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-dropdown-sep { height: 1px; background: var(--border); margin: 0.35rem 0; }
.account-dropdown-item {
  display: block; padding: 0.55rem 0.9rem; color: var(--fg);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.account-dropdown-item:hover { background: color-mix(in oklab, var(--accent) 10%, var(--panel)); text-decoration: none; }
.account-dropdown-danger { color: var(--bad); }
.account-dropdown-danger:hover { background: color-mix(in oklab, var(--bad) 12%, var(--panel)); }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
}
.content { max-width: 1180px; width: 100%; margin: 0 auto; padding: 1.35rem 1.25rem 4rem; }
.page-foot { margin-top: 2.5rem; color: var(--muted); font-size: .85rem; }
h1 { font-size: 1.55rem; margin: 0 0 .4rem; letter-spacing: -.02em; }
h2 { font-size: 1.12rem; margin: 1.4rem 0 .45rem; }
p, li { color: var(--muted); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: .75rem 0; box-shadow: var(--shadow);
}
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat strong { display: block; font-size: 1.45rem; color: var(--fg); }
.badge {
  display: inline-block; font-size: .72rem; padding: .15rem .45rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); font-weight: 600;
}
.badge.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 40%, var(--border)); }
.badge.bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, var(--border)); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
pre, code { font-family: var(--font-mono); }
pre {
  background: color-mix(in oklab, var(--bg) 70%, #000 8%);
  border: 1px solid var(--border); border-radius: 8px; padding: .85rem;
  overflow: auto; color: var(--fg); font-size: .82rem;
}
code { font-size: .88em; }
textarea, input, select {
  width: 100%; background: var(--bg-elevated); color: var(--fg);
  border: 1px solid var(--border); border-radius: 8px; padding: .65rem .75rem; font: inherit;
}
textarea { min-height: 160px; font-family: var(--mono); font-size: .82rem; }
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: .35rem; }
.field { margin: .75rem 0; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: .55rem .9rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.quiet, button.quiet {
  background: transparent; color: var(--fg); border: 1px solid var(--border);
}
.btn.secondary { background: color-mix(in oklab, var(--accent) 18%, var(--panel)); color: var(--fg); }
.icon-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.12); color: inherit;
  border-radius: 8px; width: 2rem; height: 2rem; cursor: pointer;
}
.main-wrap .icon-btn { border-color: var(--border); color: var(--fg); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.row > * { flex: 1; min-width: 160px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .4rem; }
.check-grid label, .check-row { display: flex; gap: .4rem; align-items: flex-start; color: var(--fg); font-size: .9rem; }
.check-grid input, .check-row input { width: auto; margin-top: 0.25rem; }
/* QDC device catalog cards (Run on QDC) */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .65rem;
  margin-top: .5rem;
}
.device-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  text-align: left; width: 100%;
  padding: .85rem .9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklab, var(--bg) 45%, var(--panel));
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.device-card:hover:not(:disabled):not(.is-unavailable) {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--border));
  background: color-mix(in oklab, var(--accent) 8%, var(--panel));
}
.device-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 28%, transparent);
  background: color-mix(in oklab, var(--accent) 12%, var(--panel));
}
.device-card.is-unavailable,
.device-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
}
.device-card-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .45rem; width: 100%; min-height: 1.75rem;
}
.device-brand-logo {
  display: block; height: 1.35rem; width: auto; max-width: 7.5rem;
  object-fit: contain; object-position: left center;
  /* Snapdragon SVG is dark-on-transparent; invert lightly in dark UI for legibility */
  filter: none;
}
html[data-theme="dark"] .device-brand-logo,
html:not([data-theme="light"]) .device-brand-logo {
  /* Keep Qualcomm blue readable; mild brightness for dark surfaces */
  filter: brightness(1.15) contrast(1.05);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .device-brand-logo { filter: none; }
}
.device-title {
  font-size: .92rem; font-weight: 650; line-height: 1.3; color: var(--fg);
}
.device-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  font-size: .8rem; color: var(--muted);
}
.device-meta code {
  font-size: .78rem; padding: .1rem .35rem; border-radius: 4px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--border); color: var(--fg);
}
.device-mins { font-size: .72rem; color: var(--muted); font-weight: 500; }
.badge.warn {
  background: color-mix(in oklab, var(--warn, #ff5c00) 18%, transparent);
  color: var(--warn, #ff5c00);
}
/* Playground — audience cards + tone rows (hosted SuperAdmin parity, vanilla) */
.pg-section { margin: 1.1rem 0 1.25rem; }
.pg-eyebrow {
  margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.pg-section-title { margin: .25rem 0 .35rem; font-size: 1.02rem; }
.audience-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem;
  margin-top: .65rem;
}
.audience-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem;
  background: color-mix(in oklab, var(--bg) 55%, var(--panel));
  color: var(--fg); font: inherit; transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.audience-card:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.audience-card.selected {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, var(--panel));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent);
}
.audience-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
}
.audience-card-top strong { font-size: .92rem; color: var(--fg); }
.audience-card .blurb { margin: .35rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.audience-card .tag-row { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; }
.tag {
  display: inline-block; font-size: .65rem; padding: .1rem .4rem; border-radius: 999px;
  background: var(--panel); color: var(--muted); border: 1px solid var(--border);
}
.tone-board { display: flex; flex-direction: column; gap: .55rem; margin-top: .65rem; }
.tone-row {
  display: grid; gap: .65rem; align-items: start;
  grid-template-columns: minmax(120px, .9fr) minmax(140px, 1fr) minmax(160px, 1.2fr);
  border: 1px solid var(--border); border-radius: 12px; padding: .75rem .85rem;
  background: color-mix(in oklab, var(--bg) 50%, var(--panel));
}
.tone-row-meta strong { display: block; font-size: .9rem; color: var(--fg); }
.tone-row-meta .small { margin-top: .15rem; }
.tone-row label { margin-bottom: .2rem; }
.tone-row input[type=range] { width: 100%; padding: 0; margin-top: .35rem; }
.tone-slider-meta {
  display: flex; justify-content: space-between; gap: .4rem;
  font-size: .7rem; color: var(--muted); margin-top: .25rem;
}
.tone-slider-meta .band { font-weight: 600; color: var(--fg); }
.pg-model-warn {
  margin: .5rem 0 0; padding: .55rem .75rem; border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--bad) 40%, var(--border));
  background: color-mix(in oklab, var(--bad) 8%, var(--panel));
  color: var(--bad); font-size: .88rem; font-weight: 600;
}
.pg-model-warn.hidden, .hidden { display: none !important; }
select.model-conflict { border-color: var(--bad); }
.pg-actions { margin-top: .5rem; }
.pg-actions > * { flex: 0 0 auto; min-width: 0; }
.pg-token-details { margin: .5rem 0 1rem; }
.pg-token-details summary { cursor: pointer; }
.pg-cost-panel { margin: .5rem 0 1rem; color: var(--fg); font-size: .92rem; }
.pg-cost-table { margin-top: .5rem; max-height: 200px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.pg-cost-table table { margin: 0; font-size: .78rem; }
.pg-cost-table th, .pg-cost-table td { padding: .35rem .5rem; }
/* Live progress (hosted SuperAdmin playground style) */
.pg-progress-panel {
  margin: 1rem 0; padding: 1rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel);
}
.pg-progress-panel[hidden] { display: none !important; }
.pg-progress-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem;
}
.pg-progress-title { margin: .2rem 0 .25rem; font-size: 1.02rem; color: var(--fg); }
.pg-progress-pct {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 1.25rem; font-weight: 700; color: var(--fg); tabular-nums: true;
}
.pg-progress-bar {
  margin-top: .75rem; height: 0.75rem; border-radius: 999px; overflow: hidden;
  background: color-mix(in oklab, var(--bg) 70%, var(--border));
}
.pg-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue, #07a4fd), var(--brand-purple, #3b109e));
  transition: width .3s ease;
  min-width: 0;
}
.pg-audience-bars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .45rem; margin-top: .75rem;
}
.pg-aud-bar {
  border: 1px solid var(--border); border-radius: 8px; padding: .45rem .55rem;
  background: color-mix(in oklab, var(--bg) 55%, var(--panel));
}
.pg-aud-bar-top {
  display: flex; justify-content: space-between; gap: .35rem;
  font-size: .75rem; color: var(--fg); font-weight: 600;
}
.pg-aud-bar-top .st { color: var(--muted); font-weight: 500; }
.pg-aud-bar-track {
  margin-top: .35rem; height: 6px; border-radius: 999px; overflow: hidden;
  background: color-mix(in oklab, var(--bg) 80%, var(--border));
}
.pg-aud-bar-fill {
  height: 100%; border-radius: 999px; width: 8%;
  background: var(--brand-blue, #07a4fd);
  transition: width .3s ease, background .2s ease;
}
.pg-aud-bar.done .pg-aud-bar-fill { width: 100%; background: var(--ok, #0d9488); }
.pg-aud-bar.failed .pg-aud-bar-fill { width: 100%; background: var(--bad); }
.pg-aud-bar.active .pg-aud-bar-fill { width: 55%; }
.pg-progress-log {
  list-style: none; margin: .75rem 0 0; padding: 0; max-height: 10rem; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px;
}
.pg-progress-log li {
  display: flex; gap: .5rem; padding: .35rem .65rem; font-size: .78rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  color: var(--fg);
}
.pg-progress-log li:last-child { border-bottom: 0; }
.pg-progress-log .pct {
  flex-shrink: 0; font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--muted); min-width: 2.5rem;
}
.window {
  border: 1px solid var(--border); border-radius: 10px; margin: .75rem 0; overflow: hidden;
}
.window-head {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .65rem .85rem; background: color-mix(in oklab, var(--panel) 80%, var(--accent) 6%);
  border-bottom: 1px solid var(--border);
}
.window-body { padding: .85rem; max-height: 420px; overflow: auto; }
.window-body pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  max-height: none; background: transparent; border: 0; padding: 0;
}
.window-doxie {
  border-top: 1px solid var(--border); margin-top: .75rem; padding-top: .65rem;
}
.window-doxie h3 { margin: 0 0 .35rem; font-size: .85rem; }
.window-tags { display: flex; flex-wrap: wrap; gap: .25rem; width: 100%; margin-top: .15rem; }
.md h1,.md h2,.md h3 { color: var(--fg); }
.md p,.md li { color: var(--muted); }
.md code { background: color-mix(in oklab, var(--bg) 80%, #000 5%); padding: .1rem .3rem; border-radius: 4px; }
@media (max-width: 720px) {
  .tone-row { grid-template-columns: 1fr; }
}
.mobile-only { display: none; }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .sidebar-pill { display: none; }
  .mobile-only { display: inline-flex; }
}
