/* Saracen Bridge Studio: "The Screening Room" (0.4, 13 Oct 2026).
   A private screening room at night: aubergine-black walls, gold light only on what matters, the crest's purple as the
   room's tint. Purple = atmosphere and the AI, gold = action and value, ivory = reading. Dark by design (the brand).
   Rule 1 sources and decisions: docs/DESIGN.md. Motion rules: ease-out, under 300 ms, nothing on keyboard-triggered UI. */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4-Variable.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4-Italic-Variable.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  /* ink: purple-tinted blacks, lighter = higher (elevation by lightness, not shadow) */
  --ink-0: #07050b; --ink-1: #0c0813; --ink-2: #120c1b; --ink-3: #191125; --ink-4: #221830; --ink-5: #2d203e;
  --line: rgba(222, 200, 255, .075); --line-2: rgba(222, 200, 255, .13); --line-3: rgba(222, 200, 255, .22);
  --hi: rgba(255, 246, 230, .055);                       /* top inner highlight on raised surfaces */
  /* text: warm ivory, never pure white */
  --fg: #f1ebe0; --fg-2: #bab1a7; --fg-3: #877f8f; --fg-4: #5e5668;
  /* gold: sharper, brighter highlights around Saracen gold */
  --gold-200: #fff0c4; --gold-300: #ffd873; --gold-400: #f2c04d; --gold: #dba534; --gold-600: #a9771b; --gold-700: #6c4b0f;
  --gold-metal: linear-gradient(180deg, #fff3c8 0%, #f8d56f 26%, #e3ad3a 56%, #b8821f 100%);
  --gold-line: rgba(242, 192, 77, .42); --gold-wash: rgba(219, 165, 52, .1);
  /* purple: the crest, made richer (royal aubergine) */
  --plum-200: #e6d4ff; --plum-300: #c6a3f7; --plum-400: #9d6fe2; --plum: #6b3fb4; --plum-600: #3f1f70; --plum-700: #241240;
  --plum-glow: rgba(120, 66, 205, .3); --plum-wash: rgba(157, 111, 226, .14);
  --copper: #dba974;
  /* states: desaturated so they never compete with gold */
  --ok: #82caa0; --ok-wash: rgba(130, 202, 160, .1); --warn: #e3946a; --warn-wash: rgba(227, 148, 106, .1);
  --bad: #e88686; --bad-wash: rgba(232, 134, 134, .1);
  /* type */
  --sans: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", "SF Mono", Consolas, monospace;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --uiz: 1; /* interface scale, set by studio.js (uiScale); viewport units divide by it so zoom never overflows the window */
  /* shape, depth, motion */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow-pop: 0 1px 0 var(--hi) inset, 0 24px 60px -18px rgba(0, 0, 0, .75), 0 0 0 1px var(--line-2);
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-io: cubic-bezier(.77, 0, .175, 1);
  --rail: 256px; --topbar: 60px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--ink-0); zoom: var(--uiz);
  /* type is scale-locked: one uniform zoom for the whole interface (never a per-axis stretch), no browser text inflation,
     no faked bold or small caps, normal width only, and optical sizes that follow the actual size on screen */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: style; font-stretch: 100%; font-optical-sizing: auto; font-kerning: normal; }
body {
  margin: 0; color: var(--fg); background: var(--ink-0); font: 400 14px/1.55 var(--sans);
  font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* the room: a plum glow from the crest, faint gold light from the right, film grain over everything */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at -6% -10%, var(--plum-glow), transparent 62%),
    radial-gradient(700px 420px at 108% -14%, rgba(219, 165, 52, .07), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(52, 24, 92, .35), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
::selection { background: var(--plum); color: var(--fg); }
a { color: var(--gold-300); text-decoration-color: rgba(255, 216, 115, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold-300); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a3347; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- frame ---------------- */
.shell { position: relative; z-index: 1; display: flex; height: calc(100vh / var(--uiz)); overflow: hidden; }
.side {
  flex: 0 0 var(--rail); width: var(--rail); height: calc(100vh / var(--uiz)); min-height: 0;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px 14px;
}
.mark { display: block; text-decoration: none; padding: 4px 0 12px; }
.mark img { display: block; width: 100%; max-width: 196px; margin: 0 auto; height: auto; border-radius: 11px; box-shadow: 0 0 0 1px rgba(242, 192, 77, .26), 0 18px 40px -18px rgba(52, 24, 92, .9); }
.mark small { display: block; margin-top: 10px; text-align: center; font: 500 9.5px/1 var(--mono); letter-spacing: .55em; color: var(--fg-3); padding-left: .55em; }
nav { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px 0 -4px; padding: 0 6px 8px 4px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
nav:hover { scrollbar-color: var(--ink-5) transparent; }
nav .grp { font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-4); margin: 14px 10px 6px; }
nav a {
  position: relative; display: flex; align-items: center; gap: 11px; height: 32px; flex: none; padding: 0 10px; border-radius: 9px; white-space: nowrap;
  color: var(--fg-2); text-decoration: none; font-size: 13.5px; transition: background-color .15s ease, color .15s ease;
}
nav a .ic { color: var(--fg-4); display: grid; place-items: center; transition: color .15s ease; }
nav a .n { margin-left: auto; font: 500 10.5px var(--mono); color: var(--fg-4); letter-spacing: .04em; }
@media (hover: hover) { nav a:hover { background: var(--ink-3); color: var(--fg); } nav a:hover .ic { color: var(--fg-2); } }
nav a[aria-current="page"] { background: linear-gradient(90deg, var(--gold-wash), rgba(219, 165, 52, .02)); color: var(--gold-200); }
nav a[aria-current="page"] .ic, nav a[aria-current="page"] .n { color: var(--gold-400); }
nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-metal); box-shadow: 0 0 14px rgba(242, 192, 77, .55); }
.side-foot { flex: none; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.side-foot .ver { display: flex; justify-content: space-between; padding: 0 4px; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-4); }
.engine-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; color: var(--fg-2); font-size: 12px; line-height: 1.3; }
.engine-chip b { display: block; color: var(--fg); font-weight: 550; font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--fg-4); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(130, 202, 160, .14), 0 0 12px rgba(130, 202, 160, .5); }
.dot.ai { background: var(--plum-300); box-shadow: 0 0 0 3px var(--plum-wash), 0 0 12px rgba(198, 163, 247, .55); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-wash); }
.dot.live { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

.main {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; position: relative;
  margin: 10px 10px 10px 0; height: calc(calc(100vh / var(--uiz)) - 20px); overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
  border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, #100b18 0%, #0b0811 520px);
  box-shadow: 0 1px 0 var(--hi) inset, 0 0 0 1px rgba(0, 0, 0, .55), 0 40px 90px -40px rgba(0, 0, 0, .95);
}
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 32px;
  background: linear-gradient(180deg, rgba(16, 11, 24, .88), rgba(16, 11, 24, .7)); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; }
.crumbs b { color: var(--fg); font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--fg-4); }
.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(420px, calc(40vw / var(--uiz))); height: 36px; padding: 0 8px 0 12px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--fg-3); cursor: pointer; font-size: 13px; text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}
/* the sheet's signature: a gold hairline catching light along its top edge */
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 6%, rgba(242, 192, 77, .5) 34%, rgba(255, 240, 196, .75) 50%, rgba(242, 192, 77, .5) 66%, transparent 94%); opacity: .5; }
@media (hover: hover) { .search-trigger:hover { border-color: var(--line-3); background: var(--ink-3); color: var(--fg-2); } }
.search-trigger span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11px/1 var(--mono); color: var(--fg-3); padding: 4px 6px; border-radius: 6px; background: var(--ink-4); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--fg-3); cursor: pointer; position: relative; text-decoration: none; }
@media (hover: hover) { .icon-btn:hover { background: var(--ink-3); color: var(--fg); border-color: var(--line); } }
.icon-btn .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold-metal); color: #1a1408; font: 700 10px/16px var(--mono); text-align: center; }

main#app { position: relative; width: 100%; max-width: 1480px; margin: 0 auto; padding: 32px 36px 80px; }
.page-enter { animation: rise .32s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------------- type ---------------- */
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-400); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold-line); }
h1 { font: 400 52px/1.02 var(--serif); letter-spacing: -.01em; margin: 14px 0 10px; color: var(--fg); text-wrap: balance; }
h1 em { font-style: italic; color: var(--gold-300); }
h2 { font: 600 13px/1.2 var(--sans); letter-spacing: .02em; color: var(--fg); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h2 .count { font: 500 11px var(--mono); color: var(--fg-3); padding: 3px 7px; border-radius: 6px; background: var(--ink-3); }
.section-title { font: 400 28px/1.1 var(--serif); margin: 48px 0 18px; display: flex; align-items: baseline; gap: 14px; }
.section-title small { font: 500 10.5px var(--mono); letter-spacing: .18em; color: var(--fg-4); text-transform: uppercase; }
.lede { font-size: 16px; color: var(--fg-2); max-width: 62ch; margin: 0; }
.muted { color: var(--fg-2); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.num, td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.big { font: 400 40px/1.1 var(--serif); }

/* ---------------- surfaces ---------------- */
.card { position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; min-width: 0; box-shadow: 0 1px 0 var(--hi) inset; }
.card.flush { padding: 0; overflow: hidden; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 28px; align-items: start; }
.cols > .wide { min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.scroll { overflow-x: auto; border-radius: var(--r); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hr { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* ---------------- tool cards ---------------- */
.suite-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 52px 0 18px; }
.suite-head .section-title { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-3);
  font: 550 12.5px var(--sans); cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
@media (hover: hover) { .chip:hover { color: var(--fg); border-color: var(--line-3); } }
.chip[aria-pressed=true] { color: #1d1608; background: var(--gold-metal); border-color: transparent; box-shadow: 0 6px 18px -8px rgba(219, 165, 52, .6); }
.suite { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.tile {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 196px; padding: 20px 20px 18px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  color: var(--fg); text-decoration: none; border: 1px solid transparent;
  background: linear-gradient(180deg, #161021, #110c1a) padding-box,
              linear-gradient(155deg, rgba(242, 192, 77, .3), rgba(226, 210, 255, .07) 38%, rgba(226, 210, 255, .04) 100%) border-box;
  box-shadow: 0 1px 0 var(--hi) inset, 0 18px 40px -28px rgba(0, 0, 0, .9);
  transition: transform .22s var(--ease-out), box-shadow .22s ease;
}
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(380px 220px at var(--mx) var(--my), rgba(242, 192, 77, .13), transparent 70%); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .25s ease;
  box-shadow: inset 0 0 0 1px rgba(242, 192, 77, .42); }
.tile .wm { position: absolute; z-index: -1; right: 12px; bottom: -26px; font: 400 128px/1 var(--serif); letter-spacing: -.04em;
  color: rgba(238, 232, 221, .035); transition: color .3s ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--hi) inset, 0 26px 50px -26px rgba(0, 0, 0, .95), 0 0 40px -18px rgba(219, 165, 52, .35); }
  .tile:hover::before, .tile:hover::after { opacity: 1; }
  .tile:hover .wm { color: rgba(242, 192, 77, .085); }
  .tile:hover .go { color: var(--gold-300); transform: translateX(3px); }
}
.tile:active { transform: scale(.985); }
.tile .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tile .glyph { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--gold-300);
  background: linear-gradient(160deg, rgba(107, 63, 180, .6), rgba(30, 15, 52, .92)); box-shadow: 0 0 0 1px rgba(242, 192, 77, .22) inset, 0 1px 0 rgba(255, 240, 210, .12) inset, 0 10px 22px -12px rgba(107, 63, 180, .9); }
.tile .glyph svg.i { width: 20px; height: 20px; }
.tile .code { font: 500 10px var(--mono); color: var(--fg-4); letter-spacing: .16em; text-transform: uppercase; }
.tile .t { font: 600 16.5px/1.25 var(--sans); letter-spacing: -.01em; }
.tile .d { color: var(--fg-2); font-size: 13px; line-height: 1.45; max-width: 30ch; }
.tile .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; }
.tile .go { color: var(--fg-4); transition: transform .2s var(--ease-out), color .2s ease; display: grid; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.stagger > * { animation: rise .42s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 26ms); }

.state { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--sans); color: var(--fg-2); }
.state .dot { width: 6px; height: 6px; }
.state.ready { color: var(--ok); } .state.ready .dot { background: var(--ok); box-shadow: 0 0 8px rgba(130, 202, 160, .6); }
.state.partial { color: var(--gold-300); } .state.partial .dot { background: var(--gold-400); box-shadow: 0 0 8px rgba(242, 192, 77, .55); }
.state.ai { color: var(--plum-300); } .state.ai .dot { background: var(--plum-300); box-shadow: 0 0 8px rgba(198, 163, 247, .6); }
.state.soon { color: var(--fg-3); } .state.soon .dot { background: var(--fg-4); }
.state.ext { color: var(--fg-2); } .state.ext .dot { background: var(--copper); }

/* ---------------- the marquee (home) ---------------- */
.marquee { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; padding: 44px 44px 40px;
  background: #0d0915; border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255, 240, 210, .06) inset, 0 40px 80px -50px rgba(0, 0, 0, 1); }
.marquee::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent 8%, rgba(255, 240, 196, .7) 50%, transparent 92%); opacity: .6; }
.marquee::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;   /* vignette, like a projected frame */
  background: radial-gradient(120% 140% at 50% 0%, transparent 55%, rgba(5, 4, 8, .7) 100%); }
