/* ============================================================
   Spala Example Catalogue — implemented from the owner's Design
   Studio concept "Spala Example Catalogue v2": deep green-black
   ground, mint #55f0b8 ink, Instrument Sans/Serif + JetBrains
   Mono, provisioning matrix, inside-out showcase rows, live API
   inspector. Data on the page is real; nothing is a mockup.
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #060e0c;
  --bg-band: #08130f;
  --panel: #091815;
  --panel-deep: #071411;
  --panel-head: #0b1f1b;
  --panel-active: #0e2a24;
  --text: #f2fbf7;
  --text-soft: #9fbdb5;
  --text-dim: #6f8f87;
  --text-faint: #4e6b64;
  --mint: #55f0b8;
  --line: rgba(85, 240, 184, .14);
  --line-soft: rgba(85, 240, 184, .12);
  --line-strong: rgba(85, 240, 184, .28);
  --sans: 'Instrument Sans', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad-x: clamp(16px, 4vw, 60px);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: #ffffff; }
button { font-family: inherit; }
::selection { background: var(--mint); color: var(--bg); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
.mint { color: var(--mint); }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; color: var(--mint); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--mint); color: var(--bg); padding: 10px 14px; z-index: 99; font-weight: 600; }
.skip:focus { left: 12px; top: 12px; }
@keyframes cellPulse { 0%, 100% { opacity: .22; } 50% { opacity: 1; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ── top bar ── */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 13px var(--pad-x); background: rgba(6, 14, 12, .85); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(85, 240, 184, .13); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-gem { width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(140deg, var(--mint), #0b5a50); display: block; }
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: -.015em; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); border-left: 1px solid rgba(85, 240, 184, .2); padding-left: 10px; }
.topnav { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); font-size: 13.5px; }
.topnav a { color: var(--text-soft); }
.topnav a:hover { color: var(--text); }
.topnav .cta { padding: 9px 15px; border-radius: 8px; background: var(--mint); color: var(--bg); font-weight: 600; white-space: nowrap; }
.topnav .cta:hover { color: var(--bg); filter: brightness(1.08); }

