:root {
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #161b22;
  --ink-soft: #353d48;
  --muted: #7b8491;
  --line: #dce2e9;
  --line-strong: #c7cfd9;
  --blue: #485cf0;
  --blue-deep: #3142cb;
  --blue-pale: #eef0ff;
  --mint: #b8f36b;
  --mint-pale: #effbe5;
  --green: #16724d;
  --orange: #ea7142;
  --orange-pale: #fff1e9;
  --terminal: #191f27;
  --terminal-soft: #222a34;
  --shadow-sm: 0 8px 24px rgba(28, 38, 51, .055);
  --shadow-lg: 0 28px 80px rgba(28, 38, 51, .12);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: fixed;
  z-index: 200;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-weight: 750;
}
.skip-link:focus { transform: none; }

/* Header */
.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid rgba(22, 27, 34, .1);
  background: rgba(244, 246, 248, .88);
  backdrop-filter: blur(18px) saturate(140%);
}
.topbar-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 800; }
.brand-mark { position: relative; display: block; width: 31px; height: 31px; transform: rotate(30deg); }
.brand-mark i { position: absolute; width: 13px; height: 13px; border-radius: 5px; background: var(--blue); }
.brand-mark i:first-child { top: 0; left: 9px; background: var(--orange); }
.brand-mark i:nth-child(2) { bottom: 0; left: 0; background: var(--blue); }
.brand-mark i:last-child { right: 0; bottom: 0; background: var(--mint); }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink-soft); font-size: 13px; font-weight: 650; transition: color .2s; }
.nav a:hover { color: var(--blue); }
.cabinet-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
  transition: transform .2s, box-shadow .2s;
}
.cabinet-link:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }

/* Hero */
.hero {
  display: grid;
  min-height: 660px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
  align-items: center;
  gap: 72px;
  padding-block: 78px 72px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(22, 114, 77, .11); }
