:root {
  color-scheme: light;
  --ink: #111821;
  --ink-soft: #566170;
  --paper: #eef1ec;
  --paper-panel: #f8faf6;
  --paper-line: #d8ddd6;
  --canvas: #090d12;
  --panel: #0e141c;
  --panel-2: #131b25;
  --line: #202a37;
  --line-soft: #2a3543;
  --white: #edf3f8;
  --muted: #7c8998;
  --green: #65d3a5;
  --green-dim: #142a23;
  --blue: #7f9cff;
  --blue-dim: #17233c;
  --amber: #e0b35a;
  --amber-dim: #2a2315;
  --red: #f0909f;
  --red-dim: #2d171d;
  --claude: #d99065;
  --codex: #75d8ad;
  --kimi: #87a4ff;
  --shadow: 0 28px 90px rgba(13, 18, 23, 0.16);
  --sans: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-bottom: 112px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(127, 156, 255, 0.10), transparent 25rem),
    linear-gradient(180deg, #f4f6f1 0%, var(--paper) 48%, #e9ede7 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { width: min(calc(100% - 44px), 1400px); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: white;
  background: var(--ink);
}
.skip-link:focus { transform: none; }

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--canvas);
  font: 800 11px/1 var(--mono);
}
.topbar-meta { display: flex; gap: 26px; color: var(--ink-soft); font: 750 8px/1 var(--mono); letter-spacing: .12em; }
.topbar-meta .live { color: #33795f; }
.topbar-meta .live i { width: 6px; height: 6px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(101, 211, 165, .13); }

.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
  gap: 70px;
  align-items: center;
  padding: 78px clamp(34px, 6vw, 92px);
  overflow: hidden;
  border-radius: 26px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(127, 156, 255, .06), transparent 40%),
    var(--canvas);
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 18px; color: var(--green); font: 800 8px/1 var(--mono); letter-spacing: .15em; }
.eyebrow.dark { color: #4866c5; }
.hero h1, .section-heading h2, .recommendation h2 { margin: 0; letter-spacing: -.055em; line-height: .98; }
.hero h1 { max-width: 800px; font-size: clamp(55px, 6vw, 88px); }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-lede { max-width: 700px; margin: 30px 0 0; color: #98a4b3; font-size: 18px; line-height: 1.6; }
.primary-link { display: inline-flex; align-items: center; gap: 22px; margin-top: 36px; color: var(--white); text-decoration: none; font-weight: 750; }
.primary-link span { color: var(--green); }

.hero-signal {
  position: relative;
  padding: 14px;
  border: 1px solid #25303d;
  border-radius: 18px;
  background: #0d131b;
  box-shadow: 0 20px 65px rgba(0, 0, 0, .35);
}
.hero-signal::before {
  content: "";
  position: absolute;
  inset: -45px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101, 211, 165, .10), transparent 65%);
}
.signal-head { height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: #718091; font: 750 7px/1 var(--mono); letter-spacing: .12em; }
.signal-head b { color: var(--green); font-weight: 750; }
.hero-signal article {
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid #202a37;
  border-radius: 11px;
  background: #111822;
}
.provider-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font: 800 9px/1 var(--mono);
}
.provider-mark.claude { color: var(--claude); background: rgba(217, 144, 101, .09); }
.provider-mark.codex { color: var(--codex); background: rgba(117, 216, 173, .08); }
.provider-mark.kimi { color: var(--kimi); background: rgba(135, 164, 255, .09); }
.hero-signal article div { display: grid; gap: 6px; }
.hero-signal article small { color: #758294; font: 700 7px/1 var(--mono); letter-spacing: .06em; }
.hero-signal article b { font-size: 15px; }
.hero-signal article em { color: #8290a0; font: 700 8px/1 var(--mono); font-style: normal; }
.hero-signal article .tone-warn { color: var(--amber); }
.hero-signal article .tone-danger { color: var(--red); }
.best-route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid #2a4a3d;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-dim);
}
.best-route span { font: 800 7px/1 var(--mono); letter-spacing: .1em; }
.best-route b { color: var(--white); font-size: 11px; }
.best-route i { font: 800 8px/1 var(--mono); font-style: normal; }

.audit { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 68px 76px; }
.audit article { min-height: 120px; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 8px 34px; border-right: 1px solid var(--paper-line); }
.audit article:first-child { padding-left: 0; }
.audit article:last-child { border-right: 0; }
.audit article > span { color: #5874d0; font: 800 9px/1 var(--mono); }
.audit b { font-size: 15px; }
.audit p { margin: 15px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }

.study { padding-block: 38px 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 30px; }
.section-heading h2 { font-size: clamp(48px, 5vw, 74px); }
.section-heading > p { max-width: 550px; margin: 0 0 5px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.section-heading.compact { margin-bottom: 24px; }

.variant-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.variant-tab {
  min-height: 82px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 9px;
  align-content: center;
  padding: 12px 15px;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(248, 250, 246, .7);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.variant-tab:hover { transform: translateY(-2px); border-color: #9dace0; }
.variant-tab.active { border-color: var(--ink); color: var(--ink); background: #fff; box-shadow: inset 0 -3px var(--green); }
.variant-tab span { grid-row: 1 / 3; align-self: start; color: #5874d0; font: 800 8px/1 var(--mono); }
.variant-tab b { font-size: 12px; }
.variant-tab small { overflow: hidden; color: #7b8491; font: 700 7px/1 var(--mono); letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }

.prototype-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; }
.app-window { min-width: 0; overflow: hidden; border: 1px solid #1d2631; border-radius: 16px; background: var(--canvas); box-shadow: var(--shadow); }
.window-bar { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid #202a36; color: #687586; background: #10161e; font: 750 7px/1 var(--mono); letter-spacing: .08em; }
.window-bar b { color: var(--green); }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #44505e; }
.window-dots i:first-child { background: var(--red); }
.window-dots i:nth-child(2) { background: var(--amber); }
.window-dots i:last-child { background: var(--green); }
.app-body { min-height: 720px; display: grid; grid-template-columns: 360px minmax(0, 1fr); }
.app-body.matrix-mode { grid-template-columns: 440px minmax(0, 1fr); min-height: 800px; }

.subs-rail { min-width: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; border-right: 1px solid #202a36; background: #0e141c; }
.rail-top { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #778496; font: 750 7px/1 var(--mono); letter-spacing: .1em; }
.rail-top b { color: #8a97a8; font-weight: 700; }
.rail-top b i { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--green); }
.lens-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 8px 7px; border-bottom: 1px solid #1d2631; }
.lens-tabs button { min-width: 0; height: 29px; border: 0; border-bottom: 2px solid transparent; color: #596677; background: transparent; font: 750 6.5px/1 var(--mono); letter-spacing: .05em; }
.lens-tabs button.active { border-bottom-color: var(--blue); color: #dbe3ed; background: #131b26; }
.subs-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 9px 8px; border-bottom: 1px solid #1d2631; }
.provider-filter { min-width: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.provider-filter button, .refresh-button { min-width: 0; height: 27px; border: 1px solid transparent; border-radius: 6px; color: #657284; background: transparent; cursor: pointer; font: 750 6.5px/1 var(--mono); }
.provider-filter button:hover, .refresh-button:hover { color: #cbd5e2; background: #19222e; }
.provider-filter button.active { border-color: #2a3748; color: #e5ebf2; background: #18212d; }
.refresh-button { width: 28px; color: var(--green); }
.refresh-button span { display: none; }
.refresh-button.spinning { animation: spin .7s linear infinite; }
.subs-canvas { min-height: 0; overflow-y: auto; padding: 7px 0 16px; scrollbar-color: #344151 transparent; scrollbar-width: thin; }
.rail-status { min-height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-top: 1px solid #1d2631; color: #647183; background: #101720; font: 700 6.5px/1 var(--mono); }
.rail-status b { color: var(--green); font-weight: 750; }

.subs-band { margin-bottom: 9px; }
.band-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 4px 11px; color: #8f9bab; }
.band-head > span { display: flex; align-items: center; gap: 7px; }
.band-head .provider-mark { width: 20px; height: 20px; border-radius: 6px; font-size: 7px; }
.band-head b { color: #c7d0dc; font: 750 7.5px/1 var(--mono); letter-spacing: .08em; }
.band-head small { color: #596676; font: 750 7px/1 var(--mono); }
.band-head em { max-width: 160px; overflow: hidden; color: #697789; font: 700 6.5px/1 var(--mono); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.state-label { flex: 0 0 auto; padding: 3px 5px; border: 1px solid #2a3442; border-radius: 4px; color: #7a8796; font: 800 6px/1 var(--mono); letter-spacing: .04em; }
.state-label.active { border-color: #324b78; color: #98b0ff; background: #17223b; }
.state-label.good { border-color: #285041; color: var(--green); background: var(--green-dim); }
.state-label.warn { border-color: #4a3c21; color: var(--amber); background: var(--amber-dim); }
.state-label.danger { border-color: #532731; color: var(--red); background: var(--red-dim); }
.state-label.muted { color: #687585; }
.switch-action, .relogin-action { flex: 0 0 auto; height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; border: 0; border-radius: 5px; color: var(--green); background: transparent; cursor: pointer; font: 800 6.5px/1 var(--mono); }
.switch-action:hover { background: var(--green-dim); }
.relogin-action { color: var(--amber); }
.relogin-action:hover { background: var(--amber-dim); }
.host-chip, .plan-chip { display: inline-flex; align-items: center; padding: 2px 4px; border: 1px solid #26313e; border-radius: 4px; color: #6f7c8c; font: 700 6px/1 var(--mono); font-style: normal; }

/* Remaining First */
.remaining-card { margin: 0 7px 4px; padding: 8px 9px 9px; border: 1px solid #202a36; border-radius: 8px; background: #101720; }
.remaining-card.is-active { border-color: #354d78; background: #111b2a; box-shadow: inset 2px 0 #7795ff; }
.remaining-card.is-held { opacity: .65; }
.remaining-card.needs-hands { border-color: #493322; background: #181611; }
.account-head { min-width: 0; display: flex; align-items: center; gap: 6px; }
.account-head > b { min-width: 0; overflow: hidden; color: #dce4ed; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-head > small { color: #667486; font: 700 7px/1 var(--mono); }
.account-head .switch-action, .account-head .relogin-action { margin-left: auto; }
.remaining-primary { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: end; margin-top: 7px; }
.remaining-number { display: flex; align-items: baseline; gap: 3px; }
.remaining-number strong { color: #eaf0f6; font: 800 24px/.9 var(--mono); letter-spacing: -.08em; }
.remaining-number span { color: #7a8796; font: 700 6px/1 var(--mono); }
.remaining-number.tone-warn strong { color: var(--amber); }
.remaining-number.tone-danger strong { color: var(--red); }
.remaining-context { min-width: 0; display: grid; gap: 4px; padding-bottom: 2px; }
.remaining-context b { color: #aab5c3; font: 800 6.5px/1 var(--mono); letter-spacing: .06em; }
.remaining-context span { overflow: hidden; color: #697789; font: 650 6.5px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.availability-track { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: #252f3b; }
.availability-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a9d7c, var(--green)); }
.window-chips { min-height: 16px; display: flex; align-items: center; gap: 4px; margin-top: 6px; overflow: hidden; }
.window-chips > span { display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; color: #778496; font: 700 6px/1 var(--mono); }
.window-chips > span b { color: #98a4b3; font-weight: 800; }
.account-detail { margin: 8px 0 1px; color: #877b6b; font: 650 7px/1.3 var(--mono); }

/* Window Matrix */
.matrix-mode .rail-top { min-height: 44px; padding-inline: 15px; font-size: 9px; }
.matrix-mode .rail-top b i { width: 8px; height: 8px; }
.matrix-mode .lens-tabs { padding: 0 10px 9px; }
.matrix-mode .lens-tabs button { height: 36px; font-size: 8.5px; }
.matrix-mode .subs-toolbar { gap: 8px; padding: 11px 10px; }
.matrix-mode .provider-filter { gap: 4px; }
.matrix-mode .provider-filter button,
.matrix-mode .refresh-button { height: 34px; font-size: 8.5px; }
.matrix-mode .refresh-button { width: 34px; }
.matrix-mode .subs-canvas { padding-top: 9px; }
.matrix-mode .rail-status { min-height: 38px; padding-inline: 13px; font-size: 8.5px; }
.matrix-band { margin-inline: 9px; overflow: hidden; border: 1px solid #263241; border-radius: 10px; background: #101720; }
.matrix-band .band-head { min-height: 44px; padding-inline: 10px; border-bottom: 1px solid #263241; }
.matrix-band .band-head .provider-mark { width: 27px; height: 27px; border-radius: 7px; font-size: 9px; }
.matrix-band .band-head b { font-size: 10px; }
.matrix-band .band-head small { font-size: 8.5px; }
.matrix-band .band-head em { max-width: 190px; font-size: 8px; }
.matrix-head { min-height: 34px; display: grid; grid-template-columns: minmax(140px, 1fr) repeat(3, 72px); align-items: center; padding: 0 8px; color: #728093; background: #0d141c; font: 800 8.5px/1 var(--mono); letter-spacing: .06em; }
.matrix-head b { text-align: center; }
.matrix-row { min-height: 78px; display: grid; grid-template-columns: minmax(140px, 1fr) repeat(3, 72px); align-items: stretch; padding: 6px 8px; border-top: 1px solid #202b38; }
.matrix-row.is-active { background: #121c2b; box-shadow: inset 2px 0 var(--blue); }
.matrix-account { min-width: 0; display: grid; grid-template-columns: 12px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 7px; align-content: center; padding-right: 8px; }
.matrix-account-copy { min-width: 0; display: grid; gap: 5px; align-self: end; }
.state-dot { grid-row: 1 / 3; align-self: center; width: 5px; height: 5px; border-radius: 50%; background: #566273; }
.matrix-mode .state-dot { width: 7px; height: 7px; }
.state-dot.active { background: var(--blue); box-shadow: 0 0 0 3px rgba(127, 156, 255, .12); }
.state-dot.good { background: var(--green); }
.state-dot.danger { background: var(--red); }
.matrix-account-copy b { min-width: 0; overflow: hidden; color: #d9e2ec; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.matrix-account-copy small { color: #748295; font: 750 8.5px/1 var(--mono); }
.matrix-account-action { grid-column: 2; align-self: start; margin-top: 5px; }
.matrix-account-action .switch-action { height: 25px; padding-inline: 8px; border: 1px solid #2b4b40; border-radius: 6px; font-size: 8px; background: rgba(117, 216, 173, .06); }
.matrix-cell { display: grid; place-content: center; gap: 6px; border-left: 1px solid #25303d; text-align: center; }
.matrix-cell b { color: #cbd6e1; font: 800 15px/1 var(--mono); letter-spacing: -.04em; }
.matrix-cell small { color: #758294; font: 700 8px/1 var(--mono); }
.matrix-cell i { width: 40px; height: 5px; display: block; overflow: hidden; border-radius: 99px; background: linear-gradient(to right, var(--green) var(--fill), #26313e var(--fill)); }
.matrix-cell.tone-warn b { color: var(--amber); }
.matrix-cell.tone-danger b { color: var(--red); }
.matrix-cell.empty { color: #4b5765; font: 700 12px/1 var(--mono); }
.matrix-problem { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; padding-left: 12px; color: var(--red); font: 750 9px/1 var(--mono); }
.matrix-problem .relogin-action { height: 30px; font-size: 8px; }

/* Account Stack */
.stack-card { margin: 0 7px 5px; padding: 8px 9px; border: 1px solid #202a36; border-radius: 8px; background: #101720; }
.stack-card.is-active { border-color: #354d78; box-shadow: inset 2px 0 var(--blue); }
.stack-card.needs-hands { border-color: #493322; }
.stack-head { display: flex; align-items: center; gap: 6px; }
.stack-head > b { min-width: 0; overflow: hidden; color: #d7e0ea; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.stack-head > small { color: #647183; font: 650 5.5px/1 var(--mono); }
.stack-head .switch-action { margin-left: auto; }
.stack-windows { display: grid; gap: 6px; margin-top: 8px; }
.stack-window { display: grid; grid-template-columns: 34px minmax(0, 1fr) 50px; grid-template-rows: auto auto; gap: 3px 6px; align-items: center; }
.stack-window > b { grid-row: 1 / 3; color: #8b98a8; font: 800 6px/1 var(--mono); }
.stack-track { height: 4px; overflow: hidden; border-radius: 99px; background: #25303d; }
.stack-track i { display: block; height: 100%; background: var(--green); }
.stack-track i.tone-warn { background: var(--amber); }
.stack-track i.tone-danger { background: var(--red); }
.stack-window strong { color: #cbd5df; font: 800 8px/1 var(--mono); text-align: right; }
.stack-window strong small { color: #687586; font-size: 5px; }
.stack-window em { grid-column: 2 / 4; color: #5f6d7d; font: 650 5.5px/1 var(--mono); font-style: normal; }
.stack-detail { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 1px solid #1d2631; color: #647183; font: 650 5.5px/1 var(--mono); }
.stack-detail > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-problem { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: #977c67; font: 650 6.5px/1.3 var(--mono); }

/* Decision Queue */
.queue-section { margin: 0 7px 8px; overflow: hidden; border: 1px solid #202a36; border-radius: 8px; background: #101720; }
.queue-section > header { min-height: 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; padding: 0 8px; border-bottom: 1px solid #202a36; color: #8b98a8; }
.queue-section > header span { font: 800 6.5px/1 var(--mono); letter-spacing: .08em; }
.queue-section > header small { color: #5f6c7c; font: 650 5.5px/1 var(--mono); }
.queue-section > header b { min-width: 18px; padding: 3px; border-radius: 4px; color: #90a0b1; background: #1a2430; font: 800 6px/1 var(--mono); text-align: center; }
.queue-next > header { color: var(--green); background: #111c18; }
.queue-hands > header { color: var(--amber); background: #191710; }
.queue-row { min-height: 56px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 48px auto; gap: 7px; align-items: center; padding: 6px 7px; border-top: 1px solid #1c2631; }
.queue-row:first-of-type { border-top: 0; }
.queue-row .provider-mark { width: 22px; height: 22px; border-radius: 6px; font-size: 6.5px; }
.queue-copy { min-width: 0; display: grid; gap: 4px; }
.queue-copy b { overflow: hidden; color: #d4dde6; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.queue-copy small { overflow: hidden; color: #657283; font: 650 5.5px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.queue-row > strong { display: grid; color: #c9d3dd; font: 800 13px/1 var(--mono); text-align: right; }
.queue-row > strong small { color: #657283; font-size: 5px; }
.queue-row > strong.tone-warn { color: var(--amber); }
.queue-row > strong.tone-danger { color: var(--red); }
.queue-row.is-active { box-shadow: inset 2px 0 var(--blue); background: #111b29; }

.terminal-stage { min-width: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr) 36px; background: #090d12; }
.terminal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #1d2631; color: #718091; font-size: 10px; }
.terminal-head > span:first-child { display: flex; align-items: center; gap: 8px; }
.terminal-head i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.terminal-head b { color: #e6edf4; }
.terminal-head small { font: 650 7px/1 var(--mono); }
.terminal-state { color: var(--green); font: 800 7px/1 var(--mono); letter-spacing: .1em; }
.terminal-content { position: relative; padding: 40px clamp(22px, 4vw, 48px); overflow: hidden; }
.terminal-content > p { margin: 0 0 22px; color: var(--green); font: 650 10px/1 var(--mono); }
.terminal-content > p span { color: #728093; }
.terminal-content code { color: #e1e8ef; font: 11px/1.9 var(--mono); }
.terminal-content code i { color: #738193; font-style: normal; }
.terminal-content code b { color: var(--green); font-weight: 500; }
.terminal-content code em { color: white; font-style: normal; animation: blink 1s steps(1) infinite; }
.terminal-fact { position: absolute; right: 22px; bottom: 22px; min-width: 210px; display: grid; gap: 6px; padding: 12px 13px; border: 1px solid #24303d; border-radius: 9px; background: #0f161f; }
.terminal-fact small { color: #657283; font: 750 6px/1 var(--mono); letter-spacing: .1em; }
.terminal-fact b { color: #dce5ed; font-size: 10px; }
.terminal-fact span { color: var(--red); font: 700 7px/1 var(--mono); }
.terminal-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-top: 1px solid #1d2631; color: #647183; background: #101720; font: 700 6.5px/1 var(--mono); }
.terminal-footer b { color: var(--red); font-weight: 750; }

.variant-brief { min-width: 0; padding: 24px; border: 1px solid var(--paper-line); border-radius: 16px; background: var(--paper-panel); }
.brief-kicker { display: flex; align-items: center; justify-content: space-between; color: #5975d1; font: 800 8px/1 var(--mono); letter-spacing: .08em; }
.brief-kicker b { color: var(--ink-soft); font-size: 7px; }
.variant-brief h3 { margin: 32px 0 14px; font-size: 34px; letter-spacing: -.05em; }
.variant-brief > p { min-height: 120px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.brief-rule { height: 1px; margin: 24px 0; background: var(--paper-line); }
.brief-facts { display: grid; gap: 16px; margin: 0; }
.brief-facts div { display: grid; gap: 5px; }
.brief-facts dt { color: #7b8491; font: 800 7px/1 var(--mono); letter-spacing: .09em; }
.brief-facts dd { margin: 0; font-size: 12px; line-height: 1.4; }
.brief-verdict { margin-top: 23px; padding: 12px; border-radius: 9px; color: var(--ink); background: #e7ebe5; font-size: 11px; line-height: 1.5; }
.brief-verdict.recommended { background: #d8efe4; }
.brief-verdict strong { display: block; margin-bottom: 5px; color: #39745c; font: 800 7px/1 var(--mono); letter-spacing: .08em; }
.choose-brief { width: 100%; min-height: 44px; margin-top: 16px; border: 1px solid var(--ink); border-radius: 8px; color: white; background: var(--ink); cursor: pointer; font-weight: 760; }
.choose-brief.selected { border-color: #347f61; color: #08100d; background: var(--green); }
.prototype-help { display: grid; grid-template-columns: repeat(3, 1fr); margin-right: 342px; border: 1px solid var(--paper-line); border-top: 0; border-radius: 0 0 12px 12px; color: var(--ink-soft); background: rgba(249, 251, 247, .75); }
.prototype-help span { min-height: 50px; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-right: 1px solid var(--paper-line); font-size: 10px; line-height: 1.35; }
.prototype-help span:last-child { border-right: 0; }
.prototype-help i { color: #5874d0; font-style: normal; }

.comparison { padding-block: 42px 86px; }
.direction-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.direction-card { min-height: 420px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--paper-line); border-radius: 15px; background: var(--paper-panel); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.direction-card:hover { transform: translateY(-3px); border-color: #99a8d9; box-shadow: 0 18px 45px rgba(15, 20, 24, .08); }
.direction-card.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card-top { display: flex; align-items: center; justify-content: space-between; color: #5874d0; font: 800 8px/1 var(--mono); letter-spacing: .07em; }
.card-top b { color: #788290; font-size: 6px; }
.direction-card h3 { margin: 34px 0 12px; font-size: 26px; letter-spacing: -.045em; }
.direction-card > p { min-height: 94px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.score-list { display: grid; gap: 10px; margin: 24px 0; }
.score-row { display: grid; grid-template-columns: 79px 1fr 23px; gap: 7px; align-items: center; color: #707a87; font: 750 6px/1 var(--mono); }
.score-row i { height: 4px; overflow: hidden; border-radius: 99px; background: #dfe3dd; }
.score-row i b { display: block; height: 100%; background: #6f8be9; }
.score-row em { font-style: normal; text-align: right; }
.direction-card > button { min-height: 37px; margin-top: 6px; border: 1px solid var(--paper-line); border-radius: 7px; color: var(--ink); background: transparent; cursor: pointer; font-size: 11px; font-weight: 730; }
.direction-card > button:hover { border-color: var(--ink); }
.direction-card > .card-choose { margin-top: auto; color: white; background: var(--ink); }
.direction-card.selected > .card-choose { border-color: var(--green); color: #09110e; background: var(--green); }

.recommendation { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 48px; border-radius: 20px; color: var(--white); background: var(--canvas); box-shadow: var(--shadow); }
.recommendation-mark { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid #293442; border-radius: 50%; color: var(--green); font: 800 11px/1 var(--mono); }
.recommendation h2 { font-size: 50px; }
.recommendation p:not(.eyebrow) { max-width: 760px; margin: 16px 0 0; color: #8e9aaa; font-size: 13px; line-height: 1.6; }
.recommendation button { min-height: 49px; padding: 0 17px; border: 1px solid var(--green); border-radius: 8px; color: #09110e; background: var(--green); cursor: pointer; font-weight: 780; }
.recommendation button span { margin-left: 12px; }

.rules { padding-block: 84px 94px; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rules-grid article { min-height: 165px; padding: 22px; border-top: 2px solid var(--ink); background: rgba(248, 250, 246, .56); }
.rules-grid b { font-size: 14px; }
.rules-grid p { margin: 20px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.footer { height: 76px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--paper-line); color: #77818e; font: 750 7px/1 var(--mono); letter-spacing: .1em; }

.decision-dock { position: fixed; z-index: 50; left: 50%; bottom: 17px; transform: translateX(-50%); width: min(700px, calc(100% - 28px)); min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 11px 10px 19px; border: 1px solid #303b48; border-radius: 13px; color: white; background: rgba(9, 13, 18, .96); box-shadow: 0 18px 55px rgba(0, 0, 0, .28); backdrop-filter: blur(16px); }
.decision-dock > div { display: grid; gap: 5px; }
.decision-dock span { color: #7d8998; font: 750 7px/1 var(--mono); letter-spacing: .1em; }
.decision-dock b { font-size: 13px; }
.decision-dock button { min-height: 44px; padding: 0 15px; border: 1px solid var(--green); border-radius: 8px; color: #09110e; background: var(--green); cursor: pointer; font-weight: 780; }
.decision-dock button:disabled { border-color: #303a47; color: #6e7a89; background: #171e27; cursor: not-allowed; }
.decision-dock button span { margin-left: 10px; color: inherit; }
.toast { position: fixed; z-index: 80; top: 20px; left: 50%; transform: translate(-50%, -16px); padding: 11px 15px; border-radius: 8px; color: white; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease; font: 750 7px/1 var(--mono); letter-spacing: .05em; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

button:focus-visible, a:focus-visible { outline: 3px solid #7993ec; outline-offset: 3px; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .hero-signal { max-width: 660px; }
  .prototype-layout { grid-template-columns: 1fr; }
  .variant-brief { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 18px; align-items: start; }
  .variant-brief h3 { margin-top: 22px; }
  .variant-brief > p { min-height: 0; }
  .brief-rule { display: none; }
  .brief-facts { grid-column: 2 / -1; grid-template-columns: repeat(3, 1fr); }
  .brief-verdict, .choose-brief { grid-column: 2 / -1; }
  .prototype-help { margin-right: 0; }
  .direction-grid { grid-template-columns: repeat(2, 1fr); }
  .recommendation { grid-template-columns: 66px 1fr; }
  .recommendation button { grid-column: 2; justify-self: start; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  body { padding-bottom: 124px; }
  .shell { width: min(calc(100% - 24px), 1400px); }
  .topbar { height: 66px; }
  .topbar-meta > span:first-child { display: none; }
  .hero { min-height: auto; gap: 44px; padding: 42px 22px 26px; border-radius: 18px; }
  .hero h1 { font-size: clamp(44px, 12vw, 68px); }
  .hero-lede { font-size: 15px; }
  .hero-signal { padding: 9px; }
  .hero-signal article { grid-template-columns: 30px 1fr; }
  .hero-signal article em { grid-column: 2; }
  .best-route { grid-template-columns: 1fr auto; }
  .best-route span { grid-column: 1 / -1; }
  .audit { grid-template-columns: 1fr; padding-block: 46px; }
  .audit article, .audit article:first-child { min-height: auto; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--paper-line); }
  .audit article:last-child { border-bottom: 0; }
  .section-heading { display: grid; gap: 15px; }
  .section-heading h2 { font-size: 48px; }
  .variant-tabs { display: flex; overflow-x: auto; padding: 4px 1px 8px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .variant-tabs::-webkit-scrollbar { display: none; }
  .variant-tab { min-width: 210px; scroll-snap-align: start; }
  .app-body, .app-body.matrix-mode { min-height: 1040px; grid-template-columns: 1fr; grid-template-rows: 700px minmax(340px, 1fr); }
  .subs-rail { border-right: 0; border-bottom: 1px solid #202a36; }
  .subs-canvas { max-height: 560px; }
  .terminal-content { padding: 25px 18px; }
  .terminal-fact { right: 14px; bottom: 14px; min-width: 190px; }
  .variant-brief { display: block; }
  .variant-brief > p { min-height: 0; }
  .brief-rule { display: block; }
  .brief-facts { display: grid; grid-template-columns: 1fr; }
  .prototype-help { grid-template-columns: 1fr; }
  .prototype-help span { border-right: 0; border-bottom: 1px solid var(--paper-line); }
  .prototype-help span:last-child { border-bottom: 0; }
  .direction-grid, .rules-grid { grid-template-columns: 1fr; }
  .direction-card { min-height: 380px; }
  .recommendation { grid-template-columns: 1fr; padding: 32px 24px; }
  .recommendation-mark { width: 52px; height: 52px; }
  .recommendation h2 { font-size: 42px; }
  .recommendation button { grid-column: 1; justify-self: stretch; }
  .footer { height: 95px; display: grid; align-content: center; gap: 9px; }
  .decision-dock { min-height: 92px; align-items: stretch; padding: 10px; }
  .decision-dock > div { justify-content: center; }
  .decision-dock button { max-width: 190px; }
}

@media (max-width: 420px) {
  .shell { width: min(calc(100% - 16px), 1400px); }
  .app-body { grid-template-rows: 720px minmax(320px, 1fr); }
  .subs-toolbar { grid-template-columns: 1fr; }
  .refresh-button { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-color: #2a3748; background: #18212d; }
  .refresh-button span { display: inline; }
  .matrix-head, .matrix-row { grid-template-columns: minmax(106px, 1fr) repeat(3, 64px); }
  .matrix-head { padding-inline: 6px; font-size: 7.5px; }
  .matrix-row { min-height: 76px; padding-inline: 6px; }
  .matrix-account { grid-template-columns: 10px minmax(0, 1fr); column-gap: 5px; padding-right: 5px; }
  .matrix-account-copy b { font-size: 11px; }
  .matrix-account-copy small { font-size: 7.5px; }
  .matrix-cell b { font-size: 14px; }
  .matrix-cell small { font-size: 7.5px; }
  .matrix-cell i { width: 34px; }
  .decision-dock b { font-size: 11px; }
  .decision-dock button { max-width: 166px; padding-inline: 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
