/* ==========================================================================
   VIVARI · a glass terrarium on a sunlit shelf.
   Frosted glass surfaces, moss and fern greens, warm wood and brass; heat-lamp amber is kept for burns.
   Fraunces (soft) for display, Figtree for the interface. Glossy vinyl buttons that press in, like the critters.
   ========================================================================== */
:root {
  --cream: #f6f3ea;
  --cream-2: #efe9da;
  --paper: #fffdf8;
  --ink: #13261d;
  --ink-2: #33483d;
  --muted: #647569;
  --faint: #93a197;
  --moss: #3e7d3a;
  --moss-2: #2f6630;
  --fern: #6fb04a;
  --leaf: #cfe8b8;
  --leaf-2: #e6f2da;
  --teal: #dff3ec;
  --wood: #b9824f;
  --wood-2: #8a5a33;
  --brass: #c89b4a;
  --amber: #ff9d3a;
  --ember: #e8572a;
  --pink: #ff7aa8;
  --violet: #8a6cff;
  --danger: #c8412c;

  --glass: rgb(255 255 255 / .66);
  --glass-strong: rgb(255 255 255 / .82);
  --glass-edge: rgb(255 255 255 / .85);
  --hair: rgb(19 38 29 / .09);
  --hair-2: rgb(19 38 29 / .16);
  --shadow-sm: 0 1px 2px rgb(19 38 29 / .06), 0 4px 12px -6px rgb(19 38 29 / .18);
  --shadow: 0 1px 2px rgb(19 38 29 / .05), 0 18px 40px -18px rgb(19 38 29 / .32);
  --shadow-lg: 0 2px 4px rgb(19 38 29 / .05), 0 30px 70px -28px rgb(19 38 29 / .42);
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;

  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--body); font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; }
img, canvas { display: block; max-width: 100%; }
::selection { background: var(--leaf); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--moss); outline-offset: 3px; border-radius: 8px; }
a { color: var(--moss); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--moss-2); }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; font-variation-settings: "SOFT" 100; font-weight: 650; line-height: 1.02; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 12px; }
h3 { font-size: 24px; margin-bottom: 6px; letter-spacing: -.01em; }
h2 em, h1 em { font-style: italic; color: var(--moss); font-weight: 600; }
p { margin: 0 0 12px; max-width: 64ch; }
b, strong { font-weight: 700; }
.fine { font-size: 14px; color: var(--muted); }
.num, td, .amt { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; position: relative; }
.lede { font-size: 19px; color: var(--muted); margin-bottom: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--moss); }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: rgb(246 243 234 / .72); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.topbar.scrolled { border-bottom-color: var(--hair); background: rgb(246 243 234 / .86); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { font: 700 26px/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.03em; }
.topbar nav { display: flex; gap: 2px; margin-left: 8px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / .55); box-shadow: inset 0 0 0 1px var(--hair); }
.topbar nav a { font: 600 15px/1 var(--body); color: var(--ink-2); text-decoration: none; padding: 9px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.topbar nav a:hover { color: var(--ink); background: rgb(255 255 255 / .8); }
.topbar nav { position: relative; }
.topbar nav a { position: relative; z-index: 1; }
.topbar nav a[aria-current] { color: var(--paper); background: transparent; }
.topbar nav a[aria-current]:hover { background: transparent; color: var(--paper); }
/* The active tab's highlight is one pill that springs from tab to tab */
.nav-pill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: var(--ink); box-shadow: 0 6px 14px -8px rgb(19 38 29 / .6); opacity: 0; pointer-events: none; transition: transform .5s var(--spring), width .5s var(--spring), opacity .2s; }
#wallet-btn { margin-left: auto; }
.notice { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 20px; background: var(--leaf-2); color: var(--ink-2); font: 500 14px/1.4 var(--body); text-align: center; border-bottom: 1px solid var(--hair); }
.notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgb(255 157 58 / .2); flex: none; }

