:root {
  color-scheme: light;
  --ink: #101820;
  --ink-soft: #17232d;
  --ink-muted: #71808a;
  --paper: #f3f2ec;
  --paper-dim: #e6e8e3;
  --line: rgba(243, 242, 236, 0.13);
  --line-light: rgba(16, 24, 32, 0.12);
  --mint: #88e0c1;
  --mint-deep: #2c9b78;
  --amber: #f5c36b;
  --coral: #ff8f82;
  --blue: #8ab9ff;
  --white: #fffefa;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
  --radius: 18px;
  --mono: "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
  --body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Iowan Old Style", "Baskerville", "Songti SC", "STSong", serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ink); }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 82% -12%, rgba(82, 137, 161, 0.22), transparent 36rem),
    radial-gradient(circle at 4% 36%, rgba(74, 125, 111, 0.1), transparent 28rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, select { font: inherit; }

button, select { cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
}

.evidence-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 27px 10px 23px;
  border-right: 1px solid var(--line);
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.13em;
  font-family: var(--mono);
  font-size: 9px;
}

.rail-mark { display: grid; place-items: center; gap: 10px; color: var(--mint); }
.rail-mark span { font-weight: 800; letter-spacing: 0.04em; font-size: 15px; }
.rail-mark i, .rail-mark b { display: block; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.rail-mark b { width: 12px; height: 12px; background: var(--mint); border-color: var(--mint); box-shadow: 0 0 0 5px rgba(136,224,193,.11); }
.rail-copy { margin-top: 34px; line-height: 1.65; writing-mode: vertical-rl; transform: rotate(180deg); }
.rail-copy span, .rail-foot span { color: #a7b1b0; }
.rail-line { flex: 1; width: 1px; margin: 30px 0; background: linear-gradient(var(--mint), transparent); opacity: .55; }
.rail-foot { line-height: 1.7; }

.page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(25px, 4vw, 58px) clamp(18px, 4vw, 72px) 40px;
}

.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 29px; }
.title-lockup { min-width: 0; }
.eyebrow { margin: 0 0 7px; color: var(--mint); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--white); font-family: var(--display); font-size: clamp(39px, 5.4vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
h2 { margin-bottom: 0; color: var(--white); font-size: clamp(19px, 2vw, 25px); letter-spacing: -.025em; line-height: 1.15; }
h3 { margin-bottom: 11px; color: var(--ink-muted); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lede { max-width: 480px; margin-bottom: 0; color: #afbabd; font-size: 14px; }

.toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.select-label, .small-select-label { display: inline-flex; align-items: center; gap: 8px; color: #aeb8ba; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
select, .search-input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: rgba(255,255,255,.06);
  color: var(--paper);
  font-size: 12px;
}
select option { background: var(--ink-soft); color: var(--paper); }
.quiet-button { min-height: 36px; border: 1px solid rgba(136,224,193,.45); border-radius: 9px; padding: 0 13px; background: transparent; color: var(--mint); font-size: 12px; transition: background .18s ease, color .18s ease; }
.quiet-button:hover { background: var(--mint); color: var(--ink); }
.source-note { color: #7e8b92; font-family: var(--mono); font-size: 10px; }

.boundary-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  margin-bottom: 45px;
  border: 1px solid rgba(245,195,107,.35);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: linear-gradient(120deg, rgba(245,195,107,.12), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
}
.boundary-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--amber); border-radius: 50%; color: var(--amber); font-size: 22px; }
.boundary-banner h2 { margin-bottom: 5px; font-family: var(--display); font-size: 22px; font-weight: 500; }
.boundary-banner p:last-child { margin-bottom: 0; color: #bbc0b8; font-size: 12px; }
.boundary-flags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.boundary-flag { border: 1px solid rgba(245,195,107,.28); border-radius: 999px; padding: 5px 8px; color: var(--amber); font-family: var(--mono); font-size: 9px; white-space: nowrap; }

.summary-section { margin-bottom: 39px; }
.section-heading, .panel-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; }
.section-heading { margin-bottom: 17px; }
.section-note { margin-bottom: 2px; color: #829097; font-family: var(--mono); font-size: 10px; }
.summary-grid { display: grid; grid-template-columns: minmax(230px, 1.45fr) repeat(4, minmax(110px, .8fr)); gap: 10px; }
.summary-card { min-width: 0; min-height: 124px; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 17px 14px; background: rgba(255,255,255,.045); }
.summary-card.lead { display: flex; flex-direction: column; justify-content: space-between; border-color: rgba(136,224,193,.36); background: linear-gradient(135deg, rgba(136,224,193,.15), rgba(255,255,255,.035)); }
.summary-card .card-label { color: #9ba7a9; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.summary-card .card-value { margin-top: 13px; color: var(--white); font-size: 29px; font-weight: 700; letter-spacing: -.04em; }
.summary-card.lead .card-value { display: flex; align-items: baseline; gap: 9px; margin-top: 11px; font-family: var(--display); font-size: clamp(28px, 3.4vw, 44px); font-weight: 500; }
.summary-card.lead .card-value small { color: #a1b6b2; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .08em; }
.summary-card .card-caption { margin-top: 6px; color: #7f8d92; font-family: var(--mono); font-size: 9px; }
.summary-card .progress { height: 5px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.summary-card .progress > span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); align-items: start; gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.04); }
.panel-heading { margin-bottom: 12px; }
.panel-intro { margin-bottom: 18px; color: #839197; font-size: 11px; }
.panel-tools, .log-tools { display: flex; align-items: center; gap: 9px; }
.coverage-list { display: grid; gap: 7px; }
.coverage-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; background: rgba(255,255,255,.035); color: var(--paper); text-align: left; transition: border-color .16s ease, background .16s ease; }
.coverage-row:hover, .coverage-row.is-selected { border-color: rgba(138,185,255,.48); background: rgba(138,185,255,.1); }
.coverage-main { min-width: 0; }
.coverage-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 650; }
.coverage-index { color: #718188; font-family: var(--mono); font-size: 9px; }
.coverage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coverage-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; color: #819096; font-family: var(--mono); font-size: 9px; }
.coverage-meta span { white-space: nowrap; }
.coverage-code { overflow: hidden; max-width: 180px; color: #77868c; font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; border: 1px solid currentColor; border-radius: 999px; padding: 3px 8px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.status-chip::before { content: attr(data-icon); font-size: 12px; line-height: 1; }
.tone-pass { color: var(--mint); }
.tone-retry { color: var(--amber); }
.tone-degraded { color: #f1ae69; }
.tone-fail { color: var(--coral); }
.tone-unknown { color: var(--blue); }
.tone-na { color: #9da6aa; }

.context-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 18px; }
.context-item { min-width: 0; border-left: 2px solid rgba(136,224,193,.3); padding: 5px 8px; background: rgba(255,255,255,.035); }
.context-key { color: #7d8b91; font-family: var(--mono); font-size: 9px; }
.context-value { margin-top: 2px; overflow-wrap: anywhere; color: var(--paper); font-size: 11px; }
.digest-list { display: grid; gap: 8px; }
.digest-row { display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; }
.digest-label { color: #829097; font-size: 10px; }
.digest-value { min-width: 0; overflow-wrap: anywhere; color: #c2cfca; font-family: var(--mono); font-size: 9px; line-height: 1.35; }
.copy-button { border: 0; border-bottom: 1px solid rgba(136,224,193,.45); padding: 0 0 2px; background: transparent; color: var(--mint); font-family: var(--mono); font-size: 9px; }
.panel-footnote { margin: 18px 0 0; color: #718087; font-size: 10px; }

.scenarios-panel { margin-bottom: 14px; }
.scenario-layout { display: grid; grid-template-columns: minmax(230px, .68fr) minmax(0, 1.32fr); gap: 12px; }
.scenario-list { display: grid; align-content: start; gap: 6px; max-height: 560px; overflow: auto; padding-right: 3px; }
.scenario-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; background: rgba(255,255,255,.035); color: var(--paper); text-align: left; }
.scenario-row:hover, .scenario-row.is-selected { border-color: rgba(138,185,255,.45); background: rgba(138,185,255,.1); }
.scenario-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.scenario-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.scenario-id { margin-top: 2px; overflow: hidden; color: #74838a; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.scenario-detail { min-width: 0; min-height: 300px; border: 1px solid var(--line-light); border-radius: 13px; padding: 17px; background: var(--paper); color: var(--ink); }
.scenario-detail .eyebrow { color: var(--mint-deep); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 13px; }
.detail-title { min-width: 0; }
.detail-title h3 { margin: 0 0 4px; color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.025em; text-transform: none; }
.detail-title p { margin: 0; overflow-wrap: anywhere; color: #6d7b7d; font-family: var(--mono); font-size: 9px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.stat-pill { border: 1px solid rgba(16,24,32,.13); border-radius: 999px; padding: 4px 7px; color: #455256; font-family: var(--mono); font-size: 9px; }
.trace { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin-bottom: 15px; }
.trace-step { min-width: 0; border-top: 3px solid #9aa5a1; padding: 7px 5px 4px; }
.trace-step[data-status="PASS"] { border-color: var(--mint-deep); }
.trace-step[data-status="DEGRADED"], .trace-step[data-status="RETRYABLE"] { border-color: #c88a2f; }
.trace-step[data-status="FAIL"], .trace-step[data-status="INVALID"] { border-color: #cf5a4e; }
.trace-step[data-status="UNVERIFIED"] { border-color: #6188b9; }
.trace-label { color: #697879; font-family: var(--mono); font-size: 8px; }
.trace-status { margin-top: 2px; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-block { min-width: 0; }
.detail-block h4 { margin: 0 0 5px; color: #6b7979; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.detail-block p, .detail-block li { margin-bottom: 4px; color: #283639; font-size: 11px; overflow-wrap: anywhere; }
.detail-block ul { margin: 0; padding-left: 17px; }
.empty-state { display: grid; place-items: center; min-height: 260px; color: #7a8988; font-family: var(--mono); font-size: 10px; text-align: center; }

.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.fact-list, .cause-list, .verification-list { display: grid; gap: 7px; }
.fact-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: 11px; }
.fact-row:first-child { padding-top: 0; }
.fact-key { color: #8c9a9e; }
.fact-value { color: var(--paper); font-family: var(--mono); font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.cause-card { border-left: 2px solid var(--blue); padding: 9px 11px; background: rgba(138,185,255,.08); }
.cause-card p { margin: 0; color: #c2cbcd; font-size: 12px; }
.cause-card small { display: block; margin-top: 4px; color: var(--blue); font-family: var(--mono); font-size: 9px; }
.inferred-tag { border: 1px solid rgba(138,185,255,.35); border-radius: 999px; padding: 4px 7px; color: var(--blue); font-family: var(--mono); font-size: 9px; }

.action-panel { margin-bottom: 14px; }
.action-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 25px; }
.recommendations-list { margin: 0; padding-left: 19px; }
.recommendations-list li { margin-bottom: 8px; color: #c5ced0; font-size: 12px; }
.verification-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: rgba(255,255,255,.035); }
.verification-card p { margin: 0 0 7px; color: #c5ced0; font-size: 11px; }
.condition-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.condition-list li { border-radius: 999px; padding: 3px 6px; background: rgba(255,255,255,.08); color: #9eadaf; font-family: var(--mono); font-size: 9px; }

.logs-panel { margin-bottom: 22px; }
.log-tools { flex-wrap: wrap; justify-content: flex-end; }
.search-input { width: min(210px, 100%); }
.log-list { display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.log-row { display: grid; grid-template-columns: 50px 65px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; border-bottom: 1px solid rgba(255,255,255,.06); padding: 8px 2px; }
.log-time, .log-kind, .log-code { color: #718087; font-family: var(--mono); font-size: 9px; }
.log-kind { color: #a6b4b3; }
.log-detail { min-width: 0; overflow: hidden; color: #c1cbcc; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.log-empty { padding: 24px 0; color: #829097; font-family: var(--mono); font-size: 10px; text-align: center; }

.footer-note { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; color: #66757c; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; transform: translateY(12px); opacity: 0; border: 1px solid rgba(136,224,193,.5); border-radius: 8px; padding: 9px 12px; background: var(--ink-soft); color: var(--mint); font-family: var(--mono); font-size: 10px; pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .toolbar { justify-content: flex-start; }
  .summary-grid { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .summary-card.lead { grid-column: 1 / -1; min-height: 105px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .evidence-rail { display: none; }
  .page { padding: 26px 14px 28px; }
  h1 { font-size: 46px; }
  .boundary-banner { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 15px; }
  .boundary-flags { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .summary-card { min-height: 100px; padding: 13px; }
  .summary-card.lead { min-height: 110px; }
  .summary-card .card-value { margin-top: 9px; font-size: 25px; }
  .workspace-grid, .insight-grid, .action-columns { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; border-radius: 15px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .panel-tools, .log-tools { justify-content: flex-start; width: 100%; }
  .coverage-row { grid-template-columns: minmax(0, 1fr) auto; }
  .coverage-code { grid-column: 1 / -1; max-width: none; }
  .scenario-layout { grid-template-columns: minmax(0, 1fr); }
  .scenario-list { max-height: 280px; }
  .trace { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-columns { grid-template-columns: minmax(0, 1fr); }
  .context-block { grid-template-columns: minmax(0, 1fr); }
  .digest-row { grid-template-columns: 83px minmax(0, 1fr) auto; }
  .log-row { grid-template-columns: 42px 52px minmax(0, 1fr); }
  .log-row .status-chip { grid-column: 3; justify-self: start; margin-top: 3px; }
  .footer-note { align-items: flex-start; flex-direction: column; gap: 4px; }
}

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

@media (max-width: 340px) {
  /* Keep the exact site name as one intentional lockup on very narrow phones. */
  h1 {
    font-size: 32px;
    letter-spacing: -.07em;
  }
}

/* Quick Start classroom lane -------------------------------------------- */
.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: -2px 0 12px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: rgba(0,0,0,.16);
}
.mode-switch-button {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 47px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px 10px;
  background: transparent;
  color: #9caeb0;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.mode-switch-button span { overflow: hidden; color: inherit; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mode-switch-button small { overflow: hidden; color: #718188; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mode-switch-button:hover { border-color: rgba(136,224,193,.35); color: var(--paper); }
.mode-switch-button.is-selected { border-color: rgba(136,224,193,.58); background: rgba(136,224,193,.13); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(136,224,193,.08); }
.mode-switch-button.is-selected small { color: #a6c5bb; }
.run-mode-card { transition: border-color .18s ease, background .18s ease, transform .18s ease, opacity .18s ease; }
.run-mode-card[data-mode]:not(.is-selected) { opacity: .78; }
.run-mode-card[data-mode].is-selected { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(0,0,0,.12); }
.run-mode-card.quick-start-mode { border-color: rgba(136,224,193,.62); background: linear-gradient(140deg, rgba(136,224,193,.18), rgba(255,255,255,.035)); }
.run-mode-card.quick-start-mode .mode-kicker, .run-mode-card.quick-start-mode .mode-button span { color: var(--mint); }

.quick-start-panel, .severity-ledger-panel, .capability-panel { margin-bottom: 15px; }
.quick-start-panel { border-color: rgba(136,224,193,.38); background: linear-gradient(135deg, rgba(136,224,193,.09), rgba(255,255,255,.035)); }
.quick-start-panel[data-state="READY"] { border-color: rgba(136,224,193,.7); }
.quick-start-panel[data-state="DEGRADED"] { border-color: rgba(241,174,105,.55); }
.quick-start-panel[data-state="CRITICAL"] { border-color: rgba(255,143,130,.65); background: linear-gradient(135deg, rgba(255,143,130,.1), rgba(255,255,255,.035)); }
.quick-start-state-line { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.elapsed-badge { border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 4px 8px; color: #a5b2b3; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.quick-start-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 15px 0 14px; }
.quick-progress-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; padding: 8px 9px; background: rgba(0,0,0,.12); }
.quick-progress-marker { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #64777b; border-radius: 50%; color: #93a4a5; font-family: var(--mono); font-size: 10px; }
.quick-progress-copy { min-width: 0; }
.quick-progress-copy b { display: block; overflow: hidden; color: #dce8e4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quick-progress-copy small { display: block; overflow: hidden; margin-top: 2px; color: #7e9093; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.quick-progress-row .status-chip { min-height: 20px; padding: 2px 6px; font-size: 8px; }
.quick-start-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-start-boundary, .capability-boundary { display: flex; align-items: flex-start; gap: 7px; margin: 13px 0 0; color: #829398; font-family: var(--mono); font-size: 9px; line-height: 1.5; }
.quick-start-boundary span, .capability-boundary span { color: var(--amber); }

.severity-ledger-panel { border-color: rgba(245,195,107,.25); }
.severity-ledger-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.severity-ledger-card { min-width: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.035); }
.critical-ledger { border-color: rgba(255,143,130,.32); background: rgba(255,143,130,.06); }
.warning-ledger { border-color: rgba(245,195,107,.32); background: rgba(245,195,107,.06); }
.quality-ledger { border-color: rgba(138,185,255,.3); background: rgba(138,185,255,.06); }
.severity-ledger-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.severity-ledger-icon { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid currentColor; border-radius: 50%; font-family: var(--mono); font-size: 12px; }
.critical-ledger .severity-ledger-icon, .critical-ledger strong { color: var(--coral); }
.warning-ledger .severity-ledger-icon, .warning-ledger strong { color: var(--amber); }
.quality-ledger .severity-ledger-icon, .quality-ledger strong { color: var(--blue); }
.severity-ledger-head div { min-width: 0; }
.severity-ledger-head strong { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.severity-ledger-head small { display: block; overflow: hidden; margin-top: 2px; color: #869497; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.severity-count { color: var(--paper); font-family: var(--display); font-size: 25px; font-weight: 500; }
.severity-ledger-card p { min-height: 31px; margin: 9px 0 0; color: #aebabc; font-size: 10px; line-height: 1.45; }
.severity-ledger-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; color: #7f9094; font-family: var(--mono); font-size: 9px; }
.severity-ledger-note b:first-child { color: var(--amber); }
.severity-ledger-note b:nth-of-type(2) { color: var(--coral); }

.capability-panel { border-color: rgba(138,185,255,.27); }
.feature-availability { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.capability-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; padding: 9px 10px; background: rgba(0,0,0,.1); }
.capability-copy { min-width: 0; }
.capability-copy b { display: block; overflow: hidden; color: #dbe7e4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.capability-copy small { display: block; overflow: hidden; margin-top: 2px; color: #7e9095; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.capability-row .status-chip { min-height: 21px; padding: 2px 6px; font-size: 8px; }

@media (max-width: 1050px) {
  .run-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-mode-card.quick-start-mode { grid-column: 1 / -1; }
  .severity-ledger-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .mode-switch { grid-template-columns: minmax(0, 1fr); }
  .mode-switch-button { min-height: 41px; }
  .run-mode-grid { grid-template-columns: minmax(0, 1fr); }
  .run-mode-card.quick-start-mode { grid-column: auto; }
  .quick-start-state-line { justify-content: flex-start; }
  .quick-start-progress, .severity-ledger-grid, .feature-availability { grid-template-columns: minmax(0, 1fr); }
  .quick-start-actions .primary-button, .quick-start-actions .quiet-button { width: 100%; }
  .severity-ledger-card p { min-height: 0; }
}

/* S11 workbench surface -------------------------------------------------- */
.primary-button {
  min-height: 40px;
  border: 1px solid var(--mint);
  border-radius: 10px;
  padding: 0 16px;
  background: var(--mint);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(136,224,193,.16);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button:hover { transform: translateY(-1px); background: #a3f0d2; box-shadow: 0 12px 26px rgba(136,224,193,.22); }
.primary-button:active { transform: translateY(0); }
.live-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.live-status-chip::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent); }

.workflow-hero {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 15px;
  border: 1px solid rgba(136,224,193,.33);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 88% 22%, rgba(136,224,193,.16), transparent 20rem),
    linear-gradient(135deg, rgba(136,224,193,.13), rgba(255,255,255,.035) 55%, rgba(138,185,255,.08));
  box-shadow: 0 24px 70px rgba(0,0,0,.2);
}
.workflow-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.workflow-copy h2 { max-width: 540px; margin-bottom: 13px; font-family: var(--display); font-size: clamp(28px, 3.3vw, 48px); font-weight: 500; letter-spacing: -.045em; line-height: 1.05; }
.workflow-copy > p:not(.eyebrow) { max-width: 540px; margin-bottom: 20px; color: #bcc9c8; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.hero-note { display: flex; align-items: center; gap: 8px; color: #8fa3a2; font-family: var(--mono); font-size: 9px; line-height: 1.5; }
.signal-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(136,224,193,.11); }
.flow-track { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; min-width: 0; align-content: center; }
.flow-step { display: flex; align-items: center; gap: 8px; min-width: 108px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; padding: 10px 11px; background: rgba(8,17,24,.42); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.flow-step.is-active { border-color: rgba(136,224,193,.72); background: rgba(136,224,193,.13); transform: translateY(-2px); }
.flow-step.is-done { border-color: rgba(136,224,193,.34); }
.flow-marker { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border: 1px solid #64757a; border-radius: 50%; color: #a0adae; font-family: var(--mono); font-size: 9px; }
.flow-step.is-active .flow-marker, .flow-step.is-done .flow-marker { border-color: var(--mint); color: var(--mint); }
.flow-copy { display: grid; min-width: 0; gap: 2px; }
.flow-copy b { overflow: hidden; color: #e8f2ef; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.flow-copy small { color: #829398; font-family: var(--mono); font-size: 8px; }
.flow-connector { color: #5c7474; font-family: var(--mono); font-size: 14px; }

.run-modes { margin: 28px 0 15px; }
.run-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.run-mode-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 21px 22px 19px; background: rgba(255,255,255,.045); }
.run-mode-card.quick-mode { border-color: rgba(138,185,255,.38); background: linear-gradient(140deg, rgba(138,185,255,.12), rgba(255,255,255,.035)); }
.run-mode-card.doctor-mode { border-color: rgba(136,224,193,.38); background: linear-gradient(140deg, rgba(136,224,193,.12), rgba(255,255,255,.035)); }
.run-mode-card.celebrate-mode { border-color: rgba(245,195,107,.4); background: linear-gradient(140deg, rgba(245,195,107,.13), rgba(255,255,255,.035)); }
.run-mode-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mode-kicker { color: #9eafb1; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.duration-badge { border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 4px 7px; color: #b9c6c3; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.run-mode-card h3 { margin: 0 0 8px; color: var(--white); font-family: var(--display); font-size: 25px; font-weight: 500; letter-spacing: -.03em; text-transform: none; }
.run-mode-card p { min-height: 43px; margin-bottom: 16px; color: #aebbc0; font-size: 12px; }
.mode-sequence { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; color: #d2dfdc; font-family: var(--mono); font-size: 9px; }
.mode-sequence span { border-radius: 5px; padding: 4px 6px; background: rgba(255,255,255,.08); }
.mode-sequence i { color: #708389; font-style: normal; }
.mode-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 38px; border: 1px solid rgba(255,255,255,.23); border-radius: 9px; padding: 0 11px; background: rgba(255,255,255,.055); color: var(--paper); font-size: 11px; font-weight: 700; transition: border-color .18s ease, background .18s ease; }
.mode-button:hover { border-color: var(--mint); background: rgba(136,224,193,.12); }
.mode-button span { color: var(--mint); font-size: 15px; }

.identity-panel { margin-bottom: 15px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.035); }
.identity-source { color: #829397; font-family: var(--mono); font-size: 9px; }
.identity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.identity-card { min-width: 0; border-left: 2px solid rgba(136,224,193,.34); border-radius: 0 9px 9px 0; padding: 10px 11px; background: rgba(255,255,255,.045); }
.identity-label { display: block; color: #819095; font-family: var(--mono); font-size: 9px; }
.identity-value { display: block; overflow: hidden; margin: 6px 0 8px; color: #edf5f0; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.identity-card .status-chip { min-height: 20px; padding: 2px 6px; font-size: 8px; }

.self-check-panel { margin-bottom: 15px; }
.check-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-group { min-width: 0; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 15px; background: rgba(0,0,0,.1); }
.static-group { border-color: rgba(136,224,193,.23); }
.dynamic-group { border-color: rgba(245,195,107,.27); }
.check-group-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.group-marker { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; color: var(--mint); font-family: var(--mono); font-size: 9px; }
.dynamic-group .group-marker { color: var(--amber); }
.check-group-head h3 { margin: 0 0 3px; color: var(--paper); font-size: 11px; }
.check-group-head p { margin: 0; color: #7f9095; font-size: 10px; }
.check-list { display: grid; gap: 5px; }
.check-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; border: 1px solid transparent; border-radius: 9px; padding: 8px 9px; background: rgba(255,255,255,.035); }
.check-icon { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #627379; border-radius: 50%; color: #8da0a1; font-family: var(--mono); font-size: 10px; }
.check-copy { min-width: 0; }
.check-copy b { display: block; overflow: hidden; color: #dce8e4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.check-copy small { display: block; overflow: hidden; margin-top: 2px; color: #78898e; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.check-row .status-chip { min-height: 20px; padding: 2px 6px; font-size: 8px; }
.severity-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.severity-rule { display: flex; align-items: flex-start; gap: 9px; border-radius: 10px; padding: 10px 11px; }
.warning-rule { border: 1px solid rgba(245,195,107,.3); background: rgba(245,195,107,.08); }
.critical-rule { border: 1px solid rgba(255,143,130,.3); background: rgba(255,143,130,.08); }
.severity-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-family: var(--mono); font-size: 11px; }
.warning-rule .severity-icon, .warning-rule strong { color: var(--amber); }
.critical-rule .severity-icon, .critical-rule strong { color: var(--coral); }
.severity-rule p { margin: 4px 0 0; color: #adb8b8; font-size: 10px; line-height: 1.45; }

.action-fast-path { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) auto; gap: 18px; align-items: center; margin-bottom: 18px; border: 1px solid rgba(136,224,193,.34); border-radius: var(--radius); padding: 19px 21px; background: linear-gradient(115deg, rgba(136,224,193,.13), rgba(255,255,255,.035)); }
.action-fast-path-lead h2 { margin-bottom: 7px; font-family: var(--display); font-size: 24px; font-weight: 500; }
.action-fast-path-lead p:last-child { margin: 0; color: #b9c0ba; font-size: 11px; line-height: 1.55; }
.fast-path-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.fast-path-point { display: grid; gap: 2px; min-width: 0; border: 1px solid rgba(136,224,193,.2); border-radius: 10px; padding: 8px 9px; background: rgba(255,255,255,.04); }
.fast-path-point b { color: #dce8e4; font-size: 10px; }
.fast-path-point small { color: #869396; font-family: var(--mono); font-size: 8px; }
.action-fast-path-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; text-decoration: none; white-space: nowrap; }

.replay-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.replay-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; padding: 13px 15px; background: rgba(255,255,255,.035); color: var(--paper); cursor: pointer; list-style: none; }
.replay-details > summary::-webkit-details-marker { display: none; }
.replay-details > summary > span { display: grid; gap: 3px; }
.replay-details > summary b { font-size: 13px; }
.replay-details > summary small { color: #819095; font-family: var(--mono); font-size: 9px; }
.replay-details > summary i { color: var(--mint); font-size: 21px; font-style: normal; transition: transform .18s ease; }
.replay-details[open] > summary i { transform: rotate(45deg); }
.replay-details > .boundary-banner { margin-top: 14px; }
.replay-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.summary-section > .section-note { margin: 10px 0 0; }

@media (max-width: 1050px) {
  .workflow-hero { grid-template-columns: minmax(0, 1fr); }
  .flow-track { justify-content: flex-start; }
  .identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-fast-path { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .action-fast-path-link { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 760px) {
  .topbar .toolbar { width: 100%; align-items: stretch; justify-content: space-between; }
  .topbar .primary-button { flex: 0 0 auto; }
  .workflow-hero { gap: 21px; border-radius: 18px; padding: 20px 16px; }
  .workflow-copy h2 { font-size: 34px; }
  .workflow-copy > p:not(.eyebrow) { font-size: 13px; }
  .flow-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .flow-step { min-width: 0; padding: 8px; }
  .flow-connector { display: none; }
  .run-mode-grid, .check-columns, .severity-rule-grid { grid-template-columns: minmax(0, 1fr); }
  .run-mode-card { padding: 17px; }
  .run-mode-card p { min-height: 0; }
  .identity-panel { padding: 16px; }
  .identity-grid { gap: 6px; }
  .identity-card { padding: 8px; }
  .identity-value { font-size: 12px; }
  .self-check-panel { padding: 16px; }
  .action-fast-path { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 16px; }
  .action-fast-path-link { grid-column: auto; justify-self: stretch; }
  .replay-details > summary { padding: 11px 12px; }
  .replay-toolbar { width: 100%; justify-content: flex-start; }
}

/* -------------------------------------------------------------------------
   Approved visual layer: esp32系列小车诊断 / iOS glass + green ridges

   This layer intentionally comes last.  The workbench has accumulated a
   stable set of selectors that are used by app.js and by the static tests;
   keeping the selectors above and overriding only presentation lets the
   visual refresh stay additive and reversible.
   ------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --bg: #edf8f2;
  --ridge-1: #d8f3e3;
  --ridge-2: #b9e6ce;
  --ridge-3: #8fd7b4;
  --green-strong: #117149;
  --ink: #12352b;
  --ink-soft: #235340;
  --ink-muted: #587568;
  --paper: #12352b;
  --paper-dim: #d8eee1;
  --line: rgba(18, 53, 43, .14);
  --line-light: rgba(18, 53, 43, .13);
  --mint: #117149;
  --mint-deep: #0c6843;
  --amber: #a66b19;
  --coral: #b64c48;
  --blue: #386b99;
  --white: #12352b;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .78);
  --shadow: 0 22px 58px rgba(28, 104, 68, .12);
  --radius: 28px;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  min-width: 320px;
  background: var(--bg);
  color-scheme: light;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  background:
    radial-gradient(120% 75% at -8% -16%, rgba(216, 243, 227, .98) 0%, rgba(216, 243, 227, .62) 35%, transparent 66%),
    radial-gradient(95% 70% at 108% 18%, rgba(185, 230, 206, .72) 0%, rgba(185, 230, 206, .22) 42%, transparent 72%),
    linear-gradient(155deg, #edf8f2 0%, #e7f6ed 47%, #f7fcf9 100%);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

/* Static ridge silhouettes keep the green signature visible without a
   perpetual animation.  They sit behind the glass and never intercept input. */
body::before,
body::after {
  position: fixed;
  z-index: -1;
  display: block;
  pointer-events: none;
  content: "";
  border-radius: 50%;
  transform: rotate(-4deg);
}

body::before {
  right: -18vw;
  bottom: -28vh;
  left: -18vw;
  height: 56vh;
  background: linear-gradient(165deg, rgba(143, 215, 180, .16), rgba(185, 230, 206, .32));
  box-shadow: 0 -34px 80px rgba(64, 151, 105, .09);
}

body::after {
  right: -20vw;
  bottom: -38vh;
  left: 12vw;
  height: 54vh;
  background: linear-gradient(165deg, rgba(185, 230, 206, .2), rgba(216, 243, 227, .45));
  transform: rotate(6deg);
}

a { color: var(--green-strong); }

button,
select,
input { font-family: var(--body); }

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #2f8c65;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(47, 140, 101, .17);
}

.app-shell {
  position: relative;
  z-index: 0;
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 100vh;
}

.evidence-rail {
  z-index: 1;
  min-height: 100vh;
  padding: 24px 9px 20px;
  border-right: 1px solid rgba(18, 53, 43, .12);
  background: rgba(255, 255, 255, .28);
  box-shadow: 8px 0 28px rgba(40, 116, 78, .05);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
  color: var(--ink-muted);
}

.rail-mark { color: var(--green-strong); }
.rail-mark b { background: var(--green-strong); border-color: var(--green-strong); box-shadow: 0 0 0 5px rgba(17, 113, 73, .12); }
.rail-copy span,
.rail-foot span { color: #729184; }
.rail-line { background: linear-gradient(var(--green-strong), rgba(17, 113, 73, 0)); }

.page {
  width: min(100%, 1280px);
  max-width: 1280px;
  padding: clamp(28px, 4vw, 56px) clamp(22px, 4vw, 64px) 42px;
}

.topbar {
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--green-strong);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--display);
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 720;
  letter-spacing: -.035em;
}

h3 {
  font-weight: 700;
}

.lede,
.panel-intro,
.section-note,
.source-note,
.identity-source,
.panel-footnote,
.footer-note {
  color: var(--ink-muted);
}

.lede { max-width: 520px; font-size: 14px; }

.toolbar,
.hero-actions,
.quick-start-actions,
.replay-toolbar,
.log-tools {
  gap: 10px;
}

select,
.search-input {
  min-height: 42px;
  border: 1px solid rgba(18, 53, 43, .16);
  border-radius: 16px;
  padding: 0 13px;
  background: rgba(255, 255, 255, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76), 0 5px 18px rgba(30, 102, 69, .05);
  color: var(--ink);
}

select option { background: #fff; color: var(--ink); }

.primary-button,
.quiet-button,
.mode-button {
  border-radius: 18px;
  min-height: 44px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.primary-button {
  border: 1px solid var(--green-strong);
  padding: 0 18px;
  background: var(--green-strong);
  box-shadow: 0 10px 22px rgba(17, 113, 73, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #0c633e;
  box-shadow: 0 13px 26px rgba(17, 113, 73, .25);
}

.quiet-button {
  border: 1px solid rgba(17, 113, 73, .32);
  padding: 0 15px;
  background: rgba(255, 255, 255, .55);
  color: var(--green-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 5px 16px rgba(30, 102, 69, .05);
}

.quiet-button:hover {
  background: rgba(216, 243, 227, .78);
  border-color: rgba(17, 113, 73, .52);
}

.live-status-chip,
.status-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.live-status-chip {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 10px;
}

.status-chip {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 9px;
}

.tone-pass { color: var(--green-strong); }
.tone-retry { color: #986319; }
.tone-degraded { color: #9a5f18; }
.tone-fail { color: var(--coral); }
.tone-unknown { color: var(--blue); }
.tone-na { color: #6d8078; }
.tone-pass.status-chip,
.tone-pass.live-status-chip { background: rgba(143, 215, 180, .2); }
.tone-retry.status-chip,
.tone-retry.live-status-chip,
.tone-degraded.status-chip,
.tone-degraded.live-status-chip { background: rgba(246, 218, 165, .27); }
.tone-fail.status-chip,
.tone-fail.live-status-chip { background: rgba(237, 180, 176, .25); }
.tone-unknown.status-chip,
.tone-unknown.live-status-chip { background: rgba(181, 211, 235, .3); }
.tone-na.status-chip,
.tone-na.live-status-chip { background: rgba(213, 224, 219, .4); }

/* The shared glass recipe is deliberately limited to containers; dense rows
   retain a flatter surface so the page remains calm at mobile widths. */
.workflow-hero,
.panel,
.identity-panel,
.run-mode-card,
.action-fast-path,
.boundary-banner,
.summary-card,
.scenario-detail,
.replay-details > summary {
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}

.panel,
.identity-panel { padding: 24px; }

.workflow-hero {
  grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr);
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 92% 18%, rgba(143, 215, 180, .42), transparent 23rem),
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(216, 243, 227, .58) 56%, rgba(185, 230, 206, .42));
}

.workflow-copy h2 { font-size: clamp(28px, 3.2vw, 46px); font-weight: 760; }
.workflow-copy > p:not(.eyebrow) { color: var(--ink-muted); }
.hero-note { color: #688578; }
.signal-dot { background: var(--green-strong); box-shadow: 0 0 0 5px rgba(17, 113, 73, .13); }

/* The workflow rail is the single process cue.  Repeated arrow rows inside
   each mode card add noise, so keep them available in the DOM but quiet in
   the visual layer. */
.mode-sequence { display: none; }

.flow-track { gap: 8px; }
.flow-step {
  border: 1px solid rgba(18, 53, 43, .1);
  border-radius: 18px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 7px 20px rgba(30, 102, 69, .06), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.flow-step.is-active {
  border-color: rgba(17, 113, 73, .52);
  background: rgba(143, 215, 180, .32);
  box-shadow: 0 10px 24px rgba(17, 113, 73, .12), inset 0 1px 0 rgba(255, 255, 255, .78);
}
.flow-step.is-done { border-color: rgba(17, 113, 73, .27); }
.flow-marker { border-color: rgba(18, 53, 43, .25); color: var(--ink-muted); }
.flow-step.is-active .flow-marker,
.flow-step.is-done .flow-marker { border-color: var(--green-strong); color: var(--green-strong); }
.flow-copy b { color: var(--ink); }
.flow-copy small,
.flow-connector { color: #6f8e80; }

.run-modes { margin: 24px 0 15px; }
.section-heading { margin-bottom: 15px; }
.section-note { font-size: 10px; }
.mode-switch {
  border: 1px solid rgba(18, 53, 43, .12);
  border-radius: 20px;
  padding: 5px;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
}
.mode-switch-button {
  min-height: 48px;
  border-radius: 16px;
  color: #668175;
}
.mode-switch-button small { color: #7b9689; }
.mode-switch-button:hover { border-color: rgba(17, 113, 73, .3); color: var(--ink); }
.mode-switch-button.is-selected {
  border-color: rgba(17, 113, 73, .42);
  background: rgba(143, 215, 180, .3);
  box-shadow: 0 5px 15px rgba(17, 113, 73, .1), inset 0 1px 0 rgba(255, 255, 255, .72);
  color: var(--green-strong);
}
.mode-switch-button.is-selected small { color: #36755a; }

.run-mode-card {
  padding: 22px;
  background: rgba(255, 255, 255, .54);
}
.run-mode-card.quick-mode,
.run-mode-card.quick-start-mode { border-color: rgba(56, 107, 153, .32); background: linear-gradient(140deg, rgba(181, 211, 235, .3), rgba(255, 255, 255, .53)); }
.run-mode-card.doctor-mode { border-color: rgba(17, 113, 73, .34); background: linear-gradient(140deg, rgba(143, 215, 180, .3), rgba(255, 255, 255, .54)); }
.run-mode-card.celebrate-mode { border-color: rgba(166, 107, 25, .34); background: linear-gradient(140deg, rgba(246, 218, 165, .34), rgba(255, 255, 255, .54)); }
.run-mode-card.is-selected { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(30, 102, 69, .14), inset 0 1px 0 rgba(255, 255, 255, .8); }
.mode-kicker { color: #628272; }
.duration-badge,
.elapsed-badge { border-color: rgba(18, 53, 43, .14); background: rgba(255, 255, 255, .48); color: #668276; }
.run-mode-card h3 { color: var(--ink); font-size: 24px; font-weight: 760; }
.run-mode-card p { color: var(--ink-muted); }
.mode-sequence { color: #4d7160; }
.mode-sequence span { background: rgba(255, 255, 255, .5); }
.mode-sequence i { color: #7d9b8e; }
.mode-button {
  border-color: rgba(17, 113, 73, .24);
  background: rgba(255, 255, 255, .56);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.mode-button:hover { border-color: rgba(17, 113, 73, .52); background: rgba(216, 243, 227, .65); }
.mode-button span { color: var(--green-strong); }

.quick-start-panel,
.capability-panel,
.severity-ledger-panel { background: rgba(255, 255, 255, .58); }
.quick-start-panel { border-color: rgba(17, 113, 73, .28); background: linear-gradient(135deg, rgba(143, 215, 180, .24), rgba(255, 255, 255, .58)); }
.quick-start-panel[data-state="READY"] { border-color: rgba(17, 113, 73, .48); }
.quick-start-panel[data-state="DEGRADED"] { border-color: rgba(166, 107, 25, .44); }
.quick-start-panel[data-state="CRITICAL"] { border-color: rgba(182, 76, 72, .52); background: linear-gradient(135deg, rgba(237, 180, 176, .3), rgba(255, 255, 255, .6)); }
.quick-progress-row,
.capability-row,
.check-row,
.identity-card,
.severity-ledger-card,
.verification-card {
  border: 1px solid rgba(18, 53, 43, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
}
.quick-progress-marker,
.check-icon { border-color: rgba(18, 53, 43, .22); color: var(--ink-muted); }
.quick-progress-copy b,
.capability-copy b,
.check-copy b { color: var(--ink); }
.quick-progress-copy small,
.capability-copy small,
.check-copy small { color: #759083; }
.quick-start-boundary,
.capability-boundary { color: #6e8b7e; }
.quick-start-boundary span,
.capability-boundary span { color: var(--amber); }

.severity-ledger-panel { border-color: rgba(166, 107, 25, .22); }
.severity-ledger-card { background: rgba(255, 255, 255, .5); }
.critical-ledger { border-color: rgba(182, 76, 72, .28); background: rgba(237, 180, 176, .2); }
.warning-ledger { border-color: rgba(166, 107, 25, .27); background: rgba(246, 218, 165, .22); }
.quality-ledger { border-color: rgba(56, 107, 153, .26); background: rgba(181, 211, 235, .2); }
.critical-ledger .severity-ledger-icon,
.critical-ledger strong { color: var(--coral); }
.warning-ledger .severity-ledger-icon,
.warning-ledger strong { color: var(--amber); }
.quality-ledger .severity-ledger-icon,
.quality-ledger strong { color: var(--blue); }
.severity-ledger-head small,
.severity-ledger-card p,
.severity-ledger-note { color: #668276; }
.severity-count { color: var(--ink); }

.capability-panel { border-color: rgba(56, 107, 153, .24); }
.identity-panel { background: rgba(255, 255, 255, .56); }
.identity-card { border-left: 3px solid rgba(17, 113, 73, .34); border-radius: 4px 16px 16px 4px; }
.identity-label { color: #6e8b7e; }
.identity-value { color: var(--ink); }

.self-check-panel { background: rgba(255, 255, 255, .58); }
.check-group {
  border: 1px solid rgba(18, 53, 43, .1);
  border-radius: 20px;
  padding: 17px;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
}
.static-group { border-color: rgba(17, 113, 73, .22); }
.dynamic-group { border-color: rgba(166, 107, 25, .25); }
.check-group-head h3 { color: var(--ink); }
.check-group-head p { color: #6f8d80; }
.check-row { background: rgba(255, 255, 255, .42); }
.warning-rule { border-color: rgba(166, 107, 25, .3); background: rgba(246, 218, 165, .24); }
.critical-rule { border-color: rgba(182, 76, 72, .3); background: rgba(237, 180, 176, .23); }
.warning-rule .severity-icon,
.warning-rule strong { color: var(--amber); }
.critical-rule .severity-icon,
.critical-rule strong { color: var(--coral); }
.severity-rule p { color: #6b8177; }

.action-fast-path {
  border-color: rgba(17, 113, 73, .24);
  background: linear-gradient(115deg, rgba(181, 232, 206, .35), rgba(255, 255, 255, .58));
}
.action-fast-path-lead h2 { color: var(--ink); }
.action-fast-path-lead p:last-child { color: #5f7b6d; }
.fast-path-point { border-color: rgba(17, 113, 73, .13); background: rgba(255, 255, 255, .47); }
.fast-path-point b { color: var(--ink); }
.fast-path-point small { color: #789488; }

.replay-details { border-color: rgba(18, 53, 43, .12); }
.replay-details > summary { background: rgba(255, 255, 255, .52); color: var(--ink); }
.replay-details > summary small { color: #6e8b7e; }
.replay-details > summary i { color: var(--green-strong); }
.replay-details > .boundary-banner {
  border-color: rgba(166, 107, 25, .3);
  background: linear-gradient(120deg, rgba(246, 218, 165, .28), rgba(255, 255, 255, .58));
}
.boundary-icon { border-color: var(--amber); color: var(--amber); }
.boundary-banner h2 { color: var(--ink); }
.boundary-banner p:last-child { color: #668276; }
.boundary-flag { border-color: rgba(166, 107, 25, .28); color: #8f5d17; background: rgba(255, 255, 255, .42); }

.summary-card { background: rgba(255, 255, 255, .52); }
.summary-card.lead { border-color: rgba(17, 113, 73, .36); background: linear-gradient(135deg, rgba(143, 215, 180, .32), rgba(255, 255, 255, .54)); }
.summary-card .card-label { color: #6c897c; }
.summary-card .card-value { color: var(--ink); }
.summary-card.lead .card-value small { color: #5e806f; }
.summary-card .card-caption { color: #739084; }
.summary-card .progress { background: rgba(18, 53, 43, .1); }
.summary-card .progress > span { background: var(--green-strong); }

.coverage-row,
.scenario-row {
  border-color: rgba(18, 53, 43, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .44);
  color: var(--ink);
}
.coverage-row:hover,
.coverage-row.is-selected,
.scenario-row:hover,
.scenario-row.is-selected { border-color: rgba(56, 107, 153, .42); background: rgba(181, 211, 235, .28); }
.coverage-index,
.scenario-id,
.coverage-meta,
.coverage-code { color: #789488; }
.coverage-title,
.scenario-label { color: var(--ink); }

.provenance-panel { background: rgba(255, 255, 255, .56); }
.context-item { border-left-color: rgba(17, 113, 73, .3); background: rgba(255, 255, 255, .42); }
.context-key,
.digest-label { color: #6e8b7e; }
.context-value,
.digest-value { color: var(--ink); }
.copy-button { border-color: rgba(17, 113, 73, .42); color: var(--green-strong); }

.scenario-detail { background: var(--glass-strong); color: var(--ink); }
.scenario-detail .eyebrow { color: var(--green-strong); }
.detail-title h3 { color: var(--ink); }
.detail-title p,
.trace-label,
.detail-block h4 { color: #6e8b7e; }
.detail-stats .stat-pill { border-color: rgba(18, 53, 43, .14); background: rgba(216, 243, 227, .36); color: #4f7462; }
.trace-step { border-color: #9bb6a8; }
.trace-step[data-status="PASS"] { border-color: var(--green-strong); }
.trace-step[data-status="DEGRADED"],
.trace-step[data-status="RETRYABLE"] { border-color: var(--amber); }
.trace-step[data-status="FAIL"],
.trace-step[data-status="INVALID"] { border-color: var(--coral); }
.trace-step[data-status="UNVERIFIED"] { border-color: var(--blue); }
.trace-status,
.detail-block p,
.detail-block li { color: var(--ink); }
.empty-state,
.log-empty { color: #6e8b7e; }

.fact-row { border-color: rgba(18, 53, 43, .12); }
.fact-key { color: #6e8b7e; }
.fact-value { color: var(--ink); }
.cause-card { border-left-color: var(--blue); background: rgba(181, 211, 235, .25); }
.cause-card p { color: #345d50; }
.cause-card small,
.inferred-tag { color: var(--blue); }
.inferred-tag { border-color: rgba(56, 107, 153, .3); background: rgba(181, 211, 235, .2); }
.recommendations-list li,
.verification-card p { color: #345d50; }
.verification-card { background: rgba(255, 255, 255, .48); }
.condition-list li { background: rgba(216, 243, 227, .45); color: #5d806f; }

.logs-panel { background: rgba(255, 255, 255, .56); }
.log-row { border-color: rgba(18, 53, 43, .1); }
.log-time,
.log-kind,
.log-code { color: #769185; }
.log-kind { color: #527565; }
.log-detail { color: #345d50; }
.toast { border-color: rgba(17, 113, 73, .36); border-radius: 18px; background: rgba(255, 255, 255, .82); box-shadow: 0 14px 32px rgba(30, 102, 69, .16); color: var(--green-strong); }
.footer-note { letter-spacing: .05em; }

@media (max-width: 1200px) {
  .page { padding-right: clamp(20px, 3vw, 42px); padding-left: clamp(20px, 3vw, 42px); }
  .summary-grid { grid-template-columns: repeat(4, minmax(105px, 1fr)); }
  .summary-card.lead { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .evidence-rail { display: none; }
  .page { width: 100%; max-width: none; padding: 22px 14px 30px; }
  .topbar { align-items: flex-start; gap: 16px; margin-bottom: 18px; }
  .topbar .toolbar { width: 100%; align-items: stretch; justify-content: space-between; }
  h1 { font-size: clamp(34px, 11vw, 46px); }
  .lede { font-size: 13px; }
  .workflow-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; border-radius: 24px; padding: 20px 17px; }
  .workflow-copy h2 { font-size: 31px; }
  .workflow-copy > p:not(.eyebrow) { font-size: 13px; }
  .flow-track { display: none; }
  .panel,
  .identity-panel { border-radius: 22px; padding: 18px; }
  .run-mode-card { border-radius: 22px; padding: 18px; }
  .mode-switch { border-radius: 18px; }
  .mode-switch-button { min-height: 44px; }
  .quick-start-actions .primary-button,
  .quick-start-actions .quiet-button { width: 100%; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .summary-card { min-height: 100px; padding: 14px; border-radius: 20px; }
  .summary-card.lead { min-height: 112px; }
  .workspace-grid,
  .insight-grid,
  .action-columns,
  .check-columns,
  .scenario-layout,
  .severity-rule-grid { grid-template-columns: minmax(0, 1fr); }
  .check-group { border-radius: 18px; padding: 14px; }
  .action-fast-path { grid-template-columns: minmax(0, 1fr); gap: 13px; border-radius: 22px; padding: 17px; }
  .action-fast-path-link { grid-column: auto; justify-self: stretch; width: 100%; }
  .replay-details > summary { border-radius: 18px; padding: 12px 13px; }
  .replay-toolbar,
  .log-tools { width: 100%; justify-content: flex-start; }
  .replay-toolbar .select-label { min-width: 0; width: 100%; }
  .replay-toolbar .select-label select { min-width: 0; width: 100%; }
  .log-row { grid-template-columns: 42px 52px minmax(0, 1fr); }
  .log-row .status-chip { grid-column: 3; justify-self: start; margin-top: 3px; }
  .footer-note { align-items: flex-start; flex-direction: column; gap: 4px; }
}

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

@media (max-width: 340px) {
  h1 {
    font-size: 32px;
    letter-spacing: -.07em;
  }
}
