:root {
  --harbor-paper: #edf2f3;
  --harbor-white: #f8fbfb;
  --sonar-ink: #102a43;
  --channel-blue: #2456a6;
  --buoy-coral: #d85d3f;
  --signal-jade: #16856b;
  --fog-line: #c7d3d8;
  --muted: #5f7383;
  --shadow: 0 22px 60px rgb(16 42 67 / 9%);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--harbor-paper); }

body {
  margin: 0;
  color: var(--sonar-ink);
  background:
    linear-gradient(90deg, transparent 0 49.9%, rgb(36 86 166 / 4%) 50%, transparent 50.1%),
    var(--harbor-paper);
  min-height: 100vh;
}

.offline-shell {
  width: min(620px, calc(100% - 40px));
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 1rem;
}

.offline-shell h1 {
  margin: 0;
  font: 650 clamp(2.7rem, 9vw, 5.5rem) / 0.95 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.065em;
}

.offline-shell p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

a { color: inherit; }

code,
.eyebrow,
.event-time,
.event-count,
.system-state {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout-form { margin: 0; }

.logout-form button {
  border: 0;
  border-bottom: 1px solid var(--fog-line);
  padding: 0.35rem 0;
  color: var(--muted);
  background: transparent;
  font: 0.72rem/1 "SFMono-Regular", monospace;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  background: var(--sonar-ink);
  color: white;
  padding: 0.75rem 1rem;
}

.skip-link:focus { top: 1rem; }

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fog-line);
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 2.4rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--sonar-ink);
  border-radius: 50%;
  font: 700 0.7rem/1 "SFMono-Regular", monospace;
  letter-spacing: -0.06em;
}

.brand strong {
  display: block;
  font: 700 1.08rem/1.1 "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

.brand small {
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.state-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--signal-jade);
  box-shadow: 0 0 0 5px rgb(22 133 107 / 12%);
}

.thesis {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.6fr);
  gap: 3rem;
  align-items: center;
  border-bottom: 1px solid var(--fog-line);
}

.thesis > * { min-width: 0; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--channel-blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thesis h1 {
  margin: 0;
  max-width: 760px;
  font: 650 clamp(3rem, 7vw, 6.8rem) / 0.95 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.075em;
  overflow-wrap: anywhere;
}

.thesis h1 em {
  color: var(--channel-blue);
  font-style: normal;
}

.thesis-note {
  position: relative;
  padding-left: 2rem;
  align-self: end;
  margin-bottom: 4rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.rail-sample {
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--channel-blue) 0 5px, transparent 5px 11px);
}

.rail-sample::before,
.rail-sample::after {
  content: "";
  position: absolute;
  left: -4px;
  width: 9px;
  height: 9px;
  background: var(--harbor-paper);
  border: 1px solid var(--channel-blue);
  border-radius: 50%;
}

.rail-sample::before { top: 0; }
.rail-sample::after { bottom: 0; }

.timeline-shell { padding: 4.5rem 0 6rem; }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-heading h2,
.provenance h2 {
  margin: 0;
  font: 650 2rem/1.1 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.045em;
}

.event-count {
  color: var(--muted);
  font-size: 0.72rem;
}

.timeline { position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: 125px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--fog-line) 0 5px, transparent 5px 12px);
}

.event-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px 40px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 174px;
  background: var(--harbor-white);
  border: 1px solid var(--fog-line);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  padding: 1.5rem 1.6rem 1.5rem 1.2rem;
  transition: transform 160ms ease, border-color 160ms ease;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: #9cafb8;
}

.event-time time { display: block; font-size: 0.75rem; font-weight: 700; }
.event-time small { color: var(--muted); font-size: 0.62rem; }

.evidence-node {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.evidence-node span {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  background: var(--harbor-white);
  border: 2px solid var(--channel-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--harbor-white);
}

.event-main { min-width: 0; }

.source-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  margin-bottom: 0.75rem;
}

