/* Shared styles for the static pages (multiplayer-wordle, word-lists, about, privacy). */

@font-face {
  font-family: 'Fredoka Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(/fonts/fredoka-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(/fonts/nunito-latin-wght-normal.woff2) format('woff2-variations');
}

/* Same "bubble" palette as the game (client/tailwind.config.js). */
:root {
  --bg: #fdf5ee;
  --surface: #ffffff;
  --border: #f1e7dd;
  --text: #221a2b;
  --dim: #6e6178; /* darker than the app's #897c92 so body copy meets 4.5:1 on cream */
  --absent: #dcd3e0;
  --absent-text: #221a2b;
  --green: #22c55e;
  --amber: #f59e0b;
  --pink: #fb6f84;
  --blue: #5b9dff;
  --on-accent: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121c;
    --surface: #211b2c;
    --border: #352c44;
    --text: #f8f4ff;
    --dim: #968aa8;
    --absent: #3a3146;
    --absent-text: #f8f4ff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito Variable', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, h3, .brand { font-family: 'Fredoka Variable', ui-sans-serif, system-ui, sans-serif; line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 700; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.35rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
strong { font-weight: 800; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; border-top: 1px solid var(--border); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.brand span { color: var(--green); }
.top nav a { font-weight: 700; color: var(--dim); text-decoration: none; margin-left: 18px; padding: 10px 0; display: inline-block; white-space: nowrap; }
@media (max-width: 480px) { .top nav a + a { display: none; } }
.top nav a:hover { color: var(--text); }

.hero { padding: 36px 0 56px; border-top: 0; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr 1fr; } }
.lede { font-size: 1.15rem; color: var(--dim); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
/* Dark text on pink: white on #fb6f84 is only ~2.6:1 contrast. */
.btn-primary { background: var(--pink); color: #221a2b; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.note { font-size: 0.9rem; color: var(--dim); margin-top: 0.75rem; }

/* Illustration: two boards mid-race on the same word. */
.arena { display: flex; gap: clamp(10px, 3vw, 16px); justify-content: center; }
.board { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(10px, 2.5vw, 14px); min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: clamp(0.7rem, 2.6vw, 0.85rem); margin-bottom: 10px; gap: 8px; white-space: nowrap; }
.board-head .pts { color: var(--dim); }
.row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 5px; }
.t {
  width: clamp(22px, 5.6vw, 38px); aspect-ratio: 1; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka Variable', sans-serif; font-weight: 700; font-size: clamp(0.85rem, 2.6vw, 1.15rem);
  border: 2px solid var(--border);
}
.t.g { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.t.y { background: var(--amber); border-color: var(--amber); color: var(--on-accent); }
.t.x { background: var(--absent); border-color: var(--absent); color: var(--absent-text); }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { ol.steps { grid-template-columns: 1fr 1fr; } }
ol.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 20px 20px 18px 66px; position: relative; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-family: 'Fredoka Variable', sans-serif; font-weight: 700;
}
ol.steps p { margin: 0; color: var(--dim); }

.cards { display: grid; gap: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px 20px; }
.card p { margin: 0; color: var(--dim); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.tag.buff { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.tag.attack { background: color-mix(in srgb, var(--pink) 18%, transparent); color: var(--pink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 800; }
td.num, th.num { text-align: right; white-space: nowrap; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style-position: outside; }
details p { color: var(--dim); }

.final { text-align: center; }
.final .cta-row { justify-content: center; }
footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--dim); font-size: 0.95rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { font-weight: 700; padding: 8px 0; display: inline-block; }

/* Long-form text pages (about, privacy). */
.prose { max-width: 720px; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .updated { color: var(--dim); font-weight: 700; }
.page-head { padding: 28px 0 8px; }
.disclaimer { font-size: 0.85rem; color: var(--dim); margin-top: 10px; }
.prose .card h3 { margin-top: 0; }

/* Starting words page (word-lists). */
.word { font-family: 'Fredoka Variable', ui-sans-serif, system-ui, sans-serif; font-weight: 700; letter-spacing: 0.08em; }
.why { color: var(--dim); font-size: 0.85rem; line-height: 1.4; }
tr.has-why td { border-bottom: 0; padding-bottom: 2px; }
tr.why-row td { padding-top: 0; }
.quick { margin: 0.5rem 0 1rem; }
.quick p { color: var(--text); margin: 0 0 0.4rem; }
.quick p:last-child { margin-bottom: 0; }
.bars { list-style: none; padding: 0 !important; margin: 0 0 1rem; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 1.4rem 1fr 3rem; align-items: center; gap: 12px; margin: 0; font-weight: 700; }
.bars li > span:last-child { text-align: right; color: var(--dim); }
.bar-track { height: 12px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.tool label { display: block; font-weight: 800; margin-bottom: 8px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tool input {
  font: inherit; font-family: 'Fredoka Variable', ui-sans-serif, system-ui, sans-serif; font-weight: 700;
  font-size: 1.3rem; letter-spacing: 0.15em; text-transform: uppercase;
  min-height: 48px; width: 8.5em; max-width: 100%; padding: 6px 18px; border-radius: 999px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
}
.tool input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tool button { border: 0; cursor: pointer; font-family: inherit; }
.tool-result { margin-top: 1rem; font-weight: 700; min-height: 1.6em; }
@media (max-width: 520px) {
  th, td { padding: 10px 10px; }
  .wl-top th.num { white-space: normal; }
}