/* ── hero ── */
.hero { position: relative; padding: clamp(48px, 8vw, 104px) var(--pad-x) clamp(36px, 5vw, 64px); }
.hero-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(58% 70% at 78% 8%, rgba(11, 90, 80, .5), transparent 68%); }
.hero-grid { position: relative; max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: clamp(36px, 5vw, 80px); align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mint); margin-bottom: 28px; }
.hero h1 { font-size: clamp(46px, 8vw, 118px); line-height: .88; letter-spacing: -.045em; font-weight: 700; text-wrap: balance; }
.lede { margin-top: 30px; max-width: 52ch; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.5; color: var(--text-soft); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero-ctas.center { justify-content: center; }
.btn { padding: 14px 22px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.btn.solid { background: var(--mint); color: var(--bg); }
.btn.solid:hover { color: var(--bg); filter: brightness(1.08); }
.btn.ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn.ghost:hover { color: var(--text); border-color: var(--mint); }
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.matrix-card { position: relative; display: grid; gap: 14px; padding: clamp(18px, 2.4vw, 30px); border: 1px solid rgba(85, 240, 184, .16); border-radius: 16px; background: rgba(9, 24, 21, .6); }
.matrix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.matrix { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.matrix button { appearance: none; border: 0; padding: 0; aspect-ratio: 1; border-radius: 4px; background: var(--mint); opacity: .22; cursor: pointer; animation: cellPulse 3.4s ease-in-out infinite; }
.matrix button.down { opacity: .1; animation: none; background: var(--text-dim); }
.matrix button.full-stack { border-radius: 999px; opacity: 1; animation: none; display: flex; align-items: center; justify-content: center; background-color: var(--icon-bg, rgba(9, 24, 21, .9)); box-shadow: inset 0 0 0 1.5px rgba(85, 240, 184, .5); transition: transform .18s ease, box-shadow .18s ease; }
.matrix button.full-stack .glyph { color: var(--icon-fg, var(--mint)); font-size: clamp(15px, 1.5vw, 21px); font-weight: 650; letter-spacing: -0.01em; line-height: 1; font-family: 'Instrument Sans', sans-serif; }
.matrix button.full-stack .glyph.serif { font-family: 'Instrument Serif', serif; font-weight: 500; font-size: clamp(17px, 1.65vw, 23px); }
.matrix button.full-stack .glyph.mono { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: clamp(14px, 1.4vw, 19px); }
.matrix button.full-stack .glyph.ringed { text-shadow: none; }
.matrix button.full-stack.degraded { box-shadow: inset 0 0 0 1px rgba(240, 179, 85, .75); filter: saturate(.55) brightness(.85); }
.matrix button:hover, .matrix button:focus-visible { opacity: 1 !important; animation-play-state: paused; }
.matrix button.full-stack:hover, .matrix button.full-stack:focus-visible { transform: translateY(-2px) scale(1.06); box-shadow: inset 0 0 0 1px var(--mint), 0 6px 18px rgba(0, 0, 0, .45); filter: none; z-index: 1; }
/* the tile currently on the monitor: lit ring, gentle lift, breathing halo */
.matrix button.full-stack.is-live { transform: translateY(-2px) scale(1.07); box-shadow: inset 0 0 0 1.5px var(--mint), 0 0 0 3px rgba(85, 240, 184, .16), 0 8px 20px rgba(0, 0, 0, .5); filter: none; z-index: 1; animation: onAir 3.6s ease-in-out infinite; }
@keyframes onAir {
  0%, 100% { box-shadow: inset 0 0 0 1.5px var(--mint), 0 0 0 3px rgba(85, 240, 184, .14), 0 8px 20px rgba(0, 0, 0, .5); }
  50%      { box-shadow: inset 0 0 0 1.5px var(--mint), 0 0 0 6px rgba(85, 240, 184, .05), 0 8px 20px rgba(0, 0, 0, .5); }
}
.matrix-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.matrix-legend span { display: inline-flex; align-items: center; gap: 7px; }
.matrix-legend i { width: 11px; height: 11px; border-radius: 3px; }
.matrix-legend .lg-product { border-radius: 999px; background: rgba(9, 24, 21, .9); box-shadow: inset 0 0 0 1.5px rgba(85, 240, 184, .8); }
.matrix-legend .lg-degraded { border-radius: 999px; background: rgba(9, 24, 21, .9); box-shadow: inset 0 0 0 1.5px rgba(240, 179, 85, .8); }
.matrix-legend .lg-api { background: var(--mint); opacity: .35; border-radius: 2px; }
/* The monitor: a docked feed at the base of the card. Hover (or focus) any
   tile and its live screenshot lands here — inside the card, never floating,
   never clipped by the header or viewport. Geometry is constant, so hovering
   can never reflow the hero. */
.matrix-monitor { display: grid; grid-template-columns: clamp(150px, 42%, 238px) minmax(0, 1fr); gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; }
.monitor-frame { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background-color: var(--panel-deep); box-shadow: inset 0 0 0 1px rgba(85, 240, 184, .25); }
.monitor-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .16s ease; }
.monitor-frame img.on { opacity: 1; }
.monitor-blank { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; background-color: var(--panel-deep); background-image: repeating-linear-gradient(118deg, rgba(85, 240, 184, .07) 0 2px, transparent 2px 12px); font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility .16s; }
.monitor-blank.on { opacity: 1; visibility: visible; }
.monitor-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.monitor-name { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.05; letter-spacing: -.01em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.monitor-host { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-line { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--text-soft); min-height: 12px; }
.monitor-line i { flex: none; width: 7px; height: 7px; border-radius: 999px; background: var(--mint); box-shadow: 0 0 10px rgba(85, 240, 184, .7); }
.monitor-line i.sq { border-radius: 2px; box-shadow: none; opacity: .75; }
.monitor-line i.amber { background: #f0b355; box-shadow: 0 0 10px rgba(240, 179, 85, .55); }
.monitor-line i.amber.sq { box-shadow: none; }
.monitor-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat-strip div { background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.stat-strip b { font-size: clamp(20px, 2.3vw, 28px); font-weight: 700; letter-spacing: -.03em; }
.stat-strip span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }

/* ── marquee ── */
.marquee-band { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 13px 0; overflow: hidden; white-space: nowrap; background: var(--bg-band); }
.marquee { display: inline-flex; animation: marquee 70s linear infinite; font-family: var(--mono); font-size: 12px; color: var(--text-faint); letter-spacing: .04em; }
.marquee span { padding-right: 26px; }

/* ── sections ── */
.section { padding: clamp(56px, 8vw, 104px) var(--pad-x) clamp(40px, 6vw, 80px); }
.section.alt { background: var(--bg-band); border-top: 1px solid var(--line-soft); }
.wrap { max-width: 1400px; margin: 0 auto; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: clamp(34px, 5vw, 60px); }
.section-head h2 { font-size: clamp(30px, 4.4vw, 60px); line-height: 1; letter-spacing: -.035em; font-weight: 700; max-width: 20ch; text-wrap: balance; }
.section-head p { max-width: 46ch; font-size: 15px; line-height: 1.55; color: var(--text-soft); }

/* ── showcase rows ── */
.showcase-list { display: flex; flex-direction: column; gap: 1px; background: rgba(85, 240, 184, .13); border-top: 1px solid rgba(85, 240, 184, .13); border-bottom: 1px solid rgba(85, 240, 184, .13); }
.show-row { background: var(--bg); padding: clamp(26px, 3.4vw, 46px) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(24px, 3vw, 56px); align-items: center; }
.show-title { display: flex; align-items: baseline; gap: 14px; }
.show-title .num { font-family: var(--mono); font-size: 12px; color: var(--mint); letter-spacing: .1em; }
.show-title h3 { font-size: clamp(24px, 2.8vw, 38px); letter-spacing: -.03em; font-weight: 700; line-height: 1.05; }
.show-info { display: flex; flex-direction: column; gap: 18px; }
.show-info .tagline { max-width: 46ch; font-size: 15.5px; line-height: 1.55; color: var(--text-soft); text-wrap: pretty; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-row span { font-family: var(--mono); font-size: 10.5px; color: #8fb3ab; border: 1px solid rgba(85, 240, 184, .18); padding: 5px 9px; border-radius: 6px; }
.fact-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); max-width: 460px; }
.fact-strip div { display: flex; flex-direction: column; gap: 4px; }
.fact-strip b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.fact-strip span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.show-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.show-actions .btn { padding: 11px 18px; border-radius: 9px; font-size: 14px; }
.show-actions .ghost { background: transparent; cursor: pointer; }
.show-actions .host { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.show-pane { display: flex; flex-direction: column; gap: 12px; }
.view-toggle { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(85, 240, 184, .16); border-radius: 10px; align-self: flex-start; background: var(--panel); }
.view-toggle button { border: 0; cursor: pointer; padding: 7px 14px; border-radius: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: transparent; color: var(--text-soft); transition: color .15s; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--mint); color: var(--bg); font-weight: 700; }
.pane { border: 1px solid rgba(85, 240, 184, .16); border-radius: 14px; overflow: hidden; background: var(--panel); }
.pane-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-head); }
.pane-bar i { width: 8px; height: 8px; border-radius: 999px; background: rgba(85, 240, 184, .35); }
.pane-bar i + i { background: rgba(85, 240, 184, .2); }
.pane-bar span { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); margin-left: 8px; }
.pane-bar em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #f0b355; border: 1px solid rgba(240, 179, 85, .45); border-radius: 999px; padding: 2px 8px; margin-left: auto; }
.pane-ui img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--panel-deep); }
.pane-rows { aspect-ratio: 16 / 10; display: flex; flex-direction: column; overflow: hidden; }
.pane-rows > div { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 16px; border-bottom: 1px solid rgba(85, 240, 184, .1); font-family: var(--mono); font-size: 12px; min-height: 0; }
.pane-rows .lead { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-rows .trail { color: var(--text-faint); font-size: 10.5px; white-space: nowrap; }
.pane-rows .method { color: var(--mint); font-size: 10px; min-width: 46px; font-weight: 700; }

/* ── API surfaces ── */
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.search-wrap { position: relative; flex: 1 1 240px; min-width: 200px; }
.search-wrap input { width: 100%; padding: 12px 16px 12px 38px; border-radius: 10px; border: 1px solid rgba(85, 240, 184, .18); background: var(--bg); color: var(--text); font-size: 14px; outline: none; }
.search-wrap input:focus { border-color: var(--mint); }
.search-wrap .slash { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid rgba(85, 240, 184, .18); background: transparent; color: var(--text-soft); cursor: pointer; padding: 8px 13px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; transition: color .15s, border-color .15s; }
.chips button:hover { color: var(--text); border-color: rgba(85, 240, 184, .45); }
.chips button[aria-pressed="true"] { border-color: var(--mint); background: var(--mint); color: var(--bg); font-weight: 700; }
.surface-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.api-list { display: grid; gap: 1px; background: rgba(85, 240, 184, .13); border: 1px solid rgba(85, 240, 184, .15); border-radius: 14px; overflow: hidden; }
.api-row { cursor: pointer; border: 0; text-align: left; width: 100%; background: var(--panel); display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-left: 2px solid transparent; transition: background .14s; color: var(--text); }
.api-row:hover { background: #0b201c; }
.api-row[aria-pressed="true"] { background: var(--panel-active); border-left-color: var(--mint); }
.api-row .name { font-size: 14.5px; font-weight: 600; min-width: 140px; }
.api-row .tagline { font-size: 13px; color: var(--text-soft); line-height: 1.4; flex: 1; text-wrap: pretty; }
.api-row .count { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.api-row[aria-pressed="true"] .count { color: var(--mint); }
.api-empty { background: var(--panel); padding: 60px 20px; text-align: center; color: var(--text-dim); font-size: 14px; }
.inspector { position: sticky; top: 78px; border: 1px solid rgba(85, 240, 184, .16); border-radius: 14px; overflow: hidden; background: var(--bg); }
.inspector-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--panel-head); font-family: var(--mono); font-size: 11px; }
.inspector-bar .host { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.inspector-bar .status { color: var(--mint); white-space: nowrap; }
.inspector pre { margin: 0; padding: 16px; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: #cfe6df; overflow-x: auto; }
.inspector pre.curl { border-bottom: 1px solid var(--line-soft); }
.inspector pre.resp { color: #8fb3ab; line-height: 1.7; max-height: 300px; overflow-y: auto; }
.inspector .resources { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.inspector .resources span { font-family: var(--mono); font-size: 11px; color: #cfe6df; border: 1px solid rgba(85, 240, 184, .18); padding: 6px 10px; border-radius: 7px; }
.inspector .actions { display: flex; gap: 10px; padding: 0 16px 16px; }
.inspector .actions a { padding: 10px 16px; border-radius: 9px; font-weight: 600; font-size: 13.5px; }
.inspector .actions .open { background: var(--mint); color: var(--bg); }
.inspector .actions .open:hover { color: var(--bg); filter: brightness(1.08); }
.inspector .actions .ref { border: 1px solid var(--line-strong); color: var(--text); }
.inspector .actions .ref:hover { color: var(--text); border-color: var(--mint); }

/* ── proofs ── */
.proof-title { margin: 0 0 clamp(30px, 4vw, 52px); font-size: clamp(26px, 3.4vw, 46px); letter-spacing: -.035em; font-weight: 700; max-width: 24ch; text-wrap: balance; }
.proofs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.proof { background: var(--bg); padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 11px; }
.proof .num { font-family: var(--mono); font-size: 11px; color: var(--mint); letter-spacing: .12em; }
.proof h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.proof p { font-size: 14px; line-height: 1.55; color: var(--text-soft); text-wrap: pretty; }

/* ── closing ── */
.section.closing { padding: clamp(64px, 9vw, 130px) var(--pad-x); border-top: 1px solid var(--line-soft); background: radial-gradient(60% 100% at 50% 120%, rgba(11, 90, 80, .55), transparent 70%); }
.closing-inner { max-width: 920px; margin: 0 auto; text-align: center; }
.closing-inner h2 { font-size: clamp(32px, 6vw, 76px); line-height: .96; letter-spacing: -.04em; font-weight: 700; text-wrap: balance; }
.closing-inner p { margin: 24px auto 0; max-width: 50ch; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; color: var(--text-soft); }
.term { display: inline-flex; align-items: center; gap: 8px; margin-top: 38px; padding: 12px 16px; border: 1px solid rgba(85, 240, 184, .18); border-radius: 10px; font-family: var(--mono); font-size: 12.5px; color: #cfe6df; max-width: 100%; overflow-x: auto; }
.caret { animation: caretBlink 1.1s step-end infinite; color: var(--mint); }

/* ── footer ── */
.foot { padding: 28px var(--pad-x) 44px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-faint); }
.foot a { color: var(--text-faint); }
.foot a:hover { color: var(--text); }
.foot-links { display: flex; gap: 20px; }

/* ── detail sheet ── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(3, 10, 9, .76); backdrop-filter: blur(7px); display: flex; justify-content: center; align-items: flex-start; padding: clamp(12px, 4vh, 56px) clamp(12px, 4vw, 40px); overflow-y: auto; }
.sheet { width: 100%; max-width: 900px; background: var(--panel); border: 1px solid rgba(85, 240, 184, .22); border-radius: 18px; overflow: hidden; animation: sheetIn .26s ease both; }
.sheet-head { position: relative; padding: 26px clamp(20px, 4vw, 38px); border-bottom: 1px solid var(--line); background-color: var(--panel-deep); background-image: repeating-linear-gradient(118deg, rgba(85, 240, 184, .07) 0 2px, transparent 2px 12px); }
.sheet-close { position: absolute; top: 18px; right: 18px; border: 1px solid rgba(85, 240, 184, .22); background: rgba(6, 14, 12, .7); color: var(--text-soft); width: 32px; height: 32px; border-radius: 999px; cursor: pointer; font-family: var(--mono); font-size: 13px; }
.sheet-close:hover { color: #fff; border-color: var(--mint); }
.sheet-kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.sheet-head h2 { margin: 12px 0 10px; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.03em; font-weight: 700; }
.sheet-head p { max-width: 58ch; font-size: 15px; line-height: 1.55; color: var(--text-soft); text-wrap: pretty; }
.sheet-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sheet-ctas a { padding: 11px 18px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.sheet-ctas .open { background: var(--mint); color: var(--bg); }
.sheet-ctas .open:hover { color: var(--bg); filter: brightness(1.08); }
.sheet-ctas .ref { border: 1px solid var(--line-strong); color: var(--text); }
.sheet-ctas .ref:hover { color: var(--text); border-color: var(--mint); }
.sheet-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); }
.sheet-facts div { background: var(--panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.sheet-facts span { font-family: var(--mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-dim); }
.sheet-facts b { font-size: 16px; font-weight: 600; }
.sheet-body { padding: clamp(20px, 4vw, 34px); display: grid; gap: 28px; }
.sheet-body h3 { font-size: 12px; font-family: var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin: 0 0 11px; }
.sheet-body pre { margin: 0; overflow-x: auto; padding: 17px; border-radius: 11px; background: var(--bg); border: 1px solid rgba(85, 240, 184, .16); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: #cfe6df; }
.route-list { display: grid; gap: 1px; background: rgba(85, 240, 184, .13); border: 1px solid rgba(85, 240, 184, .16); border-radius: 11px; overflow: hidden; }
.route-list > div { background: var(--bg); display: flex; align-items: center; gap: 16px; padding: 11px 16px; font-family: var(--mono); font-size: 12.5px; }
.route-list .m { min-width: 58px; font-weight: 700; color: var(--mint); }
.route-list .p { color: #cfe6df; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-list .d { margin-left: auto; color: var(--text-faint); font-size: 11px; white-space: nowrap; }

@media (max-width: 760px) {
  .inspector { position: static; }
  .api-row .name { min-width: 0; }
  .api-row { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .topnav a:not(.cta) { display: none; }
  .brand-sub { display: none; }
}
@media (max-width: 560px) {
  /* Touch-width fallback: the feed frame folds away and the monitor becomes
     the familiar two-line readout (plus status). Taps keep opening the sheet. */
  .monitor-frame { display: none; }
  .matrix-monitor { grid-template-columns: 1fr; min-height: 78px; align-items: start; }
  .monitor-name { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee, .matrix button, .caret, .sheet { animation: none !important; }
  .matrix button { opacity: .6; }
  * { transition: none !important; }
}
