:root {
  --bg: #FFF6CC;
  --bg-dark: #201A35;
  --surface: #FFFDF3;
  --surface-dark: #302846;
  --line: #D8C77E;
  --blue: #0068FF;
  --orange: #FF7A1A;
  --teal: #00A68A;
  --ai: #7957E8;
  --risk: #D94A55;
  --wait: #D89B21;
  --fg: #211820;
  --muted: #6A5C56;
  --display: "Source Serif 4", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 16px 36px rgba(33, 24, 32, 0.08);
  --header-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.site-shell { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
[data-site-header] { display: contents; }
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
#xray, #audit { scroll-margin-top: calc(var(--header-h) + 48px); }

/* Announce — always centered */
.announce-bar {
  width: 100%;
  background: var(--bg-dark);
  color: #C9BFD9;
  font-size: 0.85rem;
}
.announce-bar-inner {
  width: 100%;
  padding: 9px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.announce-text { margin: 0 auto; text-align: center; max-width: 52rem; }
.announce-cta { color: #fff; font-weight: 700; margin-left: 6px; }
.announce-cta:hover { color: #9ec1ff; text-decoration: none; }

/* Flat cream header bar */
.site-top { position: sticky; top: 0; z-index: 50; }
.site-header {
  background: #FFF9D9;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--header-h);
  width: 100%;
  padding: 0 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-size: 1.12rem; font-weight: 700; }
.brand-text span { font-size: 0.66rem; color: var(--muted); }
.nav-main { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; }
.nav-link {
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 4px 0;
}
.nav-link:hover, .nav-link.is-active { color: var(--fg); text-decoration: none; }
.nav-link.is-active { box-shadow: inset 0 -2px 0 var(--blue); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-toggle { display: none; font-size: 1.3rem; padding: 4px 8px; }
.mobile-nav {
  display: none; flex-direction: column; gap: 8px;
  padding: 8px 20px 14px; border-top: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { font-weight: 600; color: var(--fg); text-decoration: none; }

.user-menu { position: relative; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-dark); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; flex-direction: column;
}
.user-dropdown.is-open { display: flex; }
.user-dropdown a, .user-dropdown button {
  text-align: left; padding: 8px 10px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--fg); text-decoration: none;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg); }
.user-workspace-label {
  font-size: 0.72rem; color: var(--muted); padding: 6px 10px 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 16px; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  border: 1.5px solid transparent; transition: transform 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }
.btn-lg { padding: 12px 18px; font-size: 0.96rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0054d4; }
.btn-line { background: transparent; border-color: var(--fg); color: var(--fg); }
.btn-line:hover { background: var(--fg); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--fg); background: rgba(33,24,32,0.05); }
.btn-teal { background: var(--teal); color: #fff; }

.kicker {
  display: inline-flex; font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }
.mono-label {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.mt-s { margin-top: 10px; }
.mt-m { margin-top: 18px; }
.section { padding: 56px 0; }
.section--dark { background: var(--bg-dark); color: #E4DCF2; }
.section--dark .kicker { color: #9ec1ff; }
.section--dark .lead { color: #A99BB8; }
.sec-head { max-width: 640px; margin-bottom: 24px; }
.sec-head h2 { margin-top: 8px; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.page-hero { padding: 40px 0 16px; }
.page-hero-inner { max-width: 720px; }
.page-hero h1 { margin-top: 10px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.page-hero .lead { margin-top: 12px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hint-line { margin-top: 12px; font-size: 0.9rem; color: var(--blue); font-weight: 600; }
.chip {
  display: inline-flex; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line); font-size: 0.78rem; font-weight: 700;
  background: var(--surface);
}
.chip.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.cta-band {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 36px 28px; text-align: center;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band .lead { margin: 12px auto 0; }

/* ════ HOME — RESPONSE CROSS-SECTION ════ */
.xray-hero {
  position: relative;
  padding: 28px 0 32px;
  overflow: visible;
  background:
    radial-gradient(ellipse 55% 40% at 85% 10%, rgba(0,104,255,0.12), transparent 55%),
    radial-gradient(ellipse 40% 35% at 10% 80%, rgba(255,122,26,0.12), transparent 50%),
    var(--bg);
}
.xray-top {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px 28px;
  align-items: stretch;
}
.xray-brand { min-width: 0; }
.xray-name {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 0.95;
}
.xray-tag { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.xray-mission {
  margin-top: 12px; max-width: none; font-weight: 600; font-size: 0.95rem;
  border-left: 3px solid var(--blue); padding-left: 12px;
}
.xray-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.xray-links {
  display: flex; gap: 16px; font-weight: 700; font-size: 0.9rem; margin-top: 12px;
}

/* Right-side slice fills hero void */
.xray-slice {
  background: var(--bg-dark);
  color: #E4DCF2;
  border-radius: 18px;
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 18px 40px rgba(32, 26, 53, 0.22);
  min-height: 100%;
}
.xray-slice .mono-label { color: #9ec1ff; }
.slice-asks {
  list-style: none; display: grid; gap: 8px; margin: 0; padding: 0;
}
.slice-ask {
  display: grid; gap: 2px; padding: 10px 12px;
  background: var(--surface-dark); border-radius: 10px;
  border-left: 3px solid var(--orange);
}
.slice-ask:nth-child(2) { border-left-color: var(--blue); }
.slice-ask:nth-child(3) { border-left-color: var(--risk); }
.slice-ask:nth-child(4) { border-left-color: var(--wait); }
.slice-ask b { font-size: 0.86rem; color: #fff; }
.slice-ask span { font-size: 0.78rem; color: #A99BB8; }
.slice-meter {
  position: relative; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.slice-meter-bar {
  display: block; height: 100%; width: var(--w, 35%);
  background: linear-gradient(90deg, var(--wait), var(--risk));
  border-radius: inherit;
}
.slice-meter-label {
  display: block; margin-top: 8px; font-size: 0.78rem; font-weight: 700; color: #9ec1ff;
}
.slice-flags {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0;
}
.slice-flags li {
  font-size: 0.72rem; font-weight: 700; padding: 4px 8px; border-radius: 6px;
}
.slice-flags .is-gap { background: rgba(216,155,33,0.22); color: #f0c56a; }
.slice-flags .is-risk { background: rgba(217,74,85,0.22); color: #f0a0a8; }
.slice-flags .is-wait { background: rgba(121,87,232,0.22); color: #c4b0ff; }

.xray-stage {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: var(--shadow);
}
.xray-headline {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px 24px;
  align-items: start;
}
.xray-headline h1 {
  margin-top: 8px;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  max-width: none;
}
.xray-headline .lead { margin-top: 10px; max-width: 52ch; }
.xray-headline-rail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.phase-dots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px;
}
.phase-dot {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 700;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg);
  text-align: left;
}
.phase-dot span {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,104,255,0.1); color: var(--blue); font-size: 0.7rem; flex-shrink: 0;
}
.phase-dot b { font-weight: 700; color: inherit; }
.phase-dot.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.phase-dot.is-on span { background: rgba(255,255,255,0.2); color: #fff; }
.phase-rail-note {
  margin-top: 12px; font-size: 0.75rem; font-weight: 600; color: var(--muted);
  line-height: 1.4;
}

.xray-panels {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 420px;
}
.xray-panel, .xray-extract, .xray-audit, .xray-evidence {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  min-height: 200px;
}
.msg-body { margin-top: 10px; font-size: 0.95rem; color: var(--fg); display: grid; gap: 10px; }
.msg-body mark {
  background: rgba(255,122,26,0.2); color: inherit; padding: 0 3px; border-radius: 3px;
}
.draft-body p.is-risk { color: var(--risk); font-weight: 600; }
.draft-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flag {
  font-size: 0.72rem; font-weight: 700; padding: 4px 8px; border-radius: 6px;
}
.flag--miss { background: rgba(216,155,33,0.2); color: #8a6200; }
.flag--risk { background: rgba(217,74,85,0.15); color: var(--risk); }
.flag--wait { background: rgba(121,87,232,0.15); color: var(--ai); }

.xq-rail { display: grid; gap: 8px; margin-top: 10px; }
.xray-q {
  text-align: left; padding: 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg);
}
.xray-q b { display: block; font-size: 0.85rem; }
.xray-q span { font-size: 0.78rem; color: var(--muted); }
.xray-q.is-on { border-color: var(--orange); background: rgba(255,122,26,0.1); }

.audit-map { list-style: none; margin-top: 10px; display: grid; gap: 8px; }
.audit-map li {
  padding: 8px 10px; border-left: 3px solid var(--line); font-size: 0.82rem;
}
.audit-map li b { display: block; }
.audit-map li span { color: var(--muted); }
.audit-map .is-gap { border-color: var(--wait); }
.audit-map .is-risk { border-color: var(--risk); }
.audit-map .is-partial { border-color: var(--orange); }
.audit-map .is-focus { background: rgba(0,104,255,0.06); }

.ev-strip { display: grid; gap: 8px; margin-top: 10px; }
.ev {
  padding: 10px; border-radius: 8px; font-size: 0.82rem;
  opacity: 0.35; transform: translateX(-8px); transition: 0.35s;
}
.ev.is-in { opacity: 1; transform: none; }
.ev b { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ev--ctx { background: rgba(255,122,26,0.12); }
.ev--fact { background: rgba(0,166,138,0.12); }
.ev--pol { background: rgba(121,87,232,0.12); }
.ev--ai { background: rgba(0,104,255,0.1); }

.final-body { border-left: 3px solid var(--teal); padding-left: 12px; }
.final-tally {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
  opacity: 0.4; transition: 0.3s;
}
.final-tally.is-on { opacity: 1; }
.final-tally span {
  padding: 6px 10px; background: rgba(0,166,138,0.12); border-radius: 8px;
  font-size: 0.8rem; font-weight: 700;
}

/* Phase visibility — fill both columns, no empty right */
.xray-stage[data-phase="0"] .xray-panels { grid-template-columns: 1fr; }
.xray-stage[data-phase="0"] .xray-draft,
.xray-stage[data-phase="0"] .xray-extract,
.xray-stage[data-phase="0"] .xray-audit,
.xray-stage[data-phase="0"] .xray-evidence,
.xray-stage[data-phase="0"] .xray-final { display: none; }

.xray-stage[data-phase="1"] .xray-extract,
.xray-stage[data-phase="1"] .xray-audit,
.xray-stage[data-phase="1"] .xray-evidence,
.xray-stage[data-phase="1"] .xray-final { display: none; }

.xray-stage[data-phase="2"] .xray-draft,
.xray-stage[data-phase="2"] .xray-audit,
.xray-stage[data-phase="2"] .xray-evidence,
.xray-stage[data-phase="2"] .xray-final { display: none; }

.xray-stage[data-phase="3"] .xray-customer,
.xray-stage[data-phase="3"] .xray-evidence,
.xray-stage[data-phase="3"] .xray-final { display: none; }

.xray-stage[data-phase="4"] .xray-customer,
.xray-stage[data-phase="4"] .xray-extract,
.xray-stage[data-phase="4"] .xray-final { display: none; }

.xray-stage[data-phase="5"] .xray-customer,
.xray-stage[data-phase="5"] .xray-draft,
.xray-stage[data-phase="5"] .xray-extract,
.xray-stage[data-phase="5"] .xray-audit,
.xray-stage[data-phase="5"] .xray-evidence { display: none; }
.xray-stage[data-phase="5"] .xray-panels { grid-template-columns: 1fr; }
.xray-stage[data-phase="5"] .xray-final { max-width: 720px; margin: 0 auto; }

.xray-status {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: rgba(0,104,255,0.08); font-size: 0.88rem; font-weight: 600; color: var(--blue);
}

.audit-layout {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: stretch;
}
.audit-form-col { min-width: 0; }
.audit-form, .contact-form, .auth-form { display: grid; gap: 12px; }
.audit-form label, .contact-form label, .auth-form label {
  display: grid; gap: 6px; font-size: 0.85rem; font-weight: 700;
}
.audit-form textarea, .contact-form input, .contact-form textarea, .auth-form input {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font: inherit; width: 100%;
}
.audit-result {
  padding: 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); min-height: 100%;
}
.audit-result.is-idle {
  background: linear-gradient(160deg, #fff 0%, #FFF6CC 100%);
  border-style: dashed;
}
.audit-idle-title {
  font-family: var(--display); font-size: 1.25rem; margin: 8px 0 12px;
}
.audit-idle-list {
  list-style: none; display: grid; gap: 10px; margin: 0 0 14px;
}
.audit-idle-list li {
  padding: 10px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; font-size: 0.88rem; color: var(--muted);
}
.audit-idle-list b { color: var(--fg); }
.audit-result ul[data-audit-list] { list-style: none; margin: 10px 0 14px; display: grid; gap: 8px; }
.audit-result ul[data-audit-list] li {
  padding: 8px 10px; border-left: 3px solid var(--risk); font-size: 0.88rem; background: #fff;
}

.not-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.not-item b { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 6px; color: #fff; }
.pillar-flow {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px;
}
.pf {
  flex: 1 1 120px; padding: 16px 14px; background: var(--surface);
  border-top: 3px solid var(--blue);
}
.pf b { display: block; font-family: var(--display); margin-bottom: 6px; }
.pf span { font-size: 0.85rem; color: var(--muted); }
.pf-arrow { display: flex; align-items: center; color: var(--line); font-weight: 700; }

.check-list {
  list-style: none; counter-reset: ck; display: grid;
  grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 960px;
}
.check-list li {
  counter-increment: ck; position: relative;
  padding: 14px 14px 14px 48px; background: var(--surface);
  border: 1px solid var(--line); font-size: 0.9rem; color: var(--muted);
}
.check-list li::before {
  content: counter(ck, decimal-leading-zero);
  position: absolute; left: 12px; top: 14px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; color: var(--blue);
}
.check-list b { color: var(--fg); }
.section--dark .check-list li { background: var(--surface-dark); border-color: #4a3f66; color: #A99BB8; }
.section--dark .check-list b { color: #fff; }

.stack-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px; padding: 8px 0;
}
.stack-box {
  padding: 18px 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; font-weight: 700; text-align: center; min-width: 160px;
}
.stack-box--core {
  background: var(--bg-dark); color: #fff; border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(0,104,255,0.25);
}
.stack-box small { display: block; font-weight: 600; font-size: 0.75rem; color: #9ec1ff; margin-top: 4px; }
.stack-arrow { font-weight: 800; color: var(--muted); font-size: 1.2rem; }

.solution-catalog {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.sol-item {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  background: var(--bg-dark); color: #E4DCF2; text-decoration: none; border-radius: 10px;
  transition: transform 0.15s, background 0.15s;
}
.sol-item:hover { transform: translateY(-2px); background: var(--surface-dark); text-decoration: none; color: #fff; }
.sol-item b { font-family: var(--mono); font-size: 0.68rem; color: #9ec1ff; }
.sol-item span { font-weight: 700; font-size: 0.86rem; }

.about-system {
  font-family: var(--display); font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-bottom: 10px; max-width: 28ch;
}

.xray-stage[data-phase="0"] .xray-customer {
  min-height: min(52vh, 480px);
  font-size: 1.05rem;
}
.xray-stage[data-phase="0"] .msg-body { font-size: 1.08rem; line-height: 1.65; max-width: 62ch; }

/* Platform tapes */
.tape-bench { background: var(--bg-dark); color: #E4DCF2; border-radius: var(--r-lg); padding: 20px; }
.tape-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tape {
  padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 0.82rem;
  border: 2px solid transparent; background: var(--surface-dark); color: #ccc;
  opacity: 0.45;
}
.tape.is-on { opacity: 1; border-color: var(--tc); color: #fff; box-shadow: inset 0 -3px 0 var(--tc); }
.tape-flow { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: start; }
.tape-join { display: flex; flex-wrap: wrap; gap: 8px; }
.join-node {
  padding: 8px 10px; background: rgba(0,104,255,0.2); border-radius: 6px;
  font-family: var(--mono); font-size: 0.7rem;
}
.join-node.is-pulse { animation: pulse 0.6s ease; }
@keyframes pulse { 50% { background: rgba(0,166,138,0.4); } }
.assemble { list-style: none; display: grid; gap: 8px; margin-top: 8px; }
.assemble li {
  padding: 8px 10px; background: var(--surface-dark); border-left: 3px solid var(--line);
  font-size: 0.85rem; opacity: 0.35;
}
.assemble li.is-on { opacity: 1; border-color: var(--teal); }
.assemble li.is-dim { opacity: 0.25; text-decoration: line-through; }
.assemble li.is-trace { border-color: var(--orange); background: rgba(255,122,26,0.15); }
.tape-bench .hint-line { color: #9ec1ff; }

/* Triage stack */
.triage-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; align-items: start; }
.section--soft { background: rgba(255,253,243,0.65); }
.how-grid {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-top: 8px;
}
.how-grid li {
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 0.9rem; color: var(--muted);
}
.how-grid b { color: var(--fg); }
.grade-strip {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.grade-strip span {
  flex: 1 1 140px; padding: 10px 12px; border-radius: 8px;
  background: rgba(121,87,232,0.1); font-size: 0.78rem; color: var(--muted);
}
.grade-strip b { display: block; color: var(--ai); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

.msg-stack { display: flex; flex-direction: column; gap: 6px; transition: 0.25s; }
.triage-layout.is-open { grid-template-columns: 0.85fr 1.15fr; }
.msg-stack.is-split {
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}
.msg-stack.is-split .msg-bar:not(.is-on) {
  flex: 1 1 calc(50% - 8px); opacity: 0.42; transform: scale(0.97);
}
.msg-stack.is-split .msg-bar.is-on {
  flex: 1 1 100%; order: -1; transform: scale(1.01); border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(0,104,255,0.15);
}
.msg-bar {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid color-mix(in srgb, var(--risk) calc(var(--pri) * 1%), var(--line));
  text-align: left; border-radius: 6px; font-size: 0.85rem;
}
.msg-bar.is-on { background: #fff; border-color: var(--blue); }
.mb-sum { font-weight: 700; }
.mb-wait, .mb-block { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.tri-detail {
  padding: 16px; background: var(--bg-dark); color: #E4DCF2; border-radius: var(--r-lg);
}
.tri-detail[hidden] { display: none !important; }
.tri-detail ul { list-style: none; margin-top: 12px; display: grid; gap: 8px; font-size: 0.88rem; }
.tri-detail .hint-line, .container.hint-line { width: min(1120px, calc(100% - 48px)); }

/* Compass */
.compass-section .container {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center;
}
.compass {
  position: relative; width: min(420px, 100%); aspect-ratio: 1;
  margin: 0 auto; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0,104,255,0.15), rgba(255,122,26,0.15), rgba(0,166,138,0.15), rgba(121,87,232,0.15), rgba(0,104,255,0.15));
  border: 1px solid var(--line);
}
.compass-center {
  position: absolute; inset: 28%; background: var(--surface); border-radius: 50%;
  display: grid; place-content: center; text-align: center; padding: 12px;
  border: 1px solid var(--line); z-index: 2;
}
.compass-center p { font-size: 0.8rem; font-weight: 600; margin-top: 6px; }
.compass-ring { position: absolute; inset: 0; }
.compass-dir {
  position: absolute; left: 50%; top: 50%; width: 88px;
  transform: rotate(calc(var(--i) * 60deg)) translateY(-175px) rotate(calc(var(--i) * -60deg));
  margin-left: -44px; padding: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; font-size: 0.72rem; font-weight: 800; text-align: center;
}
.compass-dir.is-on, .compass-dir.is-filled { border-color: var(--blue); color: var(--blue); }
.compass-dir.is-skip { opacity: 0.35; text-decoration: line-through; }
.compass-needle {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 70px;
  margin-left: -2px; margin-top: -70px;
  background: var(--risk); transform-origin: bottom center;
  transform: rotate(-18deg); border-radius: 2px; z-index: 1;
  transition: transform 0.4s;
}
.compass[data-balance="ok"] .compass-needle,
.compass-needle.is-steady { background: var(--teal); transform: rotate(0deg); }
.compass-panel {
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.compass-panel ul { list-style: none; margin-top: 10px; display: grid; gap: 8px; font-size: 0.88rem; color: var(--muted); }

/* Draft studio tracks */
.studio-rails { display: grid; gap: 10px; }
.sent-track {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.sent-track.is-hang { border-color: var(--risk); opacity: 0.85; border-style: dashed; }
.st-main { padding: 12px 14px; }
.st-main p { margin-top: 6px; font-size: 0.95rem; }
.st-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.src-track {
  display: flex; align-items: center; gap: 8px; padding: 4px 14px;
  background: var(--bg-dark); color: #C9BFD9; font-size: 0.7rem; font-family: var(--mono);
}
.src-track i { width: 100%; max-width: 40px; height: 2px; background: var(--teal); display: block; }
.src-track.is-empty i { background: var(--risk); }
.src-track.is-lit { background: #163a2f; color: #b6f0e0; }

/* Promise scanner */
.scanner {
  position: relative; height: 280px; overflow: hidden;
  background: var(--bg-dark); border-radius: var(--r-lg); color: #E4DCF2;
}
.scan-text { padding: 24px; display: grid; gap: 12px; font-size: 1rem; }
.scan-text .is-hit { color: #ffb4ba; }
.scan-text .is-caught {
  background: rgba(217,74,85,0.25); padding: 4px 8px; border-radius: 4px;
}
.scan-line {
  position: absolute; left: 0; right: 0; top: -4px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  box-shadow: 0 0 16px var(--teal); opacity: 0;
}
.scanner.is-scanning .scan-line {
  opacity: 1; animation: scanMove 2.4s linear infinite;
}
@keyframes scanMove { from { top: 0; } to { top: 100%; } }
.prom-slots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.prom-slot {
  padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  display: grid; gap: 4px; font-size: 0.8rem;
}
.prom-slot b { font-family: var(--display); font-size: 0.95rem; }
.prom-slot.is-on { border-color: var(--blue); }
.ps-st { color: var(--wait); font-weight: 700; }

/* Escalation ladder */
.ladder-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ladder {
  position: relative; display: grid; gap: 8px;
  padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.ladder-rung {
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  display: flex; gap: 12px; align-items: center;
}
.esc-block {
  position: absolute; left: 20%; right: 20%;
  top: calc(12px + var(--rung) * 56px);
  padding: 12px; background: var(--blue); color: #fff; border-radius: 10px;
  text-align: left; transition: top 0.35s ease; z-index: 2;
  box-shadow: 0 10px 24px rgba(0,104,255,0.35);
}
.esc-brief {
  padding: 16px; background: var(--bg-dark); color: #E4DCF2; border-radius: var(--r-lg);
}
.esc-brief ul { list-style: none; margin-top: 10px; display: grid; gap: 8px; font-size: 0.88rem; }

/* Follow-up tapes */
.fu-tapes { display: grid; gap: 18px; }
.fu-tape {
  position: relative; height: 64px; border-radius: 8px;
  background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--risk) calc(var(--urgency) * 70%), #fff));
  border: 2px solid var(--line); overflow: visible;
}
.fu-tape.is-urgent { border-color: var(--risk); }
.fu-tape.is-done { opacity: 0.7; background: #e8f7f3; }
.ft-start {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
}
.ft-mark {
  position: absolute; top: 50%; left: var(--x); transform: translate(-50%, -50%);
  padding: 6px 8px; background: var(--bg-dark); color: #fff; border-radius: 6px;
  font-size: 0.68rem; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.ft-mark.is-due { background: var(--risk); }
.ft-mark.is-punch {
  background: var(--teal);
  mask-image: radial-gradient(circle at 8px 50%, transparent 4px, #000 5px);
}
.ft-mark.is-on { outline: 2px solid var(--blue); }

/* Fingerprint */
.fp-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; }
.fingerprint { width: 100%; max-width: 280px; }
.fp-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.fp-shape { fill: rgba(0,104,255,0.18); stroke: var(--blue); stroke-width: 2; }
.fp-weak { fill: rgba(217,74,85,0.15); stroke: var(--risk); }
.fingerprint text { font-size: 8px; fill: var(--muted); font-family: var(--sans); }
.fp-dims { list-style: none; display: grid; gap: 8px; }
.fp-dims li { padding: 8px 10px; border-left: 3px solid var(--line); font-size: 0.9rem; }
.fp-dims li.is-on { border-color: var(--risk); background: rgba(217,74,85,0.08); }

/* Workbench */
.workbench {
  display: grid; gap: 14px; padding: 18px; background: var(--bg-dark);
  border-radius: var(--r-lg); color: #E4DCF2;
}
.wb-in, .wb-out { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-mod {
  padding: 12px 14px; background: var(--surface-dark); border: 1px solid #4a3f66;
  border-radius: 8px; font-weight: 700; font-size: 0.85rem; color: #E4DCF2;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 160px;
}
.wb-mod b { font-size: 0.88rem; }
.wb-mod small { font-weight: 600; font-size: 0.7rem; color: #9ec1ff; }
.wb-mod.is-on, .wb-mod.is-ready { border-color: var(--teal); }
.wb-mod.is-open { min-width: 260px; }
.wb-mod pre { margin-top: 8px; font-size: 0.7rem; color: #9ec1ff; white-space: pre-wrap; text-align: left; width: 100%; }
.wb-core {
  padding: 20px; text-align: center; border: 1px dashed #6a5c8a; border-radius: 12px;
}
.code-block {
  margin-top: 14px; padding: 14px; background: var(--bg-dark); color: #C9BFD9;
  border-radius: var(--r); font-family: var(--mono); font-size: 0.78rem; overflow: auto;
}
.hub-strip {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--bg-dark);
  border-radius: 999px; justify-content: center;
}
.hub {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
  color: #E4DCF2; border: 1px solid #4a3f66;
}
.hub.is-on { background: var(--blue); border-color: var(--blue); }

/* Pricing volume column */
.price-layout {
  display: grid; grid-template-columns: 1fr 120px 1fr; gap: 24px; align-items: end;
}
.price-inputs { display: grid; gap: 12px; }
.price-inputs label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 700; }
.price-inputs input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.vol-col {
  position: relative; height: 320px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.vol-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h);
  background: linear-gradient(180deg, var(--blue), var(--teal));
  transition: height 0.35s ease;
}
.vol-mark {
  position: absolute; left: 0; right: 0; bottom: var(--y);
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; color: var(--muted); border-top: 1px dashed var(--line); z-index: 1;
}
.plan-card {
  padding: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.price { font-family: var(--display); font-size: 2rem; font-weight: 700; margin: 8px 0; }
.price span { font-size: 0.9rem; font-family: var(--sans); color: var(--muted); font-weight: 500; }
.plan-card ul { list-style: none; display: grid; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 0.9rem; }
.chapter-compare { margin-top: 20px; overflow: auto; }
.chapter-compare table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.chapter-compare th, .chapter-compare td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.chapter-compare[hidden] { display: none !important; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.about-grid h2 { margin: 8px 0 12px; font-size: 1.5rem; }
.about-list { list-style: none; display: grid; gap: 10px; max-width: 640px; }
.about-list li {
  padding: 12px 14px; border-left: 3px solid var(--blue);
  background: var(--surface); font-weight: 600;
}
.about-list a { color: var(--fg); text-decoration: none; }
.status-list { list-style: none; display: grid; gap: 10px; }
.status-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.status-list i.ok { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); display: block; }
.changelog article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.changelog time { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.legal-prose { max-width: 68ch; color: var(--muted); line-height: 1.7; }
.cookie-panel {
  margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r);
  display: grid; gap: 10px; max-width: 400px; background: var(--surface);
}
.cookie-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }

/* Footer */
.site-footer { background: var(--bg-dark); color: #C9BFD9; margin-top: 40px; padding: 40px 0 0; }
.footer-grid {
  width: min(1120px, calc(100% - 48px)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 28px;
}
.footer-col h4 {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: #8a7c9e; margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: #E4DCF2; text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.footer-col a:hover { color: #9ec1ff; }
.footer-bar { border-top: 1px solid rgba(216,199,126,0.15); padding: 18px 0 28px; }
.footer-tag { font-size: 0.88rem; color: #8a7c9e; max-width: 56ch; margin-bottom: 12px; }
.footer-bar-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 0.82rem; color: #8a7c9e;
}
.footer-legal { display: flex; gap: 14px; }
.footer-legal a { color: #C9BFD9; text-decoration: none; }

/* Auth — dark ink */
.auth-body {
  min-height: 100dvh; background: var(--bg-dark); color: #E4DCF2;
}
.auth-shell {
  width: min(420px, calc(100% - 32px)); margin: 0 auto;
  padding: 48px 0 40px; display: flex; flex-direction: column; gap: 20px;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font-family: var(--display); font-size: 1.35rem; font-weight: 700;
}
.auth-card {
  background: var(--surface-dark); border: 1px solid #4a3f66;
  border-radius: var(--r-lg); padding: 28px;
}
.auth-card h1 { margin: 8px 0 10px; font-size: 1.6rem; color: #fff; }
.auth-card .lead { color: #A99BB8; }
.auth-card label { color: #C9BFD9; }
.auth-card input { background: #201A35; border-color: #4a3f66; color: #fff; }
.auth-alt { margin-top: 14px; font-size: 0.9rem; color: #A99BB8; }
.linkish { color: #9ec1ff; font-weight: 700; text-decoration: underline; }
.auth-foot { font-size: 0.8rem; color: #8a7c9e; text-align: center; }
.hint-line.is-ok, [data-auth-msg].is-ok { color: var(--teal); }

@media (max-width: 960px) {
  .nav-main { display: none; }
  .nav-toggle { display: inline-flex; }
  .xray-panels, .audit-layout, .tape-flow, .triage-layout,
  .compass-section .container, .ladder-layout, .fp-layout,
  .price-layout, .about-grid, .contact-grid, .not-row, .prom-slots, .footer-grid,
  .check-list, .solution-catalog {
    grid-template-columns: 1fr;
  }
  .solution-catalog { grid-template-columns: 1fr 1fr; }
  .xray-top, .xray-headline { grid-template-columns: 1fr; }
  .phase-dots { grid-template-columns: 1fr 1fr 1fr; }
  .tape-flow { grid-template-columns: 1fr; }
  .price-layout { grid-template-columns: 1fr; }
  .vol-col { height: 200px; }
  .compass-dir {
    transform: rotate(calc(var(--i) * 60deg)) translateY(-140px) rotate(calc(var(--i) * -60deg));
  }
}
@media (max-width: 640px) {
  .container, .xray-top, .xray-stage, .footer-grid { width: calc(100% - 32px); }
  .header-actions .btn-ghost { display: none; }
  .pillar-flow .pf-arrow { display: none; }
  .solution-catalog { grid-template-columns: 1fr; }
  .stack-arrow { display: none; }
}