.aurora { position: absolute; inset: -30%; z-index: -2; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; will-change: transform; }
.aurora i:nth-child(1) { width: 62%; height: 70%; left: 2%; top: 26%; background: radial-gradient(closest-side, rgba(118, 58, 206, .5), rgba(118, 58, 206, 0)); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 46%; height: 56%; right: 6%; top: 8%; background: radial-gradient(closest-side, rgba(232, 172, 58, .26), rgba(232, 172, 58, 0)); animation: drift-b 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40%; height: 50%; left: 40%; top: 46%; background: radial-gradient(closest-side, rgba(52, 24, 92, .9), rgba(52, 24, 92, 0)); animation: drift-c 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(14%, -10%, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-18%, 14%, 0) scale(.92); } }
@keyframes drift-c { to { transform: translate3d(-12%, -16%, 0) scale(1.18); } }
.mq { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: end; }
.marquee h1 { font-size: clamp(46px, calc(5.6vw / var(--uiz)), 76px); line-height: .98; letter-spacing: -.02em; margin: 18px 0 16px; max-width: 13ch; }
.marquee .lede { font-size: 16.5px; max-width: 52ch; }
.mq-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.mq-actions .btn { height: 44px; padding: 0 20px; border-radius: 12px; font-size: 14px; }
.mq-actions .btn.ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mq-actions kbd { margin-left: 4px; }
.ledger { display: grid; border-radius: 16px; background: rgba(10, 8, 14, .55); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; }
.ledger > * { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.ledger > *:last-child { border-bottom: 0; }
.ledger .v { font: 400 34px/1 var(--serif); font-variant-numeric: lining-nums; }
.ledger .v small { font-size: 18px; color: var(--fg-3); margin-left: 2px; }
.ledger .l { grid-column: 1; font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.ledger .r { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); }
.ledger a.r, .ledger .r a { color: var(--gold-300); text-decoration: none; }
@media (hover: hover) { .ledger a:hover { background: rgba(255, 255, 255, .02); } }

.continue { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.recent-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; color: var(--fg);
  box-shadow: 0 1px 0 var(--hi) inset; transition: border-color .2s ease, background-color .2s ease, transform .2s var(--ease-out); min-width: 0; }
@media (hover: hover) { .recent-card:hover { border-color: var(--line-3); background: var(--ink-3); transform: translateY(-2px); } }
.recent-card .ic { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--gold-300); background: var(--ink-4); box-shadow: 0 0 0 1px var(--line-2) inset; }
.recent-card .ic svg.i { width: 17px; height: 17px; }
.recent-card .t { font-weight: 550; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.recent-card .f { color: var(--fg-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.recent-card .f b { color: var(--fg-2); font-weight: 500; }

/* ---------------- notice ---------------- */
.notice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 22px; border-radius: var(--r); border: 1px solid rgba(157, 111, 226, .28);
  background: linear-gradient(90deg, rgba(107, 63, 180, .22), rgba(107, 63, 180, .06)); color: var(--fg); font-size: 13.5px; }
.notice .ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--plum-wash); color: var(--plum-200); flex: none; }
.notice .grow { flex: 1; min-width: 0; }
.notice .sub { color: var(--fg-2); font-size: 12.5px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--ink-3); color: var(--fg); font-weight: 550; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 0 var(--hi) inset; transition: background-color .15s ease, border-color .15s ease, transform .16s var(--ease-out), filter .15s ease;
}
@media (hover: hover) { .btn:hover { background: var(--ink-4); border-color: var(--line-3); } }
.btn:active { transform: scale(.97); }
.btn.primary { border: 0; color: #1d1608; background: var(--gold-metal);
  box-shadow: 0 1px 0 rgba(255, 244, 214, .55) inset, 0 -1px 0 rgba(90, 60, 10, .35) inset, 0 8px 24px -10px rgba(219, 165, 52, .65), 0 0 0 1px rgba(110, 80, 25, .55); }
@media (hover: hover) { .btn.primary:hover { filter: brightness(1.06) saturate(1.05); } }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--fg-2); padding: 0 10px; }
@media (hover: hover) { .btn.quiet:hover { background: var(--ink-3); color: var(--fg); } }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.btn .i { width: 16px; height: 16px; }

/* ---------------- forms ---------------- */
label.f { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 500; color: var(--fg-3); min-width: 0; max-width: 100%; letter-spacing: .01em; }
label.f > input, label.f > select, select { max-width: 100%; }
input[type=text], input[type=number], input[type=search], input[type=password], select, textarea {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--ink-1); color: var(--fg); font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input::placeholder { color: var(--fg-4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(242, 192, 77, .6); box-shadow: 0 0 0 3px rgba(219, 165, 52, .16); background: var(--ink-2); }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23847d8a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; }
option { background: var(--ink-3); color: var(--fg); }
input[type=checkbox] { appearance: none; width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: -4px; border-radius: 5px; border: 1px solid var(--line-3); background: var(--ink-1); cursor: pointer; display: inline-grid; place-items: center; transition: background-color .15s ease, border-color .15s ease; }
input[type=checkbox]::after { content: ""; width: 9px; height: 5px; border: 2px solid #1d1608; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--ease-out); }
input[type=checkbox]:checked { background: var(--gold-metal); border-color: transparent; }
input[type=checkbox]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
td input[type=text] { min-width: 110px; } td input[type=number] { min-width: 88px; } td select { min-width: 140px; }
td input, td select { width: 100%; }
td input, td select { height: 34px; }

/* ---------------- tabs (segmented) ---------------- */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line); margin: 0 0 4px; flex-wrap: wrap; max-width: 100%; }
.tabs button { height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: var(--fg-3); cursor: pointer; font-weight: 550; font-size: 13px; transition: color .15s ease, background-color .2s ease; }
@media (hover: hover) { .tabs button:hover { color: var(--fg); } }
/* selected tab: see the gold-gradient block at the end (Tim, 13 Oct) */
.tabs .lbl { align-self: center; color: var(--fg-4); font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 0 10px 0 8px; }

/* ---------------- tables ---------------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th { position: sticky; top: 0; text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3);
  padding: 12px 14px; background: var(--ink-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { transition: background-color .12s ease; }
@media (hover: hover) { tbody tr:hover td { background: rgba(226, 210, 255, .025); } }
tbody tr:last-child td { border-bottom: 0; }
td b { font-weight: 600; }

/* ---------------- KPIs ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
.kpi { position: relative; padding: 16px 18px 18px; border-radius: var(--r); background: var(--ink-1); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.kpi .l { font: 500 10.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.kpi .v { font: 400 34px/1.05 var(--serif); margin-top: 12px; color: var(--fg); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.kpi.edge { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(219, 165, 52, .1), rgba(219, 165, 52, .02) 70%), var(--ink-1); }
.kpi.edge::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold-metal); }
.kpi.edge .v { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- pills & notes ---------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 11px/1 var(--sans); letter-spacing: .02em;
  background: var(--ink-4); color: var(--fg-2); border: 1px solid var(--line-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.PASS { color: var(--ok); background: var(--ok-wash); border-color: rgba(130, 202, 160, .25); }
.pill.FAIL { color: var(--bad); background: var(--bad-wash); border-color: rgba(232, 134, 134, .25); }
.pill.PRELIMINARY, .pill.WARN { color: var(--warn); background: var(--warn-wash); border-color: rgba(227, 148, 106, .25); }
.pill.AI { color: var(--plum-200); background: var(--plum-wash); border-color: rgba(157, 111, 226, .3); }
.note { position: relative; margin: 12px 0 0; padding: 11px 14px 11px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5;
  background: var(--ink-3); color: var(--fg-2); border: 1px solid var(--line); }
.note::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--fg-4); }
.note.PASS { background: var(--ok-wash); color: #cfeadb; border-color: rgba(130, 202, 160, .18); } .note.PASS::before { background: var(--ok); }
.note.FAIL { background: var(--bad-wash); color: #f3cfcf; border-color: rgba(232, 134, 134, .18); } .note.FAIL::before { background: var(--bad); }
.note.PRELIMINARY { background: var(--warn-wash); color: #f1d3c1; border-color: rgba(227, 148, 106, .18); } .note.PRELIMINARY::before { background: var(--warn); }
.err { padding: 14px 16px; border-radius: var(--r); background: var(--bad-wash); color: #f3cfcf; border: 1px solid rgba(232, 134, 134, .25); }

/* ---------------- lists ---------------- */
.list { display: flex; flex-direction: column; }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; text-decoration: none; color: var(--fg); border-bottom: 1px solid var(--line); transition: background-color .12s ease; min-width: 0; }
.list a:last-child { border-bottom: 0; }
@media (hover: hover) { .list a:hover { background: var(--ink-3); } }
.list a > span:first-child { min-width: 0; }
.list .ttl { font-weight: 550; }
.list .meta { display: block; color: var(--fg-3); font-size: 12px; margin-top: 3px; }
.list .when { font: 500 11.5px var(--mono); color: var(--fg-3); white-space: nowrap; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
ul.plain li { display: flex; gap: 10px; color: var(--fg-2); font-size: 13px; line-height: 1.45; }
ul.plain li svg.i { width: 16px; height: 16px; margin-top: 1px; }
ul.plain.ok li svg.i { color: var(--ok); } ul.plain.ai li svg.i { color: var(--plum-300); } ul.plain.soon li svg.i { color: var(--fg-4); } ul.plain.need li svg.i { color: var(--gold-400); }
.side-card h2 { margin-top: 22px; } .side-card h2:first-child { margin-top: 0; }
.side-card h2 small { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-4); }

