/* ==========================================================================
   Cumarsaide (CTS) — cumarsaide.com — Design Option 2 "Signal & Guard"
   Static site stylesheet. Zero external requests: system fonts only, all
   icons inline SVG. Dark, technical, cryptographic; trust shown as proof.
   Design tokens per JAL-69 `design-option-2` (user-chosen) — implement.
   ========================================================================== */

/* ---------- 1. Design tokens (dark, signal-driven) ---------- */
:root {
  /* surfaces */
  --ink-bg: #0b1220;
  --ink-bg-2: #111b30;
  --surface: #16233c;
  --surface-2: #1c2b49;
  --line: #24354f;
  --line-signal: #3d4f6e;

  /* text */
  --text: #f2f5f9;
  --text-2: #c2ccdb;
  --text-mute: #8a97ac;

  /* signal */
  --signal-teal: #2fd6c3;
  --signal-lime: #c9f27b;
  --cred-violet: #a78bfa;
  --wallet-amber: #f5b44c;
  --danger: #ff7a8a;

  /* semantic */
  --ok: #c9f27b;
  --warn: #f5b44c;
  --err: #ff7a8a;
  --info: #7fb7e8;

  /* spacing (4pt) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 48px; --sp-10: 64px; --sp-11: 96px;

  /* radius */
  --rad-sm: 6px; --rad-md: 12px; --rad-lg: 20px; --rad-pill: 999px;

  /* elevation (soft fills, no hard shadows on dark) */
  --elev-1: 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.35);
  --elev-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --focus-ring: 0 0 0 3px rgba(47, 214, 195, 0.35);

  /* type */
  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-hero: clamp(2.25rem, 5vw, 4.25rem);
  --text-display: clamp(1.75rem, 3.4vw, 2.9rem);
  --text-h2: clamp(1.375rem, 2.4vw, 1.875rem);
  --text-h3: 1.125rem;
  --label-size: 0.75rem;

  --wrap-max: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* ---------- 2. Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background: var(--ink-bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: var(--signal-teal); text-decoration: none; }
a:hover { color: var(--signal-lime); }

/* Focus-visible: lime glow ring (AA on dark) */
:focus-visible {
  outline: 2px solid var(--signal-teal);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: rgba(47, 214, 195, 0.28); color: var(--text); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-display); }
h3 { font-size: var(--text-h3); font-weight: 600; }
p { max-width: 68ch; }

.mono, .mono-inline, code, kbd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.mono { font-size: 0.8125rem; letter-spacing: 0.01em; }

/* Screen-reader-only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: var(--sp-4);
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--line-signal);
  color: var(--text);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--rad-sm);
  transition: top 120ms ease;
}
.skip-link:focus-visible { top: var(--sp-3); }

/* ---------- 3. Layout ---------- */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: var(--sp-10) 0; }
.sec-tight { padding: var(--sp-8) 0; }
.panel { border-bottom: 1px solid var(--line); }
.panel--bg2 { background: var(--ink-bg-2); }

.grid { display: grid; gap: var(--sp-5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.stack > * + * { margin-top: var(--sp-4); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-teal);
  margin-bottom: var(--sp-3);
}

.sub { color: var(--text-2); font-size: 1.0625rem; max-width: 64ch; }
.lead { color: var(--text-2); font-size: 1.125rem; }

.text-center { text-align: center; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; }

/* ---------- 4. Header / nav ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: var(--sp-5); min-height: 64px; }
.brand {
  font-weight: 700; letter-spacing: 0.01em; font-size: 1.125rem;
  color: var(--text); display: inline-flex; align-items: center; gap: var(--sp-2);
}
.brand svg { width: 24px; height: 24px; }
.brand em { color: var(--signal-teal); font-style: normal; }
.nav { display: flex; gap: var(--sp-5); margin-left: auto; align-items: center; }
.nav a {
  color: var(--text-2); font-size: 0.875rem; font-weight: 550;
  border-bottom: 2px solid transparent; padding: var(--sp-2) 2px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--signal-teal); border-bottom-color: var(--signal-teal); }

.nav-cta { display: flex; align-items: center; gap: var(--sp-3); }

/* Mobile menu button (hamburger, no forms) */
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--surface); border: 1px solid var(--line-signal);
  border-radius: var(--rad-md); color: var(--text); cursor: pointer;
}
.menu-btn:hover { background: var(--surface-2); }

