:root {
  --ink: #18201d;
  --muted: #59635f;
  --paper: #fffdf8;
  --cream: #f6f0e4;
  --coral: #ef6b56;
  --coral-dark: #c84a38;
  --teal: #087f78;
  --yellow: #f2c84b;
  --line: #d9d3c7;
  --shadow: 0 14px 34px rgba(48, 38, 22, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(242, 200, 75, .2), transparent 28rem),
    radial-gradient(circle at 96% 12%, rgba(8, 127, 120, .1), transparent 24rem),
    var(--paper);
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--coral-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.skip-link { position: absolute; left: -999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 20; background: white; padding: 10px 14px; border-radius: 8px; }

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark { color: var(--ink); font-weight: 900; font-size: 21px; text-decoration: none; letter-spacing: -.03em; }
.nav { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: flex-end; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); }

main { overflow: hidden; }
.container { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(800px, calc(100% - 32px)); margin-inline: auto; }
.hero { padding: 72px 0 48px; text-align: center; }
.eyebrow { color: var(--coral-dark); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 900; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { margin: 12px auto 18px; max-width: 900px; font-size: clamp(42px, 8vw, 76px); }
h2 { margin: 0 0 20px; font-size: clamp(30px, 5vw, 46px); }
h3 { margin: 0 0 8px; font-size: 23px; }
.lede { max-width: 700px; margin: 0 auto; color: var(--muted); font-size: clamp(18px, 2.5vw, 22px); }
.section { padding: 70px 0; }
.section.tint { background: var(--cream); border-block: 1px solid rgba(217, 211, 199, .75); }
.section-heading { max-width: 690px; margin-bottom: 34px; }
.section-heading p { color: var(--muted); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; text-align: left; }
.card { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 260px; }
.card:nth-child(2) { transform: translateY(18px); }
.card-label { color: var(--coral-dark); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.card h2 { font-size: 29px; margin: 18px 0 12px; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card p { color: var(--muted); margin: 0 0 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border: 2px solid var(--ink); border-radius: 999px; padding: 11px 23px; background: var(--yellow); color: var(--ink); font-weight: 900; text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.button:hover { color: var(--ink); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.card .button { margin-top: auto; align-self: flex-start; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: steps; }
.step { position: relative; padding: 22px 0 0 54px; }
.step::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 16px; width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: white; font-weight: 900; }
.game-intros { display: grid; gap: 18px; }
.game-intro { padding: 24px 0; border-top: 1px solid var(--line); }
.game-intro p { margin-bottom: 0; color: var(--muted); }

.generator-shell { padding: 20px 0 70px; }
.generator { background: white; border: 2px solid var(--ink); border-radius: 30px; padding: clamp(20px, 5vw, 46px); box-shadow: 10px 10px 0 var(--teal); }
.filter-block + .filter-block { margin-top: 23px; }
.filter-label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 900; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 17px; background: var(--paper); color: var(--muted); cursor: pointer; text-transform: capitalize; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.is-active { background: var(--teal); border-color: var(--teal); color: white; font-weight: 800; }
.result-card { margin-top: 28px; min-height: 180px; border-radius: 20px; padding: 26px; background: var(--cream); display: grid; place-items: center; text-align: center; }
.result { margin: 0; max-width: 760px; overflow-wrap: anywhere; font-size: clamp(26px, 5vw, 45px); font-weight: 900; line-height: 1.18; letter-spacing: -.025em; }
.result.is-placeholder { color: var(--muted); font-size: clamp(20px, 3vw, 28px); font-weight: 650; }
.tool-actions { display: flex; gap: 12px; margin-top: 18px; align-items: center; }
.generate { flex: 1; min-height: 58px; border: 2px solid var(--ink); border-radius: 15px; background: var(--coral); color: white; font-size: 19px; font-weight: 900; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.generate:hover { background: var(--coral-dark); }
.copy { min-width: 106px; min-height: 58px; border: 2px solid var(--ink); border-radius: 15px; background: white; color: var(--ink); font-weight: 900; cursor: pointer; }
.copy:disabled { opacity: .45; cursor: not-allowed; }
.pool-count { margin: 14px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

.play-steps { padding-left: 22px; }
.play-steps li { padding: 7px 0 7px 8px; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.category-note { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: white; }
.category-note strong { display: block; text-transform: capitalize; margin-bottom: 3px; }
.category-note span { color: var(--muted); }
.library-group { padding: 28px 0; border-top: 1px solid var(--line); }
.library-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.library-title h3 { text-transform: capitalize; }
.library-title span { color: var(--muted); font-size: 14px; }
.word-list { margin: 0; padding: 0; list-style: none; columns: 3 220px; column-gap: 30px; }
.word-list li { break-inside: avoid; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
.difficulty { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.sub-library-title { margin: 45px 0 22px; color: var(--teal); }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.faq-list summary { cursor: pointer; font-weight: 850; }
.faq-list p { color: var(--muted); margin: 12px 0 0; }

.site-footer { background: var(--ink); color: #f7f1e6; padding: 46px 0; }
.footer-inner { width: min(1040px, calc(100% - 32px)); margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; }
.footer-copy p { margin: 0 0 5px; }
.copyright { color: #bfc7c3; font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 18px; }
.footer-nav a { color: white; }

@media (max-width: 760px) {
  .site-header { padding: 17px 0; align-items: flex-start; }
  .nav { gap: 6px 12px; }
  .hero { padding-top: 48px; }
  .cards, .steps, .category-grid { grid-template-columns: 1fr; }
  .card:nth-child(2) { transform: none; }
  .card { min-height: 0; }
  .section { padding: 52px 0; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .site-header { width: min(100% - 24px, 1040px); flex-direction: column; gap: 8px; }
  .nav { justify-content: flex-start; }
  .container, .narrow { width: min(100% - 24px, 1040px); }
  h1 { font-size: 40px; }
  .generator { padding: 18px; box-shadow: 6px 6px 0 var(--teal); border-radius: 22px; }
  .tool-actions { align-items: stretch; }
  .generate { min-width: 0; }
  .copy { min-width: 86px; }
  .word-list { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
