/* ==========================================================================
   Views: overview, journey, find finance, entity pages, capital stack,
   status ladder, cases, evidence
   ========================================================================== */

/* ------------------------------------------------------------------ hero */
/* The hero is a title and a promise, not a screen. Its job is to be read once
   and scrolled past, so it should not cost a scroll of its own. */
.hero { max-width: 720px; margin-bottom: var(--s6); }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.1rem + 2.1vw, 2.375rem);
  letter-spacing: -0.026em; line-height: 1.1;
  margin: var(--s3) 0 var(--s4);
  font-weight: 600;
}
/* Three stacked lines are a poster. Two are a headline. */
.hero h1 span { display: inline; }
.hero h1 span + span::before { content: " "; }
.hero h1 .h-dim { color: var(--text-muted); }
.hero p { font-size: var(--fs-base); color: var(--text-soft); line-height: 1.58; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }

/* --------------------------------------------------------------- journey */
.journey { position: relative; margin: var(--s5) 0 0; }
.journey-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(94px, 1fr);
  gap: 1px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--hairline);
}
.journey-step {
  position: relative;
  border: 0; cursor: pointer; text-align: left;
  background: var(--panel);
  padding: var(--s4) var(--s3) var(--s4) 15px;
  display: flex; flex-direction: column; gap: 5px;
  transition: background var(--t) var(--ease);
}
.journey-step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: transparent;
  transition: background var(--t) var(--ease);
}
.journey-step:hover { background: var(--panel-alt); }
.journey-step.is-active { background: var(--deep); }
.journey-step.is-active::before { background: var(--gold); }
.journey-step.is-active .journey-num { color: var(--gold); }
.journey-step.is-active .journey-name { color: var(--ivory); }
.journey-num { font-family: var(--mono); font-size: 0.5938rem; letter-spacing: 0.1em; color: var(--text-muted); }
.journey-name {
  font-family: var(--serif); font-size: var(--fs-sm); font-weight: 600; line-height: 1.22;
}
.journey-step[data-milestone="true"] .journey-name::after {
  content: "◆"; font-size: 0.4375rem; color: var(--gold); margin-left: 5px; vertical-align: 2px;
}

.journey-detail {
  margin-top: var(--s5);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel);
  padding: var(--s6) var(--s7);
  animation: fade-up var(--t-slow) var(--ease);
}
@keyframes fade-up { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .journey-detail { animation: none; } }

.journey-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.journey-detail-head h3 { font-family: var(--serif); font-size: var(--fs-xl); letter-spacing: -0.012em; }
.journey-detail-lede { color: var(--text-soft); max-width: var(--measure); margin-bottom: var(--s6); font-size: var(--fs-md); }
.journey-nav { display: flex; gap: var(--s3); margin-top: var(--s5); }

/* The single most important distinction in the product gets its own object. */
.fid-warning {
  display: flex; gap: var(--s5); align-items: center;
  margin: var(--s5) 0 0;
  padding: var(--s5) var(--s6);
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.fid-warning .fid-eq {
  font-family: var(--serif); font-size: var(--fs-lg); font-weight: 600; color: var(--accent-text);
  white-space: nowrap; letter-spacing: -0.008em;
}
.fid-warning p { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }

/* ------------------------------------------------------------ dimensions */
.dimensions { display: grid; grid-template-columns: repeat(auto-fit, minmax(206px, 1fr)); gap: var(--s4); }
.dimension {
  border-top: 2px solid var(--line);
  padding: var(--s4) 0 0;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color var(--t) var(--ease);
}
.dimension:hover { border-top-color: var(--green); }
.dimension:nth-child(4), .dimension:nth-child(5) { border-top-color: var(--accent-line); }
.dimension:nth-child(4):hover, .dimension:nth-child(5):hover { border-top-color: var(--gold); }
.dimension h3 { font-family: var(--serif); font-size: var(--fs-md); }
.dimension-q { font-size: var(--fs-sm); font-weight: 600; color: var(--green); }
.dimension:nth-child(4) .dimension-q, .dimension:nth-child(5) .dimension-q { color: var(--accent-text); }
.dimension p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.55; margin: 0; }
.dimension ul { list-style: none; display: flex; flex-direction: column; gap: 3px; margin-top: auto; padding-top: var(--s3); }
.dimension li { font-size: var(--fs-xs); color: var(--text-muted); padding-left: 12px; position: relative; }
.dimension li::before { content: "—"; position: absolute; left: 0; }

