/* Swing positions. Tokens and type follow Monty's swing vault (Fourwood palette, Barlow). */
@font-face { font-family: Barlow; src: url('fonts/Barlow-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Barlow; src: url('fonts/Barlow-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Barlow; src: url('fonts/Barlow-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --forest: #0b241a; --green: #123824; --accent: #6ec176; --cream: #f4f0e7; --ink: #102118; --line: #b8b1a4;
  --paper: #fbfaf6; --muted: #4d5a51; --ochre: #8a5a12; --flag: #e3b04b; --error: #9a281e; --rule: #e3ded3;
  --bench-line: rgba(244, 240, 231, .16); --bench-muted: #b9c6bd;
  --focus: var(--forest); --pad: clamp(12px, 3vw, 32px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.45 Barlow, system-ui, sans-serif; font-variant-numeric: tabular-nums; min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; }
a { color: var(--forest); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--forest); color: var(--cream); padding: 10px 14px; }
.skip:focus { top: 12px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
kbd { font: 600 12px/1 Barlow, system-ui, sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 2px 5px; background: var(--paper); color: var(--ink); }

/* Header */
.masthead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 32px; align-items: end; padding: 16px var(--pad) 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--forest); }
.masthead h1 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.01em; color: var(--forest); }
.intro { max-width: 60ch; color: var(--muted); font-size: 15px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--forest); font-weight: 600; font-size: 15px; text-decoration: none; }
.nav a:hover { border-color: var(--forest); }
.nav a[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }

