:root {
  --bg: #f4fbf9;
  --surface: rgba(255,255,255,.82);
  --surface-solid: #ffffff;
  --surface-2: #eaf7f3;
  --ink: #123047;
  --muted: #657785;
  --teal: #087d82;
  --teal-dark: #075e67;
  --green: #18a95b;
  --green-dark: #078741;
  --mint: #e7f8f1;
  --sky: #dff4ff;
  --gold: #ffb43b;
  --coral: #ff826b;
  --purple: #9c78ec;
  --border: rgba(18,48,71,.10);
  --shadow: 0 22px 70px rgba(7,94,103,.12);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(96,197,241,.18), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(24,169,91,.12), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 9999;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(18px);
  background: rgba(244,251,249,.78);
  border-bottom: 1px solid var(--border);
}
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 900; letter-spacing: -.02em; }
.brand-mark {
  width: 42px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px;
  color: #fff; font-weight: 950; font-size: 14px; letter-spacing: -.02em;
  background: linear-gradient(145deg, #13a9c4, #087c82 58%, #18a95b);
  box-shadow: 0 10px 28px rgba(8,125,130,.24);
}
.brand-mark span { transform: rotate(-5deg); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 800; padding: 10px 12px; border-radius: 12px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--teal-dark); background: rgba(8,125,130,.08); }
.theme-toggle, .menu-toggle {
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--ink);
  width: 42px; height: 42px; border-radius: 14px; cursor: pointer; font-size: 18px;
}
.menu-toggle { display: none; }

