/* Longhand Research: The Power Behind AI.
   Styles for the interactive report only. Colours, type and spacing come from
   the site tokens in site.css; the three chart hues below were checked for
   colour-blind separation and contrast on the paper and on the dark ground. */

:root {
  --s1: #3a6ea5;   /* chart slot 1 */
  --s2: #b07a2a;   /* chart slot 2 */
  --s3: #8a5aa0;   /* chart slot 3 */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --toc-top: calc(var(--masthead-h) + 1px);
}
:root[data-theme="dark"] {
  --s1: #5b8fcc;
  --s2: #c0843a;
  --s3: #a27bc2;
}

/* Hero */

.pbai-hero { padding-block: clamp(40px, 7vw, 96px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.pbai-title {
  margin-top: 22px;
  font-size: clamp(56px, 9.5vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.pbai-title span, .pbai-title em { display: block; }
.pbai-title em { font-style: italic; text-transform: none; letter-spacing: -0.03em; }
.pbai-sub { margin-top: 22px; max-width: 30ch; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; font-style: italic; color: var(--ink-2); }
.pbai-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 26px;
  font: 500 12px/1.5 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.pbai-meta span { color: var(--ink-3); }
.pbai-question { margin-top: clamp(32px, 5vw, 56px); padding: 20px 0 0; border-top: 2px solid var(--ink); max-width: 68ch; }
.pbai-question-label, .pbai-num, .stat-label, .calc-formula-title, .calc-sens-title, .watch-k {
  font: 600 11.5px/1.4 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink);
}
.pbai-question-text { margin-top: 10px; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4; }
.pbai-keys {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin: clamp(32px, 5vw, 56px) 0 0; border-top: 1px solid var(--rule);
}
.pbai-keys > div { padding: 18px 20px 4px 0; border-right: 1px solid var(--rule); }
.pbai-keys > div + div { padding-left: 20px; }
.pbai-keys > div:last-child { border-right: 0; }
.pbai-keys dt { margin-bottom:8px; font: 400 13px/1.4 var(--font-sans); color: var(--ink-2); }
.pbai-keys dd { margin: 0; }
.pbai-key-num { font: 500 clamp(40px, 5vw, 64px)/1.05 var(--font-sans); letter-spacing: -0.02em; }
.pbai-key-unit { margin-left: 6px; font: 400 16px/1 var(--font-sans); color: var(--ink-2); }
.pbai-key-note { margin-top: 8px !important; font: 400 12.5px/1.5 var(--font-sans); color: var(--ink-2); }

/* Status tags */

.tag {
  display: inline-block; padding: 1px 7px; margin-right: 2px;
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  font: 600 10px/1.6 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  vertical-align: 1px; white-space: nowrap;
}
.tag-actual { border-color: var(--ink); color: var(--ink); }
.tag-announced { border-style: dashed; }
.tag-construction { border-color: var(--gold); color: var(--gold-ink); }
.tag-estimate { color: var(--ink-2); }
.tag-scenario { background: var(--tint); border-color: var(--tint-2); color: var(--gold-ink); }
.flag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--rule-2); border-radius: var(--radius);
  font: 600 9.5px/1.6 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); vertical-align: 1px; cursor: help;
}

/* Layout: contents beside the text on wide screens, a bar on top otherwise */

/* This page only: a wider frame so the tables and charts have room beside the contents list */
.wrap { max-width: calc(1480px + 2 * var(--gutter)); }
.pbai-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(28px, 3vw, 48px); align-items: start; }
.pbai-toc { position: sticky; top: calc(var(--toc-top) + 24px); padding-top: 40px; font-family: var(--font-sans); }
.pbai-toc-toggle { display: none; }
.pbai-toc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.pbai-toc-list a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 0 8px 12px; border-bottom: 1px solid var(--rule); border-left: 2px solid transparent; margin-left: -14px;
  font-size: 13.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pbai-toc-list a span { font: 500 11px/1 var(--mono); color: var(--ink-3); min-width: 18px; }
.pbai-toc-list a:hover { color: var(--ink); }
.pbai-toc-list a.is-current { color: var(--ink); border-left-color: var(--gold); font-weight: 500; }
.pbai-toc-list a.is-current span { color: var(--gold-ink); }

.pbai-body { min-width: 0; padding-top: 40px; }
.pbai-legend-box { padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); font: 400 13.5px/1.7 var(--font-sans); color: var(--ink-2); }
.pbai-legend-box strong { color: var(--ink); font-weight: 600; }

