:root {
  --bg: #f1e6d2;
  --bg-elevated: #fff8ea;
  --bg-inset: #e8dcc6;
  --fg: #1c1710;
  --fg-muted: #5a5248;
  --fg-subtle: #857b6e;
  --border: color-mix(in oklab, var(--fg) 12%, transparent);
  --border-strong: color-mix(in oklab, var(--fg) 22%, transparent);
  --felt: #1f4a38;
  --felt-deep: #163528;
  --felt-fg: #f4ead8;
  --tile: #f4e2b4;
  --tile-edge: #c4a574;
  --tile-ink: #1c1710;
  --accent: var(--felt);
  --accent-fg: var(--felt-fg);
  --score: #1f4a38;
  --focus: #2a5c48;
  --bingo: #6b3e22;
  --danger: #7a2e24;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.78rem;
  --text-sm: 0.92rem;
  --text-base: 1.0625rem;
  --text-lg: 1.2rem;
  --text-xl: clamp(1.45rem, 1.15rem + 1.1vw, 2rem);
  --text-2xl: clamp(1.9rem, 1.25rem + 2vw, 3.4rem);
  --leading-tight: 1.08;
  --leading-snug: 1.28;
  --leading-normal: 1.55;
  --tracking-display: -0.03em;
  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 0 color-mix(in oklab, var(--fg) 7%, transparent), 0 22px 50px -30px color-mix(in oklab, var(--fg) 40%, transparent);
  --wrap: min(920px, calc(100% - 32px));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background:
    radial-gradient(1200px 480px at 50% -80px, color-mix(in oklab, #fff 45%, transparent), transparent 60%),
    var(--bg);
  min-height: 100vh;
  position: relative;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}
body > * { position: relative; z-index: 2; }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.wrap { width: var(--wrap); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--bg) 82%, white);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--tile);
  color: var(--tile-ink);
  border: 1px solid var(--tile-edge);
  box-shadow: 0 1px 0 #fff8, inset 0 -2px 0 color-mix(in oklab, var(--tile-edge) 45%, transparent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  flex: none;
  position: relative;
}
.mark small {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 0.48rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--felt);
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}
.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { border-bottom-color: var(--felt); }
.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 600;
  font-size: var(--text-sm);
}
.hero { padding: var(--space-7) 0 var(--space-5); }
.kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--felt);
  margin: 0 0 var(--space-3);
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  margin: 0;
  text-wrap: pretty;
}
h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); max-width: 18ch; }
h2 { font-size: var(--text-xl); line-height: var(--leading-snug); }
h3 { font-size: 1.15rem; }
.lede {
  margin: var(--space-4) 0 0;
  color: var(--fg-muted);
  max-width: 52ch;
  font-size: 1.12rem;
  text-wrap: pretty;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: var(--space-5);
  color: var(--fg-subtle);
  font-size: var(--text-sm);
  font-weight: 600;
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--felt);
}
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}
.field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.input-row {
  display: flex;
  gap: var(--space-3);
}
.input-row input[type="text"] {
  flex: 1;
  min-height: 54px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0 16px;
  background: #fff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 650;
  font-size: 1.08rem;
  font-family: var(--font-display);
}
.primary {
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: var(--felt);
  color: var(--felt-fg);
  font-weight: 650;
  transition: transform var(--motion-quick) var(--ease), opacity var(--motion-quick) var(--ease);
  white-space: nowrap;
}
.primary:hover { background: var(--felt-deep); }
.primary:active { transform: scale(0.98); }
.primary:disabled { opacity: 0.55; }
.hint {
  margin: var(--space-3) 0 0;
  color: var(--fg-subtle);
  font-size: var(--text-sm);
}
.hint code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: color-mix(in oklab, var(--fg) 6%, transparent);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-top: var(--space-3);
}
.tile {
  min-width: 40px;
  height: 46px;
  padding: 0 8px 8px;
  display: grid;
  place-items: center;
  background: var(--tile);
  border: 1px solid var(--tile-edge);
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 0 1px 0 #fff8, inset 0 -3px 0 color-mix(in oklab, var(--tile-edge) 40%, transparent);
  position: relative;
}
.tile .val {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 0.58rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--felt);
  line-height: 1;
}
.tile.wild {
  background: var(--bg-inset);
  color: var(--fg-muted);
}
.modes, .examples, .sorts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-4);
}
.chip, .mode {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.chip:hover, .mode:hover { color: var(--fg); border-color: var(--border-strong); }
.mode[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.filters label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.filters input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: #fff;
}
.wordle-row {
  display: flex;
  gap: 8px;
  margin-top: var(--space-3);
}
.wordle-row input {
  width: 52px;
  height: 56px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.25rem;
  font-family: var(--font-display);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
}
.wordle-row input.filled {
  background: var(--felt);
  color: var(--felt-fg);
  border-color: var(--felt);
}
.status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
  flex-wrap: wrap;
}
.status h2 { font-size: 1.4rem; }
#resultMeta { color: var(--fg-subtle); font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; letter-spacing: 0; }
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ghost {
  background: none;
  border: 0;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 650;
  padding: 0;
  min-height: 36px;
}
.ghost:hover { color: var(--fg); }
.group { margin-bottom: var(--space-6); }
.group-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.word {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  font-weight: 650;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.word:hover { border-color: var(--felt); }
.word.bingo {
  border-color: color-mix(in oklab, var(--bingo) 40%, var(--border));
  background: color-mix(in oklab, var(--bingo) 7%, var(--bg-elevated));
}
.word b { font-weight: 650; overflow-wrap: anywhere; }
.pts {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--score);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-body);
}
.empty {
  text-align: center;
  padding: var(--space-8) 0;
  color: var(--fg-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--bg-elevated) 50%, transparent);
}
.prose { padding: var(--space-7) 0 var(--space-6); }
.prose p, .prose li { color: var(--fg-muted); max-width: 65ch; text-wrap: pretty; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--felt-deep); }
.faq details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 0; }
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  background: color-mix(in oklab, var(--bg-inset) 55%, var(--bg));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
  padding: var(--space-7) 0 var(--space-6);
}
.footer-grid h2 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.footer-grid a { display: block; text-decoration: none; padding: 5px 0; }
.footer-grid a:hover { color: var(--fg); }
.legal-line {
  border-top: 1px solid var(--border);
  padding: 16px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.page { padding: var(--space-7) 0 var(--space-8); }
.page h1 { max-width: none; }
.page p, .page li { color: var(--fg-muted); max-width: 65ch; }
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: var(--space-5) 0;
}
.word-cloud a, .word-cloud span {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--bg-elevated);
  min-width: 44px;
  text-align: center;
}
.word-cloud a:hover { border-color: var(--felt); color: var(--felt-deep); }
.related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: var(--space-5) 0 var(--space-7);
}
.card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color var(--motion-quick) var(--ease), transform var(--motion-quick) var(--ease);
}
.card:hover { border-color: var(--felt); transform: translateY(-1px); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: var(--text-sm); color: var(--fg-muted); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: var(--space-5) 0;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-elevated);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--fg-subtle); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.crumbs {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin: 0 0 var(--space-4);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-8) 0;
}
.notfound h1 { max-width: none; margin-inline: auto; }
.notfound .lede { margin-inline: auto; }
@media (max-width: 720px) {
  .input-row, .header-inner { flex-direction: column; align-items: stretch; }
  .filters, .related, .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
  }
  .nav.is-open { display: flex; flex-direction: column; }
  .nav a {
    min-height: 44px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    width: 100%;
  }
  .nav a[aria-current="page"] { border-bottom-color: var(--border); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; }
  .header-inner { flex-wrap: wrap; }
  .brand { flex: 1; }
  .brand-name span { display: none; }
  h1 { max-width: none; font-size: clamp(1.85rem, 8.4vw, 2.5rem); }
  .wordle-row input { width: 44px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto; }
}
.consent {
  position: fixed;
  z-index: 80;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  padding: 0.95rem 1.1rem;
  background: #f7f1e4;
  color: #1c1710;
  border: 1px solid #d9cbb3;
  box-shadow: 0 16px 40px rgba(28, 23, 16, 0.18);
}
.consent p { margin: 0; max-width: 52ch; font-size: 0.92rem; line-height: 1.45; }
.consent a { color: #1f4a38; font-weight: 600; }
.consent-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.consent button {
  font: inherit;
  font-weight: 700;
  border: 0;
  background: #1f4a38;
  color: #f7f1e4;
  padding: 0.55rem 1rem;
  min-height: 44px;
  cursor: pointer;
}
.consent button.ghost {
  background: transparent;
  color: #1c1710;
  border: 1px solid #cbbda6;
}
