/* RING: warm paper, one sap-green accent, two fonts (Geist, Geist Mono), one radius. The wood lives in the art. */
:root {
  --paper: #f3eee6; --paper-2: #ebe4d8; --paper-3: #e3dacb; --ink: #1d1a16; --ink-2: #5f574d; --ink-3: #8a8073; --rule: #d8cebf;
  --accent: #3d7d3f; --accent-2: #2f6531; --accent-wash: rgba(61, 125, 63, .1);
  --r: 8px; --bar: 60px; --cab: 0px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + var(--cab)); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, canvas { display: block; }
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.dim { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent; font: 500 16px/1 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.line:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }
input[type=text], input:not([type]), input[inputmode] { font: 400 16px/1 var(--mono); color: var(--ink); background: #fbf8f3; border: 1px solid var(--rule); border-radius: var(--r); height: 46px; padding: 0 14px; min-width: 0; }
input::placeholder { color: var(--ink-3); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }

/* ---------- CA strip (shown once a CA is set) ---------- */
.cab { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 34px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px; background: var(--ink); color: var(--paper); font: 500 13px/1 var(--mono); }
.cab-tk { color: #9ecf8f; }
.cab-ca .ca-short { display: none; }
.cab-copy, .cab-link { background: none; border: 1px solid rgba(243, 238, 230, .3); color: var(--paper); border-radius: var(--r); height: 24px; padding: 0 10px; font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
body.has-cab { --cab: 34px; }

/* ---------- bar ---------- */
.bar { position: fixed; top: var(--cab); left: 0; right: 0; z-index: 50; height: var(--bar); transition: background .2s, border-color .2s; border-bottom: 1px solid transparent; }
.bar.solid { background: rgba(243, 238, 230, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: var(--rule); }
.bar-in { height: 100%; width: min(1320px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--sans); letter-spacing: .02em; }
.mark-img { width: 28px; height: 28px; max-width: none; aspect-ratio: 1; flex: none; image-rendering: pixelated; }
.nav { display: flex; gap: 24px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav a:hover { color: var(--ink); }
.wallet { position: relative; margin-left: auto; }
.wallet-btn { height: 38px; padding: 0 10px 0 14px; font-size: 15px; background: rgba(251, 248, 243, .7); }
.wb-logo { width: 20px; height: 20px; max-width: none; flex: none; }
.wallet-btn.signed { font-family: var(--mono); font-size: 13px; padding-right: 14px; }
.wallet-btn.signed .wb-logo { display: none; }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 12px; background: #fbf8f3; border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 18px 40px rgba(40, 30, 20, .14); z-index: 70; }
.wallet-menu button, .wallet-menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 8px; background: none; border: 0; border-top: 1px solid var(--rule); font: 500 15px var(--sans); color: var(--ink); text-align: left; cursor: pointer; text-decoration: none; }
.wallet-menu button:hover, .wallet-menu a:hover { background: var(--paper-2); }
.wm-s { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.4; }
.wm-h { font-size: 12px; word-break: break-all; margin-bottom: 6px; }
.wm-s.err { color: #a33a26; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-grid { position: relative; min-height: 100vh; min-height: 100svh; width: min(1320px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 56px; align-items: center; padding: calc(var(--bar) + var(--cab) + 8px) 0 24px; }
.hero-left { position: relative; min-height: 420px; display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { font-size: clamp(44px, 5.4vw, 76px); }
.lede { margin-top: 18px; font-size: 20px; line-height: 1.45; color: var(--ink-2); max-width: 26em; }
.look { margin-top: 30px; }
.look-row { display: flex; gap: 8px; }
.look-row input { flex: 1; height: 52px; font-size: 15px; }
.look-row .btn { height: 52px; padding: 0 24px; }
.look-alt { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.look-alt .btn { height: 40px; font-size: 15px; }
.hint { min-height: 22px; margin-top: 10px; font-size: 14px; color: #a33a26; }
.hint a { color: var(--accent-2); }
.hero-copy, .result, .dive { transition: opacity .35s, transform .35s; }
.hero-copy.out { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.btn.breathe { animation: breathe 1.4s ease-in-out 1; }
@keyframes breathe { 50% { box-shadow: 0 0 0 8px var(--accent-wash); } }

.hero-right { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.slice-box { position: relative; width: min(100%, calc(100vh - var(--bar) - var(--cab) - 170px), 660px); aspect-ratio: 1; touch-action: pan-y; }
.slice-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#sliceOver, #zoomCv { pointer-events: none; }
#zoomCv { opacity: 0; transition: opacity .3s; }
#zoomCv.on { opacity: 1; }
.scrub { width: min(100%, 560px); margin-top: 14px; }
.scrub input[type=range] { width: 100%; }
.scrub-read { min-height: 2.9em; margin-top: 4px; color: var(--ink-2); text-align: center; line-height: 1.45; }
.scrub-read b { font-weight: 500; color: var(--ink); }
.scrub-read .ev { color: var(--accent-2); }
.slice-cap { color: var(--ink-3); text-align: center; margin-top: 2px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
input[type=range]::-moz-range-track { height: 2px; background: var(--rule); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--accent); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }

/* the dive: a live readout of every step */
.dive { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.steps li { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 12px; color: var(--ink-3); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s, color .25s; }
.steps li > span { min-width: 0; }
.steps li.on { opacity: 1; transform: none; color: var(--ink-2); }
.steps li.done { color: var(--ink); }
.steps li::before { content: ""; width: 9px; height: 9px; margin-top: 4px; background: var(--rule); }
.steps li.on::before { background: var(--accent); animation: blink .5s steps(2) infinite; }
.steps li.done::before { background: var(--ink); animation: none; }
.steps .v { display: block; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .sk { display: block; color: var(--ink-3); }
@keyframes blink { 50% { opacity: .2; } }
.dive-year { margin-top: 14px; font: 600 clamp(40px, 4.6vw, 64px)/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-height: 1em; }
.dive-event { min-height: 1.4em; margin-top: 8px; color: var(--accent-2); }
.skip { margin-top: 14px; align-self: flex-start; font-size: 14px; }
.hero.diving .scrub, .hero.diving .slice-cap { visibility: hidden; }

/* the result */
.result { position: relative; }
.res-row { color: var(--ink-3); }
.res-head { margin-top: 12px; font-size: clamp(32px, 3.3vw, 46px); line-height: 1.08; }
.res-sub { margin-top: 14px; font-size: 18px; color: var(--ink-2); line-height: 1.45; }
.res-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule); }
.res-facts dt { color: var(--ink-3); }
.res-facts dd { margin: 0; color: var(--ink); }
.res-events { margin-top: 14px; display: grid; gap: 6px; }
.res-events p { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.res-events b { font-weight: 600; color: var(--ink); }
.res-events .yr { font-family: var(--mono); font-size: 13px; color: var(--accent-2); margin-right: 6px; }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }
.res-saved { margin-top: 10px; color: var(--accent-2); }
.res-credit { margin-top: 14px; color: var(--ink-3); font-size: 12px; }
.res-credit a { color: inherit; }

/* the unroll: the slice leaves the hero and opens into a timeline as you scroll */
.unroll { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; }
.unroll.on { display: block; }
.unroll canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.unroll-space { position: relative; height: 72vh; }
.axis { position: absolute; inset: 0; color: var(--ink-2); pointer-events: none; }
.axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: 12px; }
.axis span::before { content: ""; position: absolute; left: 50%; top: -10px; width: 1px; height: 7px; background: var(--ink-3); }
.axis span.up::before { top: auto; bottom: -10px; }
.axis .ev { color: var(--accent-2); }
.axis .ev::before { background: var(--accent); }
.unroll-space.static .unroll { position: absolute; display: block; }

/* ---------- sections ---------- */
.sect { padding: 120px 0; }
.sect-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: end; margin-bottom: 48px; }
.sect-head h2, .core-sect h2 { font-size: clamp(34px, 4vw, 54px); }
.sect-head p { color: var(--ink-2); font-size: 18px; }
.core-sect { padding: 72px 0 40px; }
.core-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; }
.core-copy { display: grid; gap: 16px; color: var(--ink-2); font-size: 18px; }
.core-copy p:last-child { color: var(--ink); }

/* schematic */
.schem { position: relative; }
.schem svg { width: 100%; height: auto; overflow: visible; }
.schem .node rect { fill: #fbf8f3; stroke: var(--rule); }
.schem .node.here rect { stroke: var(--ink-2); }
.schem .node.live rect { stroke: var(--accent); }
.schem .node.launch rect { stroke-dasharray: 4 4; stroke: var(--ink-3); }
.schem .nt { font: 600 17px var(--sans); fill: var(--ink); }
.schem .nv { font: 400 13px var(--mono); fill: var(--ink-2); }
.schem .wire { stroke: var(--rule); stroke-width: 2; fill: none; }
.schem .pkt { fill: var(--accent); }
.schem .pv { font: 500 12px var(--mono); fill: var(--accent-2); }
.schem { max-width: 1200px; }
.honesty { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; color: var(--ink-2); }
.honesty span { display: inline-flex; align-items: center; gap: 8px; }
.k { display: inline-block; width: 18px; height: 10px; border: 1.5px solid var(--ink-2); }
.k.live { border-color: var(--accent); }
.k.launch { border-style: dashed; border-color: var(--ink-3); }

/* example trees */
.tree-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tcard { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 18px; background: #f8f4ed; border: 1px solid var(--rule); border-radius: var(--r); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.tcard canvas { width: 112px; height: 112px; }
.tcard h3 { font-size: 18px; line-height: 1.2; letter-spacing: -.01em; }
.tcard .tp { color: var(--ink-2); font-size: 14px; margin-top: 4px; line-height: 1.35; }
.tcard .tf { margin-top: 10px; color: var(--ink); }
.tcard .tt { color: var(--accent-2); }

/* forest */
.map { position: relative; width: 100%; aspect-ratio: 240 / 94; }
.map canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); padding: 8px 10px; border-radius: var(--r); font-size: 12px; line-height: 1.4; max-width: 260px; transform: translate(-50%, calc(-100% - 12px)); }
.map-key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; color: var(--ink-2); }
.map-key span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; display: inline-block; }
.dot.arch { background: #b9ae9c; }
.dot.hold { background: var(--accent); }
.years { margin-top: 64px; }
.years-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 18px; }
.cover { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cover-n { font: 600 clamp(48px, 6vw, 84px)/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cover-l { font-size: 20px; color: var(--ink-2); max-width: 20em; }
.cover-note { color: var(--ink-3); max-width: 34em; }
#yearsCv { width: 100%; height: auto; aspect-ratio: 800 / 96; image-rendering: pixelated; }
.years-axis { display: flex; justify-content: space-between; color: var(--ink-3); margin-top: 6px; }
.below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; margin-top: 72px; }
.below h3 { font-size: 22px; margin-bottom: 16px; }
.rarity-list { list-style: none; margin: 0; padding: 0; }
.rarity-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.rarity-list .rn { color: var(--ink); font-family: var(--sans); font-size: 16px; font-weight: 500; }
.rarity-list .rr { grid-column: 1; color: var(--ink-2); }
.rarity-list .rs { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--ink); }
.fine { margin-top: 14px; color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.ledger-table { display: grid; }
.ledger-table .lr { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); text-decoration: none; align-items: baseline; }
.ledger-table .lr:hover { background: var(--paper-2); }
.ledger-table .ls { font-family: var(--sans); font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-table .lm { color: var(--ink-3); }
.ledger-table .empty { padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-2); font-family: var(--sans); font-size: 15px; }

/* ---------- studio ---------- */
.studio { position: fixed; inset: 0; z-index: 80; background: var(--paper); overflow: auto; }
.studio-in { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: center; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 32px 0; }
.studio-preview { display: flex; justify-content: center; }
.studio-preview canvas { width: auto; height: min(calc(100vh - 64px), 900px); max-width: 100%; aspect-ratio: 4 / 5; object-fit: contain; box-shadow: 0 24px 60px rgba(40, 30, 20, .16); border-radius: 2px; }
.studio-controls h2 { font-size: 34px; }
.studio-note { margin-top: 12px; color: var(--ink-2); font-size: 16px; }
.ctl { margin-top: 22px; }
.ctl-l { display: block; font-weight: 500; margin-bottom: 8px; }
.ctl-d { margin-top: 6px; color: var(--ink-2); }
.span-row { display: grid; gap: 2px; }
.span-row input { width: 100%; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 38px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r); background: #fbf8f3; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg button[aria-checked=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg .sw { width: 14px; height: 14px; }
.mark-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 28px; }
.mint-note { margin-top: 10px; color: var(--ink-2); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 56px 0 64px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.1fr .8fr 1.6fr; gap: 40px; }
.foot-brand p { margin-top: 14px; color: var(--ink-2); font-size: 15px; max-width: 24em; }
.foot-meta p { margin-bottom: 6px; color: var(--ink-2); word-break: break-all; }
.foot-credits p { color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }

/* ---------- fx overlay, reveals ---------- */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 95; pointer-events: none; image-rendering: pixelated; display: none; }
#fx.on { display: block; }
#fx.block { pointer-events: auto; }
.grow-in { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }

/* static screenshots */
.static-shot *, .static-shot *::before { animation: none !important; transition: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tree-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-credits { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --bar: 56px; }
  body { font-size: 16px; }
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; align-items: start; padding: calc(var(--bar) + var(--cab) + 4px) 0 24px; width: calc(100% - 32px); }
  .hero-right { order: -1; padding-top: 6px; }
  .steps li.done:not(:nth-last-child(-n+2)) { display: none; }
    .unroll-space { height: 56vh; }
  .slice-box { width: min(78vw, 42vh, 420px); }
  .scrub { margin-top: 8px; }
  .hero.idle .scrub input { display: none; }
  .hero.idle .scrub-read { min-height: 0; }
  .scrub-read { min-height: 2.9em; font-size: 12px; }
  .hero-left { min-height: 0; justify-content: flex-start; padding-top: 10px; }
  .hero-copy h1 { font-size: clamp(36px, 10vw, 52px); }
  .lede { font-size: 17px; margin-top: 10px; }
  .look { margin-top: 18px; }
  .look-row input { height: 48px; }
  .look-row .btn { height: 48px; padding: 0 16px; }
  .dive { position: relative; inset: auto; }
    .dive-year { font-size: 40px; margin-top: 10px; }
  .skip { position: static; margin-top: 8px; align-self: flex-start; }
  .res-head { font-size: 28px; margin-top: 8px; }
  .res-sub { font-size: 16px; margin-top: 10px; }
  .sect { padding: 80px 0; }
  .sect-head, .core-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .core-copy { font-size: 16px; }
  .below { grid-template-columns: 1fr; gap: 48px; }
  .studio-in { grid-template-columns: 1fr; gap: 24px; padding: 20px 0 40px; }
  .studio-preview canvas { height: auto; width: min(100%, 60vh); }
  .wrap { width: calc(100% - 32px); }
}
@media (max-width: 640px) {
  .tree-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .tcard { grid-template-columns: 88px 1fr; }
  .tcard canvas { width: 88px; height: 88px; }
  .cab-ca .ca-full { display: none; }
  .cab-ca .ca-short { display: inline; }
  .wallet-btn { height: 36px; }
  .cover-l { font-size: 17px; }
}
@media (max-width: 380px) {
  .look-alt { gap: 12px; }
  .look-row .btn { padding: 0 12px; }
  .mark span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}
