/* Phase 3 tools: Time Machine, Committee Drift, Alternate Rankings, Blind Résumé, Make My Case. */
:root { --pos: var(--win); --neg: var(--loss); }

tr.hl > *, td.hl { background: var(--hl); }
td.fav { font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.alt-table td, .alt-table th { white-space: nowrap; }
.alt-table tfoot th, .alt-table tfoot td { border-top: 2px solid var(--border); }
.notes { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: .8rem 0; }
.notes dt { font-weight: 600; }
.notes dd { margin: 0; }

/* drift */
.heat-table th[scope="row"] { white-space: nowrap; text-align: left; }
.heat-table td.heat { font-variant-numeric: tabular-nums; min-width: 3.2em; }
/* an inset ring, not an outline: an outline paints over the pinned measure column when scrolled */
.heat-table td.changed { box-shadow: inset 0 0 0 2px var(--text), inset 0 0 0 3px var(--surface); }
.event-line { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }
.event-dot { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.event-mark.tested .event-dot { stroke: var(--accent); fill: var(--accent-soft); }
.event-mark:hover .event-dot, .event-mark:focus .event-dot { stroke-width: 2.5; }
.event-mark { cursor: pointer; outline: none; }
.event-num { font-size: 11px; font-weight: 650; fill: var(--text); pointer-events: none; }
details.event { margin: .6rem 0; padding: .7rem .9rem; }
details.event summary { cursor: pointer; line-height: 1.6; }
details.event h4 { margin: .8rem 0 .2rem; font-size: .9rem; }
details.event p { margin: .2rem 0; }
.event-badge { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; border: 1.5px solid var(--muted); font-size: .8rem; font-weight: 650; }
.tag.verdict-supported { border-color: var(--pos); color: var(--pos); }
.tag.verdict-partly { border-color: var(--accent); }
.tag.verdict-not_supported { border-color: var(--neg); color: var(--neg); }

/* blind résumé */
.blind-card h3 { margin-top: 0; }
.blind-card dl { margin: 0 0 .8rem; }
.blind-card dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.blind-card dt { color: var(--muted); }
.blind-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.blind-card .btn { width: 100%; }
.reveal { margin: 1rem 0; border-color: var(--accent); }

/* make my case */
.bar-pos { fill: var(--pos); }
.bar-neg { fill: var(--neg); }
.bar-pos.probe, .bar-neg.probe { fill-opacity: .25; stroke-width: 1.5; }
.bar-pos.probe { stroke: var(--pos); }
.bar-neg.probe { stroke: var(--neg); }
.case-table th.me, .case-table td.me { background: var(--accent-soft); }
.case-table td.best { font-weight: 700; }
.case-table th[scope="row"] { text-align: left; white-space: nowrap; }
.case-lines li { margin: .35rem 0; }
.agree-row th, .agree-row td { font-weight: 600; }
#feature, #team { min-width: min(16rem, 100%); }

/* Phase 4 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .7rem; margin-bottom: 1rem; }
.tool-card { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--text); padding: .8rem .9rem; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.chart .quad { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.chart .quad-lbl { font-size: 11px; fill: var(--muted); }
.chart .pt { fill: var(--mark); fill-opacity: .55; stroke: var(--surface); stroke-width: 1.5; }
.chart .pt.in { fill-opacity: 1; }
.chart .pt.unr { fill: var(--surface); stroke: var(--mark); }
.chart .pt.fav { stroke: var(--text); stroke-width: 2.5; }
.chart .pt-lbl { font-size: 11px; fill: var(--text); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chart .quad-lbl { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.pick-list { list-style: none; padding: 0; margin: .5rem 0; max-width: 720px; }
.pick-row { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-bottom: 1px solid var(--border); }
.pick-n { width: 2ch; text-align: right; font-weight: 650; }
.pick-name { flex: 1; min-width: 0; }
.pick-btns { display: flex; gap: .2rem; }
.pick-btns .btn { min-width: 34px; }
.pick-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; }
.reasons td { vertical-align: top; }
.quote h4 { margin: .6rem 0 .2rem; font-size: .9rem; }
@media (max-width: 600px) { .pick-name .small { display: block; } }

/* Make My Case: the case on the numbers alone */
.case-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.case-pair h3 { font-size: 1rem; margin: 0 0 .35rem; }
.case-pair h3 .muted { font-weight: 400; display: block; }
.case-points td.mark { text-align: center; width: 1.6rem; font-weight: 700; }
.case-points th[scope="row"] { text-align: left; white-space: nowrap; font-weight: 500; }
.case-notes { margin: .4rem 0 0; padding-left: 1.1rem; }
.case-notes li { margin: .25rem 0; }
.note-card { border-left: 4px solid var(--accent, #2f5d8a); margin: .75rem 0 1rem; }
.note-card h3 { margin-top: 0; font-size: 1rem; }

/* Phase 5: forecast, What-If, title paths */
td.best { font-weight: 700; }
.pbar { display: inline-block; min-width: 4.2em; padding: 0 .3em; text-align: right; background: linear-gradient(90deg, var(--accent-soft) var(--p), transparent var(--p)); border-radius: 3px; }
.paths-card h3 { margin: 0 0 .2rem; }
.champ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .5rem .8rem; margin-bottom: 1rem; }
.champ-grid label { display: flex; flex-direction: column; gap: .2rem; }
.games-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .5rem; margin-bottom: .8rem; }
.game-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem .5rem; }
.game-pick > span { flex-basis: 100%; }
.game-pick .btn { flex: 1 1 8rem; text-align: left; }
.team-search { display: block; width: 100%; margin-top: .25rem; }
.game-pick .btn.primary .muted { color: inherit; opacity: .85; }
/* Phase 6: title-game picks and the playoff bracket */
.title-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .5rem; margin-bottom: 1rem; }
.title-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem .5rem; }
.title-pick > strong, .title-pick > .small { flex-basis: 100%; }
.title-pick .title-teams { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; flex-basis: 100%; }
.title-pick select { flex: 1 1 7rem; min-width: 0; }
.title-pick .btn { flex: 1 1 8rem; text-align: left; }
.title-pick .btn.primary .muted { color: inherit; opacity: .85; }
.bracket { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .6rem; margin: .4rem 0 .6rem; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: .5rem; }
.br-col h4 { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.br-game { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.br-team { display: flex; align-items: center; gap: .4rem; padding: .25rem .45rem; font-size: .9rem; min-height: 1.9rem; }
.br-team + .br-team { border-top: 1px solid var(--border); }
.br-team.won { font-weight: 600; }
.br-team.lost { color: var(--muted); }
.br-seed { display: inline-block; min-width: 1.4rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.br-pts { margin-left: auto; font-variant-numeric: tabular-nums; }

/* phone: misc */
/* above phone width an open fold hides its summary; a closed one keeps it so it can be opened (style.css) */
@media (min-width: 641px) { details.phone-fold[data-fold][open] > summary { display: none; } }
@media (max-width: 640px) {
  details.phone-fold[data-fold] { margin: .3rem 0; }
  details.phone-fold[data-fold] > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: .9rem; color: var(--muted); list-style: none; }
  details.phone-fold[data-fold] > summary::-webkit-details-marker { display: none; }
  details.phone-fold[data-fold] > summary::before { content: "▸"; display: inline-block; width: 1.1em; }
  details.phone-fold[data-fold][open] > summary::before { content: "▾"; }
  details.phone-fold[data-fold][open] > summary { margin-bottom: .2rem; }
  .checks-pairs td > .phone-only.small { display: block; margin-bottom: .1rem; }
  .checks-pairs td { white-space: normal; }
  .checks-pairs td .tag { display: inline-block; margin-top: .15rem; }
  .checks-pairs td.num { width: 5.2rem; }
  .checks-pairs td.num .tag { display: inline-block; white-space: normal; text-align: center; line-height: 1.2; border-radius: 8px; }
  .checks-pairs td > a.phone-only.small { display: inline-block; padding: .45rem .5rem .45rem 0; }
  /* season links in tables (Consistency Checker "By season", Time Machine "Every season's formula") */
  #out a[data-s], #out a[data-fs] { display: inline-block; padding: .4rem .6rem .4rem 0; }
  .moved-table td { white-space: normal; }
  .moved-table td .muted.small { display: block; }
  .blind-phone { padding: .4rem .5rem .6rem; }
  .blind-phone table { width: 100%; }
  .blind-phone th[scope="row"] { text-align: left; font-weight: 400; color: var(--muted); white-space: normal; background: transparent; }
  .blind-phone td { font-weight: 600; font-variant-numeric: tabular-nums; }
  .blind-votes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
  .blind-votes .btn { min-height: 40px; }
  .pick-row { gap: .4rem; padding: .25rem 0; }
  .pick-spot { width: 3.4rem; min-height: 36px; padding: 0 .2rem; font-weight: 650; flex: 0 0 auto; }
  .pick-btns { gap: .25rem; }
  .pick-btns .btn { min-width: 36px; min-height: 36px; padding: 0; display: inline-grid; place-items: center; }
  .pick-list + .pick-tools { position: sticky; bottom: 0; z-index: 3; background: var(--bg); margin: 0 -.25rem; padding: .5rem .25rem; border-top: 1px solid var(--border); }
  /* All tools: a denser list, one tool per line */
  .tool-grid { gap: .35rem; margin-bottom: .6rem; }
  .tool-card { padding: .5rem .7rem; gap: .1rem; }
  /* phone chart text stays at 12px or more (the 11px base rules above load after style.css) */
  .chart .quad-lbl, .chart .pt-lbl { font-size: 12px; }
}

/* phone: season */
@keyframes wi-flash { from { background: var(--accent-soft); } to { background: var(--surface); } }
.wi-bar { display: none; }
/* the game filters move beside the games on phones; after a turn to landscape they keep two even columns */
.byo-controls.wi-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Forecast, Title Paths: "How it works" links are 32px+ tap targets without taller lines, upright and sideways */
@media (max-width: 640px), (max-height: 500px) {
  main > p.muted a[href^="methods.html"], .paths-about p a { display: inline-block; padding: .45rem 0; margin: -.45rem 0; }
}
/* What-If on phones, upright or sideways (wide but short): whatif.js uses the same test (isCompact) */
@media (max-width: 640px), (max-height: 500px) {
  /* What-If: the projected ranking first, title-game picks folded, a bar with the field follows you down the games */
  .wi-layout { display: flex; flex-direction: column; }
  .wi-about { order: 0; }
  .wi-results { order: 1; scroll-margin-top: .5rem; }
  .wi-titles { order: 2; margin-top: 1rem; }
  .wi-games { order: 3; scroll-margin-top: .5rem; }
  .wi-about details, .wi-titles details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0 .7rem; }
  .wi-about details[open], .wi-titles details[open] { padding-bottom: .5rem; }
  .wi-about summary, .wi-titles summary { cursor: pointer; padding: .55rem 0; min-height: 36px; font-weight: 600; }
  .wi-about summary { font-weight: 500; color: var(--muted); font-size: .9rem; }
  .wi-titles summary { font-size: 1rem; }
  .wi-titles .title-grid { margin-bottom: .2rem; }
  .wi-bar { order: 4; display: flex; align-items: center; gap: .5rem; position: sticky; bottom: 0; z-index: 5; margin: .5rem calc(-1 * var(--gutter)) 0;
    padding: .5rem var(--gutter); background: var(--surface); border-top: 2px solid var(--accent); box-shadow: 0 -4px 12px rgb(0 0 0 / .12); font-size: .85rem; line-height: 1.35; }
  .wi-bar > span { flex: 1; min-width: 0; }
  .wi-bar .btn { flex: none; min-height: 36px; }
  .wi-bar.off { visibility: hidden; }
  .wi-bar.flash { animation: wi-flash 1.2s ease-out; }
  .wi-about details > label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin-top: .3rem; }
  .wi-bracket > summary { cursor: pointer; list-style: none; min-height: 36px; padding: .45rem 0; font-weight: 600; }
  .wi-bracket > summary::-webkit-details-marker { display: none; }
  .wi-bracket > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); }
  .wi-bracket[open] > summary::before { content: "▾"; }
  .wi-bracket > summary .muted { font-weight: 400; }
  a.tap { display: inline-block; padding: .5rem 0; margin: -.5rem 0; }
  .wi-filter { margin: 0 0 .7rem; }
  /* sideways: the phone-only fold summaries and "Pick the games" link show; the desktop headings they replace hide */
  .wi-layout summary.phone-only { display: list-item; }
  .wi-layout .wi-bracket > summary.phone-only { display: block; }
  .wi-results p.phone-only { display: block; }  /* "Pick the games ↓" (the page intro above already covers the phone-only one) */
  .wi-layout h3.wide-only { display: none; }
  .wi-layout .wi-titles details > summary { font-size: 1rem; color: var(--text); }  /* over style.css's closed-fold summary look above 640px */
}
@media (max-width: 640px) {
  /* game cards: one row of two buttons, the date once per day above them */
  .game-pick { padding: .2rem .25rem; gap: .25rem; flex-wrap: wrap; }
  .game-pick > span { font-size: .78rem; padding: 0 .15rem; }
  .games-list { gap: .3rem; }
  .gp-day { grid-column: 1 / -1; font-size: .8rem; font-weight: 600; color: var(--muted); margin: .25rem 0 -.05rem; }
  .gp-day:first-child { margin-top: 0; }
  .game-pick .btn { flex: 1 1 0; min-width: 0; min-height: 36px; display: flex; align-items: center; gap: .3rem; white-space: nowrap; padding: 0 .45rem; }
  .game-pick .gp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .game-pick .btn > .muted { flex: none; }
  .wi-table th { white-space: normal; }
  .wi-table th, .wi-table td { padding-left: .3rem; padding-right: .3rem; }
  .wi-table td:nth-child(3) { white-space: nowrap; }  /* team and its ★ on one line: even rows */
  .wi-table td:nth-child(3) .tag { padding: 0 .3rem; }
  .title-pick .btn { min-height: 38px; white-space: normal; }
  .title-pick select { min-height: 36px; }
  /* bracket: two rounds side by side instead of four stacked */
  .bracket { grid-template-columns: 1fr 1fr; gap: .5rem .4rem; }
  .br-team { font-size: .8rem; padding: .2rem .35rem; gap: .25rem; min-height: 1.75rem; }
  .br-seed { min-width: 1.1rem; }
  .br-col h4 { font-size: .75rem; }
  .br-col { justify-content: flex-start; }
  /* Forecast */
  .fc-about summary { cursor: pointer; font-size: .85rem; color: var(--muted); min-height: 36px; padding: .45rem 0; }
  .fc-table th, .fc-table td, .fc-record th, .fc-record td { padding-left: .3rem; padding-right: .3rem; }
  .fc-record th { white-space: normal; }
  .fc-record td:first-child .phone-only { display: block; font-size: .75rem; }
  /* team links: a 32px+ tap target without taller rows */
  .fc-table td > a, .paths-table td:first-child > a { display: inline-block; padding: .5rem 0; margin: -.5rem 0; }
  /* the last row's link tap area stays inside the table (it would poke 2-3px out of the scroll box) */
  .fc-table tr:last-child > td, .paths-table tr:last-child > td { padding-bottom: .55rem; }
  .fc-legend { margin: .4rem 0; }
  /* Title Paths */
  .paths-about summary { cursor: pointer; font-size: .85rem; color: var(--muted); min-height: 36px; padding: .45rem 0; }
  .paths-table th { white-space: normal; }
  .paths-table th, .paths-table td { padding-left: .3rem; padding-right: .3rem; }
  .paths-table td:first-child { white-space: normal; min-width: 6.5rem; }
  .paths-table .pbar { min-width: 3.4em; }
  .paths-card { padding: .65rem; }
  /* Selection Day */
  .sel-seeds td, .sel-games td, .sel-history td, .sel-history th { white-space: normal; }
  .sel-seeds th, .sel-seeds td, .sel-games th, .sel-games td, .sel-history th, .sel-history td { padding-left: .3rem; padding-right: .3rem; }
  .sel-seeds .sel-sub, .sel-history .sel-sub { display: block; font-size: .78rem; }
  .sel-seeds td { line-height: 1.35; }
  .sel-games td.num { white-space: nowrap; }
  .sel-games td:first-child { color: var(--muted); font-size: .8rem; font-weight: 600; }
  .sel-formula summary { cursor: pointer; min-height: 36px; padding: .45rem 0; }
}

