/* TouchIQ v3 styles. Plain CSS, no build step.
   Change the brand colours in :root and everything follows. */
:root {
  --bg: #0a0a0a;
  --surface: #131513;
  --surface-2: #1b1e1b;
  --border: #2a2e2a;
  --text: #f1f4ee;
  --muted: #9aa39a;
  --lime: #a3e635;
  --lime-ink: #10170a;
  --amber: #f5b83d;
  --red: #f26b5b;
  --sky: #5cc8ff;
  --violet: #b495ff;
  --radius: 14px;
  --radius-sm: 10px;
  --font-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cabinet Grotesk", var(--font-body);
  --nav-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--lime-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row.gap { gap: .75rem; }
.row.end { justify-content: flex-end; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: .75rem max(1rem, env(safe-area-inset-left)); padding-top: max(.75rem, env(safe-area-inset-top));
  background: rgba(10, 10, 10, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.brand-name b { color: var(--lime); }
.logo-mark { display: inline-grid; color: var(--lime); }
.nav { display: flex; gap: .25rem; }
.nav-link { display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--lime-ink); background: var(--lime); }
.main { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 3rem; outline: none; }

@media (max-width: 760px) {
  /* backdrop-filter would trap the fixed bottom nav inside the header */
  .topbar { backdrop-filter: none; background: var(--bg); }
  .stage.stage-live { aspect-ratio: 3 / 4; }
  .stage-live .frame-guide { inset: 5% 12%; }
  .stage-hint { font-size: .9rem; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom)); background: rgba(14, 16, 14, .96);
    backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  }
  .nav-link { flex-direction: column; gap: 2px; font-size: .7rem; padding: .35rem .6rem; border-radius: 12px; }
  .nav-link.active { background: transparent; color: var(--lime); }
  .main { padding-bottom: calc(var(--nav-h) + 2rem + env(safe-area-inset-bottom)); }
}

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.section { margin-top: 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; width: 100%; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--lime); margin-bottom: .35rem; }
.link { color: var(--lime); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: .2rem; }
.back-link { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); text-decoration: none; margin-bottom: .75rem; }
.back-link:hover { color: var(--text); }
.empty { text-align: center; padding: 3rem 1rem; display: grid; justify-items: center; gap: .5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .6rem 1rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  text-decoration: none; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #3a403a; background: #222622; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.active { border-color: var(--lime); color: var(--lime); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.btn-primary:hover { background: #b5ef55; border-color: #b5ef55; }
.btn-danger { color: var(--red); }
.btn-lg { min-height: 52px; padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .35rem .75rem; font-size: .875rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--lime); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); }
.chip-muted { color: var(--muted); }
.chip-accent { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 700; }
.chip-warn { color: var(--amber); border-color: rgba(245, 184, 61, .4); }
.chip-btn { cursor: pointer; min-height: 32px; }
.chip-btn:hover { border-color: var(--lime); color: var(--lime); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; flex-wrap: wrap; }
.seg-btn { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: transparent; color: var(--muted); padding: .45rem .85rem; border-radius: 999px; cursor: pointer; font-weight: 500; min-height: 36px; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.segmented.small .seg-btn { padding: .3rem .6rem; font-size: .85rem; min-height: 32px; }

.field { display: grid; gap: .3rem; }
.field-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.field-hint { font-size: .8rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.input { width: 100%; min-height: 44px; padding: .55rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); }
.input:focus { border-color: var(--lime); outline: none; }
.input-sm { width: auto; min-height: 36px; padding: .3rem .6rem; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
textarea.input { resize: vertical; }
.range { width: 100%; accent-color: var(--lime); }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom)); display: grid; gap: .5rem; z-index: 50; width: min(92vw, 420px); }
.toast { background: #202420; border: 1px solid var(--border); padding: .75rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s, transform .3s; }
.toast-ok { border-color: rgba(163, 230, 53, .5); }
.toast-error { border-color: rgba(242, 107, 91, .6); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- score visuals ---------- */
.score-ring { position: relative; flex: none; }
.score-ring svg { display: block; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.score-ring.good .ring-fg { stroke: var(--lime); }
.score-ring.warn .ring-fg { stroke: var(--amber); }
.score-ring.bad .ring-fg { stroke: var(--red); }
.score-ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring-text strong { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.score-ring-text span { color: var(--muted); font-size: .8rem; }
.score-chip { display: inline-grid; place-items: center; min-width: 46px; height: 46px; border-radius: 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; flex: none; }
.score-chip.good { background: rgba(163, 230, 53, .14); color: var(--lime); }
.score-chip.warn { background: rgba(245, 184, 61, .14); color: var(--amber); }
.score-chip.bad { background: rgba(242, 107, 91, .14); color: var(--red); }

/* ---------- home ---------- */
.hero { padding: 2.5rem 0 1rem; max-width: 720px; }
.hero-title { font-size: clamp(2.6rem, 9vw, 4.5rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.accent { color: var(--lime); }
.hero-sub { font-size: 1.15rem; color: #cfd6cb; max-width: 60ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.privacy-note { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85rem; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.recent-card { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.recent-card:hover { border-color: #3a403a; }
.recent-meta { display: grid; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.step { display: flex; gap: .85rem; }
.step p { margin: 0; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-weight: 800; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.check-card h3 { display: flex; align-items: center; gap: .5rem; color: var(--lime); }
.check-card ul, .cues { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.check-card li, .cues li { display: flex; align-items: center; gap: .45rem; }
.check-card li svg, .cues li svg { color: var(--lime); flex: none; }
.tips-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }

/* ---------- record ---------- */
.record-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .record-layout { grid-template-columns: 1fr; } }
.settings { display: grid; gap: .75rem; }
.settings-card { display: grid; gap: .85rem; }
.tech-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.tech-btn { display: grid; justify-items: center; gap: .3rem; padding: .8rem .4rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-weight: 700; }
.tech-btn:hover { color: var(--text); }
.tech-btn.active { border-color: var(--lime); color: var(--lime); background: rgba(163, 230, 53, .08); }
.advanced summary { cursor: pointer; color: var(--muted); font-weight: 500; padding: .25rem 0; }
.advanced[open] summary { margin-bottom: .5rem; }

.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #050605; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage video.mirror { transform: scaleX(-1); }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; object-fit: contain; }
.stage-idle { display: grid; place-items: center; }
.stage-placeholder { display: grid; justify-items: center; gap: .6rem; text-align: center; padding: 1.5rem; color: var(--muted); }
.stage-placeholder p { margin: 0; }
.stage-status { min-height: 1.5em; font-size: .9rem; }
.dropzone { cursor: pointer; border-style: dashed; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--lime); background: rgba(163, 230, 53, .04); }
.frame-guide { position: absolute; inset: 6% 25%; border: 2px dashed rgba(255, 255, 255, .18); border-radius: 18px; pointer-events: none; }
.pill { position: absolute; top: .75rem; left: .75rem; padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; backdrop-filter: blur(8px); }
.pill-ok { background: rgba(163, 230, 53, .2); color: var(--lime); }
.pill-warn { background: rgba(245, 184, 61, .2); color: var(--amber); }
.pill-rec { background: rgba(242, 107, 91, .25); color: #ffb3a9; }
.stage-hint { position: absolute; left: .75rem; right: .75rem; top: 3.1rem; text-align: center; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.stage-controls { position: absolute; left: 0; right: 0; bottom: .9rem; display: flex; align-items: center; justify-content: center; gap: 2.5rem; }
.rec-btn { width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
.rec-btn span { width: 52px; height: 52px; border-radius: 50%; background: var(--red); transition: all .2s; }
.rec-btn.armed span { background: var(--amber); }
.rec-btn.recording span { width: 26px; height: 26px; border-radius: 6px; }
.rec-btn:disabled { opacity: .5; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(5rem, 22vw, 9rem); font-weight: 800; color: var(--lime); text-shadow: 0 4px 30px rgba(0,0,0,.8); }
.rec-timer { position: absolute; top: .75rem; right: .75rem; font-variant-numeric: tabular-nums; font-weight: 700; background: rgba(0,0,0,.55); padding: .25rem .6rem; border-radius: 8px; }
.guide { margin: .75rem 0 0; font-size: .9rem; }
.trim { display: grid; gap: .75rem; margin-top: .75rem; }
.trim-row { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: .75rem; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--lime); transition: width .2s; }

/* ---------- analysis ---------- */
.result-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.result-meta h1 { margin-bottom: .2rem; }
.result-meta p { margin: 0; }
.focus { display: flex; gap: 1rem; margin-top: 1rem; border-color: rgba(163, 230, 53, .45); background: linear-gradient(135deg, rgba(163, 230, 53, .1), transparent 60%), var(--surface); }
.focus h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.focus-icon { color: var(--lime); flex: none; padding-top: .2rem; }
.focus-good { border-color: var(--border); }
.cue { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--lime); }
.stage-player { aspect-ratio: auto; max-height: 72vh; margin: 0 auto; }
.stage-replay { background: radial-gradient(circle at 50% 40%, #151915, #050605); }
.scrub-wrap { position: relative; margin-top: .6rem; }
.scrub { display: block; }
.markers { position: absolute; left: 8px; right: 8px; top: -6px; height: 0; }
.marker { position: absolute; width: 12px; height: 12px; margin-left: -6px; border-radius: 3px; transform: rotate(45deg); background: #fff; border: 2px solid var(--bg); cursor: pointer; padding: 0; }
.player-controls { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4.5em; }
.moments { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.findings { display: grid; gap: .75rem; }
.finding { border-left: 4px solid var(--border); }
.finding.sev-good { border-left-color: var(--lime); }
.finding.sev-warning { border-left-color: var(--amber); }
.finding.sev-critical { border-left-color: var(--red); }
.finding.is-focus { box-shadow: 0 0 0 1px rgba(163, 230, 53, .4); }
.finding header { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.finding header h3 { margin: 0; flex: 1; }
.sev-dot { display: inline-grid; }
.sev-good .sev-dot { color: var(--lime); }
.sev-warning .sev-dot { color: var(--amber); }
.sev-critical .sev-dot { color: var(--red); }
.finding-score { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.finding-score.good { color: var(--lime); } .finding-score.warn { color: var(--amber); } .finding-score.bad { color: var(--red); }
.fix { background: var(--surface-2); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.finding-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.metric { font-variant-numeric: tabular-nums; }
.conf { display: inline-flex; align-items: center; gap: .35rem; }
.conf-bar { width: 56px; height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; display: inline-block; }
.conf-bar span { display: block; height: 100%; background: var(--muted); }
.note { margin: .5rem 0 0; }
.finding-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.disclaimer { display: flex; gap: .4rem; align-items: flex-start; color: var(--muted); font-size: .82rem; margin-top: 1rem; }
.disclaimer svg { flex: none; margin-top: .15rem; }
.notes { margin: .5rem 0; }
.section.card h2 { display: flex; align-items: center; gap: .25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }

/* ---------- history ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: .75rem; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { display: grid; gap: .1rem; }
.stat strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.stat .up { color: var(--lime); } .stat .down { color: var(--red); }
.chart-card { margin-bottom: .75rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .trend-line { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-linejoin: round; opacity: .7; }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.insight { display: flex; gap: .6rem; align-items: center; background: var(--surface-2); padding: .65rem .8rem; border-radius: var(--radius-sm); }
.insight svg { color: var(--lime); flex: none; }
.insight > span { display: grid; }
.bars { display: grid; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 2.5rem; align-items: center; gap: .75rem; font-size: .9rem; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; }
.bar-fill.good { background: var(--lime); } .bar-fill.warn { background: var(--amber); } .bar-fill.bad { background: var(--red); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.session-list { display: grid; gap: .5rem; }
.session-row { display: flex; align-items: center; gap: .85rem; text-decoration: none; text-align: left; width: 100%; cursor: pointer; color: var(--text); }
.session-row:hover { border-color: #3a403a; }
.session-row.picked { border-color: var(--lime); }
.row-main { display: grid; flex: 1; min-width: 0; }
.row-focus { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--amber); }
.pick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: var(--lime-ink); }
.picked .pick { background: var(--lime); border-color: var(--lime); }
.compare { margin-bottom: .75rem; }
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { padding: .5rem; border-bottom: 1px solid var(--border); text-align: right; }
.compare-table th[scope="row"] { text-align: left; font-weight: 500; }
.compare-table .up { color: var(--lime); font-weight: 700; } .compare-table .down { color: var(--red); font-weight: 700; }

.backup { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.backup h2 { margin-bottom: .2rem; }
.backup p { margin: 0; }

/* ---------- drills ---------- */
.drill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.drill-card { text-decoration: none; display: grid; gap: .35rem; align-content: start; }
.drill-card:hover { border-color: var(--lime); }
.drill-card h3, .drill-card p { margin: 0; }
.drill-tech { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; color: var(--lime); text-transform: uppercase; letter-spacing: .06em; }
.drill-meta { font-size: .8rem; color: var(--muted); }
.drill-detail { max-width: 720px; display: grid; gap: 1rem; }
.drill-detail .card h2 { font-size: 1.05rem; margin-top: 1rem; }
.drill-detail .card h2:first-child { margin-top: 0; }
.drill-steps { padding-left: 1.2rem; margin: 0; display: grid; gap: .35rem; }
.drill-detail > .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- modals and setup guide ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; }
.modal { position: relative; width: min(100%, 460px); max-height: calc(100vh - 2rem); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.modal-wide { width: min(100%, 640px); }
.modal-body { display: grid; gap: .5rem; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.modal-x { position: absolute; top: .75rem; right: .75rem; width: 36px; height: 36px; }
.modal-guide .modal-actions { justify-content: space-between; }
.guide-art svg { width: 100%; height: auto; display: block; margin: .25rem 0 .9rem; }
.dots { display: flex; gap: .35rem; justify-content: center; margin-top: .5rem; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.dots span.on { background: var(--lime); width: 20px; border-radius: 99px; }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.issue-list li { display: flex; gap: .55rem; align-items: flex-start; }
.issue-list li > svg { color: var(--amber); flex: none; margin-top: .2rem; }
.issue-list li > span { display: grid; gap: .1rem; }
.quality-note { margin-top: 1rem; border-color: rgba(245, 184, 61, .4); }
.quality-note summary { cursor: pointer; color: var(--amber); font-weight: 700; display: flex; align-items: center; gap: .35rem; }
.quality-note[open] summary { margin-bottom: .75rem; }

/* ---------- coach review ---------- */
.coach-toggle { margin-top: .6rem; }
.coach-panel { margin-top: 1rem; display: grid; gap: .75rem; border-color: rgba(92, 200, 255, .35); }
.coach-panel .section-head { margin: 0; }
.coach-q { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.coach-box { margin-top: .85rem; padding-top: .85rem; border-top: 1px dashed var(--border); display: grid; gap: .6rem; }
.coach-box .eyebrow { color: var(--sky); margin: 0; }
.raw-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.raw-table th { text-align: left; font-weight: 500; color: var(--muted); padding: .25rem .5rem .25rem 0; }
.raw-table td { text-align: right; padding: .25rem 0; }
.raw-table tr + tr { border-top: 1px solid var(--surface-2); }
.save-status { min-width: 5em; text-align: right; }
.coach-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; border-color: rgba(92, 200, 255, .35); }
.coach-tools h2 { display: flex; align-items: center; gap: .25rem; margin-bottom: .2rem; }
.coach-tools p { margin: 0; }

/* ---------- weak-foot ---------- */
.foot-card { margin-bottom: .75rem; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.foot-col { display: grid; padding: .75rem; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--lime); }
.foot-col.foot-right { border-left-color: var(--sky); }
.foot-col strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.foot-card > p { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.gap-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--amber); }

.beta { display: inline-block; margin-left: .35rem; padding: .05rem .4rem; border-radius: 99px; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(92, 200, 255, .15); color: var(--sky); vertical-align: middle; }
.tech-btn .beta { margin: 0; }