.hero { padding: 92px 0 72px; position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--green); border-radius: 99px; }
h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(3rem, 7vw, 6.4rem); max-width: 9ch; margin-top: 14px; font-weight: 950; }
h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); font-weight: 930; }
h3 { font-size: 1.25rem; font-weight: 900; }
.lede { margin: 24px 0 0; max-width: 62ch; font-size: clamp(1.04rem, 2vw, 1.22rem); color: var(--muted); font-weight: 600; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 52px; padding: 0 20px; border-radius: 16px; text-decoration: none; font-weight: 900; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 14px 30px rgba(24,169,91,.22); }
.btn-primary:hover { color: #fff; background: var(--green-dark); }
.btn-secondary { background: var(--surface-solid); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { color: var(--teal-dark); }
.btn-disabled { opacity: .72; cursor: default; }
.microcopy { color: var(--muted); font-size: .88rem; margin-top: 12px; }

.puzzle-card {
  position: relative; border: 1px solid rgba(255,255,255,.8); border-radius: 34px; padding: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(231,248,241,.75));
  box-shadow: var(--shadow); transform: rotate(1.2deg);
}
.puzzle-card::before { content: ""; position: absolute; inset: -28px; z-index: -1; background: radial-gradient(circle, rgba(8,125,130,.14), transparent 68%); filter: blur(12px); }
.puzzle-shell { background: linear-gradient(155deg, #13a9c4, #087c82 55%, #4fa57a); border-radius: 24px; padding: 22px; color: #fff; }
.puzzle-shell .mini-logo { font-weight: 950; font-size: 1.5rem; text-align: center; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.puzzle-shell .mini-sub { text-align: center; opacity: .88; font-weight: 800; font-size: .9rem; margin: 2px 0 18px; }
.word-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.96); color: var(--ink); }
.word-grid span { aspect-ratio: 1; display: grid; place-items: center; font-weight: 900; font-size: clamp(.67rem, 1.45vw, .92rem); border-radius: 8px; }
.word-grid .hit { background: #78d993; color: #073e2d; }
.word-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.word-list span { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); padding: 7px 10px; border-radius: 999px; font-weight: 850; font-size: .8rem; }

.section { padding: 82px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.section-head p { max-width: 56ch; color: var(--muted); margin: 0; font-weight: 600; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(14px); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 38px rgba(18,48,71,.06); }
.icon-tile { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--mint); font-size: 23px; margin-bottom: 17px; }
.card p { color: var(--muted); margin: 9px 0 0; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); overflow: hidden; border-radius: var(--radius); }
.stat { background: var(--surface-solid); padding: 24px; text-align: center; }
.stat strong { display: block; font-size: 1.25rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.callout { border-radius: 34px; padding: 38px; background: linear-gradient(135deg, #0a7e83, #075e67 56%, #15734d); color: #fff; display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
.callout h2 { color: #fff; }
.callout p { color: rgba(255,255,255,.82); max-width: 60ch; }
.callout .btn-secondary { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: #fff; }

.content-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 38px; align-items: start; padding: 70px 0 90px; }
.toc { position: sticky; top: 98px; border: 1px solid var(--border); border-radius: 22px; padding: 18px; background: var(--surface); }
.toc strong { display: block; margin-bottom: 9px; }
.toc a { display: block; text-decoration: none; color: var(--muted); font-weight: 700; padding: 7px 8px; border-radius: 10px; }
.toc a:hover { color: var(--teal-dark); background: rgba(8,125,130,.07); }
.legal { min-width: 0; }
.legal-head { margin-bottom: 32px; }
.legal-head h1 { max-width: none; font-size: clamp(2.5rem, 5vw, 4.7rem); }
.updated { display: inline-flex; margin-top: 14px; background: var(--mint); color: var(--teal-dark); padding: 7px 11px; border-radius: 999px; font-weight: 850; font-size: .84rem; }
.legal-section { scroll-margin-top: 100px; border-top: 1px solid var(--border); padding: 30px 0; }
.legal-section h2 { font-size: 1.65rem; margin-bottom: 12px; }
.legal-section p, .legal-section li { color: #506575; }
.legal-section ul { padding-left: 1.25rem; }
.notice { border-left: 4px solid var(--gold); background: rgba(255,180,59,.10); border-radius: 0 16px 16px 0; padding: 16px 18px; color: #5c4a24; }

.support-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 26px; padding: 74px 0 88px; }
.support-hero { position: sticky; top: 110px; align-self: start; }
.support-hero h1 { max-width: 8ch; font-size: clamp(2.8rem, 6vw, 5.2rem); }
.faq { display: grid; gap: 12px; }
details { border: 1px solid var(--border); background: var(--surface-solid); border-radius: 18px; padding: 0 18px; }
summary { cursor: pointer; list-style: none; font-weight: 900; padding: 18px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--teal); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0 0 18px; }
.contact-card { margin-top: 18px; background: linear-gradient(145deg, var(--mint), var(--sky)); }

.site-footer { border-top: 1px solid var(--border); padding: 30px 0 44px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer-note { color: var(--muted); font-size: .88rem; }

[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid, .callout, .support-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .content-wrap { grid-template-columns: 1fr; }
  .toc { position: relative; top: 0; }
  .support-hero { position: relative; top: 0; }
  .puzzle-card { max-width: 640px; margin-inline: auto; }
}
@media (max-width: 680px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav-links { position: absolute; left: 14px; right: 14px; top: 68px; display: none; flex-direction: column; align-items: stretch; padding: 12px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .theme-toggle { margin-left: auto; }
  .hero { padding-top: 62px; }
  .hero-grid { gap: 36px; }
  .grid-3, .stat-strip { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .callout { padding: 28px; }
  .word-grid { gap: 3px; padding: 10px; }
  .word-grid span { border-radius: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

html[data-theme="dark"] {
  --bg: #08161b;
  --surface: rgba(14,31,37,.82);
  --surface-solid: #0f2228;
  --surface-2: #122b2c;
  --ink: #e9f7f6;
  --muted: #9cb1b7;
  --border: rgba(223,244,255,.12);
  --mint: #12362f;
  --sky: #102d3a;
  --shadow: 0 22px 70px rgba(0,0,0,.28);
}
html[data-theme="dark"] body { background: radial-gradient(circle at 0 0, rgba(19,169,196,.10), transparent 34rem), var(--bg); }
html[data-theme="dark"] .site-header { background: rgba(8,22,27,.78); }
html[data-theme="dark"] .legal-section p, html[data-theme="dark"] .legal-section li { color: #b5c8cd; }
html[data-theme="dark"] .notice { color: #f2ddb0; }