.pbai-section { padding-block: clamp(48px, 6vw, 80px) 0; scroll-margin-top: calc(var(--toc-top) + 20px); }
.pbai-section > p, .pbai-section > .pbai-list { max-width: 72ch; }
.pbai-section > p + p { margin-top: 1em; }
.pbai-num { margin: 0 0 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; }
.pbai-h2 { font-size: clamp(34px, 3.6vw, 50px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.pbai-h3 { margin: 40px 0 12px; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.pbai-lede { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.5; color: var(--ink); }
.pbai-list { margin: 0; padding-left: 1.2em; }
.pbai-list li + li { margin-top: 6px; }
.pbai-disclaimer { margin: 72px 0 24px; padding-top: 16px; border-top: 1px solid var(--rule); font: 400 13px/1.6 var(--font-sans); color: var(--ink-2); max-width: 80ch; }

.cite { font: 500 0.72em/1 var(--font-sans); color: var(--gold-ink); text-decoration: none; vertical-align: 0.35em; white-space: nowrap; }
.cite:hover { text-decoration: underline; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.block { display: block; margin-top: 4px; }
.na { font: 400 12.5px/1.4 var(--font-sans); color: var(--ink-3); }

/* Findings */

.findings { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.finding { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 20px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.finding-no { margin: 0; font: 500 44px/1 var(--font-sans); color: var(--gold-ink); letter-spacing: -0.02em; }
.finding-title { font-size: clamp(21px, 1.8vw, 25px); line-height: 1.25; margin-bottom: 8px; }
.finding p { max-width: 64ch; }
.finding-src { margin-top: 8px; font: 400 12.5px/1.5 var(--font-sans); color: var(--ink-2); }

/* Figures and charts */

.pbai-figure { margin: 36px 0 0; padding-top: 14px; border-top: 1px solid var(--ink); }
.fig-cap { display: block; margin-bottom: 14px; font: 600 14px/1.45 var(--font-sans); color: var(--ink); text-align: left; caption-side: top; }
.fig-cap.small { font-size: 12.5px; margin-bottom: 6px; }
.fig-no { color: var(--gold-ink); margin-right: 4px; }
.fig-src { margin-top: 12px !important; font: 400 12.5px/1.6 var(--font-sans); color: var(--ink-2); max-width: 90ch; }
.chart { width: 100%; min-height: 60px; }
.viz { display: block; overflow: visible; font-family: var(--font-sans); }
.viz .grid { stroke: var(--rule); stroke-width: 1; }
.viz .grid.zero { stroke: var(--rule-2); }
.viz .tick, .viz .axis-unit, .viz .na { font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.viz .na { fill: var(--ink-3); }
.viz .lab { font-size: 12.5px; fill: var(--ink); }
.viz .val { font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.viz .bar { cursor: default; transition: opacity 0.15s var(--ease); }
.viz .bar.s1 { fill: var(--s1); } .viz .bar.s2 { fill: var(--s2); } .viz .bar.s3 { fill: var(--s3); }
.viz .bar:hover, .viz .bar:focus-visible { opacity: 0.78; outline: none; }
.viz .pmark { stroke: var(--ink-2); stroke-width: 1; }
.viz .pmark.p50 { stroke: var(--ink); stroke-width: 2; }
.viz .plab { font-size: 10.5px; fill: var(--ink); font-weight: 600; }
.viz .pmark.mkt { stroke: var(--s2); stroke-width: 2; stroke-dasharray: 4 3; }
.viz .plab.mkt { fill: var(--ink); }
.legend { margin: 8px 0 0; font: 400 12.5px/1.6 var(--font-sans); color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.key:first-child { margin-left: 0; }
.key.s1 { background: var(--s1); } .key.s2 { background: var(--s2); } .key.s3 { background: var(--s3); }
.viz-tip {
  position: fixed; z-index: 60; max-width: 280px; padding: 8px 10px; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: var(--radius);
  font: 400 12.5px/1.45 var(--font-sans); box-shadow: 0 6px 18px -8px rgb(0 0 0 / 0.5);
}
.viz-table { margin-top: 10px; font: 400 13px/1.5 var(--font-sans); }
.viz-table summary { cursor: pointer; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; }
.viz-table summary:hover { color: var(--ink); }
.viz-table table, .fin, .exposure, .valuation, .scen, .scen-mini, .riskmap, .mc-inputs { border-collapse: collapse; width: 100%; font: 400 13.5px/1.45 var(--font-sans); }
.viz-table th, .viz-table td, .fin th, .fin td, .scen th, .scen td, .scen-mini th, .scen-mini td, .valuation th, .valuation td, .mc-inputs th, .mc-inputs td {
  padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; vertical-align: top;
}
.viz-table th:first-child, .fin th:first-child, .scen th:first-child, .scen-mini th:first-child, .valuation th:first-child, .valuation td:nth-child(2), .mc-inputs th:first-child, .scen td:nth-child(2) { text-align: left; }
thead th { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink) !important; vertical-align: bottom !important; }
.table-scroll { position: relative; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid var(--ink); }
.stat { padding: 16px 18px 6px 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--rule); }
.stat-value { margin-top: 6px; font: 500 34px/1.1 var(--font-sans); letter-spacing: -0.015em; }
.stat-note { margin-top: 8px; font: 400 12.5px/1.5 var(--font-sans); color: var(--ink-2); }

/* The chain */

.chain-nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--ink); }
.chain-nodes li { position: relative; }
.chain-nodes li + li::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px;
  border-top: 1px solid var(--ink-3); border-right: 1px solid var(--ink-3); transform: translateY(-50%) rotate(45deg); z-index: 1;
}
.chain-node {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 72px;
  padding: 12px 10px 12px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent;
  font: inherit; text-align: left; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.chain-node:hover { background: var(--tint); color: var(--ink); }
.chain-node[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); background: var(--tint); }
.chain-i { font: 500 11px/1 var(--mono); color: var(--ink-3); }
.chain-name { font: 500 15px/1.2 var(--font-sans); }
.chain-panel, .risk-detail, .timeline-detail { padding: 18px 0 4px; }
.chain-title { font-size: 26px; line-height: 1.15; }
.chain-expl { margin-top: 6px; max-width: 64ch; }
.chain-dl, .cs-dl { margin: 14px 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.chain-dl > div, .cs-dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.chain-dl dt, .cs-dl dt { font: 600 12.5px/1.5 var(--font-sans); color: var(--ink); }
.chain-dl dd, .cs-dl dd { margin: 0; font: 400 14.5px/1.55 var(--font-sans); color: var(--ink-2); }
.ticker-link, .risk-open {
  border: 0; background: none; padding: 0 2px; min-height: 28px; font: 600 13.5px/1.4 var(--font-sans); letter-spacing: 0.04em;
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer;
}
.risk-open { letter-spacing: 0; text-align: left; font-weight: 500; }
.risk-open[aria-pressed="true"] { text-decoration-thickness: 2px; }

/* The power flow and calculator */

.flow { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.flow li { position: relative; padding: 14px 16px 12px 0; font: 400 13px/1.45 var(--font-sans); color: var(--ink-2); }
.flow li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.flow strong { display: block; margin-bottom: 6px; font: 600 14px/1.3 var(--font-sans); color: var(--ink); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 3vw, 44px); }
.calc-inputs { display: grid; gap: 18px; align-content: start; }
.calc-field label { display: flex; justify-content: space-between; gap: 12px; font: 600 13.5px/1.4 var(--font-sans); }
.calc-field output { font: 500 14px/1.4 var(--mono); color: var(--gold-ink); }
.calc-field input[type="range"] { width: 100%; margin: 10px 0 2px; accent-color: var(--gold); height: 28px; }
.calc-field .input { margin-top: 8px; }
.calc-hint { margin-top: 4px; font: 400 12px/1.5 var(--font-sans); color: var(--ink-2); }
.calc-results { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.calc-results > div { padding: 14px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.calc-results > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule); }
.calc-results dt { font: 400 12.5px/1.4 var(--font-sans); color: var(--ink-2); }
.calc-results dd { margin: 6px 0 0; font: 500 26px/1.15 var(--font-sans); letter-spacing: -0.01em; }
.calc-results dd span { display: block; margin-top: 2px; font: 400 12px/1.4 var(--font-sans); color: var(--ink-2); letter-spacing: 0; }
.calc-results dd.small { font-size: 13px; }
.calc-formula { margin-top: 18px; padding: 14px 16px; background: var(--tint); border-radius: var(--radius); }
.calc-formula p { margin: 6px 0 0; }
.calc-formula code { font: 400 12.5px/1.6 var(--mono); color: var(--ink); white-space: normal; }
.calc-note { font: 400 12px/1.55 var(--font-sans); color: var(--ink-2); }
.calc-sens-title { margin: 22px 0 8px; }
.model-flag { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--gold); background: var(--tint); font: 600 13px/1.5 var(--font-sans); color: var(--ink); }
.pbai-section > .model-flag { margin-top: 20px; }

/* Timeline */

.timeline-filters, .fin-controls .filters, .dcf-top .filters { margin: 0 0 14px; }
.timeline-filters .filter { display: inline-flex; align-items: center; gap: 7px; }
.shape { display: inline-block; width: 11px; height: 11px; flex: none; }
.shape-actual { border-radius: 50%; background: var(--s1); }
.shape-construction { background: var(--s2); transform: rotate(45deg) scale(0.85); }
.shape-announced { border-radius: 50%; border: 2px solid var(--s3); background: var(--bg); }
.tl-scroll { position: relative; overflow-x: auto; padding-bottom: 4px; }
.tl-inner { min-width: 680px; padding: 0 12px 0 0; }
.tl-axis { position: relative; height: 22px; margin-left: 150px; border-bottom: 1px solid var(--ink); font: 500 11px/1 var(--mono); color: var(--ink-2); }
.tl-axis span { position: absolute; bottom: 6px; transform: translateX(-50%); }
.tl-lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--rule); }
.tl-lane-name { margin: 0; font: 500 13px/1.3 var(--font-sans); color: var(--ink-2); }
.tl-track { position: relative; height: calc(26px + var(--rows, 1) * 26px); }
.tl-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.tl-dot {
  position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; padding: 0; cursor: pointer;
  border: 2px solid var(--bg); box-sizing: content-box; transition: transform 0.15s var(--ease);
}
.tl-dot::after { content: ""; position: absolute; inset: -10px; }   /* a larger hit target */
.tl-dot.shape-actual { background: var(--s1); border-radius: 50%; }
.tl-dot.shape-construction { background: var(--s2); border-radius: 2px; transform: rotate(45deg) scale(0.85); }
.tl-dot.shape-announced { background: var(--bg); border: 3px solid var(--s3); width: 12px; height: 12px; margin: -9px 0 0 -9px; border-radius: 50%; }
.tl-dot:hover, .tl-dot.is-on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.tl-dot.shape-construction:hover, .tl-dot.shape-construction.is-on { transform: rotate(45deg) scale(1); }
.tl-d-head { margin: 0; font-family: var(--font-sans); font-size: 15px; }
.timeline-detail p, .risk-detail p { max-width: 70ch; }
.timeline-detail p + p { margin-top: 4px; font: 400 14px/1.5 var(--font-sans); }

/* Power scenarios */

.scen-mini { margin-bottom: 8px; }
.scen-table-wrap .small { margin-top: 8px; font-family: var(--font-sans); }

/* Money flow */

.illustrative {
  display: inline-block; margin: 0 0 16px; padding: 6px 12px; border: 1px dashed var(--ink-2); border-radius: var(--radius);
  font: 600 12.5px/1.4 var(--font-sans); letter-spacing: 0.02em; color: var(--ink);
}
.moneyflow { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 20px; align-items: stretch; }
.mf-source { padding: 18px 16px; border: 1px solid var(--ink); border-radius: var(--radius); align-self: start; position: sticky; top: calc(var(--toc-top) + 16px); }
.mf-dollar { margin: 0; font: 500 44px/1 var(--font-sans); }
.mf-source p + p { margin-top: 6px; font: 400 13px/1.4 var(--font-sans); color: var(--ink-2); }
.mf-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.mf-item { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--rule); font: 400 13.5px/1.45 var(--font-sans); }
.mf-item::before { content: ""; position: absolute; left: 0; top: 22px; width: 14px; border-top: 1px solid var(--ink-3); }
.mf-name { margin: 0; font-weight: 600; color: var(--ink); grid-row: span 2; }
.mf-what { margin: 0; color: var(--ink-2); grid-column: 2 / 4; }
.mf-who, .mf-listed { margin: 0; color: var(--ink); }
.mf-who span, .mf-listed span { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* Exposure table and company sheet */

.exposure { min-width: 1040px; margin-top: 26px; }
.exposure th, .exposure td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.exposure thead th { color: var(--ink); font-size: 12.5px; }
.exposure tbody th { width: 150px; }
.co-open {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 0; border: 0; background: none;
  font: inherit; text-align: left; color: var(--ink); cursor: pointer;
}
.co-ticker { font: 600 14px/1.2 var(--font-sans); letter-spacing: 0.06em; color: var(--ink); }
.co-name { font-size: 12.5px; color: var(--ink-2); }
.co-more { margin-top: 6px; font-size: 12px; color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.co-open:hover .co-more { text-decoration-thickness: 2px; }
.company-sheet { width: min(860px, calc(100vw - 24px)); }
.company-sheet .sheet-body { padding-bottom: 26px; font-family: var(--font-sans); font-size: 14.5px; }
.company-sheet .sheet-body > p:first-child { margin-top: 0; }
.fin { margin-top: 14px; }
.fin td.na { text-align: right; }
.notes { margin: 10px 0 0; padding-left: 1.1em; font: 400 12.5px/1.55 var(--font-sans); color: var(--ink-2); }
.cs-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.cs-charts figure { margin: 0; }

/* Financial analysis */

.fin-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 24px; }
.fin-note { font: 400 13px/1.5 var(--font-sans); color: var(--ink-2); min-height: 20px; }
.fin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 26px; margin-top: 16px; }
.fin-card { margin: 0; padding-top: 10px; border-top: 1px solid var(--ink); }
.fin-card figcaption { margin-bottom: 4px; font: 400 12px/1.4 var(--font-sans); }

/* Valuation, DCF, scenarios */

.valuation { min-width: 980px; margin-top: 18px; }
.valuation td { font-size: 13px; }
.methods { font-weight: 600; color: var(--ink); }
.input-sm { min-height: 36px; padding: 6px 8px; font-size: 13.5px; width: 110px; }
.valuation .input-sm { width: 104px; }
.dcf-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.scen { min-width: 1000px; margin-top: 18px; }
.mc-seed { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-sans); }
.mc-seed .input-sm { width: 96px; }
.mc-inputs { max-width: 640px; margin: 8px 0; }
.mc-inputs td .input-sm { width: 90px; }
.mc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.mc-stats > div:nth-child(even) { padding-left: 0; border-left: 0; }
.mc-stats > div:not(:nth-child(3n + 1)) { padding-left: 14px; border-left: 1px solid var(--rule); }
.mc-loading { font: 400 14px/1.5 var(--font-sans); color: var(--ink-2); }

