/* Proof-to-Capital — RWA ProofGate
   Credit-desk aesthetic: deep green-black canvas, hairline rules,
   serif display for term-sheet headings, monospace figures. */

:root {
  --ink: #f2f7f1;
  --muted: #93a396;
  --muted-strong: #c3cfc4;
  --canvas: #060d09;
  --canvas-soft: #0a130d;
  --panel: #0d1912;
  --panel-raised: #122217;
  --line: rgba(196, 224, 200, 0.13);
  --line-strong: rgba(196, 224, 200, 0.27);
  --green: #00c805;
  --green-bright: #72ff78;
  --green-pale: #d7ffda;
  --green-dim: rgba(0, 200, 5, 0.12);
  --amber: #f2c94c;
  --amber-dim: rgba(242, 201, 76, 0.12);
  --danger: #ff6b72;
  --danger-dim: rgba(255, 107, 114, 0.12);
  --paper: #efe9da;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 40% at 85% -5%, rgba(0, 200, 5, 0.07), transparent),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
code { font-family: var(--mono); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed; z-index: 1000; top: 12px; left: 12px;
  padding: 10px 14px;
  color: #061009;
  background: var(--green-bright);
  border-radius: var(--radius-sm);
  transform: translateY(-180%);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Top bar ─────────────────────────────────────────────── */
.top-bar {
  position: relative; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  align-items: center; justify-content: space-between;
  width: min(1360px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; letter-spacing: -0.02em; }
.wordmark svg { width: 32px; color: var(--green-bright); }
.wordmark span { font-size: 16px; font-weight: 520; white-space: nowrap; }
.wordmark b { font-weight: 800; }
.product-nav { display: flex; gap: 4px; }
.product-nav a {
  padding: 8px 12px;
  color: var(--muted-strong);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.product-nav a:hover { color: var(--ink); }
.product-nav a.is-active { color: var(--green-pale); background: var(--green-dim); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.network-chip {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 12px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.network-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.network-chip[data-tone="ok"] i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.network-chip[data-tone="bad"] i { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.connect-button {
  min-height: 38px; padding: 0 16px;
  color: #061009;
  background: var(--green-bright);
  border: 0; border-radius: 999px;
  font-size: 12.5px; font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}
.connect-button:hover { background: #99ff9e; }
.connect-button.is-connected {
  color: var(--green-pale);
  background: var(--green-dim);
  border: 1px solid rgba(114, 255, 120, 0.34);
  font-family: var(--mono);
  font-weight: 600;
}

/* ── Shared section furniture ────────────────────────────── */
.gate-main { width: min(1360px, calc(100% - 48px)); margin: 0 auto; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--green-bright);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.section-head {
  display: flex; flex-wrap: wrap; gap: 16px 40px;
  align-items: end; justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.section-note { max-width: 400px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.primary-button {
  display: inline-flex; gap: 20px; align-items: center; justify-content: space-between;
  min-height: 50px; padding: 0 20px;
  color: #061009;
  background: var(--green-bright);
  border: 0; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.primary-button:hover { background: #99ff9e; transform: translateY(-2px); }
.primary-button:disabled { color: #6f7d70; background: #203126; cursor: not-allowed; transform: none; }
.ghost-button {
  min-height: 40px; padding: 0 14px;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
.ghost-button:hover { color: var(--ink); border-color: rgba(114, 255, 120, 0.5); }
.text-button {
  padding: 0;
  color: var(--muted-strong);
  background: transparent; border: 0;
  font-size: 13px; font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  cursor: pointer;
}
.text-button:hover { color: var(--ink); }

.mono { font-family: var(--mono); }
.addr-link { color: var(--green-pale); font-family: var(--mono); font-size: 12px; text-decoration-color: var(--line-strong); text-underline-offset: 3px; overflow-wrap: anywhere; }
.addr-link:hover { text-decoration-color: var(--green-bright); }
.pending-dash { color: var(--muted); }

/* ── Masthead ────────────────────────────────────────────── */
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  gap: 6%;
  align-items: start;
  padding: 64px 0 72px;
}
.masthead-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(46px, 6.4vw, 96px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.masthead-copy h1 span { color: var(--green-bright); font-style: italic; }
.masthead-summary {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted-strong);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.68;
}
.masthead-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 32px; }
.rail-strip {
  display: flex;
  margin-top: 46px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rail-strip span {
  flex: 1;
  padding: 14px 14px 14px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.rail-strip span + span { padding-left: 14px; border-left: 1px solid var(--line); }
.rail-strip i { margin-right: 8px; color: var(--green-bright); font-style: normal; font-family: var(--mono); }

/* ── Network desk ────────────────────────────────────────── */
.network-desk {
  padding: 24px;
  background: linear-gradient(160deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.desk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.desk-head h2 { margin: 0; font-size: 15px; font-weight: 750; letter-spacing: 0.01em; }
.desk-note { margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.desk-sub {
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.desk-grid { display: grid; gap: 0; margin: 0; }
.desk-grid > div {
  display: flex; gap: 16px; align-items: baseline; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.desk-grid > div:last-child { border-bottom: 0; }
.desk-grid dt { color: var(--muted); font-size: 12px; flex: none; }
.desk-grid dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}
.desk-grid dd .ok { color: var(--green-bright); }
.desk-grid dd .bad { color: var(--danger); }
.desk-grid dd .warn { color: var(--amber); }
.desk-foot { margin: 14px 0 0; color: var(--muted); font-size: 11px; }

/* ── Console ─────────────────────────────────────────────── */
.console { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.lookup-form {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: end;
  max-width: 560px;
}
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.field input, .field textarea, .field select {
  min-height: 46px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--canvas-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.field textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: rgba(114, 255, 120, 0.55); outline: none; }
.field input::placeholder, .field textarea::placeholder { color: #5c6a5f; }
.lookup-form .field { flex: 1 1 200px; }
.lookup-form input { font-family: var(--mono); }
.inline-status { min-height: 20px; margin: 10px 0 0; color: var(--muted-strong); font-size: 13px; }
.inline-status.is-error { color: var(--danger); }
.inline-status.is-ok { color: var(--green-bright); }

.facility-view { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

.state-banner {
  display: flex; flex-wrap: wrap; gap: 20px 48px;
  align-items: center; justify-content: space-between;
  padding: 22px 26px;
  background: linear-gradient(160deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}
.state-id { display: flex; gap: 14px; align-items: center; }
.state-kicker { color: var(--muted); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.state-id strong { font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.state-badge {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.state-badge[data-state="Created"] { color: var(--amber); background: var(--amber-dim); border-color: rgba(242, 201, 76, 0.3); }
.state-badge[data-state="Funded"] { color: var(--green-pale); background: var(--green-dim); border-color: rgba(114, 255, 120, 0.3); }
.state-badge[data-state="Drawn"] { color: #b7e3ff; background: rgba(96, 187, 255, 0.12); border-color: rgba(96, 187, 255, 0.3); }
.state-badge[data-state="Closed"] { color: var(--muted-strong); }
.state-badge[data-state="Cancelled"] { color: var(--danger); background: var(--danger-dim); border-color: rgba(255, 107, 114, 0.3); }
.state-verdict { display: flex; gap: 14px; align-items: start; max-width: 560px; }
.verdict-mark { margin-top: 3px; font-size: 14px; color: var(--amber); }
.state-verdict[data-tone="ok"] .verdict-mark { color: var(--green-bright); }
.state-verdict[data-tone="bad"] .verdict-mark { color: var(--danger); }
.state-verdict strong { display: block; font-size: 15px; }
.state-verdict p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.console-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.console-primary, .console-secondary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }

.panel {
  min-width: 0;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel h3 { margin: 0 0 6px; font-size: 15px; font-weight: 750; }
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-note { margin: 4px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.panel-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
}
.panel-tag.is-ready { color: #0a1c0c; background: var(--green-bright); }
.panel-tag.is-blocked { color: var(--amber); background: var(--amber-dim); }

/* Capital ledger */
.ledger { display: grid; margin: 14px 0 0; }
.ledger > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.ledger dt { color: var(--muted); font-size: 13px; }
.ledger dd { margin: 0; min-width: 0; font-family: var(--mono); font-size: 16px; letter-spacing: 0.01em; text-align: right; overflow-wrap: anywhere; }
.ledger dd small { color: var(--muted); font-size: 11px; margin-left: 6px; }
.ledger-outstanding dt { color: var(--muted-strong); font-weight: 700; }
.ledger-outstanding dd { color: var(--green-pale); font-size: 19px; }
.ledger-meter { margin-top: 18px; }
.meter-track { height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width 0.5s ease; }
.meter-caption { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }

/* Checklist */
.checklist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 0; }
.check-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 12px; font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.checklist li.is-pass .check-icon { color: #0a1c0c; background: var(--green-bright); border-color: transparent; }
.checklist li.is-fail .check-icon { color: var(--danger); background: var(--danger-dim); border-color: rgba(255, 107, 114, 0.3); }
.checklist li.is-warn .check-icon { color: var(--amber); background: var(--amber-dim); border-color: rgba(242, 201, 76, 0.3); }
.check-body b { display: block; font-size: 13.5px; }
.check-body p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

/* Claims table */
.claims-table-wrap { overflow-x: auto; min-width: 0; }
.claims-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.claims-table th {
  padding: 8px 14px 8px 0;
  color: var(--muted);
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line-strong);
}
.claims-table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.claims-table tr:last-child td { border-bottom: 0; }
.claim-name b { display: block; font-size: 13px; }
.claim-name code { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; overflow-wrap: anywhere; }
.claims-table td code { font-size: 11px; overflow-wrap: anywhere; }
.claim-status {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.claim-status.is-live { color: #0a1c0c; background: var(--green-bright); }
.claim-status.is-missing { color: var(--amber); background: var(--amber-dim); }
.claim-status.is-bad { color: var(--danger); background: var(--danger-dim); }

/* Parties */
.party-list { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.party-list li {
  display: grid; gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.party-list li:last-child { border-bottom: 0; }
.party-role { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.you-chip {
  padding: 2px 8px;
  color: #0a1c0c;
  background: var(--green-bright);
  border-radius: 999px;
  font-size: 9.5px; font-weight: 850;
  letter-spacing: 0.06em;
}

/* Key-value panels */
.kv { display: grid; margin: 12px 0 0; }
.kv > div { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.kv dd .ok { color: var(--green-bright); }
.kv dd .bad { color: var(--danger); }

/* Actions */
.action-stack { display: grid; gap: 12px; }
.action-card {
  display: grid; gap: 10px;
  padding: 16px;
  background: var(--canvas-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.action-card h4 { margin: 0; font-size: 13.5px; }
.action-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.action-card .field input, .action-card .field select { min-height: 42px; font-size: 13px; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.action-button {
  min-height: 42px; padding: 0 16px;
  color: #061009;
  background: var(--green-bright);
  border: 0; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 800;
  cursor: pointer;
}
.action-button:hover { background: #99ff9e; }
.action-button:disabled { color: #6f7d70; background: #203126; cursor: not-allowed; }
.action-button.is-danger { color: var(--danger); background: var(--danger-dim); border: 1px solid rgba(255, 107, 114, 0.3); }
.action-button.is-quiet { color: var(--green-pale); background: var(--green-dim); border: 1px solid rgba(0, 200, 5, 0.25); }

.tx-log { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tx-log li {
  display: grid; gap: 2px;
  padding: 10px 12px;
  background: var(--canvas-soft);
  border-left: 2px solid var(--line-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
}
.tx-log li.is-pending { border-left-color: var(--amber); }
.tx-log li.is-ok { border-left-color: var(--green); }
.tx-log li.is-fail { border-left-color: var(--danger); }
.tx-log b { font-size: 12.5px; }
.tx-log a { color: var(--green-pale); font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.tx-log .tx-err { color: var(--danger); overflow-wrap: anywhere; }

/* ── Planner ─────────────────────────────────────────────── */
.planner { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.planner-badge {
  max-width: 460px;
  margin: 0;
  padding: 12px 16px;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(242, 201, 76, 0.3);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.55;
}
.planner-badge b { color: var(--amber); }
.planner-badge code { font-size: 11.5px; }
.planner-form { display: grid; gap: 18px; }
.planner-block {
  margin: 0;
  padding: 22px 24px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.planner-block legend {
  padding: 4px 12px;
  color: var(--green-pale);
  background: var(--green-dim);
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.planner-hint { margin: 10px 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.55; max-width: 720px; }
.planner-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.planner-row .field { flex: 1 1 240px; }
.planner-row .field-wide { flex: 2 1 320px; }
.planner-check { flex: none; margin-bottom: 3px; min-height: 46px; }
.planner-form input, .planner-form textarea { font-family: var(--mono); font-size: 13px; }
.planner-form textarea { font-family: var(--sans); }
.planner-computed { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.planner-computed code { margin-left: 8px; color: var(--green-pale); font-size: 11.5px; overflow-wrap: anywhere; }

.requirement-rows { display: grid; gap: 12px; margin-bottom: 14px; }
.requirement-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: var(--canvas-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.requirement-row .remove-req { min-height: 46px; color: var(--muted); }
.requirement-row .remove-req:hover { color: var(--danger); border-color: rgba(255, 107, 114, 0.4); }
.req-hash { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.req-hash code { color: var(--green-pale); }

.planner-output {
  padding: 22px 24px;
  background: linear-gradient(160deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}
.planner-output h3 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; font-size: 15px; }
.local-tag {
  padding: 4px 10px;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(242, 201, 76, 0.3);
  border-radius: 999px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.call-preview {
  margin: 0 0 16px;
  padding: 16px;
  overflow-x: auto;
  color: var(--muted-strong);
  background: #050b07;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.planner-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Boundaries ──────────────────────────────────────────── */
.boundaries { padding: 56px 0 72px; border-top: 1px solid var(--line); }
.boundaries h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.boundaries ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px 40px;
  margin: 0; padding: 0;
  list-style: none;
}
.boundaries li {
  padding: 14px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}
.boundaries b { color: var(--muted-strong); }

/* ── Footer ──────────────────────────────────────────────── */
.gate-footer {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer-contracts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 12px; }
.footer-contracts code { font-size: 11px; color: var(--muted-strong); overflow-wrap: anywhere; }
.footer-contracts a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.footer-contracts a:hover code { color: var(--green-pale); }
.gate-footer p { margin: 0; }

/* ── Explainer dialog ────────────────────────────────────── */
.explainer {
  width: min(680px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}
.explainer::backdrop { background: rgba(3, 8, 5, 0.78); backdrop-filter: blur(4px); }
.explainer-inner { display: grid; gap: 0; padding: clamp(22px, 4vw, 36px); }
.explainer-inner h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.explainer-lede { margin: 0 0 18px; color: var(--muted-strong); font-size: 15px; line-height: 1.6; }
.explainer-steps { display: grid; gap: 12px; margin: 0 0 20px; padding-left: 22px; }
.explainer-steps li { color: var(--muted); font-size: 13px; line-height: 1.6; padding-left: 4px; }
.explainer-steps li::marker { color: var(--green-bright); font-family: var(--mono); font-size: 12px; }
.explainer-steps b { color: var(--ink); }
.explainer-bounds {
  margin: 0 0 22px;
  padding: 12px 14px;
  color: var(--muted);
  background: var(--canvas-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.6;
}
.explainer .primary-button { justify-self: start; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; z-index: 900;
  bottom: 24px; left: 50%;
  max-width: min(480px, calc(100vw - 40px));
  padding: 0;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast span {
  display: block;
  padding: 12px 18px;
  color: var(--ink);
  background: var(--panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .masthead { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; }
  .network-desk { max-width: 640px; }
  .console-columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .top-bar { width: calc(100% - 32px); padding: 12px 0; }
  .product-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .gate-main, .gate-footer { width: calc(100% - 32px); }
  .masthead { padding: 36px 0 48px; }
  .rail-strip { flex-wrap: wrap; }
  .rail-strip span { flex: 1 1 45%; padding: 12px 8px 12px 0; }
  .rail-strip span + span { border-left: 0; padding-left: 0; }
  .rail-strip span:nth-child(even) { border-left: 1px solid var(--line); padding-left: 12px; }
  .state-banner { padding: 18px; }
  .state-id strong { font-size: 27px; }
  .panel { padding: 18px 16px; }
  .planner-block { padding: 18px 16px 20px; }
  .requirement-row { grid-template-columns: 1fr; align-items: stretch; }
  .requirement-row .remove-req { justify-self: start; min-height: 40px; }
  .planner-check { width: 100%; }
  .primary-button { width: 100%; justify-content: space-between; }
  .masthead-actions .primary-button { width: auto; }
  .lookup-form .primary-button { width: auto; flex: none; }
  .desk-grid > div { flex-direction: column; align-items: flex-start; gap: 3px; }
  .desk-grid dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
