/* Dev-only design language, laid over every dev page last: flat HUD, the illustrated stack's palette.
   Lilac and indigo surfaces, pink neon with teal and amber accents, 1px hairlines, corner brackets, chamfered corners.
   No glass: no blur, no gloss, no soft shadows, no pills, no hex lattice. */

:root, [data-theme=light] {
  --qf-paper: #f5f1fc; --qf-paper-2: #ebe4f8; --qf-panel: #fcfaff; --qf-ink: #1d1640; --qf-ink-2: #3d3570; --qf-ink-3: #6f669e;
  --qf-line: rgba(45, 30, 110, .14); --qf-line-2: rgba(45, 30, 110, .32); --qf-grid: rgba(45, 30, 110, .05);
  --qf-signal: #ff5aa8; --qf-signal-ink: #c8166a; --qf-signal-soft: #ffc6e2; --qf-signal-wash: #fbe3f1;
  --qf-band: #1c1645; --qf-on-band: #ece8ff; --qf-on-band-2: rgba(236, 232, 255, .64);
  --qf-teal: #00a89a; --qf-amber: #e8902a; --qf-peri: #8c95f0;
  --qf-sky: linear-gradient(180deg, #dfe2fd 0%, #ece3fb 38%, var(--qf-paper) 72%);
  --accent-soft: #ffc6e2; --idle: #a9a2c8; --scroll: #b9b2d6;
  --plot-1: #1d1640; --plot-2: #6f669e; --plot-3: var(--qf-signal); --plot-4: #8c95f0;
  --g-line: rgba(45, 30, 110, .14);
  --qf-hud: 0px;
}
[data-theme=dark] {
  --qf-paper: #120d2c; --qf-paper-2: #1a1440; --qf-panel: #1f1848; --qf-ink: #ece8ff; --qf-ink-2: #c4bce6; --qf-ink-3: #8d84b8;
  --qf-line: rgba(200, 190, 255, .14); --qf-line-2: rgba(200, 190, 255, .32); --qf-grid: rgba(200, 190, 255, .05);
  --qf-signal: #ff4fa3; --qf-signal-ink: #ff7ab8; --qf-signal-soft: #ff9ccd; --qf-signal-wash: #3a1838;
  --qf-band: #1a1440; --qf-teal: #3ff0dc; --qf-amber: #ffb04a; --qf-peri: #8c95f0;
  --qf-sky: linear-gradient(180deg, #1c1645 0%, #2a1f5e 34%, var(--qf-paper) 70%);
  --idle: #4e4778; --scroll: #3a3366;
  --plot-1: #ece8ff; --plot-2: #b3a8d8; --plot-4: #8c95f0;
  --g-line: rgba(200, 190, 255, .14);
}

/* ── one language: every glass token becomes a flat fill and a hairline; hexagons become diamonds ── */
:root, [data-theme=light], [data-theme=dark], html.qb, html.qb[data-theme="light"], html.qb[data-theme="dark"] {
  --qf-glass: var(--qf-panel); --qf-glass-blur: none; --qf-face-t: transparent; --qf-face-l: transparent; --qf-face-r: transparent;
  --qf-glint: transparent; --qf-edge-hi: var(--qf-line); --qf-edge-lo: var(--qf-line);
  --g-fill: var(--qf-panel); --g-fill-hi: var(--qf-paper-2); --g-rim: var(--qf-line); --g-face: var(--qf-panel);
  --g-shadow: none; --g-knob-shadow: none; --g-glow: none;
  --qf-pane-shadow: none; --shadow: none;
  --qf-hexclip: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); --qf-hexmask: none;
}

/* the ground: a dusk sky at the top of every page, nothing else */
html { background: var(--qf-paper); background-image: var(--qf-sky); background-repeat: no-repeat; background-size: 100% 900px; }
.qf-graticule { display: none !important; }
::selection { background: var(--qf-signal-soft); color: #1d1640; }

/* no blur and no frosted glass anywhere */
#root *, html.qb body *, body > *, body > * * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* HUD surfaces: square corners and teal corner brackets */
html.qb .card, html.qb .e2-card, html.qb .pi-card, #root .post-card, #root .mcard, #root .e2-gcard { border-radius: var(--qf-hud) !important; }
html.qb .card.hard::after, html.qb .e2-card::after, html.qb .pi-card::after { --t: var(--qf-teal); --l: 10px; opacity: .55 !important; inset: -5px !important; }
/* (the cards themselves cannot be pressed, so their brackets stay still under the pointer) */

/* controls: square, never pills */
#root button, #root select, #root input, #root textarea, html.qb button, html.qb select, html.qb input, html.qb textarea,
#root [class*="chip"], #root [class*="pill"], html.qb [class*="chip"], html.qb [class*="pill"], html.qb [class*="-tag"], html.qb .seg, html.qb .seg *,
html.qb .qf-sub-knob, html.qb .subnav, html.qb .subnav a, #root .nav-icon { border-radius: 2px !important; }
html.qb .qf-sub-knob::before { display: none !important; }

/* buttons: chamfered, mono, uppercase */
#root .button-primary, #root .btn-primary, html.qb .qf-cta, #root .hiring-cta a {
  border-radius: 0 !important; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }

/* eyebrows read as HUD readouts */
#root .eyebrow, html.qb .eyebrow { color: var(--qf-teal); letter-spacing: .16em; }
#root .eyebrow::before, html.qb .eyebrow::before { content: "◢ "; color: var(--qf-signal); }

/* section headings get a fine panel line with a tick, like a technical drawing */
#root .section-heading { position: relative; }
#root .section-heading::after { content: ""; display: block; margin-top: 14px; height: 1px; width: min(320px, 60%);
  background: linear-gradient(90deg, var(--qf-teal) 0 40px, var(--qf-line-2) 40px); }

