/* Platform pages (site + owner console). Colours, type and sizes come from tokens.css, linked before this file;
   this file only reads them. Sections: base, page shell, layout, buttons, cards, forms, messages and badges,
   tables and lists, focus and motion, pages, owner console. */

/* ---- base ------------------------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs)/var(--lh) var(--font);
  -webkit-font-smoothing: antialiased; }
/* Long unbroken text (a name, an e-mail address, a package name) wraps instead of pushing the page sideways on a phone.
   Grid and flex items need min-width:0, or they stay as wide as their longest word. */
body { overflow-wrap: anywhere; }
.card, .grid > *, .kv dd { min-width: 0; }
h1, h2, h3 { color: var(--heading); letter-spacing: var(--tracking); }
h1 { font-size: var(--fs-h1); line-height: 1.2; font-weight: 700; margin: 0 0 var(--s3); }
h2 { font-size: var(--fs-h2); line-height: 1.25; font-weight: 700; margin: 0 0 var(--s3); }
h3 { font-size: var(--fs-h3); line-height: 1.35; font-weight: 650; margin: var(--s5) 0 var(--s2); }
p { margin: 0 0 var(--s3); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 650; }
.lead { font-size: var(--fs-lead); }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.center { text-align: center; }
.hide { display: none !important; }

/* ---- page shell: skip link, header, phone menu, main, footer ------------------------------------------------ */
/* --bleed: the side padding that lines a full-width band's content up with the page's container. */
body { --bleed: max(var(--s4), (100% - var(--container)) / 2 + var(--s4));
  min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: var(--s2); z-index: 100; padding: var(--s2) var(--s4);
  border-radius: var(--r); background: var(--amber); color: var(--navy); font-weight: 600; text-decoration: none;
  transform: translateY(-300%); }
.skip:focus { transform: none; }

/* The navy areas: white text, amber focus ring (accent-on-navy would be too dark to see). */
.top, .foot { --focus: var(--amber); background: var(--header-bg); color: var(--on-dark); }
.top .in { max-width: var(--container); min-height: 64px; margin: 0 auto; padding: var(--s3) var(--s4);
  display: flex; gap: var(--s2) var(--s5); align-items: center; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--on-dark);
  font-size: 17px; font-weight: 700; letter-spacing: var(--tracking); text-decoration: none; }
.brand:hover { color: var(--on-dark); }
.brand .mark { flex: none; }
.nav { display: flex; gap: var(--s2) var(--s5); align-items: center; flex-wrap: wrap; font-size: 15px; }
.nav a:not(.btn), .nav button.link { color: var(--on-dark-muted); font-weight: 500; text-decoration: none; }
.nav a:not(.btn):hover, .nav button.link:hover { color: var(--on-dark); text-decoration: underline;
  text-underline-offset: 4px; }
.navbtn { display: none; }
@media (max-width: 760px) {
  .has-menu .navbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px;
    padding: 0; border: 1px solid var(--on-dark-line); border-radius: var(--r); background: transparent;
    color: var(--on-dark); }
  .has-menu .navbtn:hover { border-color: var(--on-dark); color: var(--on-dark); }
  .has-menu:not(.open) .nav { display: none; }
  .has-menu.open .nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s2) 0 var(--s1); border-top: 1px solid var(--on-dark-line); }
  .has-menu.open .nav a:not(.btn), .has-menu.open .nav button.link { display: flex; align-items: center;
    justify-content: flex-start; width: 100%; min-height: 44px; font-size: var(--fs); }
  .has-menu.open .nav .btn { margin-top: var(--s2); }
}

/* Full-width navy footer; its content lines up with the page's container. */
.foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: baseline; color: var(--on-dark-muted);
  font-size: var(--fs-small); line-height: 1.55; padding: var(--s6) var(--bleed) var(--s7); }
.foot > span { flex-basis: 100%; }                        /* each sentence on its own line, the links below them */
.foot > span:first-child { max-width: 92ch; }
.foot a { color: var(--on-dark); text-underline-offset: 3px; }
.foot a:hover { color: var(--amber); }