/* Risk map */

.riskmap { min-width: 860px; }
.riskmap th, .riskmap td { padding: 9px 8px; border-bottom: 1px solid var(--rule); text-align: center; font-size: 12.5px; }
.riskmap thead th { font-weight: 600; font-size: 12px; }
.riskmap tbody th, .riskmap thead th:first-child { text-align: left; width: 150px; }
.rm-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }

/* What to watch */

.watch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 24px; border-top: 1px solid var(--ink); }
.watch-card { padding: 18px 0; border-bottom: 1px solid var(--rule); font-family: var(--font-sans); }
.watch-name { font: 600 16px/1.3 var(--font-sans); }
.watch-latest { margin: 8px 0 10px; font-size: 14px; }
.watch-k { margin-right: 6px; }
.watch dl { margin: 0; display: grid; gap: 4px; }
.watch dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.5; }
.watch dt { color: var(--ink-3); }
.watch dd { margin: 0; color: var(--ink-2); }

/* Sources */

.sources { margin: 16px 0 0; padding-left: 2.4em; font: 400 13.5px/1.55 var(--font-sans); }
.sources li { padding: 10px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--toc-top) + 80px); }
.sources li::marker { font-family: var(--mono); color: var(--gold-ink); }
.sources li:target, .sources li:focus { background: var(--tint); outline: none; }
.src-head { margin: 0; color: var(--ink); }
.src-pub { font-weight: 600; }
.src-head a { color: var(--ink); text-decoration-color: var(--rule-2); overflow-wrap: anywhere; }
.src-claim { margin: 4px 0 0; color: var(--ink-2); font-size: 12.5px; }