/* footer: a neon seam on top */
#root .site-footer { position: relative; }
#root .site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--qf-signal) 30%, var(--qf-teal) 70%, transparent); opacity: .6; }

/* the reading-progress line rides the shared header's bottom edge instead of hiding under it */
.qf-progress { top: 63px !important; z-index: 201 !important; height: 1px !important; }

/* dev-only tools (font preview tab, dev badge): flat and square like everything else */
#qf-font-pick button, #qf-font-pick .qf-font-open { border-radius: 0 !important; box-shadow: none !important; background: var(--qf-panel) !important;
  color: var(--qf-ink-2) !important; border-color: var(--qf-line-2) !important; font-family: "Geist Mono", ui-monospace, monospace !important; letter-spacing: .1em; }
#qf-font-pick select { border-radius: 0 !important; }
body > div[style*="position:fixed"][style*="border-radius:4px"] { border-radius: 0 !important; background: var(--qf-panel) !important; color: var(--qf-ink-3) !important;
  border: 1px solid var(--qf-line) !important; font: 500 10px/1.3 "Geist Mono", ui-monospace, monospace !important; letter-spacing: .12em; text-transform: uppercase; }

/* motion: one crisp ease-out everywhere, no springs or overshoot; quick and calm; nothing moves for people who ask it not to */
body *, body *::before, body *::after { transition-timing-function: cubic-bezier(.2, .8, .2, 1) !important; }
html.qb :is(.e2-chip, .e2-costwrap.opening .e2-gcard, .e2-rail .pill.moving, .e2-eqrow .t.tick em, .pi-pop.on) { animation-timing-function: cubic-bezier(.2, .8, .2, 1) !important; }
html.qb .qfx-art .qfx-l, .qfk-layer-bench, .qfk-layer-sim { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── type: a soft Japanese rounded face for everything, a Japanese mono for HUD labels ── */
:root, [data-theme=light], [data-theme=dark], html.qb, html.qb[data-theme="light"], html.qb[data-theme="dark"] {
  --qf-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", ui-rounded, system-ui, sans-serif;
  --qf-sans: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", ui-rounded, system-ui, sans-serif;
  --qf-mono: "M PLUS 1 Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: var(--qf-display); --body: var(--qf-sans); --mono: var(--qf-mono); --sans: var(--qf-sans);
}
body, #root, html.qb body { font-family: var(--qf-sans); }
#root h1, #root h2, html.qb h1, html.qb h2, body.qfk-static h1, body.qfk-static h2 { font-family: var(--qf-display); font-weight: 700; letter-spacing: -.01em; }
#root h3, #root h4, html.qb h3, html.qb h4 { font-family: var(--qf-display); font-weight: 700; }
#qf-font-pick { display: none !important; }

/* ── one solid ground per theme, the same colour the stack animation is baked onto ── */
/* !important so the per-page stylesheets that load after this one (QuettaBench, Efficiency Index) cannot bring back
   their older palette: every page sits on exactly the same two colours */
:root, [data-theme=light], html.qb, html.qb[data-theme="light"] {
  --qf-paper: #ece8fa !important; --qf-paper-2: #e2daf6 !important; --qf-panel: #f6f2fe !important; --qf-sky: none !important; }
[data-theme=dark], html.qb[data-theme="dark"] {
  --qf-paper: #1b1741 !important; --qf-paper-2: #221a50 !important; --qf-panel: #261d58 !important; --qf-sky: none !important; }
html, body { background: var(--qf-paper) !important; background-image: none !important; }

/* page to page: a soft cross-fade instead of a flash of the next page assembling */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* large screens: the whole page scales by --qf-z (set in header.css). Viewport units scale with zoom, so full-height blocks divide it back out */
@media (min-width: 1900px) {
  html { zoom: var(--qf-z); }
  .min-h-screen { min-height: calc(100vh / var(--qf-z)); }
}

/* touch: 44 px targets for the controls and footer links, and a floor under the small mono labels */
@media (max-width: 900px), (pointer: coarse) {
  html body .site-footer a, html body .qf-foot a { display: inline-flex; align-items: center; min-height: 44px; }
  html.qb .subnav a, html body button, html body select, #root button, #root select { min-height: 44px; }
  html.qb .seg > button, html.qb .e2-views button, html.qb .e2-seg button, html.qb .e2-btn, html.qb .e2-eqwhy summary, html.qb .pi-more, html.qb .lptop button { min-height: 44px; }
  html.qb .qb-download, #root .qb-download { min-width: 44px; }
  html body a.pi-deepgo, #root#root a.qf-career-discuss { min-height: 44px; display: inline-flex; align-items: center; }
  #hx#hx button, #hx#hx summary, html body .hx-mode button, html body .hx-bar .seg button, html body details.hx-pend summary { min-height: 44px; }
  html.qb .seg a, html.qb .seg button { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 900px) {
  html.qb .org, html.qb .pv, html.qb .pi-lbl, html.qb .pi-bar .pi-f label, html.qb label, html.qb body .qf-foot-h, html body p.qf-foot-h,
  #root#root .qs-page summary, #root#root summary { font-size: 11px !important; }
  html.qb .card .fld label, html.qb section.page .fld label, html.qb .cmpcards .rc .rg, html.qb .cmptgt-hd em, html.qb aside.qsim-link .qsim-ctx .k, html.qb .chartwrap .cfgh,
  html.qb .cfgh, html.qb .cmptgt-u, html.qb .k, html.qb .qsim-readout, html.qb .org, html.qb .pv { font-size: 11px !important; }
  #root#root .qs-page :is(.qs-account-k, .qs-example-badge, .qs-run-status, .qs-result-state time, .qs-metric span, .qs-hint, .qs-secondary-metrics dt,
    .qs-replay-details caption, .qs-history caption, .qs-history-setup, .qs-draft-changed, thead th) { font-size: 11px !important; }
  #root#root :is(.qf-foot-h, .qs-badge, .qs-field, legend, small, .qs-status span, .qs-workload-stats span, .qs-workload-stats strong,
    .post-meta span, .post-byline, .career-tools, .qf-career-map-label, .qf-career-discuss, .qf-career-node b,
    .qf-career-details summary, .qf-career-lab .eyebrow) { font-size: 11px !important; }
}

/* ── one phone type scale for every page (12 Nov): the same gutter, hero title, article title and lede size everywhere; pages read these ── */
:root, [data-theme=light], [data-theme=dark], html.qb, html.qb[data-theme="light"], html.qb[data-theme="dark"] {
  --qf-gutter-phone: 20px;
  --qf-h1-phone: clamp(42px, 12vw, 64px);       /* page heroes: Efficiency Index, QuettaBench, QuettaSim, Blog, Careers, About, policies */
  --qf-h1-doc-phone: clamp(34px, 9.7vw, 44px);  /* long-form titles: blog posts, legal and privacy */
  --qf-lede-phone: 16px;
}
