:root {
  color-scheme: dark;
  --bg: #101613;
  --bg-2: #171f1b;
  --card: #1b2420;
  --line: #31403a;
  --text: #f4f1ea;
  --muted: #b7b1a6;
  --faint: #8d877e;
  --brass: #e2b15a;
  --brass-2: #f0d7a4;
  --teal: #8fd0c6;
  --danger: #e08b7b;
  --ok: #9dcea0;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body { background:
  radial-gradient(720px 280px at 100% -10%, rgba(226, 177, 90, .14), transparent 60%),
  var(--bg);
  color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -40px; background: var(--brass); color: #1a1408; padding: 8px 12px; }
.skip:focus { top: 12px; z-index: 5; }

.topbar { position: sticky; top: 0; z-index: 6; background: rgba(16, 22, 19, .88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(49, 64, 58, .7); }
.nav, .footer, .wrap, .shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.nav { display: flex; align-items: center; gap: 22px; min-height: 72px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 22px; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 18px; align-items: center; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--text); }

.btn, .btn-line, .btn-danger { border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .18s ease, filter .18s ease, border-color .18s ease; }
.btn:hover, .btn-line:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn { background: var(--brass); color: #231a0c; font-weight: 600; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-line { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #6d3d36; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 48px; align-items: center; padding: 36px 0 72px; }
.kicker { color: var(--brass); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; }
h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; margin: 0 0 16px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 0 0 12px; }
.lede { font-size: 19px; color: var(--muted); max-width: 46ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.panel { background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 32%), var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; transition: transform .22s ease, border-color .22s ease; }
.card:hover, .flow:hover { transform: translateY(-4px); border-color: #5d7268; }
.card.featured { border-color: var(--brass); box-shadow: 0 18px 50px rgba(226, 177, 90, .12); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero > *, .card, .flow { animation: rise .65s ease both; }
.card:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3) { animation-delay: .16s; }
.flow { display: grid; gap: 12px; }
.flow div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.flow strong { display: block; }
.flow span { color: var(--muted); }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #24312c; color: var(--brass); font-size: 13px; }

.section { padding: 18px 0 64px; }
.grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#features, #how { scroll-margin-top: 88px; }
.route-demo h2 { font-size: 28px; margin: 0 0 8px; }
.demo-note { color: var(--muted); margin: 0 0 8px; }
.route-list { list-style: none; margin: 0; padding: 0; }
.route-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.route-list li span:last-child { color: var(--teal); font-family: ui-monospace, monospace; font-size: 13px; text-align: right; }
.route-path { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.route-path span { background: #24312c; border-radius: 999px; padding: 8px 12px; }
.route-path .arrow { background: transparent; color: var(--brass); padding: 0; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps strong { display: block; }
.steps span { color: var(--muted); }
.closing { padding-bottom: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card h3 { margin: 0 0 8px; font-size: 28px; }
.card p, .muted { color: var(--muted); }
.price { font-family: var(--serif); font-size: 42px; margin: 8px 0; }
.price small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 16px; color: var(--muted); }
.legal { max-width: 760px; }
.legal h2 { font-size: 28px; margin: 28px 0 8px; }
.legal p { color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.footer { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: var(--faint); padding: 28px 0 40px; border-top: 1px solid var(--line); }
.footer nav { display: flex; gap: 12px 16px; flex-wrap: wrap; max-width: 720px; justify-content: flex-end; }
.copy { max-width: 68ch; color: var(--muted); }
.copy h2 { margin-top: 28px; }
.copy p { margin: 0 0 14px; }
.copy strong, .copy h2, .copy h3 { color: var(--text); }
.related { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 8px; }
.crumbs { color: var(--faint); font-size: 14px; margin: 18px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
code { font-family: ui-monospace, monospace; font-size: .92em; color: var(--brass-2); }

.shell { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 18px 0 50px; align-items: start; }
.side { display: grid; gap: 6px; position: sticky; top: 12px; }
.side a, .side button.navbtn { text-align: left; background: transparent; border: 0; color: var(--muted); text-decoration: none; border-radius: 12px; padding: 10px 12px; }
.side a[aria-current="page"], .side a:hover { background: #24312c; color: var(--text); }
.side .group { margin: 16px 0 6px; color: var(--faint); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.main-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.main-head p { margin: 6px 0 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 560; }
.stat span, .hint { color: var(--faint); font-size: 13px; }
.list { display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; }
.row b { display: block; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); font-size: 12px; }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--brass-2); }
.tag.bad { color: var(--danger); }

form.stack, .stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; background: #101613; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
textarea { min-height: 90px; resize: vertical; }
.checks { display: flex; gap: 16px; align-items: center; color: var(--muted); }
.rule { display: grid; gap: 10px; }
.rule-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.bar { height: 8px; background: #2a3832; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--faint); font-weight: 500; font-size: 13px; }
.note { border-left: 3px solid var(--brass); padding-left: 12px; }
.error { color: var(--danger); }
.banner { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #221c12; }
.cycle { display: inline-flex; gap: 4px; padding: 4px; margin: 8px 0 22px; border: 1px solid var(--line); border-radius: 999px; background: #121a16; }
.cycle button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.cycle button[aria-pressed="true"] { background: var(--brass); color: #231a0c; font-weight: 600; }
.pay-card { margin: 8px 0 22px; }
.address { font-family: ui-monospace, monospace; font-size: 15px; word-break: break-all; background: #101613; border-radius: 12px; padding: 12px; }
.qr svg { width: 180px; height: 180px; background: #f4f1ea; border-radius: 16px; }
.menu { display: none; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
#dialog { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; }
#dialog[hidden] { display: none; }
.dialog-card { width: min(440px, 100%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .hero, .grid-3, .grid-2, .grid-4, .stats, .shell { grid-template-columns: 1fr; }
  .route-list li { flex-direction: column; align-items: flex-start; }
  .route-list li span:last-child { text-align: left; }
  .hero { gap: 24px; padding-bottom: 36px; }
  h1 { font-size: 40px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 68px; left: 0; right: 0; background: #171f1b; border: 1px solid var(--line); border-radius: 16px; padding: 10px; z-index: 8; box-shadow: var(--shadow); }
  .nav-links.open a, .nav-links.open .btn { min-height: 44px; }
  .menu { display: inline-flex; margin-left: auto; min-width: 44px; min-height: 44px; }
  .side { position: static; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
  .side .brand, .side .group, .side .hint { display: none; }
  .side a, .side button.navbtn { white-space: nowrap; min-height: 44px; }
  .main-head, .row { align-items: stretch; flex-direction: column; }
  .actions .btn, .actions .btn-line, input, select, textarea, .chip { min-height: 44px; }
  table { display: block; overflow-x: auto; }
  #toasts { left: 16px; right: 16px; }
}