/* ---------------- drop zone ---------------- */
.drop { position: relative; display: grid; justify-items: center; gap: 10px; padding: 44px 24px; text-align: center; border-radius: var(--r-lg); color: var(--fg-2);
  background: radial-gradient(500px 200px at 50% 0%, rgba(107, 63, 180, .18), transparent 70%), var(--ink-1); border: 1.5px dashed var(--line-3);
  transition: border-color .2s ease, background-color .2s ease; }
.drop .art { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--gold-300);
  background: linear-gradient(160deg, rgba(107, 63, 180, .55), rgba(30, 15, 52, .9)); box-shadow: 0 0 0 1px rgba(242, 192, 77, .22) inset; }
.drop .art svg.i { width: 26px; height: 26px; }
.drop .big { font: 400 28px/1.1 var(--serif); color: var(--fg); }
.drop p { margin: 0; max-width: 54ch; font-size: 13.5px; }
.drop .row { justify-content: center; margin-top: 8px; }
.drop.over { border-color: var(--gold-400); background: radial-gradient(500px 220px at 50% 0%, rgba(219, 165, 52, .16), transparent 70%), var(--ink-1); }

/* ---------------- progress: the clapper stripe ---------------- */
.clapper { height: 6px; border-radius: 6px; overflow: hidden; background: var(--ink-4);
  background-image: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--ink-5) 8px 16px); background-size: 22.6px 22.6px; animation: roll 1s linear infinite; }
@keyframes roll { to { background-position: 22.6px 0; } }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(calc(100vw / var(--uiz)) - 32px)); pointer-events: none; }
.toast { position: relative; overflow: hidden; pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 14px 15px 14px; border-radius: 14px;
  background: rgba(30, 21, 44, .86); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--shadow-pop);
  animation: toast-in .24s var(--ease-out) both; }
.toast.out { animation: toast-out .16s ease-out forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.toast .tp { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; background: currentColor; opacity: .55; animation: countdown linear forwards; }
.toast:hover .tp { animation-play-state: paused; }
.toast.ok .tp { color: var(--ok); } .toast.bad .tp { color: var(--bad); } .toast.info .tp { color: var(--gold-400); } .toast.ai .tp { color: var(--plum-300); }
@keyframes countdown { to { transform: scaleX(0); } }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.toast.ok .ti { background: var(--ok-wash); color: var(--ok); } .toast.bad .ti { background: var(--bad-wash); color: var(--bad); }
.toast.info .ti { background: var(--gold-wash); color: var(--gold-300); } .toast.ai .ti { background: var(--plum-wash); color: var(--plum-200); }
.toast .tt { font-weight: 600; font-size: 13.5px; } .toast .tb { color: var(--fg-2); font-size: 12.5px; margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.toast .tb a { color: var(--gold-300); }
.toast .x { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--fg-3); cursor: pointer; display: grid; place-items: center; }
@media (hover: hover) { .toast .x:hover { background: var(--ink-5); color: var(--fg); } }

/* ---------------- modal ---------------- */
.scrim { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(5, 4, 8, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease both; }
.scrim.out { animation: fade-out .15s ease forwards; }
@keyframes fade { from { opacity: 0; } } @keyframes fade-out { to { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(calc(100vh / var(--uiz)) - 48px); overflow: auto; border-radius: var(--r-xl); background: var(--ink-3); box-shadow: var(--shadow-pop);
  padding: 28px; animation: pop .24s var(--ease-out) both; transform-origin: center; }
.scrim.out .modal { animation: pop-out .15s ease forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.98); } }
.modal .mi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; color: var(--gold-300);
  background: linear-gradient(160deg, rgba(107, 63, 180, .6), rgba(30, 15, 52, .9)); box-shadow: 0 0 0 1px rgba(242, 192, 77, .22) inset; }
.modal h3 { font: 400 30px/1.1 var(--serif); margin: 0 0 8px; }
.modal p { color: var(--fg-2); margin: 0 0 6px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------------- command palette ---------------- */
.palette-scrim { position: fixed; inset: 0; z-index: 95; background: rgba(5, 4, 8, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.palette { position: fixed; z-index: 96; left: 50%; top: calc(13vh / var(--uiz)); transform: translateX(-50%); width: min(660px, calc(calc(100vw / var(--uiz)) - 32px)); border-radius: 18px; overflow: hidden;
  background: rgba(27, 19, 40, .94); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); box-shadow: var(--shadow-pop); }
.palette .q { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--line-2); color: var(--fg-3); }
.palette .q input { flex: 1; height: 60px; border: 0; background: transparent; box-shadow: none; font-size: 17px; padding: 0; color: var(--fg); }
.palette .q input:focus { box-shadow: none; background: transparent; }
.palette .res { max-height: min(420px, calc(56vh / var(--uiz))); overflow-y: auto; padding: 8px; }
.palette .grp { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-4); padding: 12px 10px 6px; }
.palette .item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; color: var(--fg-2); cursor: pointer; }
.palette .item .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--ink-4); color: var(--fg-3); }
.palette .item .lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .item .hint { font: 500 11px var(--mono); color: var(--fg-4); }
.palette .item[aria-selected=true] { background: var(--ink-5); color: var(--fg); }
.palette .item[aria-selected=true] .ic { color: var(--gold-300); background: rgba(219, 165, 52, .14); }
.palette .foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--fg-4); font-size: 11.5px; }
.palette .foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette .empty { padding: 28px; text-align: center; color: var(--fg-3); }

/* ---------------- coverage report ---------------- */
.report { margin-top: 20px; padding: 36px 40px; }
.report h2.sec { font: 400 26px/1.15 var(--serif); letter-spacing: 0; margin: 38px 0 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.report h2.sec .no { font: 500 11px var(--mono); color: var(--gold-400); letter-spacing: .12em; margin-right: 6px; }
.report p { line-height: 1.7; color: var(--fg); max-width: 76ch; }
.report .lbl { font: 600 12px var(--sans); letter-spacing: .04em; color: var(--gold-300); margin: 18px 0 6px; text-transform: uppercase; }
.report .logline { font: italic 400 22px/1.4 var(--serif); color: var(--fg); border-left: 2px solid var(--gold-line); padding-left: 18px; }
.report .colophon { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12px; }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.file { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 10px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line-2); color: var(--fg); text-decoration: none; font-size: 13px; }
.file .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--gold-wash); color: var(--gold-300); }
@media (hover: hover) { .file:hover { border-color: var(--gold-line); } }

