/* Graft · one stylesheet for every page. Dark, monochrome, quiet. */
@font-face { font-family: 'Cardo'; src: url('../fonts/cardo-400.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cardo'; src: url('../fonts/cardo-400i.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Sans'; src: url('../fonts/sans-var.woff') format('woff'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Anon'; src: url('../fonts/mono-400.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #0c0c0b;
  --raise: #121211;
  --raise-2: #181817;
  --line: rgba(231, 226, 214, .10);
  --line-2: rgba(231, 226, 214, .20);
  --ivory: #e7e2d6;
  --text: #cfcabe;
  --steel: #8f8f93;
  --dim: #66666a;
  --serif: 'Cardo', 'Iowan Old Style', Georgia, serif;
  --sans: 'Source Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Anon', ui-monospace, SFMono-Regular, Menlo, monospace;
  --w: 1160px;
  --r: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ivory); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ivory); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(var(--w), calc(100% - 48px)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.dim { color: var(--dim); }
.mono-val { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--steel); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ivory); margin: 0; letter-spacing: -.005em; }
h1 em, h2 em { font-style: italic; color: var(--steel); }
p { margin: 0; }
.arrow { font-family: var(--sans); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--ivory); font-size: 15px; font-weight: 500; letter-spacing: .01em; cursor: pointer; transition: background .2s, border-color .2s, color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ivory); }
.btn.solid { background: var(--ivory); color: var(--bg); border-color: var(--ivory); }
.btn.solid:hover { background: #fff; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--steel); font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.link:hover { color: var(--ivory); }
.link.danger:hover { color: #e2a79c; }

/* Mark */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mark { width: 26px; height: 26px; flex: none; }

/* Header: centered wordmark, nav on both sides */
.top { position: sticky; top: 0; z-index: 30; background: rgba(12, 12, 11, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; gap: 20px; }
.top nav { display: flex; gap: 26px; font-size: 15px; color: var(--steel); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ivory); }
.top .right { justify-self: end; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); font-family: var(--serif); font-size: 22px; letter-spacing: .22em; }
.top .tools { display: flex; align-items: center; gap: 14px; }
.wallet-on { display: inline-flex; align-items: center; gap: 12px; }
.wallet-on .mono { color: var(--ivory); }
.local { display: inline-flex; align-items: center; gap: 8px; color: var(--steel); }
.lock { width: 7px; height: 7px; border-radius: 50%; background: var(--ivory); opacity: .75; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 120px; padding: 40px 0 56px; }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; color: var(--steel); font-size: 15px; }
.foot nav a:hover { color: var(--ivory); }
.foot small { color: var(--dim); font-family: var(--mono); font-size: 12px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--ivory); color: var(--bg); padding: 10px 18px; border-radius: var(--r); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Status squares (monochrome) */
.sq { display: inline-block; width: 10px; height: 10px; border-radius: 1px; flex: none; }
.sq.as-is { background: var(--ivory); }
.sq.converted { background: linear-gradient(135deg, var(--steel) 50%, transparent 50%); border: 1px solid var(--steel); }
.sq.none { border: 1px solid var(--dim); }

/* ---------- Landing ---------- */
.hero { padding: 92px 0 72px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.hero h1 { font-size: clamp(46px, 6.4vw, 84px); line-height: 1.02; }
.hero .lede { margin-top: 28px; font-size: 19px; max-width: 30em; color: var(--text); }
.hero .cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 34px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero .facts b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--ivory); line-height: 1.1; }
.hero .facts span { font-size: 14px; color: var(--steel); }

/* The slip: live preview of a graft */
.slip { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raise); padding: 26px; position: relative; }
.slip::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); border-radius: 2px; pointer-events: none; }
.slip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; position: relative; }
.slip-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; margin-top: 22px; position: relative; }
.slip-route label { display: grid; gap: 6px; font-size: 13px; color: var(--steel); }
.slip-route .join { padding-bottom: 12px; color: var(--steel); font-family: var(--serif); font-style: italic; font-size: 18px; }
select { appearance: none; -webkit-appearance: none; width: 100%; height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238f8f93' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; font-size: 15px; color: var(--ivory); }
select:hover { border-color: var(--steel); }
.slip-agent { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); position: relative; }
.slip-agent h3 { font-size: 28px; }
.slip-agent p { color: var(--steel); font-size: 15px; margin-top: 4px; }
.ledger { list-style: none; margin: 18px 0 0; padding: 0; position: relative; }
.ledger li { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; animation: fadeIn .4s both; }
.ledger .k { color: var(--ivory); }
.ledger .sqs { display: flex; gap: 4px; flex-wrap: wrap; }
.ledger .s { font-family: var(--mono); font-size: 12px; color: var(--steel); text-align: right; }
.slip .tally { display: flex; gap: 22px; margin-top: 16px; font-size: 14px; color: var(--steel); position: relative; }
.slip .tally b { color: var(--ivory); font-weight: 500; margin-right: 6px; }
.slip-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; position: relative; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Section scaffolding */
.sec { padding: 104px 0 0; }
.sec-head { display: grid; grid-template-columns: 280px 1fr; gap: 48px; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(34px, 4vw, 50px); line-height: 1.08; }
.sec-head p { margin-top: 16px; max-width: 38em; color: var(--text); }

