[hidden] { display: none !important; }

/* Brand tokens — pulled from the live revenant-global storefront's style.css
   (--bg / --accent / --font-display etc. use the same names and values as
   /var/www/revenant-global/dist/style.css so a future palette tweak on the
   homepage can be mirrored here by copying values, not re-deriving them).
   --panel / --line / --ok / --warn / --bad are this app's own names, kept so
   checkout.js / portal.js and portal.css don't need to change, but pointed at
   brand-accurate colors instead of the old generic dark-UI defaults. */
:root {
  color-scheme: dark;
  --bg: #04050a;
  --bg-raised: #080b13;
  --panel: #0e111e;
  --surface-solid: #0e111e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 140, 44, 0.55);
  --text: #f7f8fc;
  --text-soft: #cad1df;
  --muted: #98a4b8;
  --accent: #ff6d00;
  --accent-light: #ffad4d;
  --accent-text: #100a04;
  --gold: #ffd76a;
  --cyan: #57d9ff;
  --green: #55e7a5;
  --violet: #9667ff;
  --ok: #55e7a5;
  --warn: #ffd76a;
  --bad: #ff5d73;
  --font-display: "Arial Black", "Segoe UI Black", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

::selection { background: var(--accent); color: #080808; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 0%, rgba(150, 103, 255, 0.14), transparent 32rem),
    radial-gradient(circle at 10% 15%, rgba(255, 109, 0, 0.12), transparent 34rem),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }

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

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

/* ── Brand mark ──────────────────────────────────────────────────────────
   Same markup pattern as the homepage header, so this reads as the same
   product instead of a generic payment form bolted onto it. */
.wordmark {
  width: max-content;
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--text);
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 196, 123, 0.45), transparent 26%),
    rgba(255, 109, 0, 0.08);
  color: var(--accent-light);
  font-size: 0.9rem;
  box-shadow: inset 0 0 14px rgba(255, 109, 0, 0.2);
}

h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}
h2 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 30px 0 12px;
}
h2:first-child { margin-top: 0; }

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

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card.selected, .method.selected {
  border-color: var(--accent);
  background: linear-gradient(150deg, rgba(255, 109, 0, 0.12), transparent 70%), var(--panel);
  box-shadow: 0 0 0 1px var(--accent), 0 14px 30px rgba(255, 109, 0, 0.18);
}
.card .name { font-weight: 700; }
.card .price { font-family: var(--font-display); font-size: 20px; margin-top: 8px; color: var(--accent-light); }
.card .desc { color: var(--muted); font-size: 13px; margin-top: 6px; }

.methods { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.method {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.method:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.method .title { font-weight: 700; display: flex; align-items: center; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  color: var(--ok);
  margin-left: 6px;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.9; }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.18);
}
input:disabled, textarea:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }

button { font: inherit; }

button.primary {
  margin-top: 22px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 109, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
button.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255, 109, 0, 0.4); }
button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.small {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 109, 0, 0.07);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease;
}
button.small:hover { background: rgba(255, 109, 0, 0.16); border-color: var(--accent-light); }
button.small:disabled { opacity: 0.5; cursor: not-allowed; }

.error { color: var(--bad); margin-top: 12px; min-height: 1.5em; font-size: 13px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.key {
  font: 600 17px/1.4 ui-monospace, Consolas, monospace;
  word-break: break-all;
  padding: 12px 14px;
  border: 1px dashed var(--accent-light);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  margin: 12px 0;
}
pre.instructions {
  white-space: pre-wrap;
  font: 14px/1.6 ui-monospace, Consolas, monospace;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text-soft);
}
.ref {
  font: 700 22px/1.3 ui-monospace, Consolas, monospace;
  letter-spacing: 2px;
  color: var(--accent-light);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text-soft); }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table-wrap { overflow-x: auto; }

/* Status / state colors. "status-<value>" is applied to whatever element the
   JS happens to build: a <td> in account.html's own order table, a full
   sentence <p> banner in success.html, or a <span> from portal.js's pill()
   helper. Only the plain-color rule is safe on all three — a <td> or <p>
   can't take display:inline-flex without corrupting table layout or turning
   a sentence into a badge — so the pill/badge look below is scoped to spans
   only, which is exactly what pill() and account.html's license-state span
   produce on purpose. */
[class^="status-"] { font-weight: 700; }
.status-active, .status-paid { color: var(--ok); }
.status-lapsed, .status-awaiting, .status-pending, .status-canceling { color: var(--warn); }
.status-revoked, .status-refunded, .status-disputed, .status-failed, .status-canceled { color: var(--bad); }

span[class^="status-"] {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
span.status-active, span.status-paid {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
span.status-lapsed, span.status-awaiting, span.status-pending, span.status-canceling {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}
span.status-revoked, span.status-refunded, span.status-disputed, span.status-failed, span.status-canceled {
  background: color-mix(in srgb, var(--bad) 18%, transparent);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, transparent);
}

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* Multiple inline actions in one line of text (e.g. "Update payment method" +
   "Cancel auto-renew" on the licenses list) need a gap; buttons/links have no
   margin by default and would otherwise touch. */
p.muted button.small, p.muted a { margin: 4px 6px 4px 0; display: inline-block; }

/* Subscriptions / One-Time segmented tab control (checkout.js: #tab-sub /
   #tab-onetime). Same pill vocabulary as button.small / .card.selected —
   an active tab reads as "selected", not just "different". */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.tab:hover:not(.active) { color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--accent-text);
  box-shadow: 0 8px 20px rgba(255, 109, 0, 0.28);
}
.tab:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.empty-note { padding: 4px 2px 0; }

@media (max-width: 480px) {
  main { padding: 20px 12px 48px; }
  h1 { font-size: 20px; }
  .grid, .methods { grid-template-columns: 1fr; }
  .tab { padding: 10px 8px; font-size: 12px; }
}
