:root {
  /* ENS dark theme (default) */
  --bg: #141416;
  --surface: #1c1c20;
  --surface2: #232329;
  --surface3: #2d2d35;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.15);
  --text: #ededf1;
  --muted: rgb(138, 138, 152);
  --muted2: rgb(180, 180, 195);
  --violet: rgb(82, 152, 255);
  --violet-bright: rgb(120, 178, 255);
  --violet-glow: rgba(82, 152, 255, 0.4);
  --gold: rgb(255, 196, 80);
  --green: rgb(70, 209, 138);
  --red: rgb(255, 107, 107);
  --body-bg: radial-gradient(60% 55% at 50% -8%, rgba(82, 152, 255, 0.1) 0%, rgba(0, 0, 0, 0) 60%), #141416;
  --hero-top: #ffffff;
  --shadow: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] {
  /* ENS (thorin) light theme */
  --bg: #F7F7F7;
  --surface: #ffffff;
  --surface2: #fbfbfd;
  --surface3: #eef2f8;
  --border: rgba(0, 0, 0, 0.07);
  --border2: rgba(0, 0, 0, 0.13);
  --text: #1b1c22;
  --muted: rgb(155, 155, 167);
  --muted2: rgb(103, 104, 118);
  --violet: rgb(56, 137, 255);
  --violet-bright: rgb(86, 154, 255);
  --violet-glow: rgba(56, 137, 255, 0.22);
  --gold: rgb(197, 140, 10);
  --green: rgb(25, 156, 117);
  --red: rgb(198, 48, 27);
  --body-bg: radial-gradient(50% 50% at 50% 50%, rgba(82, 152, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%), #F7F7F7;
  --hero-top: #1b1c22;
  --shadow: rgba(0, 0, 0, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-feature-settings: "ss01" on, "ss03" on; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--body-bg);
  color: var(--text);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--violet-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.site { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 900; letter-spacing: -0.04em; font-size: 24px; }
.brand .dot { color: var(--violet); }
.brand small { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-links { display: flex; gap: 20px; align-items: center; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--muted2); }
.theme-toggle { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; transition: border-color 0.2s ease; }
.theme-toggle:hover { border-color: var(--border2); }

/* Hero */
.hero { text-align: center; padding: 54px 0 30px; }
.hero h1 { font-size: clamp(40px, 8vw, 82px); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98;
  background: linear-gradient(180deg, var(--hero-top), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tag { color: var(--muted2); font-size: clamp(15px, 2.4vw, 19px); margin-top: 18px; max-width: 620px; margin-left: auto; margin-right: auto; }
.hero .tag b { color: var(--text); }
.cta-row { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--border2);
  background: var(--surface2); color: var(--text); font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 12px;
  transition: transform 0.08s ease, box-shadow 0.2s ease; font-family: inherit; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--violet); color: #fff; border-color: transparent; box-shadow: 0 8px 24px -10px var(--violet-glow); }
.btn-primary:hover { background: rgb(5, 106, 255); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }

/* Word wall — three rows by length, colored by availability */
.wordwall { display: flex; flex-direction: column; gap: 11px; max-width: 800px; margin: 30px auto 16px; }
.wrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wrow-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); width: 70px; text-align: right; flex-shrink: 0; }
.wtile { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 14px; text-decoration: none; transition: transform 0.08s ease; }
a.wtile:hover { transform: translateY(-1px); text-decoration: none; }
.wordwall-loading { color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.wtile.now { color: var(--green); border-color: rgba(70,209,138,0.42); background: rgba(70,209,138,0.09); }
.wtile.soon { color: var(--gold); border-color: rgba(255,194,75,0.35); background: rgba(255,194,75,0.07); }
.wlegend { display: flex; gap: 20px; justify-content: center; font-size: 12.5px; color: var(--muted2); margin-top: 6px; }
.wlegend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.wlegend .dot.now { background: var(--green); }
.wlegend .dot.soon { background: var(--gold); }
@media (max-width: 560px) { .wrow-label { width: 100%; text-align: center; } }

.section-label { text-align: center; text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; }
.step .k { color: var(--violet-bright); font-weight: 800; font-size: 13px; margin-bottom: 10px; }

footer.site { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 0 50px; border-top: 1px solid var(--border); margin-top: 30px; }

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

/* ── App / browse page ── */
.app-wrap { padding-bottom: 60px; }
.app-head { margin: 18px 0 20px; }
.app-head h1 { font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.app-sub { color: var(--muted2); font-size: 14px; margin-top: 6px; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 0 12px; flex: 1; min-width: 180px; }
.search input { background: transparent; border: none; color: var(--text); padding: 10px 0; width: 100%; font-family: inherit; font-size: 14px; outline: none; }
.toggle-group { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.toggle-group button { background: transparent; border: none; color: var(--muted2); font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.toggle-group button.active { background: var(--surface3); color: var(--violet-bright); }
.select { background: var(--surface); color: var(--text); border: 1px solid var(--border2); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 13.5px; }
.result-meta { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wcard { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.04); transition: transform 0.08s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.wcard:hover { transform: translateY(-2px); border-color: var(--border2); box-shadow: 0 8px 24px -12px rgba(56,137,255,0.4); text-decoration: none; }
.wcard-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2px; }
.wcard-word { font-size: 30px; font-weight: 900; letter-spacing: -0.035em; }
.wcard-eth { color: var(--muted); font-weight: 700; font-size: 15px; }
.wcard-score { font-weight: 900; font-size: 16px; min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.wcard-score.hi { color: var(--gold); background: rgba(255,194,75,0.12); }
.wcard-score.mid { color: var(--violet-bright); background: rgba(139,124,255,0.14); }
.wcard-score.lo { color: var(--muted2); background: var(--surface3); }
.wcard-meta { font-size: 12px; color: var(--muted2); }
.len-pill { color: var(--muted); font-weight: 700; }
.prem { color: var(--gold); font-weight: 700; }
.fresh { color: var(--green); font-weight: 600; }
.eta { color: var(--violet-bright); font-weight: 700; }
.premium-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(180deg, rgba(56,137,255,0.08), var(--surface)); border: 1px solid var(--border2); border-radius: 14px; padding: 14px 18px; margin: 16px 0 8px; font-size: 13.5px; color: var(--muted2); }
.premium-banner b { color: var(--text); }

/* Premium gate */
.gate { display: grid; place-items: center; padding: 60px 20px; }
.gate-card { max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; padding: 40px 32px; box-shadow: 0 20px 50px -24px rgba(56,137,255,0.4); }
.gate-card .pill { margin-bottom: 16px; }
.gate-title { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 12px; }
.gate-desc { color: var(--muted2); font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; }
.gate-desc b { color: var(--text); }
.gate-card .btn-primary { width: 100%; justify-content: center; }
.gate-msg { margin-top: 16px; font-size: 13px; color: var(--muted2); min-height: 18px; }
.wcard-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: var(--surface3); color: var(--muted2); }
.chip--common { color: var(--green); background: rgba(25,156,117,0.1); }
.chip--crypto { color: var(--violet); background: rgba(56,137,255,0.1); }
.chip--name { color: rgb(213,46,126); background: rgba(213,46,126,0.1); }
.chip--place { color: rgb(5,106,255); background: rgba(5,106,255,0.1); }
.chip--tech { color: rgb(20,140,160); background: rgba(20,150,170,0.1); }
.chip--plural { color: var(--red); background: rgba(198,48,27,0.09); }
.wcard-mean { font-size: 12.5px; color: var(--muted2); line-height: 1.5; flex: 1; }
.wcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.metaline { font-size: 11.5px; color: var(--muted2); line-height: 1.5; }
.reg { color: var(--violet); font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.premium-teaser { display: block; text-decoration: none; margin-top: 30px; background: linear-gradient(180deg, var(--surface), var(--surface2)); border: 1px solid var(--border2); border-radius: 16px; padding: 20px 22px; font-size: 14px; color: var(--muted2); transition: border-color 0.2s ease, transform 0.08s ease; }
.premium-teaser:hover { border-color: var(--violet); transform: translateY(-1px); text-decoration: none; }
.premium-teaser b { color: var(--text); }
.pill { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); border: 1px solid rgba(255,194,75,0.4); border-radius: 999px; padding: 3px 10px; }

@media (max-width: 520px) { .controls { flex-direction: column; align-items: stretch; } }
