:root {
  --black: #0a0a0a;
  --dark: #111312;
  --panel: #181a18;
  --panel-2: #20231f;
  --line: #30342f;
  --warm: #f5f0eb;
  --muted: #a9a096;
  --sand: #a09280;
  --lime: #c2ff00;
  --blue: #8db7ff;
  --danger: #ff7368;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--warm);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}

button, input, select, textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, .9);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--warm);
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand span { color: var(--lime); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 430px) 1fr;
}

.control-panel {
  border-right: 1px solid var(--line);
  background: var(--dark);
  overflow: auto;
}

.panel-section, .search-form, .route-form, .usage-panel {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.route-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.route-summary {
  padding: 14px 18px;
  margin: 8px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10140f;
  color: var(--muted);
}

.route-summary-text {
  margin: 5px 0 0;
  color: var(--warm);
  font-weight: 800;
}

.route-summary-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.suggestions {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0f100f;
}

.suggestion {
  width: 100%;
  min-height: 48px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--warm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.suggestion:last-child { border-bottom: 0; }

.suggestion:hover,
.suggestion:focus {
  outline: none;
  background: #20251a;
}

.suggestion strong {
  font-size: 14px;
  line-height: 1.25;
}

.suggestion span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, p { overflow-wrap: anywhere; }

h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  color: #d7cec4;
  font-size: 16px;
}

.return-notice {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(194, 255, 0, .35);
  border-radius: 8px;
  color: var(--warm);
  background: #10140f;
  font-size: 13px;
  font-weight: 750;
}

.return-notice.warn {
  border-color: rgba(255, 115, 104, .45);
  color: #ffd1cd;
  background: #1c100f;
}

.beta-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 18px;
}

.beta-strip div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
}

.beta-strip strong {
  color: var(--lime);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.beta-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.store-link {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
  color: var(--warm);
  text-decoration: none;
}

.store-link span {
  color: var(--muted);
  font-size: 11px;
}

.store-link strong {
  font-size: 17px;
  line-height: 1;
}

.store-link em {
  display: none;
  margin-top: 7px;
  color: var(--lime);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.store-link[aria-disabled="true"] {
  color: #bdb6ae;
  background: #0d0f0d;
  cursor: default;
}

.store-link[aria-disabled="true"] em {
  display: block;
}

.store-link[aria-disabled="true"] strong {
  color: #d2cbc4;
}

.expo-test-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(194, 255, 0, .55);
  border-radius: 999px;
  color: var(--lime);
  background: #10140f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.expo-test-link.secondary {
  border-color: var(--line);
  color: var(--warm);
  background: #161816;
}

.beta-lead-card {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: #0d0f0d;
}

.beta-lead-card h2 {
  margin-bottom: 10px;
}

.beta-lead-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.beta-lead-form {
  gap: 12px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

input, select, textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f100f;
  color: var(--warm);
  padding: 11px 12px;
  letter-spacing: 0;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.filters label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  color: #d4ccc4;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.filters input[type="checkbox"] {
  appearance: none;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  min-height: 19px;
  margin: 0;
  padding: 0;
  border: 1px solid #596055;
  border-radius: 5px;
  background: #0a0a0a;
  display: grid;
  place-items: center;
}

.filters input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--lime);
  transform: scale(0);
  transition: transform .12s ease;
}

.filters input[type="checkbox"]:checked {
  border-color: var(--lime);
}

.filters input[type="checkbox"]:checked::after {
  transform: scale(1);
}

.filters label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.button, .icon-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #161816;
  color: var(--warm);
  padding: 11px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.button.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: #000;
}

.button[aria-pressed="true"] {
  border-color: var(--lime);
  color: var(--lime);
}

.button.ghost {
  background: transparent;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.usage-panel {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.usage-panel strong {
  color: var(--lime);
  font-size: 16px;
}

.map-area {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.map {
  position: relative;
  min-height: calc(100vh - 68px);
  background:
    linear-gradient(rgba(194, 255, 0, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194, 255, 0, .05) 1px, transparent 1px),
    #0f120f;
  background-size: 54px 54px;
}

.map-placeholder {
  position: absolute;
  inset: 24px;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 10, 10, .46);
}

.map-placeholder strong {
  color: var(--warm);
  font-size: 28px;
}

.results {
  border-left: 1px solid var(--line);
  background: #0d0e0d;
  overflow: auto;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.results-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 13, .92);
  backdrop-filter: blur(14px);
}

.results-header h2 {
  margin: 0;
}

.results-header span {
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lime);
  color: #000;
  font-weight: 900;
}

.status {
  margin: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #151615;
}

.status.error {
  border-color: rgba(255, 115, 104, .5);
  color: #ffd1cd;
}

.station-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 18px;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
}

.station-card {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--warm);
  padding: 16px;
  cursor: pointer;
}

.station-card:hover {
  border-color: rgba(194, 255, 0, .55);
}

.station-card h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.station-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta-row, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: #d8d0c8;
  background: #101110;
  font-size: 12px;
}

.chip.hot {
  border-color: var(--lime);
  color: var(--lime);
}

.dialog {
  width: min(560px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--warm);
  padding: 24px;
}

.paywall {
  width: min(680px, calc(100vw - 24px));
}

.token-desk {
  width: min(760px, calc(100vw - 24px));
}

