/* ZLatch — brushed steel, brass and a little sea-green. Instrument Serif · Manrope · JetBrains Mono. */
:root {
  --bg: #0b0c0e; --bg2: #101216; --ink: #ece6da; --muted: #a29d91; --faint: #6d6a63;
  --line: rgba(236, 230, 218, .09); --line2: rgba(236, 230, 218, .16);
  --panel: rgba(18, 20, 24, .82);
  --brass: #d6b46a; --brass-hi: #f0d699; --brass-lo: #8a6c34; --sea: #62e2c4; --danger: #e5775f;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r: 14px;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans);
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
a { color: var(--brass-hi); text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
h1, h2, .h1ish { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.1rem, 3.2vw, 3rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
.h1ish { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font: 600 1rem/1.3 var(--sans); margin: 0 0 .35em; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }

/* ---------------------------------------------------------------- top bar */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 3vw, 36px); background: rgba(11, 12, 14, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 1.5rem/1 var(--serif); }
.mark svg { width: 26px; height: 26px; color: var(--brass); }
.chips { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { color: var(--muted); text-decoration: none; font-size: .85rem; padding: 6px 11px; border-radius: 99px; white-space: nowrap; }
.chips a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.brandbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line); font-size: .85rem; background: var(--bg2);
}
.brandbar code { overflow-wrap: anywhere; color: var(--brass-hi); }
.ca-label { color: var(--muted); font-weight: 600; letter-spacing: .08em; font-size: .72rem; }

/* ---------------------------------------------------------------- buttons + fields */
.btn {
  appearance: none; border: 1px solid var(--line2); background: transparent; color: var(--ink);
  font: 600 .95rem/1 var(--sans); padding: 12px 18px; border-radius: 999px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, border-color .2s, transform .1s, opacity .2s;
}
.btn:hover { border-color: var(--brass); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 8px 14px; font-size: .85rem; }
.btn.tiny { padding: 4px 10px; font-size: .75rem; }
.btn.big { width: 100%; padding: 16px 22px; font-size: 1.05rem; }
.btn.primary { background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b8944d); color: #1b1407; border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 8px 24px rgba(214, 180, 106, .18); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { border-color: rgba(229, 119, 95, .5); color: #f4a493; }
.btn.danger:hover { background: rgba(229, 119, 95, .1); }
.btn.link { border: 0; padding-left: 4px; padding-right: 4px; color: var(--muted); text-decoration: underline; }
.btn.ghost:hover { background: rgba(255, 255, 255, .04); }
.filebtn { position: relative; }
.field { display: block; margin: 0 0 14px; }
.field-label { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
textarea, input[type=text], input[type=datetime-local], input[readonly] {
  width: 100%; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); color: var(--ink);
  border-radius: 12px; padding: 12px 14px; font: 400 1rem/1.5 var(--sans); resize: vertical;
}
textarea { min-height: 110px; font-family: var(--serif); font-size: 1.15rem; }
textarea:focus, input:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px rgba(214, 180, 106, .15); }
input[readonly] { font: .8rem/1.4 var(--mono); color: var(--brass-hi); }
.hint { color: var(--muted); font-size: .85rem; }
.fine { color: var(--faint); font-size: .8rem; line-height: 1.5; margin: 12px 0 0; }
.status { min-height: 1.4em; font-size: .9rem; color: var(--muted); margin: 10px 0 0; }
.status.err { color: #f4a493; }
.status.ok { color: var(--sea); }
.pill { font: 600 .62rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 99px; background: rgba(214, 180, 106, .16); color: var(--brass-hi); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: calc(100svh - 58px); padding: clamp(18px, 3vw, 40px) clamp(16px, 3vw, 40px) 70px;
  overflow: clip; isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: -20%; z-index: -1;
  background: radial-gradient(ellipse at 28% 42%, rgba(214, 180, 106, .10), transparent 55%), radial-gradient(ellipse at 80% 10%, rgba(98, 226, 196, .05), transparent 50%);
}
.hero::after { /* engraved guilloché lines */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
  background: repeating-radial-gradient(circle at 28% 45%, transparent 0 22px, rgba(236, 230, 218, .025) 22px 23px);
  mask-image: radial-gradient(circle at 28% 45%, #000 0, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: start; max-width: 1320px; margin: 0 auto; }
@media (min-width: 981px) { .dial-col { position: sticky; top: 84px; } .panel-col { padding-top: 8px; } }
.dial-col { display: flex; flex-direction: column; align-items: center; }
.dial { position: relative; width: min(100%, 640px); aspect-ratio: 1; }
.dial canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.readout { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.ro-label { font: 600 .66rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.ro-main { font: 500 clamp(1.25rem, 3.1vw, 2.2rem)/1.15 var(--mono); color: var(--brass-hi); margin: 8px 0 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ro-sub { font: .74rem/1.3 var(--mono); color: var(--muted); max-width: 18ch; margin: 0 auto; }
body.is-open .ro-main { color: var(--sea); }
.beacon { display: block; color: var(--muted); font: .78rem/1.4 var(--mono); margin: 10px 0 0; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.dot { display: inline-block; vertical-align: middle; margin-right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.beacon.live .dot { background: var(--sea); box-shadow: 0 0 10px var(--sea); animation: blink 3s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 2.6vw, 34px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .04) inset; backdrop-filter: blur(6px);
}
.eyebrow { font: 600 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }
.eyebrow.ok { color: var(--sea); }
.lead { color: #cfc8ba; font-size: 1.04rem; max-width: 52ch; }
.lead.small { font-size: .95rem; }
.cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--muted); text-decoration: none; font-size: .85rem; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(11, 12, 14, .6); }
.cue span { display: inline-block; animation: nudge 2.4s infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.drop {
  display: flex; align-items: center; gap: 12px; border: 1px dashed var(--line2); border-radius: 12px; padding: 12px 14px;
  color: var(--muted); font-size: .9rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--brass); background: rgba(214, 180, 106, .05); }
.drop strong { color: var(--ink); font-weight: 600; }
.drop-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(214, 180, 106, .12); color: var(--brass-hi); }
.files { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; font-size: .85rem; background: rgba(255, 255, 255, .03); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.files .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.files .fs { color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.files button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
.when { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.tabs { display: flex; gap: 4px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: 1; background: none; border: 0; color: var(--muted); font: 600 .82rem/1 var(--sans); padding: 9px 10px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.tab.on { background: rgba(214, 180, 106, .16); color: var(--brass-hi); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--ink); border-radius: 99px; padding: 8px 13px; font: 500 .85rem/1 var(--sans); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.presets button.on { border-color: var(--brass); background: rgba(214, 180, 106, .12); color: var(--brass-hi); }
.presets button.locked { opacity: .55; }
.slotrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.slotrow input { flex: 1 1 180px; font-family: var(--mono); }
.when-out { margin: 10px 0 0; font: .88rem/1.4 var(--mono); color: var(--brass-hi); min-height: 1.4em; }
.links-box { margin-top: 16px; }
.links-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.recips { list-style: none; padding: 0; margin: 6px 0 8px; display: grid; gap: 6px; }
.recips li { display: flex; align-items: center; gap: 8px; }
.recips .rn { font: .75rem var(--mono); color: var(--muted); width: 22px; flex: none; }
.recips input { padding: 8px 12px; font-size: .9rem; }
.recips button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.05rem; }
.limits { margin: 16px 0 12px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.limits.vault { color: var(--brass-hi); }

.out-links { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.out-links li { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.out-links .lbl { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; }
.manage-out { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }

.steps { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; font-size: .9rem; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.steps li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--faint); flex: none; }
.steps li.doing { color: var(--ink); }
.steps li.doing::before { border-color: var(--brass); animation: blink 1s infinite; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--sea); border-color: var(--sea); }
.steps li.fail { color: #f4a493; }
.steps li.fail::before { background: var(--danger); border-color: var(--danger); }
.result { margin-top: 16px; }
.letter {
  font: 400 1.2rem/1.55 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; color: #f3ecdf;
  background: linear-gradient(180deg, rgba(240, 214, 153, .07), rgba(240, 214, 153, .02)); border: 1px solid rgba(214, 180, 106, .25);
  border-radius: 14px; padding: 18px 20px; max-height: 50vh; overflow: auto;
}
.dl { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.dl li { display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; flex-wrap: wrap; }
.dl .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl img { width: 100%; border-radius: 8px; max-height: 280px; object-fit: contain; background: #000; }
.mlinks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.mlinks li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.mlinks .ml { flex: 1; min-width: 0; }
.mlinks .ms { font: .75rem var(--mono); color: var(--muted); }
.mlinks .revoked { color: #f4a493; }
.reports { list-style: none; padding: 0; display: grid; gap: 8px; }
.reports li { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .85rem; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- content */
.sec { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.sec.alt { background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.wrap { max-width: 1120px; margin: 0 auto; }
.wrap.narrow { max-width: 760px; }
.wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.wrap.two + .wrap { margin-top: 40px; }
.kicker { font: 600 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin-bottom: 16px; }
.sec p { max-width: 68ch; color: #d4cdbf; }
.intro { font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 26px; color: #d4cdbf; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--brass); box-shadow: 0 0 0 3px rgba(214, 180, 106, .12); }
.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.lg { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .02); }
.lg p { font-size: .92rem; margin: 0; color: var(--muted); }
.sw { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.sw-bezel { background: conic-gradient(#3c3f45, #9aa0a8, #30333a, #a3a8af, #3c3f45); box-shadow: inset 0 0 0 9px #16181b; }
.sw-hex { background: #121417; border: 1px solid var(--line2); font: 600 .8rem var(--mono); color: #d8d1c2; }
.sw-bolt { background: radial-gradient(circle, #16181b 40%, transparent 41%), conic-gradient(from 0deg, var(--brass-hi) 0 12deg, transparent 12deg 45deg, var(--brass-hi) 45deg 57deg, transparent 57deg 90deg, #8b9096 90deg 102deg, transparent 102deg 135deg, var(--brass-hi) 135deg 147deg, transparent 147deg 180deg, #8b9096 180deg 192deg, transparent 192deg 225deg, var(--brass-hi) 225deg 237deg, transparent 237deg 270deg, #8b9096 270deg 282deg, transparent 282deg 315deg, var(--brass-hi) 315deg 327deg, transparent 327deg); }
.sw-arc { background: conic-gradient(var(--brass-hi) 0 240deg, rgba(255, 255, 255, .08) 240deg); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.sw-pulse { border: 2px solid var(--brass-hi); box-shadow: 0 0 0 6px rgba(240, 214, 153, .15), 0 0 0 12px rgba(240, 214, 153, .06); width: 30px; height: 30px; margin: 7px; }
.sw-sea { background: linear-gradient(135deg, var(--brass) 0 50%, var(--sea) 50%); }
.pipe { list-style: none; padding: 0; margin: 34px 0 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.pipe li { position: relative; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .02); }
.pipe li p { font-size: .88rem; color: var(--muted); margin: 0; }
.pipe .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(214, 180, 106, .14); color: var(--brass-hi); font: 600 .8rem var(--mono); margin-bottom: 10px; }
.flow { width: 100%; height: auto; margin: 10px 0 24px; max-width: 900px; display: block; }
.flow .fb { fill: rgba(255, 255, 255, .02); stroke: rgba(236, 230, 218, .18); }
.flow .ft { fill: var(--ink); font: 600 17px var(--sans); text-anchor: middle; }
.flow .fs { fill: var(--muted); font: 13px var(--mono); text-anchor: middle; }
.flow .fp { stroke: url(#fl); stroke-width: 2; stroke-dasharray: 5 6; fill: none; }
.flow .fdot { fill: var(--brass-hi); }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.notes p { font-size: .92rem; color: var(--muted); }
.notes strong { color: var(--ink); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 28px; }
.col { padding: 22px 24px; border-radius: var(--r); border: 1px solid var(--line); }
.col.see { background: rgba(214, 180, 106, .04); }
.col.cant { background: rgba(98, 226, 196, .04); }
.col h3 { font: 400 1.5rem/1.1 var(--serif); margin-bottom: 14px; }
.col ul, .caveats ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: #d4cdbf; font-size: .95rem; }
.caveats { margin-top: 28px; padding: 22px 24px; border-left: 2px solid var(--brass); background: rgba(255, 255, 255, .02); border-radius: 0 var(--r) var(--r) 0; }
.caveats h3 { font: 400 1.4rem/1.1 var(--serif); margin-bottom: 12px; }
.built { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 30px; }
.built > div { background: var(--bg); padding: 22px; }
.built p { font-size: .9rem; color: var(--muted); margin: 0; }
.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 30px; }
.plan { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.plan.vault { border-color: rgba(214, 180, 106, .45); background: linear-gradient(160deg, rgba(214, 180, 106, .1), rgba(214, 180, 106, .02)); }
.plan h3 { font: 400 1.7rem/1.1 var(--serif); margin-bottom: 16px; }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 9px; color: #d4cdbf; }
.price { margin: 18px 0 0; font-size: .9rem; color: var(--brass-hi); }
.must { border-left: 2px solid var(--brass); padding: 4px 0 4px 14px; color: var(--ink) !important; font-weight: 600; }
.soon { color: var(--brass-hi) !important; font-size: .92rem; }
.burnbox { padding: 26px; border-radius: 20px; border: 1px solid rgba(214, 180, 106, .35); background: radial-gradient(circle at 100% 0, rgba(214, 180, 106, .12), transparent 60%), var(--bg2); }
.burnbox h3 { font: 400 1.7rem/1.1 var(--serif); }
.burn-amount { font-size: 1.05rem; margin: 10px 0; }
.ledger { margin-top: 40px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, .015); }
.ledger h3 { font: 400 1.6rem/1.1 var(--serif); }
.ledger-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.ledger-stats > div { background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 12px 14px; }
.lbl { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.val { display: block; font: 500 1.15rem/1.3 var(--mono); color: var(--brass-hi); overflow-wrap: anywhere; }
.ledger-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font: .82rem var(--mono); }
.ledger-list li { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .02); }
.ledger-list .empty { color: var(--muted); font-family: var(--sans); }
.terms { margin-top: 18px; font-size: .88rem; }
.h3gap { margin-top: 2.4em; }
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font: 400 1.3rem/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--brass); font-family: var(--sans); }
details[open] summary::after { content: '−'; }
details p { margin: 10px 0 0; color: var(--muted); }
.foot { padding: 40px clamp(16px, 4vw, 48px) 48px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; }
.foot-name { font: 400 1.6rem/1 var(--serif); color: var(--ink); margin-bottom: 6px; }
.foot-meta p { margin: 0 0 6px; overflow-wrap: anywhere; }
.foot code { color: var(--brass-hi); }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 7, .7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(420px, 100%); background: var(--bg2); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; }
.modal-card h3 { font: 400 1.6rem/1.1 var(--serif); margin-bottom: 14px; }
.wlist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.wlist button { width: 100%; display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px; font: 600 .95rem var(--sans); cursor: pointer; }
.wlist button:hover { border-color: var(--brass); }
.wlist img { width: 26px; height: 26px; border-radius: 6px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .dial { width: min(100%, 480px); }
  .legend, .built { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .ledger-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .top { gap: 8px 10px; flex-wrap: wrap; padding-bottom: 6px; }
  .chips { order: 3; width: 100%; margin: 0 -6px; }
  .chips a { padding: 5px 9px; font-size: .8rem; }
  .mark { margin-right: auto; }
  .hero { padding-bottom: 80px; }
  .wrap.two, .cols, .plans, .legend, .built, .pipe, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { border-radius: 18px; }
  .ro-sub { font-size: .66rem; }
  .flow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cue span, .beacon.live .dot, .steps li.doing::before { animation: none; }
  .flow .fdot { display: none; }
}
