/* ============================================================
   Consumer surface — modern, skinnable base (§16).

   This is the INTERNET-FACING consumer/merchant page, deliberately
   separate from the internal RS2 console theme. The default look is a
   clean, Apple-like design for "RS2 Financial Services". Every colour,
   font and radius is a CSS custom property so a partner skin
   (/v/{id}/brand.css, loaded AFTER this file) can restyle the page by
   overriding tokens only — no template edits (§16).
   ============================================================ */

/* ============================================================
   Lexend — the Beyond primary typeface (Brand 1.8 §02).

   Self-hosted, never a CDN: the CSP allows no third-party origin (§7a/§16), and
   a webfont from someone else's domain also tells them who is verifying a bank
   account. One VARIABLE file covers the whole 100-900 axis, so Light headings,
   Medium subheads and SemiBold eyebrows cost 69 KB in total rather than three
   downloads.

   `font-display: swap` on purpose. This page is the last step of someone's bank
   verification; text that is invisible while a font loads is worse than text in
   the fallback face for 100 ms.

   Coverage is Latin + Latin Extended A/B (685 codepoints), which carries the
   European names this page actually renders — Polish, Turkish, Czech, the
   Nordics. A Cyrillic or Greek name falls back to the system face and still
   renders; it must never become tofu, which is why the stack below keeps real
   fallbacks rather than ending at `sans-serif`.
   ============================================================ */