/* ---- layout ----------------------------------------------------------------------------------------------- */
.wrap { max-width: var(--container); margin: 0 auto; padding: var(--s6) var(--s4) var(--s8); }
.narrow { max-width: var(--container-narrow); margin: 0 auto; }
.mid { max-width: var(--container-mid); margin: 0 auto; }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mt0 { margin-top: 0; } .mt8 { margin-top: var(--s2); } .mt12 { margin-top: var(--s3); } .mt16 { margin-top: var(--s4); }
.mb0 { margin-bottom: 0; }

/* ---- buttons ---------------------------------------------------------------------------------------------- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px;
  padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover, button:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover, button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover);
  color: var(--accent-text); }
/* The danger button's text takes the card colour: white on red in light mode, dark on the lighter red in dark mode. */
.btn.danger, button.danger { background: var(--red); border-color: var(--red); color: var(--surface); }
.btn.danger:hover, button.danger:hover { color: var(--surface); filter: brightness(1.08); }
button.link { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent);
  font-weight: 400; text-align: left; }
button.link:hover { text-decoration: underline; }
button:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: default; pointer-events: none; }
.block { display: flex; width: 100%; }
form.inline { display: inline; }
/* On the navy areas the main button is amber with navy text and the others are white outlines. Contextual only:
   the buttons' markup (and the tests that quote it) stays the same everywhere. */
:is(.top, .hero, .cta-band) .btn.primary { background: var(--amber); border-color: var(--amber); color: var(--navy); }
:is(.top, .hero, .cta-band) .btn.primary:hover { color: var(--navy); filter: brightness(1.06); }
:is(.top, .hero, .cta-band) .btn:not(.primary) { background: transparent; border-color: var(--on-dark-line);
  color: var(--on-dark); }
:is(.top, .hero, .cta-band) .btn:not(.primary):hover { border-color: var(--on-dark); color: var(--on-dark); }

/* ---- cards ------------------------------------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: var(--s5); margin-bottom: var(--s4); }
.card h2 { font-size: 20px; }
.card > :last-child { margin-bottom: 0; }
/* Sign-in, sign-up, reset and the other one-form pages: a centred card. */
.card.narrow { margin-top: 40px; padding: var(--s6) var(--s5); box-shadow: var(--shadow-2); }
.card.narrow h1 { font-size: clamp(24px, 20px + 1vw, 30px); }

/* ---- forms ------------------------------------------------------------------------------------------------ */
label { display: block; margin: var(--s4) 0 var(--s1); color: var(--heading); font-size: 15px; font-weight: 600; }
label.check { display: flex; gap: var(--s3); align-items: flex-start; color: var(--text); font-weight: 400; cursor: pointer; }
label.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
/* The hint inside an empty field: the browser's own grey is 3.5:1 on the dark card; the muted text colour passes in both modes. */
::placeholder { color: var(--muted); opacity: 1; }
/* A choice between radio buttons (the checkout's payment method) reads as selectable tiles where :has() exists;
   elsewhere it stays a plain row. */
label.check:has(input[type=radio]) { margin: var(--s2) 0 0; padding: var(--s3) var(--s4); border: 1px solid var(--field-border);
  border-radius: var(--r); background: var(--surface); }
label.check:has(input[type=radio]):hover { border-color: var(--accent); }
label.check:has(input[type=radio]:checked) { border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent); }
.help { margin-top: var(--s1); color: var(--muted); font-size: 13px; }
.errorlist { list-style: none; padding: 0; margin: var(--s1) 0 0; color: var(--red); font-size: var(--fs-small); }
/* Cloudflare's widget is 300px wide, wider than the card on a 320px phone: it scrolls inside its own box instead of
   making the whole page scroll sideways (WCAG 1.4.10). */
.cf-turnstile { margin: 14px 0 4px; min-height: 65px; max-width: 100%; overflow-x: auto; }

/* ---- messages and badges ---------------------------------------------------------------------------------- */
.msg { padding: var(--s3) var(--s4); margin-bottom: var(--s3); border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
  border-radius: var(--r); background: var(--surface); }
