:root {
  --ink: #1b1622;
  --ink-2: #2d2640;
  --navy: #3e3858;
  --cream: #fbf1dc;
  --cream-2: #efe0bf;
  --cream-3: #d9c59b;
  --accent: #7b5ce6;      /* BOINK purple: buttons, step numbers */
  --lime: #cfe86d;
  --leaf: #00aa00;
  --leaf-dk: #007f33;
  --leaf-dkr: #004d26;
  --water-shadow: rgba(14, 22, 80, 0.5);

  --bank: 56px;          /* forest width on each side, synced by main.js */
  --lane: 72px;          /* visible water between forest and content */
  --nav-h: 64px;

  --f-pixel: 'Silkscreen', 'Courier New', monospace;
  --f-body: 'Pixelify Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* flex/inline-flex components must still hide */

html {
  position: relative; /* the world clip below spans the whole document */
  scroll-behavior: smooth;
  background: #3850ae;
}

body {
  margin: 0;
  background: #3850ae;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
/* artwork can't be dragged out, long-press saved or selected (see main.js for the right-click guard) */
img, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
img { pointer-events: none; }

.world-clip {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
#world {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  will-change: transform;
}

main, .site-footer { position: relative; z-index: 1; }

/* ---------- pixel text outline ---------- */
.outline {
  --o: 3px;
  color: var(--cream);
  text-shadow:
    var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink),
    0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink),
    var(--o) var(--o) 0 var(--ink), calc(var(--o) * -1) var(--o) 0 var(--ink),
    var(--o) calc(var(--o) * -1) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ink),
    0 calc(var(--o) * 2) 0 var(--ink), var(--o) calc(var(--o) * 2) 0 var(--ink),
    calc(var(--o) * -1) calc(var(--o) * 2) 0 var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  --bc: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px;
  padding: 14px 20px;
  border: 0;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  box-shadow:
    0 -4px 0 0 var(--bc), 0 4px 0 0 var(--bc), -4px 0 0 0 var(--bc), 4px 0 0 0 var(--bc),
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.28), inset 4px 4px 0 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.1s steps(2);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 3px dashed var(--lime); outline-offset: 8px; }
.btn-cream { background: var(--cream); color: var(--ink); }
/* not live yet: a quiet, lily-green outline with a small SOON tag */
.btn.is-disabled {
  --bc: #2f8a2c;
  gap: 10px;
  margin: 2px;
  padding: 9px 10px 9px 14px;
  font-size: 11px;
  color: #1f4d1f;
  background: rgba(26, 61, 28, 0.1);
  box-shadow: 0 -3px 0 0 var(--bc), 0 3px 0 0 var(--bc), -3px 0 0 0 var(--bc), 3px 0 0 0 var(--bc);
  cursor: default;
}
.btn.is-disabled::after {
  content: 'SOON';
  padding: 4px 6px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--lime);
  background: var(--ink);
}
.btn.is-disabled:hover, .btn.is-disabled:active { transform: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--nav-h);
  /* shallow-water blue, see-through so the stream shows beneath */
  background: rgba(164, 194, 255, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  box-shadow: 0 4px 0 rgba(95, 125, 230, 0.85), 0 8px 0 rgba(27, 22, 34, 0.18);
}
/* wordmark hugs the left edge, logo sits dead centre, tabs hug the right edge */
.nav-inner {
  height: 100%;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.brand { justify-self: start; }
.nav-logo { justify-self: center; display: block; line-height: 0; }
.nav-logo img { height: 48px; width: auto; transition: transform 0.15s steps(3); filter: drop-shadow(0 4px 0 rgba(27, 22, 34, 0.35)); }
.nav-logo:hover img { transform: translateY(-3px) rotate(-4deg); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
}
.wordmark {
  color: #fff;
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 4px 0 var(--ink);
}
.wordmark b { color: #7b5ce6; font-weight: 700; }
/* header wordmark gets an extra hard drop shadow so it lifts off the light bar */
.nav .wordmark {
  font-size: 22px;
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 4px 0 var(--ink),
    2px 7px 0 rgba(27, 22, 34, 0.3);
}

.tabs {
  display: flex;
  gap: 6px;
  justify-self: end;
}
/* every tab looks and reacts the same; the coming-soon ones just don't go anywhere yet */
.tab {
  padding: 10px 14px;
  font-family: var(--f-pixel);
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(27, 22, 34, 0.15);
  transition: transform 0.1s steps(2);
}
.tab:hover,
.tab:focus-visible {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 -3px 0 rgba(255, 255, 255, 0.55), 0 3px 0 rgba(255, 255, 255, 0.55), -3px 0 0 rgba(255, 255, 255, 0.55), 3px 0 0 rgba(255, 255, 255, 0.55), 0 6px 0 rgba(27, 22, 34, 0.18);
  transform: translateY(-2px);
  outline: none;
}
/* tabs that aren't live yet: faded, no hover, with a small SOON chip over the corner */
.tab.is-disabled {
  position: relative;
  color: #5a6494;
  text-shadow: none;
  cursor: default;
}
.tab.is-disabled:hover,
.tab.is-disabled:focus-visible { background: none; box-shadow: none; transform: none; }
.tab.is-disabled::after {
  content: 'SOON';
  position: absolute;
  top: -5px;
  right: -2px;
  padding: 2px 4px 1px;
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 0 rgba(27, 22, 34, 0.25);
}
/* menu button in the header's pixel style: light tile, ink notch frame, ink bars; purple while open */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  margin: 3px;
  padding: 9px 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink), 0 6px 0 rgba(27, 22, 34, 0.25);
  cursor: pointer;
}
.burger span { display: block; height: 4px; margin: 0 0 4px; background: var(--ink); }
.burger span:last-child { margin-bottom: 0; }
.burger:hover { background: rgba(255, 255, 255, 0.75); }
.burger[aria-expanded="true"] { background: var(--accent); }
.burger[aria-expanded="true"] span { background: #fff; }
.burger:focus-visible { outline: 3px dashed var(--accent); outline-offset: 6px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 6vh) 16px 0;
}
.hero-copy { width: 100%; display: flex; flex-direction: column; align-items: center; }
/* stone title: main.js draws the letters and sets the height */
.stone-title { width: 100%; height: 120px; margin: 0; }
/* the intro floats on a lily pad in the creek */
.raft.hero-pad { margin-top: 30px; padding: 30px 64px 70px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-pad .hero-tag {
  margin: 4px 0 0;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 20px);
  color: #10240f;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.scroll-hint {
  --o: 2px;
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--f-pixel);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-hint span { animation: bob 1.2s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- content column (flows down the middle of the pond) ---------- */
.wrap {
  width: min(960px, calc(100% - 2 * (var(--bank) + var(--lane))));
  margin-inline: auto;
}
.block { margin-bottom: 140px; scroll-margin-top: calc(var(--nav-h) + 40px); }
.block:first-of-type { margin-top: 120px; }
#boinkerage, #critters { scroll-margin-top: calc(var(--nav-h) + 40px); }

.float-title {
  --o: 3px;
  margin: 0 auto 44px;
  padding: 0 16px;
  text-align: center;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.15;
}

/* raft = a giant lily pad floating on the creek (the pad itself is drawn by main.js) */
.raft {
  position: relative;
  padding: 44px 48px;
  color: #10240f;
}
.raft h2, .raft h3 {
  margin: 10px 0 12px;
  font-family: var(--f-pixel);
  font-weight: 700;
  line-height: 1.1;
}
.raft h2 { font-size: clamp(22px, 3vw, 32px); }
.raft h3 { font-size: 24px; }
.raft p { margin: 0 0 16px; }
.raft > * { min-width: 0; }
.raft h2, .raft h3 { overflow-wrap: anywhere; }

.chip {
  display: inline-block;
  padding: 5px 9px;
  font-family: var(--f-pixel);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime);
  background: var(--ink);
}
.chips { display: flex; gap: 8px; }

