/* eSIM Ara design system
   Palette: ink on foam, sea for action, coral and sun as rare accents.
   Type: Bricolage Grotesque (display), Albert Sans (body), IBM Plex Mono (data). */

:root {
  /* Dark Premium Fintech palette */
  --bg: #07090e;                              /* near-black page, cool tint */
  --surface: #0d111a;                         /* base card */
  --surface-2: #121829;                       /* raised / alt section */
  --surface-3: #182036;                       /* hover / highest */
  --line: rgba(148, 163, 184, 0.1);           /* hairline border */
  --line-strong: rgba(148, 163, 184, 0.22);   /* hover border */
  --text: #e7eaf2;                            /* off-white, never pure white */
  --muted: #8a93a8;
  --accent-a: #8b5cf6;                        /* violet — gradient start */
  --accent-b: #38bdf8;                        /* electric blue — gradient end */
  --good: #34d399;
  --bad:  #f87171;
  --warn: #fbbf24;

  /* Legacy names remapped to dark values so existing component rules
     transform without per-rule edits. Later tasks override the few
     spots that need more than a value swap. */
  --ink: var(--text);
  --mist: var(--muted);
  --white: var(--surface);        /* most former-white card fills become base surface */
  --foam: var(--surface-2);       /* former alt/raised fills */
  --sea-tint: var(--surface-3);   /* former tinted fills (active states overridden later) */
  --sea: #818cf8;                 /* solid accent for links / interactive text */
  --sea-deep: #a5b4fc;            /* accent hover */
  --coral: var(--bad);
  --sun: var(--accent-b);         /* focus ring */

  --radius: 14px;
  --shadow: 0 12px 40px rgba(2, 4, 10, 0.5);
  --display: "Geist", system-ui, sans-serif;
  --body: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.shell.narrow { max-width: 680px; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }

a { color: var(--sea); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-b);
  outline-offset: 2px;
}

