/* Hallmark · macrostructure: read-first workbench after Maze (cloud hero, scroll-lit statement, tabbed shelves, bench, wave footer) · theme: custom ink, teal, cream
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4 */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #07110F; --raised: #0D1A17; --raised-2: #12211D;
  --cream: #EDE6D6; --quiet: #A3AFA8; --teal: #2FD3BC; --coral: #E8A07A;
  --line: rgba(237, 230, 214, .12); --line-2: rgba(237, 230, 214, .24); --leader: rgba(237, 230, 214, .5); --box: rgba(237, 230, 214, .1);
  --teal-lift: #4FE0CB; --hint: #8A968F; --unlit: #5F6E68;
  --ink-20: rgba(7, 17, 15, .2); --ink-16: rgba(7, 17, 15, .16); --ink-45: rgba(7, 17, 15, .45); --ink-55: rgba(7, 17, 15, .55); --ink-72: rgba(7, 17, 15, .72); --ink-85: rgba(7, 17, 15, .85); --ink-86: rgba(7, 17, 15, .86); --ink-92: rgba(7, 17, 15, .92);
  --raised-90: rgba(13, 26, 23, .9); --raised-94: rgba(13, 26, 23, .94);
  --veil: rgba(3, 8, 7, .62); --drop: rgba(3, 8, 7, .45);
  --gut: clamp(18px, 3vw, 64px);
  --head: 68px;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { overflow-x: clip; background: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; color: var(--cream); font: 400 16px/1.5 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
i, em { font-style: normal; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2 { min-width: 0; overflow-wrap: anywhere; font-weight: 500; letter-spacing: -.028em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.tint { color: var(--teal); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 90; background: var(--cream); color: var(--ink); padding: 8px 16px; border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---- header ---- */
.masthead { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--head); display: flex; align-items: center; gap: 28px; padding: 0 var(--gut); background: var(--ink-72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.mark img { border-radius: 7px; }
.wayfind { display: flex; gap: 24px; }
.wayfind a { text-decoration: none; color: var(--quiet); font-size: 15px; transition: color .2s; }
.wayfind a:hover { color: var(--cream); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tool-ico { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--cream); transition: border-color .2s, color .2s; }
.tool-ico:hover { border-color: var(--teal); color: var(--teal); }
.ca-tag { height: 36px; padding: 0 12px; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--quiet); white-space: nowrap; }
.ca-tag.has { color: var(--cream); font-variant-numeric: tabular-nums; }
.ca-tag.has:hover { border-color: var(--teal); }
.ca-pair { font-size: 13px; color: var(--quiet); white-space: nowrap; }
.ca-short { display: none; }

.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 36px; padding: 0 8px 0 16px; background: transparent; border: 1px solid var(--line-2); border-radius: 8px; color: var(--cream); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: border-color .2s, background .2s, color .2s; }
.ghost:not(:has(.arrowbox)) { padding: 0 16px; }
.ghost:hover { border-color: var(--teal); }
.ghost-solid { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.ghost-solid:hover { background: var(--teal-lift); border-color: var(--teal-lift); }
button:not(:disabled):active, a.ghost:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.ghost[disabled], .ghost[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.arrowbox { position: relative; width: 24px; height: 24px; border-radius: 5px; overflow: hidden; background: var(--box); flex: none; }
.ghost-solid .arrowbox { background: var(--ink-16); }
.arrowbox::before, .arrowbox::after { content: ""; position: absolute; inset: 0; background: currentColor; transition: transform .3s cubic-bezier(.3, .7, .2, 1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h11M12 7l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center/16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h11M12 7l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center/16px no-repeat; }
.arrowbox::after { transform: translateX(-100%); }
.ghost:not([disabled]):hover .arrowbox::before { transform: translateX(100%); }
.ghost:not([disabled]):hover .arrowbox::after { transform: none; }

/* ---- first view ---- */
.room { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding-top: var(--head);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 25%, 12.5% 100%; background-position: 0 var(--head); }
.room::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 30% 50%, var(--ink-92), var(--ink-55) 60%, var(--ink-20)); pointer-events: none; }
.cloud, .leaders { position: absolute; inset: 0; width: 100%; height: 100%; }
.leaders { pointer-events: none; }
.leaders line { stroke: var(--leader); stroke-width: 1; }
.leaders circle { fill: var(--cream); }
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 4px 8px; background: var(--cream); color: var(--ink); border: 0; border-radius: 3px; font: 500 12.5px/1.35 var(--sans); white-space: nowrap; will-change: transform; transition: opacity .3s, background .2s; }
.tag:hover { background: var(--teal); }

.room-lead { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 3.4vh, 64px) var(--gut) clamp(56px, 11vh, 160px); width: min(62%, 1500px); }
.room h1 { font-size: clamp(42px, 5.5vw, 136px); line-height: 1.02; }
.ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ln > span { display: inline-block; }
.room-sub { margin-top: clamp(16px, 2.2vh, 28px); max-width: 33em; font-size: clamp(16px, 1.15vw, 24px); color: var(--quiet); }
.paste { margin-top: clamp(20px, 3vh, 40px); max-width: clamp(420px, 36vw, 780px); }
.paste label { display: block; font-size: 14px; color: var(--quiet); margin-bottom: 8px; }
.paste-row { display: flex; gap: 8px; }
.paste input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; background: var(--raised-90); border: 1px solid var(--line-2); border-radius: 8px; font-size: 15px; }
.paste input::placeholder, .find::placeholder, .draft input::placeholder { color: var(--hint); }
.paste .ghost { height: 48px; padding-left: 20px; padding-right: 12px; font-size: 15px; }
.paste-note { min-height: 1.5em; margin-top: 8px; font-size: 14px; color: var(--coral); }
.paste-note.calm { color: var(--quiet); }
.room-state { font-size: 14.5px; color: var(--quiet); max-width: 66ch; text-wrap: pretty; }
.room-state b { color: var(--cream); font-weight: 500; font-variant-numeric: tabular-nums; }

.slate { background: var(--raised); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.room > .slate { position: absolute; z-index: 3; right: var(--gut); bottom: 118px; width: clamp(340px, 27vw, 600px); box-shadow: 0 24px 60px var(--drop); }
.slate-bar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--quiet); }
.slate-bar span { margin-left: 8px; }
.slate-body { padding: 16px 16px 12px; min-height: 240px; }
.slate-empty { color: var(--quiet); font-size: 14.5px; }
.slate-still { display: flex; flex-direction: column; }
.slate-still .slate-body { flex: 1; }
.draft-wait { display: flex; flex-direction: column; height: 100%; }
.draft-wait .slate-empty { margin-bottom: 16px; }
.draft-wait .slate-row { flex: 1; align-items: center; }
.draft-wait code { color: var(--quiet); }
.slate-who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.slate-who strong { font-weight: 600; font-size: 17px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.slate-who small { display: block; color: var(--quiet); font-size: 13px; }
.slate-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.slate-row span { color: var(--quiet); }
.slate-row code, .fact-val code { font: 400 13px/1.45 var(--mono); text-align: right; }
.slate-row a { text-decoration: none; }
.slate-row a:hover code { color: var(--teal); }
.slate-open { display: inline-block; margin-top: 12px; padding: 0; background: none; border: 0; color: var(--teal); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.coin-pic { flex: none; width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--raised-2); display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--teal); overflow: hidden; }