/* ---------------- skeleton ---------------- */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- narrow windows and phones ---------------- */
@media (max-width: 1180px) {
  .mq { grid-template-columns: 1fr; gap: 28px; }
  .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger > * { border-bottom: 0; border-right: 1px solid var(--line); }
  .ledger > *:last-child { border-right: 0; }
  .ledger .r { grid-row: auto; grid-column: 1; }
}
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 820px) {
  .shell { flex-direction: column; height: auto; overflow: visible; }
  .main { margin: 0; height: auto; overflow: visible; border-radius: 0; border: 0; border-top: 1px solid var(--line); box-shadow: none; background: transparent; }
  .side { position: relative; height: auto; width: 100%; flex: none; padding: 12px 14px 10px; overflow: visible; }
  .mark { width: 150px; max-width: 100%; margin: 0 auto; padding-bottom: 8px; align-self: center; }
  .mark small { margin-top: 8px; }
  nav { flex-direction: row; gap: 6px; overflow-x: auto; overflow-y: hidden; flex: none; margin: 0 -14px; padding: 2px 14px 4px; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav .grp { display: none; }
  nav a { flex: 0 0 auto; border: 1px solid var(--line); white-space: nowrap; }
  nav a .n { display: none; }
  nav a[aria-current="page"]::before { display: none; }
  nav a[aria-current="page"] { border-color: var(--gold-line); }
  .side-foot { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .crumbs { display: none; }
  .top-actions .icon-btn[aria-label="Library"], .top-actions .icon-btn[aria-label="Settings"] { display: none; }
  .search-trigger { margin-left: 0; }
  main#app { padding: 20px 16px 60px; }
  h1 { font-size: 40px; }
  .marquee { padding: 28px 20px 22px; border-radius: 18px; }
  .marquee h1 { font-size: 44px; }
  .marquee .lede { font-size: 15px; }
  .eyebrow .opt { display: none; }
  .mq-actions .btn { flex: 1 1 auto; }
  .mq-actions kbd { display: none; }
  .ledger > * { padding: 12px 12px; }
  .ledger .v { font-size: 26px; }
  .ledger .l { letter-spacing: .06em; font-size: 9px; }
  .ledger .r { font-size: 11.5px; }
  .suite { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 168px; padding: 16px 14px 14px; }
  .tile .d { display: none; }
  .tile .wm { font-size: 96px; bottom: -20px; }
  .suite-head { margin-top: 36px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .card { padding: 18px; }
  .report { padding: 22px 18px; }
  .toasts { right: 16px; left: 16px; bottom: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .aurora i { animation: none; }
  .tile, .btn, .tile .go { transition: background-color .15s ease, border-color .15s ease, color .15s ease !important; transform: none !important; }
  .clapper { animation: none; }
}

/* tables of inputs keep their columns readable and scroll sideways inside the card instead of squeezing */
table:has(td input, td select) { min-width: 560px; }
table:has(td input, td select) td, table:has(td input, td select) th { padding-left: 9px; padding-right: 9px; }
table:has(td input, td select) td:first-child, table:has(td input, td select) th:first-child { padding-left: 14px; }

/* ---------------- the crest in 3D ---------------- */
@property --ax { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@property --ay { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.sb3d { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; --z: 1; position: relative; perspective: 900px; user-select: none; container-type: inline-size; }
.sb3d-stage { position: relative; aspect-ratio: 2400 / 1120; transform-style: preserve-3d;
  transform: rotateX(calc(var(--rx) + var(--ax))) rotateY(calc(var(--ry) + var(--ay)));
  transition: transform .6s var(--ease-out); animation: sb-float 11s ease-in-out infinite; }
.sb3d.live .sb3d-stage { transition: transform .12s linear; animation-play-state: paused; }
@keyframes sb-float { 0%, 100% { --ax: .6deg; --ay: -1deg; } 50% { --ax: -.6deg; --ay: 1deg; } }   /* straight on; only a breath of movement */
.sb3d-plate { position: absolute; inset: 0; border-radius: 6.5% / 14%; overflow: hidden;
  background: radial-gradient(120% 95% at 28% 0%, #50258c 0%, #331661 42%, #1c0b36 100%);
  box-shadow: inset 0 1px 0 rgba(236, 210, 255, .22), inset 0 -14px 34px rgba(4, 1, 10, .55), 0 0 0 1px rgba(242, 192, 77, .38),
              0 calc(18px * var(--z)) calc(44px * var(--z)) calc(-18px * var(--z)) rgba(70, 28, 150, .85), 0 calc(8px * var(--z)) calc(18px * var(--z)) rgba(0, 0, 0, .55); }
.sb3d-plate::before { content: ""; position: absolute; inset: 3.2% 1.6%; border-radius: 5.5% / 12%; border: 1px solid rgba(242, 192, 77, .16); }
.sb3d-plate::after { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .12) 46%, transparent 60%); }
.sb3d-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sb3d .l-crest { transform: translateZ(calc(22px * var(--z))); }
.sb3d .l-word { transform: translateZ(calc(13px * var(--z))); }
.sb3d-glare { position: absolute; inset: 0; border-radius: 6.5% / 14%; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  transform: translateZ(calc(26px * var(--z))); mix-blend-mode: overlay;
  background: radial-gradient(60% 80% at var(--gx) var(--gy), rgba(255, 244, 220, .55), transparent 60%); }
.sb3d.live .sb3d-glare { opacity: 1; }
.sb3d-sub { margin-top: 4.5cqw; text-align: center; font: 500 clamp(9px, 3.4cqw, 26px)/1 var(--mono); letter-spacing: .6em; padding-left: .6em; color: var(--gold-300); opacity: .8; }
.mark { perspective: none; }
.mark .sb3d { --z: .45; max-width: 200px; margin: 0 auto; }

/* boot: the crest arrives, then the room */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 45%, #1c0d33 0%, #07050b 70%);
  transition: opacity .5s var(--ease-out), visibility .5s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot .sb3d { --z: 1.4; width: min(560px, calc(76vw / var(--uiz))); animation: boot-in 1.1s var(--ease-out) both; }
@keyframes boot-in { from { opacity: 0; transform: translateY(14px) scale(.94); filter: blur(6px); } }
.boot .bar { position: absolute; left: 50%; bottom: calc(12vh / var(--uiz)); width: 160px; height: 2px; margin-left: -80px; border-radius: 2px; overflow: hidden; background: rgba(242, 192, 77, .12); }
.boot .bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--gold-metal); animation: boot-bar 1.1s var(--ease-io) infinite; }
@keyframes boot-bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------------- depth: tilting tool cards ---------------- */
.suite { perspective: 1200px; }
.tile { transform-style: preserve-3d; transform: rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)) translateY(var(--tty, 0px)); }
.tile .glyph { transform: translateZ(26px); transition: transform .3s var(--ease-out); }
.tile .t, .tile .d { transform: translateZ(14px); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { --tty: -3px; transform: rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)) translateY(var(--tty)); }
  .tile.tilting { transition: transform .1s linear, box-shadow .22s ease; }
}

/* ---------------- depth: the pressable gold button ---------------- */
.btn.primary { position: relative; transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 248, 220, .7) inset, 0 -1px 0 rgba(90, 60, 10, .35) inset,
  0 2px 0 #9a6a14, 0 3px 0 #6c4b0f, 0 10px 22px -8px rgba(219, 165, 52, .55), 0 0 0 1px rgba(110, 76, 15, .6);
  transition: transform .5s cubic-bezier(.3, .7, .4, 1), box-shadow .5s cubic-bezier(.3, .7, .4, 1), filter .2s ease; }
.btn.primary::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 48%, transparent 60%) no-repeat; background-size: 250% 100%; background-position: 130% 0; }
@media (hover: hover) {
  .btn.primary:hover { transform: translateY(-3px); filter: brightness(1.05) saturate(1.06); transition: transform .25s cubic-bezier(.3, .7, .4, 1.5), box-shadow .25s ease, filter .2s ease;
    box-shadow: 0 1px 0 rgba(255, 248, 220, .7) inset, 0 -1px 0 rgba(90, 60, 10, .35) inset, 0 3px 0 #9a6a14, 0 4px 0 #6c4b0f, 0 16px 30px -10px rgba(219, 165, 52, .7), 0 0 0 1px rgba(110, 76, 15, .6); }
  .btn.primary:hover::after { background-position: -30% 0; transition: background-position .7s var(--ease-out); }
}
.btn.primary:active { transform: translateY(0); transition: transform 34ms, box-shadow 34ms;
  box-shadow: 0 1px 0 rgba(255, 248, 220, .5) inset, 0 0 0 #9a6a14, 0 1px 0 #6c4b0f, 0 4px 10px -6px rgba(219, 165, 52, .5), 0 0 0 1px rgba(110, 76, 15, .6); }
.btn.primary:disabled { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sb3d-stage { animation: none; } .boot .sb3d { animation: none; } .tile .glyph, .tile .t, .tile .d { transform: none; }
}

/* ---------------- Ask Saracen ---------------- */
.ask-trigger { display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 14px 0 5px; border-radius: 999px; cursor: pointer; color: var(--fg);
  font: 550 13px var(--sans); border: 1px solid transparent; position: relative; isolation: isolate;
  background: linear-gradient(#1a1127, #1a1127) padding-box, conic-gradient(from var(--ask-a, 0deg), rgba(242, 192, 77, .75), rgba(157, 111, 226, .6), rgba(242, 192, 77, .1), rgba(157, 111, 226, .6), rgba(242, 192, 77, .75)) border-box;
  animation: ask-spin 8s linear infinite; transition: transform .16s var(--ease-out); }
@property --ask-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ask-spin { to { --ask-a: 360deg; } }
.ask-trigger:active { transform: scale(.97); }
@media (hover: hover) { .ask-trigger:hover { box-shadow: 0 0 24px -6px rgba(157, 111, 226, .6); } }
.orb { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #1d1608;
  background: radial-gradient(circle at 32% 28%, #fff4cf, #f2c04d 45%, #a9771b 100%); box-shadow: 0 0 0 1px rgba(110, 76, 15, .6), 0 0 14px rgba(242, 192, 77, .45); }
.orb svg.i { width: 14px; height: 14px; stroke-width: 1.8; }
.orb.big { width: 38px; height: 38px; } .orb.big svg.i { width: 19px; height: 19px; }
body.asking .ask-trigger { box-shadow: 0 0 0 3px rgba(242, 192, 77, .18); }

.ask { position: fixed; z-index: 85; top: 10px; right: 10px; bottom: 10px; width: min(440px, calc(calc(100vw / var(--uiz)) - 20px)); display: flex; flex-direction: column;
  border-radius: 20px; background: rgba(19, 12, 29, .93); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-pop), 0 0 80px -30px rgba(118, 58, 206, .6); transform: translateX(calc(100% + 24px)); visibility: hidden;
  transition: transform .34s var(--ease-out), visibility 0s .34s; overflow: hidden; }
.ask.open { transform: none; visibility: visible; transition: transform .34s var(--ease-out), visibility 0s; }
.ask::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 216, 115, .7), transparent); opacity: .6; }
.ask-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 14px 16px; border-bottom: 1px solid var(--line); }
.ask-head .grow { flex: 1; min-width: 0; }
.ask-head .ttl { font: 400 23px/1.1 var(--serif); }
.ask-head .sub { margin-top: 3px; font-size: 12px; color: var(--fg-3); }
.eng { display: inline-flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eng .dot { width: 7px; height: 7px; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font: 600 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--plum-200); background: var(--plum-wash); border: 1px solid rgba(157, 111, 226, .35); }
.ask-list { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.ask-empty { margin: auto 0; padding: 8px 4px 16px; }
.ask-empty .hello { font: 400 34px/1.08 var(--serif); }
.ask-empty .hello em { color: var(--gold-300); }
.ask-empty p { color: var(--fg-2); font-size: 13.5px; margin: 12px 0 18px; }
.sugs { display: grid; gap: 8px; }
.sug { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02);
  color: var(--fg); font-size: 13px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .16s var(--ease-out); }