.msg.success { background: var(--green-soft); border-color: var(--green-soft); border-left-color: var(--green); }
.msg.error { background: var(--red-soft); border-color: var(--red-soft); border-left-color: var(--red); }
.msg.warning, .msg.info { background: var(--warn-soft); border-color: var(--warn-soft); border-left-color: var(--warn); }
.msg > :last-child { margin-bottom: 0; }
/* Links on the tinted messages: the accent is 4.4:1 on the light red, the darker accent passes on all three. */
.msg a:not(.btn) { color: var(--accent-hover); }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.5; }
.st-paid, .st-succeeded, .st-active { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.st-admin, .st-queued, .st-awaiting_review, .st-pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.st-expired, .st-none, .st-cancelled, .st-revoked { background: var(--surface-2); color: var(--muted); }
.st-suspended, .st-failed, .st-rejected, .st-refunded, .st-dead { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* ---- tables and lists ------------------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 13px; font-weight: 650; }
tr:hover > td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* A data table in its wrapper keeps whole words, and a phone scrolls it sideways inside the card (the page itself
   does not): breaking anywhere would squeeze each cell to a few letters a line. Headers, status pills and a cell's
   only link (a payment reference, an invoice number) stay on one line. Free-text detail cells (td.small, the
   console's details and errors) still break anywhere, so one long token cannot widen the whole table. */
.tablewrap { overflow-x: auto; }
.tablewrap table { min-width: 34rem; }
.tips .tablewrap table { min-width: 0; }                 /* exam tips: short tables that fit a phone instead of scrolling */
.tips-ar bdi, .tips .num { white-space: nowrap; }       /* a range (80–100%), a sitting (2022-S2) or a drug name stays on one line */
.tablewrap :is(th, td) { overflow-wrap: normal; }
.tablewrap td.small { overflow-wrap: anywhere; }
.tablewrap :is(th, .badge, td > a:only-child) { white-space: nowrap; }
/* The console's user list (owner, 2026-11-29): a long email breaks onto two lines instead of widening its column, and the
   date stays on one line, so the table fits without scrolling sideways. */
.tablewrap td.email { overflow-wrap: anywhere; }
.tablewrap td.date { white-space: nowrap; }
.pager { display: flex; gap: var(--s3); margin-top: var(--s3); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.ref { font-family: var(--font-mono); font-size: 20px; font-weight: 700; letter-spacing: .04em; }
/* The amount, number and reference of the Whish steps stay on one line (a reference cut at its hyphen is copied wrong). */
.pay-steps :is(strong, bdi) { white-space: nowrap; }
.price { color: var(--heading); font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: var(--tracking);
  font-variant-numeric: tabular-nums; }
.price small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }
/* Package features: a drawn check instead of a bullet. */
ul.features { list-style: none; padding: 0; margin: var(--s3) 0 var(--s4); }
ul.features li { position: relative; padding-left: 26px; margin: var(--s1) 0; }
ul.features li::before { content: ""; position: absolute; left: 5px; top: .35em; width: 6px; height: 11px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
ul.features li.feature-excluded::before,
ul.features li.feature-excluded::after { content: ""; position: absolute; left: 4px; top: .7em;
  width: 12px; height: 2px; border: 0; background: var(--red); transform: rotate(45deg); }
ul.features li.feature-excluded::after { transform: rotate(-45deg); }
details summary { cursor: pointer; }

/* ---- focus and motion ------------------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- landing ---------------------------------------------------------------------------------------------- */
/* The landing page has no .wrap: its bands are full width, their content lined up with the container. */
.landing > .msg { width: calc(100% - 2 * var(--s4)); max-width: calc(var(--container) - 2 * var(--s4)); margin: var(--s4) auto 0; }

/* Cover photo: the picture fills the section, a shade keeps the text on it readable, the text sits on the left on
   wide screens and at the bottom on phones. The shade is at least .72 behind the text, and at least .8 behind the
   amber offer line: normal-size amber text needs .8 to keep 4.5:1 over the brightest part of a photo. */
.hero { --focus: var(--amber); --hero-text: 640px; position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: clamp(520px, 78vh, 700px); min-height: clamp(520px, 78svh, 700px);
  padding: var(--s8) var(--bleed); background: var(--navy); color: var(--on-dark); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, rgb(var(--scrim) / .85), rgb(var(--scrim) / .8) calc(var(--bleed) + var(--hero-text)),
    rgb(var(--scrim) / .2)); }
.hero-in { max-width: var(--hero-text); }
.hero h1 { color: var(--on-dark); font-size: var(--fs-hero); line-height: 1.1; margin: 0 0 var(--s4); text-wrap: balance; }
.hero .muted { color: var(--on-dark-muted); text-shadow: 0 1px 2px rgb(var(--scrim) / .6); }
.hero .lead { margin-top: var(--s4); color: var(--on-dark); text-shadow: 0 1px 2px rgb(var(--scrim) / .5); }
/* One line in Arabic for Arabic searches ("كولوكيوم"), right to left like the site's other Arabic lines. */
.hero .hero-ar { margin: var(--s3) 0 0; font-size: 18px; line-height: 1.6; color: var(--on-dark); text-shadow: 0 1px 2px rgb(var(--scrim) / .5); }
.hero .offer { margin: var(--s4) 0 0; color: var(--amber); }
.hero-cta { margin-top: var(--s5); }
.hero .btn, .cta-band .btn { min-height: 48px; padding: 12px 22px; font-size: 17px; }
/* On phones the text fills the whole first screen, so the photo would sit behind it and nobody would see it: there it
   is a 4:3 banner above the text that fades into the navy, and the text sits on plain navy. */
@media (max-width: 767px) {
  .hero { display: block; min-height: 0; padding: 0 0 var(--s7); }
  .hero::before { content: none; }
  .hero-media { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 3; }
  .hero-media::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgb(var(--scrim) / 0) 50%, var(--navy)); }
  .hero-in { position: relative; z-index: 1; margin-top: calc(-1 * var(--s5)); padding: 0 var(--bleed); }
  .hero h1 { font-size: clamp(36px, 10vw, 46px); }
}