.spines { position: relative; z-index: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--line-2); background: var(--ink-86); min-height: 86px; }
.spine { display: block; padding: 16px 16px; background: none; border: 0; border-left: 1px solid var(--line); text-align: left; min-width: 0; transition: background .2s; }
.spine:first-child { border-left: 0; padding-left: var(--gut); }
.spine:last-child { padding-right: var(--gut); }
.spine:hover { background: var(--raised); }
.spine b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.spine span { display: block; font-size: 13.5px; color: var(--quiet); }

/* ---- hatching ---- */
.hatch { height: clamp(72px, 12vh, 150px); border-block: 1px solid var(--line); background-image: repeating-linear-gradient(-45deg, var(--line-2) 0 1px, transparent 1px 11px); background-size: 200% 100%; background-position-x: var(--drift, 0px); }
.hatch-thin { height: 44px; }

/* ---- statement ---- */
.statement { padding: clamp(92px, 18vh, 240px) var(--gut); }
.lit { max-width: 21em; font-size: clamp(32px, 4.5vw, 104px); line-height: 1.1; letter-spacing: -.028em; font-weight: 500; }
.lit b { font-weight: 500; color: var(--teal); font-variant-numeric: tabular-nums; }
.lit .w { color: var(--cream); }
.lit.scrub .w { color: var(--unlit); }