/* ------------------------------------------------------------ find finance */
.steps { display: flex; flex-direction: column; gap: var(--s7); }
.step-head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.step-num {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700;
  color: var(--accent-text); letter-spacing: 0.08em;
}
.step-head h2 { font-family: var(--serif); font-size: var(--fs-lg); letter-spacing: -0.006em; }
.step-hint { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s4); max-width: var(--measure); }
.step-optional { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 7px 15px;
  font-size: var(--fs-sm); cursor: pointer; color: var(--text-soft);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease),
              color var(--t) var(--ease), transform var(--t) var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--text); transform: translateY(-1px); }
.chip.is-on { background: var(--deep); border-color: var(--deep); color: var(--ivory); font-weight: 600; }

.problem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: var(--s3); }
.problem-card {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel); padding: var(--s4) var(--s4) var(--s4) 17px;
  text-align: left; cursor: pointer; position: relative;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.45; color: var(--text-soft);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.problem-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
  border-radius: 0 2px 2px 0; background: var(--line);
  transition: background var(--t) var(--ease), top var(--t) var(--ease), bottom var(--t) var(--ease);
}
.problem-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.problem-card:hover::before { background: var(--green); top: 7px; bottom: 7px; }
.problem-card.is-selected {
  border-color: var(--line-strong); background: var(--panel-alt); color: var(--text); font-weight: 600;
}
.problem-card.is-selected::before { background: var(--gold); top: 5px; bottom: 5px; }

.diagnosis {
  border-left: 2px solid var(--green);
  padding: var(--s2) 0 var(--s2) var(--s5);
  margin: var(--s6) 0;
  max-width: var(--measure);
}
.diagnosis-label {
  font-size: 0.625rem; letter-spacing: 0.15em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); margin-bottom: 6px;
}
.diagnosis-problem { font-family: var(--serif); font-size: var(--fs-lg); margin-bottom: var(--s4); }
.diagnosis p { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }

.route {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel);
  padding: var(--s5);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.route:hover { box-shadow: var(--shadow); border-color: var(--line); }
.route-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.route-name { font-family: var(--serif); font-size: var(--fs-md); font-weight: 600; }
.route-name a { text-decoration: none; }
.route-name a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.route-body { display: flex; flex-direction: column; gap: var(--s3); }
.route-why { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }
.route-solves { font-size: var(--fs-sm); color: var(--text); margin: 0; }
.route-meta { font-size: var(--fs-xs); color: var(--text-muted); margin: 0; }
.route-providers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: var(--s2); }
.provider-chip {
  font-size: var(--fs-xs); text-decoration: none;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(30, 36, 33, 0.045); color: var(--text-soft);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.provider-chip:hover { background: var(--deep); color: var(--ivory); }
.providers-label {
  font-size: 0.625rem; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); margin-right: 2px;
}

/* --------------------------------------------------------- entity detail */
.detail-head { margin-bottom: var(--s5); }
.detail-title {
  font-family: var(--serif); font-size: var(--fs-xl); letter-spacing: -0.02em;
  margin: 6px 0 var(--s3); max-width: 24ch; font-weight: 600;
}
.detail-one-liner {
  font-size: var(--fs-base); line-height: 1.55; color: var(--text);
  max-width: 62ch;
  border-left: 2px solid var(--gold); padding-left: var(--s4);
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); align-items: center; }
.detail-verified { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s4); }