.mono { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--mist); }
.lede { font-size: 1.12rem; color: var(--mist); max-width: 56ch; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.wordmark { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; }
.wordmark-text { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.wordmark-text.small { font-size: 1.1rem; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--sea); }

/* Hero */
.hero { background: transparent; padding: 96px 0 64px; position: relative; overflow: hidden; }
.hero .shell { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }

.hero-search {
  display: flex;
  max-width: 560px;
  margin: 26px 0 18px;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  border: 0;
  padding: 16px 18px;
  font: inherit;
  font-size: 1.05rem;
  background: transparent;
  color: var(--text);
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search button {
  border: 0;
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: #0a0f1e;
  font: inherit;
  font-weight: 600;
  padding: 0 26px;
  cursor: pointer;
  transition: filter .2s ease;
}
.hero-search button:hover { filter: brightness(1.08); }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.chip img { border-radius: 3px; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }

/* Plan picker (chips are built by app.js; without JS all plans show) */
[hidden] { display: none !important; }
.picker { display: grid; gap: 18px; margin-top: 26px; }
.picker-step { display: grid; gap: 10px; }
.picker-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
}
button.chip { cursor: pointer; font-family: var(--body); }
.chip.selected { background: var(--sea); border-color: var(--sea); color: var(--white); }
.chip.selected:hover { color: var(--white); }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--foam); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Country grid */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 14px;
  margin-top: 22px;
}
.country-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.country-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.country-card img { grid-row: 1 / 3; border-radius: 4px; }
.country-name { font-weight: 600; }
.from-price { font-size: 0.88rem; color: var(--mist); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 24px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.step h3 { margin-top: 8px; }
.step p { color: var(--mist); margin-bottom: 0; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { font-weight: 600; cursor: pointer; }
details p { color: var(--mist); }

/* Plan cards */
.crumbs { font-size: 0.9rem; margin-bottom: 14px; color: var(--mist); }
.crumbs a { text-decoration: none; }
.country-head { display: flex; align-items: center; gap: 16px; }
.country-head img { border-radius: 6px; }
.region-title { margin-top: 38px; }
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  margin-top: 22px;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-data { display: flex; align-items: baseline; gap: 6px; }
.plan-speed { margin: -6px 0 0; font-size: 0.88rem; color: var(--mist); }
.plan-badge {
  margin-inline-start: auto;
  align-self: center;
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.data-amount { font-size: 2.5rem; line-height: 1; color: var(--text); }
.data-unit { font-weight: 600; color: var(--mist); }
.plan-meta { display: grid; gap: 6px; margin: 0; }
.plan-meta div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.plan-meta dt { color: var(--mist); }
.plan-meta dd { margin: 0; font-weight: 500; }
.plan-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { font-size: 1.25rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: #0a0f1e;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn.ghost { background: none; color: var(--sea); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-3); filter: none; transform: none; }
.small-btn { padding: 4px 10px; font-size: 0.85rem; }

/* Forms */
.inline-search { display: flex; gap: 10px; max-width: 420px; margin: 18px 0; }
.inline-search input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  background: var(--surface-2);
  color: var(--text);
}
.inline-search input::placeholder { color: var(--muted); }
.inline-search button,
.mock-actions button { font: inherit; }
.inline-search button {
  border: 2px solid var(--sea);
  background: var(--sea);
  color: var(--white);
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
}

.checkout-form { display: flex; flex-direction: column; gap: 8px; margin-top: 26px; }
.checkout-form label { font-weight: 600; }
.checkout-form input[type="email"] {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  font: inherit;
  background: var(--surface-2);
  color: var(--text);
}
.checkout-form input[type="email"]::placeholder { color: var(--muted); }
.checkout-form input[type="email"]:focus { border-color: var(--accent-b); }
.checkout-form input[type="text"] {
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 1.05rem; outline: none;
  background: var(--surface-2); color: var(--text);
}
.checkout-form input[type="text"]:focus { border-color: var(--accent-b); }
.btn-link {
  background: none; border: none; padding: 0; color: var(--sea);
  text-decoration: underline; cursor: pointer; font-size: 0.95rem;
  align-self: flex-start;
}
.field-hint { font-size: 0.88rem; color: var(--mist); margin: 2px 0 14px; }
.checkout-form fieldset { border: 0; padding: 0; margin: 8px 0 14px; display: grid; gap: 10px; }
.checkout-form legend { font-weight: 600; padding: 0 0 8px; }
.pay-option {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.pay-option:has(input:checked) { border-color: var(--accent-b); background: rgba(56,189,248,0.08); }
.pay-option input { margin-top: 4px; accent-color: var(--accent-b); }
.form-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--bad);
  color: #fca5a5;
  border-radius: 10px;
  padding: 12px 16px;
}

.summary-card {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, rgba(19,24,38,0.78), rgba(13,17,26,0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 80px rgba(2,4,10,0.6);
}
.summary-card .data-amount { font-size: 1.9rem; }
.summary-text { display: flex; flex-direction: column; flex: 1; }
.mock-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Order page */
.progress-bar {
  height: 4px; max-width: 600px; margin: 26px 0;
  background: var(--surface-2); border-radius: 999px; overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  animation: indeterminate 1.6s ease-in-out infinite;
}
@keyframes indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.activation { display: grid; grid-template-columns: auto 1fr; gap: 30px; margin-top: 26px; align-items: start; }
.qr-box { margin: 0; text-align: center; }
.qr-box img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 10px; max-width: 100%; height: auto; }
.qr-box figcaption { font-size: 0.85rem; color: var(--mist); max-width: 240px; margin: 8px auto 0; }
.activation-steps ol { padding-inline-start: 20px; color: var(--mist); }
.activation-steps li { margin-bottom: 8px; }
.usage-out { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-family: var(--mono); font-size: 0.92rem; font-variant-numeric: tabular-nums; color: var(--text); }
.empty-state { color: var(--mist); margin-top: 24px; }

/* Admin */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 20px 0; }
.stat { background: var(--foam); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mist); }
.stat-value { font-size: 1.3rem; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 10px 0 30px; }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 8px;
  margin-inline-start: 6px;
  vertical-align: middle;
}
.badge.st-fulfilled { background: rgba(52, 211, 153, 0.15); color: var(--good); }
.badge.st-needs_attention { background: rgba(248, 113, 113, 0.15); color: var(--bad); }
.badge.st-pending_payment { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.orders-table tbody tr { transition: background-color .15s ease; }
.orders-table tbody tr:hover { background-color: var(--surface-2); }
.inline-form { display: inline; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--foam); margin-top: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 30px;
  padding: 38px 22px;
}
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--sea); }
.footer-legal {
  border-top: 1px solid var(--line);
  padding: 16px 22px 22px;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .main-nav { gap: 16px; font-size: 0.92rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .activation { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}

/* Phones */
@media (max-width: 600px) {
  .shell { padding: 0 16px; }
  .section { padding: 38px 0; }

  /* Header: let the nav drop below the logo instead of overflowing. */
  .header-row { flex-wrap: wrap; gap: 4px 18px; padding-top: 12px; padding-bottom: 12px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 10px; }
  .main-nav a { padding: 8px 0; }

  .hero { padding-top: 40px; }
  .hero-search button { padding: 0 18px; }

  /* Checkout: summary wraps, the pay button is full-width for thumbs. */
  .summary-card { flex-wrap: wrap; gap: 10px 16px; }
  .summary-card .price { margin-inline-start: auto; }
  .checkout-form .btn.big { width: 100%; text-align: center; }

  .footer-grid { padding: 30px 16px; }
}

/* Touch devices: comfortable tap targets regardless of screen size. */
@media (pointer: coarse) {
  .chip { padding: 11px 18px; }
  .btn { padding: 12px 20px; }
  .btn.big { padding: 15px 26px; }
  summary { padding: 6px 0; }
}

/* ---- Live chat ---- */

.chat-launcher {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: #0a0f1e;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(2, 4, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transition: filter .2s ease;
}
.chat-launcher:hover { filter: brightness(1.08); }
.chat-launcher.is-open { background: var(--surface-3); color: var(--text); }

.chat-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--coral);
  color: var(--white);
  font: 600 0.75rem/20px var(--body);
  text-align: center;
}
.chat-badge.inline { position: static; display: inline-block; margin-inline-start: 8px; }

