:root {
  --bg: #060a15;
  --bg-card: #0c1220;
  --bg-raise: #111a2c;
  --line: #1d2942;
  --ink: #f2f4f8;
  --ink-dim: #97a1b5;
  --amber: #e8bd44;
  --amber-soft: #ffd766;
  --radius: 14px;
  --pad: clamp(18px, 5vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #0d1526 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 10;
  background: var(--amber); color: #111; padding: 8px 14px; border-radius: 8px; text-decoration: none;
}

.bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) var(--pad) 14px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
  background: rgba(6, 10, 21, 0.86);
  backdrop-filter: blur(12px);
}
.mark { image-rendering: auto; border-radius: 6px; }
.brand { font-weight: 700; letter-spacing: 0.02em; }
.dot { color: var(--amber); }
.kicker { color: var(--ink-dim); font-size: 15px; }

main { max-width: 860px; margin: 0 auto; padding: 0 var(--pad) 40px; }

.hero {
  padding: clamp(36px, 9vw, 72px) 0 clamp(28px, 6vw, 48px);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 10px; color: var(--amber); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.wotd-term {
  margin: 0 0 12px;
  font-size: clamp(38px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.wotd-def {
  margin: 0; max-width: 34ch;
  font-size: clamp(19px, 4.4vw, 24px);
  line-height: 1.45;
  color: var(--ink);
}
.wotd-group { margin: 18px 0 0; color: var(--ink-dim); font-size: 14px; }

h2 {
  font-size: clamp(24px, 5.4vw, 32px);
  line-height: 1.2; letter-spacing: -0.01em;
  margin: 56px 0 10px;
}
.lede { margin: 0 0 22px; color: var(--ink-dim); max-width: 56ch; }

.ten { list-style: none; margin: 0; padding: 0; counter-reset: ten; display: grid; gap: 12px; }
.ten li {
  counter-increment: ten;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px 58px;
  position: relative;
}
.ten li::before {
  content: counter(ten);
  position: absolute; left: 16px; top: 17px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(232, 189, 68, 0.12);
  color: var(--amber); font-size: 14px; font-weight: 700;
}
.ten .t { font-weight: 700; font-size: 18px; }
.ten .d { color: var(--ink); }
.ten .w { color: var(--ink-dim); font-size: 15px; }
.ten a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(232,189,68,0.35); }

.group { margin-top: 34px; }
.group h3 {
  margin: 0 0 12px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}
.term {
  display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 6px 22px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.term:last-child { border-bottom: 1px solid var(--line); }
.term dt { font-weight: 700; }
.term dd { margin: 0; color: var(--ink-dim); }
.term:target, .term.flash {
  background: linear-gradient(90deg, rgba(232,189,68,0.10), transparent 70%);
  border-radius: 8px;
}
.term:target dt { color: var(--amber-soft); }

#notify { margin-top: 56px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
#notify h2 { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
  appearance: none; border: 1px solid var(--amber); background: var(--amber); color: #12161f;
  font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 10px; cursor: pointer;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.fine { color: var(--ink-dim); font-size: 14px; margin: 12px 0 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--pad) calc(40px + env(safe-area-inset-bottom));
  color: var(--ink-dim); font-size: 15px;
  max-width: 860px; margin: 0 auto;
}
footer strong { color: var(--ink); }

@media (max-width: 560px) {
  .term { grid-template-columns: 1fr; gap: 2px; }
  .term dt { font-size: 17px; }
  .wotd-def { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active { transform: none; }
}