/* Responsive */

@media (max-width: 1180px) {
  .pbai-layout { grid-template-columns: minmax(0, 1fr); }
  .pbai-toc {
    position: sticky; top: var(--toc-top); z-index: 20; padding-top: 0; margin: 0 calc(-1 * var(--gutter));
    background: var(--bg); border-bottom: 1px solid var(--rule);
  }
  .pbai-toc-toggle {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 var(--gutter);
    border: 0; background: var(--bg); font: inherit; color: var(--ink); cursor: pointer; text-align: left;
  }
  .pbai-toc-label { font: 600 11px/1 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); }
  .pbai-toc-current { flex: 1; font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pbai-toc-toggle .icon { transition: transform 0.2s var(--ease); }
  .pbai-toc.is-open .pbai-toc-toggle .icon { transform: rotate(180deg); }
  .pbai-toc-list { display: none; border-top: 1px solid var(--rule); max-height: 60vh; overflow: auto; padding: 0 var(--gutter) 8px; }
  .pbai-toc.is-open .pbai-toc-list { display: block; }
  .pbai-toc-list a { margin-left: 0; padding-left: 10px; }
  .pbai-section { scroll-margin-top: calc(var(--toc-top) + 64px); }
  .sources li { scroll-margin-top: calc(var(--toc-top) + 64px); }
  .chain-nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chain-nodes li:nth-child(4n + 1)::before { display: none; }
  .fin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow li:nth-child(4) { padding-left: 0; border-left: 0; }
  .flow li:nth-child(n + 4) { border-top: 1px solid var(--rule); }
}