.chat-panel {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 88px;
  width: min(360px, calc(100vw - 32px));
  height: min(480px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(2, 4, 10, 0.5);
  z-index: 60;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.chat-header-btns { display: flex; gap: 6px; }
.chat-icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 10px;
  font: 500 0.85rem var(--body);
  cursor: pointer;
}
.chat-icon-btn:hover { background: rgba(255, 255, 255, 0.3); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--foam);
}
.chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.chat-msg.own { align-self: flex-end; background: linear-gradient(100deg, var(--accent-a), var(--accent-b)); color: #0a0f1e; border-bottom-right-radius: 4px; }
.chat-msg.other { align-self: flex-start; background: var(--surface-3); color: var(--text); border-bottom-left-radius: 4px; }

.chat-notice { margin: 0; padding: 10px 14px; font-size: 0.9rem; color: var(--mist); }

.chat-form { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--white); }
.chat-name {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 400 0.95rem var(--body);
  background: var(--surface-2);
  color: var(--text);
}
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input {
  flex: 1;
  resize: none;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 400 0.95rem var(--body);
  max-height: 110px;
  background: var(--surface-2);
  color: var(--text);
}
.chat-send { padding: 9px 16px; }
.chat-again { margin: 0 14px 12px; }

/* Agent console */
.chat-console {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: min(640px, calc(100vh - 220px));
  background: var(--white);
}
.chat-conv-list { border-inline-end: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.chat-conv-list > .muted { padding: 8px; }
.chat-conv {
  display: block;
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.chat-conv:hover { background: var(--foam); }
.chat-conv.is-active { background: rgba(56, 189, 248, 0.1); }
.chat-conv.is-closed { opacity: 0.6; }
.chat-conv-top { display: flex; align-items: center; justify-content: space-between; }
.chat-conv-preview, .chat-conv-when { display: block; font-size: 0.85rem; }

.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.chat-thread .chat-messages { background: var(--white); }
.chat-thread .chat-form { border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .chat-console { grid-template-columns: 1fr; height: auto; }
  .chat-conv-list { border-inline-end: none; border-bottom: 1px solid var(--line); max-height: 220px; }
  .chat-thread .chat-messages { min-height: 260px; }
}

/* Admin orders: stacked cards on phones instead of a side-scrolling table */
@media (max-width: 720px) {
  .orders-table thead { display: none; }
  .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; }
  .orders-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--foam);
    padding: 6px 14px;
    margin-bottom: 12px;
  }
  .orders-table td {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: none;
    overflow-wrap: anywhere;
  }
  .orders-table td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mist);
  }
  .orders-table td:empty { display: none; }
  .orders-table td.row-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .orders-table td.row-actions::before { content: none; }
}

/* Coverage disclosure on plan cards */
.coverage-toggle {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.coverage-toggle:hover { color: var(--sea-deep); }
.coverage-panel {
  margin: 4px 0 10px;
  padding: 10px 12px;
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--mist);
  max-height: 220px;
  overflow-y: auto;
}
.coverage-list-items {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 18px;
}
.coverage-list-items li { break-inside: avoid; padding: 1px 0; color: var(--ink); }
@media (min-width: 600px) {
  .coverage-list-items { columns: 3; }
}
.coverage-more {
  position: sticky;
  bottom: -10px;  /* flush with the panel edge despite its padding */
  margin: 0 -12px -10px;
  padding: 18px 0 5px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--mist);
  background: linear-gradient(to bottom, rgba(18, 24, 41, 0), var(--surface-2) 55%);
  pointer-events: none;
  transition: opacity 0.15s;
}
.coverage-more.is-hidden { opacity: 0; }