/* phone: formula */
@media (max-width: 640px) {
  /* Committee Drift */
  .event-num { font-size: 12px; }
  .heat-table td.heat { min-width: 2.6em; }
  .heat-table th[scope="row"] { white-space: normal; min-width: 6.5rem; max-width: 8rem; line-height: 1.25; }
  /* Alternate Rankings: column checkboxes become chips; names wrap so three columns fit */
  .alt-cols { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
  .alt-cols .check { border: 1px solid var(--border); border-radius: 999px; padding: .3rem .6rem; min-height: 36px; }
  .alt-table td, .alt-table th { white-space: normal; }
  .alt-table td[data-team] { min-width: 5.5rem; line-height: 1.25; cursor: pointer; }
  /* many columns ticked: the rank and the committee's team stay put while the rest scroll */
  .alt-table tr > :first-child { position: sticky; left: 0; z-index: 1; width: 2.2rem; min-width: 2.2rem; max-width: 2.2rem; box-sizing: border-box; background: var(--surface); }
  .alt-table tr > :nth-child(2) { position: sticky; left: 2.2rem; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .alt-table thead tr > :first-child, .alt-table thead tr > :nth-child(2) { background: var(--surface-2); z-index: 2; }
  .alt-table td .small { white-space: nowrap; }
  .notes { grid-template-columns: 1fr; gap: 0; }
  .notes dd { margin-bottom: .4rem; }
  /* Time Machine: the three headline numbers as one line each */
  .tm-kpis { gap: .35rem; }
  .tm-kpis .kpi { display: flex; align-items: baseline; gap: .6rem; padding: .45rem .65rem; }
  .tm-kpis .kpi .v { font-size: 1.05rem; white-space: nowrap; }
  .tm-kpis .kpi .k { margin: 0; }
  .tm-all td, .tm-all th { white-space: normal; }
  .tm-all td:nth-child(2) { white-space: nowrap; }
  .tm-all td:last-child { min-width: 8.5rem; }
}
/* What Moved, phones up to small tablets (≤900px): games and formula terms wrap instead of stretching the table,
   and the team column slides to the left edge and stays there when the table scrolls sideways */
@media (max-width: 900px) {
  .moved-table td { white-space: normal; }
  .moved-table tr > :nth-child(4) { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border), -1px 0 0 var(--border); }
  .moved-table thead tr > :nth-child(4) { background: var(--surface-2); z-index: 2; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .moved-table td:nth-child(4) { min-width: 7rem; }
  .moved-table td:nth-child(4) .small { white-space: nowrap; }
  .moved-table td:nth-child(5) { min-width: 9rem; }
  .moved-table td:nth-child(6) { min-width: 12rem; }
}

/* phone: round2 pages */
/* Blind Résumé: the side-by-side table replaces the two cards up to 760px (a phone turned sideways, small tablets) */
.blind-narrow { display: none; }
@media (max-width: 760px) {
  .blind-wide { display: none; }
  .blind-narrow { display: block; }
  .blind-phone { padding: .4rem .5rem .6rem; }
  .blind-phone table { width: 100%; }
  .blind-phone th[scope="row"] { text-align: left; font-weight: 400; color: var(--muted); white-space: normal; background: transparent; }
  .blind-phone td { font-weight: 600; font-variant-numeric: tabular-nums; }
  .blind-votes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
  .blind-votes .btn { min-height: 40px; }
}
@media (max-width: 640px) {
  /* season and pairs menus share one row */
  .blind-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .blind-controls .span-2 { grid-column: auto; }
  .blind-phone th, .blind-phone td { padding: .25rem .4rem; line-height: 1.3; }
  /* Title Paths: the What-If link is a finger-sized target */
  /* Consistency Checker: "Make the case →" always on its own line; the list heading clears the edge after a season tap */
  .checks-pairs td > a.phone-only.small { display: block; width: fit-content; }
  #pairs-h { scroll-margin-top: .6rem; }
  .paths-whatif a { display: inline-block; padding: .45rem 0; min-height: 32px; box-sizing: border-box; }
}

/* phone: round3 */
@media (max-width: 640px) {
  /* What Moved: the formula line (score change and its biggest term) sits under the games */
  .moved-table .moved-term { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.3; }
  /* Consistency Checker: the résumé tags stay on one line each */
  .checks-pairs td.num .tag { white-space: nowrap; }
}

/* ---------- Case Files (cases.html) ---------- */
.case-files { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .3rem; }
.case-files li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.case-files li.active { border-color: var(--accent); background: var(--accent-soft); }
.case-files li .icon-btn { margin-left: auto; min-width: 32px; padding: .2rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.linklike:hover { text-decoration: underline; }
.case-shared .tools { margin-top: .5rem; }
.case-claim { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.claim-line { font-size: 1.05rem; }
.case-score h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.case-score-kpis .kpi .k .muted { font-size: .7rem; }
.agree-chips { list-style: none; padding: 0; margin: .2rem 0 .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.agree-chips li { border: 1px solid var(--border); border-radius: 99px; padding: .1rem .55rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.agree-chips li.yes { border-color: var(--win); color: var(--text); background: color-mix(in srgb, var(--win) 14%, var(--surface)); }
.counterpoints { padding-left: 1.1rem; margin: .2rem 0; }
.counterpoints > li { margin-bottom: .5rem; }
.counterpoints ul { list-style: none; padding-left: .2rem; margin: .2rem 0; font-size: .9rem; }
.case-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; counter-reset: card; }
.case-card { padding: .8rem .9rem; }
.case-card-head { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; counter-increment: card; }
.case-card-head::before { content: counter(card) "."; font-weight: 700; color: var(--muted); }
.case-card-head h3 { margin: 0; font-size: 1rem; }
.case-snap { font-size: .85rem; }
.case-note { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.case-note textarea, .case-note input { width: 100%; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: .4rem .5rem; }
.case-quote { margin: .5rem 0; padding: .3rem .8rem; border-left: 3px solid var(--accent); font-style: italic; }
.case-caveats { list-style: none; padding: 0; margin: .4rem 0; }
.case-card-tools { margin-top: .5rem; }
.retired-note { border-color: var(--loss); }
@media (max-width: 640px) {
  .case-claim { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .case-claim .span-2 { grid-column: span 2; }
}
.case-snap { width: 100%; border-collapse: collapse; font-size: .85rem; }
.case-snap th, .case-snap td { padding: .3rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.case-snap thead th { font-size: .75rem; color: var(--muted); font-weight: 600; }
.case-snap tbody th { font-weight: 500; }
.case-snap .num { text-align: right; font-variant-numeric: tabular-nums; }
