/*
 * Insight's own stylesheet — the SECUTIX Design System, copied rather than
 * imported so the app still looks like SECUTIX after it is cut out of this
 * repository: burgundy #B40050 to orange #FF5500, the 135° gradient for the
 * masthead, the sign-in half and the overlays' bars only, neutral greys (no
 * full black anywhere), Montserrat, 12 px cards, 8 px buttons, 999 px pills.
 * Cards never carry a left-edge accent; their state shows as a coloured top
 * rule.
 *
 * Every colour is a token on :root, and the dark theme redefines the same
 * tokens — under prefers-color-scheme while nothing is chosen, and under
 * [data-theme] once the reader picks (theme.js). Nothing below names a colour
 * that a theme cannot reach, except on the gradient, which is the same in both.
 *
 * --accent is overwritten at runtime from the institution's branding, which is
 * the one thing the subdomain decides.
 */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --burgundy:       #b40050;
  --burgundy-dark:  #8c0046;
  --burgundy-mid:   #c8508c;
  --orange:         #ff5500;
  --orange-dark:    #c82d00;
  --orange-mid:     #ff8255;
  --accent:         #b40050;
  --accent-hover:   #8c0046;
  --accent-ink:     #b40050;
  --orange-ink:     #c2410c;
  --gradient:       linear-gradient(135deg, #b40050 0%, #c4234f 42%, #ff5500 100%);
  --gradient-btn:   linear-gradient(135deg, #b40050 0%, #c4234f 45%, #cc3d0b 100%);

  --ground:         #f4f6f7;
  --surface:        #ffffff;
  --surface-2:      #fafbfc;
  --line:           #e1e6e9;
  --line-strong:    #cdd5d9;
  --ink:            #232c32;
  --slate:          #3c4b55;
  --muted:          #5e686e;

  --success:        #1b7a55;
  --success-bg:     #eaf5f0;
  --success-line:   #b4dcc8;
  --wait:           #8f5400;
  --wait-bg:        #fcf0df;
  --wait-line:      #f2d3a5;
  --danger:         #b42318;
  --danger-bg:      #fdeee8;
  --danger-line:    #f4c3b4;
  --info:           #c8508c;
  --offer-bg:       #fff4ee;
  --offer-line:     #ffd3bc;

  --cat-0:          #b40050;
  --cat-1:          #ff5500;
  --cat-2:          #3c4b55;
  --cat-3:          #c8508c;

  --scrim:          rgba(20, 26, 30, 0.55);
  --shadow-sm:      0 1px 2px rgba(35, 44, 50, 0.05), 0 8px 24px -14px rgba(35, 44, 50, 0.22);
  --shadow-md:      0 2px 6px rgba(35, 44, 50, 0.07), 0 26px 50px -22px rgba(35, 44, 50, 0.38);
  --shadow-lg:      0 24px 48px rgba(140, 0, 70, 0.18);

  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-pill:    999px;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --font:           "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:           ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --container:      1180px;
}

/* The dark tokens, twice: once for "follow the system", once for "chosen here". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent-ink:   #f06398;
    --orange-ink:   #ff8a45;
    --ground:       #12161a;
    --surface:      #1b2126;
    --surface-2:    #20272d;
    --line:         #2c353c;
    --line-strong:  #3b464e;
    --ink:          #ecf1f4;
    --slate:        #c3cdd4;
    --muted:        #9aa6ad;
    --success:      #4fc395;
    --success-bg:   #16332a;
    --success-line: #2c5b48;
    --wait:         #e8a855;
    --wait-bg:      #352814;
    --wait-line:    #5a4422;
    --danger:       #ff8a75;
    --danger-bg:    #3a1d18;
    --danger-line:  #5c2c24;
    --offer-bg:     #2a1b14;
    --offer-line:   #4a3225;
    --cat-0:        #f06398;
    --cat-1:        #ff8a45;
    --cat-2:        #93aebe;
    --cat-3:        #e58fbc;
    --scrim:        rgba(0, 0, 0, 0.6);
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -14px rgba(0, 0, 0, 0.8);
    --shadow-md:    0 2px 6px rgba(0, 0, 0, 0.55), 0 26px 50px -22px rgba(0, 0, 0, 0.9);
    --shadow-lg:    0 24px 48px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-ink:   #f06398;
  --orange-ink:   #ff8a45;
  --ground:       #12161a;
  --surface:      #1b2126;
  --surface-2:    #20272d;
  --line:         #2c353c;
  --line-strong:  #3b464e;
  --ink:          #ecf1f4;
  --slate:        #c3cdd4;
  --muted:        #9aa6ad;
  --success:      #4fc395;
  --success-bg:   #16332a;
  --success-line: #2c5b48;
  --wait:         #e8a855;
  --wait-bg:      #352814;
  --wait-line:    #5a4422;
  --danger:       #ff8a75;
  --danger-bg:    #3a1d18;
  --danger-line:  #5c2c24;
  --offer-bg:     #2a1b14;
  --offer-line:   #4a3225;
  --cat-0:        #f06398;
  --cat-1:        #ff8a45;
  --cat-2:        #93aebe;
  --cat-3:        #e58fbc;
  --scrim:        rgba(0, 0, 0, 0.6);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -14px rgba(0, 0, 0, 0.8);
  --shadow-md:    0 2px 6px rgba(0, 0, 0, 0.55), 0 26px 50px -22px rgba(0, 0, 0, 0.9);
  --shadow-lg:    0 24px 48px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.band :focus-visible, .login-art :focus-visible, .viewer-bar :focus-visible, .checkout-head :focus-visible { outline-color: #ffffff; }

/* ── The gradient band: the masthead, or a message on its own ─────────────── */

.band {
  background: var(--gradient);
  color: #ffffff;
  padding: 0 28px;
}
.band > * { max-width: var(--container); margin-left: auto; margin-right: auto; }

header.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 0;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .stx-logo { height: 26px; width: auto; display: block; }
.topbar .stx-mark { height: 26px; width: auto; display: none; }
.topbar .product { font-weight: 500; font-size: 19px; letter-spacing: 0.01em; opacity: 0.92; }
.topbar .spacer { flex: 1; }
.topbar .tools { display: flex; align-items: center; gap: 8px; }

/* The account pill: logo, organisation over the user, and the round badge. */
.acct { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct:has(.org:empty):has(.whoami:empty):has(.avatar.hidden) { display: none; }
.acct .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.acct .org { font-size: 13px; font-weight: 700; }
.acct .whoami { font-size: 11px; opacity: 0.9; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .org-logo { height: 28px; width: auto; border-radius: 6px; background: #ffffff; padding: 3px; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--burgundy);
  font-size: 12.5px;
  font-weight: 800;
}
.topbar .acct:has(.whoami:not(:empty)) {
  padding: 4px 5px 4px 14px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.16);
}

/* The language choice: five languages, each named in itself. */
.lang { position: relative; display: inline-flex; align-items: center; color: #ffffff; }
.lang select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 32px;
  padding: 6px 28px 6px 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.16);
  color: #ffffff;
  font: 700 11.5px/1 var(--font);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 200ms var(--ease);
}
.lang select:hover { background: rgba(0, 0, 0, 0.28); }
.lang select option { color: var(--ink); background: var(--surface); }
.lang svg { position: absolute; pointer-events: none; }
.lang .lang-globe { left: 10px; }
.lang .lang-caret { right: 10px; }

/* Light or dark. The icon shows the theme the switch leads to. */
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 12px 6px 9px;
  border-radius: var(--radius-pill);
  font: 700 12px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.theme-btn:hover { background: rgba(0, 0, 0, 0.28); }
.tb-ic { display: grid; place-items: center; width: 16px; height: 16px; }
.tb-ic svg { grid-area: 1 / 1; }
.tb-sun { display: none; }
:root[data-theme="dark"] .tb-moon { display: none; }
:root[data-theme="dark"] .tb-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tb-moon { display: none; }
  :root:not([data-theme="light"]) .tb-sun { display: block; }
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.display {
  margin: 12px 0 0;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 14ch;
}
.display.sm { font-size: clamp(26px, 4vw, 40px); max-width: 22ch; }
.hero-lede {
  margin: 18px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  max-width: 620px;
  opacity: 0.94;
}

.band-message { padding: 64px 0 96px; }
.band-message .login-logo { margin-bottom: 20px; }

/* The signed-out panel's way back in: the organisation's name in front of this
   environment's domain, which app.js fills in. Prefixed signed-out- so it can
   restyle nothing else. */
.signed-out-back { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; max-width: 620px; }
.signed-out-label { flex: 1 0 100%; font-size: 14px; font-weight: 500; opacity: 0.9; }
.signed-out-field {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 0 12px;
}
.signed-out-field input {
  width: 180px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 10px 0;
  outline: none;
}
.signed-out-suffix { font-size: 14px; opacity: 0.8; white-space: nowrap; }
.signed-out-error { flex: 1 0 100%; font-size: 14px; margin: 0; opacity: 0.95; }

/* ── The sign-in page: two halves, then the landing sections ──────────────
   Everything the landing page draws is prefixed lp- or login- so it can never
   restyle a signed-in screen. */

@keyframes lp-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes lp-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lp-shimmer { to { background-position: -200% 0; } }
@keyframes lp-fill { to { width: 100%; } }

/* No masthead on the sign-in page: the page is its own two halves, edge to edge. */
.band.is-landing { padding: 0; background: var(--surface); }
.band.is-landing > .topbar { display: none; }
.band.is-landing > .sign-in { max-width: none; }

.sign-in {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}

.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 48px 44px;
  background: var(--gradient);
  color: #ffffff;
}
.login-art::after { content: ""; position: absolute; inset: auto -120px -180px auto; width: 460px; height: 460px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.login-art::before { content: ""; position: absolute; inset: -160px auto auto -100px; width: 340px; height: 340px; border-radius: 50%; background: rgba(0, 0, 0, 0.09); }
.login-art > * { position: relative; z-index: 1; }

/* The official lockup, drawn by the stylesheet: the sign-in markup loads nothing itself. */
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-logo {
  display: block;
  width: 115px;
  height: 28px;
  background: no-repeat left center / contain url("/assets/brand/secutix-logo-white.svg");
}
.login-product { font-size: 19px; font-weight: 500; opacity: 0.9; }

.login-copy { display: flex; flex-direction: column; gap: 16px; }
.lp-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lp-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.login-h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; max-width: 15ch; text-wrap: balance; }
.login-org { margin: 0; font-size: 18px; font-weight: 700; opacity: 0.95; }
.login-org:empty { display: none; }
.login-lede { margin: 0; font-size: 15.5px; line-height: 1.6; max-width: 44ch; opacity: 0.95; }