@font-face {
  font-family: "Lexend";
  src: url("/static/fonts/lexend-variable.woff2") format("woff2-variations"),
       url("/static/fonts/lexend-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Default = the RS2 colour template (RS2 2026 tokens). A partner brand.css
     overrides any of these; unbranded partners get RS2 Financial Services. */
  --brand: #3241d9;
  --brand-contrast: #ffffff;
  /* Brand blue used as TEXT, kept separate from --brand because --brand is also a
     background (language pill, flow dots) — re-tinting it for dark mode would
     break the contrast on those instead. Same value in light mode. */
  --brand-text: #3241d9;
  /* Neutrals are the Beyond grey ramp (Brand 1.8 §03), not blue-tinted customs.
     bg = Grey 1, surface-2 = Grey 2 lightened toward it, text = Grey 7,
     muted = Grey 5 (Grey 6 is too dark to sit under body copy at 13px). */
  --bg: #f8f8f8;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --text: #2d2d2d;
  --muted: #5a5a5a;
  --line: #e1e1e1;
  --ok: #157a50;
  --ok-bg: #e6f4ec;
  --warn: #8a5a08;
  --warn-bg: #fdf3e0;
  --danger: #b30000;
  --danger-bg: #fdecec;
  --qr-bg: #ffffff;
  /* Beyond blue 4 — the focus ring has to be visibly distinct from --brand
     (blue 5) or the focused control looks merely hovered. */
  --focus: #3c5af0;
  --on-status: #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.08);
  /* Lexend first (Brand 1.8 §02 — "should be used by everyone wherever
     possible"). The system stack stays behind it as a real fallback, so a
     name outside Lexend's coverage still renders rather than boxing out. */
  --font: "Lexend", -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* The brand type scale, as weights so components stop inventing their own:
     Light headings, Medium subheadings, SemiBold all-caps eyebrows, Light body. */
  --w-heading: 300;
  --w-subheading: 500;
  --w-eyebrow: 600;
  --w-body: 300;
  --w-emphasis: 500;
  --maxw: 520px;
}

/* ============================================================
   Dark mode — neutral, with the brand as accent.

   Brand 1.8 has no dark-mode section. The tempting reading is that Beyond blue 7
   is "the" dark ground, because §08 specifies it for the company banner and §01
   shows the logo "Reversed, web" on it. That is a *banner* and a *logo lockup*,
   though — a full-bleed brand moment, not a UI surface. Building a whole product
   page on it produces a blue page rather than a dark one, and it drowns the very
   accent the brand relies on: on navy there is nowhere left for blue to mean
   "this is interactive".

   So the ground is the brand's own neutral end — Black (#050505) and Grey 7 —
   with the blue ramp used the way §03 describes it: "lighter tints ... in
   application with icons, data sets, outlines and UX components". Blue stays the
   accent it is in light mode. It also measures better: the elevation steps read
   (1.48 and 1.21 against 1.11 and 1.15 on navy), and the border clears 3:1.

   The reversed logo is served here. §01 permits that on a full-colour background
   unconditionally, and on black "in limited instances" — this is the second case,
   so it is worth a nod from whoever owns the brand rather than an assumption.

   Two results that are counter-intuitive and easy to undo by accident:

   * **The primary button inverts.** No blue clears both a 3:1 edge against these
     grounds and 4.5:1 for a white label — blue 5 gives 1.90 at the card edge, and
     blue 3 gives 4.21 on the label. A light fill (blue 2) with a near-black label
     clears everything at 4.42/6.54.
   * **The focus ring is blue 1 while the button is blue 2**, only 1.50 apart.
     Safe *only* because the ring is drawn with `outline-offset: 3px`, so its
     neighbour is the surface behind it at 6.62 — not the button. Remove the
     offset and this becomes a real failure.

   Status colours invert too: the brand defines none, and the light-mode pairs are
   dark-on-light, which would sit on a dark page as bright patches.

   Values live once, below; both blocks map them. They used to be duplicated as
   literals and had already drifted apart on --line.
   ============================================================ */
:root {
  --d-bg: #050505;              /* Black                                          */
  --d-surface: #2d2d2d;         /* Grey 7                                         */
  --d-surface-2: #1f1f1f;       /* Grey 7 -> Black. RECESSED, so it must sit BELOW
                                   --surface, exactly as #f1f1f1 sits below white in
                                   light mode: the method panel, the upload panel and
                                   hover states all read as "set into" the card. A
                                   lighter value inverts that relationship and the
                                   panel floats.                                    */
  --d-text: #f8f8f8;            /* Grey 1                                         */
  --d-muted: #b3b3b3;           /* Grey 4                                         */
  --d-line: #868686;            /* Grey 5 — Grey 6 is only 2.00 against the card,
                                   so a form field's border would not be
                                   perceivable (WCAG 1.4.11). Grey 5 gives 3.78.  */
  --d-brand: #648cff;           /* Beyond blue 2 — button fill                    */
  --d-brand-contrast: #050505;  /* Black — the label on that fill                 */
  --d-brand-text: #8cb4ff;      /* Beyond blue 1 — brand colour as text           */
  --d-focus: #8cb4ff;           /* Beyond blue 1                                  */
  --d-on-status: #050505;
  --d-ok: #7ee0b0;      --d-ok-bg: #0d3d2a;
  --d-warn: #ffcf7a;    --d-warn-bg: #4a3308;
  --d-danger: #ff9b9b;  --d-danger-bg: #4d1414;
  --d-shadow: 0 1px 3px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.6);
}


