/* TPay web app.
 *
 * Ported from the ACCEPTED design: website/mockups/tpay-57.6/index.html (16 Sep 2026).
 * The previous stylesheet was a light, cream-coloured store; the accepted TPay identity is
 * the dark navy/violet field with the gold gradient wordmark, so that is what ships.
 *
 * Mobile-first. The accepted design is a single 460px column, which is already the phone
 * layout; desktop keeps that column centred rather than stretching cards to full width.
 */

:root {
  --bg: #060B18;
  --surface: #101A3A;
  --surface-hi: #16224A;
  --border: #243566;
  --border-gold: rgba(242, 206, 99, .30);
  --text: #EAF0FA;
  --silver: #D7E0EC;
  --muted: #93A3C9;
  --gold: #F2CE63;
  --gold-hi: #FFE9A3;
  --gold-lo: #B98B22;
  --violet: #6A57E0;
  --danger: #FF8A80;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(900px 520px at 50% -150px, rgba(106, 87, 224, .32) 0%, rgba(106, 87, 224, 0) 70%),
    radial-gradient(620px 380px at 88% 6%, rgba(60, 90, 200, .18) 0%, rgba(60, 90, 200, 0) 70%),
    var(--bg);
  background-attachment: scroll;
  min-height: 100vh;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: #1B1405; padding: 10px 16px; border-radius: 0 0 8px 0;
  font-weight: 700; z-index: 20;
}
.skip:focus { left: 0; top: 0; }

/* The accepted design is one narrow column. Desktop centres it rather than widening it. */
.wrap { max-width: 460px; margin: 0 auto; padding: 0 18px; width: 100%; }
#view { padding-bottom: 60px; outline: none; }
#banner:not(:empty) { padding-top: 18px; }

