:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --panel: #11151b;
  --panel-2: #171c24;
  --line: #29313d;
  --text: #f6f8fb;
  --muted: #98a3b3;
  --accent: #c7ff42;
  --accent-ink: #111703;
  --danger: #ff6b72;
  --radius: 18px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 7%, rgba(199, 255, 66, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
nav { display: flex; gap: 26px; align-items: center; }
nav > a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav > a:hover { color: var(--text); }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.55; transform: none; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-secondary { border-color: var(--line); background: var(--panel-2); color: var(--text); }
.button-quiet { border-color: var(--line); background: transparent; color: var(--text); }

main { overflow: hidden; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(44px, 8vw, 120px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 80px clamp(20px, 7vw, 108px);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(54px, 8vw, 110px);
  line-height: 0.93;
  letter-spacing: -0.065em;
}
.hero-lead {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.hero-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(23, 28, 36, 0.95), rgba(14, 17, 23, 0.95));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}
.signal {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(199, 255, 66, 0.28);
  border-radius: 999px;
  padding: 7px 11px;
  color: #dfff90;
  background: rgba(199, 255, 66, 0.07);
  font-size: 12px;
}
.signal span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}
.hero-panel ol { margin: 24px 0 0; padding: 0; list-style: none; }
.hero-panel li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.hero-panel li strong { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; }

