/* ==========================================================================
   JobHunterX — "Calm" design system, v2
   Light-first and editorial: warm off-white canvas with a soft pastel wash,
   white cards, black pill actions, one warm accent. App-like: the viewport is
   the canvas — panes scroll internally, the page never becomes a long scroll.
   Type: Geist (UI) · Instrument Serif italic (accent words) · Geist Mono.
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("/vendor/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/vendor/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/vendor/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #f4f3f0;
  --ink: #111111;
  --text: #18181b;
  --text-2: #5d5d66;
  --text-3: #9a9aa3;
  --card: rgba(255, 255, 255, .62);
  --card-solid: #ffffff;
  --card-hi: rgba(255, 255, 255, .86);
  --edge: rgba(255, 255, 255, .95);
  --line: rgba(17, 17, 17, .07);
  --line-strong: rgba(17, 17, 17, .13);
  --field: rgba(255, 255, 255, .8);
  --accent: #ee6b33;
  --accent-soft: #fdeee6;
  --on-ink: #ffffff;
  --sheen: rgba(255, 255, 255, .75);

  --success: #2f9a68; --info: #3d6ad6; --warning: #c4860f; --danger: #d4473a; --unknown: #8d8d96;

  --shadow-sm: 0 1px 2px rgba(24, 20, 40, .05);
  --shadow: 0 1px 2px rgba(24, 20, 40, .04), 0 18px 40px -24px rgba(40, 30, 80, .22);
  --shadow-lg: 0 2px 6px rgba(24, 20, 40, .05), 0 40px 80px -30px rgba(40, 30, 80, .35);
  --blur: blur(24px) saturate(140%);
  --radius: 26px; --radius-md: 18px; --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);

  --wash-1: #f6c7b2; --wash-2: #d7c7f4; --wash-3: #f3d9e6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --ink: #f4f4f5; --text: #ececee; --text-2: #a1a1aa; --text-3: #6b6b74;
  --card: rgba(255, 255, 255, .045); --card-solid: #18181b; --card-hi: rgba(255, 255, 255, .07);
  --edge: rgba(255, 255, 255, .08); --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .14);
  --field: rgba(255, 255, 255, .05); --accent: #f47a43; --accent-soft: rgba(244, 122, 67, .16); --on-ink: #0e0e10;
  --sheen: rgba(255, 255, 255, .07);
  --success: #4cc28a; --info: #7aa0ff; --warning: #e7ad3c; --danger: #f2776b; --unknown: #8d8d96;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -26px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .95);
  --wash-1: #8a3c1c; --wash-2: #3b2f66; --wash-3: #5a2a3d;
  color-scheme: dark;
}

/* -------------------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; letter-spacing: -.005em; }
h1, h2, h3 { margin: 0 0 .3em; line-height: 1.12; letter-spacing: -.03em; font-weight: 500; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 2.3vw, 2.15rem); letter-spacing: -.045em; }
h2 { font-size: 1.22rem; } h3 { font-size: 1.02rem; letter-spacing: -.02em; }
p { margin: 0 0 .6em; }
a { color: var(--text); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .82em; color: var(--text-2); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--card-solid); padding: 8px 12px; z-index: 100; border-radius: 10px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--text-2); } .small { font-size: .84rem; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; } .row.space { justify-content: space-between; gap: 12px; }
.row.gap { gap: 8px; } .wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.icon { flex: none; }
.eyebrow { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); }
.sec-title { display: block; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin: 6px 0 10px; }

/* thin, quiet scrollbars inside panes */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroll::-webkit-scrollbar { width: 8px; } .scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* soft pastel wash. Drawn as soft gradients, still: a blurred, endlessly drifting layer under the frosted panels made
   the GPU redo every panel's blur on every frame, even with nothing happening on screen. */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); contain: strict; }
.ambient i { position: absolute; border-radius: 50%; }
.ambient i:nth-child(1) { width: 96vw; height: 92vh; left: -26vw; bottom: -42vh; background: radial-gradient(closest-side, var(--wash-1), transparent); opacity: .55; }
.ambient i:nth-child(2) { width: 94vw; height: 96vh; right: -28vw; bottom: -44vh; background: radial-gradient(closest-side, var(--wash-2), transparent); opacity: .6; }
.ambient i:nth-child(3) { width: 76vw; height: 76vh; right: -12vw; top: -40vh; background: radial-gradient(closest-side, var(--wash-3), transparent); opacity: .35; }
:root[data-theme="dark"] .ambient i { opacity: .26; }
@keyframes drift { to { transform: translate(4vw, -3vh) scale(1.08); } }

/* -------------------------------------------------------------------------- motion vocabulary */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.92); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: none; } }
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes blurIn { from { opacity: 0; filter: blur(8px); transform: translateY(10px); } }

/* page change (fallback when View Transitions are unavailable) */
.view { animation: blurIn .5s var(--ease) both; view-transition-name: page; }
html.vt .view { animation: none; }
::view-transition-old(page) { animation: vtOut .2s ease-in both; }
::view-transition-new(page) { animation: blurIn .5s var(--ease) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
@keyframes vtOut { to { opacity: 0; transform: scale(.99); filter: blur(4px); } }

/* -------------------------------------------------------------------------- splash / boot */
.splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; animation: fade .4s; }
.splash-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -.045em; color: var(--ink); animation: fadeUp .6s .15s var(--ease) both; }
.splash-line { width: 120px; height: 2px; border-radius: 2px; background: var(--line-strong); overflow: hidden; animation: fade .6s .3s both; }
.splash-line span { display: block; width: 40%; height: 100%; background: var(--ink); border-radius: 2px; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* -------------------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; height: 100dvh; padding: 16px; overflow: hidden; }
.sidebar { min-height: 0; position: relative; z-index: 5; }   /* above the main panel, so its popovers are never covered */
.sidebar-card { height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 12px;
  background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 16px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 11px;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.6); transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark img { width: 34px; height: 34px; display: block; }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.splash-logo { width: 72px; height: 72px; border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); animation: pop .7s var(--spring) both; }
.splash-mark { position: relative; display: grid; place-items: center; width: 150px; height: 150px; }
.splash-mark .orb-wave { inset: 30%; border-radius: 30%; animation: wave 2.6s cubic-bezier(.2,.6,.4,1) infinite; }
.splash-mark .orb-wave.w2 { animation-delay: .87s; } .splash-mark .orb-wave.w3 { animation-delay: 1.73s; }
.brand-name { font-size: 1.12rem; font-weight: 600; letter-spacing: -.04em; }
.brand-name .serif { font-size: 1.2em; margin-left: 1px; }
.nav-label { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 12px 12px 6px; }
.nav-groups { position: relative; display: flex; flex-direction: column; }
.nav-ind { position: absolute; left: 0; top: 0; border-radius: 14px; background: var(--card-solid); box-shadow: var(--shadow-sm), 0 6px 18px -10px rgba(40,30,80,.25);
  transition: transform .45s var(--spring), width .35s var(--ease), height .35s var(--ease); pointer-events: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 14px; color: var(--text-2); text-decoration: none;
  font-weight: 500; font-size: .89rem; transition: color .2s; z-index: 1; }
.nav a:hover { color: var(--text); }
.nav a:hover .icon { transform: scale(1.08); }
.nav a .icon { transition: transform .3s var(--spring), color .2s; }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav a.active .icon { color: var(--accent); }
.nav-step { margin-left: auto; font-family: var(--mono); font-size: .66rem; color: var(--text-3); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); }
.nav a.active .nav-step { border-color: var(--accent); color: var(--accent); }
.nav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; margin-left: 6px; }
.nav-step + .dot { margin-left: 6px; }
.nav-count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: .68rem; font-weight: 600; padding: 0 7px; line-height: 1.6; animation: pop .4s var(--spring); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 10px 4px 0; border-top: 1px solid var(--line); }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px; border-radius: 14px; transition: background .2s; }
.me:hover { background: var(--card-hi); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink); font-size: .74rem; font-weight: 600; }
.me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-text strong { font-size: .82rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn { font-size: .72rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.conn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--unknown); }
.conn-open::before { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.conn-reconnecting::before { background: var(--warning); animation: pulse 1.4s infinite; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.main:focus { outline: none; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 4px 4px 0; flex: none; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--text-2); font-size: .9rem; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.split { flex: 1; min-height: 0; display: grid; gap: 16px; }
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.pane-pad { padding: 20px 22px; }
.pane-center { flex: 1; display: grid; place-items: center; height: 100%; }
.grow-fill { flex: 1; min-height: 0; }
.activity-line { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); z-index: 30; background: var(--card-hi);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--edge); border-radius: 999px; padding: 8px 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; color: var(--text-2); box-shadow: var(--shadow); pointer-events: none;
  animation: actIn .45s var(--spring) both, actOut .5s 5s ease-in forwards; }
@keyframes actIn { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }
@keyframes actOut { to { opacity: 0; transform: translate(-50%, 8px); } }

/* -------------------------------------------------------------------------- surfaces */
.card { position: relative; background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--edge); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.pane { padding: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: rise .5s var(--ease) both; }
.stat:nth-child(2) { animation-delay: .05s; } .stat:nth-child(3) { animation-delay: .1s; } .stat:nth-child(4) { animation-delay: .15s; }
.stat .label { font-size: .72rem; color: var(--text-2); }
.stat .value { font-size: 1.35rem; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; margin-top: 4px; color: var(--ink); }
.stat .hint { font-size: .72rem; color: var(--text-3); margin-top: 2px; }

/* -------------------------------------------------------------------------- controls */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card-solid); color: var(--text); font: inherit; font-weight: 500; font-size: .87rem;
  cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--spring), box-shadow .25s, background .2s, border-color .2s, opacity .2s; }
.btn:hover:not(:disabled) { border-color: var(--text-3); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.is-busy { opacity: .85; cursor: progress; }
.btn .icon { transition: transform .3s var(--spring); }
.btn:hover:not(:disabled) .icon:last-child:not(:first-child) { transform: translateX(3px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); box-shadow: 0 10px 22px -12px rgba(0,0,0,.6); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-100%); }
.btn-primary:hover:not(:disabled)::after { animation: sheen .9s var(--ease); }
.btn-primary:hover:not(:disabled) { border-color: var(--ink); box-shadow: 0 14px 26px -12px rgba(0,0,0,.55); }
.btn-danger { background: var(--card-solid); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 13px; font-size: .79rem; gap: 6px; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: .95rem; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; transition: background .2s, color .2s, transform .25s var(--spring); }
.icon-btn:hover:not(:disabled) { background: var(--card-hi); color: var(--text); border-color: var(--line); }
.icon-btn:active:not(:disabled) { transform: scale(.9); }
.icon-btn:disabled { opacity: .4; }
.save-btn { border: 1px solid var(--line-strong); background: var(--card-solid); }
.save-btn.on { color: #fff; background: var(--accent); border-color: var(--accent); animation: pop .45s var(--spring); }
.save-btn.on .icon path { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.link-btn:hover { text-decoration-color: var(--text); }
.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--field); color: var(--text); font: inherit; font-size: .9rem; line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(17,17,17,.04); transition: border-color .2s, box-shadow .25s, background .2s; }
.input:hover:not(:focus):not(:disabled), .chips-input:hover:not(:focus-within) { border-color: color-mix(in srgb, var(--text-3) 70%, transparent); }
.input::placeholder, .chips-input input::placeholder { color: var(--text-3); }
.input:focus, .chips-input:focus-within { outline: none; border-color: var(--accent); background: var(--card-solid);
  box-shadow: 0 0 0 4px var(--accent-soft), inset 0 1px 2px rgba(17,17,17,.03); }
.input:disabled { opacity: .55; cursor: not-allowed; }
.input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--card-solid) inset; -webkit-text-fill-color: var(--text); }
input[type="number"].input { -moz-appearance: textfield; font-feature-settings: "tnum"; }
input[type="number"].input::-webkit-inner-spin-button, input[type="number"].input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; height: 14px; width: 14px; border-radius: 50%; cursor: pointer;
  background: var(--text-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 9px no-repeat; }
input[type="password"].input { letter-spacing: .08em; } input[type="password"].input::placeholder { letter-spacing: 0; }
textarea.input { resize: vertical; line-height: 1.6; min-height: 92px; }
.input-sm { min-height: 32px; padding: 4px 12px; font-size: .79rem; border-radius: 999px; }

/* custom select (portal list, so it is never clipped) */
.select { position: relative; display: inline-flex; min-width: 0; }
.select-block { display: flex; width: 100%; }
.select-btn { display: inline-flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 0 12px 0 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--field); color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; box-shadow: inset 0 1px 2px rgba(17,17,17,.04);
  transition: border-color .2s, box-shadow .25s, background .2s; }
.select-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--text-3) 70%, transparent); background: var(--card-solid); }
.select-btn:focus-visible, .select.open .select-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card-solid); }
.select-btn:disabled { opacity: .55; cursor: not-allowed; }
.select-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-chev { flex: none; color: var(--text-3); transition: transform .3s var(--spring), color .2s; }
.select.open .select-chev { transform: rotate(180deg); color: var(--accent); }
.select-btn > .icon { color: var(--text-3); }
.select-sm .select-btn { min-height: 32px; padding: 0 10px 0 12px; border-radius: 999px; font-size: .79rem; font-weight: 500; gap: 7px; background: var(--card-solid); box-shadow: var(--shadow-sm); }
.select-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sc, var(--unknown)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc, var(--unknown)) 18%, transparent); }
.select-list { position: fixed; z-index: 90; margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow-y: auto; scrollbar-width: thin;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 6px rgba(24,20,40,.06), 0 24px 50px -20px rgba(40,30,80,.4);
  transform-origin: top center; animation: listIn .26s var(--spring); font-family: var(--font); color: var(--text); }
.select-list.up { transform-origin: bottom center; }
@keyframes listIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.select-list.up { animation-name: listInUp; } @keyframes listInUp { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.select-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px 9px 12px; border-radius: 11px; font-size: .86rem; cursor: pointer;
  animation: fadeUp .25s var(--ease) both; animation-delay: calc(var(--i) * 14ms); transition: background .15s; }
.select-list li.hi { background: color-mix(in srgb, var(--accent) 8%, var(--card-solid)); }
.select-list li.sel { font-weight: 600; color: var(--ink); }
.select-list li .icon { color: var(--accent); }
.opt-text { display: flex; flex-direction: column; line-height: 1.3; } .opt-text small { font-size: .72rem; color: var(--text-3); font-weight: 400; }
:root[data-theme="dark"] .select-list { box-shadow: 0 30px 60px -20px rgba(0,0,0,.9); }
/* comet spinner */
.spinner { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(from 90deg, transparent 0 12%, currentColor);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 2px));
  animation: spin .75s linear infinite; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: .77rem; font-weight: 500; color: var(--text-2); }
