/* Front-End Cabinet: index styles */
:root {
  --paper: #f2efe6;
  --paper-2: #e9e4d7;
  --card: #f8f6f0;
  --ink: #16140f;
  --ink-2: #3b372e;
  --muted: #6d675b;
  --line: rgba(22, 20, 15, .14);
  --line-2: rgba(22, 20, 15, .26);
  --accent: #c8402a;
  --accent-ink: #fff8f2;
  --focus: #1f5fd1;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -28px rgba(30, 24, 12, .45);
  --serif: "Gloock", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 6px;
  --tag-ink: var(--ink);
  --tag-paper: color-mix(in srgb, var(--card) 88%, transparent);
  --tag-line: var(--line);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131210; --paper-2: #1b1a17; --card: #1a1916; --ink: #ede8dc; --ink-2: #cfc8b8; --muted: #9a9385;
    --line: rgba(237, 232, 220, .12); --line-2: rgba(237, 232, 220, .24); --accent: #ef6b4c; --accent-ink: #1a0d08; --focus: #8db4ff;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 22px 50px -30px rgba(0,0,0,.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131210; --paper-2: #1b1a17; --card: #1a1916; --ink: #ede8dc; --ink-2: #cfc8b8; --muted: #9a9385;
  --line: rgba(237, 232, 220, .12); --line-2: rgba(237, 232, 220, .24); --accent: #ef6b4c; --accent-ink: #1a0d08; --focus: #8db4ff;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 22px 50px -30px rgba(0,0,0,.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans);
  font-feature-settings: "ss01", "kern"; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .22; } }
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
button, input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 12px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--card); color: var(--ink-2); }

/* ── masthead ─────────────────────────────────────────── */
.masthead {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 18px var(--gutter); border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: -.01em; }
.mark { width: 26px; height: 26px; }
.mark rect { fill: var(--ink); } .mark .d { fill: var(--paper); } .mark .a { fill: var(--accent); }
.edition { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.mast-actions { display: flex; align-items: center; gap: 18px; }
.mast-actions a { text-decoration: none; color: var(--ink-2); }
.mast-actions a:hover { color: var(--ink); text-decoration: underline; }
.theme-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 10px 5px 7px; cursor: pointer; }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.theme-btn svg path { fill: currentColor; stroke: none; }
.theme-btn:hover { background: var(--card); }