.source-badges span,
.source-role-chip {
  min-width: 0;
  padding: 0.3rem 0.48rem;
  color: #496172;
  background: #edf3f5;
  border: 1px solid #d3dfe3;
  font: 0.58rem/1.2 "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}

.source-badges .notification-succeeded { color: #0b6a55; background: #e6f3ef; border-color: #b9ddd3; }
.source-badges .notification-failed,
.source-badges .notification-ambiguous { color: #a23c25; background: #fbeae5; border-color: #efc3b7; }
.source-badges .notification-planned,
.source-badges .notification-reservation,
.source-badges .notification-started { color: var(--channel-blue); background: #eaf0fa; border-color: #c2d2ec; }

.event-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: space-between;
}

.event-title-row h3 {
  min-width: 0;
  margin: 0;
  font: 650 1.55rem/1.1 "Avenir Next", sans-serif;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.action {
  display: inline-block;
  color: var(--channel-blue);
  font-size: 0.64em;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: 0.15em;
}

.action-close,
.action-decrease { color: var(--buoy-coral); }

.classification {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.7rem;
  background: #e6f3ef;
  color: #0b6a55;
  border: 1px solid #b9ddd3;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.classification-aggressive { background: #fbeae5; color: #a23c25; border-color: #efc3b7; }
.classification-low_confidence,
.classification-unknown { background: #eef1f2; color: #526570; border-color: #d4dcdf; }

.event-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  margin: 0.85rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.event-summary code { color: var(--sonar-ink); }

.freshness-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  min-width: 0;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font: 0.62rem/1.55 "SFMono-Regular", monospace;
}

.freshness-line span,
.freshness-line time { overflow-wrap: anywhere; }

.wallet-inline-link {
  color: var(--channel-blue);
  text-decoration-color: rgb(36 86 166 / 35%);
  text-underline-offset: 0.2em;
}

.wallet-inline-link code { color: inherit; }

.evidence-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  max-width: 540px;
  color: var(--muted);
  font-size: 0.63rem;
}

.evidence-strip code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #496172;
}

.event-link {
  margin-left: 1.8rem;
  text-decoration: none;
  color: var(--channel-blue);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.event-link span { display: inline-block; transition: transform 160ms ease; }
.event-link:hover span { transform: translateX(3px); }

.empty-state {
  border: 1px dashed #9cafb8;
  background: rgb(248 251 251 / 70%);
  padding: 4rem 2rem;
  text-align: center;
}

.empty-glyph { color: var(--channel-blue); font-size: 2rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { max-width: 550px; margin: auto; color: var(--muted); line-height: 1.7; }

.breadcrumb {
  display: flex;
  gap: 0.65rem;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.breadcrumb a { color: var(--channel-blue); }

.detail-sheet {
  min-width: 0;
  background: var(--harbor-white);
  border: 1px solid var(--fog-line);
  box-shadow: var(--shadow);
  margin-bottom: 6rem;
}

.detail-hero {
  min-height: 245px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 6vw, 5rem);
  border-bottom: 1px solid var(--fog-line);
}

.detail-hero h1 {
  min-width: 0;
  margin: 0;
  font: 650 clamp(2.6rem, 6vw, 5rem)/1 "Avenir Next", sans-serif;
  letter-spacing: -0.06em;
  overflow-wrap: anywhere;
}

.detail-wallet { margin: 1.3rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.detail-wallet a { color: var(--channel-blue); text-underline-offset: 0.22em; }

.detail-display-time {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font: 0.67rem/1.6 "SFMono-Regular", monospace;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--fog-line);
}

.fact-grid div { padding: 1.6rem 2rem; border-right: 1px solid var(--fog-line); }
.fact-grid div:last-child { border-right: 0; }
.fact-grid span { display: block; color: var(--muted); font-size: 0.7rem; margin-bottom: 0.5rem; }
.fact-grid strong { font: 650 1.1rem/1.2 "Avenir Next", sans-serif; overflow-wrap: anywhere; }

.provenance { display: grid; grid-template-columns: 250px minmax(0, 1fr); padding: 4rem; gap: 3rem; }
.provenance dl { margin: 0; border-top: 1px solid var(--fog-line); }
.provenance dl div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--fog-line); }
.provenance dt { color: var(--muted); font: 0.68rem/1.5 "SFMono-Regular", monospace; }
.provenance dd { margin: 0; font-size: 0.8rem; min-width: 0; overflow-wrap: anywhere; }
.provenance dd a { color: var(--channel-blue); }
.provenance code { font-size: 0.72rem; }

.source-safety-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.evidence-facts {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  min-width: 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--fog-line);
  border-bottom: 1px solid var(--fog-line);
}

.evidence-facts h2 {
  margin: 0;
  font: 650 1.7rem/1.1 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.045em;
}

.evidence-fact-list {
  min-width: 0;
  margin: 0;
  border-top: 1px solid var(--fog-line);
}

.evidence-fact-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--fog-line);
}

