/* Shared look for applets.nn.pe: Countdown-board navy, blue tiles, gridded whiteboard. */

:root {
  --navy: #0a1a45;
  --navy-2: #12265e;
  --frame: #5d8fd8;
  --tile: #1d4fb0;
  --tile-hover: #2862d1;
  --tile-edge: #9cc0ff;
  --target: #0b2c8c;
  --board: #f6f6fa;
  --grid: #d7d9e6;
  --ink: #1b2a6b;
  --muted: #6b7bb5;
  --gold: #f2b705;
  --gold-hover: #ffcf3a;
  --bad: #c0392b;
  --soft: #b9c9ee;

  --heavy: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --marker: "Kalam", "Segoe Print", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: white;
  font-family: var(--body);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

a { color: var(--tile-edge); }

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── header / footer ─────────────────────────────────────────── */

.site-head {
  padding: 18px 0;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-family: var(--heavy);
  font-size: 1.35rem;
  color: white;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand span { color: var(--gold); }
/* App pages: "applets. / App Name" breadcrumb, the app name is the page's h1. */
.crumbs {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 10px;
  min-width: 0;
}
.crumbs .sep { color: var(--muted); font-size: 1.2rem; }
.crumbs h1 {
  margin: 0;
  font-family: var(--heavy);
  font-size: 1.35rem;
  font-weight: 400;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.back {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .crumbs h1 { font-size: 1.1rem; }
}
.back:hover { color: white; }

.site-foot {
  margin-top: auto;
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ── the blue board frame ────────────────────────────────────── */

.board-frame {
  background: var(--frame);
  padding: 14px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.target-box {
  display: block;
  margin: 0 auto;
  background: var(--target);
  color: white;
  border: 3px solid var(--tile-edge);
  font-family: var(--heavy);
  text-align: center;
}

.tile {
  background: var(--tile);
  color: white;
  border: 3px solid var(--tile-edge);
  font-family: var(--heavy);
  text-align: center;
}

/* ── gridded whiteboard ──────────────────────────────────────── */

.whiteboard {
  background-color: var(--board);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 4px solid var(--frame);
  color: var(--ink);
  font-family: var(--marker);
}

/* ── buttons ─────────────────────────────────────────────────── */

.btn {
  font-family: var(--heavy);
  font-size: 1rem;
  letter-spacing: 0.04em;
  border: 0;
  padding: 10px 24px;
  cursor: pointer;
  border-radius: 2px;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-blue { background: var(--tile); color: white; }
.btn-blue:hover { background: var(--tile-hover); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}