/* The tour of the site beside the cover text (static/js/hero-tour.js): a 16:9 screen recording that plays on hover. On wide
   screens it sits on the right of the photo, at medium widths under the text, on phones under the text on plain navy. */
.hero-tour { margin: var(--s6) 0 0; width: 100%; max-width: var(--hero-text); position: relative; }
.hero-tour-video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--on-dark-line);
  background: var(--navy); box-shadow: 0 18px 44px rgb(var(--scrim) / .55); cursor: pointer; object-fit: cover; }
.hero-tour-hint { position: absolute; left: var(--s3); top: var(--s3); padding: 4px 10px; border-radius: 999px; font-size: 13px;
  background: rgb(var(--scrim) / .78); color: var(--on-dark); pointer-events: none; transition: opacity .2s; }
.hero-tour.playing .hero-tour-hint { opacity: 0; }
.hero-tour-btn { margin-top: var(--s3); min-height: 44px; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--on-dark-line);
  background: transparent; color: var(--on-dark); font: inherit; font-weight: 600; cursor: pointer; }
.hero-tour-btn:hover { border-color: var(--on-dark); }
@media (min-width: 1200px) {
  .hero-tour { position: absolute; right: var(--bleed); top: 50%; transform: translateY(-50%); margin: 0;
    width: min(560px, calc(100% - var(--hero-text) - 2 * var(--bleed) - var(--s7))); }
}
@media (min-width: 768px) and (max-width: 1199px) { .hero { flex-direction: column; align-items: flex-start; justify-content: center; } }
@media (max-width: 767px) { .hero-tour { margin: var(--s6) var(--bleed) 0; width: auto; } }
/* The background tour (wide screens): over the photo, invisible until it plays, faded while the mouse is on the text. Once it
   plays, the small preview is hidden and only its button stays. */
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease;
  pointer-events: none; }
.hero.bg-on .hero-bg { opacity: 1; }
.hero.bg-on.bg-calm .hero-bg { opacity: .15; }
.hero.bg-on .hero-tour-video, .hero.bg-on .hero-tour-hint { display: none; }
@media (min-width: 1200px) { .hero.bg-on .hero-tour { top: auto; bottom: var(--s7); transform: none; width: auto; } }
@media (max-width: 1199px) { .hero-bg { display: none; } }
.tour-dialog { width: min(1100px, 94vw); padding: var(--s3); border: 0; border-radius: 14px; background: var(--navy); }
.tour-dialog::backdrop { background: rgb(var(--scrim) / .82); }
.tour-dialog-video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: rgb(var(--scrim)); }
.tour-dialog form { margin: var(--s3) 0 0; text-align: right; }

.stats { list-style: none; margin: 0; padding: var(--s5) var(--bleed); display: flex; flex-wrap: wrap;
  justify-content: center; gap: var(--s3) var(--s8); background: var(--surface); border-bottom: 1px solid var(--line);
  color: var(--muted); }