/* Applied automatically when the browser prefers dark UNLESS the user explicitly
   chose light via the header toggle; and always when they explicitly chose dark.
   No data-theme attribute = follow the browser.

   NOTE: --qr-bg is deliberately NOT remapped. The EPC QR code (§19b) has to stay
   dark-on-white or a banking app will not scan it; a "themed" QR is a broken one. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--d-bg);                        --surface: var(--d-surface);
    --surface-2: var(--d-surface-2);          --text: var(--d-text);
    --muted: var(--d-muted);                  --line: var(--d-line);
    --brand: var(--d-brand);                  --brand-contrast: var(--d-brand-contrast);
    --brand-text: var(--d-brand-text);        --focus: var(--d-focus);
    --on-status: var(--d-on-status);
    --ok: var(--d-ok);                        --ok-bg: var(--d-ok-bg);
    --warn: var(--d-warn);                    --warn-bg: var(--d-warn-bg);
    --danger: var(--d-danger);                --danger-bg: var(--d-danger-bg);
    --shadow: var(--d-shadow);
  }
}
:root[data-theme="dark"] {
  --bg: var(--d-bg);                        --surface: var(--d-surface);
  --surface-2: var(--d-surface-2);          --text: var(--d-text);
  --muted: var(--d-muted);                  --line: var(--d-line);
  --brand: var(--d-brand);                  --brand-contrast: var(--d-brand-contrast);
  --brand-text: var(--d-brand-text);        --focus: var(--d-focus);
  --on-status: var(--d-on-status);
  --ok: var(--d-ok);                        --ok-bg: var(--d-ok-bg);
  --warn: var(--d-warn);                    --warn-bg: var(--d-warn-bg);
  --danger: var(--d-danger);                --danger-bg: var(--d-danger-bg);
  --shadow: var(--d-shadow);
}

/* Header light/dark toggle button (progressive enhancement — set by theme.js). */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 30px; padding: 0; margin-left: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle svg { width: 17px; height: 17px; }
.topline-actions { display: inline-flex; align-items: center; gap: 8px; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  /* Brand 1.8 §02: paragraphs and disclaimers are Lexend Light. Set here so
     body copy inherits it; buttons, labels and values keep the weights they
     declare — the brand's type table covers editorial roles, not every UI atom,
     and a 300-weight button label reads as disabled. */
  font-weight: var(--w-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 64px;
}

.topline {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.langs { display: flex; gap: 4px; }
.lang {
  font-size: 12px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  padding: 5px 9px; border-radius: 8px;
}
.lang:hover { background: var(--surface-2); }
.lang-on { color: var(--brand-contrast); background: var(--brand); }
.lang-on:hover { background: var(--brand); }

.marketing { color: var(--muted); font-size: 14px; line-height: 1.6; }
.note-center { text-align: center; margin-top: 8px; }

.greeting {
  width: 100%; max-width: var(--maxw);
  font-size: 19px; font-weight: var(--w-subheading); letter-spacing: -0.01em;
  margin: 0 0 14px; color: var(--text);
}

/* One shared journey on every consumer page. */
.flow {
  width: 100%; max-width: var(--maxw);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 20px;
}
.flow-step {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 7px; min-width: 0; color: var(--muted); text-align: center;
  font-size: 11px; font-weight: 650;
}
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; z-index: 0; top: 14px; left: calc(50% + 16px);
  width: calc(100% - 32px); height: 2px; background: var(--line);
}
.flow-step.is-done:not(:last-child)::after { background: var(--brand); }
.flow-dot {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12px;
}
.flow-step.is-done .flow-dot,
.flow-step.is-active .flow-dot { border-color: var(--brand); }
.flow-step.is-done .flow-dot { background: var(--brand); color: var(--brand-contrast); }
.flow-step.is-active { color: var(--text); }
.flow-step.is-active .flow-dot { color: var(--brand-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent); }
.flow-label { overflow: hidden; text-overflow: ellipsis; }
.purpose-title { font-size: 20px; font-weight: var(--w-subheading); letter-spacing: -0.01em; margin: 4px 0 12px; }
/* Card hero — presents the product card like a marketing card: a soft tinted
   frame, the card centred with a lift shadow and rounded corners. */
.product-img {
  margin: 8px 0 18px;
  padding: 24px 22px;
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%,
      color-mix(in srgb, var(--brand) 12%, var(--surface-2)), var(--surface-2));
}
.product-img img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(23, 23, 46, .22);
}
.brand .brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-contrast);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}
.brand img { height: 28px; width: auto; display: block; }

.card {
  width: 100%;
  max-width: var(--maxw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card + .card { margin-top: 18px; }

h1 {
  font-size: 26px;
  line-height: 1.2;
  /* Was -0.02em at weight 650: negative tracking compensating for a heavy
     system face. Lexend Light is already open, so tightening it fights the
     typeface. */
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  font-weight: var(--w-heading);
}
.lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 4px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-text);
  margin-bottom: 8px;
}

