/* HANDY. Colours come from tokens.css (generated from assets/tokens.json). */
@font-face { font-family: 'Geist'; src: url('/assets/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 'Geist', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, pre { font-family: 'Geist Mono', ui-monospace, monospace; }
kbd { font-size: 12px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-weight: 500; white-space: nowrap; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
html, body { overflow-x: clip; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

/* ---------- type ---------- */
.hd { font-weight: 600; font-size: clamp(40px, 5.4vw, 80px); line-height: 1.02; letter-spacing: -0.045em; margin: 0; text-wrap: balance; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.h2 { font-weight: 600; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.06; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.h3 { font-weight: 600; font-size: 20px; letter-spacing: -0.015em; margin: 0 0 10px; }
.lede { color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); max-width: 60ch; margin: 18px 0 0; text-wrap: pretty; }
.center { text-align: center; margin-inline: auto; }

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; text-decoration: none; cursor: pointer; font-weight: 500; font-size: 15px; transition: background .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.solid kbd { border-color: color-mix(in srgb, var(--bg) 30%, transparent); color: inherit; opacity: .7; }
.btn.ghost:hover { background: var(--panel2); border-color: color-mix(in srgb, var(--line) 60%, var(--ink)); }
.btn.link { border: 0; padding: 0; height: auto; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.btn.link:hover { color: var(--ink); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.big { height: 52px; padding: 0 26px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: progress; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 14.5px; transition: background .2s, border-color .2s, color .2s; }
.pill:hover { background: var(--panel2); border-color: color-mix(in srgb, var(--line) 50%, var(--ink)); }
.pill.strong { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill.strong:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill .n, .foot .n, .cols { color: var(--muted); font-variant-numeric: tabular-nums; }
.ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .2s; color: var(--ink); }
.ico:hover { background: var(--panel2); }
.ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico svg .fill { fill: currentColor; stroke: none; }
.ico.sm { width: 30px; height: 30px; }
.ico.sm svg { width: 15px; height: 15px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px clamp(16px, 3.4vw, 48px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: box-shadow .3s; }
.top.scrolled { box-shadow: 0 1px 0 var(--line); }
.mark { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; justify-self: start; }
.mark-word { font-weight: 650; font-size: 22px; letter-spacing: -0.04em; }
.mark-dot { width: 9px; height: 9px; border-radius: 2.5px; background: var(--accent); margin-top: 6px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--panel2); }
.top-r { display: flex; align-items: center; gap: 8px; justify-self: end; }
.find { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; transition: border-color .2s; }
.find:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--ink)); color: var(--ink); }
.find svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.ca span { color: var(--muted); font-size: 13px; }
.ca b { font: 500 13px 'Geist Mono', monospace; }
.buy { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.buy[hidden], .ca[hidden] { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vh, 120px) clamp(16px, 4vw, 56px) 72px; isolation: isolate; }
.mosaic { position: absolute; inset: -40px 0 auto; height: 560px; z-index: -1; display: flex; flex-direction: column; gap: 14px; opacity: .5; mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.85) 40%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.85) 40%, transparent 100%); }
.mosaic::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 46%, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 100%); }
.mrow { overflow: hidden; }
.mtrack { display: flex; gap: 14px; width: max-content; animation: drift var(--dur, 100s) linear infinite; }
.mtrack.rev { animation-direction: reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tile { flex: none; padding: 26px 30px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.tile.hot { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hero-in { max-width: 980px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .hd { font-size: clamp(44px, 6.2vw, 92px); max-width: 15ch; }
.hero .lede { margin-inline: auto; }
.proof { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; padding: 0; }
.proof li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.proof a { text-decoration: none; color: var(--ink); }
.rise { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* the drop panel */
.drop { position: relative; width: min(860px, calc(100vw - 32px)); margin: 36px auto 0; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 8px; transition: border-color .2s, box-shadow .3s; box-shadow: 0 30px 80px -40px rgba(0,0,0,.8); }
.drop:focus-within { border-color: color-mix(in srgb, var(--line) 40%, var(--ink)); }
.drop textarea { display: block; width: 100%; resize: vertical; min-height: 96px; max-height: 50vh; padding: 16px 18px; background: transparent; border: 0; outline: none; font-size: 17px; line-height: 1.5; }
.drop textarea::placeholder { color: var(--muted); }
.drop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.drop-bar .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.drop-bar .btn svg { width: 16px; height: 16px; }
.drop-bar .btn:hover svg { transform: none; }
.drop-hint { margin-left: auto; color: var(--muted); font-size: 13.5px; padding-right: 8px; }
.drop-veil { position: absolute; inset: 0; border-radius: 24px; display: grid; place-items: center; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border: 2px dashed var(--accent); opacity: 0; pointer-events: none; transition: opacity .15s; }
.drop.over .drop-veil { opacity: 1; }
.found { width: min(860px, calc(100vw - 32px)); margin: 0 auto; text-align: left; }
.found-in { margin-top: 12px; padding: 20px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }
.found-what { margin: 0; font-size: 17px; } .found-what span { color: var(--muted); }
.found-say { margin: 6px 0 14px; color: var(--muted); font-size: 15px; }
.found-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.found-more { margin-top: 10px; } .found-more summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }
.found .btn.link { margin-top: 14px; }
.quick { margin-top: 30px; width: min(860px, 100%); }
.quick p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.quick .pills { justify-content: center; }

/* recent and favorites, an accordion like the inspiration's history */
.memory { width: min(860px, calc(100vw - 32px)); margin: 34px auto 0; text-align: left; display: grid; gap: 8px; }
.acc { border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
.acc summary, .qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 500; }
.acc summary::-webkit-details-marker, .qa summary::-webkit-details-marker { display: none; }
.acc-b { padding: 0 20px 18px; }
.acc-b .btn.link { margin-top: 12px; font-size: 14px; }
.pm { position: relative; width: 14px; height: 14px; flex: none; }
.pm::before, .pm::after { content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.pm::after { transform: rotate(90deg); }
details[open] > summary .pm::after { transform: rotate(0); }
.empty { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- shelves ---------- */
.shelves { max-width: 1240px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 40px; display: grid; gap: 150px; }
.shelf { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.shelf-h { position: sticky; top: 110px; }
.shelf-h p { color: var(--muted); font-size: 17px; margin: 16px 0 24px; max-width: 34ch; }
.shelf-l, .grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 48px; }
.tcard { position: relative; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); transition: border-color .25s, transform .25s, background .25s; }
.tcard:hover { border-color: color-mix(in srgb, var(--line) 55%, var(--ink)); transform: translateY(-2px); }
.tcard-a { display: flex; flex-direction: column; gap: 8px; padding: 22px 54px 24px 22px; text-decoration: none; min-height: 140px; height: 100%; }
.tcard-n { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.tcard-d { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.fav { position: absolute; right: 12px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 999px; cursor: pointer; color: var(--muted); }
.fav svg, .fav-big svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fav:hover { background: var(--panel2); color: var(--ink); }
.fav.on, .fav-big.on { color: var(--accent-ink); }
.fav.on svg, .fav-big.on svg { fill: currentColor; }
.fav-big:hover svg { transform: none; }

/* scroll reveals */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms), transform .7s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms), border-color .25s, background .25s; }
.rv.in { opacity: 1; transform: none; }
.tcard.rv.in:hover { transform: translateY(-2px); }
.line { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line > span { display: inline-block; transform: translateY(105%); transition: transform .9s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms); }
.line.in > span { transform: none; }

/* ---------- chain band ---------- */
.chains-band { max-width: 1240px; margin: 110px auto 0; padding: 0 clamp(16px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.cb-h { position: sticky; top: 110px; }
.cb-h p { color: var(--muted); font-size: 17px; margin: 16px 0 26px; max-width: 38ch; }
.cb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cb-step { position: relative; padding: 34px 30px 34px 64px; border-left: 1px solid var(--line); margin-left: 16px; min-height: 34vh; display: flex; flex-direction: column; justify-content: center; }
.cb-step::before { content: ''; position: absolute; left: -9px; top: 50%; width: 17px; height: 17px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); transform: translateY(-50%); transition: background .4s, border-color .4s; }
.cb-n { font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.035em; color: var(--muted); transition: color .4s; }
.cb-d { color: var(--muted); max-width: 40ch; margin-top: 8px; opacity: .5; transition: opacity .4s; }
.cb-step.lit::before { background: var(--accent); border-color: var(--accent); }
.cb-step.lit .cb-n { color: var(--ink); }
.cb-step.lit .cb-d { opacity: 1; }

/* ---------- how ---------- */
.how { max-width: 1240px; margin: 150px auto 0; padding: 0 clamp(16px, 4vw, 48px); }
.how .h2 { max-width: 18ch; }
.how-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 56px; }
.how-c { padding: 30px 28px 34px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.how-c h3 { font-size: 24px; letter-spacing: -0.03em; margin: 26px 0 10px; font-weight: 600; }
.how-c p { color: var(--muted); margin: 0; }
.glyph { display: block; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); position: relative; }
.glyph::after { content: ''; position: absolute; left: 13px; bottom: 11px; width: 16px; height: 16px; border-radius: 4px; background: var(--accent); animation: bob 3.2s ease-in-out infinite; }
.glyph.g2::after { left: 14px; top: 14px; bottom: auto; border-radius: 999px; animation-delay: .4s; }
.glyph.g3::after { width: 22px; height: 6px; left: 10px; bottom: 12px; animation-delay: .8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- faq ---------- */
.faq { max-width: 1240px; margin: 150px auto 0; padding: 0 clamp(16px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.faq-h p { color: var(--muted); font-size: 17px; margin-top: 16px; }
.faq-l { display: grid; gap: 8px; }
.qa { border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.qa summary { font-size: 17px; padding: 20px 22px; }
.qa p { margin: 0; padding: 0 22px 22px; color: var(--muted); max-width: 62ch; }

/* ---------- closing ---------- */
.close { position: relative; overflow: hidden; margin-top: 150px; padding: 140px 24px 160px; text-align: center; isolation: isolate; }
.close-h { font-size: clamp(40px, 6vw, 96px); max-width: 14ch; margin: 0 auto 36px; }
.horizon { position: absolute; left: 50%; bottom: -78%; width: 160%; aspect-ratio: 1; transform: translateX(-50%) translateY(14%); border-radius: 50%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent) 0%, color-mix(in srgb, var(--accent) 10%, transparent) 46%, transparent 72%); border-top: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); transition: transform 1.6s cubic-bezier(.16, 1, .3, 1); }
.close.in .horizon { transform: translateX(-50%) translateY(0); }

/* ---------- inner pages ---------- */
.page { max-width: 1240px; margin: 0 auto; width: 100%; padding: 40px clamp(16px, 4vw, 48px) 100px; }
.page-h { margin-top: 26px; max-width: 900px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 64px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; }

/* workspace */
.ws-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 26px; }
.ws-h .hd { font-size: clamp(36px, 4.6vw, 64px); }
.netnote { margin: 18px 0 0; color: var(--muted); font-size: 14.5px; border-left: 2px solid var(--accent); padding-left: 12px; }
.ws-g { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; margin-top: 36px; align-items: start; }
.ws-main { display: grid; gap: 12px; min-width: 0; }
.ws-in { padding: 8px; }
.in-none { margin: 0; padding: 14px 16px; color: var(--muted); }
.in-l { display: block; padding: 10px 12px 0; font-size: 14px; color: var(--muted); }
.ws-in textarea, .opt textarea { width: 100%; resize: vertical; background: transparent; border: 0; outline: none; padding: 12px; font: 14.5px/1.55 'Geist Mono', monospace; }
.in-bar { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px; }
.in-meta { color: var(--muted); font-size: 13.5px; }
.in-dz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; border: 1.5px dashed var(--line); border-radius: 16px; cursor: pointer; text-align: center; padding: 24px; transition: border-color .2s, background .2s; }
.in-dz:hover, .in-drop.over .in-dz { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.in-big { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.in-sm { color: var(--muted); font-size: 14px; }
.in-files, .r-files { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; }
.in-files li, .r-files li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.in-files li:hover, .r-files li:hover { background: var(--panel2); }
.r-fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-fs { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.r-files img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--panel2); }
.r-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: st; }
.step { padding: 18px 20px 20px; position: relative; }
.step + .step::before { content: ''; position: absolute; left: 32px; top: -13px; width: 1px; height: 13px; background: var(--accent); }
.step-h { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.step-t { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; display: flex; gap: 10px; align-items: baseline; }
.step-t a { text-decoration: none; }
.step-of { color: var(--muted); font-weight: 400; font-size: 14px; }
.step-st { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.step-st.busy { color: var(--ink); } .step-st.busy::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 8px; animation: pulse .8s ease-in-out infinite alternate; }
.step-st.ok { color: var(--ok); } .step-st.bad { color: var(--bad); }
@keyframes pulse { to { opacity: .2; } }
.step-b { display: flex; gap: 4px; }
.step-st:empty + .step-b, .step-h > .step-b { margin-left: 0; }
.step-d { color: var(--muted); margin: 8px 0 0; font-size: 14.5px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; margin-top: 14px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt.wide { grid-column: 1 / -1; }
.opt label { font-size: 13.5px; color: var(--muted); }
.opt input, .opt select, .opt textarea, .add select, .ch-start select { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); outline: none; transition: border-color .2s; min-width: 0; }
.opt textarea { height: auto; padding: 10px 12px; }
.opt input[type=color] { padding: 4px; }
.opt input:focus, .opt select:focus, .opt textarea:focus { border-color: var(--accent); }
.opt.chk { flex-direction: row; align-items: center; gap: 10px; padding-top: 22px; }
.opt.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.opt.chk label { color: var(--ink); font-size: 15px; }
.ws-run { display: flex; align-items: center; gap: 16px; padding: 6px 0; }
.run-st { color: var(--muted); font-size: 14.5px; }
.out { padding: 20px; min-height: 90px; }
.out .empty { padding: 4px 0; }
.r-note { color: var(--muted); margin: 0 0 12px; font-size: 14.5px; }
.r-time { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.r-err { color: var(--bad); margin: 0; }
.r-vals { margin: 0; display: grid; }
.rv-row { display: grid; grid-template-columns: minmax(140px, 2fr) minmax(0, 3fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rv-row:last-child { border-bottom: 0; }
.rv-row dt { color: var(--muted); font-size: 14.5px; }
.rv-row dd { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-row dd > span:first-child { font: 500 15px/1.4 'Geist Mono', monospace; overflow-wrap: anywhere; }
.cp { margin-left: auto; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.cp:hover { color: var(--ink); background: var(--panel2); }
.okc { color: var(--ok); white-space: nowrap; } .badc { color: var(--bad); white-space: nowrap; }
.r-text textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 14px; font: 13.5px/1.55 'Geist Mono', monospace; outline: none; }
.r-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.r-tbl { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; }
.r-tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.r-tbl th, .r-tbl td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.r-tbl th { position: sticky; top: 0; background: var(--panel2); font-weight: 600; }
.r-sw { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sw { width: 110px; height: 84px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 8px 10px; font-size: 22px; font-weight: 600; }
.sw span { font: 500 11.5px 'Geist Mono', monospace; background: var(--panel); color: var(--ink); padding: 2px 6px; border-radius: 6px; margin-top: auto; }
.r-prev { padding: 30px; display: grid; place-items: center; background: var(--panel2); border-radius: 14px; margin-bottom: 14px; }
.r-box { width: min(320px, 100%); height: 160px; border-radius: 14px; background: var(--panel); }
.add-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 18px; }
.add-in label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.add-in label svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2; }
.add select { flex: 1; min-width: 220px; }
.ws-side { position: sticky; top: 100px; }
.side-l { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.side-l a { display: block; padding: 7px 0; text-decoration: none; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 15px; }
.side-l a:hover { color: var(--ink); }

/* chains page */
.ch-g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-top: 48px; align-items: start; }
.ch-start { padding: 26px; } .ch-start p { color: var(--muted); margin: 0 0 18px; } .ch-start select { width: 100%; }
.ex-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ex-l a { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color .2s, transform .2s; }
.ex-l a:hover { border-color: color-mix(in srgb, var(--line) 55%, var(--ink)); transform: translateY(-2px); }
.ex-t { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.ex-s { color: var(--muted); font-size: 14.5px; } .ex-s i { font-style: normal; color: var(--accent-ink); padding: 0 4px; }
.prose { max-width: 760px; }
.page > .prose { margin-top: 60px; }
.prose p, .prose li { color: var(--muted); }
.prose .h3 { margin-top: 44px; color: var(--ink); }
.prose ul { padding-left: 20px; } .prose li { margin: 6px 0; }
.prose code { font-size: 14px; color: var(--ink); }
.docs .hd { margin-top: 26px; }
.keys { display: grid; gap: 8px; margin: 0; } .keys div { display: flex; gap: 16px; align-items: center; } .keys dt { min-width: 160px; } .keys dd { margin: 0; color: var(--muted); }
.cols { columns: 2; padding-left: 20px; }
.st-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 40px; }
.st-g .panel { padding: 22px; }

/* Solana drawer */
.drawer { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; margin-top: 40px; align-items: start; }
.dr-l { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 100px; padding: 8px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.dr-i { text-align: left; padding: 10px 14px; border-radius: 14px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; transition: background .2s, color .2s; }
.dr-i:hover { color: var(--ink); background: var(--panel2); }
.dr-i.on { color: var(--ink); background: var(--panel2); box-shadow: inset 2px 0 0 var(--accent); }
.dr-p .panel { padding: 26px; display: grid; gap: 6px; }
.dr-p .h3 a { text-decoration: none; }
.dr-p .btn.solid { justify-self: start; margin-top: 14px; }
.dr-p .out { padding: 18px 0 0; min-height: 0; }

/* ---------- palette ---------- */
.palette { width: min(640px, calc(100vw - 24px)); max-height: min(560px, 80vh); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); color: var(--ink); margin: 12vh auto auto; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0,0,0,.8); }
.palette[open] { display: flex; animation: rise .35s cubic-bezier(.16, 1, .3, 1) both; }
.palette::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.pal-in input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 18px; height: 36px; }
.pal-in input::-webkit-search-cancel-button { display: none; }
.pal-list { list-style: none; margin: 0; padding: 8px; overflow: auto; flex: 1; }
.pal-list li[role=option] { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; cursor: pointer; }
.pal-list li[aria-selected=true] { background: var(--panel2); box-shadow: inset 2px 0 0 var(--accent); }
.po-c { color: var(--muted); font-size: 14px; }
.po-h { color: var(--muted); font-size: 13.5px; padding: 8px 14px 4px; }
.po-none { padding: 18px 14px; color: var(--muted); }
.pal-foot { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 40px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-g { max-width: 1240px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 48px) 64px; display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 40px; }
.foot-b p { color: var(--muted); max-width: 32ch; margin: 14px 0 0; }
.foot-c { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.foot-c:last-child { columns: 1; }
.foot-c li { padding: 4px 0; break-inside: avoid; }
.foot-c a { text-decoration: none; color: var(--muted); } .foot-c a:hover { color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .find-t, .find kbd { display: none; }
  .find { padding: 0; width: 40px; justify-content: center; }
}
@media (max-width: 900px) {
  .top { grid-template-columns: auto 1fr; }
  .nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; margin: 0 -6px; scrollbar-width: none; }
  .shelf, .chains-band, .faq, .ch-g, .ws-g, .drawer { grid-template-columns: minmax(0, 1fr); }
  .shelf-h, .cb-h, .ws-side, .dr-l { position: static; }
  .shelves { gap: 90px; padding-top: 80px; }
  .how-g { grid-template-columns: minmax(0, 1fr); }
  .foot-g { grid-template-columns: minmax(0, 1fr); }
  .cb-step { min-height: 0; padding: 26px 0 26px 40px; }
  .dr-l { flex-direction: row; overflow-x: auto; border-radius: 18px; }
  .dr-i { white-space: nowrap; }
  .ws-h { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .shelf-l { grid-template-columns: minmax(0, 1fr); }
  .tcard-a { min-height: 0; }
  .hero { padding-top: 40px; }
  .hero .hd { font-size: clamp(38px, 11vw, 52px); }
  .drop-hint { margin-left: 0; width: 100%; padding: 4px 6px 0; }
  .find2 kbd { display: none; }
  .rv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .top-r { gap: 6px; } .ico { width: 36px; height: 36px; }
  .mark-word { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mtrack { animation: none; }
  .rv { opacity: 1; transform: none; }
  .line > span { transform: none; }
}
