/* ── TOKENS ───────────────────────────────────────────────────────── */
:root {
    --bg: #09090b; --bg-card: #18181b; --border: rgba(255,255,255,0.08);
    --text: #e4e4e7; --muted: #71717a; --accent: #06b6d4;
    --atp: #f59e0b; --glyk: #ef4444; --aerob: #22c55e;
    --radius: 1.25rem;
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}
[data-theme="light"] {
    --bg: #f1f5f9; --bg-card: #ffffff; --border: rgba(0,0,0,0.08);
    --text: #1e293b; --muted: #64748b;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text);
       line-height: 1.6; padding-bottom: 60px; transition: background 0.2s, color 0.2s; }
.page { max-width: 960px; margin: 0 auto; padding: 80px 16px 0; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 36px 20px 28px; }
.hero-top { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-badge { display: inline-block; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
              color: var(--accent); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
              padding: 5px 14px; border-radius: 999px; }
.theme-toggle { background: rgba(128,128,128,0.1); border: 1px solid var(--border); border-radius: 999px;
                padding: 5px 12px; font-size: 0.85rem; cursor: pointer; color: var(--text); }
.hero h1 { font-family: var(--font-head); font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-weight: 700;
           letter-spacing: -0.03em; color: var(--text); margin-bottom: 10px; line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); font-size: 0.95rem; max-width: 500px; margin: 0 auto; }

/* ── CARDS ────────────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.viz-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
             color: var(--accent); margin-bottom: 14px; }

/* ═══════════════════════════════════════════════════════════════════ */
/*  MAIN 2-COLUMN LAYOUT                                               */
/* ═══════════════════════════════════════════════════════════════════ */
.main-layout {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: start;
}

/* ── LEFT: SLIDERS PANEL ──────────────────────────────────────────── */
.sliders-panel {
    position: sticky;
    top: 62px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 14px;
}
.sp-title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.sp-divider { height: 1px; background: var(--border); }

/* Vertical slider control */
.v-control { display: flex; flex-direction: column; gap: 8px; }
.v-val-display { display: flex; flex-direction: column; gap: 1px; }
.v-big { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.v-hint { font-size: 0.68rem; color: var(--muted); }

.v-slider-row { display: flex; gap: 8px; align-items: stretch; }

/* The vertical range input */
.v-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    width: 28px;
    height: 190px;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    /* accent-color drives thumb color without layout hacks */
    accent-color: var(--accent);
}

/* Tick labels */
.v-ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 190px;
    font-size: 0.6rem;
    color: var(--muted);
    line-height: 1;
    padding: 2px 0;
}
.v-ticks span { display: block; white-space: nowrap; }

/* ── HR compact in left panel ─────────────────────────────────────── */
.hr-compact { display: flex; flex-direction: column; gap: 5px; }
.hr-label-mini { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.hr-mini-row { display: flex; align-items: center; gap: 4px; }
.hr-mini { width: 46px; background: rgba(128,128,128,0.1); border: 1px solid var(--border);
           border-radius: 6px; padding: 4px 6px; color: var(--text); font-size: 0.75rem;
           font-family: var(--font-body); outline: none; }
.hr-mini:focus { border-color: var(--accent); }
.hr-mini-sep { color: var(--muted); font-size: 0.8rem; }
.hr-result-mini { font-size: 0.75rem; font-weight: 600; color: var(--accent); }

/* ── Dominant box (compact in left panel) ─────────────────────────── */
.dominant-box { display: flex; align-items: flex-start; gap: 8px; background: rgba(128,128,128,0.05);
                border: 1px solid var(--border); border-radius: 10px; padding: 10px 10px; transition: border-color 0.3s; }
.dominant-icon { font-size: 1.2rem; flex-shrink: 0; }
.dominant-name { font-weight: 700; font-size: 0.78rem; color: var(--text); line-height: 1.3; }
.dominant-desc { font-size: 0.68rem; color: var(--muted); line-height: 1.4; }

/* ── Action buttons in left panel ─────────────────────────────────── */
.action-col { display: flex; flex-direction: column; gap: 6px; }
.action-btn { background: rgba(128,128,128,0.08); border: 1px solid var(--border); border-radius: 8px;
              padding: 7px 10px; font-size: 0.75rem; font-weight: 600; color: var(--text);
              cursor: pointer; text-align: center; transition: background 0.2s; font-family: var(--font-body); width: 100%; }
.action-btn:hover { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.35); }