.main { flex: 1; padding: 20px var(--pad) 40px; min-width: 0; }
.main:focus { outline: none; }
.loading { color: var(--muted); }
.foot { padding: 16px var(--pad) 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot a { margin-left: 6px; }

/* Shared view parts */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.view-title { font-size: 26px; color: var(--forest); }
.view-title:focus { outline: none; }
.view-sub { color: var(--muted); font-size: 15px; margin-top: 4px; max-width: 70ch; }
.sub-title { font-size: 17px; }
.sub-title.dark { color: var(--forest); margin: 24px 0 8px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.panel.narrow { max-width: 560px; }
.panel p { margin: 8px 0; }
.note { font-size: 14px; color: var(--muted); margin: 0 0 14px; max-width: 80ch; }
.load-error { background: var(--paper); border: 1px solid var(--line); padding: 24px; }
.load-error h2 { font-size: 22px; margin-bottom: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

button { cursor: pointer; min-height: 44px; border-radius: 3px; padding: 8px 16px; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
button:disabled { cursor: default; opacity: .45; }
.primary { background: var(--forest); color: var(--cream); }
.primary:hover:not(:disabled) { background: var(--green); }
.quiet { background: transparent; color: var(--forest); border-color: var(--line); }
.quiet:hover:not(:disabled) { border-color: var(--forest); }
.danger { color: var(--error); }
.danger-fill { background: var(--error); color: #fff; }
.btn-link { display: inline-flex; align-items: center; gap: .25em; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.btn-link:hover { border-color: var(--forest); }
.link-btn { min-height: 36px; padding: 4px 0; background: transparent; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge-slow { background: #dcebdd; color: var(--green); }
.badge-real { background: #f1e3c8; color: #5c3b08; }
.tag-fixed { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; background: var(--flag); color: var(--forest); white-space: nowrap; line-height: 1.5; }

.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--forest); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.seg:hover { border-color: var(--forest); }
.seg[aria-pressed="true"], .seg[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.seg-name { font-weight: 500; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field.inline { display: flex; align-items: center; gap: 8px; }
select { min-height: 44px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); padding: 8px 10px; color: var(--ink); max-width: 100%; }

/* List */
.stat-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px; min-width: 120px; }
.stat dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat dd { font-size: 20px; font-weight: 600; color: var(--forest); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.toolbar .count { margin-left: auto; font-size: 14px; color: var(--muted); }
.swing-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 10px; }
.swing-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); text-decoration: none; min-height: 88px; }
.swing-row:hover { border-color: var(--forest); }
.thumb { width: 54px; height: 72px; object-fit: cover; border-radius: 2px; background: var(--forest); display: block; }
.row-main { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.row-title { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--forest); white-space: nowrap; }
.row-sub { font-size: 12px; color: var(--muted); }
.row-ratio { display: grid; justify-items: end; }
.row-ratio .big { font-size: 20px; font-weight: 600; color: var(--forest); white-space: nowrap; }
.lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.row-times { display: grid; gap: 2px; font-size: 14px; text-align: right; white-space: nowrap; }

/* Corrections */
.corrections { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; margin-top: 22px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--flag); border-radius: 4px; }
.corr-title { font-size: 16px; color: var(--forest); }
.corr-summary { font-size: 15px; }
.corr-note { font-size: 13px; color: var(--muted); }
.corr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.corr-status { grid-column: 1 / -1; font-size: 14px; color: var(--green); font-weight: 600; }
.corr-status:empty { display: none; }
.corr-status.bad { color: var(--error); }
.confirm { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--error); border-radius: 3px; display: grid; gap: 10px; }

/* Swing view */
.swing-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.back { font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; }
.swing-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; flex: 1 1 auto; }
.prevnext { display: flex; gap: 8px; }
.swing-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.swing-media { width: clamp(300px, calc((100dvh - 330px) * .75), 540px); min-width: 0; }
.keys { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.9; }

.player { min-width: 0; }
.stage { position: relative; aspect-ratio: 3 / 4; background: var(--forest); border-radius: 4px; overflow: hidden; }
.stage .video { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.stage-status { position: absolute; inset: auto 12px 12px; background: var(--paper); color: var(--error); padding: 8px 10px; border-radius: 3px; font-size: 14px; }
.controls { margin-top: 8px; display: grid; gap: 4px; }
.transport { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.transport-main { display: flex; gap: 6px; }
.ctl { min-height: 44px; min-width: 52px; padding: 6px 12px; background: var(--paper); color: var(--forest); border-color: var(--line); font-size: 15px; }
.ctl:hover:not(:disabled) { border-color: var(--forest); }
.ctl-play { min-width: 92px; background: var(--forest); color: var(--cream); border-color: var(--forest); }
.speed { display: flex; gap: 0; }
.speed .ctl { border-radius: 0; margin-left: -1px; min-width: 56px; }
.speed .ctl:first-child { border-radius: 3px 0 0 3px; margin-left: 0; }
.speed .ctl:last-child { border-radius: 0 3px 3px 0; }
.speed .ctl[aria-pressed="true"] { background: var(--green); color: var(--cream); border-color: var(--green); position: relative; }
.scrub-wrap { position: relative; padding-bottom: 10px; }
.scrub { width: 100%; height: 36px; margin: 0; accent-color: var(--forest); cursor: pointer; }
.ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; pointer-events: none; }
.tick { position: absolute; bottom: 0; width: 2px; height: 9px; margin-left: -1px; background: var(--muted); border-radius: 1px; }
.tick.fixed { background: var(--ochre); }
.tick.sel { background: var(--forest); width: 4px; margin-left: -2px; height: 11px; bottom: -1px; }
.readout { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--muted); }
.read-frame { font-weight: 600; color: var(--ink); }
.read-p { font-weight: 600; color: var(--green); }

/* Dark bench */
.bench { background: var(--forest); color: var(--cream); border-radius: 4px; padding: 18px 20px 22px; min-width: 0; --focus: var(--accent); display: grid; gap: 18px; align-content: start; }
.bench .primary { background: var(--accent); color: var(--forest); }
.bench .primary:hover:not(:disabled) { background: #85cf8c; }
.bench .quiet { color: var(--cream); border-color: var(--bench-line); }
.bench .quiet:hover:not(:disabled) { border-color: var(--cream); }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chip { display: grid; justify-items: start; align-content: start; gap: 0; min-height: 60px; padding: 6px 8px; text-align: left; background: transparent; color: var(--cream); border: 1px solid var(--bench-line); border-radius: 4px; font-weight: 500; position: relative; }
.chip:hover { border-color: var(--cream); }
.chip-p { font-size: 16px; font-weight: 600; }
.chip-name { font-size: 12px; color: var(--bench-muted); line-height: 1.2; }
.chip-time { font-size: 12px; color: var(--bench-muted); margin-top: 2px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--forest); }
.chip[aria-pressed="true"] .chip-name, .chip[aria-pressed="true"] .chip-time { color: var(--forest); }
.chip.here:not([aria-pressed="true"]) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.fixed::after { content: ""; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--flag); box-shadow: 0 0 0 2px var(--forest); }
.chip[aria-pressed="true"].fixed::after { box-shadow: 0 0 0 2px var(--accent); }
.chips.light .chip { color: var(--forest); border-color: var(--line); background: var(--paper); min-height: 52px; }
.chips.light .chip-name { color: var(--muted); }
.chips.light .chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.chips.light .chip[aria-pressed="true"] .chip-name { color: var(--bench-muted); }

.pos-title { font-size: 22px; }
.pos-p { display: inline-grid; place-items: center; min-width: 38px; padding: 0 6px; height: 28px; border-radius: 3px; background: var(--accent); color: var(--forest); font-size: 16px; vertical-align: 2px; }
.pos-def { color: var(--cream); margin: 6px 0 6px; font-size: 16px; }
.metric-list { margin: 0; }
.metric-row { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bench-line); }
.metric-row dt { color: var(--bench-muted); font-size: 14px; }
.metric-row dd { min-width: 0; }
.metric-value { display: block; }
.metric-value strong { font-weight: 600; }
.metric-note { display: block; font-size: 13px; color: var(--bench-muted); }
.metric-list.tight .metric-row { padding: 5px 0; grid-template-columns: 1fr auto; align-items: baseline; }
.metric-list.tight dd { display: flex; gap: 10px; align-items: baseline; justify-content: flex-end; text-align: right; }
.metric-list.tight .metric-note { order: -1; }
.pill-you { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--flag); color: var(--forest); font-size: 12px; font-weight: 600; vertical-align: 1px; }
.pos-actions { display: grid; gap: 6px; padding-top: 2px; }
.action-note { font-size: 14px; color: var(--accent); min-height: 1.2em; }
.action-note:empty { display: none; }
.swing-tempo .sub-title { color: var(--cream); margin-bottom: 4px; }
.accent { color: var(--accent); }
.warn { font-size: 14px; color: var(--forest); background: var(--flag); padding: 6px 10px; border-radius: 3px; margin: 6px 0; }