/* A short answer first, then the rest behind one disclosure. */
.detail-lead { display: flex; flex-direction: column; gap: var(--s5); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: var(--s6); align-items: start; }
/* Sticky, and never the reason the page is tall: the column scrolls inside
   itself rather than stretching the grid row it shares with the article. */
.detail-aside {
  position: sticky; top: calc(var(--topbar-h) + var(--s4));
  display: flex; flex-direction: column; gap: var(--s3);
  max-height: calc(100vh - var(--topbar-h) - var(--s6));
  overflow-y: auto;
  scrollbar-width: thin;
}
.detail-aside .disclose { border-top: 0; }
.detail-aside .disclose > summary { padding: 4px 0; font-size: var(--fs-xs); }
.detail-aside .disclose-body { padding-bottom: 0; }

.sect { margin-bottom: var(--s5); }
.sect h3 {
  font-size: var(--fs-xs); letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); margin-bottom: var(--s3);
}
.sect p { max-width: var(--measure); color: var(--text-soft); }
.sect-warn h3 { color: var(--warn); }
.sect-verify h3 { color: var(--warn); }
.sect ul { list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: var(--measure); }
.sect li { position: relative; padding-left: 18px; font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.55; }
.sect li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--sage);
}
.sect-verify li::before { background: var(--warn); border-radius: 1px; }

.pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: var(--s3); max-width: none; }
.pair {
  border-radius: var(--radius); padding: var(--s4);
  background: var(--panel-alt);
}
.pair-label {
  font-size: 0.625rem; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); margin-bottom: 7px;
}
.pair-value { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.55; }
.pair-negative { background: var(--stop-wash); }
.pair-negative .pair-label { color: var(--stop); }

.aside-box { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--hairline); padding: var(--s3) var(--s4); }
.aside-box h4 {
  font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700; margin-bottom: var(--s2);
}
.aside-meaning {
  font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5;
  margin: 0 0 var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--hairline);
}
.rel-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.rel-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: var(--fs-sm); color: var(--text-soft);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.rel-list a:hover { background: var(--panel-alt); color: var(--text); }
.rel-fit { font-size: 0.5625rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 700; color: var(--fit-ink, var(--unknown)); white-space: nowrap; }

/* --------------------------------------------------------- status ladder */
.ladder { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.ladder-track h4 {
  font-size: var(--fs-xs); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700; margin-bottom: var(--s4);
}
.ladder-steps { list-style: none; position: relative; padding-left: var(--s5); }
.ladder-steps::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.ladder-step { position: relative; padding-bottom: var(--s4); }
.ladder-step::before {
  content: ""; position: absolute; left: calc(-1 * var(--s5) + 1px); top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--page); border: 1.5px solid var(--line-strong);
}
.ladder-step.is-reached::before { background: var(--green); border-color: var(--green); }
.ladder-step.is-unknown::before { border-style: dashed; }
.ladder-name { font-size: var(--fs-sm); font-weight: 600; }
.ladder-step:not(.is-reached) .ladder-name { color: var(--text-muted); font-weight: 500; }
.ladder-note { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; margin-top: 2px; }

.signed-not-operational {
  margin-top: var(--s6); display: flex; gap: var(--s5); align-items: center;
  padding: var(--s5) var(--s6); border-radius: var(--radius);
  background: var(--deep); color: var(--text-invert);
}
.signed-not-operational strong { color: var(--gold); font-family: var(--serif); font-size: var(--fs-md); white-space: nowrap; font-weight: 600; }
.signed-not-operational p { margin: 0; font-size: var(--fs-sm); color: rgba(242, 239, 230, 0.78); }

