@font-face {
  font-family: "DSEG7";
  src: url("https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic/DSEG7Classic-BoldItalic.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #121212;
  --line: #262626;
  --fg: #ececec;
  --muted: #8c8c8c;
  --red: #ff2d2d;
  --red-ghost: #2b0b0b;
  --green: #21e06b;
  --green-ghost: #0b2716;
  --amber: #ffb000;
  --amber-ghost: #2b2008;
  --blue: #3d8bff;
  --led: var(--red);
  --ghost: var(--red-ghost);
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font-family:Inter, system-ui, sans-serif; }
body[data-phase=rest] { --led: var(--green); --ghost: var(--green-ghost); }
body[data-phase=prep] { --led: var(--amber); --ghost: var(--amber-ghost); }
main { max-width:760px; margin:0 auto; padding:16px; }

nav { display:flex; gap:18px; flex-wrap:wrap; align-items:baseline; margin-bottom:6px; font-family:var(--head); font-weight:600; text-transform:uppercase; letter-spacing:.06em; font-size:15px; }
nav a { color:var(--muted); text-decoration:none; }
nav a:hover { color:var(--fg); }
nav a[aria-current] { color:var(--fg); border-bottom:2px solid var(--red); }
nav a.brand { color:var(--fg); font-weight:800; font-size:22px; letter-spacing:.02em; margin-right:8px; }
nav a.brand::before { content:""; display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--red); margin-right:7px; box-shadow:0 0 8px var(--red); }
h1 { font-family:var(--head); font-weight:800; text-transform:uppercase; font-size:clamp(30px, 6vw, 44px); letter-spacing:.01em; margin:14px 0 12px; line-height:1; }

#display { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:18px 12px 20px; text-align:center; box-shadow:inset 0 2px 18px rgba(0,0,0,.8), 0 10px 30px rgba(0,0,0,.4); }
#phase { font-family:var(--head); font-weight:800; font-size:30px; letter-spacing:.14em; color:var(--led); text-transform:uppercase; }
#clock { position:relative; display:inline-block; font-family:"DSEG7", ui-monospace, monospace; font-size:clamp(64px, 20vw, 168px); line-height:1.1; margin:6px 0 4px; }
#clock .ghost { position:absolute; inset:0; color:var(--ghost); }
#digits { position:relative; color:var(--led); text-shadow:0 0 18px color-mix(in srgb, var(--led) 55%, transparent); }
#round { font-family:var(--head); font-weight:700; font-size:24px; letter-spacing:.08em; text-transform:uppercase; color:var(--blue); }
#total { color:var(--muted); margin-top:4px; font-variant-numeric:tabular-nums; font-size:14px; }

#controls { display:flex; gap:12px; justify-content:center; margin:18px 0; }
button { font-family:var(--head); font-weight:800; font-size:22px; letter-spacing:.1em; text-transform:uppercase; padding:14px 38px; border-radius:6px; border:0; cursor:pointer; background:var(--red); color:#fff; }
button:hover { filter:brightness(1.1); }
#reset { background:#232323; color:var(--fg); }

#settings { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px,1fr)); gap:10px; }
#settings label { display:flex; flex-direction:column; gap:4px; font-family:var(--head); font-weight:600; text-transform:uppercase; letter-spacing:.06em; font-size:14px; color:var(--muted); }
#settings input { font-size:20px; padding:9px 10px; border-radius:6px; border:1px solid var(--line); background:#151515; color:var(--fg); font-variant-numeric:tabular-nums; }
#settings input:focus { outline:2px solid var(--red); border-color:transparent; }

.ad-slot { margin:28px 0; min-height:120px; }
.ad-label { display:block; font-size:11px; color:#666; text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }

article { color:#c9c9c9; line-height:1.65; font-size:15px; }
article h2 { font-family:var(--head); font-weight:800; text-transform:uppercase; letter-spacing:.03em; font-size:24px; color:var(--fg); margin-top:28px; }
article strong { color:var(--fg); }
article ul { padding-left:20px; }
article a, footer a { color:#ff6b6b; }
footer { margin:40px 0 20px; padding-top:16px; border-top:1px solid var(--line); font-size:13px; color:var(--muted); }
@media (max-width: 480px) {
  nav { gap:12px; font-size:14px; }
  nav a.brand { font-size:19px; margin-right:2px; }
}
