/* "Ugh, stats" (contract UGH-STATS-PAGES, 14 Nov 2026): the four pages' shared look.
   Canon 7.5's portal row: white surfaces, navy, teal, Outfit; JetBrains Mono for figures. Phone first. */
:root {
  --navy: #1a2744;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --accent-light: #f0fdfa;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  padding-bottom: 44px;
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  min-height: 100vh;
  overflow-wrap: anywhere;
}
.nav { background: var(--navy); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav .back { opacity: 0.8; font-size: 0.85rem; font-weight: 400; }
.nav .back:hover { opacity: 1; }
.container { max-width: 720px; width: 100%; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
p { margin-bottom: 0.8rem; }

.crumb { font-size: 0.9rem; margin-bottom: 1rem; }
.crumb a { text-decoration: none; font-weight: 600; }
.kicker { color: var(--teal-dark); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem; }
h1 { color: var(--navy); font-size: 2rem; line-height: 1.15; margin-bottom: 1rem; }
h2 { color: var(--navy); font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.6rem; }
h3 { color: var(--navy); font-size: 1.1rem; line-height: 1.3; margin: 0 0 0.4rem; }
.lead { font-size: 1.1rem; color: var(--text); margin-bottom: 1.5rem; }

.card, .step, .panel, .live-box, .box {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.25rem 1.25rem 0.6rem; margin-bottom: 1.25rem;
}
.figure, .ugh-big { font-family: var(--mono); font-weight: 700; color: var(--navy); }

/* live box */
.live-box { border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; }
.live-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 0.3rem; }
.ugh-big { font-size: 2.6rem; line-height: 1.1; margin-bottom: 0.3rem; }
.ugh-sub { color: var(--muted); font-size: 0.95rem; }
[data-ugh-live] { min-height: 2.5rem; }
.ugh-unavailable { color: var(--muted); font-weight: 600; padding: 0.4rem 0 0.8rem; }

/* the four steps */
.strip { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 2rem; }
.strip li { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; }
.strip .n, .step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 0.9rem; margin-right: 0.5rem; flex: none;
}
.strip strong { color: var(--navy); font-size: 1.05rem; }
.strip span.what { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; }
@media (min-width: 640px) { .strip { grid-template-columns: repeat(4, 1fr); } }