/* Rootstock / scion / union */
.union { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.union > div { padding: 30px 30px 6px 0; }
.union > div + div { padding-left: 30px; border-left: 1px solid var(--line); }
.union .term { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ivory); }
.union .tag { display: block; font-family: var(--mono); font-size: 12px; color: var(--dim); margin: 4px 0 16px; letter-spacing: .08em; }
.union p { font-size: 16px; }

/* What travels */
.carry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.carry > div { background: var(--bg); padding: 24px 22px 26px; }
.carry h3 { font-size: 21px; }
.carry p { font-size: 15px; color: var(--steel); margin-top: 8px; }

/* Matrix */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.matrix { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
.matrix th, .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix thead th { position: sticky; top: 0; background: var(--raise); font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--steel); letter-spacing: .05em; }
.matrix tbody th { text-align: left; font-weight: 400; color: var(--ivory); white-space: nowrap; }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { background: var(--raise); }
.matrix td .sq { vertical-align: middle; }
.legend { display: flex; gap: 22px; margin-top: 16px; font-size: 14px; color: var(--steel); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }

/* Orchard + lineage */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel-card { border: 1px solid var(--line-2); border-radius: var(--r); padding: 34px; display: flex; flex-direction: column; gap: 18px; }
.panel-card h3 { font-size: 34px; }
.panel-card .num { display: flex; gap: 34px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.panel-card .num b { display: block; font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--ivory); line-height: 1.1; }
.panel-card .num span { font-size: 14px; color: var(--steel); }
.panel-card .btn { align-self: flex-start; margin-top: auto; }

/* Promises strip */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.promises h3 { font-size: 22px; }
.promises p { margin-top: 8px; color: var(--steel); font-size: 16px; }

/* Token */
.token { border: 1px solid var(--line-2); border-radius: var(--r); padding: 46px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.token h2 { font-size: clamp(40px, 5vw, 64px); letter-spacing: .04em; }
.token .copy { margin-top: 14px; max-width: 30em; }
.ca-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); padding: 18px; }
.ca-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
#ca { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; color: var(--ivory); word-break: break-all; }
#ca.pending { color: var(--steel); }
.ca-links { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ca-links .btn[aria-disabled="true"] { opacity: .35; }

/* Closing */
.closing { text-align: center; padding: 120px 0 0; }
.closing h2 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.04; }
.closing .btn { margin-top: 34px; }