.field-hint { font-size: .72rem; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.form-grid.tight { margin: 4px 0 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: .86rem; margin-top: 8px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.switch { position: relative; display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--text-2); cursor: pointer; user-select: none; padding: 4px 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 36px; height: 21px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .25s; }
.switch-ui::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .35s var(--spring), background .25s; }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(15px); background: var(--on-ink); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggles { gap: 4px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; width: fit-content; }
.seg-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: var(--card-hi); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 500;
  color: var(--text-2); cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s var(--spring); }
.seg-btn:hover { color: var(--text); }
.seg-btn:active { transform: scale(.95); }
.seg-btn.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.seg-btn .icon { animation: pop .3s var(--spring); }

/* chips & badges */
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--field); min-height: 42px; transition: border-color .2s, box-shadow .25s; }
.chips-input input { flex: 1; min-width: 110px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; padding: 4px 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line);
  font-size: .79rem; font-weight: 500; color: var(--text); max-width: 100%; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.chip-pop { animation: pop .4s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); }
.chip.soft { color: var(--text-3); box-shadow: none; background: transparent; }
.chip-good { background: color-mix(in srgb, var(--success) 10%, var(--card-solid)); border-color: color-mix(in srgb, var(--success) 25%, transparent); color: var(--success); }
.chip-bad { background: color-mix(in srgb, var(--danger) 8%, var(--card-solid)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; display: inline-grid; opacity: .55; } .chip-x:hover { opacity: 1; }
.chip-row, .skill-cloud, .skill-evidence { display: flex; flex-wrap: wrap; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .71rem; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.tone-success { --t: var(--success); } .tone-info { --t: var(--info); } .tone-warning { --t: var(--warning); } .tone-danger { --t: var(--danger); }
.tone-neutral, .tone-unknown { --t: var(--unknown); } .tone-ink { --t: var(--ink); }
.badge[class*="tone-"] { color: var(--t); background: color-mix(in srgb, var(--t) 10%, transparent); }
.badge[class*="tone-"]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--t); }
.tone-text-success { color: var(--success); } .tone-text-warning { color: var(--warning); } .tone-text-info { color: var(--info); } .tone-text-unknown { color: var(--unknown); }
.error-text { color: var(--danger); }
.dirty-pill { font-size: .72rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 99px; animation: pop .35s var(--spring); }

/* feedback */
.error-box, .notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; font-size: .86rem; animation: fadeUp .35s var(--ease); flex: none; }
.error-box { background: color-mix(in srgb, var(--danger) 8%, var(--card-solid)); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.notice { --t: var(--info); background: color-mix(in srgb, var(--t) 7%, var(--card-solid)); border: 1px solid color-mix(in srgb, var(--t) 20%, transparent); color: var(--text); flex-wrap: wrap; }
.notice.tone-warning { --t: var(--warning); }
.notice .icon { color: var(--t); }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: fadeUp .5s var(--ease); }
.empty-icon { position: relative; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffe1d3, var(--accent-soft)); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.empty-halo { position: absolute; inset: -8px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); animation: spin 18s linear infinite; }
.empty h3 { font-size: 1.15rem; font-weight: 500; margin: 0; }
.empty p { max-width: 400px; margin: 0 0 10px; font-size: .9rem; }

/* skeletons: a soft light sweep, not a blink */
.skeleton, .skeleton-card { display: flex; flex-direction: column; gap: 12px; }
.skeleton-card { background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; }
.sk-block { position: relative; overflow: hidden; height: 10px; border-radius: 6px; background: var(--line); }
.sk-block::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--sheen), transparent); animation: sheen 1.5s ease-in-out infinite; }
.sk-rows { display: flex; flex-direction: column; gap: 10px; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.sk-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.sk-ring { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.sk-ring.big { width: 78px; height: 78px; }

/* toasts: spring in, drain timer */
.toasts { position: fixed; top: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 70; max-width: min(400px, calc(100vw - 32px)); }
.toast { --t: var(--info); position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 11px 10px 11px 16px; border-radius: 18px; background: var(--card-hi);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--edge); box-shadow: var(--shadow-lg); font-size: .86rem; animation: toastIn .55s var(--spring) both; }
.toast-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t) 18%, transparent); }
.toast-time { position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--t); opacity: .45; transform-origin: left; animation: drain linear forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes drain { to { transform: scaleX(0); } }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; display: inline-block; flex: none; }

/* overlays */
.overlay, .drawer-overlay { position: fixed; inset: 0; background: rgba(30, 26, 40, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; animation: fade .25s; }
:root[data-theme="dark"] .overlay, :root[data-theme="dark"] .drawer-overlay { background: rgba(0,0,0,.5); }
.overlay { display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--card-solid); border: 1px solid var(--edge); border-radius: var(--radius); padding: 28px; width: min(440px, 100%); box-shadow: var(--shadow-lg); animation: pop .45s var(--spring); }
.dialog-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.drawer { position: absolute; top: 14px; right: 14px; bottom: 14px; width: min(780px, calc(100% - 28px)); background: color-mix(in srgb, var(--bg) 70%, white);
  border: 1px solid var(--edge); border-radius: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideIn .5s var(--ease); outline: 0; overflow: hidden; }
:root[data-theme="dark"] .drawer { background: #141416; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.popover { position: absolute; top: calc(100% + 8px); z-index: 40; background: var(--card-solid); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow-lg); animation: popIn .3s var(--spring); transform-origin: top left; min-width: 260px; }
.pop-left { left: 0; } .pop-right { right: 0; transform-origin: top right; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.pop-anchor { position: relative; }

/* tabs — pill track with a springy sliding indicator */
.tabs { position: relative; display: flex; gap: 2px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 999px; background: var(--line); flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-ind { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--card-solid); box-shadow: var(--shadow-sm), 0 4px 14px -6px rgba(40,30,80,.25);
  transition: transform .45s var(--spring), width .35s var(--ease); }
.tab { position: relative; z-index: 1; border: 0; background: transparent; padding: 7px 15px; font: inherit; font-weight: 500; font-size: .84rem; color: var(--text-2); cursor: pointer; border-radius: 999px;
  display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; transition: color .25s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink); }
.tabs-sm .tab { padding: 5px 12px; font-size: .8rem; }
/* job list tabs: always one row of six equal tabs, label on top and count below, so the bar keeps its size when
   counts grow (9 -> 145) and never scrolls or wraps; only a very narrow column switches to a 3 x 2 grid */
.results { container-type: inline-size; }
.results > .tabs-sm { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; overflow: visible; }
.results > .tabs-sm .tab { flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 5px 2px; font-size: .76rem; line-height: 1.15; }
.results > .tabs-sm .tab-count { font-size: .66rem; }
@container (max-width: 330px) { .results > .tabs-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 18px; } }
.tab-count { font-family: var(--mono); font-size: .7rem; color: var(--text-3); }
.tab.active .tab-count { color: var(--accent); }

/* -------------------------------------------------------------------------- signature loaders */
.orb { --s: 160px; position: relative; width: var(--s); height: var(--s); display: grid; place-items: center; flex: none; }
.orb > * { grid-area: 1 / 1; }
.orb-core { position: relative; z-index: 2; width: 34%; height: 34%; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 34% 30%, #ffdccb, var(--accent) 58%, #c84e1c); box-shadow: 0 14px 40px -8px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 -6px 14px rgba(0,0,0,.12);
  animation: breathe 3.4s ease-in-out infinite; transition: background .6s; }
.orb.is-done .orb-core { background: radial-gradient(circle at 34% 30%, #555, #111 70%); box-shadow: 0 14px 34px -10px rgba(0,0,0,.5); animation: pop .6s var(--spring); }
:root[data-theme="dark"] .orb.is-done .orb-core { background: radial-gradient(circle at 34% 30%, #fff, #d4d4d8 70%); color: #111; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); animation: spin 40s linear infinite; }
.orb-ring.r1 { inset: 21%; } .orb-ring.r2 { inset: 10%; animation-direction: reverse; animation-duration: 60s; } .orb-ring.r3 { inset: 0; border-style: dashed; animation-duration: 90s; }
.orb-ring i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ink); }
.orb-ring.r2 i { background: var(--accent); width: 6px; height: 6px; top: -3px; margin-left: -3px; }
.orb-ring.r3 i { background: #8b7ad8; width: 7px; height: 7px; top: -3.5px; margin-left: -3.5px; }
.orb.is-active .orb-ring.r1 { animation-duration: 3.2s; } .orb.is-active .orb-ring.r2 { animation-duration: 5.5s; } .orb.is-active .orb-ring.r3 { animation-duration: 9s; }
.orb-wave { position: absolute; inset: 33%; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; }
.orb.is-active .orb-wave { animation: wave 2.6s cubic-bezier(.2,.6,.4,1) infinite; }
.orb.is-active .orb-wave.w2 { animation-delay: .87s; } .orb.is-active .orb-wave.w3 { animation-delay: 1.73s; }
@keyframes wave { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3); opacity: 0; } }

.scan-doc { position: relative; width: 210px; height: 220px; margin: 0 auto; }
.scan-sheet { position: absolute; inset: 0 30px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px 18px; display: flex; flex-direction: column; gap: 9px;
  overflow: hidden; animation: bob 4s ease-in-out infinite; border: 1px solid rgba(17,17,17,.05); }
.scan-sheet i { display: block; height: 5px; border-radius: 3px; background: #ebe9f0; width: 92%; transform-origin: left; animation: lineIn 2.6s var(--ease) infinite; }
.scan-sheet i:nth-child(2) { animation-delay: .1s; } .scan-sheet i:nth-child(3) { animation-delay: .2s; } .scan-sheet i:nth-child(4) { animation-delay: .3s; }
.scan-sheet i:nth-child(5) { animation-delay: .4s; } .scan-sheet i:nth-child(6) { animation-delay: .5s; } .scan-sheet i:nth-child(7) { animation-delay: .6s; }
.scan-sheet i:nth-child(8) { animation-delay: .7s; } .scan-sheet i:nth-child(9) { animation-delay: .8s; }
.scan-sheet .l-title { width: 55%; height: 9px; background: #18181b; } .scan-sheet .l-sub { width: 38%; background: #f2b79c; margin-bottom: 6px; }
.scan-sheet .s { width: 58%; } .scan-sheet .m { width: 78%; }
@keyframes lineIn { 0% { transform: scaleX(0); opacity: 0; } 25%, 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: .25; } }
.scan-beam { position: absolute; left: 0; right: 0; top: -50px; height: 50px; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 20%, transparent) 75%, var(--accent) 100%); animation: scan 2.2s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes scan { to { transform: translateY(280px); } }
.scan-chip { position: absolute; padding: 4px 10px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .72rem; font-weight: 500; color: var(--text);
  animation: chipFloat 3.6s ease-in-out infinite; }
.scan-chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 6px; vertical-align: 1px; }
.scan-chip.c1 { left: -18px; top: 46px; } .scan-chip.c2 { right: -22px; top: 104px; animation-delay: -1.2s; } .scan-chip.c3 { left: -6px; bottom: 26px; animation-delay: -2.4s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); opacity: .95; } 50% { transform: translateY(-8px); opacity: 1; } }

/* -------------------------------------------------------------------------- onboarding */
.onboarding { min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 28px; padding: 24px; }
.ob-side { display: flex; flex-direction: column; gap: 40px; padding: 18px 8px 18px 18px; }
.ob-side .brand { padding: 0; }
.ob-copy { animation: blurIn .6s var(--ease) both; }
.ob-copy h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); line-height: 1.04; margin-bottom: 14px; }
.ob-copy .lead { color: var(--text-2); font-size: 1.02rem; line-height: 1.6; }
.stepper { position: relative; list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.stepper::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--line-strong); }
.stepper-fill { position: absolute; left: 15px; top: 16px; width: 2px; border-radius: 2px; height: calc((100% - 32px) * var(--k)); background: var(--ink); transition: height .7s var(--ease); }
.stepper li { position: relative; z-index: 1; display: flex; gap: 14px; align-items: center; }
.stepper-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--text-3);
  background: var(--card-solid); border: 1.5px solid var(--line-strong); transition: all .4s var(--ease); }
.stepper .current .stepper-dot { border-color: var(--accent); color: var(--accent); animation: pulse 2s infinite; }
.stepper .done .stepper-dot { background: var(--ink); border-color: var(--ink); color: var(--on-ink); animation: pop .45s var(--spring); }
.stepper-text { display: flex; flex-direction: column; line-height: 1.3; }
.stepper-text strong { font-weight: 500; font-size: .9rem; color: var(--text-2); transition: color .3s; }
.stepper-text span { font-size: .76rem; color: var(--text-3); }
.stepper .current .stepper-text strong, .stepper .done .stepper-text strong { color: var(--ink); }
.ob-main { display: grid; place-items: center; min-width: 0; }
.ob-card { width: min(620px, 100%); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.step-anim.from-right { animation: stepR .6s var(--ease) both; } .step-anim.from-left { animation: stepL .6s var(--ease) both; }
@keyframes stepR { from { opacity: 0; transform: translateX(46px) scale(.98); filter: blur(6px); } }
@keyframes stepL { from { opacity: 0; transform: translateX(-46px) scale(.98); filter: blur(6px); } }
.ob-body { padding: 28px; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.ob-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--card-hi); flex: none; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 270px; width: 100%; border: 0; border-radius: 24px;
  background: color-mix(in srgb, var(--accent) 4%, var(--card-solid)); cursor: pointer; font: inherit; color: var(--text); transition: transform .4s var(--spring), background .3s, box-shadow .3s; }