.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.card .kicker { font-size: 0.75rem; }
.card .go, .more-link { font-weight: 700; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.soon { color: var(--muted); margin: 0.5rem 0 1rem; }
.more-link { display: inline-block; margin-bottom: 2rem; }
.panel h2 { font-size: 1.1rem; }

/* a case */
.step h2 { display: flex; align-items: center; }
.decided { border-left: 4px solid var(--navy); padding-left: 0.9rem; margin-bottom: 1.25rem; }
.when {
  display: inline-block; background: var(--navy); color: #fff; font-size: 0.8rem; font-weight: 600;
  padding: 0.2rem 0.65rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.today { border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; }
.when.now { background: var(--teal-dark); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.stats > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; }
.stats dt { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.stats dd { font-family: var(--mono); font-weight: 700; color: var(--navy); font-size: 1.25rem; line-height: 1.3; }
@media (min-width: 640px) { .stats.three { grid-template-columns: repeat(3, 1fr); } }
.box h2 { font-size: 1.1rem; }
.box ul, .box ol, .step ul { padding-left: 1.25rem; margin-bottom: 0.8rem; }
.box li, .step li { margin-bottom: 0.5rem; }
.box.cant { background: #fff; border-left: 4px solid var(--muted); border-radius: 0 12px 12px 0; }
.box.turn { background: var(--accent-light); border-color: #99f6e4; }
.btn {
  display: inline-block; font-family: inherit; font-size: 0.95rem; font-weight: 600; color: #fff; background: var(--teal-dark);
  border: 0; border-radius: 8px; padding: 0.65rem 1.1rem; margin: 0.2rem 0 0.8rem; cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--navy); }
.btn[hidden] { display: none; }   /* .btn's display would otherwise override the hidden attribute */

/* charts */
.chart-title { font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; }
.ugh-chart { width: 100%; overflow: hidden; margin-bottom: 0.3rem; }
.ugh-chart svg { display: block; max-width: 100%; height: auto; }
.ugh-legend { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.ugh-key { display: inline-flex; align-items: center; margin-right: 1rem; }
.ugh-swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; margin-right: 0.35rem; }
.ugh-axis, .ugh-note, .note { font-size: 0.88rem; color: var(--muted); }
.ugh-table { margin: 0.4rem 0 1rem; font-size: 0.9rem; }
.ugh-table summary { cursor: pointer; color: var(--teal-dark); font-weight: 600; padding: 0.3rem 0; }
.ugh-table table { border-collapse: collapse; margin-top: 0.4rem; width: 100%; max-width: 420px; }
.ugh-table caption { text-align: left; color: var(--muted); padding-bottom: 0.3rem; }
.ugh-table th, .ugh-table td { text-align: left; padding: 0.25rem 0.75rem 0.25rem 0; border-bottom: 1px solid var(--border); font-weight: 400; }
.ugh-table thead th { font-weight: 600; color: var(--navy); }
.ugh-table td { font-family: var(--mono); }

.ugh-swatch.ring { background: #fff; border: 2px solid; border-radius: 50%; }

/* the questions (contract UGH-STATS-QUESTIONS): one widget, drawn by ugh-stats.js */
.ugh-quiz { margin-bottom: 0.8rem; }
.ugh-q-count { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 0.3rem; }
.ugh-q-count:focus { outline: none; }
.ugh-q-stem { font-weight: 600; color: var(--navy); }
.ugh-q-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.ugh-q-label { flex-basis: 100%; font-size: 0.9rem; color: var(--muted); }
.ugh-q-input {
  font-family: var(--mono); font-size: 1.15rem; width: 8.5rem; min-height: 44px; padding: 0.4rem 0.6rem;
  border: 2px solid var(--border); border-radius: 8px; background: #fff; color: var(--navy);
}
.ugh-q-input:focus { border-color: var(--teal); outline: none; }
.ugh-q-form .btn { margin: 0; }
.ugh-q-options { display: grid; gap: 0.5rem; margin-bottom: 0.7rem; }
.ugh-q-option {
  font-family: inherit; font-size: 0.98rem; text-align: left; color: var(--text); background: #fff; line-height: 1.45;
  border: 2px solid var(--border); border-radius: 10px; padding: 0.6rem 0.8rem; min-height: 44px; cursor: pointer;
}
.ugh-q-option:hover:not(:disabled) { border-color: var(--teal); }
.ugh-q-option:disabled { cursor: default; color: var(--text); }
.ugh-q-option.chosen { border-color: var(--navy); }
.ugh-q-option.right { border-color: var(--teal); background: var(--accent-light); }
.ugh-q-verdict { font-weight: 700; color: var(--navy); margin-bottom: 0.3rem; }
.ugh-q-answer { font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.ugh-q-working { font-family: var(--mono); font-size: 0.92rem; color: var(--navy); }
.ugh-q-try, .ugh-q-end { color: var(--muted); }

/* Case 3's week and the foreword */
.week-table { border-collapse: collapse; width: 100%; margin: 0.4rem 0 1rem; font-size: 0.9rem; }
.week-table caption { text-align: left; font-weight: 600; color: var(--navy); padding-bottom: 0.3rem; }
.week-table th, .week-table td { text-align: center; padding: 0.3rem 0.2rem; border-bottom: 1px solid var(--border); }
.week-table th { font-weight: 600; color: var(--navy); }
.week-table td { font-family: var(--mono); }
.foreword { border-left: 4px solid var(--navy); border-radius: 0 12px 12px 0; }
.foreword .signoff { font-weight: 700; color: var(--navy); }

@media (max-width: 480px) {
  .nav { padding: 0.85rem 1rem; }
  .container { padding: 1.5rem 0.9rem 2.5rem; }
  h1 { font-size: 1.65rem; }
  .ugh-big { font-size: 2.1rem; }
  .card, .step, .panel, .live-box, .box { padding: 1rem 0.9rem 0.4rem; }
}