/* ── hero ─────────────────────────────────────────────── */
.hero { padding: clamp(40px, 8vw, 112px) var(--gutter) clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.hero h1 {
  margin: 0; font: 400 clamp(44px, 7.4vw, 118px)/.94 var(--serif); letter-spacing: -.025em; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-copy p { margin: 0 0 14px; max-width: 46ch; color: var(--ink-2); font-size: 17px; }
.kinds { color: var(--muted) !important; font-size: 12px !important; }
.kinds b { color: var(--ink); font-weight: 600; }
.spectrum { grid-column: 1 / -1; margin: clamp(12px, 3vw, 28px) 0 0; }
.spectrum-row { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; height: 54px; }
.spectrum-row a { display: flex; flex-direction: column; border-radius: 2px; overflow: hidden; outline-offset: 2px; transition: transform .35s cubic-bezier(.2,.8,.2,1), flex-grow .3s; position: relative; }
.spectrum-row a span { flex: 1; }
.spectrum-row a:hover, .spectrum-row a:focus-visible { transform: translateY(-6px); }
.spectrum-row a::after {
  content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px); opacity: 0;
  font: 500 11px/1 var(--mono); white-space: nowrap; background: var(--ink); color: var(--paper); padding: 5px 7px; border-radius: 3px; pointer-events: none; transition: .2s;
}
.spectrum-row a:hover::after, .spectrum-row a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.spectrum-row a:first-child::after { left: 0; transform: translate(0, 4px); }
.spectrum-row a:last-child::after { left: auto; right: 0; transform: translate(0, 4px); }
.spectrum-row a:first-child:hover::after, .spectrum-row a:last-child:hover::after { transform: translate(0, 0); }
.spectrum figcaption { margin-top: 10px; color: var(--muted); }

/* ── toolbar ──────────────────────────────────────────── */
.toolbar {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px var(--gutter); background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-block: 1px solid var(--line);
}
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid var(--line-2); background: transparent;
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font: 500 13px/1 var(--sans); color: var(--ink-2); transition: background .2s, color .2s, border-color .2s;
}
.chip .n { font: 500 11px/1 var(--mono); color: var(--muted); }
.chip:hover { background: var(--card); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.tools-right { display: flex; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px 0 12px; background: var(--card); height: 36px; }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; flex: none; }
.search input { border: 0; background: none; outline: none; width: min(30vw, 260px); height: 100%; font-size: 14px; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.sort select { appearance: none; border: 1px solid var(--line-2); border-radius: 999px; height: 36px; padding: 0 30px 0 12px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23888' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center / 12px; font-size: 13px; cursor: pointer; }
.view-toggle { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; height: 36px; }
.view-toggle button { background: none; border: 0; width: 38px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.view-toggle button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ── cabinet: drawers and cards ───────────────────────── */
.cabinet { padding: 8px var(--gutter) 40px; outline: none; }
.drawer-sec { padding-top: clamp(36px, 5vw, 64px); }
.drawer-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 16px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 2px solid var(--ink); }
.drawer-head .idx { font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .08em; }
.drawer-head h2 { margin: 0; font: 400 clamp(28px, 3.4vw, 44px)/1 var(--serif); letter-spacing: -.01em; }
.drawer-head p { margin: 0; color: var(--muted); font-size: 14px; text-align: right; max-width: 44ch; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); grid-auto-flow: dense; }

.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s, border-color .3s; min-width: 0;
}
.card:hover, .card:focus-within { transform: translateY(-3px); border-color: var(--line-2); }
.card.feature-4 { grid-column: span 2; grid-row: span 2; }
.card.feature-2 { grid-column: span 2; }
.shot { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--paper-2); isolation: isolate; }
.card.feature-4 .shot { aspect-ratio: auto; flex: 1; min-height: 320px; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform 1.2s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.card:hover .shot img { transform: scale(1.025); }
.shot .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 400 clamp(48px, 8vw, 96px)/1 var(--serif); color: color-mix(in srgb, var(--ink) 18%, transparent); }
.shot iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; opacity: 0; transition: opacity .5s; pointer-events: none; background: var(--paper-2); }
.shot.live iframe.ready { opacity: 1; }
.live-badge { position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; gap: 6px; align-items: center; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(12,10,8,.62); padding: 5px 8px 5px 7px; border-radius: 999px; opacity: 0; transform: translateY(-4px); transition: .3s; pointer-events: none; }
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 0 0 rgba(255,90,60,.7); animation: pulse 1.6s infinite; }
.shot.live .live-badge { opacity: 1; transform: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255,90,60,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,60,0); } }
.no-label { position: absolute; left: 10px; top: 10px; z-index: 2; font: 600 11px/1 var(--mono); letter-spacing: .06em; background: var(--card); color: var(--ink); padding: 6px 8px; border-radius: 3px; border: 1px solid var(--line); }
.swatches { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; display: flex; z-index: 2; }
.swatches span { flex: 1; }
.card-body { padding: 16px 18px 16px; display: grid; gap: 6px; }
.meta-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.meta-row .stars::before { content: "★ "; letter-spacing: 0; }
.card h3 { margin: 2px 0 0; font: 400 clamp(22px, 1.9vw, 27px)/1.08 var(--serif); letter-spacing: -.01em; }
.card.feature-4 h3 { font-size: clamp(28px, 2.8vw, 40px); }
.card .tool-name { margin: 0; font: 600 14px/1.3 var(--sans); }
.card .tagline { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.card .set { margin: 0; color: var(--muted); font: 400 12px/1.4 var(--sans); font-style: italic; }
.actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; font: 600 13px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--ink); transition: background .2s, color .2s, transform .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card .pending { margin-left: auto; color: var(--muted); font: 500 11px/1 var(--mono); }
/* the card link covers the shot */
.shot-link { position: absolute; inset: 0; z-index: 3; }
.shot-link:focus-visible { outline-offset: -4px; }