.evidence-fact-row dt {
  color: var(--muted);
  font: 0.62rem/1.5 "SFMono-Regular", monospace;
}

.evidence-fact-row dd {
  min-width: 0;
  margin: 0;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.evidence-fact-row code { font-size: 0.68rem; overflow-wrap: anywhere; }
.evidence-fact-row a { color: var(--channel-blue); overflow-wrap: anywhere; }

.market-evidence-list,
.market-evidence-card { min-width: 0; }

.market-evidence-card { padding-bottom: 2rem; }

.market-evidence-card > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  min-width: 0;
  padding-bottom: 0.85rem;
}

.market-evidence-card > header strong { font-size: 0.82rem; }
.market-evidence-card > header code { min-width: 0; font-size: 0.65rem; overflow-wrap: anywhere; }

.research-warning {
  margin: 0 4rem 4rem;
  padding: 1.3rem 1.5rem;
  border-left: 3px solid var(--buoy-coral);
  background: #fff4ef;
}

.research-warning strong { font-size: 0.86rem; }
.research-warning p { margin: 0.35rem 0 0; color: #785548; font-size: 0.8rem; }

.wallet-sheet {
  min-width: 0;
  margin-bottom: 6rem;
  background: var(--harbor-white);
  border: 1px solid var(--fog-line);
  box-shadow: var(--shadow);
}

.wallet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  min-width: 0;
  padding: clamp(2rem, 6vw, 5rem);
  border-bottom: 1px solid var(--fog-line);
}

.wallet-identity { min-width: 0; }

.wallet-identity h1 {
  margin: 0;
  font: 650 clamp(2.8rem, 7vw, 6.4rem) / 0.92 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.075em;
  overflow-wrap: anywhere;
}

.wallet-address {
  margin: 1.4rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.wallet-address code { font-size: clamp(0.75rem, 2vw, 1rem); }

.wallet-register { min-width: 0; margin: 0; border-top: 1px solid var(--fog-line); }

.wallet-register div {
  display: grid;
  grid-template-columns: minmax(75px, 0.45fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--fog-line);
}

.wallet-register dt {
  color: var(--muted);
  font: 0.65rem/1.5 "SFMono-Regular", monospace;
}

.wallet-register dd {
  min-width: 0;
  margin: 0;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.wallet-score-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  min-width: 0;
  border-bottom: 1px solid var(--fog-line);
}

.score-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(2rem, 5vw, 4rem);
  color: white;
  background:
    radial-gradient(circle at 85% 18%, rgb(255 255 255 / 13%) 0 4px, transparent 5px),
    linear-gradient(145deg, var(--sonar-ink), #173f65);
}

.score-readout .eyebrow { color: #9fc4ef; }

.score-readout h2 {
  margin: 0;
  font: 650 1.4rem/1.1 "Avenir Next", sans-serif;
  letter-spacing: -0.04em;
}

.score-value {
  margin: auto 0 1rem;
  padding-top: 2.5rem;
  font: 650 clamp(4.5rem, 11vw, 8.5rem) / 0.82 "Avenir Next", sans-serif;
  letter-spacing: -0.1em;
}

.score-readout .classification { margin-bottom: 1.5rem; }

.score-readout > p:last-child {
  max-width: 34ch;
  margin: 0;
  color: #ccdae5;
  font-size: 0.78rem;
  line-height: 1.7;
}

.audit-tape { min-width: 0; padding: clamp(2rem, 5vw, 4rem); }

.audit-tape-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}

.audit-tape-heading h2 {
  margin: 0;
  font: 650 1.7rem/1.1 "Avenir Next", sans-serif;
  letter-spacing: -0.045em;
}

.recompute-state {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  color: #0b6a55;
  background: #e6f3ef;
  border: 1px solid #b9ddd3;
  font: 0.65rem/1 "SFMono-Regular", monospace;
}

.recompute-mismatch,
.recompute-invalid_snapshot,
.recompute-unsupported_version { color: #a23c25; background: #fbeae5; border-color: #efc3b7; }

.recompute-missing_metrics { color: #526570; background: #eef1f2; border-color: #d4dcdf; }

.wallet-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--fog-line);
}

.metric-ticket {
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--fog-line);
}