.section { padding: 100px clamp(20px, 7vw, 108px); }
.section-heading {
  display: flex;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 42px;
}
.section-heading h2, .account-heading h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.045em;
}
.section-heading > p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.package-card, .skeleton-card {
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.skeleton-card {
  background: linear-gradient(110deg, var(--panel) 25%, var(--panel-2) 45%, var(--panel) 65%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position-x: -200%; } }
.package-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
}
.package-card.featured { border-color: rgba(199, 255, 66, 0.5); }
.package-card .edition { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.package-card h3 { margin: 14px 0 8px; font-size: 25px; }
.package-card .description { min-height: 70px; color: var(--muted); line-height: 1.5; }
.package-card .price { margin: 22px 0 4px; font-size: 33px; font-weight: 850; letter-spacing: -0.04em; }
.package-card .term { color: var(--muted); font-size: 13px; }
.package-card ul { flex: 1; margin: 24px 0; padding: 0; list-style: none; }
.package-card li { margin: 10px 0; color: #d2d8e2; font-size: 14px; }
.package-card li::before { margin-right: 9px; color: var(--accent); content: "•"; }
.empty-state { grid-column: 1 / -1; padding: 45px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.process { background: #0e1116; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.process-grid article { min-height: 230px; padding: 28px 26px 28px 0; border-right: 1px solid var(--line); }
.process-grid article:not(:first-child) { padding-left: 26px; }
.process-grid article:last-child { border-right: 0; }
.process-grid span { color: var(--accent); font-size: 12px; font-weight: 800; }
.process-grid h3 { margin: 45px 0 10px; }
.process-grid p { margin: 0; color: var(--muted); line-height: 1.6; }

.account-shell {
  position: fixed;
  z-index: 40;
  inset: 24px;
  max-width: 980px;
  max-height: calc(100vh - 48px);
  margin-left: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 48px);
  background: rgba(17, 21, 27, 0.98);
  box-shadow: -30px 0 100px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
}
.account-heading { display: flex; align-items: start; justify-content: space-between; }
.account-heading h2 { font-size: clamp(32px, 5vw, 52px); }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: 25px;
}
.auth-tabs { display: flex; gap: 20px; margin: 42px 0 24px; border-bottom: 1px solid var(--line); }
.auth-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}
.auth-tabs button.active { border-bottom-color: var(--accent); color: var(--text); }
.form-stack { display: grid; gap: 18px; max-width: 520px; }
.form-stack label { display: grid; gap: 8px; color: #dce1e9; font-size: 13px; font-weight: 700; }
.form-stack input {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  outline: none;
  background: #0c0f14;
  color: var(--text);
}
.form-stack input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(199, 255, 66, 0.1); }
.form-hint { margin: -7px 0 0; color: var(--muted); font-size: 12px; }
.form-stack h3 { margin: 0; font-size: 24px; }
.text-button {
  justify-self: start;
  border: 0;
  padding: 2px 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}
.customer-summary, .account-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 38px;
}
.customer-summary { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.customer-summary small, .customer-summary strong, .customer-summary span { display: block; }
.customer-summary small, .customer-summary span { color: var(--muted); }
.customer-summary strong { margin: 5px 0; font-size: 23px; }
.account-toolbar h3 { margin: 0; font-size: 24px; }
.account-toolbar p { margin: 5px 0 0; color: var(--muted); }
.device-activation {
  margin-top: 26px;
  border: 1px solid rgba(199, 255, 66, 0.26);
  border-radius: 16px;
  padding: 22px;
  background: rgba(199, 255, 66, 0.035);
}
.device-activation .account-toolbar { margin-top: 0; }
.device-code-form { margin-top: 18px; }
.device-code-form > label, .device-review > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.device-code-form > div { display: flex; gap: 9px; }
.device-code-form input, .device-review select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--text);
  background: #0c0f14;
}
.device-code-form input {
  width: min(260px, 100%);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
}
.device-review { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.device-review dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.device-review dl div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #0c0f14; }
.device-review dt { color: var(--muted); font-size: 11px; }
.device-review dd { margin: 6px 0 0; word-break: break-word; font-size: 13px; }
.device-review select { width: 100%; }
.device-return {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.device-return p { flex: 1 1 280px; margin: 0; color: var(--muted); }
.offline-activation {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.offline-form, .offline-response { display: grid; gap: 12px; }
.offline-form label, .offline-response label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.offline-form textarea, .offline-response textarea, .offline-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0f14;
  color: var(--text);
  padding: 11px 12px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.offline-form textarea, .offline-response textarea {
  resize: vertical;
  overflow-wrap: anywhere;
}
.offline-response {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #0d1015;
}
.offline-response p { margin: 0; color: var(--muted); font-size: 12px; }
.license-list { display: grid; gap: 12px; margin-top: 20px; }
.customer-license-card { border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: #0d1015; }
.customer-license-card header { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.customer-license-card h4 { margin: 0 0 6px; font-size: 18px; }
.customer-license-card p { margin: 0; color: var(--muted); font-size: 13px; }
.device-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 13px; border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: 12px; }
.session-list { display: grid; gap: 10px; margin-top: 18px; }
.session-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #0d1015;
}
.session-row strong, .session-row span { display: block; }
.session-row span { margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.bill-list { display: grid; gap: 12px; margin-top: 25px; }
.bill-card { border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: #0d1015; }
.bill-top { display: flex; gap: 14px; align-items: start; justify-content: space-between; }
.bill-code { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.bill-card h4 { margin: 7px 0; font-size: 18px; }
.bill-meta { color: var(--muted); font-size: 13px; }
.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-confirmed { border-color: rgba(199, 255, 66, 0.45); color: var(--accent); }
.status-rejected, .status-cancelled { color: var(--danger); }
.beneficiary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; border-top: 1px solid var(--line); padding-top: 16px; }
.beneficiary div { color: var(--muted); font-size: 12px; }
.beneficiary strong { display: block; margin-top: 4px; color: var(--text); font-size: 14px; }
.bill-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bill-actions input { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--text); background: var(--panel-2); }
.notice { margin-top: 20px; border: 1px solid rgba(199, 255, 66, 0.25); border-radius: 12px; padding: 13px 15px; color: #e4fcb0; background: rgba(199, 255, 66, 0.06); }
.notice.error { border-color: rgba(255, 107, 114, 0.35); color: #ffb6ba; background: rgba(255, 107, 114, 0.07); }

/* portal-auth-balance-v1 */
.account-shell:not(.is-authenticated) {
  inset: clamp(14px, 6vh, 64px) clamp(14px, 5vw, 72px);
  width: min(620px, calc(100vw - 28px));
  max-width: 620px;
  max-height: min(760px, calc(100vh - 28px));
  margin: auto;
  padding: clamp(24px, 4vw, 40px);
}
.account-shell:not(.is-authenticated) .account-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
}
.account-shell:not(.is-authenticated) .auth-tabs { margin-top: 30px; }
.account-shell:not(.is-authenticated) .form-stack { max-width: none; }
.auth-tabs button,
.form-stack label,
.form-hint,
.device-code-form > label,
.device-review > label,
.device-review dt,
.device-review dd,
.offline-form label,
.offline-response label,
.offline-response p,
.customer-license-card p,
.device-row,
.session-row span,
.bill-meta,
.beneficiary div,
.status,
.notice { font-size: 14px; }
.button,
.text-button,
.auth-tabs button { min-height: 44px; }
.form-stack input,
.device-code-form input,
.device-review select,
.offline-form select { min-height: 48px; }
.offline-form textarea,
.offline-response textarea { font-size: 14px; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px clamp(20px, 7vw, 108px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  nav > a { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-panel { max-width: 620px; }
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-header { padding: 12px 16px; }
  .brand small { display: none; }
  .hero, .section { padding: 64px 18px; }
  h1 { font-size: 52px; }
  .hero-actions, .section-heading, .customer-summary, .account-toolbar, footer { align-items: stretch; flex-direction: column; }
  .package-grid, .process-grid { grid-template-columns: 1fr; }
  .process-grid article, .process-grid article:not(:first-child) { min-height: auto; border-right: 0; padding: 24px 0; }
  .process-grid h3 { margin-top: 22px; }
  .account-shell { inset: 8px; max-height: calc(100vh - 16px); padding: 22px 18px; }
  .beneficiary { grid-template-columns: 1fr; }
  .device-code-form > div, .device-review dl { grid-template-columns: 1fr; flex-direction: column; }
  .device-code-form input { width: 100%; }
}

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