/* Landing: context and trust on the left, action on the right. */
.landing-card { padding: 0; overflow: hidden; }
.landing-grid { display: grid; }
.landing-context, .method-panel { padding: 26px; min-width: 0; }
.landing-intro { margin-top: 12px; }
.purpose-panel {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 22px 0; padding: 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
}
.purpose-icon {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand); color: var(--brand-contrast);
  font-weight: 800; font-size: 13px;
}
.purpose-label { color: var(--brand-text); font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.purpose-panel p { margin: 0; font-size: 14px; line-height: 1.5; }
.purpose-panel .purpose-title { margin: 0 0 4px; font-size: 17px; }
.purpose-description { color: var(--muted); margin-top: 5px !important; }
.how-it-works h2, .method-panel h2, .section-title {
  margin: 0 0 14px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em;
}
.how-it-works ol { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.how-it-works li { display: flex; gap: 10px; align-items: flex-start; }
.how-it-works li > span {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--surface-2); color: var(--brand-text);
  font-size: 11px; font-weight: 750;
}
.how-it-works li div { display: grid; gap: 2px; }
.how-it-works strong { font-size: 13px; }
.how-it-works small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.safety-note, .privacy-note {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 22px;
  color: var(--ok); font-size: 12px; line-height: 1.45;
}
.safety-note svg, .privacy-note svg { width: 21px; height: 21px; flex: none; }
.safety-note div { display: grid; gap: 2px; }
.safety-note span, .privacy-note span { color: var(--muted); }
.method-panel { background: var(--surface-2); border-top: 1px solid var(--line); }
.method-panel .lead { margin-bottom: 18px; }

/* Method chooser — large, tappable rows (mobile-first). */
.methods { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.method {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  cursor: pointer;
  transition: transform .06s ease, border-color .15s ease, background .15s ease;
  color: inherit;
  font: inherit;
}
.method:hover { border-color: var(--brand); }
.method:active { transform: scale(.99); }
.method[disabled] { opacity: .5; cursor: not-allowed; }
.method form { margin: 0; }
.method-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-text);
  display: grid; place-items: center;
}
.method-icon svg { width: 22px; height: 22px; }
.method-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.method-title { display: block; font-weight: 600; font-size: 16px; }
.method-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.method-badge {
  align-self: flex-start; margin-bottom: 5px; padding: 3px 7px; border-radius: 999px;
  background: var(--brand); color: var(--brand-contrast); font-size: 10px;
  font-weight: 750; letter-spacing: .03em; text-transform: uppercase;
}
.method-time, .provider-note { display: block; margin-top: 6px; font-size: 11px; line-height: 1.4; font-weight: 650; }
.method-time { color: var(--warn); }
.provider-note { color: var(--ok); }
.method-chev { color: var(--muted); flex: none; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 980px;
  padding: 13px 22px;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-primary { background: var(--brand); color: var(--brand-contrast); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }

/* Status badge */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 980px;
  font-weight: 600; font-size: 14px;
}
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); }
.status-danger { background: var(--danger-bg); color: var(--danger); }
.status-neutral { background: var(--surface-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Inline notice on the method chooser (e.g. a method is temporarily unavailable). */
.notice {
  padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  margin: 0 0 16px;
}
.notice-warn {
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
}
.notice-error {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

/* ============================================================
   Name-only IBAN entry step (§18). A large, OTP-style field so
   typing an IBAN on a phone is comfortable; grouped into 4s by
   /static/consumer/iban.js (progressive enhancement — the server
   strips spaces either way, so it works without JS).
   ============================================================ */
.iban-form { margin-top: 6px; }
.iban-label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 10px; color: var(--text); }
.iban-field {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.iban-field::placeholder { color: var(--muted); opacity: .45; }
.iban-field:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent);
}
.iban-field.is-error { border-color: var(--danger); }
.iban-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.iban-actions { margin-top: 20px; display: grid; gap: 10px; }

/* Confirm state — the resolved bank shown back for a yes/no. */
.iban-resolved {
  margin-top: 4px; padding: 22px 20px; border-radius: var(--radius-sm);
  text-align: center;
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
}
.iban-resolved-label { font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.iban-resolved-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: .06em;
  color: var(--text); margin: 0 0 14px; font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.iban-bank { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.iban-bic { font-size: 13px; color: var(--muted); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.iban-unresolved { font-size: 13px; color: var(--muted); margin: 0; }
.iban-question { text-align: center; font-weight: 600; font-size: 16px;
  color: var(--text); margin: 20px 0 14px; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

/* Detail rows (pennydrop) */
.rows { margin-top: 18px; border-top: 1px solid var(--line); }
.row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.row .k { color: var(--muted); }
.row .v { font-weight: 550; text-align: right; word-break: break-word; }
.row .v code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.qr {
  display: grid; place-items: center;
  padding: 18px; margin: 8px 0 4px;
  background: var(--qr-bg); border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.qr svg { width: 220px; height: 220px; }

/* Pennydrop: either scan the QR OR enter details manually — one transfer. */
.instruction-alert, .waiting-note, .review-time {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-sm); margin-top: 18px;
}
.instruction-alert { background: var(--warn-bg); color: var(--warn); }
.instruction-alert-icon {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--warn); color: var(--on-status); font-weight: 800;
}
.instruction-alert div, .waiting-note div, .review-time div { display: grid; gap: 3px; }
.instruction-alert span, .waiting-note span, .review-time span { font-size: 12px; line-height: 1.45; }
.pd-steps {
  list-style: none; display: grid; gap: 9px; margin: 20px 0 0; padding: 0;
}
.pd-steps li { display: flex; align-items: center; gap: 9px; font-size: 13px; line-height: 1.4; }
.pd-steps li > span {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--brand); color: var(--brand-contrast); font-size: 11px; font-weight: 750;
}
.pd-choice { margin: 20px 0 0; color: var(--text); font-size: 13px; line-height: 1.45; }
.pd-cols { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.pd-scan, .pd-manual { min-width: 0; }
.pd-manual { order: 1; }
.pd-or { order: 2; }
.pd-scan { order: 3; }
.pd-opt-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.pd-or {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 700; text-transform: uppercase;
  font-size: 12px; letter-spacing: .08em;
}
.pd-or span {
  padding: 2px 12px; border: 1px solid var(--line); border-radius: 980px;
  background: var(--surface);
}
.mobile-only-note { color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.row .v { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-emphasis { background: color-mix(in srgb, var(--brand) 7%, transparent); margin: 0 -10px; padding-inline: 10px; }
.copy-button {
  display: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px;
  background: var(--surface); color: var(--brand-text); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer;
}
.has-copy .copy-button { display: inline-flex; }
.waiting-note { background: var(--ok-bg); color: var(--ok); margin-top: 20px; }
.waiting-icon {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--ok); color: var(--on-status); font-weight: 800;
}
.waiting-note div span { color: var(--text); }

@media (min-width: 720px) {
  .wrap-wide { --maxw: 960px; }
  .landing-grid { grid-template-columns: minmax(0, .92fr) minmax(390px, 1.08fr); }
  .landing-context, .method-panel { padding: 38px; }
  .method-panel { border-top: 0; border-left: 1px solid var(--line); }
  .pd-cols { flex-direction: row; align-items: stretch; gap: 16px; }
  .pd-scan { order: 1; flex: 0 0 300px; display: flex; flex-direction: column; }
  .pd-scan .qr { margin: 0; }
  .pd-scan .qr svg { width: 100%; height: auto; }
  .pd-manual { order: 3; flex: 1 1 auto; min-width: 0; }
  .pd-manual .rows { margin-top: 0; border-top: 0; }
  .pd-or { order: 2; flex: 0 0 auto; align-items: center; }
  .mobile-only-note { display: none; }
  .manual-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr); gap: 42px; align-items: start; }
  .upload-panel { padding: 24px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); }
  .upload-form { margin-top: 0; }
}

.back-link {
  display: inline-block; margin-top: 18px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 550;
}
.back-link:hover { color: var(--brand-text); }

/* Manual document upload (§19c) — a plain multipart form, no JS needed (§16). */
.doc-list { margin: 16px 0 4px; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.7; }
.doc-list li { margin: 2px 0; }
.section-title { margin-top: 22px; }
.upload-form { margin-top: 20px; }
.file-field { display: block; }
.file-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.file-field input[type="file"] {
  display: block; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 14px; color: var(--text);
  padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.file-field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  margin-right: 12px; padding: 8px 14px; border-radius: 980px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.upload-form .btn { margin-top: 18px; }
.review-time { background: var(--warn-bg); color: var(--warn); }
.review-time-icon {
  display: grid; place-items: center; flex: none; min-width: 42px; height: 42px;
  border-radius: 50%; background: var(--warn); color: var(--on-status); font-weight: 800;
}
.review-time div span { color: var(--text); }
/* Outcome page — the decision, its meaning and the next step stay visually
   separate. The layout expands on desktop and stacks without losing hierarchy. */
.card.result-card {
  --result-accent: var(--muted);
  --result-soft: var(--surface-2);
  max-width: 900px; padding: 0; overflow: hidden; text-align: left;
  border-top: 4px solid var(--result-accent);
}
.result-card.result-ok { --result-accent: var(--ok); --result-soft: var(--ok-bg); }
.result-card.result-warn { --result-accent: var(--warn); --result-soft: var(--warn-bg); }
.result-card.result-danger { --result-accent: var(--danger); --result-soft: var(--danger-bg); }
.result-grid { display: grid; }
.result-hero { padding: 30px 28px 28px; }
.result-icon {
  display: grid; place-items: center; width: 58px; height: 58px;
  margin-bottom: 20px; border-radius: 50%; color: var(--result-accent);
  background: var(--result-soft);
}
.result-icon svg { width: 34px; height: 34px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.result-hero h1 { max-width: 18ch; font-size: clamp(28px, 4vw, 38px); }
.result-hero .lead { max-width: 48ch; font-size: 16px; }
.result-hero .status { margin-top: 20px; }
.result-next {
  display: flex; align-items: flex-start; gap: 13px; padding: 24px 28px;
  background: var(--surface-2); border-top: 1px solid var(--line);
}
.result-next-number {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: 50%; background: var(--result-accent); color: var(--on-status);
  font-size: 12px; font-weight: 800;
}
.result-panel-label {
  color: var(--result-accent); font-size: 11px; font-weight: 750;
  letter-spacing: .07em; text-transform: uppercase; margin-bottom: 5px;
}
.result-next h2, .result-details h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.result-next p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.result-action { margin-top: 18px; }
.result-next .back-link { display: block; text-align: center; }
.result-details { padding: 26px 28px; border-top: 1px solid var(--line); }
.result-checks { display: grid; gap: 15px; margin-top: 18px; }
.result-check { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.result-check-icon {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--ok); color: var(--on-status);
  font-size: 11px; font-weight: 800;
}
.result-check-icon.is-open { background: var(--warn); }
.result-check div { display: grid; gap: 3px; }
.result-check strong { font-size: 13px; line-height: 1.35; }
/* Only the description text is muted — NOT the check-icon span, which is a direct
   child of .result-check and must keep its on-status colour (a bare `.result-check
   span` also matched the icon and greyed the tick out, §16 contrast). */
.result-check div span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.result-check .result-check-icon { color: var(--on-status); }
.result-data-scope, .result-trust {
  display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px;
  margin-top: 20px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.5;
}
.result-data-scope { background: var(--surface-2); }
.result-trust {
  margin: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: color-mix(in srgb, var(--ok) 7%, var(--surface)); color: var(--ok);
  padding: 18px 28px;
}
.result-data-scope svg, .result-trust svg {
  width: 22px; height: 22px; flex: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.result-data-scope div, .result-trust div { display: grid; gap: 2px; }
.result-data-scope span, .result-trust span { color: var(--muted); }
.result-trust a { color: var(--ok); font-weight: 650; text-underline-offset: 2px; }
.result-trust a:hover { color: var(--text); }

@media (min-width: 720px) {
  .result-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
  .result-hero { padding: 42px 42px 38px; }
  .result-next { padding: 42px 34px; border-top: 0; border-left: 1px solid var(--line); }
  .result-details { padding: 30px 42px 34px; }
  .result-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .result-trust { padding: 20px 42px; }
}

.note { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 18px; }
.footer { color: var(--muted); font-size: 12px; margin-top: 28px; text-align: center; }
.footer a { color: var(--muted); }
.footer-note { margin-bottom: 8px; }
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 14px;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: var(--text); }
.footer-links a + a { position: relative; }
.footer-links a + a::before {
  content: "·"; position: absolute; left: -9px; color: var(--line);
}

@media (min-width: 560px) {
  h1 { font-size: 30px; }
  .card { padding: 34px; }
}

@media (max-width: 420px) {
  .wrap { padding: 20px 14px 44px; }
  .topline { margin-bottom: 18px; }
  .brand { font-size: 15px; }
  .landing-context, .method-panel, .card { padding: 22px 18px; }
  .landing-card { padding: 0; }
  .flow-label { font-size: 10px; }
  .method { padding: 14px; gap: 11px; }
  .method-icon { width: 36px; height: 36px; }
  .row { flex-direction: column; gap: 5px; }
  .row .v { justify-content: space-between; text-align: left; }
  .qr svg { width: min(220px, 100%); height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Case-dependent support contact line (§21). */
.footer-support { margin-top: 8px; font-size: 13px; color: var(--muted); }
.footer-support a { color: var(--brand-text); }

/* Public root notice (/) — a stray visitor with no verification link (§22).
   A polished hero: a tinted gradient, an icon badge, trust chips, a soft notice. */
.root-hero {
  text-align: center;
  padding: 48px 30px 34px;
  background:
    radial-gradient(130% 70% at 50% -10%,
      color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface));
}
.root-badge {
  width: 74px; height: 74px; margin: 0 auto 22px;
  border-radius: 22px; display: grid; place-items: center;
  color: var(--brand-text);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 22%, transparent);
}
.root-badge svg { width: 38px; height: 38px; }
.root-hero .eyebrow { display: block; }
.root-title { font-size: 29px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.root-lead { font-size: 16px; max-width: 30rem; margin: 0 auto 22px; }
.root-points {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 0 0 26px;
}
.root-point {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px;
}
.root-point svg { width: 16px; height: 16px; color: var(--brand-text); flex: none; }
.root-notice {
  text-align: left; margin: 0 auto 24px; max-width: 30rem;
  padding: 15px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
}
.root-notice strong { display: block; font-size: 14px; margin-bottom: 3px; color: var(--text); }
.root-notice p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.root-hero .btn-primary { max-width: 24rem; margin: 0 auto; }

/* House "beyond by RS2" wordmark on partner-less pages (root/notice), theme-aware.
   Selectors are scoped under `.brand img` so they beat the generic `.brand img`
   height/display rule (specificity), otherwise both logos would show at once. */
.brand img.brand-logo { height: 24px; }
.brand img.brand-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img.brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .brand img.brand-logo-dark { display: block; }
}
:root[data-theme="dark"] .brand img.brand-logo-light { display: none; }
:root[data-theme="dark"] .brand img.brand-logo-dark { display: block; }

/* ============================================================
   Reference code on an error notice (§11/§22). Shown only for a 5xx: a
   consumer reads it back to support, who finds the request in the audit trail.
   Monospaced and spaced out because it is read aloud and copied by hand — the
   same reasoning as .iban-field above. Tokens only, so a partner skin restyles
   it without touching this file (§16).
   ============================================================ */
.trace-note { margin-top: 18px; }
.trace-id {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-left: 4px;
  /* It gets selected and copied, so keep it one unbreakable token on a phone. */
  white-space: nowrap;
  user-select: all;
}