.metric-ticket:last-child { border-right: 0; }
.metric-ticket > span { display: block; min-height: 2.2em; color: var(--muted); font-size: 0.67rem; }
.metric-ticket strong { display: block; margin: 0.55rem 0; font: 650 1.25rem/1 "Avenir Next", sans-serif; overflow-wrap: anywhere; }
.metric-ticket small { font: 0.6rem/1 "SFMono-Regular", monospace; }
.completeness-complete { color: var(--signal-jade); }
.completeness-partial { color: #8b641c; }
.completeness-missing,
.completeness-unknown { color: var(--buoy-coral); }

.formula-lines {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--fog-line);
}

.formula-lines li {
  display: grid;
  grid-template-columns: 28px minmax(100px, 0.45fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  min-width: 0;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--fog-line);
}

.formula-lines li > span,
.formula-lines li > small { color: var(--muted); font: 0.62rem/1.4 "SFMono-Regular", monospace; }
.formula-lines li > strong { font-size: 0.74rem; }
.formula-lines code { min-width: 0; color: var(--channel-blue); font-size: 0.66rem; overflow-wrap: anywhere; }
.formula-lines .formula-unavailable { display: block; color: var(--muted); font-size: 0.78rem; }

.score-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.5rem;
  margin: 2rem 0 0;
}

.score-versions div { min-width: 0; }
.score-versions dt { color: var(--muted); font: 0.6rem/1.5 "SFMono-Regular", monospace; }
.score-versions dd { min-width: 0; margin: 0.2rem 0 0; font-size: 0.72rem; overflow-wrap: anywhere; }
.score-versions code { font-size: inherit; }

.formula-snapshot { margin-top: 1.5rem; color: var(--muted); font-size: 0.7rem; }
.formula-snapshot summary { cursor: pointer; }
.formula-snapshot code { display: block; margin-top: 0.75rem; color: var(--sonar-ink); line-height: 1.7; overflow-wrap: anywhere; }

.wallet-evidence {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  min-width: 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--fog-line);
}

.wallet-evidence h2 {
  margin: 0;
  font: 650 1.7rem/1.1 "Avenir Next", sans-serif;
  letter-spacing: -0.045em;
}

.wallet-evidence-list { min-width: 0; border-top: 1px solid var(--fog-line); }

.wallet-evidence-link {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--fog-line);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wallet-evidence-link > span {
  width: 11px;
  height: 11px;
  border: 2px solid var(--channel-blue);
  border-radius: 50%;
}

.wallet-evidence-link code { min-width: 0; font-size: 0.7rem; overflow-wrap: anywhere; }
.wallet-evidence-link strong { color: var(--channel-blue); font-size: 0.7rem; white-space: nowrap; }

.wallet-score-empty {
  padding: clamp(2rem, 6vw, 5rem);
  border-bottom: 1px solid var(--fog-line);
}

.wallet-score-empty h2 { margin: 0; font: 650 2rem/1.1 "Avenir Next", sans-serif; }
.wallet-score-empty > p:last-child { color: var(--muted); }

.score-history,
.wallet-event-index { min-width: 0; padding: clamp(2rem, 5vw, 4rem); border-bottom: 1px solid var(--fog-line); }

.score-history .section-heading,
.wallet-event-index .section-heading { margin-bottom: 1.4rem; }

.score-history-list,
.wallet-event-list { min-width: 0; border-top: 1px solid var(--fog-line); }