/* ----------------------------------------------------------- capital stack */
.stack-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.stack-viz { display: flex; flex-direction: column; gap: 3px; }
.stack-axis {
  display: flex; justify-content: space-between; font-size: var(--fs-xs);
  color: var(--text-muted); font-weight: 500; letter-spacing: 0.02em;
  padding: 0 2px var(--s3);
}
.stack-layer {
  --h: 60px;
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: var(--h);
  border: 1px solid var(--hairline); border-left: 3px solid var(--sage);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: var(--s3) var(--s5);
  cursor: pointer; text-align: left; width: 100%;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t) var(--ease), min-height var(--t-slow) var(--ease);
}
.stack-layer:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.stack-layer.is-active { background: var(--deep); border-color: var(--deep); border-left-color: var(--gold); }
.stack-layer.is-active .stack-layer-name { color: var(--ivory); }
.stack-layer.is-active .stack-layer-amount { color: var(--gold); }
.stack-layer.is-active .stack-layer-sub { color: rgba(242, 239, 230, 0.66); }
.stack-layer[data-off="1"] { border-style: dashed; border-left-style: solid; border-left-color: var(--gold); background: var(--panel-alt); }
.stack-layer-name { font-family: var(--serif); font-size: var(--fs-base); font-weight: 600; }
.stack-layer-sub { font-size: var(--fs-xs); color: var(--text-muted); display: block; margin-top: 2px; }
.stack-layer-amount { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.stack-covers {
  font-size: var(--fs-xs); color: var(--accent-text); font-weight: 600;
  margin-top: 4px;
}

/* Risk view: the left rule carries the risk band instead of the amount. */
.stack-viz[data-view="risk"] .stack-layer { min-height: 60px; }
.stack-viz[data-view="risk"] .stack-layer[data-risk="1"] { border-left-color: var(--ok); }
.stack-viz[data-view="risk"] .stack-layer[data-risk="2"] { border-left-color: var(--sage); }
.stack-viz[data-view="risk"] .stack-layer[data-risk="3"] { border-left-color: var(--gold); }
.stack-viz[data-view="risk"] .stack-layer[data-risk="4"] { border-left-color: var(--ochre); }
.stack-viz[data-view="risk"] .stack-layer[data-risk="5"] { border-left-color: var(--stop); }
.stack-viz[data-view="priority"] .stack-layer { min-height: 60px; }
.stack-order {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-muted); min-width: 20px;
}
.stack-layer.is-active .stack-order { color: var(--gold); }

.stack-detail {
  border-radius: var(--radius); background: var(--panel-alt); padding: var(--s6);
  position: sticky; top: calc(var(--topbar-h) + var(--s5));
}
.stack-detail h3 { font-family: var(--serif); font-size: var(--fs-lg); margin-bottom: 4px; letter-spacing: -0.008em; }
.stack-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin: var(--s5) 0; }
.stack-fact { border-top: 1px solid var(--line); padding-top: 8px; }
.stack-fact dt { font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.stack-fact dd { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-soft); }

.waterfall { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.waterfall li {
  display: flex; align-items: center; gap: var(--s3);
  padding: 8px var(--s4); border-radius: var(--radius-sm); background: var(--panel);
  font-size: var(--fs-sm); color: var(--text-soft);
}
.waterfall-num {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700;
  color: var(--green); min-width: 16px; flex: none;
}

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 620px; }
table.data th {
  text-align: left; font-size: 0.625rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700; padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
table.data td { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); vertical-align: top; color: var(--text-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background var(--t) var(--ease); }
table.data tbody tr:hover { background: var(--panel-alt); }
table.data a { font-weight: 600; text-decoration: none; color: var(--text); }
table.data a:hover { color: var(--green); }

/* --------------------------------------------------------------- evidence */
.claim {
  border-left: 2px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel); padding: var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: 8px;
}
.claim[data-claim="fact"]       { border-left-color: var(--ok); }
.claim[data-claim="assessment"] { border-left-color: var(--green); }
.claim[data-claim="hypothesis"] { border-left-color: var(--warn); }
.claim[data-claim="to-verify"]  { border-left-color: var(--stop); }
.claim-type {
  font-size: 0.5625rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700;
}
.claim[data-claim="fact"] .claim-type       { color: var(--ok); }
.claim[data-claim="assessment"] .claim-type { color: var(--green); }
.claim[data-claim="hypothesis"] .claim-type { color: var(--warn); }
.claim[data-claim="to-verify"] .claim-type  { color: var(--stop); }
.claim-text { font-size: var(--fs-sm); line-height: 1.58; margin: 0; }
.claim-meta { font-size: var(--fs-xs); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: var(--s4); margin: 0; }