.sug svg.i { width: 15px; height: 15px; color: var(--gold-400); }
@media (hover: hover) { .sug:hover { border-color: var(--gold-line); background: var(--gold-wash); } }
.sug:active { transform: scale(.98); }
.msg { max-width: 100%; font-size: 14px; line-height: 1.6; animation: rise .26s var(--ease-out) both; }
.msg.me { align-self: flex-end; max-width: 86%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: linear-gradient(180deg, #2d1f42, #251935);
  border: 1px solid rgba(157, 111, 226, .25); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ai .who { display: flex; align-items: center; gap: 8px; font: 600 12px var(--sans); color: var(--gold-300); margin-bottom: 6px; }
.msg.ai .who .orb { width: 20px; height: 20px; } .msg.ai .who .orb svg.i { width: 11px; height: 11px; }
.msg.ai .who .wait { font: 400 11.5px var(--sans); color: var(--fg-3); }
.msg.ai .body { color: var(--fg); overflow-wrap: anywhere; }
.msg.ai .body p { margin: 0 0 9px; } .msg.ai .body p:last-child { margin-bottom: 0; }
.msg.ai .body p.h { font-weight: 650; margin-top: 12px; }
.msg.ai .body ul, .msg.ai .body ol { margin: 4px 0 10px; padding-left: 20px; } .msg.ai .body li { margin: 3px 0; }
.msg.ai .body li::marker { color: var(--gold-400); }
.msg.ai .body code { font: 12.5px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--ink-4); }
.msg.ai .body .md-code { margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); font: 13px/1.55 var(--sans); white-space: pre-wrap; color: var(--fg); }
.msg.ai .body .md-data { margin: 6px 0 10px; } .msg.ai .body .md-data ul { margin: 2px 0; }
.msg.ai .body .md-table { overflow-x: auto; margin: 6px 0 10px; }
.msg.ai .body .md-table table { border-collapse: collapse; font-size: 13px; } .msg.ai .body .md-table th, .msg.ai .body .md-table td { padding: 5px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.msg.ai .body .md-table th { color: var(--gold-300); font-weight: 600; }
.msg.ai .body a.go { display: inline-flex; align-items: center; padding: 0 8px; margin: 0 1px; border-radius: 7px; background: var(--gold-wash); border: 1px solid var(--gold-line); text-decoration: none; color: var(--gold-200); font-weight: 550; }
.msg.ai .body .tail { margin: 0; white-space: pre-wrap; } .msg.ai .body .tail:empty { display: none; }
.msg.ai .body .done:not(:empty) + .tail:not(:empty) { margin-top: 9px; }
.msg.ai .writing { font-size: 12.5px; color: var(--fg-3); } .msg.ai .writing:empty { display: none; }   /* steady: no blinking caret or dots (1.0.7) */
.msg.ai.err .body { color: #f3cfcf; padding: 10px 12px; border-radius: 12px; background: var(--bad-wash); border: 1px solid rgba(232, 134, 134, .25); }
.dots { display: inline-flex; gap: 4px; padding: 6px 0; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-400); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ask-compose { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: rgba(10, 6, 16, .4); }
.ask-compose .field { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--ink-1);
  transition: border-color .15s ease, box-shadow .15s ease; }
.ask-compose .field:focus-within { border-color: rgba(242, 192, 77, .55); box-shadow: 0 0 0 3px rgba(219, 165, 52, .14); }
.ask-compose textarea { flex: 1; min-height: 24px; max-height: 160px; height: 24px; resize: none; padding: 7px 0; border: 0; background: transparent; box-shadow: none; font: 14px/1.5 var(--sans); color: var(--fg); outline: none; }
.ask-compose textarea:focus { box-shadow: none; background: transparent; }
.ask-send { width: 36px; height: 36px; flex: none; border-radius: 11px; border: 0; cursor: pointer; display: grid; place-items: center; color: #1d1608; background: var(--gold-metal);
  box-shadow: 0 1px 0 rgba(255, 248, 220, .6) inset, 0 6px 16px -6px rgba(219, 165, 52, .7); transition: transform .16s var(--ease-out), filter .15s ease; }
.ask-send:active { transform: scale(.94); }
.ask-send.busy { background: var(--ink-5); color: var(--fg); box-shadow: 0 0 0 1px var(--line-3); }
.ask-send svg.i { width: 17px; height: 17px; }
.ask-compose .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--fg-4); }
.ask-share { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-3); font-size: 11.5px; cursor: pointer; }
.ask-share svg.i { width: 14px; height: 14px; }
.ask-share[aria-pressed=true] { color: var(--gold-300); border-color: var(--gold-line); background: var(--gold-wash); }

/* ---------------- switch and cloud settings ---------------- */
.switch { position: relative; width: 46px; height: 26px; flex: none; border-radius: 999px; border: 1px solid var(--line-3); background: var(--ink-4); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #d9d0c4; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .24s var(--ease-out), background-color .2s ease; }
.switch[aria-checked=true] { background: linear-gradient(90deg, #5b2fa3, #8a5ad6); border-color: rgba(198, 163, 247, .5); }
.switch[aria-checked=true] i { transform: translateX(20px); background: var(--gold-metal); }
.cloud-card h2 small { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-4); }
.provs { margin-top: 6px; }
.provs button { height: auto; padding: 8px 18px; display: grid; text-align: left; gap: 1px; }
.provs button b { font-weight: 600; font-size: 13.5px; } .provs button small { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-4); }
.uses { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.uses label { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-1); cursor: pointer; flex: 1 1 220px; }
.uses label span { display: grid; } .uses b { font-weight: 600; font-size: 13px; } .uses small { color: var(--fg-3); font-size: 12px; }
.note svg.i { width: 15px; height: 15px; vertical-align: -3px; }
.cloud-card a svg.i { width: 13px; height: 13px; vertical-align: -2px; margin-left: 4px; }

@media (max-width: 820px) {
  .ask-trigger .lbl { display: none; }
  .ask-trigger { padding: 0 4px; }
  .ask { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: calc(88vh / var(--uiz)); border-radius: 20px 20px 0 0; transform: translateY(calc(100% + 24px)); }
}
@media (prefers-reduced-motion: reduce) { .ask-trigger { animation: none; } }

/* ---------------- Jon ---------------- */
.jon { --px: 0px; --py: 0px; display: inline-block; line-height: 0; }
.jon-svg { width: 100%; height: 100%; overflow: visible; }
.jon .j-fig { transform-box: view-box; transform-origin: 100px 180px; }
.jon .j-pupils { transform: translate(var(--px), var(--py)); transition: transform .12s linear; }
.jon .j-eyes { transform-box: fill-box; transform-origin: center; transition: transform .07s ease; }
.jon.blink .j-eyes { transform: scaleY(.08); }
.jon .j-clap { transform-box: view-box; transform-origin: 47px 77px; transform: rotate(-4deg); transition: transform .25s var(--ease-out); }
.jon .j-open, .jon .j-flat { opacity: 0; }
.jon .j-arm-r { transform-box: view-box; transform-origin: 158px 112px; }
.jon .j-brow-l, .jon .j-brow-r { transform-box: fill-box; transform-origin: center; transition: transform .25s var(--ease-out); }
/* talking: a slow, gentle clap and an open smile; no mouth flicker (it swapped 4 times a second before 1.0.7) */
.jon.talk .j-clap { animation: j-clap 1.6s ease-in-out infinite alternate; }
@keyframes j-clap { from { transform: rotate(-16deg); } to { transform: rotate(0deg); } }
@keyframes j-mouth { 0% { opacity: 1; } 50% { opacity: 0; } }
.jon.think { --px: -3px !important; --py: -4.5px !important; }
.jon.think .j-clap { transform: rotate(-9deg); }
.jon.think .j-brow-r { transform: translateY(-3px) rotate(-6deg); }
.jon.wave .j-arm-r { animation: j-wave .45s ease-in-out 4 alternate; }
@keyframes j-wave { from { transform: rotate(0); } to { transform: rotate(-22deg); } }
.jon.hop .j-fig { animation: j-hop .6s var(--ease-out); }
@keyframes j-hop { 30% { transform: translateY(-14px) scaleY(1.04); } 60% { transform: translateY(0) scaleY(.94); } 100% { transform: none; } }
.jon.concern .j-brow-l { transform: rotate(14deg) translateY(2px); }
.jon.concern .j-brow-r { transform: rotate(-14deg) translateY(2px); }
.jon.concern .j-smile { opacity: 0; } .jon.concern .j-flat { opacity: 1; }

.jon-dock { position: fixed; z-index: 70; right: 26px; bottom: 22px; width: 92px; height: 82px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .55)); transition: transform .3s var(--ease-out), opacity .25s ease; animation: j-arrive .6s var(--ease-out) both .8s; }
.jon-dock .j-fig { animation: j-bob 3.8s ease-in-out infinite; }
.jon-dock.hop .j-fig { animation: j-hop .6s var(--ease-out); }
@keyframes j-bob { 50% { transform: translateY(-3px); } }
@keyframes j-arrive { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@media (hover: hover) { .jon-dock:hover { transform: translateY(-4px) rotate(-3deg); } }
.jon-dock:active { transform: scale(.94); }
.jon-dock:focus-visible { outline-offset: 4px; border-radius: 16px; }
body.asking .jon-dock { opacity: 0; transform: translateX(30px) scale(.8); pointer-events: none; }
.toasts { bottom: 118px; }

.jon-bubble { position: fixed; z-index: 75; right: 32px; bottom: 116px; width: min(300px, calc(calc(100vw / var(--uiz)) - 48px)); padding: 14px 14px 12px; border-radius: 16px 16px 4px 16px;
  background: rgba(30, 20, 46, .96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-pop), 0 0 40px -16px rgba(242, 192, 77, .5);
  border: 1px solid rgba(242, 192, 77, .3); transform-origin: 90% 100%; animation: pop .26s var(--ease-out) both; }
.jon-bubble.out { animation: pop-out .15s ease forwards; }
.jon-bubble::after { content: ""; position: absolute; right: 26px; bottom: -8px; width: 14px; height: 14px; background: rgba(30, 20, 46, .96);
  border-right: 1px solid rgba(242, 192, 77, .3); border-bottom: 1px solid rgba(242, 192, 77, .3); transform: rotate(45deg); }
.jon-bubble .txt { font-size: 13.5px; line-height: 1.5; color: var(--fg); }
.jon-bubble .acts { display: flex; align-items: center; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.jon-bubble .off { margin-left: auto; border: 0; background: none; color: var(--fg-4); font-size: 11.5px; cursor: pointer; padding: 4px; }
@media (hover: hover) { .jon-bubble .off:hover { color: var(--fg-2); text-decoration: underline; } }

.jon-avatar { width: 46px; height: 48px; flex: none; }
.jon-mini { width: 22px; height: 23px; }
.jon-chip { width: 28px; height: 29px; margin-left: 2px; }
.ask-trigger { padding-left: 4px; }
.jon-hero { display: block; width: 120px; height: 105px; margin: 0 0 6px -6px; }
.jon-hero .j-fig { animation: j-bob 3.8s ease-in-out infinite; }
.srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.srcs .lbl { width: 100%; font: 500 9.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-4); }
.srcs .src { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px 3px 6px; border-radius: 7px; font-size: 11.5px; color: var(--fg-2);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srcs .src svg.i { width: 13px; height: 13px; color: var(--gold-400); flex: none; }
@media (max-width: 820px) {
  .jon-dock { width: 64px; height: 57px; right: 12px; bottom: 12px; }
  .jon-bubble { right: 16px; bottom: 84px; }
  .toasts { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .jon .j-fig, .jon-dock .j-fig, .jon-hero .j-fig { animation: none !important; }
  .jon.talk .j-clap, .jon.wave .j-arm-r { animation: none !important; }
}

/* local / cloud compute switch (rail foot) */
.compute { display: grid; grid-template-columns: 1fr auto; gap: 3px; padding: 3px; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line-2); }
.compute button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--fg-3); font: 550 12.5px var(--sans); cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.compute button svg.i { width: 15px; height: 15px; }
.compute button .dot { width: 7px; height: 7px; }
@media (hover: hover) { .compute button:hover { color: var(--fg); } }
/* selected compute button: see the gold-gradient block at the end */
.compute-sub { padding: 0 6px; font-size: 11.5px; color: var(--fg-3); text-decoration: none; }
@media (hover: hover) { .compute-sub:hover { color: var(--fg-2); } }

/* ---------------- look book ---------------- */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.pages .pg { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--ink-1); border: 1px solid var(--line-2);
  transition: transform .2s var(--ease-out), border-color .2s ease; }