.dropzone strong { font-weight: 500; font-size: 1.05rem; color: var(--ink); margin-top: 10px; }
.dz-border { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dz-border rect { width: calc(100% - 2px); height: calc(100% - 2px); fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 8 7; transition: stroke .3s; animation: march 1s linear infinite paused; }
.dropzone:hover .dz-border rect, .dropzone.drag .dz-border rect { stroke: var(--accent); animation-play-state: running; }
.dropzone:hover { background: color-mix(in srgb, var(--accent) 7%, var(--card-solid)); }
.dropzone.drag { transform: scale(1.02); box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-lg); }
@keyframes march { to { stroke-dashoffset: -30; } }
.dz-icon { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 30%, #ffd7c4, var(--accent) 75%);
  box-shadow: 0 16px 30px -12px var(--accent); animation: bob 3s ease-in-out infinite; transition: transform .4s var(--spring); }
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { transform: scale(1.1) rotate(-6deg); }
.ob-promises { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; font-size: .8rem; color: var(--text-2); }
.ob-promises li { display: inline-flex; align-items: center; gap: 6px; } .ob-promises .icon { color: var(--success); }
.ob-skip { align-self: center; color: var(--text-2); }
.ob-reading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px 0 6px; }
.ob-reading h3 { margin-top: 18px; font-size: 1.15rem; }
.file-name { font-family: var(--mono); font-size: .9em; color: var(--text-2); }
.ob-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ob-stat { padding: 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.ob-stat:nth-child(2) { animation-delay: .07s; } .ob-stat:nth-child(3) { animation-delay: .14s; }
.ob-stat .n { display: block; font-size: 1.7rem; letter-spacing: -.05em; color: var(--ink); line-height: 1.1; }
.ob-stat .n small { font-size: .5em; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.ob-stat .l { font-size: .74rem; color: var(--text-2); }
.ob-tracks { display: flex; flex-direction: column; gap: 10px; }
.ob-track { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; font-weight: 500; animation: fadeUp .5s var(--ease) both; animation-delay: calc(.15s + var(--i) * 80ms); }
.ob-launch { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 8px 0; }
.ob-plan { width: 100%; display: flex; flex-direction: column; gap: 14px; }

/* -------------------------------------------------------------------------- discover */
.split { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
.list-pane { gap: 0; }
.search-box { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); flex: none; }
.search-box.empty-profile { flex-direction: row; align-items: center; gap: 14px; }
.search-identity { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text-2); }
.spark-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); flex: none; }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 8px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--field);
  cursor: pointer; font: inherit; color: var(--text); text-align: left; transition: border-color .2s, box-shadow .25s; }
.search-summary:hover, .search-summary[aria-expanded="true"] { border-color: var(--text-3); box-shadow: 0 0 0 4px var(--accent-soft); }
.ss-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); font-size: .78rem; font-weight: 500;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item .icon { color: var(--text-3); }
.ss-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--text-2); padding: 4px 6px; }
.search-box .popover { left: 12px; right: 12px; top: 92px; }
.search-go { width: 100%; }
.run-strip { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; color: inherit; cursor: pointer; flex: none;
  transition: background .2s; animation: fadeUp .4s var(--ease); }
.run-strip:hover { background: var(--card-hi); }
.run-strip-title { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 500; color: var(--ink); }
.run-strip-title .icon { color: var(--success); }
.run-strip-counts { font-size: .76rem; color: var(--text-2); } .run-strip-counts strong { color: var(--accent); font-weight: 600; }
.beam-bar { position: relative; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 9px; }
.beam-bar > div { position: relative; height: 100%; border-radius: 3px; background: var(--ink); overflow: hidden; transition: width .9s var(--ease); }
.beam-bar.is-active > div { background: var(--accent); }
.beam-bar.is-active > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); transform: translateX(-100%); animation: sheen 1.3s ease-in-out infinite; }
.results { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 0; }
.filter-row { display: flex; gap: 8px; align-items: center; flex: none; }
.search-field { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text-3);
  transition: border-color .2s, box-shadow .25s; }
.search-field:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: .85rem; color: var(--text); }
.filter-btn { border: 1px solid var(--line-strong); background: var(--field); width: 38px; height: 38px; }
.filter-btn.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.filter-btn.on:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); }
.filter-count { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 600; display: grid; place-items: center; padding: 0 4px; animation: pop .3s var(--spring); }
.job-list { margin: 0 -14px; padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.list-foot { display: flex; justify-content: space-between; padding: 6px 4px 0; font-size: .76rem; color: var(--text-3); }
/* windowed list: only rows near the viewport exist; each is placed by its measured offset */
.vscroll { contain: strict; }               /* a new row lays out the list, never the whole page */
.vbody { position: relative; flex: none; }
.vrow { position: absolute; top: 0; left: 0; right: 0; contain: layout style; }
.vrow .job-card { animation: none; }
.vrow .job-card.is-fresh { animation: freshGlow 2.6s ease-out; }
.list-foot .spinner { vertical-align: -2px; margin-right: 4px; }
/* long lists that are not windowed: the browser skips layout and paint for items off screen */
.feed-list > li, .company-list > *, .doc-row, .job-card.track-row { content-visibility: auto; contain-intrinsic-size: auto 72px; }

.job-card { position: relative; display: flex; flex-direction: column; background: var(--card-solid); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); flex: none;
  transition: transform .35s var(--spring), box-shadow .3s, border-color .3s; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.job-card.is-selected { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.job-card.is-rejected { opacity: .72; } .job-card.is-rejected:hover { opacity: 1; }
.job-card.is-fresh { animation: rise .5s var(--ease) both, freshGlow 2.6s ease-out .2s; }
@keyframes freshGlow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow); } 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); } }
.job-main { flex: 1; display: flex; flex-direction: column; gap: 10px; text-align: left; background: none; border: 0; padding: 14px 14px 13px; font: inherit; color: inherit; cursor: pointer; min-width: 0; border-radius: inherit; }
.job-top { display: flex; gap: 12px; align-items: flex-start; }
.job-card > .save-btn { position: absolute; bottom: 12px; right: 12px; z-index: 1; width: 30px; height: 30px; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .3s var(--spring); }
.job-card:hover > .save-btn, .job-card > .save-btn.on, .job-card > .save-btn:focus-visible, .job-card.is-selected > .save-btn { opacity: 1; transform: none; }
.monogram { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 600; font-size: .92rem; color: #1b1b1f;
  background: linear-gradient(135deg, hsl(var(--h, 20) 85% 90%), hsl(calc(var(--h, 20) + 50) 70% 89%)); border: 1px solid var(--edge); transition: transform .4s var(--spring); }
.job-card:hover .monogram { transform: rotate(-6deg) scale(1.05); }
:root[data-theme="dark"] .monogram { background: linear-gradient(135deg, hsl(var(--h, 20) 35% 24%), hsl(calc(var(--h, 20) + 50) 30% 22%)); color: #f4f4f5; }
.job-body { min-width: 0; flex: 1; }
.job-company { font-size: .76rem; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.job-when { color: var(--text-3); white-space: nowrap; }
.job-title { font-size: 1rem; margin: 1px 0 0; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.job-sub { color: var(--text-3); font-size: .78rem; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 0 7px; }
.job-sub span + span::before { content: "·"; margin-right: 7px; }
.job-headline { margin: 0; font-size: .83rem; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-facts { display: flex; flex-wrap: wrap; gap: 5px; padding-right: 34px; }
.fact { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--card-hi); border: 1px solid var(--line); font-size: .71rem; color: var(--text-2); }

.score-ring { position: relative; flex: none; display: grid; place-items: center; }
.score-ring svg { position: absolute; inset: 0; }
.ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 2.5; }
.ring-fg { fill: none; stroke: var(--t, var(--unknown)); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dasharray 1.1s var(--ease); }
.score-num { position: relative; font-weight: 500; font-size: .92rem; letter-spacing: -.03em; color: var(--ink); font-feature-settings: "tnum"; }
.score-ring.big .score-num { font-size: 1.45rem; }

/* mission control */
.mission { height: 100%; overflow-y: auto; padding: 30px 34px; display: flex; flex-direction: column; justify-content: safe center; gap: 26px; scrollbar-width: thin; animation: fade .5s; }
.mission.idle { align-items: center; justify-content: center; text-align: center; }
.mission.idle h2 { font-size: 1.9rem; letter-spacing: -.045em; margin-top: 10px; }
.mission.idle p { max-width: 440px; }
.mission-hero { display: flex; gap: 28px; align-items: center; }
.mission-hero h2 { font-size: 1.9rem; letter-spacing: -.045em; margin: 4px 0 6px; }
.mission-hero p { max-width: 460px; }
.mission-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); width: 100%; }
.mission.idle .mission-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; margin-top: 12px; }
.mission-stats > div { padding: 16px 4px 14px 18px; border-left: 1px solid var(--line); text-align: left; }
.mission-stats > div:first-child { border-left: 0; padding-left: 0; }
.mission-stats .n { display: block; font-size: 2.3rem; font-weight: 400; letter-spacing: -.06em; line-height: 1.05; color: var(--ink); font-feature-settings: "tnum"; }
.mission-stats .hl .n { color: var(--accent); }
.mission-stats .l { font-size: .76rem; color: var(--text-2); }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.timeline::before { content: ""; position: absolute; left: 5.5%; right: 5.5%; top: 9px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.tl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; font-size: .7rem; color: var(--text-3); animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.tl-dot { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; background: var(--card-solid); color: var(--on-ink); transition: all .4s var(--ease); }
.st-running .tl-dot { border-color: var(--accent); background: var(--accent-soft); }
.st-running .tl-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent); animation: spin .9s linear infinite; }
.st-running { color: var(--ink); font-weight: 500; }
.st-done .tl-dot { background: var(--ink); border-color: var(--ink); animation: pop .45s var(--spring); } .st-done { color: var(--text-2); }
.st-failed .tl-dot { background: var(--danger); border-color: var(--danger); color: #fff; } .st-skipped { opacity: .45; }
.tl-detail { display: none; }
.plan-box { display: flex; flex-direction: column; gap: 12px; }
.plan { display: grid; gap: 14px; animation: fadeUp .4s var(--ease); }
.queries { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.queries li { padding: 7px 12px; border-radius: 10px; background: var(--card-hi); border: 1px solid var(--line); }

/* job detail (inline pane & drawer) */
.detail { display: flex; flex-direction: column; height: 100%; min-height: 0; animation: detailIn .5s var(--ease); }
@keyframes detailIn { from { opacity: 0; transform: translateX(14px); filter: blur(4px); } }
.detail-top { position: relative; padding: 22px 26px 14px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); flex: none; }
.detail-tools { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: row-reverse; gap: 6px; align-items: center; z-index: 2; }
.detail-header { display: flex; gap: 20px; align-items: center; padding-right: 120px; }
.detail-header h2 { font-size: 1.6rem; letter-spacing: -.04em; margin: 4px 0 8px; line-height: 1.12; }
.detail-company { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--text-2); }
.detail-company .monogram { border-radius: 7px; font-size: .66rem; }
.detail-headline { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.6; padding: 14px 16px; border-radius: var(--radius-md); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.detail-body { padding: 20px 26px 30px; display: flex; flex-direction: column; gap: 18px; animation: fadeUp .4s var(--ease); }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.constraints { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.constraint { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .85rem;
  animation: rise .45s var(--ease) both; }
.constraint:nth-child(2) { animation-delay: .04s; } .constraint:nth-child(3) { animation-delay: .08s; } .constraint:nth-child(4) { animation-delay: .12s; } .constraint:nth-child(n+5) { animation-delay: .16s; }
.constraint > .badge { align-self: flex-start; }
.constraint > div > strong { font-weight: 500; font-size: .92rem; }
.components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.component-head { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; font-weight: 500; margin-bottom: 7px; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--t); transition: width 1s var(--ease); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .87rem; }
.bullets.good li::marker { color: var(--success); } .bullets.bad li::marker { color: var(--danger); } .bullets.unk li::marker { color: var(--unknown); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.facts-grid > div { padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); }
.checks { width: 100%; border-collapse: collapse; font-size: .85rem; }
.checks th, .checks td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.checks th { color: var(--text-3); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.checks tbody tr { transition: background .2s; } .checks tbody tr:hover { background: var(--card-hi); }
.sources { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .87rem; }
.sources li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.jd-text { white-space: pre-wrap; font-size: .87rem; color: var(--text-2); overflow-wrap: anywhere; line-height: 1.7; }
.jd-text.clamped { max-height: 280px; overflow: hidden; mask-image: linear-gradient(#000 65%, transparent); -webkit-mask-image: linear-gradient(#000 65%, transparent); }
.kit-item { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); flex-wrap: wrap; animation: rise .45s var(--ease) both; }
.kit-item + .kit-item { animation-delay: .06s; }
.kit-item strong { font-weight: 500; }
.kit-thumb { position: relative; width: 52px; height: 64px; flex: none; border-radius: 10px; padding: 8px 7px 0; overflow: hidden; background: linear-gradient(135deg, #fde5d9, #e9e0fb); }
.kit-thumb .sheet { background: #fff; border-radius: 4px 4px 0 0; height: 100%; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.kit-thumb i { display: block; height: 3px; border-radius: 2px; background: #e7e6ec; } .kit-thumb i:first-child { width: 60%; background: #18181b; } .kit-thumb i:nth-child(3) { width: 80%; }
.kit-thumb .scan-beam { height: 22px; top: -22px; animation-name: scanSmall; animation-duration: 1.4s; }
@keyframes scanSmall { to { transform: translateY(90px); } }

/* -------------------------------------------------------------------------- profile */
.split-profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.understanding h2 { margin-bottom: 4px; }
.dna-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tracks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.track { display: flex; flex-direction: column; gap: 9px; padding: 13px 15px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); font-size: .88rem; font-weight: 500; animation: rise .5s var(--ease) both; }
.track:nth-child(2) { animation-delay: .06s; } .track:nth-child(3) { animation-delay: .12s; }
.meter-fill.tone-ink, .track .meter-fill { background: var(--ink); }
.track-pct { font-family: var(--mono); font-size: .72rem; color: var(--text-3); }
.understanding .sec-title { margin-top: 18px; }
.understanding .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.editor-head { padding: 18px 22px 14px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); flex: none; }
.editor-head h2 { margin: 0; }
.editor-body { padding: 2px 22px 22px; animation: fadeUp .35s var(--ease); }
.list-item { padding: 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); }
.list-item .form-grid { margin-bottom: 0; }
.editor-body > .stack { margin-top: 16px; }
.reading-overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px;
  background: color-mix(in srgb, var(--card-solid) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: inherit; animation: fade .35s; }
.reading-overlay strong { margin-top: 14px; font-weight: 500; }

/* -------------------------------------------------------------------------- documents */
.split-docs { grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); }
.doc-library { display: flex; flex-direction: column; gap: 16px; padding: 16px 12px; }
.doc-group .sec-title { padding: 0 8px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-decoration: none; color: var(--text); border: 1px solid transparent;
  transition: background .2s, border-color .2s, box-shadow .25s; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.doc-row:hover { background: var(--card-hi); }
.doc-row.is-selected { background: var(--card-solid); border-color: var(--line); box-shadow: var(--shadow); }
.doc-row strong { display: block; font-weight: 500; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row .grow > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-mini { width: 32px; height: 40px; flex: none; border-radius: 6px; background: #fff; border: 1px solid rgba(17,17,17,.08); padding: 6px 5px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm); transition: transform .35s var(--spring); }
.doc-row:hover .doc-mini, .doc-row.is-selected .doc-mini { transform: rotate(-5deg); }
.doc-mini i { display: block; height: 2px; border-radius: 2px; background: #e4e3ea; } .doc-mini i:first-child { width: 70%; background: #18181b; } .doc-mini i:nth-child(2) { width: 50%; background: #f2b79c; }
.doc-kind { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.doc-top h2 { margin: 4px 0 4px; font-size: 1.35rem; }
.paper-stage { background: color-mix(in srgb, var(--line) 50%, transparent); }
.paper { max-width: 760px; margin: 0 auto; background: #fff; color: #1f2937; border-radius: 14px; padding: 48px 52px; box-shadow: var(--shadow-lg); border: 1px solid rgba(17,17,17,.06);
  font-size: .87rem; line-height: 1.55; animation: rise .6s var(--ease) both; }
.paper h2 { font-size: 1.7rem; margin: 0; color: #111; letter-spacing: -.04em; } .paper-sub { color: #52525b; }
.paper-contact { color: #71717a; font-size: .8rem; margin-top: 4px; } .paper a { color: #111; }
.paper h3 { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; border-bottom: 1px solid #e4e4e7; color: #71717a; margin: 20px 0 8px; padding-bottom: 5px; font-weight: 600; }
.paper ul { margin: 4px 0 8px; padding-left: 18px; } .paper .muted { color: #71717a; } .paper-item { margin-bottom: 8px; }
.provenance { max-width: 760px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.rewrites { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rewrites li { padding: 14px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); font-size: .84rem; display: flex; flex-direction: column; gap: 6px; animation: rise .45s var(--ease) both; }
.diff-old { color: var(--text-3); text-decoration: line-through; } .rewrites li.rejected .diff-new { text-decoration: line-through; color: var(--danger); }

/* -------------------------------------------------------------------------- tracker */
.s-all { --sc: var(--ink); } .s-saved { --sc: var(--accent); }
.s-preparing { --sc: var(--warning); } .s-applied { --sc: var(--info); } .s-interviewing { --sc: #8b7ad8; }
.s-offer { --sc: var(--success); } .s-rejected { --sc: var(--danger); } .s-closed, .s-archived, .s-new { --sc: var(--unknown); }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 16%, transparent); }

/* stage bar: the whole journey in one row, fits the width — no sideways scrolling */
.stagebar { flex: none; display: flex; align-items: stretch; gap: 4px; padding: 6px; border-radius: 22px; }
.stage-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px 12px; border: 1px solid transparent; border-radius: 16px;
  background: transparent; font: inherit; color: var(--text-2); cursor: pointer; text-align: left; transition: background .25s, box-shadow .3s, border-color .25s, transform .25s var(--spring);
  animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.stage-tab:hover { background: var(--card-hi); }
.stage-tab:active { transform: scale(.98); }
.stage-tab.on { background: var(--card-solid); border-color: var(--line); box-shadow: var(--shadow-sm), 0 8px 20px -12px rgba(40,30,80,.3); color: var(--ink); }
.st-n { font-size: 1.55rem; line-height: 1.05; letter-spacing: -.055em; color: var(--ink); font-feature-settings: "tnum"; }
.stage-tab.on .st-n { color: var(--sc); }
.s-all.on .st-n { color: var(--ink); }
.st-l { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.st-l .st-dot { width: 6px; height: 6px; box-shadow: none; }
.st-bar { display: block; width: 100%; height: 3px; margin-top: 7px; border-radius: 3px; background: var(--line); overflow: hidden; }
.st-bar span { display: block; height: 100%; border-radius: 3px; background: var(--sc); transition: width 1s var(--ease); }
.st-arrow { display: grid; place-items: center; color: var(--text-3); opacity: .6; flex: none; }

.split-tracker { grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); }
.tk-tools { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); flex: none; }
.tk-tools .search-field { height: 40px; }
.tk-list { padding: 6px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tk-group { display: flex; flex-direction: column; gap: 8px; }
.tk-group + .tk-group { margin-top: 10px; }
.tk-group-head { position: sticky; top: -6px; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 12px 4px 8px; font-size: .84rem; font-weight: 600; color: var(--ink);
  margin: 0 -14px; padding-left: 18px; padding-right: 18px; border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--card-solid) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tk-group-head .board-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font-family: var(--mono); font-size: .68rem; font-weight: 500;
  color: var(--text-2); background: var(--card-solid); border: 1px solid var(--line); }
.tk-tip { margin-left: auto; font-size: .7rem; font-weight: 400; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.job-card.track-row { padding: 0; border-radius: 18px; }
.track-row.is-moving { animation: pulseCard 1s ease-in-out infinite; }
@keyframes pulseCard { 50% { opacity: .55; } }
.tr-main { flex-direction: row; align-items: center; gap: 12px; padding: 12px 12px 8px; }
.tr-main .monogram { border-radius: 11px; font-size: .84rem; }
.track-title { display: block; font-weight: 500; font-size: .93rem; line-height: 1.3; letter-spacing: -.015em; margin-top: 1px; }
.tr-sub { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: .72rem; color: var(--text-3); min-width: 0; }
.tr-sub > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-doc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--text-3); white-space: nowrap; flex: none; }
.tc-doc.on { color: var(--success); background: color-mix(in srgb, var(--success) 11%, transparent); }
.tr-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 12px 62px; }
.advance { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 0; font: inherit; font-size: .76rem; font-weight: 500; cursor: pointer;
  color: var(--text-2); background: transparent; transition: background .2s, color .2s, gap .25s var(--spring); }
.advance:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); gap: 9px; }
.advance:disabled { opacity: .4; cursor: progress; }

.tk-overview { padding: 28px 30px; display: flex; flex-direction: column; gap: 22px; animation: fade .4s; }
.tk-hero h2 { font-size: 1.7rem; letter-spacing: -.045em; margin-bottom: 4px; }
.tk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tk-stats > div { padding: 14px 4px 12px 18px; border-left: 1px solid var(--line); } .tk-stats > div:first-child { border-left: 0; padding-left: 0; }
.tk-stats .n { display: block; font-size: 2.2rem; letter-spacing: -.06em; line-height: 1.05; color: var(--ink); font-feature-settings: "tnum"; }
.tk-stats .l { font-size: .74rem; color: var(--text-2); }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 28px; align-items: center; gap: 12px; animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.fn-label { font-size: .82rem; color: var(--text-2); font-weight: 500; }
.fn-track { height: 26px; border-radius: 9px; background: var(--line); overflow: hidden; }
.fn-fill { display: block; height: 100%; min-width: 4px; border-radius: 9px; background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 55%, var(--card-solid)), var(--sc)); transition: width 1.1s var(--ease); }
.fn-n { font-family: var(--mono); font-size: .8rem; color: var(--ink); text-align: right; }
.tk-todo { display: flex; flex-direction: column; gap: 8px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  font-size: .85rem; transition: transform .25s var(--spring), border-color .2s; animation: rise .45s var(--ease) both; animation-delay: calc(.2s + var(--i) * 50ms); }
.todo:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.todo strong { font-weight: 600; }
.todo-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); flex: none; }

/* -------------------------------------------------------------------------- browser agent / interventions / settings */
.split-browser { grid-template-columns: minmax(0, 1fr) 380px; }
.browser-window { position: relative; background: var(--card-solid); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow-lg); transition: box-shadow .35s; }
.browser-window.takeover { box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px var(--accent-soft), var(--shadow-lg); }
.bw-chrome { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--card-solid)); flex: none; }
.bw-lights { display: flex; gap: 7px; } .bw-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .bw-lights i:nth-child(2) { background: #febc2e; } .bw-lights i:nth-child(3) { background: #28c840; }
.bw-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); font-size: .78rem; color: var(--text-2); }
.bw-url .icon { color: var(--success); }
.bw-host { font-family: var(--mono); color: var(--text); white-space: nowrap; }
.bw-title { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bw-title::before { content: "— "; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: livePulse 1.4s infinite; }
.live-pill.off { color: var(--text-3); background: var(--line); } .live-pill.off i { animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.bw-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 60%), var(--card-solid); }
.bw-stage canvas { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .5s; }
.bw-stage canvas.on { opacity: 1; }
.bw-stage canvas:focus { outline: none; }
.control-banner { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px;
  background: var(--ink); color: var(--on-ink); font-size: .8rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn .5s var(--spring) both; white-space: nowrap; }
