/* Attacking the Update. Built on shared/css/tsm.css tokens only. */
.toolbar-top { max-width: 1400px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.lede { margin: 0; max-width: 72ch; font-size: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.fig { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin-top: 12px; }
.fig-h { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; align-items: baseline; }
.fig .eyebrow, .panel .eyebrow { margin: 0; }
.plot { display: block; width: 100%; height: auto; }
.plot.drag { cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.row { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 4px 9px; font: 12px var(--mono); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--blue-soft); font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1px solid var(--rule); border-bottom: 3px solid transparent; background: var(--panel); border-radius: 3px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.tabs button[aria-selected="true"] { border-color: var(--brand-ink); border-bottom-color: var(--accent); background: var(--chip); }
.defgrid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
@media (max-width: 800px) { .defgrid { grid-template-columns: minmax(0, 1fr); } }
.ctl { display: flex; flex-direction: column; gap: 10px; }
.ctl:empty { display: none; }

/* Plot marks */
.axis line { stroke: var(--muted); stroke-width: 1; }
.axis .grid { stroke: var(--rule); }
.axis text { font: var(--axis-font); fill: var(--axis-ink); }
.axis .ax-t { font: 11.5px var(--body); fill: var(--muted); }
.ln { fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.ln.neu { stroke: var(--c3); }
.ln.att { stroke: var(--c2); }
.ln.fear { stroke: var(--c2); }
.ln.anger { stroke: var(--bad); stroke-dasharray: 6 3; }
.band { stroke: none; }
.band.neu { fill: var(--c3); fill-opacity: .14; }
.band.att { fill: var(--c2); fill-opacity: .14; }
.truth { stroke: var(--ink); stroke-width: 1.3; stroke-dasharray: 5 4; }
.thr { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; }
.sig { fill: var(--muted); opacity: .7; }
.sig.fab { fill: var(--c1); }
.lbl { font: 11px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.truth-l { fill: var(--ink); } .thr-l { fill: var(--accent); }
.fear-l { fill: var(--c2); } .anger-l { fill: var(--bad); }
.phase { fill: var(--chip); }
.now { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.bound { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .6; }
.mark { fill: var(--panel); stroke: var(--ink); stroke-width: 2.5; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; opacity: .8; }
.lg i.k { height: 0; width: 18px; border-radius: 0; opacity: 1; border-top: 2.6px solid; }
.lg i.k.neu { border-color: var(--c3); } .lg i.k.att, .lg i.k.fear { border-color: var(--c2); }
.lg i.k.anger { border-top: 2.6px dashed var(--bad); }
.lg i.k.dot { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--muted); }
.lg i.k.band { height: 10px; border: 0; background: var(--c2); opacity: .2; }

/* Panel */
.panel .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel .choices button b { display: block; font-weight: 600; }
.panel .choices button span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.slider .sym { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.why { margin: 0; font-size: 13px; line-height: 1.5; }
.bayes { border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; background: var(--bg); }
.bayes .eq { margin: 2px 0; font: 12px var(--mono); }
.bayes .fine { margin-top: 4px; }
td.num { font-family: var(--mono); text-align: right; }

/* Below */
.below .col { min-width: 0; }
.mt { margin-top: 18px; }
.howto { font-size: 13.5px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; max-width: 70ch; }
.method { border-top: 1px solid var(--rule); padding-top: 22px; }
.method p, #bayes-refresher p { font-size: 13.5px; }
.below .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; max-width: 68ch; }
.katex { font-size: 1.04em; }

/* Walkthrough */
.tour { position: fixed; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 4px; padding: 12px 14px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); z-index: 20; }
.tour-h { display: flex; justify-content: space-between; align-items: center; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tour .x { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }
.tour h3 { margin: 6px 0 4px; font-size: 19px; }
.tour p { margin: 0 0 10px; font-size: 13px; }
.tour-nav { display: flex; justify-content: space-between; }
@media (max-width: 600px) { .tour { right: 8px; bottom: 8px; } .panel .choices { grid-template-columns: minmax(0, 1fr); } }