.pages .pg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pages .pg .n, .pages .pg .vs { position: absolute; bottom: 6px; font: 600 10.5px var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(7, 5, 11, .78); color: var(--fg-2); }
.pages .pg .n { left: 6px; } .pages .pg .vs { right: 6px; color: var(--gold-300); }
@media (hover: hover) { .pages .pg:hover { transform: translateY(-2px); border-color: var(--gold-line); } }
details.lb-more { margin-top: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-1); }
details.lb-more summary { cursor: pointer; font-weight: 550; color: var(--fg); }
details.lb-more textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line-2); background: var(--ink-1); color: var(--fg); font: 14px/1.5 var(--sans); }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 220px) 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }
.bar .k { color: var(--fg-2); } .bar .v { font: 600 13px var(--mono); text-align: right; color: var(--fg); }
.bar .t { height: 8px; border-radius: 8px; background: var(--ink-4); overflow: hidden; }
.bar .t i { display: block; height: 100%; border-radius: 8px; background: var(--gold-metal); }
.modal img { max-height: calc(60vh / var(--uiz)); object-fit: contain; }
@media (max-width: 820px) { .bar { grid-template-columns: 1fr 1fr 36px; } .pages { grid-template-columns: repeat(2, 1fr); } }

/* ---------- type-ahead name finder (Sales Estimates) ---------- */
.finder { position: relative; max-width: 620px; }
.finder-ic { position: absolute; left: 14px; top: 0; height: 46px; display: grid; place-items: center; color: var(--fg-4); pointer-events: none; z-index: 1; }
.finder input[type=search] { width: 100%; height: 46px; padding-left: 42px; font-size: 15px; }
.finder-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 360px; overflow-y: auto;
  border-radius: var(--r); background: rgba(24, 16, 36, .97); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--shadow-pop);
  transform-origin: top; animation: finder-in .16s var(--ease-out); }
@keyframes finder-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.finder-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.finder-list li .nm { font-weight: 550; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-list li .mt { font-size: 12px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.finder-list li[aria-selected=true] { background: var(--gold-wash); box-shadow: inset 2px 0 0 var(--gold-400); }
.finder-list li.none { cursor: default; color: var(--fg-3); font-size: 13px; }
.finder-list mark { background: none; color: var(--gold-300); }
.finder-out { margin-top: 20px; }
.finder-hint { display: flex; align-items: center; gap: 10px; color: var(--fg-3); font-size: 13px; }
.finder-hint svg.i { color: var(--fg-4); }
.clapper.sm { width: 80px; height: 4px; flex: none; }

.profile { padding: 22px 24px 18px; border-radius: var(--r-lg); background: var(--ink-1); border: 1px solid var(--line); animation: finder-in .22s var(--ease-out); }
.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.profile-head h2 { margin: 0 0 4px; font: 400 32px/1.1 var(--serif); }
.profile .tier { flex: none; display: grid; justify-items: center; min-width: 64px; padding: 8px 12px 10px; border-radius: var(--r); border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(219, 165, 52, .14), rgba(219, 165, 52, .03)); font: 400 28px/1 var(--serif); color: var(--gold-300); }
.profile .tier small { font: 500 9.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.profile .kpi .v { font-size: 28px; } .profile .kpi .v small { font: 400 14px var(--sans); color: var(--fg-3); }
.profile h3 { margin: 22px 0 10px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.profile-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.profile-cols .bar { grid-template-columns: minmax(0, 170px) 1fr 34px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 13px; }
.facts dt { color: var(--fg-3); } .facts dd { margin: 0; color: var(--fg); }
.profile-note { margin: 0; color: var(--fg-2); font-size: 13.5px; line-height: 1.6; max-width: 76ch; }
.profile-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }
.profile-foot b { color: var(--fg-2); font-weight: 550; }
.src-link { margin-left: 6px; color: var(--gold-400); text-decoration: none; border-bottom: 1px solid var(--gold-line); }
.src-link:hover { color: var(--gold-200); }
@media (max-width: 860px) { .profile-cols { grid-template-columns: 1fr; gap: 0; } .profile-head h2 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .finder-list, .profile { animation: none; } }
.attach { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.attach select { min-width: 220px; }
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; }
.ladder i { height: 6px; border-radius: 6px; background: var(--ink-4); transition: background-color .2s ease; }
.ladder i.on { background: var(--gold-metal); }
.ladder-v { margin-top: 8px; font-size: 13px; color: var(--fg-2); } .ladder-v b { color: var(--gold-300); font: 600 14px var(--mono); }

/* Settings: two stacked columns (engine + cloud on the left, linked apps + Jon on the right) */
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.stack > .card { margin-top: 0 !important; }
.cloud-card h2 { white-space: nowrap; flex-wrap: wrap; row-gap: 4px; }
/* a tool with no side card (an app the Studio opens, or one coming soon) uses the full width */
.cols.solo { grid-template-columns: minmax(0, 1fr); }
.cols.solo > .card { max-width: 860px; }
/* a styled file picker in place of the browser's grey "Choose File" */
.filepick { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.filepick .name { color: var(--fg-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.filepick .name.set { color: var(--fg); }
/* the last row of a page clears Jon in the corner */
main#app { padding-bottom: 128px; }
/* the nav fits a 900px-tall window without hiding Settings */
nav a { height: 30px; } nav .grp { margin: 11px 10px 5px; }
/* Finance Plan sources: the source name gets the room; amount, status and package keep a readable width */
td input[aria-label="Amount"] { min-width: 104px; } td select[aria-label="Status"] { min-width: 150px; } td input[aria-label="Inside package"] { min-width: 76px; }
td input[aria-label="Source"] { min-width: 104px; }
/* failed jobs: plain words first, the engine's message on request */
.linkish { border: 0; background: none; padding: 0; color: var(--gold-400); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.err-detail { display: block; margin-top: 6px; font: 400 11.5px/1.5 var(--mono); color: var(--fg-4); white-space: pre-wrap; overflow-wrap: anywhere; }
.err-detail[hidden] { display: none; }
.warn-text { color: var(--warn); margin-top: 4px; } .warn-text a { color: var(--gold-400); }
details.fields { margin-top: 4px; } details.fields summary { cursor: pointer; color: var(--gold-400); font-size: 12px; } details.fields div { margin-top: 6px; line-height: 1.7; }

/* ---------- wide tables (Tim, 13 Oct: crew rates' columns past the edge, the scrollbar 27,000 px down) ---------- */
.scroll-wrap { position: relative; }
.card.flush .scroll { max-height: min(calc(72vh / var(--uiz)), 1100px); overflow: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--ink-5) transparent; }
.scroll-wrap::before, .scroll-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46px; pointer-events: none; opacity: 0; transition: opacity .2s ease; z-index: 2; }
.scroll-wrap::before { left: 0; background: linear-gradient(90deg, var(--ink-2), transparent); }
.scroll-wrap::after { right: 0; background: linear-gradient(270deg, var(--ink-2), transparent); }
.scroll-wrap.more-left::before, .scroll-wrap.more-right::after { opacity: 1; }
.side-arrow { position: absolute; top: 50%; margin-top: -15px; z-index: 3; width: 30px; height: 30px; display: none; place-items: center; border-radius: 50%; border: 1px solid var(--gold-line);
  background: rgba(24, 16, 36, .95); color: var(--gold-300); cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .8); }
.side-arrow svg.i { width: 15px; height: 15px; }
.side-arrow.l { left: 8px; } .side-arrow.l svg.i { transform: rotate(180deg); } .side-arrow.r { right: 8px; }
.scroll-wrap.more-left .side-arrow.l, .scroll-wrap.more-right .side-arrow.r { display: grid; }
@media (hover: hover) { .side-arrow:hover { background: var(--gold-wash); } }
td.role { min-width: 190px; }
/* a panel that needs the room (crew rates, the brand database) takes the full width; the side card sits beneath */
.cols.wide-panel { grid-template-columns: minmax(0, 1fr); }
.cols.wide-panel > .side-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 32px; }
.side-card section + section { margin-top: 22px; }
.cols.wide-panel > .side-card section + section { margin-top: 0; }
.side-card section > h2 { margin-top: 0; }
/* tighter cells where the window is narrower */
@media (max-width: 1500px) { td, th { padding-left: 11px; padding-right: 11px; } td:first-child, th:first-child { padding-left: 16px; } }
/* on a laptop-width window every tool's panel takes the full width and its notes card sits beneath it */
@media (max-width: 1500px) {
  .cols:has(> .side-card) { grid-template-columns: minmax(0, 1fr); }
  .cols:has(> .side-card) > .side-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 28px; }
  .cols:has(> .side-card) > .side-card section + section { margin-top: 0; }
}
/* long column titles (Spain's "Official min / day") wrap instead of widening the table */
th.num { white-space: normal; min-width: 72px; max-width: 120px; line-height: 1.35; vertical-align: bottom; }

/* ---------- selected = a luminous gold gradient, Chrome-style (Tim, 13 Oct) ----------
   Every "you are here / this one is on" control carries it, and only while selected: tool tabs, the Quick/Deep switch,
   the provider picker, the sidebar's current page, the suite filter chips, Local/Cloud, and Jon's page-sharing toggle.
   A soft light at the top left over a champagne-to-deep-gold sweep, a fine bevel, a warm glow beneath, and one sheen
   across the face when it becomes selected. Lists you move through with the keyboard keep their quiet highlight. */
:root { --gold-tab: radial-gradient(130% 160% at 18% -10%, rgba(255, 251, 232, .9) 0%, rgba(255, 251, 232, 0) 46%),
  linear-gradient(112deg, #fff1c8 0%, #fad978 24%, #ecb94a 50%, #d3972b 74%, #ad7a1c 100%);
  --gold-tab-ink: #1d1608;
  --gold-tab-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(108, 75, 15, .35), 0 0 0 1px rgba(255, 216, 115, .35),
    0 8px 20px -10px rgba(219, 165, 52, .85); }
.tabs button, .compute button, nav a, .chip, .ask-share { position: relative; overflow: hidden; isolation: isolate;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .25s var(--ease-out), transform .12s ease; }
.tabs button[aria-pressed=true], .compute button[aria-pressed=true], nav a[aria-current="page"], .chip[aria-pressed=true], .ask-share[aria-pressed=true] {
  color: var(--gold-tab-ink); background: var(--gold-tab); border-color: transparent; text-shadow: 0 1px 0 rgba(255, 244, 210, .45);
  box-shadow: var(--gold-tab-shadow); }
.tabs button[aria-pressed=true] small, nav a[aria-current="page"] .n { color: rgba(29, 22, 8, .62); }
nav a[aria-current="page"] .ic, .ask-share[aria-pressed=true] svg.i, .compute button[aria-pressed=true] svg.i { color: var(--gold-tab-ink); }
nav a[aria-current="page"]::before { display: none; }
.tabs button[aria-pressed=true]::after, .compute button[aria-pressed=true]::after, nav a[aria-current="page"]::after,
.chip[aria-pressed=true]::after, .ask-share[aria-pressed=true]::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%);
  transform: translateX(-120%); animation: tab-sheen 1.1s var(--ease-out) .05s 1 forwards; }