.bw-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px; animation: fade .5s; }
.bw-idle h2 { font-size: 1.6rem; letter-spacing: -.04em; margin-top: 18px; }
.bw-idle p { max-width: 400px; }
.bw-illus { position: relative; }
.bw-cursor { position: absolute; right: 6px; bottom: 18px; animation: cursorMove 5s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
@keyframes cursorMove { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-46px, -30px); } 36% { transform: translate(-46px, -30px) scale(.85); } 42% { transform: translate(-46px, -30px); } 70% { transform: translate(-12px, -70px); } }
.bw-how { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bw-how li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 99px; background: var(--card-hi); border: 1px solid var(--line); font-size: .8rem; color: var(--text-2);
  animation: rise .5s var(--ease) both; }
.bw-how li:nth-child(2) { animation-delay: .08s; } .bw-how li:nth-child(3) { animation-delay: .16s; }
.bw-how span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: .7rem; font-weight: 600; }
.agent-panel { display: flex; flex-direction: column; }
.ap-head { padding: 20px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); flex: none; }
.ap-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; font-size: .78rem; font-weight: 600; --t: var(--unknown);
  color: var(--t); background: color-mix(in srgb, var(--t) 11%, transparent); }
.ap-status.st-work { --t: var(--accent); } .ap-status.st-help { --t: var(--warning); } .ap-status.st-done { --t: var(--success); }
.ap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.ap-status.st-work .ap-dot, .ap-status.st-help .ap-dot { animation: pulse 1.5s infinite; box-shadow: 0 0 0 0 var(--t); }
.ap-job { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); animation: fadeUp .4s var(--ease); }
.ap-job strong { font-weight: 500; font-size: .92rem; display: block; }
.ap-now { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--text); padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); animation: blurIn .4s var(--ease); }
.ap-now .spinner, .ap-now .icon { margin-top: 3px; color: var(--accent); }
.ap-controls { display: flex; gap: 8px; flex-wrap: wrap; } .ap-controls .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
.ap-alert { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; font-size: .82rem; font-weight: 500; text-decoration: none; color: var(--warning);
  background: color-mix(in srgb, var(--warning) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent); animation: pop .4s var(--spring); }
.ap-alert .icon:last-child { margin-left: auto; }
.ap-log-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 0; flex: none; }
.ap-log { padding: 10px 20px 20px; }
.ap-empty { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line-strong); font-size: .8rem; color: var(--text-3); }
/* auto-apply: status, phases, kit, step log */
.agent-panel { overflow: hidden; }
.ap-head { gap: 12px; overflow-y: auto; max-height: 62%; }
.ap-status.tone-accent { --t: var(--accent); } .ap-status.tone-info { --t: var(--info); } .ap-status.tone-success { --t: var(--success); }
.ap-status.tone-warning { --t: var(--warning); } .ap-status.tone-danger { --t: var(--danger); } .ap-status.tone-neutral { --t: var(--unknown); }
.ap-status.is-working .ap-dot { animation: pulse 1.5s infinite; box-shadow: 0 0 0 0 var(--t); }
.ap-head .notice { font-size: .8rem; padding: 10px 12px; animation: fadeUp .35s var(--ease); }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); flex: none; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--line); color: var(--text); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.phases::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 11px; height: 2px; background: var(--line-strong); }
.ph { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ph-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 600;
  background: var(--card-solid); border: 2px solid var(--line-strong); color: var(--text-3); transition: all .35s var(--ease); }
.ph-label { font-size: .7rem; color: var(--text-3); line-height: 1.2; }
.ph-done .ph-dot { background: var(--success); border-color: var(--success); color: #fff; }
.ph-now .ph-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); animation: pulse 1.6s infinite; }
.ph-now .ph-label, .ph-done .ph-label { color: var(--text); font-weight: 500; }
.ph-halt .ph-dot { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, var(--card-solid)); color: var(--warning); }
.ph-halt .ph-label { color: var(--warning); font-weight: 500; }
.ap-sec { padding: 14px 20px 4px; flex: none; display: flex; flex-direction: column; gap: 8px; }
.kit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kit-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--line); animation: fadeUp .35s var(--ease) both; }
.kit-row:nth-child(2) { animation-delay: .05s; } .kit-row:nth-child(3) { animation-delay: .1s; }
.kit-row .grow { display: flex; flex-direction: column; min-width: 0; } .kit-row strong { font-size: .84rem; font-weight: 600; }
.kit-row .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kit-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--accent); background: var(--accent-soft); }
.k-found .kit-ic, .k-made .kit-ic { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.k-skipped .kit-ic { color: var(--text-3); background: var(--line); } .k-failed .kit-ic { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.k-generating { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.kit-pages { font-size: .68rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); white-space: nowrap; }
.kit-pages.one { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.kit-compact { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 99px; font-size: .76rem; font-weight: 500; text-decoration: none;
  color: var(--text); background: var(--card-solid); border: 1px solid var(--line); animation: pop .35s var(--spring) both; transition: border-color .2s; }
.kit-chip:hover { border-color: var(--line-strong); }
.kit-chip.ok .icon { color: var(--success); } .kit-chip.off { color: var(--text-3); } .kit-chip.off .icon { color: var(--text-3); }
.kit-chip em { font-style: normal; font-size: .66rem; font-weight: 600; color: var(--success); padding-left: 2px; }
.kit-chip.long em { color: var(--warning); }
.kit-open { color: var(--text-3); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.kit-open:hover { color: var(--text); background: var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.steps::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 1.5px; background: var(--line-strong); }
.step { position: relative; display: flex; gap: 12px; padding: 8px 0; animation: fadeUp .35s var(--ease) both; }
.step-n { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .68rem; font-weight: 600;
  background: var(--card-solid); border: 1.5px solid var(--line-strong); color: var(--text-3); }
.s-done .step-n { background: color-mix(in srgb, var(--success) 14%, var(--card-solid)); border-color: color-mix(in srgb, var(--success) 45%, transparent); color: var(--success); }
.s-failed .step-n { background: color-mix(in srgb, var(--danger) 12%, var(--card-solid)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.s-stopped .step-n { border-color: var(--warning); color: var(--warning); }
.step.is-now .step-n { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.step-goal { font-size: .84rem; line-height: 1.4; color: var(--text); }
.step.is-now .step-goal { font-weight: 500; }
.step-rep { margin-left: 6px; font-size: .68rem; font-weight: 600; padding: 1px 6px; border-radius: 99px; color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); vertical-align: 1px; }
.step-acts { display: flex; flex-wrap: wrap; gap: 5px; }
.act { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px 3px 7px; border-radius: 8px; font-size: .72rem; color: var(--text-2);
  background: var(--card-solid); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act .icon { color: var(--accent); flex: none; }
.step-note { font-size: .74rem; color: var(--danger); line-height: 1.35; }
.watch-banner { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: .72rem; font-weight: 500;
  background: color-mix(in srgb, var(--ink) 78%, transparent); color: var(--on-ink); backdrop-filter: blur(6px); animation: fade .4s; pointer-events: none; }
.live-pill.you { color: var(--accent); background: var(--accent-soft); }
.bw-stage canvas.interactive { cursor: crosshair; }
.browser-window.is-live .bw-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent); animation: fade .6s; }
.timeline-v { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline-v::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line-strong); }
.timeline-v li { position: relative; display: flex; gap: 14px; padding: 7px 0; animation: fadeUp .4s var(--ease) both; font-size: .83rem; }
.tv-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; background: var(--card-solid); border: 2px solid var(--line-strong); flex: none; }
.timeline-v li.now .tv-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.5s infinite; }
.tv-body { min-width: 0; overflow-wrap: anywhere; } .tv-body .small { font-size: .72rem; color: var(--text-3); }
.view-interventions > .pane { flex: 1; }
.iv-row { padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); animation: rise .45s var(--ease) both; }
.split-settings { grid-template-columns: 220px minmax(0, 1fr); }
.card.set-nav { padding: 10px; gap: 2px; }
.set-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 0; background: transparent; font: inherit; font-size: .87rem; font-weight: 500; color: var(--text-2);
  cursor: pointer; text-align: left; transition: background .25s, color .2s, box-shadow .25s; }
