/* Onchain Wrapped by Mintward. Tokens from brand/tokens.css: spruce ink, bone paper, one mint signal (lines only). */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/SchibstedGrotesk-var.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --spruce: #072018; --spruce-2: #183129; --night-2: #0d1f19; --rule: #263731;
  --bone: #f7f5ee; --fog: #9aa8a3; --mint: #77ebbe;
  --display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--spruce); color: var(--bone); }
body { font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
#app { max-width: 520px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--mint); }
main { flex: 1; display: flex; flex-direction: column; }

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0 14px; }
.top .name { font: 700 19px/1 var(--display); letter-spacing: -0.01em; }
.top .name span { font: 500 13px var(--mono); color: var(--fog); letter-spacing: 0.2em; margin-left: 6px; }
.top .by { display: inline-flex; align-items: center; gap: 6px; color: var(--fog); text-decoration: none; font: 500 12px var(--body); }
.mark { width: 15px; height: 13px; }

.kicker { font: 500 12px/1 var(--mono); letter-spacing: 0.22em; color: var(--fog); margin: 0 0 14px; padding-left: 12px; border-left: 3px solid var(--mint); }
h1 { font: 800 clamp(44px, 13vw, 64px)/0.95 var(--display); letter-spacing: -0.035em; margin: 18px 0 16px; }
h2 { font: 800 30px/1.05 var(--display); letter-spacing: -0.02em; margin: 6px 0 18px; }
.lede { color: #d9dcd4; font-size: 17px; margin: 0 0 22px; max-width: 34ch; }
.ref { font-size: 17px; margin: 0 0 22px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--night-2); }
.muted { color: var(--fog); }
.fine { color: var(--fog); font-size: 13px; margin: 10px 0 0; }
.label { font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fog); margin: 0 0 8px; }
.notice { color: var(--bone); background: var(--spruce-2); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.hero { padding-top: 6vh; }

.btn { font: 600 16px/1 var(--body); border: 0; border-radius: 8px; padding: 15px 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s ease, background .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--bone); color: var(--spruce); width: 100%; font-size: 17px; }
.btn.ghost { background: transparent; color: var(--bone); border: 1px solid var(--rule); }
.btn.ghost:hover { border-color: var(--fog); }
.btn.link { background: none; color: var(--fog); padding: 10px 4px; font-weight: 500; font-size: 14px; }
.btn.wide { width: 100%; font-size: 15px; line-height: 1.3; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.chips { margin-top: 26px; }
.chip { font: 500 14px var(--mono); color: var(--bone); background: var(--night-2); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 11px; margin: 0 8px 8px 0; cursor: pointer; }
.other { margin-top: 26px; }
.lookup { display: flex; gap: 8px; }
.lookup input { flex: 1; min-width: 0; font: 500 15px var(--mono); color: var(--bone); background: var(--night-2); border: 1px solid var(--rule); border-radius: 8px; padding: 13px 12px; }
.lookup input::placeholder { color: #6f7d78; }

.preview { margin: 34px -8px 0; }
.preview img { width: 100%; height: auto; display: block; }
.preview figcaption { color: var(--fog); font-size: 12px; text-align: center; margin-top: 2px; }

/* loading */
.loading { padding-top: 8vh; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--fog); transition: color .2s; }
.steps i { width: 10px; height: 10px; border: 1px solid var(--rule); flex: none; }
.steps li[data-state="run"] { color: var(--bone); }
.steps li[data-state="run"] i { border-color: var(--mint); animation: pulse 1s ease-in-out infinite; }
.steps li[data-state="ok"] { color: var(--bone); }
.steps li[data-state="ok"] i { background: var(--bone); border-color: var(--bone); }
.steps li[data-state="warn"] i { background: var(--fog); border-color: var(--fog); }
.steps li[data-state="skip"] { opacity: .45; }
@keyframes pulse { 50% { opacity: .3; } }

/* story */
body.storymode .foot { display: none; }
.story { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.segs { display: flex; gap: 4px; }
.segs i { flex: 1; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.segs i.done { background: var(--fog); }
.segs i.now { background: var(--bone); }
.stage { position: relative; flex: 1; min-height: 430px; display: flex; }
.tap { position: absolute; top: 0; bottom: 0; width: 34%; background: transparent; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tap.prev { left: 0; } .tap.next { right: 0; width: 66%; }
.card { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 22px; border: 1px solid var(--rule); border-radius: 10px; background: var(--night-2); animation: enter .45s var(--ease) both; overflow: hidden; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.card .kicker { margin-bottom: 26px; }
.herow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big { font: 800 64px/0.95 var(--display); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.big.huge { font-size: clamp(72px, 24vw, 128px); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.big.display { font-size: clamp(44px, 13vw, 72px); }
.unit { font: 700 26px var(--display); color: var(--fog); }
.line { font-size: 18px; margin: 18px 0 0; max-width: 32ch; }
.line + .line { margin-top: 6px; }
.line.muted { color: var(--fog); font-size: 16px; }
.applist { list-style: none; margin: 0; padding: 0; }
.applist li { display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--rule); animation: enter .45s var(--ease) both; }
.applist li:nth-child(2) { animation-delay: .08s; } .applist li:nth-child(3) { animation-delay: .16s; }
.applist .rank { font: 500 13px var(--mono); color: var(--fog); }
.applist .nm { font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.applist .val { color: var(--fog); font-size: 15px; white-space: nowrap; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; height: 126px; align-items: end; margin-top: 22px; }
.bars i { display: block; height: max(2px, calc(var(--p) * 126px)); background: var(--rule); transform-origin: bottom; animation: grow .6s var(--ease) both; animation-delay: var(--d); }
.bars i.top { background: var(--bone); }
.barlabels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin-top: 6px; font: 500 10px var(--mono); color: var(--fog); text-align: center; }
@keyframes grow { from { transform: scaleY(0); } }
.c-summary .big, .c-persona .big { font-size: clamp(38px, 11vw, 58px); line-height: 1; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule); }
.grid .label { display: block; margin-bottom: 4px; }
.grid b { font: 800 30px/1.05 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.actions.one { grid-template-columns: 1fr; }
.c-intro .big { font-size: clamp(48px, 15vw, 80px); }
.after .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 6px; }
.after .fine { text-align: center; }

.hero.share { text-align: left; }
.shot { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--rule); margin: 8px 0 16px; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--bone); color: var(--spruce); font-weight: 600; padding: 10px 16px; border-radius: 8px; z-index: 10; animation: enter .25s var(--ease) both; }
.foot { color: var(--fog); font-size: 12px; line-height: 1.5; padding-top: 28px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