/* ---- header / nav ---- */
.site-header { padding: 18px 0 0; }
.masthead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.masthead .brand-link {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; text-decoration: none;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 46%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.nav a, .linkish {
  color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 600;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav a.active, .linkish:hover { color: var(--gold); }

/* ---- brand block (home) ---- */
.brand { display: flex; align-items: center; gap: 14px; margin: 24px 0 4px; }
.brand img {
  width: 78px; height: 78px; flex: none; display: block;
  filter: drop-shadow(0 0 18px rgba(106, 87, 224, .55));
}
.brand h1 {
  margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: -.015em;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 46%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .sub { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }

.rule {
  height: 1px; margin: 18px 0 14px;
  background: linear-gradient(90deg, transparent, var(--border-gold) 22%, var(--border-gold) 78%, transparent);
}
.crumb {
  color: var(--muted); font-size: .78rem; letter-spacing: .09em;
  text-transform: uppercase; margin: 0 0 13px;
}
.lead { color: var(--silver); font-size: .96rem; margin: 6px 0 14px; }

/* ---- suite grouping ---- */
.suite {
  margin: 24px 0 9px; font-size: .73rem; font-weight: 800; color: var(--gold);
  letter-spacing: .17em; text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.suite::after { content: ""; flex: 1; height: 1px; background: var(--border-gold); }
.suite:first-of-type { margin-top: 4px; }

/* ---- app rows ---- */
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu-item {
  width: 100%; margin: 0; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 16px; text-align: left; text-decoration: none;
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  color: var(--text); font: inherit; font-weight: 650; font-size: 1.05rem;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
a.menu-item { cursor: pointer; }
a.menu-item:hover {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, #1B2A58, var(--surface-hi));
}
.menu-item .label { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.menu-arrow { color: var(--gold); font-size: 1.3rem; font-weight: 400; flex: none; }
.menu-item.wip { opacity: .78; }
.menu-item.wip .menu-arrow { color: var(--muted); }
.menu-item.free { opacity: .92; }

/* ---- status badges ---- */
.badge {
  display: inline-block; font-size: .63rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid; white-space: nowrap;
}
.badge.paid { color: var(--gold); border-color: rgba(242, 206, 99, .55); background: rgba(242, 206, 99, .11); }
.badge.free { color: var(--silver); border-color: rgba(215, 224, 236, .40); background: rgba(215, 224, 236, .07); }
.badge.wip {
  color: var(--muted); border-color: rgba(147, 163, 201, .32); background: rgba(147, 163, 201, .06);
  white-space: normal;
}

/* ---- detail screens ---- */
.topbar { display: flex; align-items: center; gap: 11px; margin: 24px 0 5px; flex-wrap: wrap; }
.back {
  flex: none; width: auto; margin: 0; padding: 9px 15px; cursor: pointer; text-decoration: none;
  background: var(--surface); color: var(--silver); font: inherit; font-size: .9rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
}
.back:hover { border-color: var(--border-gold); color: var(--gold); }
.topbar h2 { margin: 0; font-size: 1.32rem; font-weight: 750; }

.card {
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--border); border-radius: 13px; padding: 17px; margin: 0 0 11px;
}
.card h3 {
  margin: 0; font-size: .8rem; font-weight: 800; color: var(--muted);
  letter-spacing: .11em; text-transform: uppercase;
}
.price {
  font-size: 1.75rem; font-weight: 800; margin: 7px 0 9px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.price .per { font-size: .88rem; font-weight: 600; -webkit-text-fill-color: var(--muted); color: var(--muted); }
/* A price shown for something that cannot be bought must not glitter like an offer. */
.price.muted-price {
  background: none; -webkit-text-fill-color: var(--muted); color: var(--muted); font-size: 1.35rem;
}
.desc { color: var(--silver); font-size: .93rem; margin: 6px 0 0; }

.terms { margin: 8px 0 0; padding: 0; list-style: none; }
.terms li { position: relative; padding-left: 16px; color: var(--silver); font-size: .93rem; margin: 5px 0; }
.terms li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

.buy {
  display: block; width: 100%; margin-top: 14px; padding: 13px; cursor: pointer;
  text-align: center; text-decoration: none;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-lo) 100%);
  color: #1B1405; font: inherit; font-size: 1rem; font-weight: 750;
  border: 0; border-radius: 9px;
}
.buy:hover { filter: brightness(1.07); }

.fine {
  color: var(--muted); font-size: .8rem; margin: 11px 0 0; padding-top: 10px;
  border-top: 1px solid rgba(147, 163, 201, .16);
}
.meta { color: var(--muted); font-size: .78rem; margin: 8px 0 0; }

.estab { color: var(--silver); font-size: .94rem; margin: 9px 0 0; }
.flag {
  display: inline-block; margin-top: 12px;
  background: rgba(106, 87, 224, .16); border: 1px solid rgba(106, 87, 224, .55);
  color: #BDB2FF; border-radius: 999px; padding: 4px 11px;
  font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}

/* An option that exists in the design but cannot be bought. Visibly inert. */
.card.unavailable { opacity: .82; border-style: dashed; }

/* ---- simulation qualification equation ---- */
.qual { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; align-items: center; gap: 13px;
  background: rgba(0, 0, 0, .26); border: 1px solid var(--border);
  border-radius: 11px; padding: 14px 15px;
}
.step .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  color: #1B1405; font-weight: 800; font-size: .95rem;
}
.step .what { font-size: 1rem; font-weight: 650; }
.op { text-align: center; color: var(--gold); font-size: 1.5rem; font-weight: 700; line-height: 1; padding: 9px 0; }
.reward {
  text-align: center; border-radius: 13px; padding: 20px 16px;
  background: radial-gradient(160px 90px at 50% 0%, rgba(106, 87, 224, .32), rgba(106, 87, 224, 0) 75%),
    linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--border-gold);
}
.reward .free-big {
  font-size: 1.7rem; font-weight: 850; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reward .what { margin: 3px 0 0; font-size: 1.02rem; font-weight: 650; color: var(--text); }
.reward .val {
  display: inline-block; margin-top: 10px; padding: 5px 13px;
  border: 1px solid var(--border-gold); border-radius: 999px;
  color: var(--gold); font-size: .85rem; font-weight: 750; letter-spacing: .06em;
}

.notice {
  text-align: center; color: var(--silver); padding: 34px 18px;
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--border); border-radius: 13px;
}
.notice strong { display: block; color: var(--text); font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }

.hint { color: var(--muted); font-size: .81rem; margin-top: 24px; }

/* ---- forms ---- */
.stack { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
label { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
input {
  width: 100%; padding: 12px 13px; font: inherit; font-size: 1rem;
  background: rgba(0, 0, 0, .28); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
}
input:focus { outline: none; border-color: var(--gold); }

.btn {
  display: inline-block; padding: 11px 16px; cursor: pointer; text-align: center; text-decoration: none;
  font: inherit; font-size: .95rem; font-weight: 700; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--silver);
}
.btn:hover { border-color: var(--border-gold); color: var(--gold); }
.btn.wide { display: block; width: 100%; margin-top: 10px; }
.btn.danger { border-color: rgba(255, 138, 128, .5); color: var(--danger); }

.row { display: flex; align-items: center; }
.row.gap { gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.stack > .card { margin-bottom: 11px; }

/* ---- alerts ---- */
.alert { border-radius: 11px; padding: 14px 15px; margin: 0 0 12px; border: 1px solid; font-size: .93rem; }
.alert strong { display: block; margin-bottom: 4px; }
.alert p { margin: 4px 0 0; }
.alert.error { border-color: rgba(255, 138, 128, .45); background: rgba(255, 138, 128, .08); color: #FFD5D0; }
.alert.notice { border-color: rgba(106, 87, 224, .5); background: rgba(106, 87, 224, .12); color: #CFC7FF; }
.alert.ok { border-color: var(--border-gold); background: rgba(242, 206, 99, .09); color: var(--gold-hi); }
.alert .meta { color: var(--muted); font-size: .76rem; }

/* ---- licence codes ---- */
.code-block { display: flex; align-items: center; gap: 9px; margin: 10px 0 0; flex-wrap: wrap; }
.code {
  flex: 1; min-width: 0; padding: 11px 13px; border-radius: 9px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--border-gold);
  color: var(--gold-hi); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem; letter-spacing: .06em; word-break: break-all;
}
.btn.small { padding: 8px 12px; font-size: .85rem; }

/* ---- footer ---- */
.site-footer {
  margin-top: 40px; padding: 20px 0 34px;
  border-top: 1px solid rgba(147, 163, 201, .14); color: var(--muted); font-size: .8rem;
}
.site-footer code { color: var(--silver); }

/* ---- development chrome (never rendered in production) ---- */
.dev-bar {
  display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold));
  color: #1B1405; font-size: 11.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px; text-align: center;
}
.dev-bar-api { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: #1B1405; color: var(--gold-hi); border: 1px solid var(--gold);
  border-radius: 999px; padding: 11px 20px; font-size: .9rem; font-weight: 650;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  max-width: calc(100vw - 32px); text-align: center; z-index: 30;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.boot-error { max-width: 460px; margin: 60px auto; padding: 0 18px; color: var(--text); }
.boot-error h1 { color: var(--danger); font-size: 1.4rem; }

.pad { padding: 18px 0; color: var(--muted); }

/* The clipboard fallback's scratch textarea. A class rather than a style attribute so the
   production Content-Security-Policy needs no inline-style exception at all. */
.offscreen { position: fixed; opacity: 0; pointer-events: none; }

@media (max-width: 420px) {
  .brand h1 { font-size: 1.7rem; }
  .brand img { width: 64px; height: 64px; }
  .wrap { padding: 0 15px; }
  .menu-item { font-size: 1rem; }
}