.score-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(190px, 0.8fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: center;
  min-width: 0;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--fog-line);
}

.score-history-row time { color: var(--muted); font: 0.66rem/1.4 "SFMono-Regular", monospace; }
.score-history-row > div { display: flex; align-items: center; gap: 0.65rem; }
.score-history-row > div > strong { font: 650 1.25rem/1 "Avenir Next", sans-serif; }
.score-history-row > div > small { color: var(--muted); }
.score-history-row > code { min-width: 0; font-size: 0.68rem; overflow-wrap: anywhere; }
.score-history-row > p { grid-column: 2 / -1; margin: -0.4rem 0 0; color: var(--muted); font-size: 0.75rem; }

.wallet-event-list > a {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(100px, 0.45fr) minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-width: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--fog-line);
  text-decoration: none;
}

.wallet-event-list time,
.wallet-event-list span { color: var(--muted); font-size: 0.68rem; }
.wallet-event-list strong { font-size: 0.78rem; }
.wallet-event-list code { min-width: 0; overflow: hidden; color: #496172; font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.empty-inline { color: var(--muted); font-size: 0.8rem; }
.wallet-warning { margin-top: 4rem; }

.alert-audit {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  min-width: 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--fog-line);
}

.alert-audit .provenance-heading > p:last-child {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.alert-intent-list,
.alert-intent { min-width: 0; }
.alert-intent { padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--fog-line); }
.alert-intent > header { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.alert-intent > header > div { display: flex; min-width: 0; gap: 0.75rem; align-items: center; }
.alert-intent > header code { min-width: 0; overflow-wrap: anywhere; }
.alert-intent > header time { color: var(--muted); font: 0.64rem/1.4 "SFMono-Regular", monospace; white-space: nowrap; }

.alert-priority { padding: 0.28rem 0.5rem; border: 1px solid currentColor; font: 700 0.58rem/1 "SFMono-Regular", monospace; text-transform: uppercase; }
.alert-priority-urgent { color: #a23c25; }
.alert-priority-normal { color: var(--channel-blue); }

.alert-policy-grid,
.alert-attempts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem 1.5rem; min-width: 0; }
.alert-policy-grid { margin: 1.25rem 0; }
.alert-policy-grid div,
.alert-attempts dl div { min-width: 0; }
.alert-policy-grid dt,
.alert-attempts dt { color: var(--muted); font: 0.6rem/1.4 "SFMono-Regular", monospace; }
.alert-policy-grid dd,
.alert-attempts dd { min-width: 0; margin: 0.2rem 0 0; font-size: 0.7rem; overflow-wrap: anywhere; }

.alert-attempts { margin: 1rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--fog-line); }
.alert-attempts > li { padding: 1rem 0; border-bottom: 1px solid var(--fog-line); }
.alert-attempts > li > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.alert-attempts strong { font-size: 0.74rem; }
.alert-attempts time { color: var(--muted); font: 0.62rem/1.4 "SFMono-Regular", monospace; }
.alert-attempts dl { margin: 0.8rem 0 0; }

.login-shell {
  min-height: calc(100vh - 178px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: clamp(3rem, 9vw, 9rem);
}

.login-copy h1 {
  max-width: 680px;
  margin: 0;
  font: 650 clamp(3rem, 7vw, 6.5rem) / 0.92 "Avenir Next", "Hiragino Sans GB", sans-serif;
  letter-spacing: -0.075em;
}

.login-copy > p:last-child {
  max-width: 540px;
  margin-top: 2rem;
  color: var(--muted);
  line-height: 1.75;
}

.login-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--harbor-white);
  border: 1px solid var(--fog-line);
  box-shadow: var(--shadow);
}

.login-form label {
  color: var(--muted);
  font: 0.72rem/1.3 "SFMono-Regular", monospace;
}

.login-form input[type="password"] {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid #9cafb8;
  padding: 0.75rem 0.9rem;
  color: var(--sonar-ink);
  background: white;
  font: 1rem/1.2 "SFMono-Regular", monospace;
}

