/* SIP
   Two rooms in one house. "found" is the day desk where kept software lives.
   "lost" is the night desk where the search for orphans happens. */
:root {
  --font-ui: "Pixelify Sans", "Chicago", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Geneva", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 36px; --s7: 56px;
  --lav: #b9b6f2;
  --mari: #e6ad3c;
}
:root, :root[data-env="found"] {
  --desk: #c4c4c4; --desk-dot: #9e9e9e;
  --paper: #ffffff; --paper-2: #eeeeee; --folder: #ccccff; --folder-2: #9999cc;
  --ink: #000000; --ink-2: #4d4d4d; --line: #000000;
  --tint: #ccccff; --tint-ink: #1f1c5c;
  --good: #1f6b45; --bad: #a4302a; --wait: #8a5a00;
  --shadow: #1b1a1f;
  --log-bg: #f2f2f2;
}
:root[data-env="lost"] {
  --desk: #14151c; --desk-dot: #232532;
  --paper: #1f212b; --paper-2: #282b38; --folder: #4a47a0; --folder-2: #2f2d6e;
  --ink: #ebe8dd; --ink-2: #a5a2ad; --line: #ebe8dd;
  --tint: #35336b; --tint-ink: #dcdaff;
  --good: #7fd6a4; --bad: #ff8f85; --wait: #f0c064;
  --shadow: #000;
  --log-bg: #171820;
}
* { box-sizing: border-box; }
html { background: var(--desk); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.5 var(--font-body);
  background-color: var(--desk);
  background-image: repeating-conic-gradient(var(--desk-dot) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }
body { font-variant-ligatures: none; }
h1, h2, h3 { font-family: var(--font-ui); font-weight: 600; margin: 0; line-height: 1.1; letter-spacing: 0; }
p { margin: 0 0 var(--s3); max-width: 68ch; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* ---------- menu bar ---------- */
.menubar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: stretch; gap: 0;
  height: 34px; padding: 0 var(--s2); background: var(--paper); border-bottom: 1.5px solid var(--line);
  font-family: var(--font-ui); font-size: 17px; user-select: none;
}
.menubar a, .menubar button { display: flex; align-items: center; padding: 0 var(--s3); text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.menubar a:hover, .menubar button:hover, .menubar a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.menubar .brand { font-weight: 700; padding-left: var(--s2); gap: 7px; font-size: 19px; letter-spacing: 1px; }
.brand .logo { width: 28px; height: 28px; }
.brand .plus { display: inline-block; margin: 0 1px; transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
:root[data-env="lost"] .brand .found, :root[data-env="found"] .brand .lost { opacity: .38; }
.menubar .spacer { flex: 1; }
.menubar .menu-links { display: flex; }

/* the room switch */
.room { display: flex; align-items: center; margin: 5px var(--s2); border: 1.5px solid var(--line); }
.room button { padding: 0 10px; height: 100%; font-size: 15px; }
.room button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.room button:hover { background: var(--tint); color: var(--tint-ink); }
.room button[aria-pressed="true"]:hover { background: var(--ink); color: var(--paper); }
.wallet-btn { border-left: 1.5px solid var(--line) !important; }

/* ---------- desktop + windows ---------- */
main { padding: var(--s5) var(--s4) var(--s7); max-width: 1180px; margin: 0 auto; }
.desk { display: grid; gap: var(--s5); grid-template-columns: repeat(12, 1fr); align-items: start; }
.win {
  grid-column: span 12; background: var(--paper); border: 1.5px solid var(--line);
  box-shadow: 3px 3px 0 var(--shadow); min-width: 0;
}
.win > header {
  display: flex; align-items: center; gap: var(--s2); height: 26px; padding: 0 6px; border-bottom: 1.5px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 3px);
  background-size: 100% 15px; background-position: center; background-repeat: no-repeat;
}
.win > header h2 { font-size: 16px; font-weight: 600; background: var(--paper); padding: 0 var(--s2); margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win > header .shade { width: 14px; height: 14px; flex: none; border: 1.5px solid var(--line); background: var(--paper); padding: 0; cursor: pointer; }
.win > header .shade:hover { background: var(--ink); }
.win > header .pad { width: 14px; flex: none; }
.win.shaded > .body { display: none; }
.win > .body { padding: var(--s4); }
.win > .body.flush { padding: 0; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
@media (max-width: 900px) { .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; } }
.statusline { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: 6px var(--s3); border-bottom: 1.5px solid var(--line); font-size: 14px; background: var(--paper); }
.statusline > :last-child { margin-left: auto; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 36px; padding: 4px 16px;
  font-family: var(--font-ui); font-size: 17px; text-decoration: none; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); border-radius: 8px; box-shadow: 0 2px 0 var(--shadow);
}
.btn:hover { background: var(--tint); color: var(--tint-ink); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.primary { outline: 1.5px solid var(--line); outline-offset: 2px; }
.btn.primary:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.quiet { border-radius: 0; box-shadow: none; min-height: 30px; padding: 2px 10px; font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
label.field { display: block; margin-bottom: var(--s4); }
label.field > span { display: block; font-family: var(--font-ui); font-size: 16px; margin-bottom: 4px; }
label.field > small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
input[type=text], input[type=number], input[type=datetime-local], input[type=search], textarea, select {
  width: 100%; padding: 8px 10px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 0;
  box-shadow: inset 2px 2px 0 color-mix(in srgb, var(--ink) 12%, transparent);
}
textarea { min-height: 84px; resize: vertical; }
.choice { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.choice label { display: flex; gap: var(--s3); padding: var(--s3); border: 1.5px solid var(--line); cursor: pointer; align-items: flex-start; }
.choice label:has(input:checked) { background: var(--tint); color: var(--tint-ink); }
.choice input { margin-top: 4px; accent-color: var(--ink); }
.choice b { font-family: var(--font-ui); font-weight: 600; font-size: 17px; display: block; }
.note { border: 1.5px dashed var(--line); padding: var(--s3); font-size: 15px; background: var(--paper-2); }
.note.bad { border-style: solid; border-color: var(--bad); color: var(--bad); }
.tag { display: inline-block; font-family: var(--font-ui); font-size: 14px; line-height: 1; padding: 3px 7px; border: 1.5px solid currentColor; white-space: nowrap; }
.tag.good { color: var(--good); } .tag.bad { color: var(--bad); } .tag.wait { color: var(--wait); }
.tag.fill { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: grid; grid-template-columns: 34px 1fr auto; gap: var(--s3); align-items: center; padding: 10px var(--s3); border-bottom: 1px solid color-mix(in srgb, var(--line) 22%, transparent); }
.list > li:last-child { border-bottom: 0; }
.list > li:hover { background: var(--paper-2); }
.list .t { font-family: var(--font-ui); font-size: 18px; line-height: 1.15; }
.list .t a { text-decoration: none; } .list .t a:hover { text-decoration: underline; }
.list .d { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.list img.coin { width: 34px; height: 34px; object-fit: cover; border: 1.5px solid var(--line); image-rendering: auto; }
.ico { width: 32px; height: 32px; flex: none; }
.ico * { vector-effect: non-scaling-stroke; }
.empty { padding: var(--s6) var(--s4); text-align: center; color: var(--ink-2); }
.empty .btn { margin-top: var(--s3); }
table.books { width: 100%; border-collapse: collapse; font-size: 14px; }
table.books th { text-align: left; font-family: var(--font-ui); font-weight: 600; font-size: 15px; padding: 6px var(--s3); border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.books td { padding: 6px var(--s3); border-bottom: 1px solid color-mix(in srgb, var(--line) 18%, transparent); vertical-align: top; }
table.books td:first-child { white-space: nowrap; color: var(--ink-2); }
table.books td.n { text-align: right; font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
table.books .in { color: var(--good); } table.books .out { color: var(--bad); }
.scroll-x { overflow-x: auto; }

/* ---------- pieces ---------- */
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: .98; margin-bottom: var(--s4); max-width: 14ch; }
.hero p.lead { font-size: 19px; line-height: 1.45; max-width: 46ch; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--s4); font-size: 15px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: var(--s3); align-items: start; }
.steps li::before { content: counter(s); font-family: var(--font-ui); font-size: 18px; width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--tint); color: var(--tint-ink); }
.steps li.done::before { content: "✓"; background: var(--ink); color: var(--paper); }
.steps li.now::before { background: var(--mari); color: #1b1a1f; }
.steps b { font-family: var(--font-ui); font-weight: 600; font-size: 18px; display: block; line-height: 1.2; }
.log {
  background: var(--log-bg); font: 12.5px/1.55 var(--font-mono); padding: var(--s3); height: 340px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  border-top: 1.5px solid var(--line);
}
.log .agent { color: var(--ink); font-weight: 500; }
.log .system { color: var(--tint-ink); background: var(--tint); }
.log .stderr { color: var(--ink-2); }
.log .stdout { color: var(--ink-2); }
.log .cursor::after { content: "▍"; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.screen { background: #000; border-top: 1.5px solid var(--line); aspect-ratio: 4 / 5; max-height: 78vh; width: 100%; display: block; border-left: 0; border-right: 0; border-bottom: 0; }
.screen.tall { aspect-ratio: 3 / 4; max-height: 640px; }
.screen-off { aspect-ratio: 16 / 7; display: grid; place-items: center; text-align: center; padding: var(--s4); background: var(--paper-2); border-top: 1.5px solid var(--line); color: var(--ink-2); }
.bigfig { font-family: var(--font-ui); font-size: 30px; line-height: 1; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s4); }
.figs > div > span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.split-bar { display: flex; height: 22px; border: 1.5px solid var(--line); font-family: var(--font-ui); font-size: 14px; line-height: 19px; overflow: hidden; }
.split-bar > span { padding: 0 6px; white-space: nowrap; overflow: hidden; }
.split-bar > .agent { background: var(--ink); color: var(--paper); }
.deskicons { display: flex; flex-wrap: wrap; gap: var(--s5); padding: var(--s2) 0 var(--s5); }
.deskicons a { display: grid; justify-items: center; gap: 4px; width: 92px; text-decoration: none; font-family: var(--font-ui); font-size: 15px; text-align: center; line-height: 1.1; }
.deskicons a span { padding: 1px 5px; background: var(--paper); }
.deskicons a:hover span, .deskicons a:focus-visible span { background: var(--ink); color: var(--paper); }
.deskicons .ico { width: 44px; height: 44px; }
.prose h3 { font-size: 22px; margin: var(--s5) 0 var(--s2); }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; margin: 0 0 var(--s3); max-width: 66ch; }
.prose li { margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 99; background: var(--ink); color: var(--paper); padding: 10px 16px; font-family: var(--font-ui); font-size: 16px; border: 1.5px solid var(--paper); max-width: min(92vw, 560px); }
.keybox { font: 13px/1.4 var(--font-mono); padding: var(--s3); border: 1.5px solid var(--line); background: var(--mari); color: #1b1a1f; overflow-wrap: anywhere; user-select: all; }

/* the one orchestrated moment: changing rooms */
.wipe { position: fixed; inset: 0; z-index: 80; pointer-events: none; background-image: radial-gradient(var(--line) 1.4px, transparent 1.6px); background-size: 4px 4px; opacity: 0; }
.wipe.go { animation: wipe .42s steps(6) both; }
@keyframes wipe { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wipe.go, .log .cursor::after { animation: none; } .brand .plus { transition: none; } }

@media (max-width: 720px) {
  main { padding: var(--s4) var(--s2) var(--s6); }
  .menubar { height: auto; flex-wrap: wrap; font-size: 16px; }
  .menubar a, .menubar button { height: 34px; padding: 0 9px; }
  .menubar .menu-links { order: 3; width: 100%; overflow-x: auto; border-top: 1.5px solid var(--line); }
  .room { margin: 5px 4px; }
  .list > li { grid-template-columns: 34px 1fr; } .list > li > :last-child:not(:nth-child(2)) { grid-column: 2; justify-self: start; }
  .log { height: 260px; }
}

/* mechanics grid, app grid, glossary */
.deskicons button, .appgrid button { display: grid; justify-items: center; gap: 4px; width: 104px; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-ui); font-size: 15px; text-align: center; line-height: 1.1; color: inherit; }
.deskicons button span, .appgrid button span { padding: 1px 5px; background: var(--paper); }
.deskicons button:hover span, .deskicons button[aria-current] span, .appgrid button:hover span, .appgrid button[aria-current] span { background: var(--ink); color: var(--paper); }
.deskicons button .ico, .appgrid button .ico { width: 44px; height: 44px; }
.deskicons { padding: var(--s2) 0 0; }
.appgrid { display: flex; flex-wrap: wrap; gap: var(--s5); }
.mech { display: grid; grid-template-columns: 64px 1fr; gap: var(--s4); align-items: start; }
.mech .ico { width: 56px; height: 56px; }
.mech h3 { font-size: 22px; margin-bottom: 6px; }
a.term { text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; }
a.term:hover { background: var(--tint); color: var(--tint-ink); }
.gloss { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4) var(--s5); }
.gloss > div { padding: var(--s3); border: 1.5px solid transparent; }
.gloss > div.hit, .gloss > div:target { border-color: var(--line); background: var(--tint); color: var(--tint-ink); }
.gloss dt { font-family: var(--font-ui); font-size: 19px; margin-bottom: 4px; }
.gloss dd { margin: 0; font-size: 15px; }
.deskicons button span, .appgrid button span { max-width: 104px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* classic-desktop polish */
.clock { display: flex; align-items: center; padding: 0 var(--s3); font-family: var(--font-ui); font-size: 16px; }
.win { box-shadow: 1px 1px 0 var(--shadow), 2px 2px 0 var(--shadow); border-width: 1px; }
.win > header { border-bottom-width: 1px; height: 22px; background-size: 100% 13px; background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 2px); }
.win > header .shade { width: 12px; height: 12px; border-width: 1px; box-shadow: 0 0 0 1px var(--paper); }
.win > header h2 { font-size: 15px; font-weight: 700; }
.statusline { border-bottom: 1px solid var(--line); box-shadow: 0 2px 0 var(--paper), 0 3px 0 var(--line); margin-bottom: 3px; justify-content: space-between; }
.statusline > :last-child { margin-left: 0; }
.menubar { border-bottom-width: 1px; font-weight: 600; height: 28px; }
.menubar .brand { font-size: 17px; }
.brand .logo { width: 25px; height: 20px; }
.room { margin: 3px var(--s2); border-width: 1px; }
.ico { width: 32px; height: 32px; }
.deskicons { padding: var(--s4) var(--s4) var(--s2); gap: var(--s4) var(--s3); }
.deskicons button { width: 112px; }
.deskicons button .ico, .appgrid button .ico { width: 48px; height: 48px; }
.deskicons button span, .appgrid button span { background: transparent; font-weight: 600; max-width: 112px; }
.mechinfo { border-top: 1px solid var(--line); padding: var(--s4); background: var(--paper-2); min-height: 92px; }
.mechinfo .mech .ico { width: 48px; height: 48px; }
.mark { display: inline-block; vertical-align: middle; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; flex: none; }
.list > li > .mark { justify-self: center; }
.btn { border-width: 1px; border-radius: 7px; box-shadow: 0 1px 0 var(--shadow); font-weight: 600; }
.btn.primary { outline-width: 2px; outline-offset: 2px; border-radius: 9px; }
@media (max-width: 720px) { .menubar { height: auto; } .clock { display: none; } .deskicons button { width: 96px; } }

.pid { font-family: var(--font-mono); font-size: 12px; font-weight: 500; padding: 1px 5px; border: 1px solid var(--line); background: var(--tint); color: var(--tint-ink); vertical-align: 2px; white-space: nowrap; }

table.ps th { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
table.ps td { vertical-align: middle; padding: 9px var(--s3); font-size: 15px; }
table.ps td.n { text-align: left; font-size: 14px; color: var(--ink); }
table.ps td:first-child { color: var(--ink); }
table.ps a { text-decoration: none; } table.ps a:hover b { text-decoration: underline; }
.menu-links a { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }

.man { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s4) var(--s6); }
.man h3 { font-size: 20px; margin-bottom: 6px; }
.man p { font-size: 15.5px; margin: 0; }

/* apps desktop, score, ballot */
.appmark { width: 48px; height: 48px; display: inline-block; }
.mech .appmark { width: 48px; height: 48px; }
.cmd { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 13px; color: var(--muted, #555); margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--paper); padding: 2px 8px; font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 12px; }
.scorebar { display: flex; height: 16px; border: 1.5px solid var(--ink); }
.scorebar .o { background: var(--ink); } .scorebar .r { background: #ccccff; } .scorebar .m { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 3px, var(--line) 3px, var(--line) 4px); }
.meter { height: 8px; border: 1px solid var(--ink); margin: 6px 0 4px; max-width: 420px; } .meter span { display: block; height: 100%; background: var(--ink); transition: width .4s; }

/* player bar, case file, misc fixes */
.xlink { display: grid; place-items: center; padding: 0 12px; align-self: stretch; color: inherit; }
.xlink:hover { background: var(--ink); color: var(--paper); }
.plbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-top: 1.5px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.plbar .btn { padding: 2px 8px; font-size: 14px; }
.plpath { flex: 1; min-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); padding: 2px 8px; background: var(--paper-2); font-size: 12px; }
.screen { background: #fff; }
.lprev { width: 56px; height: 56px; object-fit: cover; border: 1.5px solid var(--line); }
.casepics { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: var(--s3); align-items: center; }
.casepics figure { margin: 0; }
.casepics img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border: 1.5px solid var(--ink); display: block; background: #1f2a36; }
.casepics figcaption { font-size: 14px; margin-top: 6px; } .casepics figcaption b { font-family: var(--font-ui); font-size: 17px; display: block; }
.casepics .arrow { font-family: var(--font-ui); font-size: 28px; }
.pipe { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); border: 1.5px solid var(--ink); }
.pipe li { padding: 10px 12px; border-right: 1px solid var(--line); display: grid; gap: 3px; align-content: start; position: relative; }
.pipe li:last-child { border-right: 0; }
.pipe li:not(:last-child)::after { content: "▸"; position: absolute; right: -6px; top: 8px; background: var(--paper); font-size: 12px; line-height: 1; }
.pipe .ico, .pipe .mark { width: 26px; height: 26px; margin: 4px 0; }
.pipe b { font-family: var(--font-ui); font-size: 17px; line-height: 1.1; } .pipe span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 900px) { .casepics { grid-template-columns: 1fr; } .casepics .arrow { transform: rotate(90deg); justify-self: center; } .pipe { grid-template-columns: repeat(2, 1fr); } .pipe li { border-bottom: 1px solid var(--line); } .pipe li::after { display: none; } }
.win .body.flush > .empty { width: 100%; }
.empty { display: grid; justify-items: center; }
/* the pixel face needs room to stay legible when small */
.tag { font-size: 15px; letter-spacing: .02em; } table.books th { font-size: 16px; letter-spacing: .02em; }
.deskicons button, .appgrid button { font-size: 16px; letter-spacing: .02em; } .statusline { letter-spacing: .01em; }

.fit { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-top: 1.5px solid var(--line); background: #fff; }
.fitframe { position: absolute; left: 0; top: 0; width: 1024px; transform-origin: 0 0; border: 0; aspect-ratio: auto; max-height: none; }
.shot { position: relative; } .shot span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #9fb0c0; font-family: var(--font-mono); font-size: 13px; }

/* case file v2 */
.case2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s5); align-items: start; }
.case2 .before { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.case2 figure { margin: 0; } .case2 figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; display: block; border: 1.5px solid var(--ink); border-top: 0; background: #1f2a36; }
.case2 figcaption { font-size: 13.5px; margin-top: 6px; } .case2 figcaption b { font-family: var(--font-ui); font-size: 17px; display: block; }
.chrome { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--ink); background: var(--paper-2); padding: 3px 6px; font-family: var(--font-mono); font-size: 11px; }
.chrome i { width: 8px; height: 8px; border: 1.5px solid var(--ink); flex: none; } .chrome span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--paper); border: 1px solid var(--line); padding: 0 6px; flex: 1; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.thumb { text-decoration: none; display: grid; gap: 4px; font-size: 13px; } .thumb .fit.small { aspect-ratio: 4 / 3; border: 1.5px solid var(--ink); }
.thumb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .thumb .tag { font-size: 12px; padding: 1px 5px; }
.pipe.steps6 li { padding: 0; } .pipe button { all: unset; cursor: pointer; display: grid; gap: 3px; align-content: start; padding: 10px 12px; width: 100%; height: 100%; box-sizing: border-box; }
.pipe button:hover, .pipe button[aria-current] { background: #ccccff; } .pipe button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.casebox { border: 1.5px solid var(--ink); border-top: 0; padding: 10px 12px; } .casebox .log { max-height: 260px; margin-top: 4px; }
.copyrow { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; } .copyrow code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--paper-2); border: 1px solid var(--line); padding: 2px 6px; } .copyrow .btn { padding: 1px 8px; font-size: 13px; }
@media (max-width: 900px) { .case2 { grid-template-columns: 1fr; } }

/* case file: one even row */
.cards { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--s3); }
.ccard { margin: 0; min-width: 0; } .ccard img, .ccard .fit.small { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; display: block; border: 1.5px solid var(--ink); border-top: 0; background: #1f2a36; box-sizing: border-box; }
.ccard .fit.small { background: #fff; } .ccard figcaption { font-size: 13.5px; margin-top: 6px; } .ccard figcaption b { font-family: var(--font-ui); font-size: 17px; display: block; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pipe.steps6 { margin-top: var(--s4); }
.fav { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; vertical-align: middle; } .fav > * { grid-area: 1 / 1; } .fav img { width: 28px; height: 28px; object-fit: contain; background: var(--paper); image-rendering: auto; }
td .fav { width: 18px; height: 18px; } td .fav img { width: 16px; height: 16px; }
img.coin.tiny { width: 20px; height: 20px; vertical-align: middle; object-fit: cover; border: 1px solid var(--line); }
.list > li:has(a[href^="/coin/"]), table.ps tbody tr:has(a[href^="/coin/"]) { cursor: pointer; } .list > li:has(a[href^="/coin/"]):hover, table.ps tbody tr:has(a[href^="/coin/"]):hover { background: var(--paper-2); }

.eras { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.eras button { all: unset; cursor: pointer; border: 1.5px solid var(--ink); padding: 3px 9px; font-family: var(--font-ui); font-size: 16px; display: grid; justify-items: center; line-height: 1.1; background: var(--paper); }
.eras button small { font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); } .eras button:hover, .eras button[aria-current] { background: #ccccff; } .eras button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.twopanel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--ink); margin-top: var(--s4); }
.twopanel section { padding: 12px 14px; } .twopanel section + section { border-left: 1.5px solid var(--ink); background: #ccccff33; }
.twopanel h3 { font-size: 19px; margin-bottom: 4px; } .twopanel p { margin: 0; font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 0; border: 1.5px solid var(--ink); border-top: 0; }
.facts > div { padding: 8px 12px; border-right: 1px solid var(--line); } .facts dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); } .facts dd { margin: 2px 0 0; font-size: 13.5px; }
@media (max-width: 800px) { .twopanel { grid-template-columns: 1fr; } .twopanel section + section { border-left: 0; border-top: 1.5px solid var(--ink); } }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; } @keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

.list > li.withshot { grid-template-columns: 96px 1fr auto; } .shotthumb { width: 96px; height: 64px; object-fit: cover; object-position: top; border: 1.5px solid var(--ink); background: var(--paper-2); display: block; }
@media (max-width: 600px) { .list > li.withshot { grid-template-columns: 64px 1fr auto; } .shotthumb { width: 64px; height: 44px; } }

.col { display: grid; gap: 24px; align-content: start; min-width: 0; }
.casebox .log { height: auto; min-height: 0; max-height: 240px; border-top: 0; margin-top: 0; } .casebox { padding: 0; } .casebox > :not(.log) { margin: 10px 12px; }
.ccard a img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; display: block; border: 1.5px solid var(--ink); border-top: 0; }
.trade { border: 1.5px solid var(--ink); margin-top: 12px; padding: 10px 12px; background: var(--paper-2); }
.traderow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; } .traderow > span { font-family: var(--font-ui); font-size: 17px; width: 40px; } .traderow .btn { padding: 3px 10px; font-size: 15px; background: var(--paper); }
.tradeamt { width: 84px; padding: 4px 6px; } .tradeout { margin: 4px 0 0; overflow-wrap: anywhere; }
.coingrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s4); }
.coincard { display: grid; text-decoration: none; border: 1.5px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); } .coincard:hover { background: #ccccff33; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cchead { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1.5px solid var(--ink); } .cchead .coin, .cchead .ico { width: 40px; height: 40px; object-fit: cover; }
.cchead b { font-family: var(--font-ui); font-size: 20px; display: block; line-height: 1; } .cchead span { font-size: 13px; color: var(--ink-2); }
.ccshot { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); } .ccshot.none { display: grid; place-items: center; font-size: 13px; color: var(--ink-2); }
.ccbody { padding: 10px 12px; display: grid; gap: 6px; } .cckeep { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ccnums { display: flex; gap: 12px; align-items: center; font-size: 13px; flex-wrap: wrap; } .ccnums b { font-family: var(--font-ui); font-size: 17px; } .ccnums .tag { margin-left: auto; }

.traderow .tradeamt { width: 84px; flex: none; padding: 4px 6px; }

.brand .logo { width: 22px; height: 25px; }