.evidence-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: var(--s4); }
.legend-item { border-top: 2px solid var(--line); padding-top: var(--s3); }
.legend-item[data-claim="fact"]       { border-top-color: var(--ok); }
.legend-item[data-claim="assessment"] { border-top-color: var(--green); }
.legend-item[data-claim="hypothesis"] { border-top-color: var(--warn); }
.legend-item[data-claim="to-verify"]  { border-top-color: var(--stop); }
.legend-item b { display: block; font-size: var(--fs-sm); margin-bottom: 4px; }
.legend-item span { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }

/* -------------------------------------------------------------- timelines */
.timeline { list-style: none; position: relative; padding-left: var(--s5); }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding-bottom: var(--s5); }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--s5)); top: 6px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--page); border: 1.5px solid var(--line-strong);
}
.timeline li[data-kind="announced"]::before { border-color: var(--warn); }
.timeline li[data-kind="contracted"]::before { border-color: var(--green); background: var(--green); }
.timeline li[data-kind="operational"]::before { border-color: var(--ok); background: var(--ok); }
.timeline li[data-kind="did-not-happen"]::before { border-color: var(--stop); border-style: dashed; }
.timeline-label { font-size: var(--fs-sm); font-weight: 600; }
.timeline li[data-kind="did-not-happen"] .timeline-label { color: var(--stop); text-decoration: line-through; text-decoration-thickness: 1px; }
.timeline-note { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; margin-top: 3px; }
.timeline-kind {
  font-size: 0.5312rem; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700;
  color: var(--text-muted); margin-left: 9px;
}

/* --------------------------------------------------------------- explain */
.dropzone {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--panel-alt);
  padding: var(--s8) var(--s6);
  text-align: center;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.dropzone.is-over { border-color: var(--green); background: var(--ok-wash); }
.dropzone h3 { font-family: var(--serif); font-size: var(--fs-lg); margin-bottom: var(--s3); }
.dropzone p { font-size: var(--fs-sm); color: var(--text-muted); max-width: 48ch; margin: 0 auto var(--s5); }

/* --------------------------------------------------------------- account */
.auth-card { max-width: 380px; margin: var(--s8) auto; }
.settings-block { margin-bottom: var(--s8); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  /* Three columns exactly: nine stages fill 3x3 with no empty cell showing
     the track background through. */
  .journey-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .journey-detail { padding: var(--s5) var(--s5); }
}

@media (max-width: 1040px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .detail-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .detail-aside > * { flex: 1 1 250px; }
  .stack-layout { grid-template-columns: minmax(0, 1fr); }
  .stack-detail { position: static; }
}