/* ---------------------------------------------------------------- buttons */
.btn { --b1: #fff; --b2: #f1ede2; --fg: var(--ink); --edge: rgb(19 38 29 / .12); --lip: rgb(19 38 29 / .14);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: 700 16px/1 var(--body); color: var(--fg); text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .8), inset 0 0 0 1px var(--edge), inset 0 -3px 0 var(--lip), 0 6px 16px -8px rgb(19 38 29 / .35);
  transition: transform .18s var(--spring), box-shadow .18s var(--ease), filter .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); color: var(--fg); filter: brightness(1.03); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 0 0 1px var(--edge), inset 0 -1px 0 var(--lip), 0 2px 6px -4px rgb(19 38 29 / .35); transition-duration: .06s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-slime { --b1: #6cb752; --b2: #3e7d3a; --fg: #fff; --edge: rgb(0 0 0 / .08); --lip: rgb(20 60 20 / .45); text-shadow: 0 1px 0 rgb(0 0 0 / .15); }
.btn-burn { --b1: #ffb35e; --b2: #f07a2a; --fg: #3a1604; --edge: rgb(0 0 0 / .06); --lip: rgb(140 50 0 / .4); }
.btn-dark { --b1: #28402f; --b2: #13261d; --fg: #fff; --edge: rgb(0 0 0 / .2); --lip: rgb(0 0 0 / .5); }
.btn-glass { --b1: rgb(255 255 255 / .75); --b2: rgb(255 255 255 / .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------------------------------------------------------------- forms */
label { display: flex; flex-direction: column; gap: 7px; font: 700 14px/1.2 var(--body); color: var(--ink); }
label small { font: 400 14px/1.45 var(--body); color: var(--muted); }
input, select, textarea { font: 500 17px/1.3 var(--body); color: var(--ink); background: rgb(255 255 255 / .9); border: 0; border-radius: var(--r-md); padding: 13px 15px; width: 100%; appearance: none; box-shadow: inset 0 0 0 1px var(--hair-2), inset 0 2px 3px rgb(19 38 29 / .05); transition: box-shadow .15s; caret-color: var(--moss); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2313261d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1px rgb(19 38 29 / .26), inset 0 2px 3px rgb(19 38 29 / .05); }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--moss), 0 0 0 5px rgb(62 125 58 / .14); }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger), 0 0 0 5px rgb(200 65 44 / .12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 15px; font: 600 14px/1 var(--body); color: var(--ink-2); background: rgb(255 255 255 / .7); border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair-2); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.chip:hover { background: #fff; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

/* ---------------------------------------------------------------- surfaces */
.panel { background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); padding: 24px; }
.panel-bone { background: var(--paper); }

/* ---------------------------------------------------------------- sections */
.stratum { position: relative; padding: 110px 24px 100px; background: var(--bg, var(--cream)); overflow: hidden; isolation: isolate; }
/* Dappled greenhouse light over every section once the leaf-shadow art is present. */
.stratum::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--leafshade, none) center / 1400px auto repeat; opacity: .35; pointer-events: none; }
.s-topsoil { --bg: linear-gradient(180deg, var(--cream) 0%, var(--leaf-2) 100%); }
.s-soil { --bg: var(--cream); }
.s-clay { --bg: linear-gradient(180deg, var(--leaf-2), var(--teal)); }
.s-roots { --bg: var(--cream); }
.s-rock { --bg: linear-gradient(180deg, var(--cream-2), var(--cream)); }
.s-deep { --bg: radial-gradient(1200px 500px at 80% 0%, rgb(255 157 58 / .12), transparent 60%), linear-gradient(180deg, var(--leaf-2), var(--cream)); }