/* Mobile sheet */
.menu-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: none;
}
.menu-sheet[data-open="true"] { display: flex; align-items: flex-end; }
.menu-sheet__backdrop {
  position: absolute; inset: 0; background: rgba(6, 10, 18, 0.72);
}
.menu-sheet__panel {
  position: relative; width: 100%;
  background: var(--surface); border-top: 1px solid var(--line-signal);
  border-radius: var(--rad-lg) var(--rad-lg) 0 0;
  padding: var(--sp-6) var(--gutter) calc(var(--sp-8) + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--elev-2);
}
.menu-sheet__panel nav { display: grid; gap: 4px; margin: 0 0 var(--sp-6); }
.menu-sheet__panel nav a {
  display: block; padding: var(--sp-3) 0; font-size: 1.0625rem;
  color: var(--text); border-bottom: 1px solid var(--line);
}
.menu-sheet__panel nav a[aria-current="page"] { color: var(--signal-teal); }
.menu-sheet__close {
  position: absolute; top: var(--sp-3); inset-inline-end: var(--sp-3);
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  border-radius: var(--rad-md); cursor: pointer; font-size: 1.25rem;
}
.menu-sheet__close:hover { background: var(--surface-2); color: var(--text); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.875rem; font-weight: 650;
  letter-spacing: 0.02em;
  border-radius: var(--rad-md);
  padding: 0 var(--sp-5); height: 46px;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn--wallet { background: var(--wallet-amber); color: #14100a; font-weight: 750; }
.btn--wallet:hover { background: #ffc568; color: #14100a; }

.btn--ghost { background: transparent; color: var(--signal-teal); border-color: var(--line-signal); }
.btn--ghost:hover { border-color: var(--signal-teal); color: var(--signal-lime); background: rgba(47, 214, 195, 0.06); }

.btn--violet { background: var(--cred-violet); color: #14101f; font-weight: 700; }
.btn--violet:hover { background: #b79dff; color: #14101f; }

.btn--lg { height: 56px; padding: 0 var(--sp-6); font-size: 0.9375rem; }
.btn--sm { height: 36px; padding: 0 var(--sp-3); font-size: 0.8125rem; }

/* ---------- 6. Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8); align-items: center; }
.hero h1 { margin: var(--sp-3) 0 var(--sp-4); letter-spacing: -0.02em; }
.cta-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.hero-mono {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: var(--sp-4);
}
.hero-mono b { color: var(--signal-lime); font-weight: 600; }

/* ---------- 7. Relay circuit (hop stepper) ---------- */
.circuit {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad-lg);
  padding: var(--sp-5); box-shadow: var(--elev-1);
}
.circuit__title {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--sp-5);
}
.circuit__hops { display: flex; align-items: center; gap: var(--sp-2); justify-content: space-between; flex-wrap: nowrap; }
.hop { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); flex: 0 1 92px; text-align: center; }
.hop__dot {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-signal);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
}
.hop__dot svg { width: 20px; height: 20px; }
.hop--done .hop__dot { background: rgba(201, 242, 123, 0.12); border-color: var(--signal-lime); color: var(--signal-lime); }
.hop--now .hop__dot { border-color: var(--signal-teal); color: var(--signal-teal); box-shadow: 0 0 0 4px rgba(47, 214, 195, 0.16); animation: hopPulse 2s ease-in-out infinite; }
.hop--violet .hop__dot { border-color: var(--cred-violet); color: var(--cred-violet); }
.hop__lab { font-size: 0.75rem; color: var(--text-2); }
.hop__tag { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--signal-lime); text-transform: uppercase; letter-spacing: 0.04em; }
.hop--violet .hop__tag { color: var(--cred-violet); }
.circuit__line { flex: 1; min-width: 6px; height: 2px; background: var(--line-signal); }
.circuit__note { font-size: 0.8125rem; color: var(--text-mute); margin-top: var(--sp-5); }
.circuit__note b { color: var(--signal-lime); font-weight: 600; }