@media (max-width: 880px) {
  .journey-track { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; }
  .journey-step { flex-direction: row; align-items: baseline; gap: 11px; padding: 11px var(--s4); }
  .ladder { grid-template-columns: 1fr; gap: var(--s6); }
  .fid-warning { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .signed-not-operational { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .detail-title { max-width: none; }
  .stack-facts { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- compare */
.table-scroll { overflow-x: auto; }
.compare-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.compare-table th, .compare-table td {
  text-align: left; vertical-align: top; padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.compare-table thead th {
  font-family: var(--serif); font-size: var(--fs-base); font-weight: 600;
  border-bottom: 1.5px solid var(--line-strong);
}
.compare-table tbody th {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; color: var(--text-muted); white-space: nowrap;
  width: 1%; padding-right: var(--s5);
}
.compare-table td { font-size: var(--fs-sm); }
.compare-table tr[data-differs="1"] { background: var(--panel-alt); }
.compare-differs {
  display: flex; align-items: center; gap: 5px; margin-top: 4px;
  color: var(--accent-text); font-size: 0.5938rem; letter-spacing: 0.1em;
}
.compare-missing {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-style: italic;
}
.compare-verify th, .compare-verify td { border-bottom: 0; padding-top: var(--s4); }
.compare-verify-count { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-muted); }
.compare-table .verify-state[data-state="verified"] { color: var(--ok); }
.compare-table .verify-state[data-state="unverified"] { color: var(--text-muted); }
.compare-table .verify-state[data-state="ageing"] { color: var(--accent-text); }
.compare-table .verify-state[data-state="stale"] { color: var(--warn); }

/* -------------------------------------------------------------- landscape */
/* A column per stage. Columns, not a graph: the reader's question is "at my
   stage, who is in the room", and a column answers it directly. */
.landscape {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(178px, 1fr);
  gap: var(--s3); min-width: 100%; align-items: start;
}
.landscape-col { border-top: 2px solid var(--line-strong); padding-top: var(--s3); }
.landscape-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--s3); }
.landscape-stage { font-family: var(--serif); font-size: var(--fs-sm); font-weight: 600; }
.landscape-count {
  font-size: 0.5938rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted);
}
.landscape-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.landscape-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: var(--s2) var(--s3); background: var(--panel-alt);
  border-left: 2px solid var(--line); text-decoration: none;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.landscape-item:hover { border-left-color: var(--gold); background: var(--panel); }
.landscape-name { font-size: var(--fs-sm); font-weight: 600; }
.landscape-kind { font-size: 0.5938rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.landscape-empty { font-size: var(--fs-xs); color: var(--text-muted); font-style: italic; }

/* --------------------------------------------------------- verify tally */
/* Counts, never percentages: "62% verified" invites the reader to round it up
   to "verified". */
.verify-tally { display: flex; flex-wrap: wrap; gap: var(--s3); }
.verify-tally-cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s3) var(--s4); min-width: 108px;
  background: var(--panel-alt); border-left: 2px solid var(--line);
}
.verify-tally-n { font-family: var(--mono); font-size: 1.375rem; font-weight: 600; line-height: 1.1; }
.verify-tally-label {
  font-size: 0.5938rem; letter-spacing: 0.09em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted);
}
.verify-tally-cell[data-state="verified"] { border-left-color: var(--ok); }
.verify-tally-cell[data-state="ageing"] { border-left-color: var(--gold); }
.verify-tally-cell[data-state="stale"] { border-left-color: var(--ochre); }
.verify-tally-cell[data-state="blocked"] { border-left-color: var(--ochre); }
.verify-tally-cell[data-state="moved"] { border-left-color: var(--stop); }

/* ------------------------------------------------------- status lead panel */
/* A facility's status is what the reader came for. It leads the page, and the
   ladders that explain how it was reached sit one disclosure down. */
.status-lead {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: var(--s4);
}
.status-cell {
  background: var(--panel); padding: var(--s3) var(--s4);
  display: flex; flex-direction: column; gap: 3px;
}
.status-cell-label {
  font-size: 0.5938rem; letter-spacing: 0.11em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted);
}
.status-cell-value { font-family: var(--serif); font-size: var(--fs-base); font-weight: 600; }
.status-cell[data-weak="1"] .status-cell-value { color: var(--warn); }

/* ------------------------------------------------------------- page action */
/* One button, and space around it, so it reads as the thing to do next rather
   than as another control in a row. */
.page-action { margin: var(--s4) 0 var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3); }

.case-outcome { display: flex; align-items: baseline; gap: var(--s3); margin-top: var(--s4); }
.case-outcome b { font-family: var(--serif); font-size: var(--fs-base); }