/* list view */
[data-view="list"] .grid { grid-template-columns: 1fr; gap: 0; }
[data-view="list"] .card { flex-direction: row; align-items: center; border-radius: 0; border-width: 0 0 1px; box-shadow: none; background: transparent; transform: none !important; grid-column: auto !important; grid-row: auto !important; }
[data-view="list"] .card:hover { background: var(--card); }
[data-view="list"] .shot { width: 136px; flex: none !important; min-height: 0 !important; aspect-ratio: 16 / 10 !important; border-radius: 3px; margin: 10px 0; }
[data-view="list"] .shot .no-label, [data-view="list"] .live-badge { display: none; }
[data-view="list"] .card-body { flex: 1; grid-template-columns: 54px minmax(0, 1.1fr) minmax(0, 1.4fr) auto; align-items: center; column-gap: 18px; padding: 10px 0 10px 18px; }
[data-view="list"] .card-body .lno { display: block; font: 500 13px/1 var(--mono); color: var(--accent); }
[data-view="list"] .card h3 { font-size: 21px; margin: 0; }
[data-view="list"] .card .tagline, [data-view="list"] .card .set { display: none; }
[data-view="list"] .meta-row { flex-direction: column; gap: 4px; }
[data-view="list"] .actions { margin: 0; }
.lno { display: none; }
.titles { display: grid; gap: 6px; }
[data-view="list"] .titles { gap: 2px; }

