/* Byron — shared styles, transcribed from the app's "Classical" design system
   (ios/StepWordsForage/Views/Theme.swift): warm paper, ink text, a single gilt
   accent, Cormorant Garamond for display type and Lora for body copy and
   letters. Deliberately small: a handful of pages, no build step, no deps. */

:root {
  --paper:        #f3f2f2;
  --paper-deep:   #eae9e9;
  --ink:          #201f1d;
  --ink-soft:     #7d7979;
  --ink-faint:    #9b9797;
  --rule:         rgba(32, 31, 29, 0.16);
  --rule-strong:  rgba(32, 31, 29, 0.28);
  --card:         #f8f4f4;
  --accent:       #b68235;
  --accent-strong:#7d5411;
  --accent-soft:  #fff3e4;
  --tile-border:      #bab6b6;
  --tile-top:          #f8f4f4;
  --tile-bottom:       #eae7e7;
  --tile-gilt-border:  #e1ad66;
  --tile-gilt-top:     #fff3e4;
  --tile-gilt-bottom:  #eae7e7;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
}

/* The site is a fixed light "paper" theme, same as the app — there is no dark
   mode in the classical design system to switch to. */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--font-body);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 44rem; margin: 0 auto; }

/* Header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 2.25rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-links a:hover { color: var(--accent-strong); }

.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Hero */

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.hero-copy { flex: 1 1 20rem; min-width: 0; }

.hero-portrait {
  flex: 0 0 auto;
  width: 8.5rem;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(32, 31, 29, 0.18));
}

@media (max-width: 30rem) {
  .hero { flex-direction: column-reverse; text-align: center; gap: 1rem; }
  .hero-portrait { width: 7rem; }
}

/* Meet Byron — a big, self-contained band with the live Instagram grid, sitting
   between the download buttons and the game's letter tiles. */

.byron-hero {
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.byron-hero .kicker { display: block; }
.byron-hero h2 { margin-top: 0; }
.byron-hero .lead { max-width: 32rem; margin: 0 auto; }

.byron-hero-photo {
  display: block;
  width: 12rem;
  height: 12rem;
  object-fit: cover;
  border-radius: 50%;
  margin: 1.25rem auto;
  border: 1px solid var(--rule);
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 30rem;
  margin: 1.75rem auto;
}

.ig-tile {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.ig-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.15s ease;
}

.ig-tile:hover img { transform: scale(1.05); }

@media (max-width: 30rem) {
  .byron-hero { padding: 2rem 1.25rem; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
}

/* Type */

.kicker {
  display: inline-block;
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.75rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 2.75rem 0 0.85rem;
  letter-spacing: -0.005em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 1.75rem 0 0.4rem;
}

p, li { color: var(--ink); }
.lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); margin-top: 0; }
.meta { color: var(--ink-soft); font-size: 0.9rem; }
ul { padding-left: 1.25rem; }
li { margin: 0.4rem 0; }
a { color: var(--accent-strong); }
a:hover { color: var(--accent); }

/* Letter tiles — the game's engraved-tile face, in CSS. Rarity tiers follow
   the same Scrabble values as Rarity.of() in Theme.swift. */

.tile-row { display: flex; gap: 0.5rem; margin: 2rem 0 2.25rem; }

.tile {
  width: 3.1rem;
  height: 3.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 6px;
  background: linear-gradient(to bottom, var(--tile-top), var(--tile-bottom));
  border: 1px solid var(--tile-border);
  box-shadow: 0 1px 1px rgba(32, 31, 29, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tile.gilt {
  background: linear-gradient(to bottom, var(--tile-gilt-top), var(--tile-gilt-bottom));
  border-color: var(--tile-gilt-border);
}

.tile b {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
}

.tile em {
  position: absolute;
  right: 0.28rem;
  bottom: 0.16rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--ink-soft);
}

@media (max-width: 30rem) {
  .tile-row { justify-content: center; }
}

/* Callout used for the plain-English summary */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.35rem 1.6rem;
  margin: 1.5rem 0;
}

.card h2 { margin-top: 0; }
.card ul { margin-bottom: 0; }

