/* The Trace and the entity scene */
.trace { max-width: 1500px; margin: 0 auto; padding-top: 10px; }
.tr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; padding-bottom: 10px; }
.tr-title h1 { font-size: clamp(32px, 3.8vw, 58px); line-height: 1; margin: 6px 0 8px; letter-spacing: -0.02em; }
.tr-back { margin-left: 12px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.tr-back a { color: var(--text-2); }
.tr-sub { margin: 0; color: var(--text-2); font-size: var(--fs-ui); max-width: 80ch; }
.tr-sub .fig { color: var(--text-1); }
.tr-standing { margin: 4px 0 12px; font-size: clamp(16px, 1.3vw, 19px); color: var(--text-1); font-style: italic; border-left: 2px solid var(--money-lo); padding-left: 12px; }
.tr-stage { position: relative; }
.tr-a { position: relative; }
.tr-svg { display: block; width: 100%; overflow: visible; }
.tr-col { fill: var(--text-3); font: 500 10px var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; }
.tr-link { fill: none; mix-blend-mode: screen; cursor: pointer; }
.tr-link:hover { stroke-opacity: 1; }
.tr-node { cursor: pointer; outline: none; }
.tr-node:focus-visible .tr-box { stroke: var(--money-hi); stroke-width: 2px; }
.tr-node[data-terminal="ultimate"] .tr-box { filter: drop-shadow(0 0 6px rgba(245, 165, 36, 0.8)); }
.tr-node[data-kind="origin"] .tr-box { filter: drop-shadow(0 0 10px rgba(255, 210, 122, 0.9)); }
.tr-name { fill: var(--text-1); font: 400 12px var(--f-ui); paint-order: stroke; stroke: var(--ink-0); stroke-width: 3px; }
.tr-val { fill: var(--text-3); font: 400 10.5px var(--f-num); paint-order: stroke; stroke: var(--ink-0); stroke-width: 3px; }
.tr-node[data-terminal="ultimate"] .tr-name { fill: var(--money-hi); }
.tr-mk { cursor: pointer; outline: none; }
.tr-mk circle { fill: var(--ink-0); stroke: rgba(255, 236, 214, 0.25); stroke-width: 1; }
.tr-mk text { font: 700 7.5px var(--f-ui); fill: var(--ink-0); pointer-events: none; }
.tr-mk.chk-confirmed circle, .tr-mk.chk-corrected circle { fill: #b6d08f; stroke: #e2f0c9; }
.tr-mk.chk-unreadable_source circle { fill: var(--ink-0); stroke: #d4b48f; stroke-dasharray: 2 1.5; }
.tr-mk.chk-unreadable_source text { fill: #d4b48f; }
.tr-mk.chk-not_checked circle { r: 2.5; fill: rgba(255, 236, 214, 0.18); stroke: none; }
.tr-mk:focus-visible circle { stroke: var(--money-hi); stroke-width: 2; }
.tr-readout { top: 0; left: 0; }
.tr-empty { fill: var(--text-2); font: 400 20px var(--f-display); }
.tr-panel { position: absolute; top: 0; right: 0; width: min(380px, 100%); max-height: 100%; overflow-y: auto; z-index: 8; padding: 16px 18px; background: rgba(22, 19, 16, 0.97); border: 1px solid var(--rule-strong); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); font-size: var(--fs-small); color: var(--text-2); }
.tr-panel h3 { font-size: 24px; margin: 4px 0 6px; color: var(--text-1); line-height: 1.1; }
.tr-panel .tp-close { position: absolute; right: 10px; top: 10px; float: none; margin: 0; width: 30px; height: 30px; }
.tp-amt { color: var(--money-hi); font-size: 15px; margin-bottom: 10px; }
.tp-amt .muted { font: 400 12px var(--f-ui); }
.tp-rel { list-style: none; padding: 0; margin: 8px 0; }
.tp-rel li { padding: 5px 0; border-bottom: 1px solid var(--rule); }
.tp-src { background: none; border: 1px solid var(--rule); border-radius: 999px; color: var(--text-2); font-size: 11px; padding: 1px 8px; cursor: pointer; }
.tp-src:hover { color: var(--text-1); border-color: var(--money-lo); }
.tp-stop { color: var(--text-1); }
.tp-standing, .ls-standing { font-family: var(--f-display); font-style: italic; font-size: 15px; color: var(--text-1); margin-top: 12px; }
.not-public { display: inline-block; font: 600 10px var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); border: 1px dashed var(--text-4); border-radius: 4px; padding: 2px 6px; }
.lp-ring { border: 1px solid var(--text-3); border-radius: 999px; padding: 1px 8px; }
.tier-dot { display: inline-block; width: 14px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid #e9dcc4; }
.tier-dot.tier-corporate_disclosure { opacity: 0.55; }
.tier-dot.tier-reported { border-top-style: dashed; }
.tier-dot.tier-inferred { border-top-style: dotted; }
.tr-caption { margin: 12px 0 8px; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.38; color: var(--text-1); max-width: 90ch; }
.tr-scrub { position: relative; padding: 6px 0 18px; outline: none; }
.tr-scrub:focus-visible { box-shadow: inset 0 0 0 1px var(--money-lo); border-radius: 6px; }
.ts-bars { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.ts-b { flex: 1; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; }
.ts-b i { display: block; width: 100%; height: var(--h); background: rgba(245, 165, 36, 0.35); border-radius: 2px 2px 0 0; transition: background 120ms; }
.ts-b:hover i { background: rgba(245, 165, 36, 0.7); }
.ts-b.on i { background: var(--money-hi); box-shadow: 0 0 10px var(--money); }
.ts-axis { position: relative; height: 14px; }
.ts-axis span { position: absolute; transform: translateX(-50%); font: 400 10px var(--f-num); color: var(--text-3); top: 3px; }
.tr-foot { display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; align-items: center; }
.tr-legend { font-size: 11.5px; }
.lk { display: inline-block; width: 22px; height: 0; border-top: 3px solid #e9dcc4; vertical-align: middle; }
.lk-cor { opacity: 0.45; }
.lk-rep { border-top-style: dashed; }
.lk-inf { border-top-style: dotted; }
.chkdot { display: inline-grid; place-items: center; width: 11px; height: 11px; border-radius: 50%; font: 700 8px var(--f-ui); color: var(--ink-0); }
.chkdot.chk-confirmed { background: #b6d08f; }
.chkdot.chk-unreadable_source { border: 1px dashed #d4b48f; color: #d4b48f; }
.chkdot.chk-not_checked { width: 6px; height: 6px; background: rgba(255, 236, 214, 0.25); }
.nd { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.nd-ult { background: var(--money); box-shadow: 0 0 6px var(--money); }
.nd-shared { background: repeating-linear-gradient(90deg, rgba(245, 165, 36, 0.55) 0 3px, rgba(245, 165, 36, 0.18) 3px 6px); }
.nd-stop { background: repeating-linear-gradient(45deg, #9a948a 0 1.5px, transparent 1.5px 4px); border: 1px solid #9a948a; }
.tr-table { margin-top: 12px; }
.tr-lead { display: grid; gap: 4px; margin-top: 16px; }
.tr-plane { border-top: 1px solid var(--rule); padding-top: 10px; }
.tr-plane h3 { margin: 0 0 8px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule-strong); font-size: 12px; color: var(--text-1); }
.lp-ring-i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--text-2); }
.tr-notes { margin-top: 10px; }

/* link sources popover */
.linksrc { width: min(520px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; }
.ls-head { font-size: 19px; color: var(--text-1); margin: 6px 0 8px; line-height: 1.25; }
.ls-link { border-top: 1px solid var(--rule); padding: 8px 0; }
.ls-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 11.5px; }
.tier { font: 600 10px var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; border: 1px solid; }
.tier-documented { color: #d9e6c8; border-color: #8aa86a; }
.tier-corporate_disclosure { color: #cfe0ea; border-color: #6f93aa; }
.tier-reported { color: #e9d6c0; border-color: #a88a62; border-style: dashed; }
.tier-inferred { color: #d8cbe6; border-color: #8f7aa8; border-style: dotted; }
.chk { font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.chk-confirmed, .chk-corrected { background: rgba(182, 208, 143, 0.15); color: #d9e6c8; }
.chk-unreadable_source { border: 1px dashed #d4b48f; color: #e9d6c0; }
.chk-not_checked { border: 1px dotted var(--text-4); color: var(--text-3); }
.ls-detail { font-size: 12px; color: var(--text-2); margin: 6px 0; }
.ls-quote { margin: 8px 0; padding: 8px 10px; border-left: 2px solid var(--money-lo); background: rgba(255, 236, 214, 0.03); font: italic 400 15px/1.4 var(--f-display); color: var(--text-1); }
.ls-quote footer { margin-top: 6px; font: 400 11px/1.4 var(--f-num); color: var(--text-3); font-style: normal; word-break: break-all; }

/* Scene B */
.sb-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 32px; align-items: start; }
.sb-line { margin: 0; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.4; color: var(--text-1); }
.sb-standing { margin: 8px 0 0; font: italic 400 16px/1.4 var(--f-display); color: var(--text-1); border-left: 2px solid var(--price-index); padding-left: 10px; }
.sb-ctl { display: grid; gap: 10px; justify-items: start; }
.sb-owner { font-size: 12px; color: var(--text-3); display: grid; gap: 4px; }
.sb-owner select { min-width: 260px; max-width: 100%; border-radius: 8px; background: var(--ink-1); }
.sb-tech { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-chip { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.sb-chip[aria-pressed="true"] { border-color: var(--money-lo); color: var(--text-1); background: rgba(245, 165, 36, 0.08); }
.sb-windnote { font-size: 12.5px; color: var(--text-2); margin: 12px 0 0; max-width: 100ch; }
.sb-ownernote { font: italic 400 15px var(--f-display); color: var(--money-hi); margin: 8px 0 0; }
.sb-chart { position: relative; margin-top: 10px; }
.sb-chart svg { display: block; width: 100%; overflow: visible; }
.sb-band.lit { filter: drop-shadow(0 0 3px rgba(255, 210, 122, 0.6)); }
.sb-break { fill: none; stroke: var(--text-3); stroke-dasharray: none; }
.sb-breaklbl { fill: var(--text-3); font: 400 10px var(--f-ui); }
.sb-hi { stroke: var(--money); stroke-dasharray: 3 3; }
.sb-hilbl { fill: var(--money-hi); font: 500 11px var(--f-num); }
.sb-so { fill: #f0e6ff; stroke: #b89be6; }
.sb-acclbl { fill: var(--text-1); font: 400 11px var(--f-ui); paint-order: stroke; stroke: var(--ink-0); stroke-width: 3px; pointer-events: none; }
.sb-readout { top: 0; left: 0; max-width: 360px; }
.r-ladder { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 11px; }
.r-ladder th { text-align: left; color: var(--text-3); font-weight: 500; }
.r-ladder td, .r-ladder th { padding: 2px 4px; border-bottom: 1px solid var(--rule); }
.sb-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 32px; margin-top: 18px; }
.sb-runs { list-style: none; margin: 0; padding: 0; }
.sb-runs li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.sr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.sr-head .num { margin-left: auto; font-size: 12px; color: var(--money-hi); }
.sr-name { background: none; border: 0; padding: 0; color: var(--text-1); cursor: pointer; font-size: 13.5px; }
.sr-name:hover { color: var(--money-hi); }
.sr-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; height: 10px; margin: 6px 0 4px; }
.sr-strip i { background: rgba(255, 236, 214, 0.06); border-radius: 1px; }
.sr-strip i.on { background: rgba(245, 165, 36, 0.7); }
.sr-strip i.now { outline: 1.5px solid #fff; outline-offset: 0; }
.sr-note { font-size: 11.5px; color: var(--text-3); }
.sb-cannot ul { margin: 0; padding-left: 1.1em; color: var(--text-1); font-size: 13.5px; }
.sb-cannot li { margin-bottom: 6px; }
.tr-fly { position: fixed; left: 0; top: 0; z-index: 60; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; box-shadow: 0 0 14px currentColor; pointer-events: none; }

/* Scene C: an entity */
.entity { max-width: 1240px; margin: 0 auto; padding-top: 18px; }
.en-head h1 { font-size: clamp(36px, 4.8vw, 72px); line-height: 0.98; margin: 8px 0 12px; letter-spacing: -0.02em; text-wrap: balance; }
.en-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.en-attr { font-size: 12.5px; color: var(--text-2); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; background: rgba(255, 236, 214, 0.02); max-width: 100ch; }
.en-rel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-top: 18px; }
.en-rel ul { list-style: none; margin: 0; padding: 0; }
.en-rel li { padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.en-rel li .muted { font-size: 11.5px; }
.entity h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 32px 0 12px; }
.en-river { position: relative; }
.en-river svg { display: block; width: 100%; }
.en-units { margin-top: 6px; }
.en-peer svg { display: block; width: 100%; }
.peer-band { fill: rgba(230, 237, 247, 0.12); }
.peer-med { fill: none; stroke: var(--price-index); stroke-dasharray: 3 3; }
.peer-own { fill: var(--money-hi); }
@media (max-width: 900px) {
  .sb-top, .sb-grid, .en-rel { grid-template-columns: 1fr; }
  .tr-panel { position: relative; width: 100%; margin-top: 12px; max-height: none; }
}
.tr-ev { fill: none; stroke: #fff4e2; stroke-width: 1.2; pointer-events: none; }
.sb-time { margin: 8px 0 0; font-size: 12.5px; color: var(--text-2); }
.tr-teth { fill: var(--text-3); font: italic 400 12px var(--f-display); paint-order: stroke; stroke: var(--ink-0); stroke-width: 3px; }
.tr-teth-k { font: italic 14px var(--f-display); color: var(--text-2); }
.en-change { stroke: var(--money-hi); opacity: 0.7; }
.en-reported { stroke: var(--text-3); stroke-dasharray: 4 4; }
.en-chlist { list-style: none; padding: 0; margin: 4px 0 10px; font-size: 13px; color: var(--text-1); }
.en-chlist li { padding: 4px 0; border-bottom: 1px solid var(--rule); }
.en-chlist .num { color: var(--money-hi); margin-right: 8px; }
.tr-apportion-inline { font: italic 400 15px/1.4 var(--f-display); color: var(--text-1); margin: 10px 0 0; }
.tr-a { position: relative; }
.tr-apportion { position: absolute; top: 24px; left: auto; right: 0; z-index: 2; margin: 0; font: italic 400 14px/1.32 var(--f-display); color: var(--text-1); border-left: 2px solid var(--money); padding-left: 8px; pointer-events: none; }
.tr-mk line.tr-tier { stroke: #fff4e2; stroke-width: 2.5; }
.tr-mk[data-tier="corporate_disclosure"] line.tr-tier { opacity: 0.5; }
.tr-mk[data-tier="station_list"] line.tr-tier { opacity: 0.45; }
.nd-reg { background: #c98a1c; }
.tp-apportion { font: italic 400 14px/1.4 var(--f-display); color: var(--text-1); }
.sb-lead { fill: none; stroke: var(--text-3); stroke-width: 0.8; }
@media (max-width: 900px) { .tr-apportion { position: static; margin: 0 0 10px; width: auto !important; } }
.tr-morph { position: fixed; z-index: 60; pointer-events: none; border-radius: 1px; box-shadow: 0 0 14px rgba(255,210,122,0.5); will-change: transform, width, height; }
.tr-modes { display: none; }
