/* Stride — field-manual style: square, ruled, mono numerals, high contrast. Tokens on :root. */
:root {
  --bg: #f4f3ee; --ink: #141414; --rule: #141414; --mute: #5c5c56;
  --run: #b3261e; --walk: #1b5e9e; --warm: #6b6b63;
  --font: -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --ink: #f1efe8; --rule: #f1efe8; --mute: #9a9a92; --run: #ff6b5e; --walk: #6fb1ff; --warm: #a6a69e; }
}
* { box-sizing: border-box; margin: 0; border-radius: 0; }
[hidden] { display: none !important; }   /* class display rules (.nav grid, .big block) must not beat the hidden attribute */
html, body { background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.mast { display: flex; justify-content: space-between; align-items: baseline; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; border-bottom: 2px solid var(--rule); font-family: var(--mono); letter-spacing: .08em; }
.mast-name { font-weight: 700; } .mast-sub { color: var(--mute); font-size: 12px; }
main { flex: 1; padding: 16px; }
.rule { font: 12px/1 var(--mono); letter-spacing: .08em; color: var(--mute); border-bottom: 1px solid var(--rule); padding-bottom: 6px; margin-bottom: 12px; text-transform: uppercase; }
h2 { font-size: 28px; line-height: 1.1; margin-bottom: 8px; }
.meta { color: var(--mute); margin-bottom: 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 12px; color: var(--mute); }
button, .big { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--rule); padding: 14px 16px; width: 100%; text-align: left; cursor: pointer; display: block; }
.big + .big { margin-top: 8px; }
.primary { background: var(--ink); color: var(--bg); }
.ghost { border-color: var(--mute); color: var(--mute); }
.danger { border-color: var(--run); color: var(--run); }
button:disabled { opacity: .4; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--rule); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.nav button { border: 0; border-right: 1px solid var(--rule); text-align: center; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 14px 0; }
.nav button:last-child { border-right: 0; } .nav button.on { background: var(--ink); color: var(--bg); }
table { width: 100%; border-collapse: collapse; }
td, th { border-bottom: 1px solid var(--rule); padding: 10px 6px; text-align: left; vertical-align: top; }
th { font: 12px var(--mono); letter-spacing: .08em; color: var(--mute); text-transform: uppercase; }
tr.done { color: var(--mute); } tr.now td:first-child { box-shadow: inset 4px 0 0 var(--ink); }
td button { width: auto; min-width: 44px; min-height: 44px; padding: 4px 10px; text-align: center; }   /* 44 × 44 touch target */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 2px solid var(--rule); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 2; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.row input[type=number] { font: inherit; width: 6em; border: 2px solid var(--rule); padding: 6px; background: var(--bg); color: var(--ink); }
.row input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; } .grid2 .big { margin: 0; }
.rate.on { background: var(--ink); color: var(--bg); }
.rating.hard, .rating.stopped { color: var(--run); }
.empty { color: var(--mute); text-align: center; padding: 48px 0; }
.gap { border: 2px solid var(--rule); padding: 12px; margin-bottom: 16px; }
.file { position: relative; } .file input { position: absolute; inset: 0; opacity: 0; }
/* Guided session (Task 7) */
.session { display: flex; flex-direction: column; min-height: calc(100dvh - 80px); }
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; cursor: pointer; -webkit-user-select: none; user-select: none; }
.word { font: 700 min(14vh, 96px, 19vw)/.95 var(--font); letter-spacing: -.02em; margin: 8px 0; }   /* "COOL DOWN" may wrap at phone width */
.word.run { color: var(--run); } .word.walk, .word.extra { color: var(--walk); } .word.warm, .word.cool { color: var(--warm); }
.clock { font-size: min(28vh, 30vw); line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.next { color: var(--mute); font-size: 20px; margin: 12px 0; }
.bar { height: 6px; border: 1px solid var(--rule); margin: 0 0 16px; } .bar-fill { height: 100%; background: var(--ink); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .controls .big { margin: 0; text-align: center; min-height: 72px; }
.when-paused { grid-template-columns: 2fr 1fr 1fr; }
body:not(.paused) .when-paused { display: none; } body.paused .when-running { display: none; }
.controls .hold { background: linear-gradient(to right, var(--run) var(--p, 0%), transparent var(--p, 0%)); }
body.paused .clock { opacity: .5; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
