/* War Markets. Built on shared/css/tsm.css tokens only. */
body { overflow-x: hidden; }
.actions { max-width: 1400px; margin: 12px auto 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.actions .btns { display: flex; gap: 8px; flex-wrap: wrap; }

.card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-h { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: flex-start; }
.chartcard { position: relative; }
.q-title { margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.2; }
.chartwrap, #scorewrap { position: relative; }
.chart, .scoresvg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.chart { cursor: crosshair; touch-action: pan-y; }
.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chart text, .scoresvg text { font: var(--axis-font); fill: var(--axis-ink); }
.grid { stroke: var(--rule); stroke-width: 1; }
.price { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; cursor: pointer; }
.price.focus { stroke-width: 3.4; }
.deadline { stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .8; }
.settle circle { stroke: var(--panel); stroke-width: 1.5; }
.settle-t { font: 600 10.5px var(--body) !important; fill: var(--ink) !important; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.ev-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.ev-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; }
.ev-dot.hollow { fill: var(--panel); stroke: var(--accent); stroke-width: 1.5; }
.cross { stroke: var(--ink); stroke-width: 1; opacity: .45; pointer-events: none; }
.tooltip { min-width: 220px; }
.tt-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 8px; align-items: baseline; font-size: 12px; margin-top: 3px; }
.tt-row i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tt-row b { font-family: var(--mono) !important; font-size: 12px !important; font-weight: 500 !important; }
.tt-ev { display: block; margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--accent); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 10px; }
.lg-line { height: 0 !important; border-top: 2.5px solid var(--c1); }
.lg-dl { height: 0 !important; border-top: 1.5px dashed var(--muted); }
.lg-settle { width: 10px !important; border-radius: 50%; background: var(--c2); }
.lg-ev { width: 9px !important; height: 9px !important; border-radius: 50%; background: var(--accent); }
.lg-ev.hollow { background: transparent; border: 1.5px solid var(--accent); }

.lane-t { font: 600 11.5px var(--body) !important; fill: var(--muted) !important; }
.sc-dot { cursor: pointer; }
.sc-dot circle { stroke: var(--panel); stroke-width: 1.5; opacity: .85; }
.sc-dot circle.res-yes { fill: var(--bad); }
.sc-dot circle.res-no { fill: var(--good); }
.sc-dot.focus circle { stroke: var(--ink); stroke-width: 2; opacity: 1; }
.sc-dot:focus-visible { outline: none; }
.sc-dot:focus-visible circle { stroke: var(--accent); stroke-width: 3; }
.score-text { font-size: 12.5px; }
.score-text b { color: var(--ink); }

/* Panel */
.cases { grid-template-columns: 1fr; }
.mk-list { display: flex; flex-direction: column; gap: 3px; }
.mk-row { display: grid; grid-template-columns: 1fr 32px; gap: 4px; }
.mk { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; text-align: left; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.mk:hover { border-color: var(--muted); }
.mk[aria-pressed="true"] { border-color: var(--ink); background: var(--chip); font-weight: 600; }
.eye { border: 1px solid var(--rule); border-radius: 3px; background: transparent; cursor: pointer; color: var(--muted); font-size: 14px; }
.eye[aria-pressed="false"] { opacity: .6; }
.sw-c { width: 10px; height: 10px; border-radius: 50%; }
.res { font-family: var(--mono); font-size: 10.5px; padding: 0 5px; border-radius: 8px; border: 1px solid currentColor; font-weight: 400; text-transform: uppercase; }
.res-yes { color: var(--bad); } .res-no { color: var(--good); } .res-open, .res-unclear { color: var(--muted); }
.q { margin: 0; font-size: 17px; line-height: 1.25; font-family: var(--display); font-weight: 600; }
.readout small { color: var(--muted); }
.rule { font-size: 12px; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 9px; }
.rule summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.rule p { margin: 6px 0 0; }
.rule a, .src a { color: var(--blue); }

/* Estimates table */
.est { margin: 6px 0 8px; }
.est caption { text-align: left; padding: 8px 10px 0; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.est td.num, .est th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }

/* Tour */
.stage { position: relative; }
.tour { position: absolute; z-index: 8; right: 14px; top: 56px; width: min(360px, calc(100% - 28px)); background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 4px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.tour[hidden] { display: none; }
.tour-h { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.tour .x { border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.tour h3 { margin: 6px 0 4px; font-size: 20px; }
.tour p { margin: 0 0 10px; font-size: 13px; }
.tour-nav { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) { .tour { position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; } }

.below h2.mt { margin-top: 22px; }
.below code { font-family: var(--mono); font-size: 11.5px; }
.howto { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; max-width: 68ch; }
@media (max-width: 480px) { body { padding-inline: 12px; } .card { padding: 10px; } .q-title { font-size: 17px; } }