.set-link:hover { color: var(--text); background: var(--card-hi); }
.set-link.active { color: var(--ink); background: var(--card-solid); box-shadow: var(--shadow-sm), 0 6px 18px -10px rgba(40,30,80,.25); }
.set-link.active .icon { color: var(--accent); }
.set-overview { margin-top: auto; padding: 12px 6px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ov-item { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--text-2); padding: 2px 6px; }
.ov-item strong { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.ov-item.warn .ov-dot { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent); }
.set-toggles { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--line); }
.set-toggle > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .set-toggle strong { font-size: .88rem; font-weight: 600; }
.set-toggle .switch { padding: 0; margin: 0; }
.set-body { animation: fadeUp .35s var(--ease); }
.set-section h2 { margin-bottom: 8px; }
.set-section .switch { margin-top: 6px; }

/* -------------------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar-card { padding: 16px 8px 10px; }
  .brand-name, .nav a span.lbl, .nav-label, .me-text, .nav-step { display: none; }
  .brand { justify-content: center; padding: 0 0 14px; }
  .nav a { justify-content: center; padding: 11px; }
  .nav .dot, .nav-count { position: absolute; margin: 0; top: 6px; right: 6px; }
  .sidebar-foot { flex-direction: column; padding-top: 10px; }
  .me { flex: none; padding: 2px; }
  .split-profile, .split-docs { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .components, .constraints { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .shell { display: block; height: auto; overflow: visible; padding: 12px 12px 96px; }
  .sidebar { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45; }
  .sidebar-card { flex-direction: row; padding: 6px; border-radius: 22px; align-items: center; background: color-mix(in srgb, var(--card-solid) 97%, transparent); box-shadow: var(--shadow-lg); }
  .brand, .sidebar-foot, .nav-group-label { display: none; }
  .nav-groups { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav { flex-direction: row; gap: 0; }
  .nav-group { display: contents; }
  .nav a { padding: 11px; }
  .view, .split, .pane, .detail, .editor { height: auto; min-height: 0; overflow: visible; }
  .split, .split-profile, .split-docs, .split-browser, .split-settings { grid-template-columns: 1fr; }
  .scroll { overflow: visible; flex: none; }
  .view-discover .split:not(.has-detail) .detail-pane, .view-discover .split.has-detail .list-pane, .split-tracker:not(.has-detail) .detail-pane, .split-tracker.has-detail .list-pane { display: none; }
  .mission { height: auto; }
  .bw-stage { min-height: 420px; } .stagebar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 4px; } .stage-tab { padding: 8px 8px 9px; border-radius: 12px; }
  .st-n { font-size: 1.15rem; } .st-l { font-size: .68rem; } .st-bar, .st-arrow, .tk-tip { display: none; } .tr-actions { padding-left: 12px; }
  .form-grid, .two-col { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; align-items: flex-start; padding-right: 0; }
  .detail-tools { position: static; justify-content: flex-start; }
  .mission-hero { flex-direction: column; text-align: center; }
  .mission-stats { grid-template-columns: 1fr 1fr; } .mission-stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .timeline .tl-label { display: none; }
  .paper { padding: 26px 20px; }
  .drawer { inset: 0; width: 100%; border-radius: 0; }
  .toasts { top: 14px; left: 14px; right: 14px; }
  .activity-line { display: none; }
  .onboarding { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .ob-side { gap: 18px; padding: 8px; }
  .stepper { flex-direction: row; margin: 0; gap: 8px; } .stepper::before, .stepper-fill, .stepper-text span { display: none; }
  .stepper-text strong { font-size: .72rem; } .stepper li { flex-direction: column; gap: 6px; flex: 1; text-align: center; }
  .ob-card { max-height: none; }
  .ob-stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* -------------------------------------------------------------------------- live search progress */
.k-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--unknown); display: inline-block; }
.k-good, .k-done { --k: var(--success); } .k-reject { --k: var(--danger); } .k-warn { --k: var(--warning); } .k-info { --k: var(--info); } .k-work { --k: var(--accent); }
.k-dot.k-good, .k-dot.k-done, .k-dot.k-reject, .k-dot.k-warn, .k-dot.k-info, .k-dot.k-work { background: var(--k); }
.run-strip-now { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: .76rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: blurIn .45s var(--ease); }
.run-strip-now span:last-child { overflow: hidden; text-overflow: ellipsis; }
.elapsed { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: 0; }

.mission.live { justify-content: flex-start; overflow: hidden; padding: 22px 26px 18px; gap: 16px; }
.mc-top { display: flex; flex-direction: column; gap: 16px; flex: none; }
.mc-hero { display: flex; align-items: center; gap: 18px; }
.mc-hero h2 { font-size: 1.6rem; letter-spacing: -.045em; margin: 2px 0 2px; }
.mc-hero p { margin: 0; }
.mc-pct { display: flex; align-items: baseline; color: var(--ink); }
.mc-pct .n { font-size: 3.2rem; font-weight: 400; letter-spacing: -.07em; line-height: 1; font-feature-settings: "tnum"; }
.mc-pct .u { font-size: 1.2rem; color: var(--text-3); margin-left: 2px; }
.mc-bar { position: relative; height: 8px; border-radius: 8px; background: var(--line); overflow: visible; }
.mc-fill { position: relative; height: 100%; border-radius: 8px; background: var(--ink); transition: width 1s var(--ease); overflow: hidden; }
.mc-bar.is-active .mc-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 75%, #fff), var(--accent)); }
.mc-bar.is-active .mc-fill::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 8px, transparent 8px 16px);
  background-size: 22px 22px; animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 22px 0; } }
.mc-tick { position: absolute; top: 50%; width: 2px; height: 14px; margin: -7px 0 0 -1px; border-radius: 2px; background: var(--card-solid); opacity: .9; }
.mc-tick:last-child { display: none; }
.agent-rail { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-chip { --c: hsl(var(--h) 70% 52%); display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 99px; font-size: .75rem; font-weight: 500;
  background: var(--card-solid); border: 1px solid var(--line); color: var(--text-3); transition: all .35s var(--ease); animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.agent-ava { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--text-3); transition: all .35s var(--ease); }
.agent-chip.a-running { color: var(--ink); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.agent-chip.a-running .agent-ava { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.agent-chip.a-talk { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent); transform: translateY(-1px); }
.agent-chip.a-talk .agent-ava { background: var(--c); color: #fff; animation: breathe 1.6s ease-in-out infinite; }
.agent-chip.a-done { color: var(--text-2); } .agent-chip.a-done .agent-ava { background: var(--ink); color: var(--on-ink); }
.agent-chip.a-failed .agent-ava { background: var(--danger); color: #fff; } .agent-chip.a-skipped { opacity: .5; }
.typing { display: inline-flex; gap: 3px; margin-left: 1px; } .typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--c); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.mc-stats { display: flex; align-items: center; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.mc-stats > div { flex: 1; padding: 0 14px; border-left: 1px solid var(--line); } .mc-stats > div:first-child { border-left: 0; padding-left: 0; }
.mc-stats .n { display: block; font-size: 1.6rem; letter-spacing: -.055em; line-height: 1.05; color: var(--ink); font-feature-settings: "tnum"; }
.mc-stats .hl .n { color: var(--accent); } .mc-stats .l { font-size: .72rem; color: var(--text-2); }

.feed { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex: none; flex-wrap: wrap; }
.feed-title { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: livePulse 1.4s infinite; }
.feed-list { list-style: none; margin: 0; padding: 2px 4px 8px 0; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin;
  mask-image: linear-gradient(#000 85%, transparent); -webkit-mask-image: linear-gradient(#000 85%, transparent); }
.feed-item { animation: feedIn .55s var(--spring) both; }
.feed-item > button { all: unset; display: block; width: 100%; box-sizing: border-box; cursor: pointer; }
.feed-item, .feed-item > button { display: flex; align-items: center; gap: 12px; }
.feed-item { padding: 10px 12px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, transform .25s var(--spring); }
.feed-item.is-link { padding: 0; } .feed-item.is-link > button { padding: 10px 12px; border-radius: 16px; }
.feed-item.is-link:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateX(3px); }
.feed-item.k-reject { background: color-mix(in srgb, var(--danger) 3%, var(--card-solid)); }
.feed-item.k-done { border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 6%, var(--card-solid)); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-12px) scale(.98); filter: blur(4px); } }
.feed-ava { --c: hsl(var(--h) 70% 52%); width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.feed-body { flex: 1; min-width: 0; }
.feed-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .72rem; color: var(--text-3); }
.feed-meta strong { font-weight: 600; color: var(--text-2); }
.feed-time { font-family: var(--mono); font-size: .68rem; }
.feed-msg { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--text); line-height: 1.45; margin-top: 1px; }
.feed-msg .k-dot, .feed-msg .spinner { margin-top: 6px; } .feed-msg .spinner { color: var(--accent); margin-top: 3px; }
.feed-empty { padding: 18px; text-align: center; font-size: .82rem; color: var(--text-3); border: 1.5px dashed var(--line-strong); border-radius: 16px; }
.mission.live .plan-box { flex: none; }
@media (max-width: 900px) { .mission.live { overflow: visible; } .feed-list { max-height: 60vh; } .mc-pct .n { font-size: 2.4rem; } .mc-stats { flex-wrap: wrap; row-gap: 10px; } }


/* -------------------------------------------------------------------------- motion preference
   html[data-motion] = full | reduced | system. "system" follows the OS (Windows "Animation effects",
   macOS "Reduce motion") — Firefox applies that OS setting, which is why animations could look static.
   Reduced keeps loading indicators alive so progress is still visible. */
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) {
  :root[data-motion="system"] *, :root[data-motion="system"] *::before, :root[data-motion="system"] *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  :root[data-motion="system"] ::view-transition-group(*), :root[data-motion="system"] ::view-transition-old(*), :root[data-motion="system"] ::view-transition-new(*) { animation: none !important; }
}
:root[data-motion="reduced"] .spinner, :root[data-motion="reduced"] .splash-line span { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
@media (prefers-reduced-motion: reduce) {
  :root[data-motion="system"] .spinner, :root[data-motion="system"] .splash-line span { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
}

/* -------------------------------------------------------------------------- profile picker */
.picker { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; }
.picker-inner { width: min(980px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; animation: blurIn .6s var(--ease) both; }
.picker-inner .brand { padding: 0 0 18px; }
.picker h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: 0; }
.picker .lead { color: var(--text-2); font-size: 1.02rem; margin-bottom: 18px; }
.person-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 236px)); justify-content: center; gap: 14px; }
.person-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px 20px; border-radius: 24px; cursor: pointer;
  background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--edge); box-shadow: var(--shadow);
  font: inherit; color: var(--text); text-align: center; transition: transform .35s var(--spring), box-shadow .3s, border-color .3s;
  animation: rise .55s var(--ease) both; animation-delay: calc(.1s + var(--i) * 60ms); }
.person-card:hover:not(:disabled) { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--edge)); }
.person-card:active:not(:disabled) { transform: scale(.98); }
.person-card:disabled { cursor: progress; }
.person-card.is-last { border-color: color-mix(in srgb, var(--accent) 45%, var(--edge)); }
.person-ava { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; font-size: 1.5rem; font-weight: 600; color: #1b1b1f; margin-bottom: 8px;
  background: linear-gradient(135deg, hsl(var(--h, 20) 85% 88%), hsl(calc(var(--h, 20) + 50) 70% 86%)); box-shadow: 0 14px 30px -16px rgba(40,30,80,.5); transition: transform .4s var(--spring); }
.person-card:hover .person-ava { transform: rotate(-6deg) scale(1.05); }
.person-ava.add { background: var(--card-solid); border: 1.5px dashed var(--line-strong); color: var(--text-2); box-shadow: none; }
.person-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.person-sub { font-size: .8rem; color: var(--text-2); }
.person-meta { font-size: .72rem; color: var(--text-3); }
.person-flag { position: absolute; top: 12px; right: 12px; font-size: .64rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 3px 8px; border-radius: 99px; }
.person-slot { position: relative; display: grid; }
.person-del { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--edge); background: var(--card-solid); color: var(--text-3); cursor: pointer; opacity: 0; transform: scale(.9);
  transition: opacity .2s, transform .2s var(--spring), color .2s, border-color .2s; }
.person-slot:hover .person-del, .person-del:focus-visible { opacity: 1; transform: none; }
.person-del:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--edge)); }
@media (hover: none) { .person-del { opacity: .85; transform: none; } }
.ob-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-profiles { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font: inherit; font-size: .82rem; font-weight: 500;
  color: var(--text-2); background: var(--card-solid); border: 1px solid var(--edge); cursor: pointer; transition: color .2s, border-color .2s; }
.ob-profiles:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--edge)); }
.ob-profiles-n { font-size: .7rem; padding: 0 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.picker-hint { margin-top: 14px; } kbd { font-family: var(--mono); font-size: .75em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--card-solid); }