.hero h1 {
  margin: 0;
  font-size: clamp(58px, 6vw, 86px);
  font-weight: 850;
  letter-spacing: -.067em;
  line-height: .94;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-lede { max-width: 600px; margin: 30px 0 0; color: var(--ink-soft); font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 36px; }
.primary-action {
  display: inline-flex;
  min-height: 54px;
  min-width: 236px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 17px 13px 20px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--mint);
  font-weight: 850;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.primary-action:hover { transform: translate(3px, 3px); background: #c8f78d; box-shadow: 2px 2px 0 var(--ink); }
.primary-action.dark { background: var(--ink); color: white; box-shadow: 5px 5px 0 var(--blue); }
.privacy-brief { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 650; }
.privacy-brief i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.balance-panel { min-width: 0; padding: 28px; border: 1px solid var(--line-strong); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-sm); }
.balance-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.balance-live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-family: var(--mono); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.balance-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22, 114, 77, .1); }
.balance-panel h2 { margin: 17px 0 0; font-size: clamp(31px, 3vw, 42px); line-height: 1.02; letter-spacing: -.045em; }
.balance-lede { max-width: 420px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.balance-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 24px; }
.balance-key-field { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-soft); transition: border-color .2s, box-shadow .2s, background .2s; }
.balance-key-field:focus-within { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(72, 92, 240, .09); }
.balance-key-field.valid { border-color: var(--green); }
.balance-key-field.invalid { border-color: #bb3d35; }
.balance-key-field input { min-width: 0; flex: 1; padding: 9px 8px; border: 0; outline: 0; background: transparent; font-family: var(--mono); font-size: 10px; }
.balance-key-field button { min-height: 34px; padding: 7px 9px; border-radius: 9px; background: white; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.balance-submit { min-width: 112px; min-height: 46px; padding: 10px 15px; border-radius: 13px; background: var(--ink); color: white; font-size: 10px; font-weight: 850; cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.balance-submit:hover { background: var(--blue); }
.balance-submit:disabled { cursor: wait; opacity: .72; }
.balance-submit.loading::after { display: inline-block; width: 8px; height: 8px; margin-left: 7px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: balance-spin .65s linear infinite; }
@keyframes balance-spin { to { transform: rotate(360deg); } }
.balance-result { margin-top: 15px; padding: 17px 18px; border-radius: 16px; background: var(--mint-pale); }
.balance-result span, .balance-result strong, .balance-result small { display: block; }
.balance-result span { color: var(--green); font-family: var(--mono); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.balance-result strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 30px; line-height: 1.08; letter-spacing: -.04em; }
.balance-result small { margin-top: 5px; color: #52705e; font-size: 9px; }
.balance-message { min-height: 17px; margin: 13px 1px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.balance-message.success { color: var(--green); }
.balance-message.error { color: #a52f29; }

/* Proof strip */
.proof-strip { border-block: 1px solid var(--ink); background: var(--ink); color: white; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.proof-grid article { display: flex; min-height: 96px; align-items: center; gap: 14px; padding: 18px 26px; border-right: 1px solid #373f49; }
.proof-grid article:first-child { padding-left: 0; }
.proof-grid article:last-child { padding-right: 0; border-right: 0; }
.proof-grid article > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #59636f; border-radius: 50%; color: var(--mint); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.proof-grid strong, .proof-grid small { display: block; }
.proof-grid strong { font-size: 13px; }
.proof-grid small { margin-top: 2px; color: #aeb7c1; font-size: 11px; }

/* Setup */
.setup { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 70px; padding-block: 96px 120px; }
.setup-rail { min-width: 0; }
.rail-card { position: sticky; top: 106px; padding: 25px; border: 1px solid var(--line-strong); border-radius: 24px; background: rgba(255, 255, 255, .76); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.section-kicker { margin: 0; color: var(--blue); font-family: var(--mono); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rail-card h2 { margin: 9px 0 22px; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; }
.route-summary { position: relative; display: grid; gap: 21px; margin: 0; padding: 0; list-style: none; }
.route-summary::before { position: absolute; top: 29px; bottom: 29px; left: 20px; width: 1px; background: var(--line-strong); content: ""; }
.route-summary li { position: relative; z-index: 1; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; }
.route-summary li > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 850; transition: background .25s, border-color .25s, color .25s, transform .25s; }
.route-summary li.complete > span { border-style: solid; border-color: var(--blue); background: var(--blue); color: white; transform: rotate(-4deg); }
.route-summary small, .route-summary strong { display: block; }
.route-summary small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.route-summary strong { overflow: hidden; margin-top: 2px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.text-button { min-height: 42px; margin-top: 24px; padding: 8px 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--blue); }

.setup-workspace { min-width: 0; }
.section-heading { padding-bottom: 34px; border-bottom: 2px solid var(--ink); }
.section-heading h2, .reference-heading h2, .final-cta h2 { margin: 10px 0 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.02; letter-spacing: -.05em; }
.section-heading > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.wizard-step { padding: 32px 0 38px; border-bottom: 1px solid var(--line-strong); animation: enter .4s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
.step-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.step-heading > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ink); border-radius: 12px; font-family: var(--mono); font-size: 9px; font-weight: 850; }
.step-heading h3 { margin: 1px 0 0; font-size: 18px; line-height: 1.25; }
.step-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid-variant { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 98px;
  align-items: center;
  gap: 13px;
  padding: 15px 38px 15px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  text-align: left;
  cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.choice-card:hover { z-index: 2; transform: translateY(-3px); border-color: var(--ink); background: white; box-shadow: var(--shadow-sm); }
.choice-card.selected { border: 2px solid var(--blue); padding: 14px 37px 14px 14px; background: var(--blue-pale); box-shadow: 4px 4px 0 var(--blue); }
.choice-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); color: var(--blue); }
.choice-icon svg { width: 25px; height: 25px; }
.choice-card[data-tone="orange"] .choice-icon { background: var(--orange-pale); color: var(--orange); }
.choice-card[data-tone="dark"] .choice-icon { background: var(--ink); color: white; }
.choice-card.selected .choice-icon { border-color: var(--blue); background: var(--blue); color: white; transform: rotate(-4deg); }
.choice-text { min-width: 0; }
.choice-text strong, .choice-text small { display: block; }
.choice-text strong { font-size: 13px; line-height: 1.25; }
.choice-text small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.choice-check { position: absolute; top: 12px; right: 12px; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; font-size: 10px; font-weight: 900; }
.choice-card.selected .choice-check { border-color: var(--blue); background: var(--blue); color: white; }

/* Instruction */
.instruction-card { margin-top: 44px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg); animation: enter .45s cubic-bezier(.2, .75, .25, 1) both; }
.instruction-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.instruction-head h2 { margin: 8px 0 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -.04em; }
.instruction-head p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.change-button { min-height: 42px; flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft); font-size: 11px; font-weight: 800; cursor: pointer; }
.change-button:hover { border-color: var(--ink); background: white; }
.mode-tabs { display: inline-flex; max-width: 100%; gap: 4px; margin-top: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.mode-tab { min-height: 42px; padding: 9px 16px; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.mode-tab[aria-selected="true"] { background: var(--ink); color: white; box-shadow: 0 4px 12px rgba(22, 27, 34, .15); }
.key-personalizer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr); align-items: center; gap: 16px 24px; margin-top: 22px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.key-personalizer label { font-size: 12px; font-weight: 850; }
.key-personalizer label span { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 650; }
.key-personalizer p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.key-field { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 12px; background: white; transition: border-color .2s, box-shadow .2s; }
.key-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(72, 92, 240, .1); }
.key-field.valid { border-color: var(--green); }
.key-field.invalid { border-color: #bb3d35; }
.key-field input { min-width: 0; flex: 1; padding: 8px 9px; border: 0; outline: 0; background: transparent; font-family: var(--mono); font-size: 11px; }
.key-field button { min-height: 36px; padding: 7px 10px; border-radius: 9px; background: var(--paper); font-size: 10px; font-weight: 800; cursor: pointer; }
.key-message { grid-column: 1 / -1; min-height: 0; margin: -8px 0 0 !important; color: var(--green) !important; font-family: var(--mono); }
.key-message.invalid { color: #a52f29 !important; }
.steps-list { display: grid; gap: 11px; margin: 25px 0 0; padding: 0; counter-reset: instructions; list-style: none; }
.steps-list li { counter-increment: instructions; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 11px; color: var(--ink-soft); font-size: 12px; }
.steps-list li::before { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--blue-pale); color: var(--blue-deep); content: counter(instructions); font-family: var(--mono); font-size: 9px; font-weight: 850; }
.steps-list li strong { color: var(--ink); }
.code-stack { display: grid; gap: 14px; margin-top: 24px; }
.code-card { min-width: 0; overflow: hidden; border: 1px solid #303944; border-radius: 18px; background: var(--terminal); color: #edf3f7; box-shadow: 0 14px 28px rgba(17, 22, 29, .12); }
.code-head { display: flex; min-height: 51px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px 10px 17px; border-bottom: 1px solid #303944; background: var(--terminal-soft); }
.code-label { display: flex; min-width: 0; align-items: center; gap: 10px; color: #b7c0ca; font-size: 10px; font-weight: 750; }
.window-dots { display: inline-flex; flex: 0 0 auto; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ff6b5d; }
.window-dots i:nth-child(2) { background: #f2c14e; }
.window-dots i:last-child { background: #62c279; }
.copy-button { min-height: 36px; padding: 7px 11px; border: 1px solid #46515d; border-radius: 10px; background: #2b343f; color: white; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.copy-button:hover, .copy-button.done { border-color: var(--mint); background: var(--mint); color: var(--ink); }
.code-card pre { max-width: 100%; margin: 0; overflow-x: auto; padding: 19px 20px 21px; color: #e9eef2; font: 11px/1.7 var(--mono); tab-size: 2; white-space: pre; overscroll-behavior-inline: contain; }
.code-caption { margin: 0; padding: 0 20px 17px; color: #96a2ae; font-size: 10px; }
.instruction-note { margin-top: 17px; padding: 15px 17px; border: 1px solid #bdd0c2; border-radius: 15px; background: #f1f8f3; color: #365244; font-size: 11px; }
.instruction-note.warning { border-color: #e6c9a9; background: #fff8ed; color: #694c2c; }

/* Reference blocks */
.reference-section { padding-block: 0 112px; }
.reference-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.reference-heading > div > p:last-child { margin: 11px 0 0; color: var(--muted); font-size: 12px; }
.copy-all { min-height: 46px; padding: 10px 15px; border: 1px solid var(--ink); border-radius: 13px; background: var(--ink); color: white; font-size: 11px; font-weight: 800; cursor: pointer; }
.copy-all:hover, .copy-all.done { background: var(--mint); color: var(--ink); }
.endpoint-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.endpoint-row { display: grid; min-width: 0; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 64px; padding: 10px 13px 10px 20px; border-bottom: 1px solid var(--line); }
.endpoint-row:last-child { border-bottom: 0; }
.endpoint-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.endpoint-value { min-width: 0; overflow: hidden; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.row-copy, .model-copy { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.row-copy:hover, .model-copy:hover, .row-copy.done, .model-copy.done { border-color: var(--blue); background: var(--blue-pale); color: var(--blue); }
.row-copy svg, .model-copy svg { width: 17px; height: 17px; }
.model-groups { display: grid; grid-template-columns: 1.25fr .75fr .95fr; gap: 16px; align-items: start; }
.model-group { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.model-group-head { display: flex; align-items: center; gap: 11px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.model-group-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--blue-pale); color: var(--blue); }
.model-group[data-group="image"] .model-group-icon { background: var(--mint-pale); color: var(--green); }
.model-group[data-group="claude"] .model-group-icon { background: var(--orange-pale); color: var(--orange); }
.model-group-head h3 { margin: 0; font-size: 15px; }
.model-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px 10px 19px; border-bottom: 1px solid var(--line); }
.model-row:last-child { border-bottom: 0; }
.model-id { min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 11px; font-weight: 750; }
.model-id small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--sans); font-size: 9px; font-weight: 600; }
.multiplier { min-width: 50px; padding: 5px 8px; border-radius: 999px; background: #eaf8f1; color: var(--green); font-family: var(--mono); font-size: 11px; font-weight: 850; text-align: center; }

.final-cta { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 112px; padding: 46px; border: 1px solid var(--ink); border-radius: 30px; background: var(--mint); box-shadow: 8px 8px 0 var(--ink); }
.final-cta .section-kicker { color: var(--ink); }
.final-cta h2 { font-size: clamp(38px, 5vw, 60px); }
footer { padding-bottom: max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: rgba(255, 255, 255, .48); }
.footer-inner { display: flex; min-height: 110px; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner p { color: var(--muted); font-size: 11px; }
.footer-inner > a { font-family: var(--mono); font-size: 11px; font-weight: 750; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); transform: translateY(20px); padding: 11px 15px; border: 1px solid #3b4652; border-radius: 12px; background: var(--ink); color: white; font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow-lg); }
.toast.show { transform: none; opacity: 1; }
.clipboard-fallback { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 980px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 36px; padding-block: 70px; }
  .hero-copy { max-width: 760px; }
  .balance-panel { width: min(620px, 100%); }
  .setup { grid-template-columns: 1fr; gap: 28px; }
  .rail-card { position: static; }
  .route-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .route-summary::before { display: none; }
  .route-summary li { grid-template-columns: 36px minmax(0, 1fr); }
  .route-summary li > span { width: 36px; height: 36px; border-radius: 11px; }
  .text-button { margin-top: 14px; }
  .model-groups { grid-template-columns: 1fr 1fr; }
  .model-group:first-child { grid-row: span 2; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, 620px); }
  html { scroll-padding-top: 78px; }
  .topbar-inner { min-height: 62px; gap: 12px; }
  .nav { display: none; }
  .cabinet-link { min-height: 40px; padding-inline: 11px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark i { width: 12px; height: 12px; }
  .hero { padding-block: 55px 60px; }
  .hero h1 { font-size: clamp(49px, 15vw, 72px); }
  .hero-lede { margin-top: 23px; font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; margin-top: 29px; }
  .primary-action { width: 100%; min-width: 0; }
  .balance-panel { padding: 22px; border-radius: 22px; }
  .balance-form { grid-template-columns: 1fr; }
  .balance-submit { width: 100%; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid article, .proof-grid article:first-child, .proof-grid article:last-child { min-height: 78px; padding: 14px 0; border-right: 0; border-bottom: 1px solid #373f49; }
  .proof-grid article:last-child { border-bottom: 0; }
  .setup { padding-block: 66px 90px; }
  .rail-card { padding: 19px; border-radius: 20px; }
  .rail-card h2 { margin-bottom: 16px; font-size: 20px; }
  .route-summary { grid-template-columns: 1fr; gap: 10px; }
  .route-summary li { grid-template-columns: 36px minmax(0, 1fr); }
  .section-heading h2, .reference-heading h2 { font-size: 36px; }
  .choice-grid, .choice-grid-3, .choice-grid-variant { grid-template-columns: 1fr; }
  .choice-card { min-height: 84px; }
  .instruction-card { margin-inline: -4px; padding: 20px; border-radius: 24px; }
  .instruction-head { flex-direction: column; gap: 14px; }
  .change-button { width: 100%; }
  .mode-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-tab { padding-inline: 10px; }
  .key-personalizer { grid-template-columns: 1fr; }
  .key-message { grid-column: auto; margin-top: -7px !important; }
  .code-head { align-items: stretch; flex-direction: column; }
  .copy-button { width: 100%; }
  .reference-section { padding-bottom: 88px; }
  .reference-heading { align-items: stretch; flex-direction: column; }
  .copy-all { width: 100%; }
  .endpoint-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 5px 10px; padding-block: 12px; }
  .endpoint-label { grid-column: 1; }
  .endpoint-value { grid-row: 2; grid-column: 1; overflow-wrap: anywhere; font-size: 10px; text-overflow: clip; white-space: normal; }
  .endpoint-row .row-copy { grid-row: 1 / span 2; grid-column: 2; }
  .model-groups { grid-template-columns: 1fr; }
  .model-group:first-child { grid-row: auto; }
  .model-row { grid-template-columns: minmax(0, 1fr) auto 40px; padding-left: 16px; }
  .final-cta { align-items: stretch; flex-direction: column; margin-bottom: 90px; padding: 28px 24px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; padding-block: 26px; }
  .footer-inner p { margin: 0; }
  .toast { right: 14px; left: 14px; text-align: center; }
}

@media (max-width: 390px) {
  .wrap { width: calc(100% - 22px); }
  .cabinet-link { font-size: 0; }
  .cabinet-link span { font-size: 14px; }
  .balance-panel { padding: 19px; }
  .instruction-card { padding: 17px; }
  .code-card pre { padding-inline: 16px; }
  .model-row { grid-template-columns: minmax(0, 1fr) auto 38px; gap: 7px; }
  .multiplier { min-width: 44px; padding-inline: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