.payment-profile {
  width: min(720px, calc(100vw - 24px));
}

.download-page {
  min-height: 100vh;
  background: var(--black);
}

.download-hero {
  padding: 36px 24px 30px;
  border-bottom: 1px solid var(--line);
  background: #0d0e0d;
}

.download-hero .brand {
  display: inline-flex;
  margin-bottom: 42px;
}

.download-hero h1 {
  max-width: 980px;
}

.download-hero .lead {
  max-width: 820px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
}

.download-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.download-card p {
  margin: 0;
  color: var(--muted);
}

.download-card .button {
  align-self: end;
  justify-self: start;
  text-decoration: none;
}

.download-steps {
  padding: 24px;
  border-top: 1px solid var(--line);
}

.download-steps pre {
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f100f;
  color: #d7cec4;
}

.download-steps p {
  color: var(--muted);
}

.whitepaper-page {
  background: var(--black);
}

.whitepaper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.whitepaper-actions a {
  text-decoration: none;
}

.whitepaper-content {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.whitepaper-content section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.whitepaper-content a {
  color: var(--lime);
}

.notice-box {
  padding: 18px;
  border: 1px solid rgba(194, 255, 0, .45);
  border-radius: 8px;
  background: #10140f;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.facts div,
.tier-grid div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.facts dt {
  color: var(--sand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--warm);
  overflow-wrap: anywhere;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tier-grid strong {
  color: var(--lime);
}

.tier-grid span,
.step-list {
  color: var(--muted);
}

.step-list {
  padding-left: 22px;
}

.beta-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--black);
}

.beta-card {
  width: min(620px, 100%);
  min-height: 0;
}

.beta-card .brand {
  margin-bottom: 22px;
}

.small-note {
  color: var(--muted);
  font-size: 12px;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, .72);
}

.close {
  float: right;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #101110;
  color: var(--warm);
  cursor: pointer;
  font-size: 22px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.price {
  display: block;
  margin: 16px 0;
  color: var(--lime);
  font-size: 32px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 12px;
  margin: 18px 0;
}

.plan-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
  color: var(--warm);
  cursor: pointer;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card:has(input:checked) {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px rgba(194, 255, 0, .35);
}

.plan-card.recommended {
  background: #14180f;
}

.plan-badge {
  justify-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--lime);
  color: #000;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card .price {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.checkout-email {
  margin: 10px 0 14px;
}

.token-benefit {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101310;
}

.token-benefit p {
  margin: 0;
}

.payment-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.payment-element {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
}

.payment-architecture {
  margin-top: 14px;
}

.wallet-topup {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.wallet-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(194, 255, 0, .35);
  border-radius: 8px;
  background: #10140f;
}

.wallet-balance span {
  color: var(--muted);
  font-size: 13px;
}

.wallet-balance strong {
  color: var(--lime);
  font-size: 28px;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.topup-grid label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
  cursor: pointer;
}

.topup-grid input {
  position: absolute;
  opacity: 0;
}

.topup-grid span {
  color: var(--warm);
  font-size: 22px;
  font-weight: 900;
}

.topup-grid em {
  color: var(--lime);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topup-grid label:has(input:checked) {
  border-color: var(--lime);
  background: #14180f;
  box-shadow: 0 0 0 1px rgba(194, 255, 0, .35);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.info-grid > div {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101110;
}

.info-grid strong {
  color: var(--lime);
}

.info-grid span {
  color: var(--muted);
  font-size: 13px;
}

.token-interest-form {
  margin-top: 14px;
}

.notice-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f100f;
  color: #d7cec4;
  text-transform: none;
  letter-spacing: 0;
}

.notice-check input {
  flex: 0 0 20px;
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.v2g-panel {
  margin-top: 16px;
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
}

.token-result {
  color: var(--lime);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.token-result.error {
  color: #ffd1cd;
}

.checkout-primary {
  min-width: min(100%, 280px);
}

.fineprint {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .workspace, .map-area {
    grid-template-columns: 1fr;
  }

  .control-panel, .results {
    border-right: 0;
    border-left: 0;
  }

  .map {
    min-height: 44vh;
    max-height: 44vh;
  }

  .results {
    min-height: 44vh;
    max-height: 44vh;
  }
}

@media (min-width: 821px) and (max-width: 1180px) and (orientation: landscape) {
  .map-area {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  }

  .map {
    min-height: 56vh;
    max-height: 56vh;
  }

  .results {
    min-height: 56vh;
    max-height: 56vh;
  }
}

@media (min-width: 621px) and (max-width: 920px) and (orientation: portrait) {
  .map {
    min-height: 50vh;
    max-height: 50vh;
  }

  .results {
    min-height: 50vh;
    max-height: 50vh;
  }

  .route-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .download-grid {
    grid-template-columns: 1fr;
  }

  .tier-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions, .button.ghost {
    width: 100%;
  }

  .button.ghost {
    justify-content: center;
  }

  .inline-fields, .filters {
    grid-template-columns: 1fr;
  }

  .wallet-row {
    grid-template-columns: 1fr;
  }

  .download-row {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .topup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expo-test-link {
    width: 100%;
  }

  .panel-section, .search-form, .route-form, .usage-panel {
    padding: 18px 14px;
  }

  h1 {
    font-size: 34px;
  }

  .route-controls {
    grid-template-columns: 1fr;
  }
}