/* ── RIGHT: CHARTS PANEL ──────────────────────────────────────────── */
.charts-panel { display: flex; flex-direction: column; gap: 14px; }

/* Stacked Area Canvas */
.chart-section { }
.area-canvas { display: block; width: 100%; height: 200px; }
.canvas-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.cleg-item { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--muted); }
.cleg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cleg-sep { color: var(--border); }
.cleg-ghost .cleg-dash { display: inline-block; width: 16px; height: 2px; vertical-align: middle;
                          background: repeating-linear-gradient(90deg,#94a3b8 0 4px,transparent 4px 8px); margin-right: 2px; }

/* Bars card */
.bars-card { padding: 16px 20px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 36px; gap: 8px 10px; align-items: center; }
.bar-label { display: flex; align-items: center; gap: 8px; }
.bar-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.bar-dot.atp  { background: var(--atp);  }
.bar-dot.glyk { background: var(--glyk); }
.bar-dot.aerob{ background: var(--aerob);}
.bar-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.bar-sub  { font-size: 0.68rem; color: var(--muted); }
.bar-track { height: 22px; background: rgba(128,128,128,0.1); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; width: 0%; transition: width 0.25s cubic-bezier(0.4,0,0.2,1); }
.atp-fill  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.glyk-fill { background: linear-gradient(90deg, #ef4444, #f87171); }
.aerob-fill{ background: linear-gradient(90deg, #22c55e, #4ade80); }
.bar-pct { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-align: right; }

/* ── CHART HEADER (title + mini presets) ─────────────────────────────── */
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.chart-header .viz-label { margin-bottom: 0; flex-shrink: 0; }

/* ── STEP BUTTONS (below canvas) ─────────────────────────────────────── */
.step-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 4px;
}
.step-btn {
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--accent);
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    letter-spacing: 0.03em;
    min-width: 80px;
}
.step-btn:hover  { background: rgba(6,182,212,0.16); border-color: rgba(6,182,212,0.5); }
.step-btn:active { background: rgba(6,182,212,0.28); transform: scale(0.96); }

/* ── MINI PRESETS ─────────────────────────────────────────────────── */
.mini-presets { display: flex; gap: 5px; flex-wrap: wrap; }
.mini-presets--lactate { margin-bottom: 10px; }
.mini-btn {
    background: rgba(128,128,128,0.07);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 3px 9px;
    font-size: 0.70rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    font-family: var(--font-body);
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.mini-btn:hover { border-color: rgba(6,182,212,0.4); background: rgba(6,182,212,0.08); }

/* Two panel (lactate + zone) */
.two-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lactate-canvas { display: block; width: 100%; height: 160px; cursor: ew-resize; }
.zone-card { display: flex; flex-direction: column; justify-content: center; }
.zone-body { display: flex; flex-direction: column; gap: 8px; }
.zone-name { font-family: var(--font-head); font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.zone-explain { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.zone-lact { font-size: 0.78rem; color: var(--muted); }
.zone-lact strong { color: #67e8f9; }
.zone-note { font-size: 0.7rem; color: var(--muted); line-height: 1.4; margin-top: 6px;
             padding: 6px 8px; background: rgba(239,68,68,0.06); border-radius: 6px;
             border-left: 2px solid rgba(239,68,68,0.4); display: none; }

/* ── COMPARE BANNER ───────────────────────────────────────────────── */
.compare-info { display: flex; align-items: center; justify-content: space-between; gap: 12px;
                background: rgba(6,182,212,0.07); border: 1px solid rgba(6,182,212,0.25);
                border-radius: 12px; padding: 10px 16px; margin-bottom: 16px;
                font-size: 0.8rem; color: var(--accent); }
.compare-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* ── EXAMPLES ─────────────────────────────────────────────────────── */
.examples-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px; }
@media(max-width:500px){ .examples-grid { grid-template-columns: repeat(2,1fr); } }
.example-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
               padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center;
               gap: 5px; transition: border-color 0.2s, transform 0.15s; color: var(--text); font-family: var(--font-body); }
.example-btn:hover { border-color: rgba(6,182,212,0.4); transform: translateY(-2px); }
.ex-icon  { font-size: 1.3rem; }
.ex-label { font-size: 0.72rem; font-weight: 600; text-align: center; }

/* ── INFO CARDS ───────────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px,1fr)); gap: 14px; margin-bottom: 16px; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.atp-card   { border-top: 3px solid var(--atp);  }
.glyk-card  { border-top: 3px solid var(--glyk); }
.aerob-card { border-top: 3px solid var(--aerob); }
.info-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.info-dot.atp   { background: var(--atp); }
.info-dot.glyk  { background: var(--glyk); }
.info-dot.aerob { background: var(--aerob); }
.info-num { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.info-title { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; color: var(--text); }
.stat-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0;
            border-bottom: 1px solid rgba(128,128,128,0.08); font-size: 0.78rem; }
.stat-label { color: var(--muted); flex-shrink: 0; }
.stat-val { color: var(--text); font-weight: 500; text-align: right; }
.info-text { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin: 10px 0 8px; }
.example-tag { font-size: 0.72rem; color: var(--accent); background: rgba(6,182,212,0.08);
               border: 1px solid rgba(6,182,212,0.2); border-radius: 8px; padding: 5px 10px; }

/* ── THRESHOLD ────────────────────────────────────────────────────── */
.threshold-card { margin-bottom: 16px; }
.thresh-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0; }
.thresh-intro { font-size: 0.83rem; color: var(--muted); margin-bottom: 18px; }
.threshold-viz { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.thresh-zone { flex: 1; min-width: 110px; background: rgba(128,128,128,0.04); border: 1px solid var(--border);
               border-radius: 10px; padding: 10px; text-align: center; }
.thresh-arrow { color: var(--muted); font-size: 1.1rem; flex-shrink: 0; }
.z-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.z1 .z-label { color: #22c55e; } .z2 .z-label { color: #84cc16; }
.z3 .z-label { color: var(--atp); } .z4 .z-label { color: var(--glyk); }
.z-name { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.z-desc { font-size: 0.7rem; color: var(--muted); line-height: 1.4; }

/* ── QUIZ ─────────────────────────────────────────────────────────── */
.quiz-section { margin-bottom: 16px; }
.quiz-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 18px; }
.quiz-q { margin-bottom: 18px; }
.quiz-q-text { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.quiz-options { display: flex; flex-direction: column; gap: 7px; }
.quiz-opt { background: rgba(128,128,128,0.05); border: 1px solid var(--border); border-radius: 10px;
            padding: 9px 13px; font-size: 0.83rem; color: var(--text); cursor: pointer; text-align: left;
            transition: border-color 0.2s, background 0.2s; font-family: var(--font-body); }
.quiz-opt:hover:not(:disabled) { border-color: rgba(6,182,212,0.4); background: rgba(6,182,212,0.06); }
.quiz-opt.correct { border-color: #22c55e; background: rgba(34,197,94,0.1); color: #4ade80; }
.quiz-opt.wrong   { border-color: #ef4444; background: rgba(239,68,68,0.1); color: #f87171; }
.quiz-opt:disabled { cursor: default; }
.quiz-exp { display: none; font-size: 0.78rem; color: var(--muted); margin-top: 7px; padding: 8px 12px;
            background: rgba(128,128,128,0.05); border-radius: 8px; line-height: 1.5; }
.quiz-result { text-align: center; padding: 18px; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.quiz-reset-btn { margin-top: 12px; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
                  border-radius: 10px; padding: 9px 22px; font-size: 0.83rem; font-weight: 600;
                  color: var(--accent); cursor: pointer; font-family: var(--font-body); }
.quiz-reset-btn:hover { background: rgba(6,182,212,0.2); }

/* ── LACTATE DYNAMICS ─────────────────────────────────────────────── */
.lacdyn-card { }
.lacdyn-hint { font-size: 0.74rem; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.lacdyn-canvas { display: block; width: 100%; height: 210px; cursor: ew-resize; }
.lacdyn-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

/* ── DOMINANT BOX OVERFLOW FIX ───────────────────────────────────── */
.dominant-desc { font-size: 0.65rem; line-height: 1.45; }

/* ── QUIZ COLLAPSIBLE SPACING ─────────────────────────────────────── */
.quiz-title { margin-bottom: 0; }
#quizBody { padding-top: 16px; }

/* ── COLLAPSIBLE SECTIONS ─────────────────────────────────────────── */
.collapsible-hdr { display: flex; justify-content: space-between; align-items: center;
                   cursor: pointer; user-select: none; }
.collapsible-hdr:hover .coll-icon { opacity: 1; }
.coll-icon { color: var(--muted); font-size: 0.85rem; transition: transform 0.2s; opacity: 0.55;
             flex-shrink: 0; margin-left: 8px; }
.coll-icon.open { transform: rotate(180deg); }

/* ── SYSTEM OVERLAY ───────────────────────────────────────────────── */
.sys-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 1000;
               display: flex; align-items: center; justify-content: center; padding: 16px;
               backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sys-overlay-inner { background: var(--bg-card); border: 1px solid var(--border);
                     border-radius: var(--radius); padding: 28px; max-width: 560px; width: 100%;
                     max-height: 88vh; overflow-y: auto; position: relative; }
.sys-overlay-close { position: absolute; top: 14px; right: 16px; background: none; border: none;
                     color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1;
                     padding: 4px 6px; border-radius: 6px; transition: background 0.15s; }
.sys-overlay-close:hover { background: rgba(128,128,128,0.12); }
.sys-overlay-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
                     text-transform: uppercase; padding: 3px 10px; border-radius: 999px;
                     margin-bottom: 10px; }
.sys-overlay-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
                     color: var(--text); margin-bottom: 18px; padding-right: 28px; }
.sys-overlay-body { font-size: 0.82rem; color: var(--muted); line-height: 1.75; }
.sys-overlay-body h4 { color: var(--text); font-weight: 700; margin: 16px 0 6px;
                       font-size: 0.83rem; letter-spacing: 0.02em; }
.sys-overlay-body ul { padding-left: 18px; margin: 0; }
.sys-overlay-body li { margin-bottom: 5px; }
.sys-overlay-body strong { color: var(--text); }
.sys-overlay-body p { margin: 8px 0; }
.sys-overlay-body em { color: var(--accent); font-style: normal; }
.sys-overlay-divider { height: 1px; background: var(--border); margin: 14px 0; }
.sys-note { font-size: 0.75rem; background: rgba(6,182,212,0.06); border: 1px solid rgba(6,182,212,0.18);
            border-radius: 8px; padding: 10px 12px; margin-top: 14px; color: var(--muted); line-height: 1.6; }

/* ── GA ZONE BAR (next to intensity slider) ───────────────────────── */
/* Slider range 20–100% = 80 units. Top=100%, Bottom=20% */
.ga-zone-bar { display: flex; flex-direction: column; width: 7px; height: 190px;
               border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.ga-z { width: 100%; }
.ga-z.intensiv { height: 31.25%; background: rgba(239,68,68,0.55); }  /* 75–100% = 25/80 */
.ga-z.ga2      { height: 18.75%; background: rgba(245,158,11,0.55); } /* 60–75% = 15/80 */
.ga-z.ga1      { flex: 1;        background: rgba(34,197,94,0.55);  } /* 20–60% = 40/80 */

/* ── TIME ZONE BAR (next to time slider) ──────────────────────────── */
/* Slider range 0–600s. Top=600s (aerob), Bottom=0s (ATP) */
.ta-zone-bar { display: flex; flex-direction: column; width: 7px; height: 190px;
               border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.ta-z { width: 100%; }
.ta-z.t-aerob { flex: 1;         background: rgba(34,197,94,0.55);  } /* 120–600s = 80% */
.ta-z.t-glyk  { height: 18.33%; background: rgba(239,68,68,0.55);  } /* 10–120s = 18.3% */
.ta-z.t-atp   { min-height: 6px; height: 1.67%; background: rgba(245,158,11,0.55); } /* 0–10s */

/* ── CLICKABLE BAR ROWS ───────────────────────────────────────────── */
.bar-row { cursor: pointer; border-radius: 8px; margin: -4px; padding: 4px;
           transition: background 0.15s; }
.bar-row:hover { background: rgba(128,128,128,0.07); }
.bar-hint { font-size: 0.59rem; color: var(--accent); opacity: 0.7; margin-top: 1px; }

/* ── COLLAPSIBLE INFO CARDS ───────────────────────────────────────── */
.info-card { transition: border-color 0.2s, box-shadow 0.2s; }
.info-header { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 12px;
               margin-bottom: 0; padding: 2px 0; }
.info-header:hover { opacity: 0.85; }
.info-header .coll-icon { margin-left: auto; }
.info-body { padding-top: 14px; }
.info-overlay-btn { margin-top: 10px; background: rgba(6,182,212,0.08); border: 1px solid rgba(6,182,212,0.25);
                    border-radius: 8px; padding: 6px 12px; font-size: 0.72rem; font-weight: 600;
                    color: var(--accent); cursor: pointer; font-family: var(--font-body); width: 100%; text-align: left; }
.info-overlay-btn:hover { background: rgba(6,182,212,0.16); }

/* ── THRESHOLD ZONE ACTIVE STATE ──────────────────────────────────── */
.thresh-zone { transition: border-color 0.25s, background 0.25s; }
.thresh-zone.tz-active { box-shadow: 0 0 0 2px var(--accent); background: rgba(6,182,212,0.07) !important; }
.z1.tz-active { box-shadow: 0 0 0 2px #22c55e; background: rgba(34,197,94,0.09) !important; }
.z2.tz-active { box-shadow: 0 0 0 2px #84cc16; background: rgba(132,204,22,0.09) !important; }
.z3.tz-active { box-shadow: 0 0 0 2px #f59e0b; background: rgba(245,158,11,0.09) !important; }
.z4.tz-active { box-shadow: 0 0 0 2px #ef4444; background: rgba(239,68,68,0.09) !important; }

/* ── THRESHOLD SECTION: SLIDER ────────────────────────────────────── */
.thresh-int-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.thresh-int-label { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.thresh-int-slider { flex: 1; accent-color: var(--accent); }
.thresh-int-val { font-size: 0.82rem; font-weight: 700; color: var(--accent); min-width: 40px; text-align: right; }

/* ═══════════════════════════════════════════════════════════════════ */
/*  RESPONSIVE                                                          */
/* ═══════════════════════════════════════════════════════════════════ */

/* iPad portrait and smaller tablets: keep 2-col but tighten */
@media (max-width: 820px) {
    .main-layout { grid-template-columns: 130px 1fr; gap: 12px; }
    .v-slider { height: 170px; }
    .v-ticks  { height: 170px; }
    .ga-zone-bar, .ta-zone-bar { height: 170px; }
    .two-panel { grid-template-columns: 1fr; }
}

/* Mobile: switch to horizontal sliders, single column */
@media (max-width: 620px) {
    .main-layout { grid-template-columns: 1fr; }

    .sliders-panel {
        position: static;
        flex-direction: column;
        gap: 10px;
    }

    .v-control { flex-direction: column; gap: 6px; }
    .v-val-display { flex-direction: row; align-items: baseline; gap: 8px; }
    .v-big { font-size: 1.3rem; }

    /* Horizontal slider overrides */
    .ga-zone-bar, .ta-zone-bar { display: none; }
    .v-slider-row { flex-direction: column; gap: 4px; }
    .v-slider {
        writing-mode: horizontal-tb;
        direction: ltr;
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 6px;
        background: rgba(128,128,128,0.15);
        border-radius: 3px;
    }
    .v-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px; height: 20px;
        border-radius: 50%;
        background: var(--accent);
        border: 2px solid var(--bg-card);
        margin-top: -7px;
    }
    .v-ticks {
        flex-direction: row;
        justify-content: space-between;
        height: auto;
        width: 100%;
    }
    .v-ticks span { white-space: nowrap; }

    .action-col { flex-direction: row; }
    .action-btn { flex: 1; }

    .bar-row { grid-template-columns: 1fr 36px; gap: 4px 8px; }
    .bar-label { grid-column: 1 / -1; }

    .examples-grid { grid-template-columns: repeat(2, 1fr); }
    .threshold-viz { flex-direction: column; }
    .thresh-arrow { transform: rotate(90deg); align-self: center; }
}