/* ---- shared section head ---- */
.sec-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 92px); align-items: end; padding: 0 var(--gut) clamp(28px, 4vh, 56px); }
.sec-top h2 { font-size: clamp(32px, 3.9vw, 88px); line-height: 1.04; }
.sec-top p { color: var(--quiet); max-width: 34em; font-size: clamp(15px, 1.05vw, 21px); }

/* ---- shelves ---- */
.stacks { padding: clamp(40px, 8vh, 92px) 0 clamp(52px, 9vh, 112px); }
.stacks-grid { display: grid; grid-template-columns: clamp(250px, 21vw, 460px) minmax(0, 1fr); border-block: 1px solid var(--line); }
.shelf-tabs { border-right: 1px solid var(--line); }
.shelf-tab { position: relative; display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 16px 20px 16px var(--gut); background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: clamp(15px, 1.1vw, 21px); text-align: left; transition: color .2s, background .2s; }
.shelf-tab:last-child { border-bottom: 0; }
.shelf-tab:hover { color: var(--cream); }
.shelf-tab[aria-selected="true"] { color: var(--cream); background: var(--raised); }
.shelf-tab b { font-weight: 500; font-variant-numeric: tabular-nums; }
.shelf-tab .fill { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--teal); transform: scaleX(0); transform-origin: left; }
.shelf-tab[aria-selected="true"].held .fill { transform: none; }
.shelf-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); align-content: start; }
.cell { display: block; padding: 16px 20px; background: none; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; min-width: 0; transition: background .2s; }
.cell:nth-child(3n) { border-right: 0; }
.cell:hover { background: var(--raised); }
.cell-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-who strong { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-who small { display: block; font-size: 13px; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-who > div { min-width: 0; }
.cell-sum { margin-top: 12px; font-size: 14px; color: var(--quiet); }
.cell-sum em { font-style: normal; color: var(--cream); font-variant-numeric: tabular-nums; }
.pips { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--quiet); }
.pips i { width: 12px; height: 4px; background: var(--line-2); }
.pips i.on { background: var(--teal); }
.pips span { margin-left: 8px; }
.none { grid-column: 1 / -1; padding: 40px var(--gut); color: var(--quiet); }

/* ---- ledger ---- */
.ledger { padding: clamp(52px, 9vh, 112px) 0; }
.sieve { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 12px; padding: 0 var(--gut) 16px; }
.find { width: clamp(220px, 20vw, 380px); height: 44px; padding: 0 12px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; }
.sieve-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 12px; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--quiet); font-size: 13.5px; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { color: var(--cream); border-color: var(--line-2); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--teal); border-color: var(--teal); }
.rank { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--quiet); }
.rank select { height: 36px; padding: 0 8px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; color: var(--cream); font-size: 14px; }
.tally { padding: 0 var(--gut) 12px; font-size: 14px; color: var(--quiet); }
.book { border-block: 1px solid var(--line); }
.book-head, .folio { display: grid; grid-template-columns: minmax(250px, 2.3fr) .8fr .8fr .8fr .8fr minmax(350px, 2.5fr) 92px; gap: 16px; align-items: center; padding-inline: var(--gut); }
.book-head { padding-block: 12px; font-size: 13px; color: var(--quiet); border-bottom: 1px solid var(--line); }
.folio { padding-block: 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; font-variant-numeric: tabular-nums; font-size: 15px; }
.folio:last-child { border-bottom: 0; }
.folio:hover { background: var(--raised); }
.folio-who { display: flex; align-items: center; gap: 12px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; }
.folio-who .coin-pic { width: 52px; height: 52px; }
.folio-who > div { min-width: 0; }
.folio-name { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folio-name span { font-weight: 400; color: var(--quiet); margin-left: 8px; }
.folio-sub { display: block; font-size: 13px; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folio-sub b { font-weight: 500; color: var(--teal); }
.num small { display: block; font-size: 13px; color: var(--quiet); }
.num small.up { color: var(--teal); }
.num small.down { color: var(--coral); }
.lbl { display: none; }
.found { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; color: var(--quiet); }
.found span { white-space: nowrap; }
.found em { font-style: normal; color: var(--cream); }
.found .met em { color: var(--teal); }
.found .unmet em { color: var(--coral); }
.folio .ghost { padding: 0 12px; height: 34px; font-size: 13.5px; }
.more { margin: 20px var(--gut) 0; height: 40px; }

/* ---- launch bench ---- */
.bench { position: relative; padding: clamp(60px, 11vh, 132px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.dots { position: absolute; inset: 0; width: 100%; height: 100%; }
.bench-inner { position: relative; }
.bench-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 60px); padding: 0 var(--gut); align-items: stretch; }
.draft { display: grid; gap: 16px; padding: clamp(16px, 1.8vw, 32px); background: var(--raised-94); border: 1px solid var(--line-2); border-radius: 10px; }
.pic-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: end; }
.pic { position: relative; display: grid; place-items: center; height: 104px; background: var(--raised-2); border: 1px dashed var(--line-2); border-radius: 8px; color: var(--quiet); font-size: 13.5px; cursor: pointer; overflow: hidden; }
.pic:hover, .pic:focus-within { border-color: var(--teal); }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#fImage:focus-visible + * { outline: 2px solid var(--teal); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--quiet); }
.field input, .field textarea, .field select { width: 100%; padding: 8px 12px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 7px; font-size: 15px; }
.field select { height: 42px; }
.field textarea { resize: vertical; display: block; }
.draft-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-acts .ghost { height: 44px; padding-left: 16px; padding-right: 12px; }
.draft-note { min-height: 1.5em; font-size: 14px; color: var(--quiet); }
.draft-note.bad { color: var(--coral); }
.draft-note.good { color: var(--teal); }
.draft-note a { color: inherit; }
.slate-still .slate-body { min-height: 200px; }
.d-shelf { font-size: 19px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 4px; }
.d-by { font-size: 13.5px; color: var(--quiet); margin-bottom: 12px; }
.gap { margin-top: 8px; font-size: 14px; color: var(--coral); }

/* ---- footer ---- */
.foot { position: relative; border-top: 1px solid var(--line); overflow: hidden; min-height: clamp(420px, 62vh, 760px); display: flex; flex-direction: column; justify-content: flex-end; }
.swell { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot-inner { position: relative; padding: clamp(40px, 7vh, 80px) var(--gut) 28px; background: linear-gradient(transparent, var(--ink-92) 22%); }
.foot-line { max-width: 24em; font-size: clamp(24px, 2.6vw, 58px); line-height: 1.12; letter-spacing: -.022em; font-weight: 500; }
.foot-small { margin-top: 16px; max-width: 70ch; font-size: 14.5px; color: var(--quiet); }
.foot-row { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.foot-row .mark { margin-right: auto; font-size: 16px; }
@media (min-width: 981px) {
  .foot-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 120px); align-items: end; }
  .foot-line { grid-row: 1 / span 2; }
  .foot-small { grid-column: 2; font-size: clamp(14.5px, .85vw, 18px); }
  .foot-row { grid-column: 1 / -1; }
}

/* ---- the read drawer ---- */
.veil { position: fixed; inset: 0; z-index: 60; background: var(--veil); }
.reading { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(600px, 100%); overflow-y: auto; overscroll-behavior: contain; background: var(--raised); border-left: 1px solid var(--line-2); padding: 24px clamp(16px, 2vw, 28px) 40px; outline: none; }
.reading-close { position: sticky; top: 0; float: right; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; background: var(--raised-2); border: 1px solid var(--line-2); border-radius: 8px; }
.reading-close:hover { border-color: var(--teal); }
.r-head { display: flex; align-items: center; gap: 16px; padding-right: 48px; }
.r-head .coin-pic { width: 60px; height: 60px; font-size: 20px; }
.r-head h2 { font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.r-head p { font-size: 14px; color: var(--quiet); overflow-wrap: anywhere; }
.r-filed { margin-top: 16px; font-size: 15px; }
.r-filed span { color: var(--quiet); }
.r-sec { margin-top: 24px; }
.r-sec h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.r-brief p { margin-bottom: 8px; font-size: 16.5px; line-height: 1.45; }
.r-brief sup a { color: var(--teal); text-decoration: none; font-size: 12px; margin-left: 4px; }
.r-off { padding: 12px 12px; background: var(--raised-2); border: 1px solid var(--line-2); border-radius: 8px; font-size: 14.5px; color: var(--quiet); }
.r-check { display: flex; gap: 8px; padding: 4px 0; font-size: 14.5px; }
.r-check i { flex: none; width: 16px; height: 16px; margin-top: 4px; border: 1px solid var(--line-2); border-radius: 3px; }
.r-check.yes i { background: var(--teal); border-color: var(--teal); }
.r-check.no i { background: none; border-color: var(--coral); }
.r-check.no { color: var(--cream); }
.r-check.unk { color: var(--quiet); }
.r-check.unk i { border-style: dashed; }
.r-note { margin-top: 8px; font-size: 13.5px; color: var(--quiet); }
.fact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; scroll-margin-top: 20px; }
.fact > span { color: var(--quiet); }
.fact-val a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.fact-val a:hover { color: var(--teal); text-decoration-color: var(--teal); }
.fact-val small { display: block; color: var(--quiet); font-size: 12.5px; }
.ca-line { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--quiet); }
.ca-line a { color: var(--cream); }
.ca-line button { padding: 4px 8px; background: none; border: 1px solid var(--line-2); border-radius: 5px; font-size: 12.5px; }
.chartbox { height: 140px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); overflow: hidden; display: grid; place-items: center; color: var(--quiet); font-size: 14px; }
.chartbox svg { width: 100%; height: 100%; display: block; }
.ticket { margin-top: 12px; padding: 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--ink); }
.side-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.side-switch button { flex: 1; height: 36px; background: none; border: 1px solid var(--line); border-radius: 7px; color: var(--quiet); font-size: 14px; }
.side-switch button[aria-pressed="true"] { color: var(--ink); background: var(--cream); border-color: var(--cream); }
.ticket-row { display: flex; gap: 8px; }
.ticket-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 7px; font-size: 15px; }
.ticket-pre { display: flex; gap: 4px; }
.ticket-pre button { height: 40px; padding: 0 12px; background: none; border: 1px solid var(--line); border-radius: 7px; font-size: 13.5px; color: var(--quiet); }
.ticket-pre button:hover { color: var(--cream); border-color: var(--line-2); }
.ticket .ghost { width: 100%; height: 44px; margin-top: 12px; }
.ticket-note { margin-top: 8px; font-size: 13.5px; color: var(--quiet); }
.ticket-note.bad { color: var(--coral); }
.ticket-note.good { color: var(--teal); }
.ticket-note a { color: inherit; }
.loading { padding: 52px 0; font-size: 16px; color: var(--quiet); }
.loading::after { content: ""; display: block; height: 2px; margin-top: 16px; background: linear-gradient(90deg, var(--teal), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: run 1.4s linear infinite; }
@keyframes run { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ---- narrower screens ---- */
@media (max-width: 1240px) {
  .wayfind { display: none; }
  .book-head { display: none; }
  .folio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .folio-who { grid-column: 1 / -2; }
  .folio > .ghost { grid-column: -2 / -1; grid-row: 1; justify-self: end; }
  .found { grid-column: 1 / -1; }
  .lbl { display: block; font-size: 12.5px; color: var(--quiet); }
}
@media (max-width: 980px) {
  :root { --head: 104px; }
  .masthead { flex-wrap: wrap; height: var(--head); gap: 8px 12px; align-content: center; }
  .tools { margin-left: 0; width: 100%; flex-wrap: nowrap; gap: 8px; }
  .ca-tag { flex: none; padding: 0 12px; overflow: visible; font-size: 12.5px; }
  .ca-tag .ca-full { display: none; }
  .ca-tag .ca-short { display: inline; }
  .ca-pair { display: none; }
  #walletBtn { padding: 0 12px; font-size: 13px; }
  .ghost-buy { padding: 0 12px; }
  .ghost-buy .arrowbox { display: none; }
  .room { justify-content: flex-start; background-size: 100% 25%, 25% 100%; }
  .room-lead { width: 100%; flex: none; }
  .room h1 { font-size: clamp(38px, 11.4vw, 84px); }
  .room::before { background: linear-gradient(var(--ink-85), var(--ink-45) 55%, var(--ink-85)); }
  .cloud { opacity: .38; }
  .paste { max-width: none; }
  .room > .slate { position: relative; right: auto; bottom: auto; width: auto; margin: 0 var(--gut) 20px; z-index: 3; }
  .slate-body { min-height: 0; }
  .spines { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spine, .spine:first-child, .spine:last-child { padding: 12px var(--gut); border-left: 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .spine:nth-child(odd) { border-right: 1px solid var(--line); }
  .spine b { font-size: 17px; order: 2; }
  .sec-top { grid-template-columns: minmax(0, 1fr); }
  .stacks-grid { grid-template-columns: minmax(0, 1fr); }
  .shelf-tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .shelf-tab, .shelf-tab:last-child { flex: none; width: auto; padding: 12px 16px; border-bottom: 0; border-right: 1px solid var(--line); gap: 8px; }
  .shelf-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .cell:nth-child(2n) { border-right: 0; }
  .bench-grid { grid-template-columns: minmax(0, 1fr); }
  .rank { margin-left: 0; }
}
@media (max-width: 620px) {
  .shelf-cells { grid-template-columns: minmax(0, 1fr); }
  .cell, .cell:nth-child(3n) { border-right: 0; }
  .three, .two { grid-template-columns: minmax(0, 1fr); }
  .pic-row { grid-template-columns: minmax(0, 1fr); }
  .find { width: 100%; }
  .folio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .folio-who { grid-column: 1 / -1; }
  .folio > .ghost { grid-column: 1 / -1; grid-row: auto; width: 100%; justify-self: stretch; }
  .found { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .paste .ghost { padding-left: 12px; padding-right: 8px; }
}
.slate-open { min-height: 40px; }
.draft input:not([type="file"]), .draft select { height: 44px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 360px) {
  .spines { grid-template-columns: minmax(0, 1fr); }
  .spine:nth-child(odd) { border-right: 0; }
}