@keyframes hopPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(47, 214, 195, 0.10); }
  50% { box-shadow: 0 0 0 8px rgba(47, 214, 195, 0.22); }
}

/* Vertical circuit (mobile) */
.circuit--vertical .circuit__hops { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
.circuit--vertical .circuit__line { width: 2px; height: 14px; margin: 0 auto; flex: none; }
.circuit--vertical .hop { flex-direction: row; gap: var(--sp-3); justify-content: flex-start; text-align: left; }
.circuit--vertical .hop__lab { font-size: 0.875rem; }

/* ---------- 8. Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad-lg);
  padding: var(--sp-6); box-shadow: var(--elev-1);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.card--elev { background: var(--surface-2); border-color: var(--line-signal); }
.card h3 { margin-bottom: var(--sp-1); }
.card p { color: var(--text-2); font-size: 0.9375rem; }
.card .mono-tag { display: block; margin-top: auto; padding-top: var(--sp-3); font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mute); }
.card .mono-tag b { color: var(--signal-teal); font-weight: 600; }
.card__cta { margin-top: var(--sp-3); color: var(--wallet-amber); font-weight: 650; font-size: 0.875rem; display: inline-flex; align-items: center; gap: var(--sp-1); }
.card__cta:hover { color: var(--signal-lime); }

.icon-tile {
  width: 42px; height: 42px; border-radius: var(--rad-md);
  background: rgba(47, 214, 195, 0.10); border: 1px solid rgba(47, 214, 195, 0.28);
  color: var(--signal-teal); display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3);
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile--violet { background: rgba(167, 139, 250, 0.10); border-color: rgba(167, 139, 250, 0.30); color: var(--cred-violet); }
.icon-tile--amber { background: rgba(245, 180, 76, 0.10); border-color: rgba(245, 180, 76, 0.30); color: var(--wallet-amber); }
.icon-tile--lime { background: rgba(201, 242, 123, 0.08); border-color: rgba(201, 242, 123, 0.26); color: var(--signal-lime); }

/* ---------- 9. Credential chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.02em;
  color: var(--cred-violet);
  background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: var(--rad-pill); padding: 5px 12px;
}
.chip svg { width: 13px; height: 13px; }
.chip--lime { color: var(--signal-lime); background: rgba(201, 242, 123, 0.10); border-color: rgba(201, 242, 123, 0.34); }
.chip--teal { color: var(--signal-teal); background: rgba(47, 214, 195, 0.10); border-color: rgba(47, 214, 195, 0.34); }
.chip--amber { color: var(--wallet-amber); background: rgba(245, 180, 76, 0.10); border-color: rgba(245, 180, 76, 0.34); }
.chip--violet { color: var(--cred-violet); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.38); }

/* ---------- 10. Proof / checklist rows ---------- */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.check-row { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--text-2); font-size: 0.9375rem; }
.check-row svg { width: 18px; height: 18px; flex: none; color: var(--signal-lime); margin-top: 3px; }
.check-row b { color: var(--text); font-weight: 600; }

/* ---------- 11. Callouts ---------- */
.callout {
  border-left: 4px solid; border-radius: var(--rad-md);
  padding: var(--sp-5); margin: var(--sp-6) 0;
  display: flex; gap: var(--sp-4); align-items: flex-start;
  background: var(--surface); border-left-color: var(--signal-teal);
}
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--signal-teal); }
.callout p { color: var(--text-2); margin: 0; font-size: 0.9375rem; }
.callout p b { color: var(--text); }
.callout--wallet { border-left-color: var(--wallet-amber); }
.callout--wallet svg { color: var(--wallet-amber); }
.callout--violet { border-left-color: var(--cred-violet); }
.callout--violet svg { color: var(--cred-violet); }
.callout--error { border-left-color: var(--danger); }
.callout--error svg { color: var(--danger); }
.callout--lime { border-left-color: var(--signal-lime); }
.callout--lime svg { color: var(--signal-lime); }