@keyframes tab-sheen { to { transform: translateX(120%); } }
.compute button[aria-pressed=true] .dot { box-shadow: 0 0 0 2px rgba(29, 22, 8, .25); }
@media (hover: hover) {
  .tabs button:not([aria-pressed=true]):hover { color: var(--gold-200); background: rgba(219, 165, 52, .07); }
  nav a[aria-current="page"]:hover { background: var(--gold-tab); color: var(--gold-tab-ink); }
  nav a[aria-current="page"]:hover .ic { color: var(--gold-tab-ink); }
  .chip[aria-pressed=true]:hover { color: var(--gold-tab-ink); }
}
.tabs button:active, .chip:active, .compute button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .tabs button[aria-pressed=true]::after, .compute button[aria-pressed=true]::after, nav a[aria-current="page"]::after,
  .chip[aria-pressed=true]::after, .ask-share[aria-pressed=true]::after { animation: none; display: none; } }
/* a tool page opens straight on its title; the category is in the breadcrumb (Tim, 13 Oct) */
main#app > h1:first-child { margin-top: 4px; }
.run-meta { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); margin: -2px 0 16px; }
.tabs.sizes { display: flex; flex-wrap: nowrap; width: 100%; } .tabs.sizes button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
/* privacy lamp in the sidebar footer (Tim, 13 Oct): green and lit while local, red with the words dark while Cloud is on */
.side-foot .ver { align-items: center; }
.privacy { display: inline-flex; align-items: center; gap: 7px; transition: color .3s ease; cursor: default; }
.privacy .lamp { width: 7px; height: 7px; border-radius: 50%; flex: none; transition: background-color .3s ease, box-shadow .3s ease; }
.privacy.on { color: var(--fg-3); }
.privacy.on .lamp { background: var(--ok); box-shadow: 0 0 0 2px rgba(130, 202, 160, .16), 0 0 10px rgba(130, 202, 160, .65); animation: breathe 2.4s ease-in-out infinite; }
.privacy.off { color: rgba(241, 235, 224, .2); }
.privacy.off .lamp { background: var(--bad); box-shadow: 0 0 0 2px rgba(232, 134, 134, .16), 0 0 10px rgba(232, 134, 134, .6); }
@media (prefers-reduced-motion: reduce) { .privacy.on .lamp { animation: none; } }
/* ---------- Brand Integration shortlist (Tim, 13 Oct: click a brand, it highlights and is added; many at once) ---------- */
.shortlist { padding: 16px 18px; border-radius: var(--r); background: var(--ink-1); border: 1px solid var(--line-2); margin-top: 18px; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sl-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; font: 550 12.5px var(--sans);
  color: var(--gold-tab-ink); background: var(--gold-tab); box-shadow: var(--gold-tab-shadow); animation: chip-in .22s var(--ease-out) both; }
.sl-chip.static { padding-right: 12px; }
.sl-chip small { font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(29, 22, 8, .6); }
.sl-chip button { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(29, 22, 8, .12); color: var(--gold-tab-ink); cursor: pointer; padding: 0; }
.sl-chip button svg.i { width: 12px; height: 12px; }
@media (hover: hover) { .sl-chip button:hover { background: rgba(29, 22, 8, .25); } }
@keyframes chip-in { from { opacity: 0; transform: scale(.92); } }
tr.pick { cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
tr.pick:focus-visible { outline: 2px solid var(--gold-400); outline-offset: -2px; }
@media (hover: hover) { tr.pick:hover td { background: rgba(219, 165, 52, .05); } }
tr.pick.on td { background: rgba(242, 192, 77, .1); color: var(--fg); }
tr.pick.on td:first-child { box-shadow: inset 3px 0 0 var(--gold-400); }
.pick-name { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.pick-name .tick { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 1px solid var(--line-3); color: transparent; transition: all .15s ease; }
.pick-name .tick svg.i { width: 12px; height: 12px; }
tr.pick.on .pick-name .tick { background: var(--gold-tab); border-color: transparent; color: var(--gold-tab-ink); box-shadow: 0 0 10px rgba(242, 192, 77, .45); }
tr.pick.on .pick-name b { color: var(--gold-200); }
td.evidence { min-width: 320px; white-space: normal; }
/* ---------- queue rows: clear one failed job (Tim, 13 Oct) ---------- */
.row-end { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.row-x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-3); cursor: pointer; padding: 0; }
.row-x svg.i { width: 13px; height: 13px; }
@media (hover: hover) { .row-x:hover { color: var(--bad); border-color: rgba(232, 134, 134, .35); background: var(--bad-wash); } }
/* ---------- Gemma download (Tim, 13 Oct: Jon's installer download timed out) ---------- */
.dl-title { margin-bottom: 10px; }
.dl-track, .dl-bar { position: relative; display: block; height: 6px; border-radius: 6px; background: var(--ink-1); border: 1px solid var(--line-2); overflow: hidden; }
.dl-track i, .dl-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gold-tab); box-shadow: 0 0 10px rgba(242, 192, 77, .5); transition: width .6s var(--ease-out); }
.dl-track.live i::after, .dl-bar.live i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%); animation: dl-flow 1.6s linear infinite; }
@keyframes dl-flow { to { transform: translateX(100%); } }
.dl-nums { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font: 500 11.5px var(--mono); color: var(--fg-3); }
.compute-sub .dl-bar { height: 4px; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .dl-track.live i::after, .dl-bar.live i::after { animation: none; } }