/* ---------------------------------------------------------------- hero: the tank */
.hero { position: relative; padding: 0; background: radial-gradient(900px 600px at 72% 20%, #fffaf0, transparent 70%), linear-gradient(180deg, #f4efe0, #e7efd9); }
.frame { position: relative; max-width: none; margin: 0; display: block; border: 0; background: none; box-shadow: none; }
.surface { position: relative; overflow: hidden; background: none; border: 0; box-shadow: none; }
.surface canvas.scene { display: block; width: 100%; height: min(86vh, 820px); min-height: 560px; }
.scene-overlay { position: absolute; inset: 0; pointer-events: none; }
.surface canvas.scene.webgl { touch-action: pan-y; cursor: grab; }
.surface canvas.scene.webgl:active { cursor: grabbing; }
.hero-copy { position: absolute; left: max(24px, calc((100vw - 1200px) / 2)); top: 50%; transform: translateY(-54%); width: min(500px, 40vw); display: grid; justify-items: start; gap: 0; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 { margin: 0; font-size: clamp(64px, 8.4vw, 132px); line-height: .9; letter-spacing: -.045em; font-weight: 700; color: var(--ink); }
.hero-copy .sub { margin: 18px 0 0; font: 500 clamp(18px, 1.6vw, 22px)/1.4 var(--body); color: var(--ink-2); max-width: 26ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-actions .btn { min-height: 54px; padding: 0 26px; font-size: 17px; }
.host-tag { position: absolute; left: var(--host-x); top: var(--host-y); transform: translate(-50%, -50%); font: 700 12px/1 var(--body); letter-spacing: .06em; color: #3b2a07; background: linear-gradient(180deg, #f3d98f, #c89b4a); padding: 6px 10px; border-radius: 6px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 2px 6px -2px rgb(0 0 0 / .3); white-space: nowrap; }
.burn-tag { position: absolute; left: var(--pit-x); top: var(--pit-y); transform: translate(-50%, -120%); font: 700 22px/1 var(--display); color: var(--ember); text-shadow: 0 1px 0 #fff, 0 0 18px rgb(255 157 58 / .6); animation: float-up 3.2s var(--ease) forwards; white-space: nowrap; }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.9); } 12% { opacity: 1; transform: translate(-50%, -120%) scale(1); } 100% { transform: translate(-50%, -380%); opacity: 0; } }
.critter-tag { position: absolute; left: 0; top: 0; pointer-events: auto; font: 700 12px/1 var(--body); color: var(--ink); background: var(--glass-strong); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 6px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); white-space: nowrap; text-decoration: none; opacity: .92; transition: opacity .2s, background .2s; will-change: transform; }
.critter-tag::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.critter-tag:hover, .critter-tag.on { opacity: 1; background: var(--ink); color: #fff; z-index: 2000 !important; }
.critter-tag.grad { background: linear-gradient(180deg, #fff3cf, #f3d98f); }
.critter-tag.quiet { opacity: 0; pointer-events: none; }
.critter-tag.quiet.on { opacity: 1; }
.lastburn { position: absolute; right: 20px; bottom: 20px; margin: 0; max-width: min(40%, 460px); display: flex; gap: 10px; align-items: center; font: 500 13px/1.35 var(--body); color: var(--ink-2); padding: 10px 14px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); }
.lastburn::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #ffd27a, var(--ember)); box-shadow: 0 0 12px rgb(255 157 58 / .6); }
.lastburn:empty { display: none; }
/* Stats float over the tank as glass chips */
.ticker { position: absolute; left: max(24px, calc((100vw - 1200px) / 2)); bottom: 22px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; max-width: min(640px, 50vw); margin: 0; }
.ticker div { display: grid; gap: 4px; padding: 12px 16px; border-radius: 18px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); min-width: 108px; }
.ticker b { font: 700 28px/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ticker span { font: 600 12px/1 var(--body); color: var(--muted); }
.ticker .hot b { color: var(--ember); }
@keyframes breathe { 50% { transform: scale(.8); opacity: .7; } }

/* ---------------------------------------------------------------- fees: the split */
.fees { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 48px; align-items: center; }
.fee-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; padding: 18px; border-radius: var(--r-xl); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.fee-grid i { aspect-ratio: 1; display: block; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / .7), transparent 45%), var(--c); box-shadow: inset 0 -2px 3px rgb(0 0 0 / .12); animation: pop .5s var(--spring) both; animation-delay: calc(var(--i) * 8ms); }
@keyframes pop { from { transform: scale(0); } }
.fee-legend { display: grid; gap: 10px; }
.fee-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); }
.fee-row i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -2px 3px rgb(0 0 0 / .15); }
.fee-row[data-k="burn"] i, .fee-grid i[data-k="burn"] { --c: linear-gradient(160deg, var(--amber), var(--ember)); }
.fee-row[data-k="dev"] i, .fee-grid i[data-k="dev"] { --c: linear-gradient(160deg, var(--fern), var(--moss)); }
.fee-row[data-k="treasury"] i, .fee-grid i[data-k="treasury"] { --c: linear-gradient(160deg, #b7a4ff, var(--violet)); }
.fee-row b { font: 700 18px/1.15 var(--body); }
.fee-row small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.fee-row .amt { font: 700 24px/1 var(--display); text-align: right; }
.worked { margin-top: 16px; font-size: 16px; color: var(--ink-2); padding: 14px 18px; border-radius: 16px; background: rgb(255 157 58 / .1); box-shadow: inset 0 0 0 1px rgb(255 157 58 / .25); max-width: none; }

/* ---------------------------------------------------------------- route */
.route { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 22px 0; }
.hop { display: grid; justify-items: center; gap: 8px; padding: 18px 18px 16px; min-width: 132px; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.hop img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 8px 8px rgb(19 38 29 / .15)); }
.hop b { font: 700 19px/1 var(--display); }
.hop span { font: 600 12px/1 var(--body); color: var(--muted); }
.pipe { position: relative; display: grid; place-items: center; min-width: 96px; padding: 0 10px; font: 600 12px/1.2 var(--body); color: var(--moss); text-align: center; }
.pipe::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: 12px; background: repeating-linear-gradient(90deg, var(--fern) 0 8px, transparent 8px 14px); background-size: 14px 2px; animation: flow 1s linear infinite; }
@keyframes flow { to { background-position: 14px 0; } }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
table { width: 100%; border-collapse: collapse; font: 500 15px/1.35 var(--body); }
th { font: 700 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 16px 16px 12px; white-space: nowrap; border-bottom: 1px solid var(--hair); }
td { padding: 13px 16px; border-bottom: 1px solid var(--hair); white-space: nowrap; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: rgb(255 255 255 / .6); }
.who { display: flex; align-items: center; gap: 12px; }
.who img { width: 40px; height: 40px; object-fit: contain; border-radius: 12px; background: var(--leaf-2); }
.who a { color: var(--ink); font-weight: 700; text-decoration: none; }
.who a:hover { color: var(--moss); }
.burnt { color: var(--ember); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--body); padding: 6px 10px; border-radius: 999px; color: var(--ink-2); background: var(--cream-2); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live { background: #e3f4d6; color: var(--moss); }
.status.warm { background: #fff0d9; color: #b35f00; }
.status.grad { background: #efe9ff; color: #5b43c9; }
.register { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 24px; max-width: 780px; padding: 22px; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.register .fine { grid-column: 1 / -1; margin: 0; }

/* ---------------------------------------------------------------- critter cards */
.colony-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr; color: var(--ink); text-decoration: none; border-radius: var(--r-xl); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); overflow: hidden; transition: transform .35s var(--spring), box-shadow .3s; }
.card:hover { transform: translateY(-5px); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-lg); }
/* Each card's art sits in its own little glass dome */
.card .jar { position: relative; display: grid; place-items: center; padding: 26px 0 16px; background: radial-gradient(60% 55% at 50% 58%, #fff, transparent 75%), linear-gradient(180deg, var(--teal), var(--leaf-2)); }
.card .jar::after { content: ""; position: absolute; left: 50%; bottom: 12px; width: 58%; height: 14px; margin-left: -29%; border-radius: 50%; background: radial-gradient(closest-side, rgb(19 38 29 / .16), transparent); z-index: 0; }
.card .jar > .specimen { position: relative; z-index: 1; --size: 150px; transition: transform .45s var(--spring); }
.card:hover .jar > .specimen { transform: translateY(-4px) scale(1.05); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card .t { font: 700 24px/1.05 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; }
.card .t span { font: 600 13px var(--body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.card .meta { font-size: 14px; color: var(--muted); }
.card .desc { font-size: 14px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0; }
.depth-badge { position: absolute; top: 14px; left: 14px; z-index: 2; font: 700 11px/1 var(--body); letter-spacing: .04em; color: var(--ink-2); background: var(--glass-strong); padding: 6px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--glass-edge); }
.grad-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
.bar { position: relative; height: 10px; border-radius: 999px; background: rgb(19 38 29 / .08); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--fern), var(--moss)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); transition: width .8s var(--ease); }
.bar.grad i { background: linear-gradient(90deg, #f3d98f, var(--brass)); }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.kv b { color: var(--ink); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.empty img { width: min(320px, 70%); height: auto; }
.empty h3 { font-size: 28px; }
.specimen { position: relative; width: var(--size, 96px); height: var(--size, 96px); display: grid; place-items: center; }
.specimen img, .specimen canvas { width: 100%; height: 100%; object-fit: contain; }
.specimen img.raw, .specimen canvas.pic { object-fit: cover; border-radius: 22%; box-shadow: 0 10px 20px -10px rgb(19 38 29 / .4); }
.specimen:has(> img[data-critter]:not(.ready))::before { content: ""; position: absolute; width: 56%; height: 56%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--leaf) 70%); animation: breathe 1.8s ease-in-out infinite; }
.specimen > img[data-critter] { position: relative; }
img[data-critter] { opacity: 0; transition: opacity .35s; }
img[data-critter].ready { opacity: 1; }

/* ---------------------------------------------------------------- launch */
.launch { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.form { display: grid; gap: 18px; padding: 28px; border-radius: var(--r-xl); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.drop { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: rgb(255 255 255 / .5); box-shadow: inset 0 0 0 1.5px var(--hair-2); font: 400 15px/1.45 var(--body); color: var(--ink-2); cursor: pointer; position: relative; transition: background .15s, box-shadow .15s; }
.drop:hover { background: rgb(255 255 255 / .8); }
.drop.over { background: var(--leaf-2); box-shadow: inset 0 0 0 2px var(--moss); }
.drop .specimen { --size: 104px; border-radius: 22px; background: linear-gradient(180deg, var(--teal), var(--leaf-2)); }
.drop b { font: 700 15px var(--body); color: var(--ink); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.summary { display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.stage { position: sticky; top: 100px; display: grid; justify-items: center; gap: 14px; padding: 30px 24px; border-radius: var(--r-xl); background: radial-gradient(70% 50% at 50% 30%, #fff, transparent 70%), linear-gradient(180deg, var(--teal), var(--leaf-2)); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.stage .specimen { filter: drop-shadow(0 20px 20px rgb(19 38 29 / .18)); }
.stage h3 { font-size: 36px; text-align: center; }
.stage .fine { text-align: center; color: var(--ink-2); }
.steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; width: 100%; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; background: rgb(255 255 255 / .7); font: 600 14px/1.2 var(--body); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.steps li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--hair-2); }
.steps li[data-s="doing"]::before { box-shadow: inset 0 0 0 2.5px var(--amber); border-top: 2.5px solid transparent; animation: spin .8s linear infinite; }
.steps li[data-s="done"] { color: var(--ink); }
.steps li[data-s="done"]::before { background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- footer */
.magma { position: relative; background: linear-gradient(180deg, #1c3327, #13261d); color: #e8efe6; overflow: hidden; }
.magma::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 120px; background: var(--moss-strip, none) bottom / auto 120px repeat-x; pointer-events: none; }
.magma-fire { display: none; }
.magma-inner { position: relative; padding: 130px 24px 40px; max-width: 1200px; margin: 0 auto; display: grid; gap: 16px; }
.magma-line { font: 650 clamp(32px, 4.4vw, 56px)/1.02 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.03em; color: #fff; max-width: 18ch; }
.magma-line::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .15em; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #ffd27a, var(--ember)); box-shadow: 0 0 24px rgb(255 157 58 / .7); vertical-align: .05em; }
.magma nav { display: flex; flex-wrap: wrap; gap: 6px; }
.magma nav a { font: 600 14px var(--body); color: #e8efe6; padding: 9px 14px; border-radius: 999px; background: rgb(255 255 255 / .07); text-decoration: none; transition: background .15s; }
.magma nav a:hover { background: rgb(255 255 255 / .16); color: #fff; }
.magma .fine { color: #9fb3a6; }
.gauge { display: none; }

/* ---------------------------------------------------------------- toast (was the dialog box) */
.dialog { position: fixed; left: 50%; bottom: 20px; z-index: 60; width: min(560px, calc(100vw - 32px)); transform: translate(-50%, 160%); display: grid; grid-template-columns: 34px 1fr 30px; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 18px; background: rgb(255 255 255 / .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-lg); transition: transform .45s var(--spring); font: 500 15px/1.4 var(--body); }
.dialog.open { transform: translate(-50%, 0); }
.dialog[data-tone="ok"] { box-shadow: inset 0 0 0 1.5px rgb(62 125 58 / .35), var(--shadow-lg); }
.dialog[data-tone="err"] { box-shadow: inset 0 0 0 1.5px rgb(200 65 44 / .4), var(--shadow-lg); }
.dialog p { margin: 0; max-width: none; overflow-wrap: anywhere; }
.dialog img, .dialog svg { width: 32px; height: 32px; }
.dialog button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgb(19 38 29 / .06); position: relative; font-size: 0; cursor: pointer; }
.dialog button:hover { background: rgb(19 38 29 / .12); }
.dialog button::before, .dialog button::after { content: ""; position: absolute; left: 9px; top: 14px; width: 12px; height: 2px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.dialog button::after { transform: rotate(-45deg); }

/* ---------------------------------------------------------------- subpages */
.page-head { position: relative; padding: 80px 24px 48px; background: radial-gradient(900px 400px at 85% 0%, #fffaf0, transparent 70%), linear-gradient(180deg, #f4efe0, var(--cream)); overflow: hidden; }
.page-head h1 { font-size: clamp(52px, 8vw, 104px); letter-spacing: -.045em; font-weight: 700; }
.page-head p { font-size: 20px; color: var(--muted); margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); }
.stat b { display: block; font: 700 32px/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font: 600 13px/1 var(--body); color: var(--muted); }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; padding: 8px; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); }
.toc a { font: 600 14px/1.2 var(--body); color: var(--ink-2); text-decoration: none; padding: 10px 12px; border-radius: 12px; }
.toc a:hover { background: rgb(255 255 255 / .8); color: var(--ink); }
.doc section { margin-bottom: 64px; }
.doc h2 { font-size: 44px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; max-width: 70ch; color: var(--ink-2); }
.doc code { font: 14px var(--mono); background: var(--leaf-2); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.doc table { font-size: 15px; }
.doc td { white-space: normal; }
.coin-head { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.coin-head .specimen { border-radius: var(--r-xl); background: radial-gradient(60% 55% at 50% 55%, #fff, transparent 75%), linear-gradient(180deg, var(--teal), var(--leaf-2)); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow); }
.coin-head .specimen canvas.jar3d { width: 100%; height: 100%; }
.coin-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 28px; align-items: start; margin-top: 28px; }
.chart { width: 100%; height: 280px; display: block; border-radius: var(--r-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-sm); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(19 38 29 / .06); }
.tabs button { flex: 1; min-height: 40px; font: 700 14px/1 var(--body); color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.quote { font-size: 15px; min-height: 2.5em; color: var(--muted); }
.trades td:first-child { font: 700 12px var(--body); letter-spacing: .06em; text-transform: uppercase; }
.buy { color: var(--moss); }
.sell { color: var(--danger); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero-copy { width: min(440px, 44vw); }
  .ticker { max-width: 60vw; }
}
@media (max-width: 960px) {
  .strip, .fees, .launch, .two, .coin-grid, .docs { grid-template-columns: 1fr; }
  .stage { position: static; }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .topbar nav { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .topbar nav a { padding: 9px 12px; }
  .stratum { padding: 72px 16px 64px; }
  .surface canvas.scene { height: 100svh; max-height: 860px; min-height: 640px; }
  .hero-copy { left: 0; right: 0; top: 22px; transform: none; width: auto; padding: 0 18px; justify-items: center; text-align: center; }
  .hero-copy h1 { font-size: 64px; }
  .hero-copy .sub { font-size: 17px; margin-top: 10px; }
  .hero-actions { justify-content: center; margin-top: 18px; }
  .hero-actions .btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
  .ticker { left: 12px; right: 12px; bottom: 12px; max-width: none; gap: 6px; }
  .ticker div { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 10px 12px; }
  .ticker b { font-size: 22px; }
  .lastburn { display: none; }
  .row2, .register { grid-template-columns: 1fr; }
  .coin-head { grid-template-columns: 1fr; justify-items: start; }
  .route { flex-direction: column; align-items: stretch; }
  .pipe { min-height: 44px; }
  .pipe::before { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; margin: 0; background: repeating-linear-gradient(180deg, var(--fern) 0 8px, transparent 8px 14px); animation: none; }
  .drop { grid-template-columns: 84px 1fr; }
  .dialog { bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* coin page: less air between the head and the stats; a compact route inside the trade panel */
.page-head + .stratum { padding-top: 40px; }
.panel .route { flex-wrap: nowrap; gap: 0; margin: 18px 0 6px; }
.panel .route .hop { min-width: 0; flex: 1 1 0; padding: 12px 8px 10px; gap: 6px; border-radius: 16px; }
.panel .route .hop img { width: 44px; height: 44px; }
.panel .route .hop b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.panel .route .pipe { min-width: 0; flex: 0 1 60px; padding: 0 4px; font-size: 11px; }
.panel .form { padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }

/* ---------------------------------------------------------------- theme art */
.topbar nav a { display: inline-flex; align-items: center; gap: 7px; }
.topbar nav a img { width: 22px; height: 22px; object-fit: contain; margin: -4px 0; transition: transform .3s var(--spring); }
.topbar nav a:hover img { transform: translateY(-2px) rotate(-6deg) scale(1.08); }
.brand .mark { object-fit: contain; filter: drop-shadow(0 3px 4px rgb(19 38 29 / .18)); }
.dialog .mark { width: 32px; height: 32px; }
.fee-row { grid-template-columns: 48px 1fr auto; }
.fee-row > img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 6px 6px rgb(19 38 29 / .15)); }
.fee-row > i { display: none; }
.fee-row b::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: .05em; }
.fee-row[data-k="burn"] { --c: linear-gradient(160deg, var(--amber), var(--ember)); }
.fee-row[data-k="dev"] { --c: linear-gradient(160deg, var(--fern), var(--moss)); }
.fee-row[data-k="treasury"] { --c: linear-gradient(160deg, #b7a4ff, var(--violet)); }
.drop .specimen img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 8px 8px rgb(19 38 29 / .18)); }
.coin-head .specimen > img[data-ui] { width: 100%; height: 100%; object-fit: contain; }
/* Ferns frame the hatch section and the page heads */
#launch, .page-head { isolation: isolate; }
#launch::after, .page-head::after { content: ""; position: absolute; inset: auto 0 0 0; height: min(420px, 60%); z-index: -1; pointer-events: none;
  background: var(--fern-left, none) left bottom / auto 100% no-repeat, var(--fern-right, none) right bottom / auto 100% no-repeat; opacity: .9; }
.page-head::after { height: 170px; opacity: .8; }
@media (max-width: 760px) {
  #launch::after, .page-head::after { height: 180px; opacity: .6; }
  .topbar nav a img { width: 18px; height: 18px; }
}

/* ---------------------------------------------------------------- how the tank works (modal) */
.how { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: min(640px, calc(100dvh - 32px)); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.how::backdrop { background: rgb(19 38 29 / .38); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); }
.how[open] .how-card { animation: how-in .55s var(--spring) both; }
.how[open]::backdrop { animation: fade-in .3s var(--ease) both; }
.how.closing .how-card { animation: how-out .22s var(--ease) both; }
.how.closing::backdrop { animation: fade-out .22s var(--ease) both; }
@keyframes how-in { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes how-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.how-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; max-height: inherit; border-radius: 32px; background: linear-gradient(180deg, rgb(255 255 255 / .9), rgb(246 243 234 / .92)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 40px 100px -30px rgb(19 38 29 / .55); overflow: hidden; }
.how-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 0 32px; }
.how-head h2 { font-size: 15px; font-family: var(--body); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); margin: 0; }
.how-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(19 38 29 / .06); color: var(--ink); font: 400 24px/1 var(--body); cursor: pointer; transition: background .15s, transform .25s var(--spring); }
.how-x:hover { background: rgb(19 38 29 / .12); transform: rotate(90deg); }
.how-track { position: relative; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; min-height: 0; touch-action: pan-y; }
.how-slide { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 12px; margin: 0; padding: 8px 32px 12px 16px; height: 100%; }
.how-slide[hidden] { display: none; }
.how-art { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3.2; }
.how-art::before { content: ""; position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(closest-side, rgb(207 232 184 / .9), rgb(223 243 236 / .5) 60%, transparent); }
.how-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 22px rgb(19 38 29 / .2)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
.how-slide figcaption { display: grid; gap: 10px; align-content: center; }
.how-pill { justify-self: start; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--moss); padding: 7px 11px; border-radius: 999px; background: var(--leaf-2); }
.how-slide h3 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1; letter-spacing: -.03em; font-weight: 700; margin: 2px 0 0; }
.how-slide p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.how-slide .bubble { justify-self: start; margin-top: 6px; font: 700 14px/1.3 var(--body); color: var(--ink); padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-sm); font-variant-numeric: tabular-nums; }
/* step entrance: the picture swings in from the direction of travel, the words follow */
.how-slide.in .how-art { animation: art-in .6s var(--spring) both; }
.how-slide.in figcaption > * { animation: text-in .5s var(--ease) both; }
.how-slide.in figcaption > :nth-child(2) { animation-delay: .05s; }
.how-slide.in figcaption > :nth-child(3) { animation-delay: .1s; }
.how-slide.in figcaption > :nth-child(4) { animation-delay: .16s; }
.how-slide[data-dir="back"].in .how-art { animation-name: art-in-back; }
@keyframes art-in { from { opacity: 0; transform: translateX(60px) scale(.9) rotate(4deg); } }
@keyframes art-in-back { from { opacity: 0; transform: translateX(-60px) scale(.9) rotate(-4deg); } }
@keyframes text-in { from { opacity: 0; transform: translateY(12px); } }
.how-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px 24px 32px; }
.how-dots { display: flex; gap: 8px; }
.how-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgb(19 38 29 / .15); cursor: pointer; transition: width .35s var(--spring), background .2s; }
.how-dots button.done { background: var(--fern); }
.how-dots button[aria-current] { width: 32px; background: var(--moss); }
.how-nav { display: flex; gap: 10px; }
.how-nav .btn { min-height: 46px; }
.how-nav .btn:disabled { opacity: 0; pointer-events: none; }
/* critters come straight after the hero now */
#colony { padding-top: 80px; }
@media (max-width: 760px) {
  .how { width: 100vw; max-height: 94dvh; margin: auto 0 0; }
  .how[open] .how-card { animation: sheet-in .45s var(--ease) both; }
  .how.closing .how-card { animation: sheet-out .22s var(--ease) both; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .how-card { border-radius: 26px 26px 0 0; }
  .how-head { padding: 16px 16px 0 22px; }
  .how-slide { grid-template-columns: 1fr; gap: 4px; padding: 0 22px 8px; align-content: start; }
  .how-art { aspect-ratio: 16 / 10; max-height: 34dvh; justify-self: center; width: 100%; }
  .how-slide h3 { font-size: 30px; }
  .how-slide p { font-size: 16px; }
  .how-foot { padding: 12px 16px max(18px, env(safe-area-inset-bottom)) 22px; }
  #colony { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { .how-art img { animation: none; } }

/* ---------------------------------------------------------------- page transitions */
main { display: block; outline: none; view-transition-name: page; }
.topbar { view-transition-name: topbar; }
.dialog { view-transition-name: toast; }
::view-transition-group(page) { animation: none; }
::view-transition-old(page) { animation: page-out .24s var(--ease) both; }
::view-transition-new(page) { animation: page-in .52s cubic-bezier(.16, 1, .3, 1) both; }
html[data-nav="back"]::view-transition-old(page) { animation-name: page-out-back; }
html[data-nav="back"]::view-transition-new(page) { animation-name: page-in-back; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; }
@keyframes page-out { to { opacity: 0; transform: translateX(-36px) scale(.985); filter: blur(3px); } }
@keyframes page-in { from { opacity: 0; transform: translateX(56px) scale(.99); } }
@keyframes page-out-back { to { opacity: 0; transform: translateX(36px) scale(.985); filter: blur(3px); } }
@keyframes page-in-back { from { opacity: 0; transform: translateX(-56px) scale(.99); } }
/* Same motion without view transitions */
main.page-out { animation: page-out .16s var(--ease) both; }
main.page-in { animation: page-in .5s cubic-bezier(.16, 1, .3, 1) both; }
html[data-nav="back"] main.page-out { animation-name: page-out-back; }
html[data-nav="back"] main.page-in { animation-name: page-in-back; }
/* Cards arrive one after another */
.grid .card { animation: card-in .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.ghost-card { min-height: 300px; background: linear-gradient(100deg, rgb(255 255 255 / .4) 40%, rgb(255 255 255 / .8) 50%, rgb(255 255 255 / .4) 60%) 0 0 / 300% 100%, var(--glass); animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0, 0 0; } }
/* Hatch has its own page head; one set of ferns is enough */
#launch::after { display: none; }
@media (max-width: 760px) {
  .page-head::after { background: var(--fern-right, none) right bottom / auto 100% no-repeat; height: 130px; opacity: .55; }
}
.surface img.scene.still { display: block; width: 100%; height: min(86vh, 820px); min-height: 560px; object-fit: cover; object-position: 75% center; }
/* Page heads: the left fern only where there's room beside the title */
.page-head::after { background: var(--fern-right, none) right bottom / auto 100% no-repeat; }
@media (min-width: 1400px) {
  .page-head::after { background: var(--fern-left, none) left bottom / auto 100% no-repeat, var(--fern-right, none) right bottom / auto 100% no-repeat; }
}
/* ---------------------------------------------------------------- how it works: fee legend, worked example, route */
.how-legend { display: grid; gap: 6px; margin-top: 4px; }
.how-legend .fee-row { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 8px 12px; border-radius: 14px; }
.how-legend .fee-row > img { width: 34px; height: 34px; }
.how-legend .fee-row b { font-size: 14px; }
.how-legend .fee-row small { font-size: 12px; margin-top: 0; }
.how-legend .fee-row .amt { font-size: 17px; }
.how-legend .fine { margin: 2px 0 0; font-size: 12px; }
.how-worked { margin: 4px 0 0 !important; font-size: 14px !important; padding: 10px 14px; border-radius: 12px; background: rgb(255 157 58 / .1); box-shadow: inset 0 0 0 1px rgb(255 157 58 / .25); }
.how-art.how-route { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 8px 0; }
.how-route .hop { position: relative; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; justify-items: start; gap: 12px; width: min(300px, 86%); padding: 8px 16px 8px 10px; border-radius: 16px; }
.how-route .hop img { width: 40px; height: 40px; }
.how-route .hop b { font-size: 17px; }
.how-route .hop span { font-size: 12px; justify-self: end; }
.how-route .pipe { position: relative; flex: none; height: 26px; width: min(300px, 86%); padding: 0 0 0 58px; display: flex; align-items: center; justify-content: flex-start; font-size: 11px; color: var(--moss); }
.how-route .pipe::before { left: 29px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; margin: 0; background: repeating-linear-gradient(180deg, var(--fern) 0 6px, transparent 6px 11px); background-size: 2px 11px; animation: flow-down 1s linear infinite; }
@keyframes flow-down { to { background-position: 0 11px; } }
.how-slide.in .how-route .hop { animation: text-in .5s var(--ease) both; }
.how-slide.in .how-route .hop:nth-child(3) { animation-delay: .08s; }
.how-slide.in .how-route .hop:nth-child(5) { animation-delay: .16s; }
.how-slide.in .how-route .hop:nth-child(7) { animation-delay: .24s; }
.how-slide.in .how-art.how-route { animation: none; }
@media (max-width: 760px) {
  .how-art.how-route { aspect-ratio: auto; max-height: none; padding: 12px 0; }
  .how-route .hop { padding: 8px 14px 8px 10px; }
  .how-route .hop img { width: 36px; height: 36px; }
  .how-route .pipe { height: 20px; }
}