/* ---------- 12. Relay spec card ---------- */
.spec {
  background: var(--surface); border: 1px solid var(--line-signal); border-radius: var(--rad-lg);
  padding: var(--sp-6); position: sticky; top: 88px; box-shadow: var(--elev-1);
}
.spec h3 { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal-teal); margin-bottom: var(--sp-4); }
.spec__row {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-mute);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.spec__row .spec__value { color: var(--text); text-align: end; }
.spec__row .spec__value em { color: var(--signal-lime); font-style: normal; }
.spec .btn { width: 100%; margin-top: var(--sp-5); }

/* ---------- 13. Code block ---------- */
.code-block {
  background: #0d1626; border: 1px solid var(--line-signal); border-radius: var(--rad-md);
  padding: var(--sp-5); font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--text-2); overflow-x: auto; position: relative; line-height: 1.7;
}
.code-block .kw { color: var(--cred-violet); }
.code-block .cm { color: var(--text-mute); font-style: italic; }
.code-block .st { color: var(--signal-lime); }
.code-block .fn { color: var(--signal-teal); }
.copy-btn {
  position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2);
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-signal);
  border-radius: var(--rad-sm); padding: 5px 10px; cursor: pointer;
}
.copy-btn:hover { color: var(--signal-lime); border-color: var(--signal-teal); }
.copy-btn svg { width: 13px; height: 13px; }

/* ---------- 14. Contract table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--rad-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { text-align: start; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); background: var(--ink-bg-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-family: var(--font-mono); color: var(--signal-teal); white-space: nowrap; }
td { color: var(--text-2); }
td b { color: var(--text); font-weight: 600; }

/* ---------- 15. Steps (numbered) ---------- */
.steps { counter-reset: step; margin-top: var(--sp-4); display: grid; gap: var(--sp-4); }
.step-item { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: var(--sp-4); }
.step-item::before {
  content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-signal);
  color: var(--signal-teal); font-family: var(--font-mono); font-size: 0.9375rem;
  display: flex; align-items: center; justify-content: center;
}
.step-item--done::before { background: rgba(201, 242, 123, 0.12); border-color: var(--signal-lime); color: var(--signal-lime); }
.step-item h3 { margin-bottom: var(--sp-1); }
.step-item p { color: var(--text-2); font-size: 0.9375rem; }
.step-item p .mono-inline { color: var(--text); }

/* ---------- 16. FAQ (native details — zero JS) ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--rad-md); background: var(--surface); margin-bottom: var(--sp-3); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); cursor: pointer; font-weight: 600; color: var(--text);
  list-style: none; font-size: 0.9375rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.125rem; color: var(--signal-teal);
  transition: transform 150ms ease; flex: none;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 var(--sp-5) var(--sp-4); color: var(--text-2); font-size: 0.9375rem; }

/* ---------- 17. Footer ---------- */
.foot { background: var(--ink-bg-2); border-top: 1px solid var(--line); padding: var(--sp-10) 0 var(--sp-6); }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-7); margin-bottom: var(--sp-7); }
.foot__brand p { color: var(--text-mute); font-size: 0.875rem; margin-top: var(--sp-2); }
.foot__col h4 { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--sp-3); }
.foot__col ul { display: grid; gap: var(--sp-2); }
.foot__col a { color: var(--text-2); font-size: 0.875rem; }
.foot__col a:hover { color: var(--signal-teal); }
.foot__check { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-bottom: var(--sp-6); }
.foot__check span { display: inline-flex; gap: var(--sp-2); align-items: center; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mute); }
.foot__check svg { width: 14px; height: 14px; color: var(--signal-lime); }
.foot__status { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mute); border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.foot__status b { color: var(--signal-lime); font-weight: 600; }
.foot__legal { margin-top: var(--sp-3); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-mute); display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* Status dot */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline-end: 6px; }
.status-dot--ok { background: var(--ok); }
.status-dot--err { background: var(--err); }
.status-pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  border: 1px solid var(--line-signal); background: var(--surface);
  border-radius: var(--rad-pill); padding: var(--sp-1) var(--sp-3);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-2);
}
.status-pill .status-dot { margin: 0; }