.art-stats { display: flex; flex-wrap: wrap; gap: 18px 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.32); }
.art-stats div { max-width: 200px; }
.art-stats b { display: block; font-size: 22px; font-weight: 800; }
.art-stats span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.92; }

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 48px 44px;
  background: var(--surface);
  color: var(--ink);
}
.login-form > * { width: 100%; max-width: 400px; }
.login-form h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.login-form .note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.login-top { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.login-top .theme-btn, .login-top .lang select { color: var(--slate); background: var(--surface-2); border: 1px solid var(--line-strong); }
.login-top .theme-btn:hover, .login-top .lang select:hover { color: var(--accent-ink); border-color: var(--accent-ink); background: var(--surface-2); }
.login-top .lang { color: var(--slate); }
.demo-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.demo-note b { color: var(--ink); font-weight: 700; }
.login-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; font-weight: 700; }
.login-links a { color: var(--accent-ink); text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

/* The portal window both replays are drawn in. */
.lp-window {
  width: 100%;
  max-width: 560px;
  justify-self: center;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(60, 0, 30, 0.35);
  overflow: hidden;
}
.login-art .lp-window { max-width: 440px; }
.login-art .lp-window-body { min-height: 230px; }
.lp-window-bar { display: flex; gap: 8px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.lp-window-band { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--burgundy); color: #ffffff; font-size: 13px; font-weight: 700; }
.lp-ill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255, 255, 255, 0.2); padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.lp-window-body { display: grid; gap: 12px; align-content: start; min-height: 300px; padding: 16px; }
.lp-window-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--orange-ink); }
.lp-rcard { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--success); border-radius: var(--radius-md); animation: lp-rise 0.5s both; }
.lp-rcard.wait { border-top-color: var(--orange-mid); }
.lp-rcard b { font-size: 14px; }
.lp-rcard small, .lp-muted { font-size: 12px; color: var(--muted); }
.lp-tag { grid-row: span 2; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--success-bg); color: var(--success); font-size: 11px; font-weight: 700; white-space: nowrap; }
.lp-rcard.wait .lp-tag { background: var(--wait-bg); color: var(--wait); }
.lp-opened-title { font-size: 15px; }
.lp-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 10px 6px 0; border-bottom: 1px solid var(--line); }
.lp-chart span { flex: 1; border-radius: 4px 4px 0 0; background: var(--burgundy); transform-origin: bottom; animation: lp-grow 0.7s both; }
.lp-chart span:nth-child(even) { background: var(--orange-mid); }
.lp-skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: lp-shimmer 1.4s linear infinite; }
.lp-w80 { width: 80%; }
.lp-w55 { width: 55%; }
.lp-signin { display: grid; justify-items: center; gap: 14px; padding: 30px 10px; text-align: center; }
.lp-signin-title { font-size: 18px; }
.lp-field { width: 260px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); text-align: left; font-size: 13px; color: var(--muted); }
.lp-code { display: flex; gap: 8px; }
.lp-code span { display: grid; place-items: center; width: 34px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 800; animation: lp-rise 0.4s both; }
.lp-catalogue { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-ccard { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; animation: lp-rise 0.5s both; }
.lp-thumb { display: flex; align-items: flex-end; gap: 4px; height: 70px; padding: 10px; background: linear-gradient(135deg, rgba(180, 0, 80, 0.12), rgba(255, 85, 0, 0.18)); }
.lp-thumb span { flex: 1; border-radius: 3px 3px 0 0; background: var(--burgundy-mid); opacity: 0.7; transform-origin: bottom; animation: lp-grow 0.7s both; }
.lp-ccard-text { display: grid; gap: 4px; padding: 10px 12px; }
.lp-ccard-text b { font-size: 13px; }
.lp-act { font-size: 12px; font-weight: 800; color: var(--accent-ink); }
.lp-toast { justify-self: center; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--radius-pill); background: var(--slate); color: var(--surface); font-size: 13px; font-weight: 600; animation: lp-rise 0.4s both; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffffff; animation: lp-pulse 1.6s infinite; flex: none; }
.lp-dot.ok { background: #5fd39b; }

/* The sections below the first screen. */
.landing { background: var(--surface); color: var(--ink); }
.lp-wrap { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.lp-block { padding: 96px 0; scroll-margin-top: 16px; }
.lp-block.alt { background: var(--ground); }
.lp-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.lp-big { max-width: 960px; margin: 14px 0 0; font-weight: 800; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.lp-intro { max-width: 760px; margin: 16px 0 44px; font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--muted); }
.lp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lp-col { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.lp-col h3 { margin: 0; font-size: 20px; font-weight: 800; }
.lp-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--gradient); color: #ffffff; }
.lp-who { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lp-tick { display: flex; gap: 10px; margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--slate); }
.lp-tick::before { content: "✓"; flex: none; color: var(--accent-ink); font-weight: 800; }
.lp-loop { margin-top: 40px; }
.lp-loop-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lp-loop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.lp-loop-chip { padding: 11px 18px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 700; }
.lp-loop-chip.end { border-color: transparent; background: var(--burgundy); color: #ffffff; }
.lp-arrow { color: var(--orange); font-weight: 900; }

.lp-how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.lp-steps { display: grid; gap: 10px; }
.lp-step {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.lp-step b { font-size: 15.5px; }
.lp-step small { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.lp-n { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.lp-step[aria-current="step"] { border-color: var(--accent-ink); box-shadow: var(--shadow-md); }
.lp-step[aria-current="step"] .lp-n { background: var(--burgundy); border-color: var(--burgundy); color: #ffffff; }
.lp-bar { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--gradient); }
.lp-step.playing .lp-bar { animation: lp-fill 4.5s linear forwards; }
.lp-replay { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.lp-replay button { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: none; color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.lp-stage { max-width: none; box-shadow: var(--shadow-md); }
.lp-stage .lp-window-body { min-height: 360px; }

.lp-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.lp-trust > div { padding-top: 18px; border-top: 3px solid var(--burgundy); }
.lp-trust > div.key { border-top-color: var(--orange); }
.lp-trust h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.lp-trust p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

.lp-cta { background: var(--gradient); color: #ffffff; text-align: center; }
.lp-cta .lp-wrap { display: grid; justify-items: center; gap: 22px; padding-top: 88px; padding-bottom: 88px; }
.lp-cta h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -0.02em; }
.lp-fine { margin: 0; font-size: 13px; line-height: 1.5; opacity: 0.92; }

/* ── Buttons (8 px, lift on hover, never opacity-only) ───────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font: 700 13.5px/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms var(--ease), transform 120ms var(--ease), box-shadow 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.btn:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.lg { min-height: 46px; padding: 12px 22px; font-size: 14.5px; }
.btn.btn-primary, .btn.gradient { background: var(--gradient-btn); box-shadow: 0 6px 16px -8px rgba(180, 0, 80, 0.9); }
.btn.btn-primary:hover, .btn.gradient:hover { background: var(--gradient-btn); box-shadow: 0 10px 22px -8px rgba(180, 0, 80, 0.85); }
.btn.secondary { background: var(--surface); color: var(--accent-ink); border-color: var(--accent-ink); }
.btn.secondary:hover { background: var(--burgundy); border-color: var(--burgundy); color: #ffffff; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: var(--surface); box-shadow: none; }
.btn.on-brand { background: #ffffff; color: var(--burgundy); }
.btn.on-brand:hover { background: #ffffff; color: var(--burgundy-dark); box-shadow: var(--shadow-lg); }
.btn.on-brand-outline { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.8); }
.btn.on-brand-outline:hover { background: rgba(0, 0, 0, 0.16); box-shadow: none; }

/* ── Waiting ──────────────────────────────────────────────────────────────
 * One spinner and one skeleton, for every action that waits. The spinner is
 * decoration only (app.js marks it aria-hidden); what a screen reader is told
 * is aria-busy and the swapped label. A reader who asked for less motion gets
 * the label and no animation at all.
 */

/* The retry control the error banner grows when the action can be run again.
   It sits on its own line under the sentence, and waits like any other. */
.error .btn.retry { display: inline-flex; margin-top: 12px; }

.btn[aria-busy="true"] { cursor: progress; }
.btn:disabled[aria-busy="true"] { opacity: 0.8; }
.btn-waiting { white-space: nowrap; }

.spinner {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--radius-pill);
  animation: stx-spin 700ms linear infinite;
}
.btn.lg .spinner { width: 16px; height: 16px; }

@keyframes stx-spin { to { transform: rotate(360deg); } }

/* The first-load line above each list, and the cards that stand in for the
   ones not here yet. The real empty state is the backend's answer, never this. */
.list-loading { margin: 0 0 16px; color: var(--muted); font-style: italic; }

.report-card.is-skeleton { gap: 14px; padding: 26px 22px; pointer-events: none; }
.skeleton-line {
  height: 12px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--line);
  animation: stx-pulse 1400ms var(--ease) infinite;
}
.skeleton-line.wide { height: 18px; width: 70%; }
.skeleton-line.short { width: 40%; }

@keyframes stx-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ── The section bar: sticky under the masthead ──────────────────────────── */

.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px -16px rgba(35, 44, 50, 0.5);
}
.subnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: 2px; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 12px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
}
.tab .count:empty { display: none; }
.tab[aria-selected="true"] .count { color: var(--accent-ink); border-color: var(--accent-ink); }
.tab-link { margin-left: auto; }

/* ── The body: hero, then the two screens, then how it works ─────────────── */

main { max-width: var(--container); margin: 0 auto; padding: 0 28px 24px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: 32px 0 24px;
}
.hero .eyebrow { color: var(--accent-ink); }
.hero .display {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-transform: none;
  max-width: 17ch;
  color: var(--ink);
}
.hero .hero-lede { margin-top: 12px; font-size: 15.5px; color: var(--muted); max-width: 58ch; opacity: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* The two big tiles under the hero's words: each one opens its screen. */
.cta-tile {
  flex: 1 1 240px;
  max-width: 330px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 2px solid transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.cta-tile:hover { transform: translateY(-2px); }
.cta-tile .ct-ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px; }
.cta-tile .ct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cta-tile .ct-t b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.cta-tile .ct-t span { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.cta-tile .ct-t span:empty { display: none; }
.cta-tile .ct-arrow { flex: none; font-size: 20px; font-weight: 800; transition: transform 150ms var(--ease); }
.cta-tile:hover .ct-arrow { transform: translateY(3px); }
.cta-tile.primary { background: var(--gradient-btn); color: #ffffff; box-shadow: 0 14px 30px -12px rgba(180, 0, 80, 0.75); }
.cta-tile.primary .ct-ic { background: rgba(255, 255, 255, 0.18); }
.cta-tile.primary .ct-t span { color: rgba(255, 255, 255, 0.92); }
.cta-tile.outline { background: var(--surface); color: var(--ink); border-color: var(--accent-ink); box-shadow: var(--shadow-md); }
.cta-tile.outline .ct-ic { background: var(--offer-bg); color: var(--accent-ink); }
.cta-tile.outline .ct-t span { color: var(--muted); }
.cta-tile.outline .ct-arrow { color: var(--accent-ink); }

/* At a glance: the four counts, as one panel beside the hero. */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.stats-title { grid-column: 1 / -1; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat { padding-left: 12px; border-left: 3px solid var(--burgundy); min-width: 0; }
.stat.tone-ok { border-left-color: var(--success); }
.stat.tone-wait { border-left-color: var(--orange-mid); }
.stat.tone-info { border-left-color: var(--info); }
.stat-label { margin: 0; font-size: 11.5px; font-weight: 700; color: var(--slate); }
.stat-value { margin: 2px 0 0; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-note { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

.error {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  font-weight: 600;
}
.notice {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: var(--ink);
  font-weight: 500;
}
/* Bought, first copy still being prepared: neither the green of a finished
   sale nor the red of a failure, because it is neither. */
.notice.is-preparing { background: var(--wait-bg); border-color: var(--wait-line); }

/* The two screens, each a zone of its own colour: what you have, what you could add. */
.screens { scroll-margin-top: 66px; }
.zone { margin-top: 12px; padding: 20px 22px 24px; border-radius: var(--radius-lg); }
.zone.have { background: var(--success-bg); border: 1px solid var(--success-line); }
.zone.add { background: var(--surface-2); border: 1px solid var(--line-strong); }
.zone-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.zone.have .zone-kicker { color: var(--success); border: 1px solid var(--success-line); }
.zone.add .zone-kicker { color: var(--accent-ink); border: 1px solid var(--line-strong); }
.section-title { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.015em; }
p.lede { margin: 4px 0 16px; font-size: 13.5px; color: var(--muted); }
.filter-empty { margin: 8px 0 0; color: var(--muted); font-style: italic; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--slate);
  font: 600 12.5px/1.2 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.filter-chip::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--accent-ink); }
.filter-chip:first-child::before { display: none; }
.filter-chip:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.filter-chip.is-active { background: var(--burgundy); border-color: var(--burgundy); color: #ffffff; }
.filter-chip.is-active::before { box-shadow: 0 0 0 1.5px #ffffff; background: #ffffff; }
.filter-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.filter-chip.is-active .filter-count { color: #ffffff; opacity: 0.85; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.report-card {
  --catcol: var(--cat-0);
  --rule: var(--catcol);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.report-card.cat-1 { --catcol: var(--cat-1); }
.report-card.cat-2 { --catcol: var(--cat-2); }
.report-card.cat-3 { --catcol: var(--cat-3); }
.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--muted); }
/* The top rule says the state on an owned card, and the category on an offer. */
.report-card.tone-ok { --rule: var(--success); }
.report-card.tone-wait { --rule: var(--orange-mid); }
.report-card.tone-off { --rule: var(--line-strong); }
.report-card.is-muted { opacity: 0.72; }
.report-card.is-muted:hover { transform: none; box-shadow: var(--shadow-sm); }
.rule-top { height: 5px; background: var(--rule); }

.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 0; flex: 1; }
.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-row .pill { margin-left: auto; }

/* The glyph: a tinted square with the format's icon cut out of it. */
.glyph {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.glyph::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--catcol);
  -webkit-mask: no-repeat center / contain var(--glyph-icon);
  mask: no-repeat center / contain var(--glyph-icon);
}
.glyph-report { --glyph-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.glyph-data { --glyph-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M9 10v10'/%3E%3C/svg%3E"); }

.card-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--catcol); }
.chip.tag { padding: 1px 6px; border: 1px dashed var(--line-strong); border-radius: 4px; letter-spacing: 0.06em; }
.chip.tag::before { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.wait { background: var(--wait-bg); color: var(--wait); }
.pill.off { color: var(--muted); border: 1px dashed var(--line-strong); }

.card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.28; text-wrap: pretty; }
.card-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.card-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-highlight { margin: 0; font-weight: 700; }
.card-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--slate);
}
.tone-wait .card-note { background: var(--wait-bg); border-color: var(--wait-line); color: var(--wait); }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
}
.card-foot:has(.card-actions:empty):not(:has(.card-figure)) { display: none; }
.card-figure { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.card-actions .btn { min-height: 34px; padding: 7px 13px; font-size: 12.5px; }

.empty {
  margin-top: 4px;
  padding: 40px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}
.empty h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.empty p { margin: 0 0 18px; color: var(--muted); }
.empty p:last-child { margin-bottom: 0; }

/* ── How Insight works, and the foot of the page ─────────────────────────── */

.how {
  margin-top: 40px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 66px;
}
.how h2 { margin: 0 0 16px; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.step { display: flex; flex-direction: column; gap: 6px; }
.step .num { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--orange-ink); }
.step h3 { margin: 0; font-size: 15px; font-weight: 700; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }
.takeaway { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--slate); }

.portal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 40px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.portal-foot b { color: var(--ink); }
.foot-org:not(:empty)::before { content: " · "; }

/* ── Overlays: the viewer and the checkout ───────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer { padding: 0; align-items: stretch; }
.viewer-panel { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--ground); }
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--gradient);
  color: #ffffff;
}
.viewer-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.viewer-heading strong { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-meta { font-size: 13px; opacity: 0.9; }
.viewer-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.viewer-lang { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.viewer-lang select {
  font: 600 14px var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 38px;
}
/* "Not yet available in French — shown in English": one quiet line, never a modal. */
.viewer-note {
  margin: 12px auto 0;
  width: min(1200px, calc(100% - 48px));
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}
/* The paper stays white in both themes: a report is drawn for a white page. */
.paper {
  flex: 1;
  margin: 24px auto;
  width: min(1200px, calc(100% - 48px));
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.paper iframe { display: block; width: 100%; height: 100%; border: 0; background: #ffffff; }

.checkout-panel {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.checkout-head { background: var(--gradient); color: #ffffff; padding: 26px 30px; }
.checkout-head h2 { margin: 8px 0 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.checkout-meta { margin: 6px 0 0; font-size: 14px; opacity: 0.92; }
.checkout-meta:empty { display: none; }
.checkout-body { padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 20px; }
.checkout-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.checkout-price { font-size: 26px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.test-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--offer-bg);
  border: 1px solid var(--offer-line);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.test-notice svg { flex-shrink: 0; margin-top: 1px; color: var(--orange-ink); }
.test-notice strong { display: block; }
.checkout-body .error { margin: 0; }
.checkout-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

/* ── Less motion ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: currentColor; opacity: 0.7; }
  .skeleton-line { animation: none; }
  .lp-dot, .lp-rcard, .lp-chart span, .lp-thumb span, .lp-skel, .lp-code span, .lp-ccard, .lp-toast, .lp-step.playing .lp-bar { animation: none; }
  .report-card:hover, .cta-tile:hover { transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ── Narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .sign-in { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .login-art { padding: 28px 20px; gap: 18px; }
  .login-art .lp-window, .art-stats, .login-lede { display: none; }
  .login-h1 { font-size: 28px; }
  .login-form { padding: 28px 20px 40px; justify-content: flex-start; }
  .lp-how { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
}

@media (max-width: 640px) {
  .band { padding: 0 16px; }
  main { padding: 0 16px 24px; }
  .subnav-inner { padding: 0 8px; }
  .tab { padding-left: 9px; padding-right: 9px; }
  .lp-wrap { padding: 0 16px; }
  .lp-block { padding: 64px 0; }
  .lp-catalogue { grid-template-columns: 1fr; }
  .topbar .stx-logo { display: none; }
  .topbar .stx-mark { display: block; }
  .topbar .product { font-size: 17px; }
  .theme-btn .tb-l { display: none; }
  .theme-btn { padding: 7px; }
  .acct .who { display: none; }
  .topbar .acct:has(.whoami:not(:empty)) { padding: 3px; }
  .cta-tile { max-width: none; flex-basis: 100%; }
  .zone { padding: 16px 14px 18px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 14px; }
  .chips::-webkit-scrollbar { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .how { padding: 20px 16px; }
  .checkout-head, .checkout-body { padding-left: 20px; padding-right: 20px; }
  .checkout-actions .btn { flex: 1 1 auto; }
  .viewer-bar { padding: 12px 16px; flex-wrap: wrap; }
  .paper { margin: 12px auto; width: calc(100% - 24px); }
}