/* about */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; }
.portrait {
  margin: 0;
  background: var(--ink);
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink);
}
.portrait img { width: 100%; height: auto; image-rendering: pixelated; }
/* desktop: the intro pad is a notch wider than the card rows below */
.wrap-wide { width: min(1320px, calc(100% - 2 * (var(--bank) + var(--lane)))); }
@media (min-width: 901px) {
  .about { grid-template-columns: minmax(220px, 280px) 1fr; gap: clamp(32px, 3.5vw, 60px); padding: 56px clamp(48px, 5vw, 88px) 68px; }
  .about h2 { margin-top: 0; font-size: clamp(28px, 2.5vw, 40px); }
  .about p { font-size: clamp(17px, 1.15vw, 20px); line-height: 1.6; }
}

/* project cards */
.wrap-mid { width: min(1200px, calc(100% - 2 * (var(--bank) + var(--lane)))); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.grid-3 .card { padding: 30px 30px 64px; }
.grid-3 h3 { font-size: 22px; }
.card { padding: 36px 40px 44px; display: flex; flex-direction: column; }
.thumb {
  aspect-ratio: 128 / 52;
  overflow: hidden;
  background: #86a8ff;
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-square { aspect-ratio: 1 / 1; }
.coin-pond { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.card-body { padding: 24px 0 0; display: flex; flex-direction: column; flex: 1; }
.card-body .btn { align-self: flex-start; margin-top: auto; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.step { padding: 36px 36px 44px; }
.step-no {
  --o: 3px;
  display: block;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}
.step h3 { font-size: 22px; }
.step p { margin: 0; }

/* the frogs: NFTs framed on lily pads */
.nft-grid.block { margin-bottom: 72px; }
.nft-card { margin: 0; padding: 26px 26px 58px; }
.nft-card img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink);
}
/* main.js moves the whole card together with its lily pad */

/* stone letters in the stream: main.js draws them and sets the height */
.nft-grid.block { margin-bottom: 110px; }
.water-note.block { margin-bottom: 90px; }
.stone-words { width: 100%; height: 130px; }

/* ---------- footer: second waterfall, sign floats on a lily pad below it ---------- */
.site-footer {
  padding: 400px 16px 110px;   /* room for the big end-of-page waterfall */
  display: flex;
  justify-content: center;
}
.sign { padding: 36px 56px 48px; text-align: center; }
.sign .brand { font-size: 24px; }

.socials-row { display: flex; justify-content: center; gap: 14px; margin: 26px 0 14px; }
.social {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 3px;
  background: var(--ink);
  box-shadow: 0 -3px 0 #10240f, 0 3px 0 #10240f, -3px 0 0 #10240f, 3px 0 0 #10240f, inset -3px -3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.1s steps(2);
}
.social canvas { width: 24px; height: 20px; image-rendering: pixelated; }
.social canvas[data-icon="telegram"] { width: 32px; height: 32px; }
.social:hover { background: var(--accent); transform: translateY(-3px); }
.social:focus-visible { outline: 3px dashed var(--accent); outline-offset: 5px; }
/* not live yet: dimmed tile with a SOON tag sitting on top */
.social.is-soon { position: relative; cursor: default; }
.social.is-soon canvas { opacity: 0.45; }
.social.is-soon:hover { background: var(--ink); transform: none; }
.social.is-soon::after {
  content: 'SOON';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 5px;
  font-family: var(--f-pixel);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 2px #10240f;
}
.fine { margin: 0; font-size: 14px; color: #2c5a26; }

/* FAQ: one lily pad, questions open their answer underneath */
.raft.faq { padding: 30px 40px 64px; }
.faq-q { border-bottom: 2px dashed rgba(26, 61, 28, 0.3); }
.faq-q:last-child { border-bottom: 0; }
.faq-q summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  list-style: none;
  cursor: pointer;
}
.faq-q summary::-webkit-details-marker { display: none; }
.faq-title {
  flex: 1;
  min-width: 0;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.3;
  color: #10240f;
}
.faq-q summary:hover .faq-title,
.faq-q summary:focus-visible .faq-title { color: var(--accent); }
.faq-q summary:focus-visible { outline: 3px dashed var(--accent); outline-offset: 4px; }
/* pixel plus that turns into a minus when open */
.faq-toggle { position: relative; flex: none; width: 18px; height: 18px; }
.faq-toggle::before,
.faq-toggle::after { content: ''; position: absolute; background: var(--ink); }
.faq-toggle::before { left: 0; right: 0; top: 7px; height: 4px; }
.faq-toggle::after { top: 0; bottom: 0; left: 7px; width: 4px; }
.faq-q[open] .faq-toggle::after { display: none; }
.faq-q[open] .faq-toggle::before { background: var(--accent); }
.faq .faq-q p { margin: 0; padding: 0 0 18px 52px; }

/* the body font's 2 looks like a mirrored S; numbers use the pixel display font */
.num { font-family: var(--f-pixel); font-weight: 700; font-size: 0.92em; letter-spacing: 0.02em; }

/* ---------- supporters page (temporary) ---------- */
.tab[aria-current="page"] {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 -3px 0 rgba(255, 255, 255, 0.55), 0 3px 0 rgba(255, 255, 255, 0.55), -3px 0 0 rgba(255, 255, 255, 0.55), 3px 0 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 var(--accent);
}
.quest-flow { width: min(640px, calc(100% - 2 * (var(--bank) + var(--lane)))); display: flex; flex-direction: column; gap: 56px; }
.raft.quest { padding: 34px 40px 62px; transition: opacity 0.2s steps(2); }
.quest h2 { margin: 6px 0 16px; font-size: clamp(20px, 2.4vw, 26px); }
.quest .step-no { font-size: 30px; }
.quest.is-locked { opacity: 0.55; }
.quest.is-locked .quest-go { pointer-events: none; }
.quest.is-done .step-no::after { content: ' ✓'; color: #1f7a2a; }

.quest-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.field {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 12px;
  background: var(--cream);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink), inset 0 3px 0 rgba(27, 22, 34, 0.12);
  margin: 3px;
}
.field input {
  flex: 1;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  background: none;
  font: 500 16px var(--f-body); /* 16px keeps iOS from zooming in */
  color: var(--ink);
  outline: none;
}
.field:focus-within { box-shadow: 0 -3px 0 var(--accent), 0 3px 0 var(--accent), -3px 0 0 var(--accent), 3px 0 0 var(--accent), inset 0 3px 0 rgba(27, 22, 34, 0.12); }
.field-prefix { font-family: var(--f-pixel); font-weight: 700; color: var(--accent); }
.field-tag { flex: none; min-width: 26px; padding: 3px 5px; font-family: var(--f-pixel); font-size: 10px; text-align: center; color: var(--cream); background: var(--ink); }
/* step 1: X and Telegram fields stacked, button below on the right */
.quest .quest-form-stack { flex-direction: column; align-items: stretch; }
.quest-form-stack .field { flex: none; }
.quest-form-stack > .btn { align-self: flex-end; }
.field-chip { padding: 4px 6px; font-family: var(--f-pixel); font-size: 10px; color: var(--lime); background: var(--ink); }
.quest input:disabled { cursor: not-allowed; }
.quest .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* saved handle: shown like the input it came from, with an Edit button */
.quest-done { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.field-saved { padding-top: 13px; padding-bottom: 13px; background: #fbf6e8; }
.field-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 500 16px var(--f-body); color: var(--ink); }
.btn-soft { background: var(--cream); color: var(--ink); }

.quest .quest-error { margin: 12px 0 0; color: #a3162a; font-weight: 700; }
.quest .quest-hint { margin: 12px 0 0; color: #3a2a7a; font-weight: 700; }

.quest-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.quest-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(26, 61, 28, 0.08);
  box-shadow: 0 -2px 0 rgba(26, 61, 28, 0.25), 0 2px 0 rgba(26, 61, 28, 0.25), -2px 0 0 rgba(26, 61, 28, 0.25), 2px 0 0 rgba(26, 61, 28, 0.25);
  margin: 2px;
}
.quest-row.is-done { background: rgba(31, 122, 42, 0.14); }
.quest-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; background: var(--ink); }
.quest-icon canvas { width: 24px; height: 20px; image-rendering: pixelated; }
.quest-icon canvas[data-icon="telegram"] { width: 28px; height: 28px; }
.quest-text { flex: 1; min-width: 0; }
/* Follow / Join / Done share one size and one font */
.quest-go, .quest-state {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 42px;
  margin: 4px;
  padding: 0;
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.quest-state {
  color: #1f5a1f;
  background: rgba(31, 122, 42, 0.2);
  box-shadow: 0 -3px 0 #2f8a2c, 0 3px 0 #2f8a2c, -3px 0 0 #2f8a2c, 3px 0 0 #2f8a2c;
}

.quest-success { text-align: center; }
.quest-success h2 { font-size: clamp(22px, 3vw, 30px); }

/* honeypot: off-screen for people, still in the form for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- tablet / mobile ---------- */
/* three cards need room: stack them on narrower screens */
@media (max-width: 1180px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; width: min(520px, calc(100% - 2 * (var(--bank) + var(--lane)))); }
}

@media (max-width: 900px) {
  .tabs {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 4px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(164, 194, 255, 0.95);
    box-shadow: 0 4px 0 rgba(95, 125, 230, 0.85);
  }
  .tabs { justify-self: stretch; }  /* full-width dropdown, not pushed to the right column */
  .tabs.open { display: flex; }
  .tab { padding: 16px 12px; font-size: 16px; border-bottom: 2px dashed rgba(27, 22, 34, 0.25); }
  .tab.is-disabled::after { position: static; display: inline-block; margin-left: 10px; vertical-align: 2px; font-size: 10px; }
  .burger { display: block; justify-self: end; grid-column: 3; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .portrait { width: 160px; margin-inline: auto; }
}

@media (max-width: 700px) {
  :root { --lane: 20px; --nav-h: 60px; }
  body { font-size: 17px; }
  .nav-inner { padding: 0 12px; gap: 10px; }
  .brand { font-size: 16px; gap: 8px; }
  .nav .wordmark { font-size: 15px; }
  .nav-logo img { height: 38px; }
  .hero { min-height: 600px; padding-top: calc(var(--nav-h) + 5vh); }
  .raft.hero-pad { width: 100%; padding: 24px 18px 52px; margin-top: 22px; }
  .raft.quest { padding: 26px 20px 52px; }
  .raft.faq { padding: 22px 20px 52px; }
  .faq .faq-q p { padding-left: 0; }
  /* phones: icon + text on top, a full-width button underneath, so nothing overlaps */
  .quest-row { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px; padding: 14px 14px 12px; }
  .quest-text { overflow-wrap: anywhere; line-height: 1.35; }
  .quest-go, .quest-state { grid-column: 1 / -1; width: auto; margin: 3px; font-size: 13px; }
  .hero { padding-left: calc(var(--bank) + 16px); padding-right: calc(var(--bank) + 16px); }
  .block { margin-bottom: 96px; }
  .block:first-of-type { margin-top: 84px; }
  .raft { padding: 30px 26px 36px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .portrait { width: 140px; }
  .card, .grid-3 .card { padding: 28px 24px 48px; }
  .card-body { padding: 20px 0 0; }
  .grid-3, .steps { gap: 32px; }
  .float-title { margin-bottom: 32px; }
  .site-footer { padding: 230px 16px 80px; }
  .sign { padding: 30px 32px 40px; }
}

/* ---------- phones (html.is-mobile, set in index.html) ----------
   Same as the narrow layouts above, but applied at any width so a phone in landscape
   still gets the mobile UI. Mobile-only tweaks go at the end of this section. */
.is-mobile .steps { grid-template-columns: 1fr 1fr; }
.is-mobile .grid-3 { grid-template-columns: 1fr; width: min(520px, calc(100% - 2 * (var(--bank) + var(--lane)))); }
.is-mobile .tabs { display: none; position: absolute; top: calc(var(--nav-h) + 4px); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: rgba(164, 194, 255, 0.95); box-shadow: 0 4px 0 rgba(95, 125, 230, 0.85); }
.is-mobile .tabs { justify-self: stretch; }  /* full-width dropdown */
.is-mobile .tabs.open { display: flex; }
.is-mobile .tab { padding: 16px 12px; font-size: 16px; border-bottom: 2px dashed rgba(27, 22, 34, 0.25); }
.is-mobile .tab.is-disabled::after { position: static; display: inline-block; margin-left: 10px; vertical-align: 2px; font-size: 10px; }
.is-mobile .burger { display: block; justify-self: end; grid-column: 3; }
.is-mobile .steps { grid-template-columns: 1fr; gap: 36px; }
.is-mobile .about { grid-template-columns: 1fr; gap: 20px; }
.is-mobile .portrait { width: 160px; margin-inline: auto; }
:root.is-mobile { --lane: 20px; --nav-h: 60px; }
.is-mobile body { font-size: 17px; }
.is-mobile .nav-inner { padding: 0 12px; gap: 10px; }
.is-mobile .brand { font-size: 16px; gap: 8px; }
.is-mobile .nav .wordmark { font-size: 15px; }
.is-mobile .nav-logo img { height: 38px; }
.is-mobile .hero { min-height: 600px; padding-top: calc(var(--nav-h) + 5vh); }
.is-mobile .raft.hero-pad { width: 100%; padding: 24px 18px 52px; margin-top: 22px; }
.is-mobile .raft.quest { padding: 26px 20px 52px; }
.is-mobile .raft.faq { padding: 22px 20px 52px; }
.is-mobile .faq .faq-q p { padding-left: 0; }
.is-mobile .quest-row { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px; padding: 14px 14px 12px; }
.is-mobile .quest-text { overflow-wrap: anywhere; line-height: 1.35; }
.is-mobile .quest-go, .is-mobile .quest-state { grid-column: 1 / -1; width: auto; margin: 3px; font-size: 13px; }
.is-mobile .hero { padding-left: calc(var(--bank) + 16px); padding-right: calc(var(--bank) + 16px); }
.is-mobile .block { margin-bottom: 96px; }
.is-mobile .block:first-of-type { margin-top: 84px; }
.is-mobile .raft { padding: 30px 26px 36px; }
.is-mobile .about { grid-template-columns: 1fr; gap: 20px; }
.is-mobile .portrait { width: 140px; }
.is-mobile .card, .is-mobile .grid-3 .card { padding: 28px 24px 48px; }
.is-mobile .card-body { padding: 20px 0 0; }
.is-mobile .grid-3, .is-mobile .steps { gap: 32px; }
.is-mobile .float-title { margin-bottom: 32px; }
.is-mobile .site-footer { padding: 230px 16px 80px; }
.is-mobile .sign { padding: 30px 32px 40px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span { animation: none; }
  .btn { transition: none; }
}