/* Reseller conditions note on plan cards (other_info) */
.plan-conditions { margin: 4px 0 10px; font-size: 0.88rem; }
.plan-conditions summary {
  list-style: none;
  width: fit-content;
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.plan-conditions summary::-webkit-details-marker { display: none; }
.plan-conditions summary::after { content: " \25BE"; text-decoration: none; }
.plan-conditions[open] summary::after { content: " \25B4"; }
.plan-conditions p {
  margin: 6px 0 0;
  padding: 10px 12px;
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}

/* ---- Dark fintech utilities ---- */

.grad-text {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-bg { background: linear-gradient(100deg, var(--accent-a), var(--accent-b)); }

.glass {
  background: linear-gradient(180deg, rgba(19,24,38,0.78), rgba(13,17,26,0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 80px rgba(2,4,10,0.6);
}

.hero-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-glow::before {
  content: ""; position: absolute; width: 60rem; height: 60rem;
  left: 50%; top: -34rem; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(139,92,246,0.16), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-glow::after {
  content: ""; position: absolute; width: 44rem; height: 44rem;
  inset-inline-end: -16rem; top: -10rem;
  background: radial-gradient(closest-side, rgba(56,189,248,0.1), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translateX(-54%) translateY(0); }
  to   { transform: translateX(-46%) translateY(2rem); }
}

.rise { opacity: 0; transform: translateY(10px);
  animation: rise 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.card-hover { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card-hover:hover { border-color: var(--line-strong); }
.row-hover { transition: background-color .15s ease, border-color .15s ease; }
.row-hover:hover { background-color: var(--surface-2); }

.pulse-dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .rise, .hero-glow::before, .hero-glow::after, .pulse-dot { animation: none; }
  .rise { opacity: 1; transform: none; }
}

/* ---- Legal documents (terms / privacy) ---- */
.legal { padding-bottom: 8px; }
.legal .updated { margin: -6px 0 22px; font-size: 0.9rem; }
.legal h2 { margin-top: 1.9em; font-size: 1.3rem; }
.legal h3 { margin-top: 1.3em; font-size: 1.05rem; }
.legal p { max-width: 70ch; }
.legal ul { margin: 0 0 1em; padding-inline-start: 1.2em; max-width: 70ch; }
.legal li { margin: 5px 0; }
.legal a { color: var(--sea); }

/* Crypto-discount callout (hero) */
.crypto-note {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.crypto-note strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Guides: article prose + index cards */
.prose .updated { margin: -6px 0 22px; font-size: 0.9rem; }
.prose h2 { margin-top: 1.9em; font-size: 1.3rem; }
.prose h3 { margin-top: 1.3em; font-size: 1.05rem; }
.prose p { max-width: 70ch; }
.prose ul, .prose ol { max-width: 70ch; padding-inline-start: 1.2em; margin: 0 0 1em; }
.prose li { margin: 6px 0; }
.prose a:not(.btn) { color: var(--sea); }   /* text links accent; leave .btn alone */
.prose .btn { margin: 8px 10px 0 0; }
.guide-list { display: grid; gap: 14px; margin-top: 26px; }
.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
}
.guide-card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.guide-card p { margin: 0; }

/* ---- Per-language fonts (Geist has no Cyrillic/Arabic) ----
   Override the real sans tokens (--display headings, --body text); --mono
   stays Geist Mono and falls back to ui-monospace for ar/ru codes. */
html[data-lang="ar"] {
  --display: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}
html[data-lang="ru"] {
  --display: "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

/* ---- Language switcher ---- */
.lang-switcher { position: relative; margin-inline-start: 12px; }
.lang-switcher > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; color: var(--muted); font-size: 0.9rem; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px;
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary:hover { color: var(--text); border-color: var(--line-strong); }
.lang-menu {
  position: absolute; inset-inline-end: 0; margin-top: 6px; min-width: 150px;
  list-style: none; padding: 6px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; z-index: 50;
}
.lang-menu a {
  display: block; padding: 8px 10px; border-radius: 8px; color: var(--text);
  text-decoration: none; font-size: 0.92rem;
}
.lang-menu a:hover { background: var(--surface-3); }
.lang-menu a[aria-current="true"] { color: var(--accent-b); }

/* ---- Language suggestion banner ---- */
.lang-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 8px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.lang-banner-link { color: var(--accent-b); text-decoration: none; font-weight: 500; }
.lang-banner-link:hover { text-decoration: underline; }
.lang-banner-dismiss {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 4px;
}
.lang-banner-dismiss:hover { color: var(--text); }