/* ---------------- multi-tick dropdown (festival strategy, 1.1.3) ---------------- */
.ms-wrap { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
/* release order (1.1.5): each route with its number */
.rank { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.rank-opt { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--fg-3); }
.rank-opt.on { color: var(--fg); border-color: var(--gold-line); }
.rank-opt select { width: 62px; }
.ms-wrap > input { flex: 1 1 260px; }
.ms { position: relative; flex: 1 1 320px; min-width: 0; }
.ms > summary { list-style: none; height: 40px; display: flex; align-items: center; padding: 0 34px 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--ink-1) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23847d8a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1.5l5 5 5-5'/></svg>") no-repeat right 12px center;
  color: var(--fg); font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms > summary::-webkit-details-marker { display: none; }
.ms[open] > summary { border-color: rgba(242, 192, 77, .6); box-shadow: 0 0 0 3px rgba(219, 165, 52, .16); }
.ms-panel { position: absolute; z-index: 30; top: 46px; left: 0; right: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; }
.ms-opt { display: flex; align-items: center; font-size: 13.5px; color: var(--fg-2); cursor: pointer; font-weight: 450; }

/* 1.2.0: producer and EP fees (Location & Incentives) */
.pf { margin-top: 10px; display: grid; gap: 6px; }
.pf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pf-list { margin: 0; padding-left: 18px; color: var(--fg-2); }
.pf-list li { margin: 2px 0; }
.pf details summary { cursor: pointer; color: var(--fg-3); }
.pf details p { margin: 6px 0 0; color: var(--fg-2); max-width: 760px; }

/* ================================================================ 1.2.1 refinement ("quiet luxury", Rule 1, 5 Nov 2026)
   Same palette, fonts and rules (Tim, 12-13 Oct: purple crest, black and gold, gold gradient on every selected control,
   no category label above titles). What changes is restraint: gold that reads as metal and glows less, labels set in the
   interface typeface instead of a terminal font, one surface per region instead of boxes inside boxes, a quieter rail,
   quieter notices, and figures set like a ledger. */
:root {
  /* metal: a specular band near the top and a darker rim, so gold reads as polished metal rather than yellow plastic */
  --gold-metal: linear-gradient(180deg, #fbe7ad 0%, #fff6d8 18%, #efc65f 46%, #d9a53a 70%, #a8761c 100%);
  --gold-tab: radial-gradient(120% 140% at 20% -20%, rgba(255, 250, 230, .7) 0%, rgba(255, 250, 230, 0) 50%),
    linear-gradient(112deg, #f6e2a8 0%, #efcd78 28%, #ddb052 56%, #c18f30 82%, #a57620 100%);
  --gold-tab-shadow: inset 0 1px 0 rgba(255, 252, 238, .55), inset 0 -1px 0 rgba(108, 75, 15, .4), 0 0 0 1px rgba(181, 134, 46, .55),
    0 4px 12px -8px rgba(219, 165, 52, .55);
  --label: 600 10px/1.2 var(--sans);           /* small caps-style labels, in Geist (the bundled serif has no small caps) */
  --surface-sheen: linear-gradient(180deg, rgba(255, 246, 230, .022), rgba(255, 246, 230, 0) 120px);
}

/* labels: the interface typeface, uppercase with open tracking and capital-height punctuation; monospace stays for codes and keys */
nav .grp, th, .kpi .l, .eyebrow, .section-title small, .tabs .lbl, .run-meta, .ledger .l, .tile .code, .side-foot .ver,
.palette .grp, .side-card h2 small, .cloud-card h2 small, .provs button small, .tag, .mark small {
  font: var(--label); letter-spacing: .15em; font-feature-settings: "case"; }
.eyebrow { font-size: 10.5px; letter-spacing: .24em; }
.run-meta { font-size: 10.5px; letter-spacing: .16em; }
.mark small { font-size: 9px; letter-spacing: .62em; color: var(--gold-300); opacity: .7; }
th { color: var(--fg-3); }

/* figures: lining and tabular in Geist, right-aligned, like a ledger; monospace only where the value is a code */
.num, td.num, th.num { font-family: var(--sans); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .01em; }
td { font-variant-numeric: tabular-nums; }

/* the rail: recedes once you have arrived (Linear, Mar 2026: "don't compete for attention you haven't earned") */
nav a { height: 28px; color: var(--fg-3); font-size: 13.25px; }
nav a .ic { color: var(--fg-4); opacity: .85; }
nav .grp { margin: 10px 10px 4px; color: rgba(135, 127, 143, .7); }
@media (hover: hover) { nav a:hover { color: var(--fg); } }
/* every page fits at 900 px high; when it doesn't, the edges fade to say the list scrolls */
nav.fade-b { mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent 100%); }
nav.fade-t { mask-image: linear-gradient(180deg, transparent 0, #000 18px); }
nav.fade-t.fade-b { mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%); }

/* one surface per region: a card inside a card loses its fill and lift and keeps a hairline */
.card { background-image: var(--surface-sheen); border-color: rgba(222, 200, 255, .065); }
.card .card, .card .kpi, .card .side-card { background: transparent !important; box-shadow: none; border-color: var(--line); }   /* !important: some panels set their fill inline */
.kpi { background: rgba(7, 5, 11, .35); }
.kpi .v { font-size: 36px; letter-spacing: -.01em; margin-top: 14px; }

/* notices: a quiet line, not a banner on every page (banner blindness; the message still leads) */
.notice { background: linear-gradient(90deg, rgba(107, 63, 180, .12), rgba(107, 63, 180, 0) 70%); border: 0; border-left: 2px solid rgba(157, 111, 226, .6);
  border-radius: 0 var(--r) var(--r) 0; padding: 12px 14px 12px 16px; font-size: 13px; }
.notice .ic { width: 28px; height: 28px; background: transparent; box-shadow: 0 0 0 1px rgba(157, 111, 226, .3) inset; }
.notice .sub { color: var(--fg-3); }

/* inputs: a lifted, faintly lit field rather than a hole; the focus ring sits just outside in gold */
input[type=text], input[type=number], input[type=search], input[type=password], select, textarea {
  background-color: rgba(255, 246, 230, .028); border-color: rgba(222, 200, 255, .11); box-shadow: 0 1px 0 rgba(0, 0, 0, .25) inset; }
@media (hover: hover) { input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: rgba(222, 200, 255, .2); } }
input:focus, select:focus, textarea:focus { background-color: rgba(255, 246, 230, .04); border-color: rgba(239, 198, 95, .7);
  box-shadow: 0 0 0 3px rgba(219, 165, 52, .12), 0 1px 0 rgba(0, 0, 0, .25) inset; }
label.f { color: var(--fg-2); font-weight: 450; font-size: 12.5px; }

/* buttons: the primary is metal with a fine dark rim and a short, low glow; secondaries are quiet glass */
.btn.primary { color: #241a07; letter-spacing: .005em;
  box-shadow: 0 1px 0 rgba(255, 252, 238, .7) inset, 0 -1px 0 rgba(90, 60, 10, .35) inset, 0 0 0 1px rgba(140, 100, 30, .7), 0 6px 16px -10px rgba(219, 165, 52, .7); }
.btn:not(.primary):not(.quiet) { background: rgba(255, 246, 230, .035); border-color: rgba(222, 200, 255, .12); }
@media (hover: hover) { .btn:not(.primary):not(.quiet):hover { background: rgba(255, 246, 230, .065); border-color: rgba(239, 198, 95, .35); } }

/* tables: structure felt, not seen */
th { background: transparent; border-bottom-color: rgba(222, 200, 255, .1); padding-top: 14px; }
td { border-bottom-color: rgba(222, 200, 255, .05); }
@media (hover: hover) { tbody tr:hover td { background: rgba(219, 165, 52, .03); } }

/* page head: a fine gold hairline closes the title block (an ornament, not a label) */
main#app > h1:first-child + .lede::after { content: ""; display: block; width: 44px; height: 1px; margin-top: 22px;
  background: linear-gradient(90deg, var(--gold-400), rgba(242, 192, 77, 0)); }
/* the rail's crest plate a touch smaller, so all seventeen pages and their groups fit at 900 px */
.mark { padding-bottom: 6px; }
.mark img, .mark .sb3d { max-width: 178px; }
.mark small { margin-top: 8px; }
nav .grp { margin-top: 9px; }
.list .when { font: 500 12px var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ================================================================ "purple is the jewel, not the room" (Tim, 5 Nov: less purple,
   purple as the luxury, cleaner). The rooms go to neutral near-black, faintly warm so gold sits richly on it; purple stays where it
   means something: the crest, the Home marquee's light, the suite's icon wells, the AI (Jonny, notices, AI pills) and switches. */
:root {
  --ink-0: #0a0a0b; --ink-1: #0f0f10; --ink-2: #151516; --ink-3: #1c1c1e; --ink-4: #252527; --ink-5: #303033;
  --line: rgba(255, 248, 235, .07); --line-2: rgba(255, 248, 235, .12); --line-3: rgba(255, 248, 235, .2);
  --fg-2: #bbb5ac; --fg-3: #8a857d; --fg-4: #5f5b56;
  --plum-glow: rgba(107, 52, 190, .2);
}
body::before { background:
  radial-gradient(520px 380px at -4% -8%, var(--plum-glow), transparent 64%),          /* a single plum light behind the crest */
  radial-gradient(700px 420px at 108% -14%, rgba(219, 165, 52, .05), transparent 60%); }
.main { background: linear-gradient(180deg, #121213 0%, #0d0d0e 520px); border-color: rgba(255, 248, 235, .06); }
.topbar { background: linear-gradient(180deg, rgba(18, 18, 19, .9), rgba(18, 18, 19, .72)); }
.marquee { background: #0e0d11; }                                                         /* the marquee keeps its purple light */
.tile { background: linear-gradient(180deg, #171719, #121213) padding-box,
  linear-gradient(155deg, rgba(242, 192, 77, .28), rgba(255, 248, 235, .06) 38%, rgba(255, 248, 235, .035) 100%) border-box; }
.tile .glyph { background: linear-gradient(160deg, #5a2fa0, #241040); box-shadow: 0 0 0 1px rgba(242, 192, 77, .26) inset, 0 1px 0 rgba(255, 240, 210, .14) inset, 0 8px 18px -12px rgba(90, 47, 160, .8); }
.drop { background: radial-gradient(500px 200px at 50% 0%, rgba(219, 165, 52, .06), transparent 70%), var(--ink-1); border-color: rgba(255, 248, 235, .16); }
.drop .art { background: linear-gradient(160deg, #5a2fa0, #241040); }
.mark img { box-shadow: 0 0 0 1px rgba(242, 192, 77, .3), 0 18px 40px -16px rgba(90, 47, 160, .7); }
::selection { background: rgba(219, 165, 52, .35); }

/* ================================================================ crisp black (Tim, 5 Nov: "leave the crisp black, don't dull it
   down"). Deeper, true blacks with sharp hairlines; text and the rail at full brightness; the gold back to its brighter sweep with the
   shorter glow kept. Purple stays the jewel. */
:root {
  --ink-0: #050505; --ink-1: #0a0a0a; --ink-2: #0f0f10; --ink-3: #161617; --ink-4: #1f1f21; --ink-5: #2a2a2d;
  --line: rgba(255, 248, 235, .085); --line-2: rgba(255, 248, 235, .14); --line-3: rgba(255, 248, 235, .24);
  --fg: #f4efe6; --fg-2: #c6c0b6; --fg-3: #938d84; --fg-4: #67625c;
  --gold-tab: radial-gradient(130% 160% at 18% -10%, rgba(255, 251, 232, .85) 0%, rgba(255, 251, 232, 0) 46%),
    linear-gradient(112deg, #fff1c8 0%, #fad978 24%, #ecb94a 50%, #d3972b 74%, #ad7a1c 100%);
}
.main { background: linear-gradient(180deg, #0b0b0c 0%, #070707 520px); border-color: rgba(255, 248, 235, .08); }
.topbar { background: linear-gradient(180deg, rgba(11, 11, 12, .92), rgba(11, 11, 12, .76)); }
.marquee { background: #09080c; }
.tile { background: linear-gradient(180deg, #111112, #0b0b0c) padding-box,
  linear-gradient(155deg, rgba(242, 192, 77, .32), rgba(255, 248, 235, .07) 38%, rgba(255, 248, 235, .04) 100%) border-box; }
.card { border-color: rgba(255, 248, 235, .08); }
.kpi { background: rgba(0, 0, 0, .35); }
nav a { color: var(--fg-2); }
nav a .ic { color: var(--fg-3); opacity: 1; }
nav .grp { color: var(--fg-4); }
.notice .sub { color: var(--fg-2); }

/* ---------------- the web version (1.3.0): who's signed in and the AI brain, in the sidebar foot ---------------- */
.web-brain { gap: 10px; }
.web-brain .dot { flex: none; }
.web-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 0; }
.web-user .who { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: var(--fg-2); font-size: 12.5px; }
.web-user .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-user .who i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px/1 var(--sans); font-style: normal;
  color: var(--gold-200); background: linear-gradient(160deg, #5a2fa0, #241040); box-shadow: 0 0 0 1px rgba(242, 192, 77, .3) inset; }
code.pw-once { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--ink-1); border: 1px solid var(--gold-line);
  color: var(--gold-200); font: 500 14px var(--mono); letter-spacing: .04em; user-select: all; }
input[type=file] { color: var(--fg-2); font-size: 13px; max-width: 100%; }
input[type=file]::file-selector-button { height: 38px; margin-right: 12px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(222, 200, 255, .12);
  background: rgba(255, 246, 230, .035); color: var(--fg); font: 550 13.5px var(--sans); cursor: pointer; }
@media (hover: hover) { input[type=file]::file-selector-button:hover { background: rgba(255, 246, 230, .065); border-color: rgba(239, 198, 95, .35); } }

/* 1.3.4: the web AI brain picker */
.brain-pick { margin: 14px 0 4px; display: grid; gap: 14px; }
.brain-panel { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-1); }
.brain-panel p { margin: 0; }
.brain-step { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.brain-step .n { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--gold-tab-ink, #1d1608); background: var(--gold, #dba534); }

/* 1.3.4: login details in plain view, show-password, the AI card lit when Jonny sends you there */
.login-lines { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 6px; align-items: baseline; }
.login-lines span { color: var(--fg-4); font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.login-lines code { font-size: 15px; user-select: all; word-break: break-all; }
.pw-wrap { display: flex; gap: 6px; align-items: center; } .pw-wrap input { flex: 1 1 auto; min-width: 0; }
@keyframes aiFlash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 3px var(--gold, #dba534); } }
.card.flash { animation: aiFlash 1.6s ease 2; }

/* 1.3.5: a newer Studio is on the server */
.new-version { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--ink-1); border: 1px solid var(--gold-line, rgba(242,192,77,.42)); box-shadow: 0 10px 30px rgba(0,0,0,.45); max-width: calc(100vw - 32px); flex-wrap: wrap; }