/* The chooser, folded once it has been used. */
.refine { border-top: 1px solid var(--hairline); margin-top: var(--s6); }
.refine > summary { font-family: var(--serif); font-size: var(--fs-base); }
.refine .steps { padding-top: var(--s3); }

/* ------------------------------------------------------------ claim rows */
/* A column of claims should be scannable before it is readable: the statement
   on the left, its kind above it, its confidence and date fixed on the right
   so the eye can run down that edge. */
.claim-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s4); align-items: start;
  padding: var(--s3) var(--s4);
}
.claim-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.claim-row .claim-text { font-size: var(--fs-sm); line-height: 1.5; margin: 0; }
.claim-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  text-align: right; white-space: nowrap;
}
.claim-conf {
  font-size: 0.5938rem; letter-spacing: 0.09em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted);
}
.claim-conf[data-conf="high"] { color: var(--ok); }
.claim-conf[data-conf="medium"] { color: var(--accent-text); }
.claim-conf[data-conf="low"] { color: var(--warn); }
.claim-when { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-muted); }
.claim-sources { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.claim-drawer + .claim-drawer { margin-top: 2px; }

@media (max-width: 560px) {
  .claim-row { grid-template-columns: minmax(0, 1fr); }
  .claim-side { flex-direction: row; align-items: baseline; gap: var(--s3); }
}
.claim-list { display: flex; flex-direction: column; gap: 2px; }

/* --------------------------------------------------------------- filters */
/* One row: type what you know, or narrow by where it lives. Both act on the
   list in place, so nothing is lost by trying. */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  margin-bottom: var(--s3);
}
.filter-input {
  flex: 0 1 260px; min-width: 160px;
  height: 32px; padding: 0 var(--s3);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text);
  font-size: var(--fs-sm); font-family: inherit;
}
.filter-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--line-strong); }
.filter-input::-webkit-search-cancel-button { cursor: pointer; }
@media (pointer: coarse) { .filter-input { height: 40px; } }

/* ------------------------------------------------------------ case reality */
/* Stated before the case is read, because a teaching construct read as a
   transaction is the most damaging mistake this application could cause. */
.reality {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: var(--s3) var(--s4); margin-bottom: var(--s4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.reality-mark { flex: none; display: flex; color: var(--fit-ink, var(--text-muted)); }
.reality-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reality-body b { font-size: var(--fs-sm); font-weight: 700; }
.reality-body span { font-size: var(--fs-xs); color: var(--text-soft); line-height: 1.5; }
.reality[data-reality="documented"]   { --fit-ink: var(--ok); border-left: 3px solid var(--ok); }
.reality[data-reality="reported"]     { --fit-ink: var(--accent-text); border-left: 3px solid var(--gold); }
.reality[data-reality="illustrative"] { --fit-ink: var(--warn); border-left: 3px solid var(--warn); }

/* ----------------------------------------------------------- the question */
/* The single most useful line on a concept page, so it is drawn as a thing to
   take away rather than as another paragraph. */
.ask-strip {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  background: var(--accent-wash); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 5px;
}
.ask-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.5938rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--accent-text);
}
.ask-text { font-family: var(--serif); font-size: var(--fs-base); line-height: 1.45; }

/* --------------------------------------------------------------- documents */
.doc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px var(--s4); align-items: baseline;
  padding: 9px var(--s3); border-bottom: 1px solid var(--hairline);
}
.doc-label { font-size: var(--fs-sm); font-weight: 600; }
.doc-by {
  font-size: 0.5938rem; letter-spacing: 0.09em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); white-space: nowrap; text-align: right;
}
.doc-note { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-soft); line-height: 1.5; }
@media (max-width: 560px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-by { text-align: left; }
}
.case-teaches { font-family: var(--serif); font-size: var(--fs-base); line-height: 1.5; max-width: 62ch; }
.filter-label {
  font-size: 0.5938rem; letter-spacing: 0.11em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted); flex: none; min-width: 62px;
}