.stats li { white-space: nowrap; }
.stats strong { color: var(--heading); font-size: clamp(22px, 18px + 1.2vw, 30px); font-weight: 700;
  letter-spacing: var(--tracking); font-variant-numeric: tabular-nums; }

.band { padding: var(--s8) var(--bleed); }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.band > h2 { margin-bottom: var(--s5); }
.feature-cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature { margin-bottom: 0; }
.feature .icon { display: block; width: 44px; height: 44px; padding: 10px; margin-bottom: var(--s4); border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent); }
.feature h2 { margin-bottom: var(--s2); font-size: var(--fs-h3); }
/* The "Not official" sets: the card (public/_unofficial_sets.html, shown only when such sets exist) gets the edge. */
.notice { margin-top: var(--s5); }
.notice > .card { margin-bottom: 0; border-left: 4px solid var(--amber); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px;
  margin-bottom: var(--s2); border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.steps strong { color: var(--heading); font-size: var(--fs-h3); line-height: 1.35; }

.plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plans > .card { display: flex; flex-direction: column; margin-bottom: 0; border-top: 4px solid var(--teal); }
.plans > .card > .btn { margin-top: auto; }                /* the buttons line up when the cards differ in length */

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 44px;
  padding: var(--s4) 0; color: var(--heading); font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
/* The + and − are drawn, not read: the empty alternative text after "/" keeps them out of each question's name
   (a browser without that syntax drops the second declaration and keeps the first). */
.faq summary::after { content: "+"; content: "+" / ""; flex: none; color: var(--accent); font-size: 24px; font-weight: 400;
  line-height: 1; }
.faq details[open] > summary::after { content: "\2212"; content: "\2212" / ""; }
.faq details p { max-width: 70ch; margin: 0 0 var(--s4); color: var(--muted); }

.cta-band { --focus: var(--amber); padding: var(--s8) var(--bleed); text-align: center; color: var(--on-dark);
  background: linear-gradient(120deg, var(--navy) 45%, var(--teal) 140%); }
.cta-band h2 { margin-bottom: var(--s5); color: var(--on-dark); }
.cta-band .row { justify-content: center; }

/* ---- pages ------------------------------------------------------------------------------------------------ */
/* Pricing: the package cards as on the landing page, the key facts under them. */
.wrap > .plans { margin-bottom: var(--s4); }
.wrap > h1 + p { margin-bottom: var(--s2); }

/* Dashboard: the free trial drawn as an answer sheet (practice/_trial_card.html), one cell per free question, filled
   in ink once used; the amber edge is the trial's colour, as on the practice screen's trial line. */
.trialcard { border-top: 4px solid var(--amber); }
.trialcard .cells { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; max-width: 26rem;
  margin: var(--s3) 0 var(--s4); }
.trialcard .cells span { height: 14px; border: 1px solid var(--field-border); border-radius: 3px; }
.trialcard .cells span.used { background: var(--mark); border-color: var(--mark); }

/* Terms, Privacy and Refunds (the card that ends with the versions line). Their texts are frozen, so they are
   styled here only: lines of a readable length, room above the sections, anchors that do not land on the edge. */
[id] { scroll-margin-top: var(--s5); }
.card.mid:has(> #legalVersions) { padding: var(--s6) clamp(var(--s4), 4vw, var(--s7)); }
.card.mid:has(> #legalVersions) :is(p, li, dd) { max-width: 70ch; }
.card.mid:has(> #legalVersions) h2 { margin: var(--s6) 0 var(--s3); font-size: 19px; }
.card.mid:has(> #legalVersions) li + li { margin-top: var(--s2); }
.card.mid:has(> #legalVersions) :target { color: var(--accent); }

/* Payment, invoice, checkout and error pages: centred cards (.mid, .narrow) from the components above. */
.card.mid > .row.spread:first-child { margin-bottom: var(--s2); }
.card.center .btn { margin-top: var(--s2); }

/* ---- account pages (redesign of 2026-10-22) ----------------------------------------------------------------- */
/* The one-form pages (sign-in, sign-up, password reset, email confirmation and the link pages) carry .auth: a centred
   sheet on a wide screen; on a phone the form sits on the page itself, with no box around it. */
.card.narrow.auth { margin-top: var(--s7); padding: var(--s6) var(--s6) var(--s5); }
.card.narrow.auth h1 { font-size: clamp(26px, 22px + 1vw, 32px); line-height: 1.15; margin-bottom: var(--s2); }
.auth .lede { margin: 0 0 var(--s4); color: var(--muted); font-size: var(--fs); }
.auth input:is([type=text], [type=email], [type=password]) { min-height: 48px; }
.auth button.primary { min-height: 48px; }
.auth label.check { margin-top: var(--s4); }
label.check.reveal { margin-top: var(--s3); }
.auth > :is(p, form) + p.small { margin-top: var(--s4); }
/* The small links of these pages ("Forgot your password?", "Sign in", "Go to sign in") and the folded "Delete my
   account" are 44px targets, like the buttons. */
.auth .small > a, .auth > p > a:only-child, .auth > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
:is(.auth, .danger-zone) details > summary { padding-block: 10px; }
@media (max-width: 560px) {
  .card.narrow.auth { margin: var(--s2) auto 0; padding: var(--s4) 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
}

/* Dashboard: the trial card's button is the page's main one; the access card repeats the offer as a plain button
   (contextual only: the markup, and the tests that quote it, keep "btn primary"). */
.trialcard + .grid .btn.primary[href="/pricing"] { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.trialcard + .grid .btn.primary[href="/pricing"]:hover { border-color: var(--accent); color: var(--accent); }
.access > p.mt8 > strong { color: var(--heading); font-size: var(--fs-lead); }

/* Account settings: the forms side by side on a wide screen, the account's deletion apart at the end, marked red. */
.card.danger-zone { border-left: 4px solid var(--red); }
.danger-zone > p { max-width: 75ch; font-size: var(--fs-small); }

/* ---- pricing and payment (redesign of 2026-10-22) ------------------------------------------------------------ */
/* Pricing: the price and what it buys come first, then how paying works and the key facts (their words unchanged).
   A package card keeps a readable width instead of stretching across a wide screen. */
.wrap > .offer { margin-bottom: var(--s5); color: var(--heading); }
.pricing-plans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pricing-plans:has(> .card:only-child) { grid-template-columns: minmax(0, 30rem); }
.plan { padding: var(--s6) var(--s5) var(--s5); box-shadow: var(--shadow-2); }
.plan h2 { font-size: 20px; margin-bottom: var(--s2); }
.plan .price { font-size: clamp(36px, 30px + 1.6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.plan .price small { display: inline-block; margin-left: var(--s1); font-size: 15px; }
.plan ul.features { margin: var(--s5) 0 var(--s4); }
/* All Access, the plan the site recommends (owner, 2026-11-25): a badge and the accent border. */
.plan.recommended { border-color: var(--accent); box-shadow: var(--shadow-2), 0 0 0 1px var(--accent); }
.plan-badge { display: inline-block; align-self: flex-start; width: fit-content; margin: 0 0 var(--s2); padding: 2px 10px; border-radius: var(--r-pill); background-color: var(--accent);
  color: var(--accent-text); font-size: 13px; font-weight: 700; }
.plan ul.features li { margin: var(--s2) 0; }
.plan .btn.primary { min-height: 52px; margin-top: auto; font-size: 17px; }   /* auto: the buttons line up */
.plan > :nth-last-child(2) { margin-bottom: var(--s4); }
.howpay { max-width: 70ch; margin: var(--s6) 0 var(--s5); }
.howpay h2 { font-size: 20px; }
/* On a wide screen "How paying works" sits beside the package (when there is one); everything else keeps the full width. */
@media (min-width: 960px) {
  .wrap:has(> .pricing-plans > .card:only-child) { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); column-gap: var(--s7);
    align-items: start; }
  .wrap:has(> .pricing-plans > .card:only-child) > * { grid-column: 1 / -1; }
  .wrap:has(> .pricing-plans > .card:only-child) > .pricing-plans { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .wrap:has(> .pricing-plans > .card:only-child) > .howpay { grid-column: 2; margin-top: var(--s2); }
}

/* Checkout: the order (package, price) at the top, the key facts in a quiet box, the payment methods as tiles, and the
   consent box set apart from them (tinted, an accent edge) as the one thing to read before paying. The optional
   automatic renewal stays a plain tick box, so it cannot pass for another way to pay. */
.card.mid:has(#keyFacts) .price { margin-bottom: var(--s4); }
.card.mid:has(#keyFacts) #keyFacts { background: var(--surface-2); border-color: transparent; border-left-color: var(--line-strong); }
.card.mid:has(#keyFacts) #keyFacts h3 { font-size: var(--fs-h3); }
.card.mid:has(#keyFacts) form > h3 { margin-top: var(--s6); font-size: 20px; }
.card.mid:has(#keyFacts) #acceptRow { padding: var(--s4); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-sm); background: var(--surface); }
.card.mid:has(#keyFacts) #acceptRow:has(input:checked) { border-color: var(--accent); }
.card.mid:has(#keyFacts) button.primary { min-height: 52px; font-size: 17px; }

/* Payment status: "How to pay" is a real sequence, so its steps are numbered, each number in an ink bubble. The
   Arabic copy of the steps runs right to left: the bubble sits at the start of the line in both (logical sides). */
ol.pay-steps { list-style: none; counter-reset: paystep; padding: 0; margin: var(--s3) 0 var(--s4); }
ol.pay-steps li { counter-increment: paystep; position: relative; min-height: 30px; margin: var(--s3) 0; padding-inline-start: 44px; }
ol.pay-steps li::before { content: counter(paystep); position: absolute; inset-inline-start: 0; top: -2px; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--mark); color: var(--mark-text); font-size: 14px; font-weight: 700; }
.card.mid:has(#pay-status) form button.primary, .payhand .btn.primary { min-height: 48px; }
.card.mid:has(#pay-status) button.link, .payhand .small > a { display: inline-flex; align-items: center; min-height: 44px; }
/* On paper the bubbles lose their fill (browsers print no backgrounds): the numbers are drawn as outlines there. */
/* The floating support button (partials/support_button.html): a round Telegram button in the corner; hovering or focusing it
   slides its words open, a click opens Telegram. The footer keeps room for it at the end of every page. */
.support-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; height: 52px;
  min-width: 52px; padding: 0 14px; border-radius: var(--r-pill); background-color: var(--accent); color: var(--accent-text);
  box-shadow: var(--shadow-3); font-weight: 600; text-decoration: none; overflow: hidden; }
.support-fab:hover, .support-fab:focus-visible { background-color: var(--accent-hover); color: var(--accent-text); }
.support-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.support-fab svg { flex: none; }
.support-fab-label { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width .25s ease, opacity .2s ease, margin-left .25s ease; }
.support-fab:hover .support-fab-label, .support-fab:focus-visible .support-fab-label { max-width: 220px; opacity: 1; margin-left: 8px; }
.foot { padding-bottom: 84px; }
@media (prefers-reduced-motion: reduce) { .support-fab-label { transition: none; } }
@media print { .support-fab { display: none; } }
@media print {
  ol.pay-steps li::before { background: none; border: 1px solid var(--text); color: var(--text); }
}

/* On paper a page is its document: the navy header and footer carry white text, which prints as white on white when the
   browser leaves backgrounds out (its default), and a flash message or a hint is no part of what is kept. */
@media print {
  .skip, .navbtn, .top, .foot, .wrap > .msg, .noprint { display: none !important; }
  body { background: transparent; }
  .wrap { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; }
}

@media (max-width: 560px) {
  .card { padding: var(--s4); }
  .card.narrow { margin-top: var(--s5); padding: var(--s5) var(--s4); }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: var(--s2); }
}

/* ---- owner console ---------------------------------------------------------------------------------------- */
/* The console's header stays distinct from the student site's: charcoal, with an amber edge. */
.top.admin-top { background: var(--charcoal); border-bottom: 3px solid var(--amber); }
/* Every staging page, console and student site alike (context STAGING): staging and production look the same. */
.env-banner { background: var(--red); color: var(--surface); text-align: center; font-weight: 700; letter-spacing: .04em;
  padding: 6px 16px; }
/* The Revoke / Extend / Change package controls stacked in a table cell: each is a 24px target with a gap (WCAG 2.5.8). */
td > details > summary { min-height: 24px; }
td > details + details { margin-top: var(--s1); }
/* owner launch checklist */
.checklist { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.checklist li.ok { color: var(--green); }
.checklist li.todo strong { color: var(--text); }