@media (min-width: 1240px) {
  .bench { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 28px; }
  .bench .chips { grid-column: 1 / -1; grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .bench .pos-detail { grid-column: 1; grid-row: 2; }
  .bench .pos-actions { grid-column: 1; grid-row: 3; }
  .bench .swing-tempo { grid-column: 2; grid-row: 2 / span 2; }
}

/* Gallery */
.p-segs { margin-bottom: 12px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--forest); }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--forest); }
.tile-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 6px 8px; font-size: 14px; }
.tile-cap strong { color: var(--forest); margin-right: auto; }

/* Compare */
.compare-pickers { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 12px; }
.compare-pickers select { min-width: 220px; }
.compare-view .chips { margin-bottom: 10px; }
.compare-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 12px; }
.compare-bar .ctl-speed { background: var(--paper); }
.compare-main { display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: 24px; align-items: start; }
.compare-grid { display: grid; grid-template-columns: repeat(2, clamp(240px, calc((100dvh - 400px) * .75), 420px)); gap: 16px; }
.compare-table .sub-title.dark { margin-top: 0; }
@media (min-width: 1024px) { .compare-view .chips { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.compare-side figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; min-height: 32px; flex-wrap: wrap; }
.ab { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-size: 14px; }
.ab-a { background: var(--accent); color: var(--forest); }
.ab-b { background: var(--flag); color: var(--forest); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.player.compact .ctl { min-width: 48px; }
.player.compact .transport { justify-content: flex-start; }
.player.compact .readout { font-size: 13px; }
.compare-view .table-scroll { max-width: 560px; }

/* Tables */
.table-scroll { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.table-scroll.tall { max-height: 560px; overflow-y: auto; max-width: 900px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table caption { text-align: left; padding: 10px 12px; font-weight: 600; }
.data-table th, .data-table td { padding: 6px 12px; border-top: 1px solid var(--rule); text-align: left; white-space: nowrap; }
.data-table thead th { position: sticky; top: 0; background: var(--paper); font-size: 13px; color: var(--muted); z-index: 1; }
.data-table tbody th { font-weight: 600; }
.data-table .num { text-align: right; }
.data-table .tempo-row th, .data-table .tempo-row td { background: #f3f0e8; }
.data-table.acc tr.yours th, .data-table.acc tr.yours td { background: #eef5ee; }

/* Tempo */
.reading { background: var(--forest); color: var(--cream); border-radius: 4px; padding: 18px 22px; display: grid; gap: 10px; margin-bottom: 18px; width: fit-content; max-width: 100%; }
.reading p { max-width: 78ch; }
.reading p:first-child { font-size: 19px; font-weight: 500; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.chart-card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px 12px; min-width: 0; }
.chart-title { font-size: 17px; color: var(--forest); margin-bottom: 6px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .band { fill: var(--accent); fill-opacity: .2; }
.chart .band-label { font-size: 12px; fill: var(--green); font-weight: 600; }
.chart .ref-line { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .ref-label { font-size: 12px; fill: var(--green); font-weight: 600; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .tick-label { font-size: 12px; fill: var(--muted); }
.chart .axis-label { font-size: 13px; fill: var(--muted); font-weight: 500; }
.chart .lane-label { font-size: 12px; fill: var(--muted); font-weight: 600; }
.chart .median-line { stroke: var(--ochre); stroke-width: 2.5; }
.chart .median-cross { stroke: var(--ochre); stroke-width: 3; fill: none; }
.chart .median-label { font-size: 12px; font-weight: 600; fill: var(--ochre); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.pt { stroke: var(--paper); stroke-width: 1; }
.pt-slow120 { fill: var(--green); fill-opacity: .85; }
.pt-real30 { fill: var(--ochre); fill-opacity: .8; }
.chart a:hover .pt, .chart a:focus-visible .pt { stroke: var(--ink); stroke-width: 2; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; padding: 0; font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

/* About */
.prose { max-width: 820px; }
.prose section { margin-top: 26px; }
.prose h3 { font-size: 20px; color: var(--forest); margin-bottom: 8px; }
.prose p { margin: 0 0 10px; max-width: 72ch; }
.prose ul { padding-left: 20px; margin: 0; }
.prose li { margin-bottom: 8px; max-width: 72ch; }
.lede { font-size: 18px; margin-top: 8px !important; }
.p-list { display: grid; grid-template-columns: minmax(200px, auto) minmax(0, 1fr); gap: 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 4px 16px; }
.p-list dt, .p-list dd { padding: 8px 0; border-top: 1px solid var(--rule); }
.p-list dt:first-of-type, .p-list dt:first-of-type + dd { border-top: 0; }
.p-list dt { font-weight: 600; color: var(--forest); }
.p-list .pos-p { min-width: 34px; height: 24px; font-size: 14px; margin-right: 4px; }
.pre { font-size: 12px; overflow-x: auto; background: var(--paper); padding: 12px; }

/* Tablet and below */
@media (max-width: 1023px) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  .intro { grid-column: 1 / -1; grid-row: 2; }
  .nav { grid-column: 1 / -1; justify-content: flex-start; }
  .swing-grid { grid-template-columns: minmax(0, 1fr); }
  .swing-media { width: min(100%, 520px); margin: 0 auto; }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  .compare-main { grid-template-columns: minmax(0, 1fr); }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 360px)); }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .masthead { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-top: 12px; }
  .masthead h1 { font-size: 28px; }
  .intro { font-size: 14px; }
  .nav { gap: 4px; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad); scrollbar-width: none; }
  .nav a { padding: 6px 12px; font-size: 14px; min-height: 40px; flex: 0 0 auto; }
  .main { padding: 14px 12px 28px; }
  .view-title { font-size: 23px; }
  .stat-strip { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stat { min-width: 0; padding: 6px 10px; }
  .stat dd { font-size: 17px; }
  .toolbar { gap: 8px; }
  .toolbar .segs { width: 100%; }
  .toolbar .seg { flex: 1 1 0; justify-content: center; padding: 6px 8px; font-size: 13px; }
  .toolbar .count { margin-left: 0; }
  .swing-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .swing-row { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 10px; padding: 6px 10px 6px 6px; min-height: 76px; }
  .thumb { width: 48px; height: 64px; }
  .row-title { font-size: 16px; gap: 6px; }
  .row-ratio .big { font-size: 17px; }
  .row-times { font-size: 13px; }
  .corrections { grid-template-columns: minmax(0, 1fr); }
  .corr-actions button { flex: 1 1 0; padding: 8px 10px; }

  html:not([data-view="list"]) .intro { display: none; }
  .hide-sm { display: none; }
  .swing-head { gap: 4px 10px; flex-wrap: nowrap; margin-bottom: 10px; }
  .swing-head .back { display: none; }
  .swing-title { flex: 1 1 auto; min-width: 0; }
  .prevnext { gap: 6px; }
  .prevnext .btn-link { padding: 6px 12px; font-size: 15px; min-width: 52px; justify-content: center; }
  .swing-media { width: 100%; }
  .swing-view .stage { aspect-ratio: auto; height: min(50dvh, calc((100vw - 24px) * 4 / 3)); }
  .keys { display: none; }
  .bench { margin: 0 -12px; border-radius: 0; padding: 16px 12px 20px; }
  .chips { gap: 4px; }
  .chip { padding: 5px 5px 6px; min-height: 64px; }
  .chip-p { font-size: 15px; }
  .chip-name, .chip-time { font-size: 11px; }
  .chip.fixed::after { top: 6px; right: 5px; }
  .metric-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .metric-list.tight .metric-row { grid-template-columns: 1fr auto; }
  .pos-actions .row button { flex: 1 1 auto; }
  .transport { gap: 6px; }
  .ctl { min-width: 46px; padding: 6px 10px; }
  .ctl-play { min-width: 76px; }
  .speed .ctl { min-width: 48px; }

  .p-segs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .p-segs .seg-name { display: none; }
  .p-segs .seg { justify-content: center; padding: 6px 4px; min-height: 44px; }
  .data-table th, .data-table td { padding: 6px 8px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tile-cap { padding: 4px 6px; font-size: 13px; gap: 2px 4px; }
  .tile-cap .badge { display: none; }

  .compare-pickers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
  .compare-pickers select { min-width: 0; width: 100%; font-size: 14px; padding: 8px 6px; }
  .compare-pickers .swap { padding: 8px 8px; font-size: 14px; }
  .compare-view .chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .compare-table .sub-title.dark { margin-top: 8px; }
  .compare-side figcaption { font-size: 14px; gap: 4px 6px; }
  .compare-side .badge { font-size: 11px; padding: 0 6px; }
  .player.compact .ctl { min-width: 0; flex: 1 1 0; padding: 6px 4px; }
  .player.compact .transport-main { width: 100%; }
  .player.compact .readout { flex-direction: column; font-size: 12px; gap: 0; }

  .reading { padding: 14px 14px; margin: 0 -12px 14px; border-radius: 0; }
  .reading p:first-child { font-size: 17px; }
  .chart-card { padding: 10px 8px; }
  .p-list { grid-template-columns: minmax(0, 1fr); padding: 4px 12px; }
  .p-list dd { border-top: 0; padding-top: 0; }
  .lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Sessions + Coach Brain (Dec 2026) */
.session-box { display: grid; gap: 6px; min-width: 0; }
.session-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-pick:empty { display: none; }
.session-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.session-pick select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--forest); font-weight: 600; max-width: 100%; }
.badge-club { background: #e4e8f0; color: #1f2c44; }
.badge-tpi { background: var(--forest); color: var(--cream); }
.badge-muted { background: var(--rule); color: var(--muted); }

.coach-view, .knowledge-view { max-width: 1180px; }
.coach-head { display: grid; gap: 10px; margin-bottom: 14px; }
.coach-headline { font-size: clamp(19px, 2.1vw, 24px); font-weight: 600; color: var(--forest); max-width: 62ch; line-height: 1.3; }
.provisional { background: var(--flag); color: var(--forest); padding: 10px 14px; border-radius: 4px; max-width: 80ch; }
.coach-stats .stat dd { font-weight: 600; }
.coach-why { max-width: 85ch; margin: 0 0 16px; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.focus-card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; display: grid; gap: 10px; min-width: 0; }
.focus-card.status-priority { border-top: 5px solid var(--forest); }
.focus-card.status-supporting { border-top: 5px solid var(--flag); }
.focus-kicker { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.focus-title { font-size: 24px; color: var(--forest); }
.focus-def { color: var(--ink); }
.facts { display: grid; gap: 4px; margin: 0; }
.fact { display: grid; grid-template-columns: minmax(96px, 28%) minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.fact dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.fact dd { margin: 0; }
.ev-links { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-link.ev { min-height: 40px; font-size: 14px; background: var(--cream); }
.focus-note { font-size: 15px; }
.drill-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.drill { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; display: grid; gap: 2px; }
.coach-sec { margin-top: 22px; }
.coach-sec h4, .kb-card h4, .progress h4 { font-size: 15px; color: var(--forest); margin: 10px 0 4px; }
.strength-list, .watch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.strength { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px; padding: 10px 14px; }
.watch-list li { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-size: 15px; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.trend-card { margin: 0; display: grid; gap: 4px; }
.band-outer { fill: #dcebdd; }
.band-inner { fill: #9fd0a4; }
.band-median { stroke: var(--forest); stroke-width: 2; }
.dot { fill: var(--flag); stroke: var(--forest); stroke-width: 1.5; }
.dot-small { fill: var(--forest); stroke: none; opacity: .55; }
.trend .tick-label { font-size: 12px; fill: var(--muted); }
.progress { margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; }
.tag-real, .tag-maybe { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.tag-real { background: var(--accent); color: var(--forest); }
.tag-maybe { background: var(--rule); color: var(--muted); }
.plain-list { margin: 4px 0; padding-left: 18px; display: grid; gap: 4px; }
.plain-list.numbered { list-style: decimal; }
.check-list { margin: 4px 0; padding-left: 18px; display: grid; gap: 6px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px 28px; }
.how { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; }
details > summary { cursor: pointer; }
.kb-list { display: grid; gap: 8px; }
.kb-card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.kb-card > summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 12px 16px; min-height: 48px; }
.kb-card.kind-strength { border-left: 4px solid var(--accent); }
.kb-name { font-weight: 600; font-size: 17px; color: var(--forest); }
.kb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-inner { padding: 0 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 90ch; overflow-wrap: anywhere; }
.kb-list, .kb-card, .kb-body { min-width: 0; }
.kb-inner .table-scroll { max-width: 100%; }
.dis { border-left: 3px solid var(--rule); padding-left: 10px; margin: 6px 0; }
.kb-extras { margin-top: 10px; }
details.coach-sec { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px; }
details.coach-sec > summary { margin: 0; padding: 4px 0; }
@media (max-width: 700px) {
  .masthead { grid-template-columns: minmax(0, 1fr); }
  .nav { justify-content: flex-start; }
  .nav a { padding: 8px 14px; }
  .focus-card { padding: 14px; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .strength { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) { .session-box { grid-column: 1 / -1; grid-row: 2; } }