/* sidebar switcher */
.switcher { flex: 1; min-width: 0; }
.switcher .me { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.me-chev { margin-left: auto; color: var(--text-3); flex: none; }
/* the popover spans the whole sidebar footer so it never spills past the sidebar under the main panel */
.sidebar-foot { position: relative; }
.switcher.pop-anchor { position: static; }
.switcher .popover { top: auto; bottom: calc(100% + 10px); left: 0; right: 0; min-width: 0; padding: 10px; transform-origin: bottom left; }
.switch-item { min-width: 0; }
.switch-item .grow { flex: 1; }
.switch-item .grow .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-list { display: flex; flex-direction: column; gap: 2px; }
.switch-list .sec-title { padding: 4px 8px 6px; margin: 0; }
.switch-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 0; background: transparent; font: inherit; color: var(--text); cursor: pointer; text-align: left;
  transition: background .2s; }
.switch-item:hover { background: var(--card-hi); }
.switch-item.on { background: var(--accent-soft); }
.switch-item .grow { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.switch-item strong { font-size: .86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-item .icon { color: var(--accent); }
.avatar.sm { width: 28px; height: 28px; font-size: .66rem; }
.avatar.add { background: var(--card-solid); color: var(--text-2); border: 1.5px dashed var(--line-strong); }
.switch-manage { padding: 8px; font-size: .78rem; color: var(--text-2); text-decoration: none; border-top: 1px solid var(--line); margin-top: 4px; }
.switch-manage:hover { color: var(--text); }
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); }

/* -------------------------------------------------------------------------- chips, suggestions, auto-grow */
.chips-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.chips-input { cursor: text; }
.chip-add { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; border: 1px dashed var(--accent); background: var(--accent-soft);
  color: var(--accent); font: inherit; font-size: .76rem; font-weight: 500; cursor: pointer; animation: pop .3s var(--spring); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-ghost { cursor: pointer; font: inherit; font-size: .76rem; color: var(--text-2); background: transparent; border-style: dashed; box-shadow: none; transition: all .2s; }
.chip-ghost:hover { color: var(--ink); border-color: var(--text-3); background: var(--card-solid); }
textarea.input.auto-grow { resize: none; overflow: hidden; min-height: 64px; field-sizing: content; }

/* -------------------------------------------------------------------------- experience breakdown */
.xp { display: flex; flex-direction: column; gap: 12px; }
.xp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xp-tile { display: flex; flex-direction: column; padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.xp-tile:nth-child(2) { animation-delay: .06s; } .xp-tile:nth-child(3) { animation-delay: .12s; }
.xp-tile .n { font-size: 1.7rem; letter-spacing: -.05em; line-height: 1.05; color: var(--ink); font-feature-settings: "tnum"; }
.xp-tile .n small { font-size: .5em; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.xp-tile.hl { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--card-solid)); }
.xp-tile.hl .n { color: var(--accent); }
.xp-tile .l { font-size: .8rem; font-weight: 500; color: var(--text); margin-top: 2px; }
.xp-tile .h { font-size: .7rem; color: var(--text-3); }
.xp-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.xp-rows li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--card-hi); border: 1px solid var(--line); flex-wrap: wrap;
  animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.xp-rows .grow { display: flex; flex-direction: column; line-height: 1.3; }
.xp-rows strong { font-weight: 500; font-size: .87rem; }
.xp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.xp-dot.k-internship { background: var(--info); } .xp-dot.k-excluded { background: var(--unknown); } .xp-dot.k-undated { background: var(--warning); }
.xp-len { font-family: var(--mono); font-size: .74rem; color: var(--text-2); white-space: nowrap; }
.xp-note { margin: 0; }

/* onboarding extras */
.ob-level { display: flex; flex-wrap: wrap; gap: 6px; }
.up-stages { list-style: none; margin: 14px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.up-stages li { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-3); transition: color .3s; }
.up-stages li.now { color: var(--ink); font-weight: 500; } .up-stages li.done { color: var(--text-2); }
.up-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); flex: none; color: var(--accent); }
.up-stages li.done .up-dot { background: var(--ink); border-color: var(--ink); color: var(--on-ink); animation: pop .4s var(--spring); }
.up-stages li.now .up-dot { border-color: var(--accent); }
.option-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.opt-card { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s var(--spring); }
.opt-card:hover { transform: translateY(-1px); }
.opt-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-card.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--card-solid)); }
.opt-card input:checked + .switch-ui { background: var(--ink); } .opt-card input:checked + .switch-ui::after { transform: translateX(15px); background: var(--on-ink); }
.opt-card input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt-card > span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.opt-card strong { font-size: .84rem; font-weight: 500; } .opt-card small { font-size: .72rem; color: var(--text-3); }

/* -------------------------------------------------------------------------- settings: providers, keys, health */
.sub-title { font-size: .95rem; margin: 26px 0 4px; }
.prov-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.prov-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: opacity .3s, border-color .3s; animation: fadeUp .4s var(--ease) both; }
.prov-card.off { opacity: .6; }
.prov-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prov-head .switch { padding: 0; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--text-3); }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--unknown); }
.status-dot.good { color: var(--success); } .status-dot.good::before { background: var(--success); }
.status-dot.bad { color: var(--danger); } .status-dot.bad::before { background: var(--danger); }
.order-n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-size: .74rem; background: var(--line); color: var(--text-2); flex: none; }
.order-btns { display: flex; } .order-btns .icon-btn { width: 30px; height: 30px; } .order-btns .icon-btn:first-child .icon { transform: rotate(90deg); } .order-btns .icon-btn:last-child .icon { transform: rotate(90deg); }
.key-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-row.editing .input { flex: 1; min-width: 200px; }
.key-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-family: var(--mono); font-size: .74rem; background: var(--line); color: var(--text-3); }
.key-pill.on { background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--success); }
.health { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.health-badge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; font-weight: 600; font-size: .9rem; --t: var(--success);
  background: color-mix(in srgb, var(--t) 8%, var(--card-solid)); border: 1px solid color-mix(in srgb, var(--t) 22%, transparent); color: var(--t); }
.health-badge.h-warn { --t: var(--warning); } .health-badge.h-error { --t: var(--danger); }
.health-badge .muted { font-weight: 400; }
.health-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.health-list li { display: grid; grid-template-columns: 12px 160px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.health-list strong { font-weight: 500; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.health-list .h-warn .h-dot { background: var(--warning); } .health-list .h-error .h-dot { background: var(--danger); } .health-list .h-fixed .h-dot { background: var(--info); }
@media (max-width: 900px) {
  .option-cards, .xp-tiles { grid-template-columns: 1fr; }
  .health-list li { grid-template-columns: 12px minmax(0, 1fr); } .health-list li .muted { grid-column: 2; }
}

/* -------------------------------------------------------------------------- auto-apply: compact, full-height layout */
.view-browser { gap: 0; }
.split-browser { grid-template-columns: minmax(0, 1fr) 344px; gap: 14px; height: 100%; }
.view-browser .bw-chrome { padding: 8px 12px; gap: 12px; }
.view-browser .bw-url { height: 30px; }
.view-browser .bw-stage { background: color-mix(in srgb, var(--bg) 70%, var(--card-solid)); }
.view-browser .bw-stage canvas { object-position: top center; }
.view-browser .agent-panel .ap-head { padding: 16px 16px 14px; gap: 10px; max-height: none; overflow: visible; }
.ap-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ap-title { font-size: 1.25rem; letter-spacing: -.03em; margin: 0; white-space: nowrap; }
.ap-top .ap-status { align-self: center; padding: 4px 10px; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.view-browser .ap-job { padding: 8px 10px; gap: 10px; border-radius: 14px; }
.view-browser .ap-job strong { font-size: .88rem; }
.view-browser .ap-job .job-company { font-size: .74rem; }
.view-browser .phases { margin-top: 2px; }
.view-browser .ph-label { font-size: .66rem; }
.view-browser .ap-now { padding: 8px 10px; font-size: .8rem; }
.view-browser .ap-controls .btn { min-height: 34px; }
.view-browser .ap-sec { padding: 10px 16px 2px; gap: 6px; }
.view-browser .ap-log-head { padding: 12px 16px 0; }
.view-browser .ap-log { padding: 8px 16px 16px; flex: 1; min-height: 0; overflow-y: auto; }
.view-browser .step { padding: 6px 0; }
.ap-guide { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-guide li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--line);
  animation: fadeUp .4s var(--ease) both; }
.ap-guide li:nth-child(2) { animation-delay: .06s; } .ap-guide li:nth-child(3) { animation-delay: .12s; }
.ap-guide span { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: .7rem; font-weight: 600; }
.ap-guide div { display: flex; flex-direction: column; gap: 2px; } .ap-guide strong { font-size: .85rem; font-weight: 600; } .ap-guide small { font-size: .76rem; color: var(--text-3); line-height: 1.35; }
@media (max-width: 1100px) { .split-browser { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 900px) { .split-browser { grid-template-columns: 1fr; height: auto; } }
.view-browser .watch-banner { top: auto; bottom: 12px; }
.ap-tips { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); animation: fade .6s .2s both; }
.ap-tips > div { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: var(--text-2); line-height: 1.4; }
.ap-tips .icon { color: var(--accent); flex: none; margin-top: 2px; } .ap-tips strong { color: var(--text); font-weight: 600; }
/* live screencast container: the stream uses every pixel */
.view-browser .browser-window { overflow: hidden; }
.view-browser .bw-chrome { padding: 6px 10px; gap: 10px; }
.view-browser .bw-lights i { width: 10px; height: 10px; }
.view-browser .bw-url { height: 28px; font-size: .76rem; }
.view-browser .live-pill { padding: 3px 9px; font-size: .66rem; }
.view-browser .bw-stage { display: block; }
.view-browser .bw-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top center; image-rendering: auto; }
.view-browser .watch-banner { top: auto; bottom: 10px; right: 10px; opacity: .85; }
.view-browser .control-banner { top: auto; bottom: 14px; }
.view-browser .bw-idle { position: absolute; inset: 0; }
.paper-links a { color: #1d4ed8; font-size: .78rem; text-decoration: none; } .paper-links a:hover { text-decoration: underline; } .paper-item .row.space { gap: 12px; align-items: baseline; }
.links-editor { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 32px; gap: 8px; align-items: center; animation: fadeUp .25s var(--ease) both; }
.link-row.three { grid-template-columns: minmax(140px, 1.2fr) minmax(100px, 140px) minmax(0, 1.4fr) 32px; }
.add-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: .82rem; }
@media (max-width: 700px) { .link-row, .link-row.three { grid-template-columns: 1fr 32px; } .link-row .link-label { grid-column: 1 / -1; } }
.ob-links { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); animation: fadeUp .4s var(--ease) both; }
.ob-links .field-label { display: inline-flex; align-items: center; gap: 6px; }
.link-chip { text-decoration: none; color: var(--text); gap: 5px; transition: border-color .2s, background .2s; }
.link-chip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* reach — chance a person reads the application */
.job-reach { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding-right: 34px; }
.job-reach-why { font-size: .72rem; color: var(--text-3); min-width: 0; flex: 1 1 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reach-box, .company-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); }
.reach-box p, .company-box p { margin: 0; }
.reach-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reach-signals li { display: flex; gap: 10px; align-items: baseline; font-size: .86rem; color: var(--text-2); }
.reach-signals .pts { flex: none; width: 38px; text-align: right; font-family: var(--mono); font-size: .78rem; color: var(--text-3); }
.reach-signals li.up .pts { color: var(--success); }
.reach-signals li.down .pts { color: var(--danger); }

/* Connector: referral kit */
.connect-box { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in oklab, hsl(92 60% 50%) 9%, var(--card-solid)), var(--card-solid) 60%); border: 1px solid var(--line); }
.connect-box p { margin: 0; }
.connect-by { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-2); }
.connect-by .dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(92 55% 48%); box-shadow: 0 0 0 3px hsl(92 55% 48% / .2); }
.connect-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.connect-route { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.connect-route:hover { border-color: hsl(92 50% 45%); transform: translateY(-1px); }
.connect-route .icon { flex: none; margin-top: 2px; color: hsl(92 45% 40%); }
.connect-route span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.connect-route strong { font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.connect-route small { font-size: .76rem; color: var(--text-3); line-height: 1.35; }
.connect-route.kind-email { border-color: hsl(92 50% 45% / .6); }
.connect-drafts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.connect-draft { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.connect-draft .row { align-items: center; }
.connect-draft .row .btn { margin-left: auto; }
.connect-draft p { font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.connect-draft p.pre { white-space: pre-line; }

/* companies (watchlist) */
.view-companies { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }
.view-companies .card.pad { padding: 16px 18px; }
.company-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.company-row { padding: 0; overflow: hidden; }
.company-head { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; cursor: pointer; }
.company-head:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: inherit; }
.company-name { font-weight: 500; color: var(--ink); }
.company-body { padding: 0 18px 16px; }
@media (max-width: 640px) {
  .company-head { padding: 12px 14px; gap: 10px; }
  .company-body { padding: 0 12px 12px; }
  .job-reach-why { flex-basis: 100%; white-space: normal; }
}

/* first-run setup (API keys) — the whole form fits one screen; no inner scrolling */
.setup .ob-main { align-content: center; }
.setup-card { width: min(640px, 100%); padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.setup-card-head h2 { font-size: 1.2rem; margin: 0 0 4px; }
.setup-card-head p { margin: 0; }
.setup-rows { display: flex; flex-direction: column; gap: 10px; }
.setup-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--card-solid); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.setup-row.best { border-color: color-mix(in srgb, var(--success) 40%, var(--line)); }
.setup-row.ok { box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, transparent); }
.setup-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.setup-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.setup-name strong { font-weight: 500; color: var(--ink); }
.setup-link { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 500; color: var(--accent); text-decoration: none; white-space: nowrap; }
.setup-link:hover { text-decoration: underline; }
.setup-how { line-height: 1.4; }
.setup-input { display: flex; align-items: center; gap: 6px; }
.setup-input .input { flex: 1; min-width: 0; }
.setup-result { display: flex; align-items: center; gap: 6px; }
.setup-search { display: flex; flex-direction: column; gap: 10px; }
.setup-search .link-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.setup-search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.setup-card.more .setup-how { display: none; }   /* room for the optional keys: the form stays one screen */
.setup-mini .setup-link .lbl { display: none; }
.setup-free { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--radius-md);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.setup-free .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setup-free strong { font-weight: 500; color: var(--ink); }
.setup-free .muted { line-height: 1.35; }
.setup-mini { display: flex; flex-direction: column; gap: 6px; }
.setup-mini .row { justify-content: space-between; }
.setup-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setup-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .9rem; color: var(--text-2); }
.setup-why li { display: flex; gap: 10px; align-items: flex-start; }
.setup-why .icon { color: var(--success); flex: none; margin-top: 3px; }
@media (max-width: 640px) {
  .setup-card { padding: 16px; }
  .setup-search-grid { grid-template-columns: 1fr 1fr; }
  .setup-free { flex-direction: column; align-items: stretch; }
  .setup-foot .btn { width: 100%; justify-content: center; }
}

/* live watchlist check */
.live-check { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.live-pct { font-family: var(--mono); font-size: .85rem; color: var(--text-2); }
.live-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .8rem; color: var(--text-2); }
.live-feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-feed li:first-child { color: var(--ink); }
.live-feed .k-good { color: var(--success); } .live-feed .k-reject { color: var(--text-3); }
.company-box .facts-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* onboarding: the card grows with its content — never an inner scrollbar. On short screens the whole page
   scrolls, the action bar stays pinned at the bottom and the step list stays in view. */
.ob-card { width: min(920px, 100%); max-height: none; overflow: visible; }
.ob-body { overflow: visible; }
.ob-foot { position: sticky; bottom: 12px; z-index: 3; border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.ob-side { position: sticky; top: 24px; align-self: start; min-height: calc(100dvh - 48px); }
.ob-main { align-self: start; min-height: calc(100dvh - 48px); }
.ob-review, .ob-prefs { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ob-prefs .option-cards { grid-template-columns: 1fr; gap: 6px; }
.ob-prefs .opt-card { padding: 9px 12px; }
.ob-prefs .form-grid.tight { margin: 0; }
.ob-review .form-grid.tight { margin: 0; }
@media (max-width: 1100px) {
  .ob-review, .ob-prefs { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ob-side { position: static; min-height: 0; }
  .ob-main { min-height: 0; }
}

/* onboarding: clickable steps */
.stepper-btn { all: unset; box-sizing: border-box; display: flex; gap: 14px; align-items: center; cursor: pointer; border-radius: 12px; padding: 2px 8px 2px 0; }
.stepper-btn:hover .stepper-text strong { color: var(--accent); }
.stepper-btn:hover .stepper-dot { border-color: var(--accent); }
.stepper-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* onboarding: final check before the first search */
.ob-launch { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 0; }
.ob-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ob-sum { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--card-solid); border: 1px solid var(--line); }
.ob-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-sum-head .sec-title { margin: 0; }
.ob-sum-head .link-btn { display: inline-flex; align-items: center; gap: 5px; }
.ob-sum p { margin: 0; }
.ob-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; color: var(--text-2); }
.ob-facts li { position: relative; padding-left: 14px; line-height: 1.45; }
.ob-facts li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.ob-facts strong { color: var(--ink); font-weight: 500; }
.ob-next { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 6%, var(--card-solid)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); font-size: .88rem; }
.ob-next ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
@media (max-width: 760px) { .ob-summary { grid-template-columns: 1fr; } }

/* "latest search only" is shown openly instead of hiding behind the filter badge */
.filter-block { display: flex; flex-direction: column; gap: 6px; }
.scope-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; font-size: .78rem; color: var(--text-2); }
.scope-note span { display: inline-flex; align-items: center; gap: 6px; }