/* ---------- 18. Wallet-launch dialog ---------- */
.dialog {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: center; justify-content: center; padding: var(--sp-4);
}
.dialog[data-open="true"] { display: flex; }
.dialog__backdrop { position: absolute; inset: 0; background: rgba(6, 10, 18, 0.76); }
.dialog__panel {
  position: relative; width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--line-signal); border-radius: var(--rad-lg);
  box-shadow: var(--elev-2); padding: var(--sp-6);
}
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.dialog__title { font-weight: 650; font-size: 1rem; }
.dialog__close {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  border-radius: var(--rad-md); cursor: pointer; font-size: 1.25rem;
}
.dialog__close:hover { background: var(--surface-2); color: var(--text); }
.dialog__glyph {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(245, 180, 76, 0.12); border: 1px solid rgba(245, 180, 76, 0.5);
  color: var(--wallet-amber); display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
}
.dialog__glyph svg { width: 30px; height: 30px; }
.dialog h3 { text-align: center; margin-bottom: var(--sp-2); }
.dialog__body { text-align: center; color: var(--text-2); font-size: 0.9375rem; }
.dialog__actions { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.dialog__foot { text-align: center; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mute); margin-top: var(--sp-5); }
.dialog[data-busy="true"] .dialog__glyph { animation: dialogPulse 1.4s ease-in-out infinite; }
@keyframes dialogPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- 19. Not-applies note (search page type) ---------- */
.notapply { display: flex; gap: var(--sp-4); background: var(--surface); border: 1px dashed var(--line-signal); border-radius: var(--rad-lg); padding: var(--sp-5) var(--sp-6); align-items: flex-start; }
.notapply .badge { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal-teal); border: 1px solid var(--line-signal); border-radius: var(--rad-pill); padding: 4px 10px; white-space: nowrap; flex: none; }
.notapply p { color: var(--text-2); font-size: 0.875rem; margin: 0; }
.notapply p b { color: var(--text); }

/* ---------- 20. Section head ---------- */
.section-head { max-width: 58ch; margin-bottom: var(--sp-6); }
.section-head h2 { margin: var(--sp-2) 0 var(--sp-3); }
.section-head p { color: var(--text-2); }

/* ---------- 21. Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: var(--sp-6); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .spec { position: static; }
}

@media (max-width: 768px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .menu-btn { display: inline-flex; }
  .nav { display: none; }
  .nav-cta .btn { display: none; }
  .circuit__hops { flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
  .hop { flex-basis: calc(33% - 12px); }
  .circuit__line { display: none; }
  .sec { padding: var(--sp-8) 0; }
  .dialog__panel { max-width: 100%; }
}

@media (max-width: 480px) {
  .grid--4 { grid-template-columns: 1fr; }
  .hop { flex-basis: calc(50% - 8px); }
  .cta-row .btn { width: 100%; }
}

/* ---------- 22. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hop--now .hop__dot { animation: none; }
  .dialog[data-busy="true"] .dialog__glyph { animation: none; }
  .faq summary::after { transition: none; }
}

/* ---------- 23. RTL readiness (multilingual) ---------- */
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .check-row svg { margin-top: 3px; }
[dir="rtl"] .code-block, [dir="rtl"] .spec__row, [dir="rtl"] .chip, [dir="rtl"] .mono-inline { direction: ltr; unicode-bidi: embed; }