.empty { margin: 40px var(--gutter) 80px; padding: 48px 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty strong { color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 28px; display: block; margin-bottom: 8px; }
.empty button { margin-top: 14px; }

/* ── colophon ─────────────────────────────────────────── */
.colophon { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: clamp(20px, 4vw, 56px); padding: clamp(40px, 6vw, 80px) var(--gutter) 56px; border-top: 2px solid var(--ink); margin-top: 40px; }
.colophon h2 { margin: 0 0 12px; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.colophon p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; max-width: 60ch; }
.keys dl { margin: 0; display: grid; gap: 8px; }
.keys dl div { display: flex; gap: 10px; align-items: center; }
.keys dt { display: flex; gap: 3px; min-width: 92px; }
.keys dd { margin: 0; color: var(--ink-2); }
.made { margin-top: 22px !important; color: var(--muted) !important; }

/* ── drawer (recreate) ────────────────────────────────── */
.drawer { padding: 0; border: 0; margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(760px, 100vw); max-width: 100vw; background: var(--paper); color: var(--ink); box-shadow: -30px 0 80px -40px rgba(0,0,0,.5); }
.drawer::backdrop { background: rgba(14, 12, 9, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer[open] { animation: slidein .5s cubic-bezier(.2,.8,.2,1); }
.drawer[open]::backdrop { animation: fade .4s ease; }
.drawer.closing { animation: slideout .28s cubic-bezier(.4,0,1,1) forwards; }
.drawer.closing::backdrop { animation: fade .28s ease reverse forwards; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideout { to { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.d-head { position: relative; padding: 26px 28px 18px; border-bottom: 1px solid var(--line); }
.d-kicker { margin: 0 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.d-head h2 { margin: 0; font: 400 clamp(30px, 4vw, 44px)/1.02 var(--serif); padding-right: 48px; letter-spacing: -.01em; }
.d-tool { margin: 8px 0 14px; color: var(--ink-2); }
.d-tool b { font-weight: 600; color: var(--ink); }
.d-links { display: flex; flex-wrap: wrap; gap: 8px; }
.d-close { position: absolute; right: 20px; top: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.d-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.d-close:hover { background: var(--paper-2); }
.d-tabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.d-tabs::-webkit-scrollbar { display: none; }
.d-tab { background: none; border: 0; padding: 14px 10px 12px; cursor: pointer; font: 600 13px/1 var(--sans); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.d-tab:hover { color: var(--ink); }
.d-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.d-panels { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 48px; }
.d-panel[hidden] { display: none; }
.d-panel h3 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 26px 0 10px; }
.d-panel h3:first-child { margin-top: 4px; }
.d-panel p { color: var(--ink-2); margin: 0 0 12px; max-width: 64ch; }
.lead { font-size: 15px; }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
pre.prompt, pre.code {
  margin: 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 12.5px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); tab-size: 2;
}
pre.prompt { max-height: 52vh; overflow: auto; }
details.rules { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
details.rules summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.rules summary::-webkit-details-marker { display: none; }
details.rules summary::after { content: "+"; font: 400 20px/1 var(--mono); color: var(--muted); }
details.rules[open] summary::after { content: "–"; }
details.rules pre { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); max-height: 40vh; overflow: auto; }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: baseline; color: var(--ink-2); }
ol.steps li::before { content: counter(s, decimal-leading-zero); font: 400 26px/1 var(--serif); color: var(--accent); }
code { font: 400 .88em var(--mono); background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }
.cmd { margin-bottom: 14px; }
.cmd-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mini { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font: 500 11px/1 var(--mono); cursor: pointer; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.mini:hover { background: var(--card); color: var(--ink); }
table.libs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.libs th, table.libs td { text-align: left; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.libs th { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.libs td.v { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
table.libs td a { word-break: break-all; font-size: 12.5px; color: var(--ink-2); }
.fonts { display: flex; flex-wrap: wrap; gap: 10px; }
.font-spec { flex: 1 1 180px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--card); }
.font-spec .aa { font-size: 40px; line-height: 1; display: block; margin-bottom: 8px; }
.font-spec span { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.pal { display: flex; flex-wrap: wrap; gap: 8px; }
.pal button { display: grid; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font: 500 11px/1 var(--mono); color: var(--ink-2); text-align: left; }
.pal i { display: block; width: 72px; height: 48px; border-radius: 4px; border: 1px solid var(--line); }
ul.plain { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 7px; }
ul.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.files a { font: 400 13px/1.4 var(--mono); }
dl.facts { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; font-size: 14.5px; }
dl.facts dt { color: var(--muted); font: 500 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
dl.facts dd { margin: 0; color: var(--ink-2); }
.note { border-left: 3px solid var(--accent); padding: 10px 14px; background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .3s cubic-bezier(.2,.8,.2,1); z-index: 2147483001; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.feature-4 { grid-row: auto; }
  .card.feature-4 .shot { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
  .hero { grid-template-columns: 1fr; }
  .colophon { grid-template-columns: 1fr 1fr; }
  .keys { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .masthead { grid-template-columns: 1fr auto; }
  .edition { display: none; }
  .mast-actions { gap: 12px; }
  .mast-actions a:first-child { display: none; }
  .toolbar { padding-block: 10px; gap: 10px; }
  .chips { width: 100%; }
  .tools-right { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .search kbd { display: none; }
  .grid { grid-template-columns: 1fr; }
  .card.feature-2, .card.feature-4 { grid-column: auto; }
  .drawer-head { grid-template-columns: auto 1fr; }
  .drawer-head p { grid-column: 1 / -1; text-align: left; }
  .spectrum-row { height: 40px; gap: 2px; }
  .colophon { grid-template-columns: 1fr; }
  .d-head { padding: 20px 18px 14px; }
  .d-panels { padding: 18px 18px 40px; }
  .d-tabs { padding: 0 12px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px 0; }
  dl.facts dd { margin-bottom: 10px; }
  [data-view="list"] .shot { width: 92px; }
  [data-view="list"] .card-body { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding-left: 12px; }
  [data-view="list"] .card-body .lno, [data-view="list"] .meta-row { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .toolbar, .spectrum, .drawer, .theme-btn { display: none !important; }
  body::before { display: none; }
}
[data-view="list"] .card-body .lno { order: 0; }
[data-view="list"] .titles { order: 1; }
[data-view="list"] .meta-row { order: 2; }
[data-view="list"] .actions { order: 3; }
/* the poster sits above its placeholder number */
.shot img { position: relative; z-index: 1; }
.card.feature-4 .shot img, .card.feature-2 .shot img { object-position: left top; }
.d-kind { margin-left: 6px; padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; color: var(--muted); vertical-align: 2px; }
.d-tagline { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; }
