:root {
  color-scheme: light;
  --paper: #f5eee7;
  --card: #fffaf4;
  --ink: #342523;
  --muted: #64534d;
  --rule: #decec1;
  --clock: #3a292b;
  --accent: #a44a32;
  --glow: #ffd7a7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 44px, 930px); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--rule); }
.mast-row { display: flex; align-items: center; justify-content: space-between; min-height: 63px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 750; letter-spacing: -.035em; text-decoration: none; }
.notes-link { color: var(--muted); font-size: 13px; font-weight: 650; text-underline-offset: 3px; }
.notes-link span { margin-inline-start: 3px; color: var(--accent); }
.intro { padding: 34px 0 22px; }
.eyebrow { margin: 0; color: var(--accent); font: 700 11px/1.45 ui-monospace, monospace; letter-spacing: .13em; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 5px; }
h1 { margin: 9px 0 10px; font-size: clamp(38px, 7vw, 70px); line-height: 1.01; letter-spacing: -.067em; }
.lede { max-width: 55ch; margin: 0; color: var(--muted); line-height: 1.55; }
.board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.clock, .controls { border-radius: 13px; padding: 20px clamp(15px, 3vw, 26px); min-width: 0; }
.clock { color: #fff7ed; background: var(--clock); display: flex; flex-direction: column; }
.clock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -.036em; }
.clock-head h2 { font-size: 17px; }
#status { margin: 0; padding: 4px 7px; border: 1px solid #84665f; border-radius: 6px; color: var(--glow); font: 650 11px/1.25 ui-monospace, monospace; }
.digits {
  margin: auto 0; padding: 22px 0 15px; color: var(--glow);
  font: 700 clamp(59px, 10vw, 110px)/.93 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: -.09em; font-variant-numeric: tabular-nums;
}
progress { appearance: none; width: 100%; height: 7px; border: none; border-radius: 8px; background: #624b49; accent-color: var(--glow); }
progress::-webkit-progress-bar { border-radius: 8px; background: #624b49; }
progress::-webkit-progress-value { border-radius: 8px; background: var(--glow); }
progress::-moz-progress-bar { border-radius: 8px; background: var(--glow); }
.clock-note { margin: 8px 0 0; font-size: 12px; color: #e0c9bd; }
.controls { border: 1px solid var(--rule); background: var(--card); }
.controls h2, .reference h2 { margin-top: 6px; }
.modes { display: grid; gap: 6px; margin-top: 13px; }
.modes button, .downloads a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--card); color: var(--ink);
  font-size: 13px; font-weight: 650; text-decoration: none;
}
.modes button[aria-pressed="true"] { border-color: #bb7963; background: #f5dfd2; }
.modes button:hover, .downloads a:hover { border-color: var(--accent); }
.modes small, .downloads small { color: var(--muted); font: 650 11px/1.4 ui-monospace, monospace; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions button { min-height: 35px; padding: 6px 13px; border: 1px solid var(--rule); border-radius: 7px; font-size: 13px; font-weight: 680; }
.actions .start { background: #93412d; color: #fff7ed; border-color: #93412d; }
.actions .start:hover { background: #783120; }
.actions .reset { background: var(--paper); color: var(--ink); }
.actions .reset:hover { border-color: var(--accent); }
.reference {
  display: grid; grid-template-columns: 1fr minmax(190px, 1.1fr); align-items: center; gap: 12px;
  margin-top: 14px; padding: 17px 20px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card);
}
.downloads { display: grid; gap: 6px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 18px; margin-top: 21px; padding: 14px 0 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.footer strong { color: var(--ink); }
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .intro { padding-top: 25px; }
  .board, .reference { grid-template-columns: 1fr; }
  .digits { padding-top: 18px; }
}