@media (max-width: 760px) {
  .pbai-keys, .stat-row { grid-template-columns: minmax(0, 1fr); }
  .pbai-keys > div, .pbai-keys > div + div { padding: 14px 0 6px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat, .stat + .stat { padding: 14px 0 8px; border-left: 0; border-bottom: 1px solid var(--rule); }
  .finding { grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; }
  .finding-no { font-size: 30px; }
  .chain-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-nodes li::before { display: none; }
  .chain-node { min-height: 56px; border-bottom-width: 2px; }
  .chain-dl > div, .cs-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li, .flow li + li { padding: 12px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .flow li:first-child { border-top: 0; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-results dd { font-size: 22px; }
  .moneyflow { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mf-source { position: static; }
  .mf-item { grid-template-columns: minmax(0, 1fr); padding-left: 18px; }
  .mf-name, .mf-what { grid-row: auto; grid-column: auto; }
  .fin-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-charts { grid-template-columns: minmax(0, 1fr); }
  .watch { grid-template-columns: minmax(0, 1fr); }
  .mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-stats > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .mc-stats > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule); }
  .company-sheet .sheet-head, .company-sheet .sheet-body { padding-left: 18px; padding-right: 18px; }
  .sources { padding-left: 2em; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-dot, .chain-node, .viz .bar { transition: none; }
}

@media print {
  .pbai-toc, .calc-inputs, .timeline-filters, .viz-table summary, .fin-controls, .dcf-top { display: none !important; }
  .pbai-layout { display: block; }
}

/* Table captions stay captions, headers follow their column, numbers stay on one line */
caption.fig-cap { display: table-caption; caption-side: top; padding-bottom: 12px; }
.valuation thead th:nth-child(2), .scen thead th:nth-child(2) { text-align: left; }
.valuation td:nth-child(n + 4), .scen td:nth-child(n + 3), .fin td { white-space: nowrap; }
.pbai-section > .pbai-figure + p, .pbai-section > .fig-src + p, .pbai-section > .table-scroll + .fig-src + p { margin-top: 28px; }

/* Figure 3: holographic site map, drawn in the site's own paper, ink and gold so it follows the theme */
.holo {
  --h-bg: var(--bg-sunk); --h-ink: var(--ink); --h-dim: var(--ink-2); --h-line: var(--gold); --h-edge: var(--rule-2);
  --h-a: var(--s1); --h-c: var(--s2); --h-n: var(--s3);
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0; margin-top: 18px;
  background: var(--h-bg); color: var(--h-ink); border: 1px solid var(--h-edge); position: relative; overflow: hidden;
  font-family: var(--font-sans);
}
.holo > .muted { padding: 20px; color: var(--h-dim); }
.holo-frame { position: relative; padding: 14px 14px 10px; min-width: 0; }
.holo-frame::before, .holo-frame::after { content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid var(--h-line); opacity: 0.7; }
.holo-frame::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.holo-frame::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.holo-hud { display: flex; justify-content: space-between; gap: 12px; font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.12em; color: var(--h-dim); }
.holo-svg { display: block; width: 100%; height: auto; margin: 6px 0; }
.holo .hg { stroke: var(--ink); stroke-opacity: 0.08; stroke-width: 0.3; }
.holo .hm-sweep-a { stop-color: var(--gold); stop-opacity: 0.22; } .holo .hm-sweep-b { stop-color: var(--gold); stop-opacity: 0; }
.holo .hm-city { font: 600 3.4px var(--mono); letter-spacing: 0.12em; fill: var(--h-ink); opacity: 0.85; pointer-events: none; }
.holo .hg-t { font: 3px var(--mono); fill: var(--h-dim); opacity: 0.6; }
.holo .hl-land { fill: var(--tint-2); stroke: var(--h-line); stroke-width: 0.45; stroke-linejoin: round; }
.holo .hm-lens-bg { fill: var(--bg); }
.holo .hm-lens-ring { fill: none; stroke: var(--h-line); stroke-width: 0.5; }
.holo .hm-lens-ring2 { fill: none; stroke: var(--h-line); stroke-width: 0.35; stroke-dasharray: 2 3; opacity: 0.6; }
.holo .hm-lens-t { font: 500 3.2px var(--mono); letter-spacing: 0.1em; fill: var(--gold-ink); }
.holo .hm-leader { stroke: var(--h-line); stroke-width: 0.35; stroke-dasharray: 1.5 1.5; opacity: 0.7; }
.holo .hm-jk { fill: none; stroke: var(--h-line); stroke-width: 0.4; stroke-dasharray: 1 1; }
.holo .hm { cursor: pointer; opacity: 0; transition: opacity 0.35s ease; outline: none; }
.holo .hm.is-on { opacity: 1; }
.holo .hm-hit { fill: transparent; }
.holo .hm-actual .hm-core { fill: var(--h-a); }
.holo .hm-actual .hm-pulse { fill: none; stroke: var(--h-a); stroke-width: 0.5; }
.holo .hm-construction .hm-core { fill: var(--h-c); }
.holo .hm-construction .hm-orbit { fill: none; stroke: var(--h-c); stroke-width: 0.45; stroke-dasharray: 1.6 1.2; }
.holo .hm-announced .hm-hollow { fill: var(--h-bg); stroke: var(--h-n); stroke-width: 0.8; }
.holo .hm-announced .hm-blink { fill: none; stroke: var(--h-n); stroke-width: 0.35; opacity: 0.6; }
.holo .hm:hover .hm-hit, .holo .hm:focus-visible .hm-hit, .holo .hm.is-sel .hm-hit { fill: var(--tint-2); stroke: var(--h-ink); stroke-width: 0.35; }
.holo-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--gold) 6%, transparent) 0 1px, transparent 1px 3px); }
.holo-hud-bottom { align-items: center; margin-top: 4px; }
.holo-play { font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; color: var(--bg); background: var(--ink); border: 0; padding: 7px 10px; cursor: pointer; }
.holo-play:focus-visible, .holo-range:focus-visible, .holo-float button:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 2px; }
.holo-range { flex: 1; accent-color: var(--h-line); min-width: 0; }
.holo-year { font: 600 18px/1 var(--mono); color: var(--gold-ink); min-width: 3.2em; text-align: right; }
.holo-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 10px 0 0; border-top: 1px solid var(--h-edge); }
.holo-counts .hc { padding: 8px 10px 2px 0; }
.holo-counts dt { font: 500 10px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.holo-counts dt { color: var(--h-dim); display: flex; align-items: center; gap: 6px; }
.holo-counts dt::before { content: ""; width: 8px; height: 8px; flex: none; }
.holo-counts .hc-actual dt::before { border-radius: 50%; background: var(--h-a); }
.holo-counts .hc-construction dt::before { background: var(--h-c); transform: rotate(45deg) scale(0.85); }
.holo-counts .hc-announced dt::before { border-radius: 50%; border: 2px solid var(--h-n); width: 6px; height: 6px; }
.hd-status { color: var(--h-dim); }
.holo-counts dd { margin: 2px 0 0; font: 600 15px/1.3 var(--font-sans); color: var(--h-ink); }
.holo-counts dd span { font-weight: 400; font-size: 11px; color: var(--h-dim); }
.holo-side { border-left: 1px solid var(--h-edge); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.holo-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.holo-key li { display: flex; align-items: center; gap: 8px; }
.hk { display: inline-block; width: 10px; height: 10px; flex: none; }
.hk-actual { border-radius: 50%; background: var(--h-a); box-shadow: 0 0 6px var(--h-a); }
.hk-construction { background: var(--h-c); transform: rotate(45deg) scale(0.8); box-shadow: 0 0 6px var(--h-c); }
.hk-announced { border-radius: 50%; border: 2px solid var(--h-n); box-shadow: 0 0 6px var(--h-n); }
.holo-float-t { margin: 4px 0 0; font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--h-dim); }
.holo-float { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.holo-float .hf { opacity: 1; }
.holo-float .hf.is-on { opacity: 1; }
.holo-float button { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; background: var(--tint); border: 1px solid var(--h-edge); color: var(--h-ink); padding: 7px 8px; font: 400 12.5px/1.35 var(--font-sans); cursor: pointer; }
.holo-float button .hk { margin-top: 3px; }
.holo-float .muted, .holo-detail .muted { color: var(--ink-3); }
.holo-detail { border-top: 1px solid var(--h-edge); padding-top: 10px; font-size: 13px; }
.holo-detail h4 { margin: 2px 0 2px; font: 600 15px/1.3 var(--font-sans); color: var(--h-ink); }
.holo-detail dl { margin: 8px 0; display: grid; gap: 3px; }
.holo-detail dl div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.holo-detail dt { color: var(--h-dim); font: 500 10.5px/1.6 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.holo-detail dd { margin: 0; }
.holo-detail .cite { color: var(--gold-ink); }
.hd-status { margin: 0; font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }

.holo-frame { grid-column: 1; grid-row: 1; }
.holo-side { grid-column: 2; grid-row: 1; }
.holo > .viz-table { grid-column: 1 / -1; grid-row: 2; }
.holo .viz-table { padding: 0 14px 12px; color: var(--h-ink); }
.holo .viz-table table { color: var(--h-ink); }
.holo .viz-table th, .holo .viz-table td { border-color: var(--h-edge); }

@media (prefers-reduced-motion: no-preference) {
  .holo .hl-main { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; }
  .holo.is-booted .hl-main { animation: holo-draw 2.4s ease-out forwards, holo-fill 1.2s 1.4s ease-out forwards; }
  .holo .hg-grid, .holo .hm-lens { opacity: 0; }
  .holo.is-booted .hg-grid { animation: holo-fade 1s 0.1s forwards; }
  .holo.is-booted .hm-lens { animation: holo-fade 0.8s 1.2s forwards; }
  .holo .holo-sweep { opacity: 0; }
  .holo.is-booted .holo-sweep { opacity: 1; animation: holo-spin 7s linear infinite; }
  .holo .hm-pulse { transform-box: fill-box; transform-origin: center; animation: holo-pulse 2.4s ease-out infinite; }
  .holo .hm-orbit { transform-box: fill-box; transform-origin: center; animation: holo-spin 5s linear infinite; }
  .holo .hm-blink { animation: holo-blink 1.8s ease-in-out infinite; }
  .holo .hm-lens-ring2 { transform-box: fill-box; transform-origin: center; animation: holo-spin 30s linear infinite reverse; }
  .holo .hm.is-on .hm-core, .holo .hm.is-on .hm-hollow { transform-box: fill-box; transform-origin: center; animation: holo-pop 0.5s ease-out; }
  .holo-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 60px; top: -60px; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--gold) 14%, transparent), transparent); animation: holo-scan 5s linear infinite; }
  .holo-svg { animation: holo-flicker 6s steps(1) infinite; }
}
.holo.is-still .hl-main { stroke-dashoffset: 0; fill-opacity: 1; }
@keyframes holo-draw { to { stroke-dashoffset: 0; } }
@keyframes holo-fill { to { fill-opacity: 1; } }
@keyframes holo-fade { to { opacity: 1; } }
@keyframes holo-spin { to { transform: rotate(360deg); } }
@keyframes holo-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes holo-blink { 50% { opacity: 0.1; } }
@keyframes holo-pop { 0% { transform: scale(0); } 70% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes holo-scan { to { top: 100%; } }
@keyframes holo-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.93; } 48% { opacity: 1; } 83% { opacity: 0.96; } }

@media (max-width: 900px) {
  .holo { grid-template-columns: minmax(0, 1fr); }
  .holo-side { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--h-edge); }
  .holo > .viz-table { grid-row: 3; }
}
.holo-map-scroll { overflow-x: auto; scrollbar-width: thin; }
.holo-swipe { display: none; margin: 0; font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--h-dim); }
@media (max-width: 560px) {
  .holo-counts { grid-template-columns: minmax(0, 1fr); }
  .holo-svg { min-width: 640px; }
  .holo-swipe { display: block; }
  .holo-hud-top span:first-child { display: none; }
}