.login-form button {
  min-height: 3.2rem;
  border: 1px solid var(--channel-blue);
  background: var(--channel-blue);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.login-form small { color: var(--muted); line-height: 1.6; }
.form-error { margin: 0; color: #a23c25; font-size: 0.82rem; }

.site-footer {
  min-height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--fog-line);
  color: var(--muted);
  font-size: 0.7rem;
}

:focus-visible { outline: 3px solid rgb(36 86 166 / 40%); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  main { width: min(100% - 28px, 680px); }

  .site-header { min-height: 72px; }
  .brand small { display: none; }
  .system-state { font-size: 0; }
  .system-state::after { content: "状态"; font-size: 0.68rem; }
  .header-actions { gap: 0.65rem; }

  .thesis { min-height: 420px; grid-template-columns: 1fr; gap: 1.5rem; align-content: center; }
  .thesis h1 { font-size: clamp(2.6rem, 12vw, 3.25rem); }
  .thesis-note { align-self: auto; margin: 0; max-width: 100%; }

  .timeline-shell { padding-top: 3rem; }
  .timeline::before { left: 18px; }
  .event-card { grid-template-columns: 36px minmax(0, 1fr); padding: 1.35rem 1.1rem 1.35rem 0; }
  .event-time { display: none; }
  .event-main { grid-column: 2; }
  .event-link { grid-column: 2; margin: 1rem 0 0; }
  .event-title-row { align-items: flex-start; flex-direction: column; }
  .event-summary { display: grid; }
  .source-badges { display: grid; grid-template-columns: 1fr; }
  .freshness-line { display: grid; }
  .evidence-node { grid-column: 1; grid-row: 1 / span 2; }

  .detail-hero { align-items: flex-start; flex-direction: column; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-grid div:nth-child(2) { border-right: 0; }
  .fact-grid div:nth-child(-n + 2) { border-bottom: 1px solid var(--fog-line); }
  .provenance { grid-template-columns: 1fr; padding: 2rem 1.4rem; gap: 2rem; }
  .provenance dl div { grid-template-columns: 1fr; gap: 0.35rem; }
  .evidence-facts { grid-template-columns: 1fr; padding: 2rem 1.4rem; gap: 1.5rem; }
  .evidence-fact-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .market-evidence-card > header { align-items: flex-start; flex-direction: column; }
  .alert-audit { grid-template-columns: 1fr; padding: 2rem 1.4rem; gap: 2rem; }
  .alert-intent > header,
  .alert-attempts > li > div { align-items: flex-start; flex-direction: column; }
  .alert-policy-grid,
  .alert-attempts dl { grid-template-columns: 1fr; }
  .research-warning { margin: 0 1.4rem 2rem; }
  .wallet-hero,
  .wallet-score-board,
  .wallet-audit-grid,
  .wallet-evidence { grid-template-columns: 1fr; }
  .wallet-hero { align-items: start; padding: 2.2rem 1.4rem; gap: 2rem; }
  .wallet-identity h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .score-readout,
  .audit-tape,
  .wallet-evidence,
  .score-history,
  .wallet-event-index { padding: 2rem 1.4rem; }
  .score-value { margin-top: 1rem; font-size: clamp(4.5rem, 24vw, 6.5rem); }
  .audit-tape-heading { align-items: flex-start; flex-direction: column; }
  .wallet-audit-grid { border-bottom: 0; }
  .metric-ticket { border-right: 0; border-bottom: 1px solid var(--fog-line); }
  .formula-lines li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .formula-lines code { grid-column: 2 / -1; }
  .score-versions { grid-template-columns: 1fr; }
  .wallet-evidence { gap: 1.5rem; }
  .wallet-evidence-link { grid-template-columns: 16px minmax(0, 1fr); }
  .wallet-evidence-link strong { grid-column: 2; }
  .score-history-row,
  .wallet-event-list > a { grid-template-columns: 1fr; gap: 0.55rem; }
  .score-history-row > p { grid-column: 1; margin: 0; }
  .wallet-event-list code { white-space: normal; overflow-wrap: anywhere; }
  .login-shell { grid-template-columns: 1fr; align-content: center; gap: 2.5rem; padding: 3rem 0; }
  .login-copy h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