/* How-it-works grid */

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.steps li {
  margin: 0;
  padding: 1.15rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.steps b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

@media (max-width: 30rem) {
  .steps { grid-template-columns: 1fr; }
}

/* Table of what leaves the device */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

th { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

.scroller { overflow-x: auto; }

/* Download buttons — prominent app store links */

.downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 1.75rem; }

.downloads a {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  background: var(--accent-strong);
  transition: background 0.15s ease;
  flex: 1 1 auto;
  min-width: 12rem;
  text-align: center;
}

.downloads a:hover { background: var(--accent); }

.downloads a.primary { background: var(--accent-strong); }

@media (max-width: 30rem) {
  .downloads { flex-direction: column; gap: 0.6rem; }
  .downloads a { min-width: auto; }
}

/* Buttons / links row — the app's hairline-outline button, filled on hover */

.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0; }

.links a {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  color: var(--accent-strong);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--accent);
  background: transparent;
  transition: background 0.15s ease;
}

.links a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.links a.primary { background: var(--accent-soft); }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

footer a { color: var(--ink-soft); }

/* Deletion-request form (delete-data.html) — scoped under .form so it stays
   clear of the admin console, which styles the bare elements itself. */

.form { margin: 1.75rem 0 2rem; }

.form label {
  display: block;
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}

.form label .opt {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
}

.form textarea { resize: vertical; }

.form input::placeholder,
.form textarea::placeholder { color: var(--ink-faint); }

.form input:focus,
.form select:focus,
.form textarea:focus,
.form button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.form-error {
  margin: 1.25rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: #f7e9e7;
  color: #a8352b;
  font-size: 0.9rem;
}

.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.form button {
  padding: 0.65rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.form button.ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule-strong); }
.form button:hover { background: var(--accent-soft); color: var(--accent-strong); }

.composed {
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* All-time leaderboard (leaderboard.html). Sits above the [hidden] utility
   below on purpose: .pager sets display:flex, and same-specificity rules are
   decided by source order. */

.board-status { margin: 1.75rem 0 0.5rem; }

.board { font-size: 1rem; margin: 0 0 0.25rem; }

.board td {
  vertical-align: middle;
  padding: 0.65rem 0.75rem 0.65rem 0;
}

.board th.num, .board td.num { text-align: right; }
.board th:last-child, .board td:last-child { padding-right: 0; }

.board .col-rank { width: 3.5rem; }

/* Lora, not Cormorant: the display face sets old-style figures, so "11" and
   "12" come out at mismatched heights in a column that has to line up. Same
   reason the app's tiles use the body face for their letters. */
.board td.col-rank {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums tabular-nums;
}

/* Top three wear the engraved gilt tile from the game's rare letters. */
.board .rank-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent-strong);
  background: linear-gradient(to bottom, var(--tile-gilt-top), var(--tile-gilt-bottom));
  border: 1px solid var(--tile-gilt-border);
  box-shadow: 0 1px 1px rgba(32, 31, 29, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Display names run to 40 characters and needn't contain a space. */
.board td.player { overflow-wrap: anywhere; }

.board td.num { color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.board td.points { color: var(--ink); font-weight: 600; }

.board-note { margin-top: 2.25rem; line-height: 1.6; }

/* Pager */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
}

.pager .page {
  display: inline-block;
  min-width: 2.4rem;
  padding: 0.4rem 0.65rem;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  transition: background 0.15s ease;
}

.pager a.page:hover { background: var(--accent-soft); }

.pager .page.current {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pager .page.disabled { color: var(--ink-faint); border-color: transparent; }

.pager .page.gap {
  min-width: 1rem;
  padding: 0.4rem 0.15rem;
  border-color: transparent;
  color: var(--ink-faint);
}

.pager a.page:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Retry, offered inline in the status line when a fetch fails. */

.retry {
  margin-left: 0.15rem;
  padding: 0.2rem 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 30rem) {
  .board { font-size: 0.95rem; }
  .board td { padding-right: 0.5rem; }
  .pager .page { min-width: 2.1rem; padding: 0.35rem 0.5rem; }
}

/* Kept last: an element that sets a display of its own would otherwise outrank
   the browser's default for [hidden]. */
/* Kept last: an element that sets a display of its own would otherwise outrank
   the browser's default for [hidden]. */
[hidden] { display: none; }

/* The invite code on invite.html. Big, spaced and selectable, because the whole
   fallback path is someone reading it off this screen and typing it into a phone —
   the letter-spacing is there to stop a run of six characters reading as a word. */
.invite-code {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.35rem;
  color: var(--accent-strong);
  margin: 0.25rem 0 0.75rem;
  user-select: all;
}