/* ---------- App ---------- */
.load { padding: 72px 0 0; }
.load-head { max-width: 760px; }
.load-head h1, .orch-head h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
.sub { margin-top: 18px; font-size: 18px; color: var(--text); max-width: 36em; }
.drop { position: relative; margin-top: 40px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--raise); min-height: 300px; display: grid; place-items: center; text-align: center; padding: 40px 24px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--ivory); background: var(--raise-2); }
.drop-mark { width: 54px; height: 54px; margin: 0 auto 22px; opacity: .9; }
.drop-title { font-family: var(--serif); font-size: 26px; color: var(--ivory); }
.drop-hint { margin-top: 8px; color: var(--steel); font-size: 15px; }
.drop-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.drop-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(12, 12, 11, .9); border-radius: var(--r); color: var(--ivory); }
.spinner { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-top-color: var(--ivory); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { margin-top: 16px; padding: 12px 16px; border: 1px solid rgba(226, 167, 156, .4); border-radius: var(--r); color: #e2a79c; font-size: 15px; }
.samples { margin-top: 44px; }
.sample-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.sample { text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; cursor: pointer; transition: border-color .2s; display: grid; gap: 2px; }
.sample:hover { border-color: var(--ivory); }
.sample .p { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .06em; }
.sample .n { font-family: var(--serif); font-size: 20px; color: var(--ivory); }
.sample .b { font-size: 13px; color: var(--steel); line-height: 1.4; }
.reads { margin-top: 56px; }
.reads dl { margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.reads dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reads dt { color: var(--ivory); font-size: 15px; }
.reads dd { margin: 0; color: var(--steel); font-family: var(--mono); font-size: 12px; line-height: 1.6; }

.work { padding: 48px 0 0; display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.side { display: grid; gap: 14px; position: sticky; top: 88px; }
.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.name-field input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 4px 0 8px; font-family: var(--serif); font-size: 28px; color: var(--ivory); }
.name-field input:focus { outline: none; border-bottom-color: var(--ivory); }
.facts { margin: 14px 0 0; display: grid; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--steel); }
.facts dd { margin: 0; color: var(--ivory); text-align: right; min-width: 0; }
.dest { display: grid; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); }
.dest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font-size: 14px; }
.dest button:last-child { border-bottom: 0; }
.dest button:hover { background: var(--raise-2); }
.dest button .r { width: 12px; height: 12px; border: 1px solid var(--steel); border-radius: 50%; flex: none; }
.dest button[aria-checked="true"] { background: var(--raise-2); color: var(--ivory); }
.dest button[aria-checked="true"] .r { background: var(--ivory); border-color: var(--ivory); box-shadow: inset 0 0 0 2px var(--raise-2); }
.dest .lbl { flex: 1; display: flex; justify-content: space-between; gap: 8px; }
.dest .tag { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.land .tally { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.land .tally > div { padding: 10px; border-right: 1px solid var(--line); }
.land .tally > div:last-child { border-right: 0; }
.land .tally b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ivory); }
.land .tally span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--steel); }
.land .btn + .btn, .share .btn + .btn, .share .publish + .btn { margin-top: 8px; }
.receipt { margin-top: 12px; font-size: 13px; color: var(--steel); }
.receipt a { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; }
.receipt code { font-family: var(--mono); }
.publish { display: grid; gap: 10px; margin-top: 10px; }
.desc-field { display: grid; gap: 6px; }
.desc-field textarea { width: 100%; resize: vertical; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px; font-size: 14px; }
.desc-field textarea:focus { outline: none; border-color: var(--ivory); }
.hint { font-size: 13px; color: var(--dim); margin-top: 8px; line-height: 1.5; }
.wallet-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.wallet-line .mono { color: var(--ivory); flex: 1; }
.main { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 16px 20px; border: 0; background: transparent; color: var(--steel); cursor: pointer; font-size: 15px; position: relative; }
.tab:hover { color: var(--ivory); }
.tab[aria-selected="true"] { color: var(--ivory); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 1px; background: var(--ivory); }
.count { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: 6px; }
.panel { padding: 22px; }
.panel-intro { font-size: 15px; color: var(--steel); margin-bottom: 18px; }
.panel-intro b { color: var(--ivory); font-weight: 500; }
.group + .group { margin-top: 26px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.group-head h3 { font-size: 22px; }
.group-head h3 span { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: 8px; }
.item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.item.off { opacity: .45; }
.check { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 3px 0 0; border: 1px solid var(--steel); border-radius: 2px; cursor: pointer; }
.check:checked { background: var(--ivory); border-color: var(--ivory); box-shadow: inset 0 0 0 3px var(--bg); }
.item-main { min-width: 0; }
.item-name { color: var(--ivory); font-size: 15px; word-break: break-word; }
.item-detail { color: var(--steel); font-size: 13px; margin-top: 2px; line-height: 1.5; }
.item-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--steel); white-space: nowrap; }
.item-status b { font-weight: 400; }
.files { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.file-list { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; border-right: 1px solid var(--line); }
.file-list button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: transparent; color: var(--steel); font-family: var(--mono); font-size: 12px; cursor: pointer; word-break: break-all; }
.file-list button:hover, .file-list button[aria-current="true"] { color: var(--ivory); background: var(--raise); }
.file-list .dir { color: var(--dim); }
.viewer { min-width: 0; }
.viewer-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.viewer pre { margin: 12px 0 0; max-height: 520px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows li .r1 { color: var(--ivory); word-break: break-all; }
.rows li .r2 { color: var(--steel); text-align: right; }
.rows li code { font-family: var(--mono); font-size: 12px; }
.rows .empty { color: var(--dim); grid-template-columns: 1fr; }

/* ---------- Orchard ---------- */
.orch-head { padding: 72px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--r); }
.stats > div { padding: 16px; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: 13px; color: var(--steel); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; color: var(--ivory); }
.toolbar { display: flex; gap: 10px; align-items: center; padding: 22px 0; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; }
.search input { width: 100%; height: 44px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 15px; }
.search input:focus { outline: none; border-color: var(--ivory); }
.search input::placeholder { color: var(--dim); }
.tb-select { width: 180px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--steel); cursor: pointer; padding: 0 6px; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tg { width: 34px; height: 18px; border: 1px solid var(--steel); border-radius: 9px; position: relative; transition: background .2s; }
.tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--steel); transition: transform .2s, background .2s; }
.toggle input:checked + .tg { background: var(--ivory); border-color: var(--ivory); }
.toggle input:checked + .tg::after { transform: translateX(16px); background: var(--bg); }
.toggle input:focus-visible + .tg { outline: 1px solid var(--ivory); outline-offset: 3px; }
.note { padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--steel); font-size: 14px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid:empty { display: none; }
.grid .card { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 20px; transition: border-color .2s; }
.grid .card:hover, .grid .card:focus-visible { border-color: var(--steel); }
.card-top { display: flex; justify-content: space-between; gap: 10px; }
.card-name { font-family: var(--serif); font-size: 24px; color: var(--ivory); line-height: 1.15; }
.card-desc { font-size: 14px; color: var(--steel); line-height: 1.5; }
.card-desc.none { color: var(--dim); font-style: italic; }
.kinds { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--steel); font-family: var(--mono); }
.kinds span { display: inline-flex; gap: 5px; align-items: center; }
.kinds i { font-style: normal; color: var(--ivory); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--steel); }
.badge.holder { color: var(--bg); background: var(--ivory); border-color: var(--ivory); }
.empty { text-align: center; padding: 80px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 20px; }
.empty-title { font-family: var(--serif); font-size: 30px; color: var(--ivory); }
.empty-sub { margin: 8px auto 26px; color: var(--steel); max-width: 30em; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--raise); border-left: 1px solid var(--line-2); z-index: 50; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 26px 24px 40px; overflow-y: auto; display: grid; gap: 18px; align-content: start; }
.drawer-body h2 { font-size: 34px; line-height: 1.1; }
.d-desc { color: var(--text); font-size: 15px; }
.d-facts { margin: 0; }
.d-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.d-facts dt { color: var(--steel); }
.d-facts dd { margin: 0; color: var(--ivory); text-align: right; }
.d-facts a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-family: var(--mono); font-size: 13px; }
.d-label { margin-top: 6px; }
.d-kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-kinds li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--steel); }
.d-kinds b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ivory); }
.d-actions { display: grid; gap: 8px; margin-top: 6px; }
.d-actions .link { justify-self: start; margin-top: 8px; }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 40px 24px; gap: 18px; }
.lost .mark { width: 64px; height: 64px; margin-bottom: 10px; }
.lost h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.08; }
.lost .cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* Calm reveal */
.reveal { opacity: 0; transition: opacity .6s ease; }
.reveal.in { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero .wrap, .token, .orch-head { grid-template-columns: 1fr; gap: 44px; }
  .sec-head { grid-template-columns: 1fr; gap: 0; }
  .carry { grid-template-columns: 1fr 1fr; }
  .work { grid-template-columns: 1fr; }
  .side { position: static; }
  .grid { grid-template-columns: 1fr 1fr; }
  .sample-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 36px); }
  .top .wrap { grid-template-columns: auto 1fr; height: 60px; }
  .top .left { display: none; }
  .top .brand { justify-self: start; font-size: 19px; }
  .top .right nav { display: none; }
  .hero { padding: 56px 0 56px; }
  .union, .pair, .promises { grid-template-columns: 1fr; }
  .union > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .union > div { padding-right: 0; }
  .carry, .grid, .reads dl, .files, .d-kinds { grid-template-columns: 1fr; }
  .reads dl > div { grid-template-columns: 1fr; gap: 2px; }
  .sample-row { grid-template-columns: 1fr 1fr; }
  .token, .panel-card { padding: 26px; }
  .slip { padding: 20px; }
  .slip-route { grid-template-columns: 1fr; }
  .slip-route .join { display: none; }
  .ledger li { grid-template-columns: 90px 1fr; }
  .ledger .s { grid-column: 1 / -1; text-align: left; }
  .file-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; }
  .item { grid-template-columns: 22px 1fr; }
  .item-status { grid-column: 2; }
  .sec { padding-top: 80px; }
  .stats dd { font-size: 24px; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}
