/* On Your Watch — a duty board at night. Ink-dark panels, one amber light, Inter for words and
   JetBrains Mono for the numbers and labels a roster would print. Light theme: the same board by
   day, on warm paper. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}

:root {
  --bg: #f1efe9;
  --panel: #ffffff;
  --ink: #141a21;
  --ink-2: #545d68;
  --rule: #d6d2c8;
  --amber: #8f4f00;
  --on-amber: #ffffff;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --col: 34rem;
  --gutter: 1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0f14;
    --panel: #131a22;
    --ink: #eef2f5;
    --ink-2: #9aa7b4;
    --rule: #243040;
    --amber: #f5b041;
    --on-amber: #14100a;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b0f14;
  --panel: #131a22;
  --ink: #eef2f5;
  --ink-2: #9aa7b4;
  --rule: #243040;
  --amber: #f5b041;
  --on-amber: #14100a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- page */
.page {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) var(--gutter)
    max(2rem, env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------------- masthead */
.masthead {
  padding: 0.5rem 0 1.5rem;
}
.dateline {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
/* The watch light: on while today's watch is open. */
.dateline::before {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.3em;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0.6rem var(--amber);
}
.title {
  margin: 0.8rem 0 0;
  font-size: clamp(2.6rem, 12vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.strap {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

/* The every-game streak: one line, only with two or more games out. */
.every-game {
  margin: 0 0 0.75rem;
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- games: duty cards */
.games {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.game a {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--amber);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
}
.game .no {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  font: 400 0.75rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.game .streak {
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink);
}
.game .name {
  margin-top: 0.1rem;
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.game .premise {
  color: var(--ink-2);
}
.game .go {
  justify-self: start;
  margin-top: 0.6rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--on-amber);
  font: 700 0.875rem/1 var(--sans);
}
.game .go::after {
  content: ' →';
}
/* Played today: a tick and the result, quieter than an open watch. */
.game.done a {
  border-left-color: var(--rule);
}
.game.done .go {
  padding: 0;
  background: none;
  color: var(--ink-2);
  font: 400 0.875rem/1.3 var(--mono);
}
.game.done .go::before {
  content: '✓ ';
  color: var(--ink);
}
.game.done .go::after {
  content: '';
}
.game a:hover .name,
.game a:focus-visible .name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}
.fallback .game a {
  padding: 1rem;
}
.more {
  margin: 1rem 0 0;
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- footer, prose */
.foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font: 400 0.8125rem/1.6 var(--mono);
  color: var(--ink-2);
}
.foot p {
  margin: 0.3rem 0;
}
.prose {
  max-width: var(--col);
  margin: 1rem auto 0;
}
.prose h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.prose h2 {
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 2rem 0 0.6rem;
}
.prose p,
.prose li {
  margin: 0 0 0.85rem;
}
.prose ul {
  padding-left: 1.2rem;
}
.back {
  display: inline-block;
  margin-top: 1.5rem;
  font: 400 0.8125rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The tip line: a plain link to Buy Me a Coffee (no widget, so no third-party script). */
.coffee {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.coffee a {
  color: inherit;
}
