/* ---------- tokens ---------- */
:root {
  --red: #c4122f;
  --red-deep: #7a0a1e;
  --red-soft: #fbe9ec;
  --gold: #f5b400;
  --ink: #17151a;
  --ink-2: #4b4750;
  --ink-3: #8a8591;
  --line: #e6e4ea;
  --mist: #f4f4f6;
  --paper: #ffffff;
  --green: #1a8a4a;
  --green-soft: #e4f5ea;
  --amber-soft: #fff3d6;
  --amber: #a56b00;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(23, 21, 26, 0.10);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--red-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover:not(:disabled) { background: var(--red-soft); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; }

/* ---------- forms ---------- */
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.input, select.input, textarea.input {
  width: 100%; padding: 0.75rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color 0.15s;
}
.input:focus { border-color: var(--ink); outline: none; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.input-prefix:focus-within { border-color: var(--ink); }
.input-prefix span { display: flex; align-items: center; padding: 0 0.85rem; background: var(--mist); color: var(--ink-2); font-weight: 600; border-right: 1.5px solid var(--line); }
.input-prefix input { flex: 1; border: 0; padding: 0.75rem 0.9rem; min-width: 0; background: transparent; }
.input-prefix input:focus { outline: none; }
.hint { font-size: 0.8rem; color: var(--ink-3); }
.form-error { background: var(--red-soft); color: var(--red-deep); padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.form-error:empty { display: none; }

/* segmented control (networks) */
.seg { display: flex; gap: 0.35rem; padding: 0.3rem; background: var(--mist); border-radius: 999px; }
.seg button {
  flex: 1; padding: 0.55rem 0.5rem; border: 0; border-radius: 999px; background: transparent;
  font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* bundle chips */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.chip {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.5rem; background: #fff;
  cursor: pointer; text-align: center; display: grid; gap: 0.1rem; transition: border-color 0.15s, background-color 0.15s;
}
.chip strong { font-size: 1.05rem; font-weight: 800; }
.chip span { font-size: 0.8rem; color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); }
.chip[aria-pressed="true"] span { color: var(--red-deep); }

/* ---------- cards / badges / tables ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-processing { background: #e6efff; color: #1d4ed8; }
.badge-delivered { background: var(--green-soft); color: var(--green); }
.badge-failed { background: var(--red-soft); color: var(--red); }
.badge-refunded { background: var(--mist); color: var(--ink-2); }
.badge-net { background: var(--mist); color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-3); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- toast + modal ---------- */
.toast-host { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: 0.5rem; z-index: 100; width: min(420px, calc(100% - 2rem)); }
.toast { background: var(--ink); color: #fff; padding: 0.8rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 0.92rem; }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(23,21,26,0.55); display: grid; place-items: center; padding: 1rem; z-index: 90; }
.modal { background: #fff; border-radius: var(--radius); width: min(460px, 100%); padding: 1.5rem; display: grid; gap: 1rem; box-shadow: var(--shadow); }
.modal h3 { font-size: 1.25rem; }
.momo-prompt { background: var(--ink); color: #fff; border-radius: var(--radius-sm); padding: 1rem; font-family: ui-monospace, monospace; font-size: 0.85rem; white-space: pre-wrap; line-height: 1.6; }

/* ---------- public site ---------- */
.topbar { background: var(--ink); color: #fff; font-size: 0.8rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; }
.topbar a { text-decoration: none; opacity: 0.85; }
.nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.03em; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--red); display: grid; place-items: center; color: #fff; }
.nav-links { display: flex; gap: 1.25rem; margin-left: 0.5rem; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; gap: 0.5rem; }
@media (max-width: 720px) { .nav-links { display: none; } }

.hero { background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 60%, #d92d48 100%); color: #fff; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; right: -8%; top: -20%; width: 55vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%; border: 90px solid rgba(255,255,255,0.06); pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; padding: 4rem 0; position: relative; z-index: 1; }
.hero p.lead { font-size: 1.15rem; opacity: 0.92; max-width: 34ch; margin-top: 1rem; }
.hero-proof { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-proof div strong { display: block; font-size: 1.4rem; font-weight: 800; }
.hero-proof div span { font-size: 0.85rem; opacity: 0.85; }
.quickbuy { background: #fff; color: var(--ink); border-radius: 20px; padding: 1.5rem; display: grid; gap: 1rem; box-shadow: 0 30px 60px rgba(60,0,10,0.35); }
.quickbuy h3 { font-size: 1.2rem; }
.quickbuy-tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--line); }
.quickbuy-tabs button { background: none; border: 0; padding: 0.4rem 0 0.7rem; font-weight: 700; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.quickbuy-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.quickbuy-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 0.5rem; border-top: 1px dashed var(--line); }
.quickbuy-total strong { font-size: 1.4rem; font-weight: 800; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding: 2.5rem 0; } .hero::after { display: none; } }

.section { padding: 4rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head p { max-width: 52ch; }
.section.alt { background: var(--mist); }

.net-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.net-tabs button { padding: 0.55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.net-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.bundle { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 0.6rem; position: relative; }
.bundle .size { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.bundle .price { font-size: 1.15rem; font-weight: 800; color: var(--red); }
.bundle .best { position: absolute; top: -0.6rem; right: 1rem; background: var(--gold); color: var(--ink); font-size: 0.72rem; font-weight: 800; padding: 0.2rem 0.6rem; border-radius: 999px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { display: grid; gap: 0.5rem; }
.step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--red); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-top: 0.5rem; color: var(--ink-2); max-width: 70ch; }

footer { background: var(--ink); color: #fff; padding: 3rem 0 1.5rem; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
footer a { text-decoration: none; opacity: 0.8; display: block; margin-bottom: 0.4rem; }
footer a:hover { opacity: 1; }
footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1rem; font-size: 0.8rem; opacity: 0.6; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--red-deep), var(--red)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 2.2rem; max-width: 14ch; }
.auth-main { display: grid; place-items: center; padding: 2rem; }
.auth-form { width: min(400px, 100%); display: grid; gap: 1rem; }
.auth-form h1 { font-size: 1.8rem; }
@media (max-width: 800px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- portal layout ---------- */
.portal { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--ink) 240px, var(--mist) 240px); }
.side { background: var(--ink); color: #fff; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.side .logo { color: #fff; }
.side nav { display: grid; gap: 0.2rem; }
.side nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.8rem; border-radius: var(--radius-sm); text-decoration: none; color: rgba(255,255,255,0.75); font-weight: 600; }
.side nav a svg { width: 18px; height: 18px; }
.side nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.side nav a.active { background: var(--red); color: #fff; }
.side .me { margin-top: auto; font-size: 0.85rem; display: grid; gap: 0.5rem; }
.portal > div { min-width: 0; }
.main { padding: 1.5rem; display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.card, .two-col > *, .buy-layout > * { min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: 0.2rem; }
.stat .label { font-size: 0.85rem; color: var(--ink-3); }
.stat .value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.stat.hero-stat { background: var(--red); color: #fff; border: 0; }
.stat.hero-stat .label { color: rgba(255,255,255,0.8); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; }
.mobile-nav { display: none; }
@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; background: var(--mist); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; }
  .side nav, .side .me { display: none; }
  .mobile-nav { display: flex; gap: 0.3rem; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0.5rem 0.75rem; }
  .mobile-nav a { padding: 0.45rem 0.8rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.85rem; white-space: nowrap; color: var(--ink-2); }
  .mobile-nav a.active { background: var(--red); color: #fff; }
  .two-col { grid-template-columns: 1fr; }
  .main { padding: 1rem; }
}
.buy-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .buy-layout { grid-template-columns: 1fr; } }
.summary-row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.95rem; }
.summary-row + .summary-row { border-top: 1px solid var(--line); }
.pay-options { display: grid; gap: 0.5rem; }
.pay-option { display: flex; gap: 0.75rem; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pay-option input { accent-color: var(--red); }
.bars { display: flex; align-items: end; gap: 0.5rem; height: 120px; }
.bars div { flex: 1; background: var(--red); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.bars div span { position: absolute; bottom: -1.3rem; left: 0; right: 0; text-align: center; font-size: 0.7rem; color: var(--ink-3); }
.row-actions { display: flex; gap: 0.4rem; }
.switch { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

/* ---------- legal pages (privacy, refunds, terms) ---------- */
.legal-head { background: var(--mist); border-bottom: 1px solid var(--line); padding: 3rem 0 2rem; }
.legal-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-head p { color: var(--ink-3); margin-top: 0.5rem; }
.legal { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding: 3rem 0 4rem; }
.legal-toc { position: sticky; top: 88px; align-self: start; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.legal-toc a { text-decoration: none; color: var(--ink-2); padding: 0.3rem 0.6rem; border-radius: var(--radius-sm); }
.legal-toc a:hover { background: var(--mist); color: var(--ink); }
.legal-body { max-width: 72ch; }
.legal-body h2 { font-size: 1.35rem; margin-top: 2.25rem; scroll-margin-top: 90px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.legal-body p, .legal-body li { color: var(--ink-2); line-height: 1.65; margin-top: 0.75rem; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; margin: 0; }
.legal-body li { margin-top: 0.4rem; }
.legal-body a { color: var(--red); }
.legal-body table { margin-top: 1rem; font-size: 0.95rem; }
.legal-body td, .legal-body th { white-space: normal; }
.legal-note { background: var(--red-soft); color: var(--red-deep); border-radius: var(--radius-sm); padding: 0.9rem 1rem; margin-top: 1rem; font-size: 0.95rem; }
.legal-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
@media (max-width: 800px) { .legal { grid-template-columns: 1fr; gap: 1.5rem; } .legal-toc { position: static; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
