/* County Craic — the palette is the iPhone app's, defined for both appearances so
   dark mode is a real design rather than an inverted accident. */

:root {
  color-scheme: light dark;

  --green: #0d6b40;
  --green-bright: #1c9955;
  --gold: #8a5900;
  --coral: #bd392c;
  --ink: #12201a;

  --canvas-top: #faf5e6;
  --canvas-bottom: #eef2ec;
  --surface: #fffffd;
  --border: rgba(13, 107, 64, 0.12);
  --muted: #5d6b63;
  --shadow: 0 10px 24px rgba(18, 32, 26, 0.08);

  --hero-top: #0f7047;
  --hero-bottom: #063f28;

  --radius: 20px;
  --max: 32rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #59cb8d;
    --green-bright: #6bd89b;
    --gold: #f6bd41;
    --coral: #fa7a6c;
    --ink: #e6efe7;

    --canvas-top: #0d1712;
    --canvas-bottom: #070d0a;
    --surface: #1b2620;
    --border: rgba(140, 200, 165, 0.14);
    --muted: #9db0a5;
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.4);

    --hero-top: #0f5c3b;
    --hero-bottom: #06301f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--canvas-top), var(--canvas-bottom)) fixed;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ------------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
  background: var(--canvas-top);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: 1rem;
}
.wordmark span {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--green);
}
.wordmark strong {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.today {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.25rem;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}
.icon-button:hover { background: color-mix(in srgb, var(--green) 12%, transparent); }
.icon-button svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

/* -------------------------------------------------------------------- layout */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.loading { text-align: center; color: var(--muted); padding: 3rem 0; }
.load-error { text-align: center; margin-top: 2rem; }
.load-error h2 { margin: 0 0 0.35rem; }
.load-error p { margin: 0 0 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

/* ------------------------------------------------------------------ progress */

.progress { display: flex; flex-direction: column; gap: 0.5rem; }
.progress-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.progress-title strong { font-size: 1.05rem; }
.progress-title span { color: var(--green); font-size: 0.85rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.bar { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); transition: width 0.3s ease; }

/* ---------------------------------------------------------------------- clue */

.clue { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center; }

.clue .silhouette { width: min(100%, 17rem); aspect-ratio: 1; }
.clue .silhouette path { fill: var(--ink); }

.island { width: 100%; aspect-ratio: 1; }
.island .land { fill: color-mix(in srgb, var(--green) 20%, transparent); }
.island .lines { fill: none; stroke: color-mix(in srgb, var(--green) 45%, transparent); stroke-width: 0.22; }
.island .pin { fill: var(--gold); stroke: var(--surface); stroke-width: 1; }
.island.clue { width: min(100%, 17rem); }
.island.answer { width: 3.6rem; }
.island.answer .pin { fill: var(--coral); stroke-width: 0.6; }

.glyph { width: 2.6rem; height: 2.6rem; }
.glyph.signpost { color: var(--coral); }
.glyph.bulb { color: #8a5cd6; }
.glyph.film { color: #2f6fd0; }
@media (prefers-color-scheme: dark) {
  .glyph.bulb { color: #b493f0; }
  .glyph.film { color: #79aefb; }
}

.statement { margin: 0; font-size: 1.32rem; line-height: 1.3; font-weight: 700; }
.ask { margin: 0; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
.hint { margin: 0; text-align: center; color: var(--muted); font-size: 0.92rem; }

.places { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 0.5rem; }
.places li {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--coral) 10%, transparent);
}
.places li::before { content: "→ "; color: var(--coral); }

.photo { margin: 0; position: relative; width: 100%; border-radius: 14px; overflow: hidden; }
.photo img {
  display: block;
  width: 100%;
  height: clamp(15rem, 55vw, 22rem);
  object-fit: cover;
  background: var(--border);
}
.photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}
.photo small { font-size: 0.68rem; letter-spacing: 0.14em; font-weight: 700; opacity: 0.85; }
.photo strong { font-size: 1.2rem; font-weight: 800; }

/* --------------------------------------------------------------------- guess */

.guess { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.guess input {
  font: inherit;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.guess input:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.guess .error { grid-column: 1 / -1; margin: 0; color: var(--coral); font-size: 0.88rem; }
.guess .error:empty { display: none; }

button.primary {
  font: inherit;
  font-weight: 700;
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { button.primary { color: #06231a; } }
button.primary:hover { filter: brightness(1.08); }

button.danger {
  font: inherit; font-weight: 600; margin-top: 1rem;
  padding: 0.7rem 1rem; border-radius: 12px;
  border: 1px solid var(--coral); background: transparent; color: var(--coral); cursor: pointer;
}

.text-button {
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem;
  font: inherit;
  font-weight: 700;
  border: 0;
  background: none;
  color: var(--green);
  cursor: pointer;
}

/* ------------------------------------------------------------------- guesses */

.guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.guess-row {
  display: grid;
  grid-template-columns: 1.2rem 4.2rem 1fr auto 1.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 14%, transparent);
}
.guess-row.correct { --tone: var(--green); }
.guess-row.hot { --tone: var(--gold); }
.guess-row.warm { --tone: var(--coral); }
.guess-row.cold { --tone: var(--muted); }

.guess-row .num { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.guess-row .warmth { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; color: var(--tone); }
.guess-row .county { font-weight: 700; }
.guess-row .km { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.guess-row .dir { text-align: center; font-size: 1.05rem; font-weight: 700; }

@media (max-width: 24rem) {
  .guess-row { grid-template-columns: 3.8rem 1fr auto 1.4rem; }
  .guess-row .num { display: none; }
}

/* -------------------------------------------------------------------- result */

.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.result h2 { margin: 0; font-size: 1.6rem; font-weight: 900; }
.result .irish { margin: 0; font-weight: 700; color: var(--green); }
.result .fact { margin: 0; color: var(--muted); font-size: 0.95rem; }

.score { margin: 0; padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.95rem; }
.score.won { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.score.lost { color: var(--muted); background: color-mix(in srgb, #8b968f 16%, transparent); }
.score span { color: var(--muted); }

.where {
  display: flex; align-items: center; gap: 0.85rem; width: 100%; text-align: left;
  padding: 0.7rem; border-radius: 14px;
  background: color-mix(in srgb, var(--green) 8%, transparent);
}
.where div { display: flex; flex-direction: column; }
.where span { font-size: 0.8rem; color: var(--muted); }

.result .primary { width: 100%; }
.shared { font-size: 0.85rem; color: var(--muted); min-height: 1rem; }
.streaks { display: flex; gap: 1.5rem; }
.countdown { margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.78rem; color: var(--muted); }

/* ------------------------------------------------------------------- dialogs */

.sheet {
  width: min(30rem, calc(100vw - 2rem));
  max-height: 85dvh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.sheet-head {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-body { padding: 1.25rem; overflow-y: auto; }
.sheet-body h3 { margin: 1.5rem 0 0.4rem; font-size: 1rem; }
.lede { margin-top: 0; font-weight: 600; }
.muted { color: var(--muted); }

.steps { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; }
.legend { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.92rem; }
.legend li { display: flex; align-items: center; gap: 0.55rem; }
.chip { width: 0.95rem; height: 0.95rem; border-radius: 4px; }
.chip.correct { background: var(--green-bright); }
.chip.hot { background: var(--gold); }
.chip.warm { background: var(--coral); }
.chip.cold { background: #8b968f; }

.scoring { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.scoring th { text-align: left; font-weight: 500; padding: 0.3rem 0; }
.scoring td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.scoring tr.muted th, .scoring tr.muted td { color: var(--muted); }

.stat-grid { display: flex; justify-content: space-around; gap: 0.5rem; margin-bottom: 1rem; }

.distribution { display: grid; gap: 0.35rem; }
.dist-row { display: flex; align-items: center; gap: 0.5rem; }
.dist-label { width: 1rem; font-size: 0.85rem; color: var(--muted); }
.dist-bar {
  background: var(--green); color: #fff; border-radius: 5px;
  padding: 0.15rem 0.45rem; font-size: 0.8rem; font-weight: 700; text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { .dist-bar { color: #06231a; } }

/* -------------------------------------------------------------------- footer */

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
.footer p { margin: 0.35rem 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================== added screens */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--green);
  color: #fff;
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

a.wordmark { text-decoration: none; color: inherit; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}

/* -------------------------------------------------------------- daily hero */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--hero-top), var(--hero-bottom));
  box-shadow: var(--shadow);
}
.hero-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.hero-number { font-variant-numeric: tabular-nums; }
.hero-title { font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.hero-format {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.3;
  white-space: nowrap;
}
.hero-meta { font-weight: 500; opacity: 0.7; }
.hero-go {
  grid-row: 2 / 4;
  grid-column: 2;
  align-self: end;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.18);
}
.hero:hover { filter: brightness(1.06); }

/* ------------------------------------------------------------- mode cards */

.section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.5rem 0 -0.25rem;
  font-size: 1.15rem;
}
.section small { font-size: 0.78rem; font-weight: 500; color: var(--muted); }

.mode {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.mode:hover { border-color: color-mix(in srgb, var(--green) 45%, transparent); }

.mode-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  font-size: 1.25rem;
  color: #fff;
  background: var(--green);
}
.mode-icon.green { background: linear-gradient(160deg, #16764a, #0b5133); }
.mode-icon.blue { background: linear-gradient(160deg, #2f6fd0, #1d4a92); }
.mode-icon.coral { background: linear-gradient(160deg, #e0563f, #b23524); }
.mode-icon.gold { background: linear-gradient(160deg, #b87500, #784800); }
.mode-icon.purple { background: linear-gradient(160deg, #7c56d6, #513494); }
.mode-icon.connacht { background: linear-gradient(160deg, #1f9d5c, #12703f); }
.mode-icon.leinster { background: linear-gradient(160deg, #2f6fd0, #1d4a92); }
.mode-icon.munster { background: linear-gradient(160deg, #e0563f, #b23524); }
.mode-icon.ulster { background: linear-gradient(160deg, #e8a423, #b97c0c); }

.mode-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.mode-title { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; }
.mode-sub { font-size: 0.85rem; color: var(--muted); }
.chev { margin-left: auto; color: var(--muted); font-size: 1.4rem; line-height: 1; }

.badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 15%, transparent);
}

.stat-row {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
  padding: 1rem;
}
.stat-row .stat { flex: 1 1 0; min-width: 0; text-align: center; }
.stat-row .stat span { line-height: 1.2; }
.stat-row.inner { padding: 0; margin-bottom: 1rem; }

/* -------------------------------------------------------- page headers, nav */

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green);
  text-decoration: none;
  min-height: 2.75rem;
  padding-right: 0.5rem;
}
.back:hover { text-decoration: underline; }

.page-head h2 { margin: 0 0 0.2rem; font-size: 1.6rem; font-weight: 900; }
.page-head p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.empty-note { color: var(--muted); text-align: center; padding: 2rem 0; }

.text-link { font-size: 0.9rem; font-weight: 600; color: var(--green); }

/* ----------------------------------------------------------------- archive */

.archive { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.archive-row:hover { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.archive-when { display: flex; flex-direction: column; }
.archive-when small { color: var(--muted); font-size: 0.78rem; }
.archive-meta { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.78rem; }
.tick { font-weight: 800; }
.tick.won { color: var(--green); }
.tick.lost { color: var(--muted); }

/* ------------------------------------------------------------ county picker */

.picker { display: flex; flex-direction: column; gap: 0.6rem; }
.picker-input {
  font: inherit;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.province-filters {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.2rem;
  scrollbar-width: none;
}
.province-filters::-webkit-scrollbar { display: none; }
.province-filter {
  flex: none;
  min-height: 2.75rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.province-filter[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .province-filter[aria-pressed="true"] { color: #06231a; }
  .skip { color: #06231a; }
}

.options {
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  max-height: 15rem;
  overflow-y: auto;
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}
.option:hover, .option.active { background: color-mix(in srgb, var(--green) 13%, transparent); }
.option-text { display: flex; flex-direction: column; line-height: 1.2; }
.option-text small { color: var(--muted); font-size: 0.75rem; }
.options .empty { padding: 0.8rem; color: var(--muted); }

.dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; flex: none; }
.dot.connacht { background: #1f9d5c; }
.dot.leinster { background: #2f6fd0; }
.dot.munster { background: #e0563f; }
.dot.ulster { background: #e8a423; }

/* ----------------------------------------------------------------- summary */

.summary { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.summary .trophy { margin: 0; font-size: 3rem; line-height: 1; }
.summary h2 { margin: 0; font-size: 1.7rem; font-weight: 900; }
.big-score {
  margin: 0;
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.big-score small { display: block; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.summary .primary, .result .primary { width: 100%; }

.share { display: flex; flex-direction: column; gap: 0.35rem; width: 100%; }

.bests { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.bests li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.best-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- larger screens */

@media (min-width: 46rem) {
  :root { --max: 40rem; }
  .hero-title { font-size: 2rem; }
}

@media (max-width: 25rem) {
  .today { display: none; }
  .section { align-items: flex-start; flex-direction: column; }
  .section small { margin-left: 0; }
  .hero-title { font-size: 1.5rem; }
  .mode { gap: 0.7rem; padding-inline: 0.8rem; }
}

.icon { width: 1.35rem; height: 1.35rem; }
.glyph-text { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.summary .trophy .icon { width: 3rem; height: 3rem; color: var(--gold); stroke-width: 1.4; }

.source-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.55rem; }
.source-list li {
  display: grid;
  gap: 0.12rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.source-list strong { font-size: 0.88rem; }
.source-list a, .credits a { color: var(--green); font-size: 0.8rem; justify-self: start; }
.licence-note { margin: 0.8rem 0 1.25rem; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.credits { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.credits li { display: grid; gap: 0.1rem; font-size: 0.85rem; }
.credits strong { font-size: 0.95rem; }
.credits small { color: var(--muted); }

/* The clue-style label reads as a labelled value, not a stray word. */
.progress-row .format { color: var(--muted); }
.progress-row .format strong { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------ first run */

.welcome { max-width: 27rem; }
.welcome .sheet-body { padding: 1.75rem 1.5rem 1.5rem; }

.welcome-mark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin: 0 0 1rem;
}
.welcome-mark span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--green);
}
.welcome-mark strong { font-size: 1.6rem; font-weight: 900; }

.welcome h2 { margin: 0 0 0.35rem; font-size: 1.9rem; font-weight: 900; line-height: 1.1; }
.welcome .lede { margin: 0 0 1.25rem; font-size: 1.05rem; color: var(--muted); font-weight: 500; }

.welcome-points { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.85rem; }
.welcome-points li {
  font-size: 0.95rem;
  color: var(--muted);
  padding-left: 1.5rem;
  position: relative;
}
.welcome-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--green);
}
.welcome-points strong { color: var(--ink); font-weight: 700; }

.welcome-actions { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.welcome-actions .primary { width: 100%; }

/* ------------------------------------------------- about / indexable content */

.about {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  padding: 2rem 1rem 0;
}
.about-inner { max-width: var(--max); margin: 0 auto; }
.about h2 { margin: 0 0 0.75rem; font-size: 1.35rem; font-weight: 800; }
.about h3 { margin: 2rem 0 0.75rem; font-size: 1.05rem; font-weight: 700; }
.about h4 { margin: 0 0 0.2rem; font-size: 0.85rem; font-weight: 700; color: var(--green); }
.about p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

.county-groups { display: grid; gap: 1rem; }
.county-group p { margin: 0; font-size: 0.85rem; }

.faq {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-weight: 700; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0.6rem 0 0.2rem; }

@media (min-width: 40rem) {
  .county-groups { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

/* ------------------------------------------------- static county reference pages */

.county-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}
.county-page h1 { margin: 0 0 0.25rem; font-size: 2rem; font-weight: 900; line-height: 1.1; }
.county-page h2 { margin: 2rem 0 0.6rem; font-size: 1.15rem; font-weight: 800; }
.county-page p { line-height: 1.6; color: var(--muted); }
.county-page a { color: var(--green); }

.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--green); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.county-sub { margin: 0 0 1.25rem; font-weight: 600; color: var(--green); }
.county-fact { font-size: 1.05rem; color: var(--ink); }

.county-figure {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.county-figure svg { width: min(100%, 15rem); aspect-ratio: 1; }
.county-figure path { fill: var(--ink); }
.county-figure figcaption { margin-top: 0.75rem; font-size: 0.8rem; color: var(--muted); }

.county-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.county-facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.county-facts dd { margin: 0.15rem 0 0; font-weight: 700; }

.cta {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 14px;
  background: var(--green);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) { .cta { color: #06231a !important; } }
.cta:hover { filter: brightness(1.08); }

.county-nav p { font-size: 0.85rem; line-height: 2; }

.county-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.4rem; }
.county-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.county-list a:hover { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.county-list span { color: var(--muted); font-size: 0.85rem; }
.count { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