/* search plan drawer */
.plan-drawer { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; overflow-y: auto; height: 100%; }
.plan-drawer h2 { margin: 0; font-size: 1.3rem; }
.plan-drawer p { margin: 0; }

/* ------------------------------------------------------------------ activity view toggle */
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; background: var(--card-hi); border: 1px solid var(--line); }
.view-toggle button { all: unset; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 5px 11px; border-radius: 99px; font-size: .78rem; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.view-toggle button.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 500; }
.view-toggle button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ------------------------------------------------------------------ agents at work */
.aw-office { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 2px; }
.aw-floor { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.aw-desk { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 10px; border-radius: 16px;
  background: var(--card-solid); border: 1px solid var(--line); transition: border-color .4s, box-shadow .4s, transform .4s var(--spring); }
.aw-desk.is-running { border-color: hsl(var(--h) 70% 62%); box-shadow: 0 0 0 3px hsl(var(--h) 80% 60% / .14); transform: translateY(-2px); }
.aw-desk.is-done { background: color-mix(in srgb, var(--success) 4%, var(--card-solid)); }
.aw-stage { position: relative; width: 100%; height: 112px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.aw-walker { position: relative; z-index: 2; width: 50px; height: 70px; margin-bottom: 9px; }
.aw-person { width: 100%; height: 100%; overflow: visible; }
.aw-person .aw-body { fill: hsl(var(--h) 62% 56%); }
.aw-person .aw-arm rect, .aw-person .aw-leg rect { fill: hsl(var(--h) 50% 42%); }
.aw-person .aw-head { fill: #efc29d; }
.aw-person .aw-hair, .aw-person .aw-eye { fill: #2a2a32; }
.aw-person .aw-shadow { fill: rgba(0, 0, 0, .13); }
.aw-person .aw-leg, .aw-person .aw-arm { transform-box: fill-box; transform-origin: 50% 8%; }
.aw-person .aw-head, .aw-person .aw-hair, .aw-person .aw-eye { transform-box: view-box; transform-origin: 30px 24px; }
.aw-table { position: absolute; z-index: 3; bottom: 4px; left: 50%; transform: translateX(-50%); width: 68%; height: 12px; border-radius: 6px;
  background: color-mix(in srgb, hsl(var(--h) 40% 60%) 28%, var(--card-hi)); border: 1px solid var(--line); }
.aw-prop { position: absolute; top: -20px; right: 4px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--card-solid); border: 1px solid var(--line); color: hsl(var(--h) 60% 45%); }
.aw-bubble { position: absolute; z-index: 4; top: 0; left: 4px; right: 4px; padding: 4px 7px; border-radius: 9px; background: var(--card-hi); border: 1px solid var(--line);
  font-size: .66rem; line-height: 1.3; color: var(--text-2); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-running .aw-bubble { color: var(--ink); border-color: hsl(var(--h) 70% 62%); background: color-mix(in srgb, hsl(var(--h) 80% 60%) 8%, var(--card-solid)); }
.aw-zzz { position: absolute; top: 14px; right: 26%; font-size: .72rem; font-weight: 600; color: var(--text-3); }
.aw-zzz span { display: inline-block; }
.aw-check { position: absolute; z-index: 4; top: 38px; right: 20%; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--success); color: #fff; animation: pop .45s var(--spring); }
.aw-name { display: flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.aw-name strong { font-size: .78rem; font-weight: 500; color: var(--ink); }
.aw-name span { font-size: .66rem; color: var(--text-3); }
.is-running .aw-name span { color: hsl(var(--h) 65% 42%); font-weight: 500; }
.aw-metric { font-family: var(--mono); font-size: .64rem; color: var(--text-2); text-align: center; }
.is-pending .aw-person { filter: grayscale(.9); opacity: .5; }
.is-failed .aw-person .aw-body { fill: var(--danger); }
.aw-paper { position: absolute; z-index: 1; left: 2px; top: 48%; width: 12px; height: 15px; border-radius: 2px; opacity: 0; animation: awFly 2.4s ease-in infinite;
  background: linear-gradient(var(--line-strong), var(--line-strong)) 3px 4px / 6px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 3px 7px / 6px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 3px 10px / 4px 1px no-repeat, #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18), inset 0 0 0 1px hsl(var(--h) 45% 70%); }
.aw-paper.p2 { animation-delay: .8s; }
.aw-paper.p3 { animation-delay: 1.6s; }

/* what each agent does while working */
.is-running.act-walk .aw-walker { animation: awRoam 5s ease-in-out infinite; }
.is-running.act-walk .aw-leg-l, .is-running.act-think .aw-leg-l { animation: awStep .42s ease-in-out infinite alternate; }
.is-running.act-walk .aw-leg-r, .is-running.act-think .aw-leg-r { animation: awStep .42s ease-in-out infinite alternate-reverse; }
.is-running.act-walk .aw-arm-l { animation: awSwing .42s ease-in-out infinite alternate-reverse; }
.is-running.act-walk .aw-arm-r { animation: awSwing .42s ease-in-out infinite alternate; }
.is-running.act-type .aw-arm-l { animation: awType .3s ease-in-out infinite; }
.is-running.act-type .aw-arm-r { animation: awType .3s ease-in-out .15s infinite; }
.is-running.act-type .aw-walker, .is-running.act-read .aw-walker { animation: awBob 1.2s ease-in-out infinite; }
.is-running.act-read .aw-arm-r { transform: rotate(-70deg); }
.is-running.act-read .aw-head, .is-running.act-read .aw-hair, .is-running.act-read .aw-eye { animation: awNod 1.6s ease-in-out infinite; }
.is-running.act-stamp .aw-arm-r { animation: awStamp 1.1s ease-in-out infinite; }
.is-running.act-stamp .aw-prop { animation: awThump 1.1s ease-in-out infinite; }
.is-running.act-think .aw-walker { animation: awPace 4s ease-in-out infinite; }
.is-running.act-think .aw-head, .is-running.act-think .aw-hair, .is-running.act-think .aw-eye { animation: awTilt 2s ease-in-out infinite; }
.is-running.act-cheer .aw-arm-l, .is-done.act-cheer .aw-arm-l { animation: awWave .6s ease-in-out infinite alternate; }
.is-running.act-cheer .aw-arm-r, .is-done.act-cheer .aw-arm-r { animation: awWave .6s ease-in-out .3s infinite alternate; }
.is-pending .aw-zzz span:nth-child(1) { animation: awZ 2.4s ease-in-out infinite; }
.is-pending .aw-zzz span:nth-child(2) { animation: awZ 2.4s ease-in-out .5s infinite; }

@keyframes awRoam { 0% { transform: translateX(-34px) scaleX(1); } 46% { transform: translateX(34px) scaleX(1); } 50% { transform: translateX(34px) scaleX(-1); }
  96% { transform: translateX(-34px) scaleX(-1); } 100% { transform: translateX(-34px) scaleX(1); } }
@keyframes awPace { 0% { transform: translateX(-14px) scaleX(1); } 46% { transform: translateX(14px) scaleX(1); } 50% { transform: translateX(14px) scaleX(-1); }
  96% { transform: translateX(-14px) scaleX(-1); } 100% { transform: translateX(-14px) scaleX(1); } }
@keyframes awStep { from { transform: rotate(20deg); } to { transform: rotate(-20deg); } }
@keyframes awSwing { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
@keyframes awType { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(-42deg); } }
@keyframes awBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes awNod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
@keyframes awTilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes awStamp { 0%, 55% { transform: rotate(-20deg); } 70% { transform: rotate(-150deg); } 85%, 100% { transform: rotate(-20deg); } }
@keyframes awThump { 0%, 80% { transform: scale(1); } 86% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes awWave { from { transform: rotate(-150deg); } to { transform: rotate(-190deg); } }
@keyframes awZ { 0% { transform: translate(0, 4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(6px, -8px); opacity: 0; } }
@keyframes awFly { 0% { transform: translate(0, 0) rotate(-12deg); opacity: 0; } 15% { opacity: 1; } 75% { transform: translate(58px, 12px) rotate(10deg); opacity: 1; }
  100% { transform: translate(66px, 16px) rotate(12deg) scale(.6); opacity: 0; } }

:root[data-motion="reduced"] .aw-office * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { :root[data-motion="system"] .aw-office * { animation: none !important; } }
@media (max-width: 700px) { .aw-floor { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* agents at work — compact when the panel is short (e.g. 1366x768): one row, captions on top */
.aw-office { container: awoffice / size; }
.aw-caption { display: none; }
@container awoffice (max-height: 330px) {
  .aw-caption { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: .74rem; color: var(--text-2); }
  .aw-caption span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aw-caption strong { color: hsl(var(--h) 60% 42%); font-weight: 600; }
  .aw-floor { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
  .aw-desk { padding: 6px 4px 8px; border-radius: 12px; }
  .aw-stage { height: 80px; }
  .aw-walker { width: 36px; height: 50px; margin-bottom: 8px; }
  .aw-bubble, .aw-metric, .aw-name span { display: none; }
  .aw-zzz { top: 4px; }
  .aw-check { top: 12px; right: 10%; }
  .aw-name strong { font-size: .68rem; }
  .aw-prop { width: 18px; height: 18px; top: -16px; }
}
@media (max-width: 900px) { .aw-office { container-type: inline-size; height: auto; overflow: visible; } }

/* ------------------------------------------------------------------ agents at work — 3D world */
.aw3d { position: relative; flex: 1; min-height: 220px; display: flex; }
.aw3d-frame { position: relative; flex: 1; min-height: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 0%, #fdf6ee 0%, #f3ece4 55%, #ebe2d8 100%); }
:root[data-theme="dark"] .aw3d-frame { background: radial-gradient(120% 90% at 50% 0%, #22222a 0%, #19191f 60%, #131317 100%); }
.aw3d-canvas { position: absolute; inset: 0; }
.aw3d-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.aw3d-canvas canvas.grabbing { cursor: grabbing; }
.aw3d-tags { position: absolute; inset: 0; pointer-events: none; }
.aw3d-tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: opacity .3s; will-change: transform; }
.aw3d-name { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .7rem; font-weight: 500; white-space: nowrap;
  background: color-mix(in srgb, var(--card-solid) 88%, transparent); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .3); backdrop-filter: blur(6px); }
.aw3d-name .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.aw3d-tag.is-running .aw3d-name { border-color: hsl(var(--h) 70% 60%); }
.aw3d-tag.is-running .aw3d-name .dot { background: hsl(var(--h) 75% 55%); box-shadow: 0 0 0 3px hsl(var(--h) 80% 60% / .25); animation: pulse 1.4s infinite; }
.aw3d-tag.is-done .aw3d-name .dot { background: var(--success); }
.aw3d-tag.is-pending .aw3d-name { opacity: .7; }
.aw3d-say { max-width: 210px; padding: 6px 10px; border-radius: 12px; font-size: .7rem; line-height: 1.35; text-align: center;
  background: var(--card-solid); border: 1px solid var(--line); color: var(--text-2); box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; position: relative; }
.aw3d-say::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; background: inherit; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.aw3d-tag.is-running .aw3d-say { color: var(--ink); border-color: hsl(var(--h) 70% 62%); max-width: 240px; font-weight: 500; }
.aw3d-tag.is-done .aw3d-say { font-family: var(--mono); font-size: .64rem; padding: 4px 8px; }
.aw3d-zzz { font-size: .8rem; font-weight: 700; color: var(--text-3); }
.aw3d-zzz span { display: inline-block; animation: awZ 2.4s ease-in-out infinite; }
.aw3d-zzz span + span { animation-delay: .5s; }
.aw3d-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; color: var(--text-2); }
.aw3d-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.aw3d-hint { font-size: .72rem; color: var(--text-2); padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, var(--card-solid) 80%, transparent);
  backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.aw3d-hint strong { color: var(--ink); font-weight: 500; }
.aw3d-btn { all: unset; pointer-events: auto; cursor: pointer; font-size: .74rem; padding: 6px 12px; border-radius: 99px; color: var(--ink);
  background: color-mix(in srgb, var(--card-solid) 90%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px); white-space: nowrap; }
.aw3d-btn:hover { border-color: var(--line-strong); }
.aw3d-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* expanded: the same world, big and centred */
.aw3d-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(10, 10, 14, .42); backdrop-filter: blur(3px); animation: fade .25s; }
.aw3d.is-big .aw3d-frame { position: fixed; z-index: 901; inset: 4vh 4vw; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); animation: pop .35s var(--spring); }
.aw3d.is-big .aw3d-say { max-width: 280px; font-size: .78rem; }
.aw3d.is-big .aw3d-name { font-size: .78rem; }
:root[data-motion="reduced"] .aw3d * { animation: none !important; }
@media (max-width: 900px) { .aw3d { min-height: 340px; } }
/* while the 3D world is expanded, its ancestors must not trap position:fixed (blur/transform/filter create containing blocks) */
*:has(> * .aw3d.is-big), *:has(.aw3d.is-big) { transform: none !important; filter: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; contain: none !important; animation: none !important; }
/* small panel: only the agents working right now speak; results show when expanded */
.aw3d-frame { container: aw3dframe / size; }
@container aw3dframe (max-height: 520px) {
  .aw3d-tag.is-pending .aw3d-name { opacity: .55; }
  .aw3d-say { max-width: 190px !important; font-size: .66rem; }
}
/* robots speak only while something is happening; names stay small */
.aw3d-tag.talking .aw3d-say { animation: pop .3s var(--spring); }
.aw3d-tag .aw3d-say { color: var(--ink); border-color: hsl(var(--h) 70% 62%); max-width: 240px; font-weight: 500; }
.aw3d-btn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* agents office: rooms, office talk, robot card */
.aw3d-tag .aw3d-say.is-chat { font-weight: 400; font-style: italic; color: var(--text-2); border-style: dashed; border-color: hsl(var(--h) 45% 70%); }
.aw3d-tag.is-selected .aw3d-name { border-color: hsl(var(--h) 75% 55%); box-shadow: 0 0 0 3px hsl(var(--h) 80% 60% / .28), 0 4px 12px -6px rgba(0, 0, 0, .3); }
.aw3d-rooms { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.aw3d-chip { all: unset; pointer-events: auto; cursor: pointer; font-size: .72rem; padding: 5px 11px; border-radius: 99px; color: var(--text-2);
  background: color-mix(in srgb, var(--card-solid) 86%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px); white-space: nowrap; }
.aw3d-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.aw3d-chip[aria-pressed="true"] { color: var(--ink); font-weight: 500; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.aw3d-chip:focus-visible, .aw3d-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.aw3d-x { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font-size: 1.05rem; line-height: 1; color: var(--text-2); }
.aw3d-x:hover { background: var(--card-hi); color: var(--ink); }
.aw3d-log { position: absolute; top: 46px; right: 10px; bottom: 54px; width: min(300px, 46%); display: flex; flex-direction: column; border-radius: 16px;
  background: color-mix(in srgb, var(--card-solid) 94%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .45); animation: pop .3s var(--spring); z-index: 1100; }
.aw3d-log-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.aw3d-log-head > div { display: flex; flex-direction: column; gap: 1px; }
.aw3d-log-head strong { font-size: .82rem; font-weight: 600; color: var(--ink); }
.aw3d-log-list { list-style: none; margin: 0; padding: 8px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.aw3d-log-list li { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border-radius: 10px; border-left: 3px solid hsl(var(--h) 65% 58%);
  background: color-mix(in srgb, hsl(var(--h) 60% 60%) 7%, transparent); font-size: .74rem; line-height: 1.35; }
.aw3d-log-list li.is-chat { border-left-style: dashed; }
.aw3d-log-list li.is-chat .what { font-style: italic; color: var(--text-2); }
.aw3d-log-list .who { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); font-size: .72rem; }
.aw3d-log-list .who .dot { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--h) 70% 55%); }
.aw3d-log-list .when { margin-left: auto; font-weight: 400; font-size: .64rem; color: var(--text-3); font-family: var(--mono); }
.aw3d-log-list .what { color: var(--text); }
.aw3d-log-list li.aw3d-log-empty { border: 0; background: none; color: var(--text-3); font-size: .74rem; }
.aw3d-log-list li.aw3d-log-end { padding: 0; border: 0; background: none; }
.aw3d-card { position: absolute; left: 10px; bottom: 54px; width: min(320px, calc(100% - 20px)); padding: 12px 12px 12px 14px; border-radius: 16px; z-index: 1100;
  background: color-mix(in srgb, var(--card-solid) 95%, transparent); border: 1px solid hsl(var(--h) 55% 70%); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .5); animation: pop .3s var(--spring); display: flex; flex-direction: column; gap: 6px; }
.aw3d-card-head { display: flex; align-items: center; gap: 8px; }
.aw3d-card-head .dot { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--h) 70% 55%); box-shadow: 0 0 0 3px hsl(var(--h) 80% 60% / .22); }
.aw3d-card-head strong { font-size: .9rem; font-weight: 600; color: var(--ink); }
.aw3d-card-head .aw3d-x { margin-left: auto; }
.aw3d-state { font-size: .66rem; padding: 2px 8px; border-radius: 99px; background: var(--card-hi); color: var(--text-2); }
.aw3d-state.is-running { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.aw3d-state.is-done { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.aw3d-card-role { margin: 0; font-size: .76rem; color: var(--text-2); }
.aw3d-card-metric { font-family: var(--mono); font-size: .74rem; color: var(--ink); }
.aw3d-card-lines { margin: 2px 0 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 3px; font-size: .72rem; color: var(--text); line-height: 1.35; }
@container aw3dframe (max-width: 620px) {
  .aw3d-rooms .aw3d-chip { font-size: .66rem; padding: 4px 8px; }
  .aw3d-log { width: calc(100% - 20px); top: auto; height: 46%; }
  .aw3d-hint .muted { display: none; }
}
/* the expanded agents office covers everything, including the sidebar (which otherwise sits above the main panel) */
:root:has(.aw3d.is-big) .sidebar { z-index: 0; }
/* the agents' office opened with no search running */
.mission.idle.office { align-items: stretch; justify-content: flex-start; text-align: left; gap: 12px; padding: 18px 20px; }
.mission.idle.office .aw3d { min-height: 360px; }
@container aw3dframe (max-height: 340px) { .aw3d-rooms { display: none; } }      /* small panel: rooms live in the expanded view */

/* agents' office v2: emotions, kinds of talk, the agent card (mood, memories, friends, ask) */
.aw3d-name { gap: 6px; padding: 3px 10px 3px 7px; backdrop-filter: blur(6px); }
.aw3d-face { width: 22px; height: 14px; border-radius: 4px; background: #000; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
/* a label moved out of the way keeps a thin pointer down to its robot */
.aw3d-tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: var(--lead, 0px); margin-left: -.75px;
  background: hsl(var(--h) 55% 60% / .7); transform-origin: top center; transform: rotate(var(--lead-a, 0rad)); pointer-events: none; }
.aw3d-name .dot { margin-left: 2px; }
.aw3d-say { position: relative; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); }
.aw3d-tag .aw3d-say.is-ai { font-style: normal; font-weight: 450; color: var(--ink); border-style: solid; border-color: hsl(var(--h) 60% 62%);
  background: linear-gradient(135deg, color-mix(in srgb, hsl(var(--h) 80% 70%) 14%, var(--card-solid)), var(--card-solid)); padding-right: 30px; }
.aw3d-ai { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 700 .54rem/1 var(--mono); letter-spacing: .04em; padding: 3px 4px;
  border-radius: 5px; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 50) 70% 52%)); }
.aw3d-tag .aw3d-say.is-play { font-style: normal; font-weight: 650; color: var(--ink); border: 1.5px solid hsl(var(--h) 80% 55%); background: color-mix(in srgb, hsl(var(--h) 90% 70%) 18%, var(--card-solid)); animation: awBounce .5s var(--spring); }
.aw3d-tag .aw3d-say.is-think { font-style: italic; color: var(--text-3); border-style: dotted; border-radius: 16px; }
.aw3d-tag .aw3d-say.is-ask { font-style: normal; font-weight: 450; color: var(--ink); max-width: 300px; text-align: left; border: 1.5px solid hsl(var(--h) 70% 55%); }
.aw3d-dots { display: inline-flex; gap: 3px; padding: 2px 2px; }
.aw3d-dots i { width: 5px; height: 5px; border-radius: 50%; background: hsl(var(--h) 50% 55%); animation: awDot 1.1s infinite ease-in-out; }
.aw3d-dots i:nth-child(2) { animation-delay: .15s; } .aw3d-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes awDot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes awBounce { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.aw3d-loading { gap: 10px; display: flex; align-items: center; justify-content: center; }
.aw3d-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.aw3d-card { width: min(340px, calc(100% - 20px)); max-height: calc(100% - 110px); overflow-y: auto; gap: 8px; }
.aw3d-card-face { width: 34px; height: 21px; border-radius: 6px; background: #000; flex: none; }
.aw3d-meters { display: grid; gap: 4px; }
.aw3d-meter { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; font-size: .68rem; color: var(--text-2); }
.aw3d-meter i { height: 6px; border-radius: 99px; background: var(--card-hi); overflow: hidden; }
.aw3d-meter b { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.aw3d-meter b.joy { background: linear-gradient(90deg, #f5b942, #f57d42); }
.aw3d-meter b.energy { background: linear-gradient(90deg, #4cc38a, #2fa3c4); }
.aw3d-meter b.stress { background: linear-gradient(90deg, #e57373, #c2185b); }
.aw3d-sub { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.aw3d-mem ul { margin: 3px 0 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 2px; font-size: .71rem; color: var(--text); line-height: 1.35; }
.aw3d-mem em { color: var(--text-3); font-style: normal; font-size: .66rem; }
.aw3d-friends { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .7rem; color: var(--text-2); }
.aw3d-friends strong { color: var(--ink); font-weight: 600; }
.aw3d-qa { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aw3d-qa li { display: flex; flex-direction: column; gap: 3px; font-size: .72rem; }
.aw3d-qa .q { align-self: flex-end; max-width: 85%; padding: 5px 9px; border-radius: 12px 12px 3px 12px; background: var(--ink); color: var(--on-ink); }
.aw3d-qa .a { align-self: flex-start; max-width: 92%; padding: 6px 9px; border-radius: 12px 12px 12px 3px; background: color-mix(in srgb, hsl(var(--h) 70% 60%) 14%, var(--card-hi)); color: var(--text); line-height: 1.4; }
.aw3d-ask { display: flex; gap: 6px; }
.aw3d-ask input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: .74rem; }
.aw3d-ask input:focus { outline: 2px solid hsl(var(--h) 65% 55%); outline-offset: 0; border-color: transparent; }
.aw3d-ask .aw3d-btn:disabled { opacity: .5; cursor: default; }
.aw3d-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.aw3d-log-list li.is-ai { border-left-style: solid; background: color-mix(in srgb, hsl(var(--h) 70% 60%) 7%, transparent); }
.aw3d-log-list li.is-play .what { font-weight: 600; }
.aw3d-log-list li.is-memory { border-left-style: dotted; }
.aw3d-log-list li.is-memory .what { color: var(--text-2); font-size: .7rem; }
.aw3d-tag.is-done .aw3d-say { font-family: inherit; font-size: .7rem; padding: 6px 10px; }
.aw3d.is-big .aw3d-tag.is-done .aw3d-say { font-size: .78rem; }

/* Your companies (Company Scout monitors) */
.my-companies { gap: 12px; }
.my-companies .sec-title { margin-top: 0; }
.monitor-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 760px) { .monitor-form { grid-template-columns: 1fr; } }
.monitor-list { display: flex; flex-direction: column; gap: 8px; }
.monitor-row { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.monitor-head { display: flex; gap: 12px; align-items: flex-start; }
.monitor-head .grow { min-width: 0; }
.monitor-actions { flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.monitor-step { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-feed { padding-left: 52px; }
.monitor-jobs { padding-left: 52px; }
.monitor-job-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; font-size: .84rem; max-height: 320px; overflow: auto; }
.monitor-job-list a { color: var(--text); }
.tone-text-danger { color: var(--danger); }
@media (max-width: 760px) { .monitor-head { flex-wrap: wrap; } .monitor-actions { width: 100%; justify-content: flex-start; } .monitor-feed, .monitor-jobs { padding-left: 0; } }
.my-companies-title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; }

/* Company Scout live window: floats bottom-right while a scout runs; minimise, bigger/smaller, drag by the title bar.
   It is rendered into <body>, so `fixed` means the screen; the big size is limited by the screen's height too. */
.scout-window { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(420px, calc(100vw - 32px)); padding: 10px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.45); background: var(--card-solid);
  max-height: calc(100dvh - 16px); transition: width .18s ease; }
.scout-window.is-big { width: min(900px, calc(100vw - 32px), calc((100dvh - 230px) * 1.42)); min-width: min(420px, calc(100vw - 32px)); }
.scout-window.is-min { width: min(340px, calc(100vw - 32px)); padding: 8px 10px; gap: 2px; }
.scout-window.is-min .scout-body { display: none; }
.scout-window.is-dragging { transition: none; user-select: none; box-shadow: 0 30px 60px -18px rgba(0,0,0,.55); }
.scout-body { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.scout-bar { display: flex; align-items: center; gap: 8px; font-size: .84rem; cursor: grab; touch-action: none; user-select: none; }
.scout-window.is-dragging .scout-bar { cursor: grabbing; }
.scout-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scout-ctrls { display: flex; gap: 2px; flex: none; }
.scout-ctrls .icon-btn { width: 26px; height: 26px; }
.scout-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 16px; }
.scout-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.scout-screen { position: relative; border-radius: 10px; overflow: hidden; background: #111; aspect-ratio: 1280 / 900; }
.scout-screen canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.scout-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #ddd; font-size: .82rem; }
.scout-steps { margin: 0; padding-left: 18px; font-size: .78rem; color: var(--text-2); display: grid; gap: 2px; }
.scout-steps li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scout-steps li.is-now { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .scout-window, .scout-window.is-big, .scout-window.is-min { right: 16px; left: 16px; width: auto; min-width: 0; bottom: 16px; }
  .scout-bar { cursor: default; } }
