/* Emergence Online public website - "Nightfall" theme (concept A). Self-hosted fonts only, no frameworks.
   Strict CSP (style-src 'self'; font-src 'self'): no inline styles anywhere, so every look lives in this file.
   The staff portal (layouts/admin) keeps css/eo.css. */

@font-face {
  font-family: "Archivo"; src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0B0D10; --panel: #13171C; --panel-2: #191E24; --line: #1E232A; --line-2: #3A414A;
  --ink: #E9ECEF; --ink-hi: #FFFFFF; --body: #C9CED4; --soft: #B6BDC5; --muted: #9AA3AD; --faint: #8A939D;
  --accent: #F2A33A; --accent-hi: #FFC46B; --accent-ink: #111111; --accent-wash: #241B0E;
  --ok: #6FCF8E; --ok-wash: #12261A; --danger: #F38A82; --danger-bg: #C2413B; --danger-wash: #2A1414;
  --warn: #F2C35A; --warn-wash: #2A2110; --info: #9FB3FF; --info-wash: #161B2E;
  --radius: 6px; --gutter: 5%;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
img, svg, picture { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.disp, h1, h2 { font-family: var(--display); font-stretch: 72%; font-weight: 900; text-transform: uppercase; letter-spacing: -0.005em; color: var(--ink-hi); }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 0.95; margin: 0 0 16px; overflow-wrap: anywhere; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1; margin: 28px 0 12px; }
h3 { font-size: 18px; line-height: 1.3; margin: 18px 0 8px; color: var(--ink-hi); font-weight: 600; }
p { margin: 0 0 12px; }
ul { padding-left: 22px; }
strong { color: var(--ink-hi); font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 14px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 4px; font-weight: 700; }
.skip:focus { top: 12px; color: var(--accent-ink); }

/* ---- header ------------------------------------------------------------------------------------------------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 10; }
.top .hdr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 16px var(--gutter); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink-hi); text-decoration: none; }
.logo:hover { color: var(--ink-hi); text-decoration: none; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .disp { font-size: 26px; line-height: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--body); padding: 6px 0; border-bottom: 2px solid transparent; text-decoration: none; }
.nav a:hover, .nav a.on { color: var(--ink-hi); border-bottom-color: var(--accent); text-decoration: none; }
.nav a.on { font-weight: 600; }
.ext::after { content: " \2197"; font-size: 0.85em; color: var(--muted); }
.who { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--soft); font-size: 15px; }
.who form { margin: 0; }
.who > a:not(.btn) { color: var(--body); }
.who > a:not(.btn):hover { color: var(--ink-hi); }
.who .name { color: var(--body); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- buttons ------------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--accent); border-radius: 4px;
  padding: 11px 18px; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; text-align: center;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--accent-ink); text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.alt, .btn.ghost { background: transparent; color: var(--ink-hi); border-color: var(--line-2); font-weight: 600; }
.btn.alt:hover, .btn.ghost:hover { border-color: var(--ink-hi); color: var(--ink-hi); background: rgba(255, 255, 255, 0.04); }
.btn.ghost { border-color: var(--ink-hi); }
.btn.warn { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.warn:hover { background: var(--accent-wash); color: var(--accent-hi); border-color: var(--accent-hi); }
.btn.danger { background: var(--danger-bg); border-color: var(--danger-bg); color: #fff; }
.btn.danger:hover { background: #A8352F; border-color: #A8352F; color: #fff; }
.btn.dark { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.dark:hover { background: #2A2A2A; border-color: #2A2A2A; color: #fff; }
.btn.big { padding: 17px 26px; font-size: 17px; }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---- page frame --------------------------------------------------------------------------------------------- */
main { flex: 1 0 auto; }
.top, footer.foot { flex: none; }
.flashes { padding-top: 1px; }
.flashes .flash { margin-top: 20px; }
.page { padding: 40px 24px 72px; }
footer.foot { border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; padding: 36px var(--gutter) 40px; }
footer.foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; }
footer.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.foot a { color: var(--soft); }
footer.foot a:hover { color: var(--ink-hi); }
footer.foot .fine { margin-top: 18px; color: var(--faint); font-size: 13px; }

/* ---- blocks ------------------------------------------------------------------------------------------------- */
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; color: inherit; min-width: 0; }
a.card { text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--line-2); color: inherit; text-decoration: none; }
a.card:hover h2, a.card:hover h3 { color: var(--accent-hi); }
a.card > .small + h2 { margin-top: 8px; }
.card > h1:first-child, .card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid > .card { margin-bottom: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread > h1, .spread > h2 { margin-bottom: 12px; }
.stat { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 34px; line-height: 1.05; color: var(--ink-hi); }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; background: var(--panel-2); color: var(--soft); border: 1px solid var(--line-2); white-space: nowrap; }
.pill.ok { background: var(--ok-wash); color: var(--ok); border-color: #24503A; }
.pill.bad { background: var(--danger-wash); color: var(--danger); border-color: #5A2A28; }
.pill.warn { background: var(--warn-wash); color: var(--warn); border-color: #5A4718; }
.pill.brand { background: var(--accent-wash); color: var(--accent); border-color: #5C4220; }
.thumb { height: 130px; border-radius: 4px; background: linear-gradient(160deg, #1D232B, #13171C 70%); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; color: var(--muted); font-weight: 600; margin-bottom: 12px; overflow-wrap: anywhere; }
.thumb.big { height: 280px; font-size: 22px; font-family: var(--display); font-stretch: 72%; text-transform: uppercase; color: var(--soft); }
.price { font-size: 21px; font-weight: 700; color: var(--ink-hi); }
.notice { border-left: 3px solid var(--accent); background: var(--accent-wash); color: var(--ink); padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card.narrow { padding: 32px 32px 26px; border-top: 3px solid var(--accent); }
.inline { display: inline; }
.hidden { display: none !important; }

/* inner-page banner (Chronicle, Showroom) */
.hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 40px; margin-bottom: 28px;
  background: linear-gradient(100deg, rgba(11, 13, 16, 0.96) 30%, rgba(11, 13, 16, 0.55)), url("../img/site/aerial-1170.jpg") center 40% / cover no-repeat, var(--panel); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); }
.hero p { font-size: 18px; max-width: 640px; color: var(--body); }

/* flash messages */
.flash { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; border: 1px solid; border-left-width: 3px; }
.flash.ok { background: var(--ok-wash); color: #CDEFD8; border-color: #24503A; border-left-color: var(--ok); }
.flash.err { background: var(--danger-wash); color: #F8D3CF; border-color: #5A2A28; border-left-color: var(--danger); }
.flash.dev { background: var(--info-wash); color: #D5DDFF; border-color: #2E3A66; border-left-color: var(--info); word-break: break-all; }
.flash a { color: inherit; text-decoration: underline; }

/* ---- forms -------------------------------------------------------------------------------------------------- */
form { margin: 0; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; color: var(--ink); }
label .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 4px; font: inherit; background: var(--bg); color: var(--ink-hi);
  transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: #7A838D; }
input:hover, select:hover, textarea:hover { border-color: #56606B; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
textarea { min-height: 120px; font-family: var(--mono); font-size: 14px; }
form .btn[type=submit] { margin-top: 8px; }
.fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
form.sub { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 6px; }
.turnstile { margin: 16px 0 6px; min-height: 65px; }
.code-input { font-family: var(--mono); font-size: 24px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---- tables ------------------------------------------------------------------------------------------------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; overflow-wrap: normal; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* progress */
.steps { display: flex; gap: 4px; margin: 12px 0 6px; }
.steps span { flex: 1; text-align: center; padding: 8px 4px; border-top: 3px solid var(--line-2); font-size: 14px; color: var(--muted); }
.steps span.done { border-top-color: var(--accent); color: var(--ink-hi); font-weight: 600; }
.track { display: grid; grid-template-columns: 90px 1fr; gap: 6px 14px; align-items: center; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.w0 { width: 0; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
pre.json { background: var(--bg); border: 1px solid var(--line); color: #DFE9E6; padding: 12px; border-radius: 4px; overflow: auto; max-height: 260px; font-size: 12px; }

/* launcher sign-in, security */
.badge-acct { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0 8px; background: var(--bg); }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.qr { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 4px; margin: 12px 0; }
.qr svg { max-width: 100%; height: auto; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; padding: 16px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; margin: 12px 0; font-size: 17px; color: var(--ink-hi); }
.secret { letter-spacing: 0.08em; word-break: break-all; }

/* download panel (home + support) */
.download { border-left: 3px solid var(--accent); }
.download .mono { word-break: break-all; }

/* error pages */
.errpage { text-align: center; padding-top: 40px; padding-bottom: 36px; }
.errpage .code { font-size: clamp(88px, 18vw, 160px); line-height: 0.85; color: var(--accent); margin-bottom: 8px; }

/* ---- home (concept A) --------------------------------------------------------------------------------------- */
.nf-hero { position: relative; min-height: min(760px, 92vh); display: flex; align-items: flex-end; overflow: hidden; background: var(--bg); }
.nf-hero picture, .nf-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nf-hero .bg { object-fit: cover; filter: brightness(0.55) saturate(0.9); }
.nf-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 13, 16, 0) 35%, rgba(11, 13, 16, 0.75) 82%, var(--bg)); }
.nf-hero .in { position: relative; z-index: 1; padding: 120px var(--gutter) 88px; max-width: 1040px; }
.nf-hero h1 { font-size: clamp(54px, 9.2vw, 132px); line-height: 0.86; margin: 0; overflow-wrap: normal; }
.nf-hero .lede { margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: #D5DAE0; max-width: 640px; }
.nf-hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.nf-hero .note { margin-top: 18px; font-size: 14px; color: #A9B1BA; }
.nf-hero .note a { color: var(--ink-hi); text-decoration: underline; text-underline-offset: 3px; }

.nf-section { padding: 96px var(--gutter); }
.nf-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.nf-feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.nf-feature .num { font-size: 44px; line-height: 1; color: var(--accent); }
.nf-feature h2 { margin: 12px 0 8px; font-size: 34px; }
.nf-feature p { margin: 0; color: var(--soft); line-height: 1.6; }

.nf-band { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--panel); }
.nf-band picture { flex: 1 1 520px; min-width: 0; display: block; }
.nf-band picture img { display: block; width: 100%; height: 100%; min-height: 320px; max-height: 620px; object-fit: cover; }
.nf-band .txt { flex: 1 1 420px; min-width: 0; padding: 72px var(--gutter); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.nf-band .eyebrow { margin: 0; }
.nf-band h2 { margin: 0; font-size: clamp(44px, 5.4vw, 72px); line-height: 0.9; }
.nf-band p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--body); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips span { padding: 10px 14px; border: 1px solid var(--line-2); font-size: 30px; line-height: 1; color: var(--ink-hi); }

.nf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.nf-head h2 { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 0.95; }
.nf-head a { font-weight: 600; }
.nf-facts { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.nf-facts .k { color: var(--muted); font-size: 14px; }
.nf-facts .v { font-size: 20px; font-weight: 600; margin-top: 6px; color: var(--ink); }

.nf-news { padding-top: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.nf-card { display: flex; flex-direction: column; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .15s; }
.nf-card:hover { color: inherit; border-color: var(--line-2); text-decoration: none; }
.nf-card:hover h3 { color: var(--accent-hi); }
.nf-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.nf-card .b { padding: 22px; }
.nf-card .tag { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.nf-card h3 { margin: 8px 0 6px; font-size: 21px; }
.nf-card p { margin: 0; color: var(--soft); font-size: 15px; }
.nf-cta { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.nf-cta h2 { margin: 0; font-size: clamp(38px, 4vw, 48px); line-height: 0.92; color: var(--accent-ink); }
.nf-cta p { margin: 0; color: #2B2112; font-weight: 500; }
.nf-cta .btn { align-self: flex-start; }
.nf-cta .btn:focus-visible { outline-color: var(--accent-ink); }

.nf-market { padding-top: 0; }
.nf-market .nf-head h2 { font-size: clamp(32px, 3.6vw, 44px); }
.nf-download { padding-top: 0; }
.nf-download .card { max-width: 860px; }

/* ---- legal pages (/terms, /privacy) ------------------------------------------------------------------------- */
.legal-head { max-width: 860px; margin-bottom: 36px; }
.legal-head h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 18px; }
.legal-meta { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.legal-meta time { color: var(--ink); font-weight: 600; }
.legal-short { border-left: 3px solid var(--accent); padding: 20px 24px; }
.legal-short h2 { font-size: 22px; margin: 0 0 10px; }
.legal-short ul { margin: 0; padding-left: 20px; color: var(--body); }
.legal-short li + li { margin-top: 6px; }
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; border-left: 1px solid var(--line-2); padding: 2px 0 2px 18px; font-size: 14px; }
.toc .toc-title { font-size: 13px; font-family: var(--font); font-stretch: normal; font-weight: 600; letter-spacing: 0.16em; color: var(--accent); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: flex; gap: 10px; padding: 5px 0; color: var(--soft); line-height: 1.35; text-decoration: none; }
.toc a::before { content: counter(toc); min-width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink-hi); text-decoration: none; }
.legal-body { max-width: 760px; font-size: 17px; line-height: 1.72; color: var(--body); counter-reset: sec; }
.legal-body > section { counter-increment: sec; padding-top: 8px; margin-bottom: 40px; scroll-margin-top: 16px; }
.legal-body h2 { font-size: clamp(26px, 3vw, 32px); margin: 0 0 16px; scroll-margin-top: 20px; display: flex; align-items: baseline; gap: 14px; }
.legal-body h2::before { content: counter(sec); color: var(--accent); min-width: 1.1em; }
.legal-body h2 .anchor { margin-left: auto; font-family: var(--font); font-size: 16px; font-weight: 500; color: var(--muted); opacity: 0.7; text-decoration: none; padding: 0 4px; }
.legal-body h2 .anchor:hover, .legal-body h2 .anchor:focus-visible { color: var(--accent); opacity: 1; }
.legal-body h3 { font-size: 18px; margin: 26px 0 8px; scroll-margin-top: 20px; }
.legal-body p, .legal-body li { color: var(--body); }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 24px; }
.legal-body li + li { margin-top: 6px; }
.legal-body strong { color: var(--ink-hi); }
.legal-body .tablewrap { margin: 8px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.legal-body table { font-size: 15px; line-height: 1.5; }
.legal-body th, .legal-body td { padding: 10px 14px; }
.legal-body td code { font-size: 13px; color: var(--ink); white-space: nowrap; }
.legal-body td:has(> code:first-child) { overflow-wrap: normal; }
.legal-body .callout { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: 12px 16px; border-radius: 4px; color: var(--ink); }
.legal-end { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 15px; }
mark.tbc { background: var(--warn-wash); color: var(--warn); border: 1px dashed #8A6D25; border-radius: 3px; padding: 0 5px; font-weight: 600; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.legal-consent { margin: 10px 0 2px; color: var(--soft); }

/* ---- cookie notice (essential cookies only: a notice, not a consent wall) ----------------------------------- */
/* Small screens: an in-flow strip above the header, so it never covers a form or its buttons.
   Wide screens: a corner card fixed bottom-right, clear of the centred forms. */
.cookie-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  background: var(--panel-2); border-bottom: 1px solid var(--line-2); color: var(--ink); padding: 10px var(--gutter); font-size: 14px; line-height: 1.5; }
.cookie-note p { margin: 0; flex: 1 1 240px; }
.cookie-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cookie-note form { margin: 0; flex: none; }
.cookie-note .btn { min-width: 64px; }
@media (min-width: 1100px) {
  .cookie-note { position: fixed; z-index: 40; right: 24px; bottom: 24px; max-width: 360px; padding: 16px 18px;
    border: 1px solid var(--line-2); border-top: 3px solid var(--accent); border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); animation: cookie-in .25s ease-out both; }
  body:has(.cookie-note) footer.foot { padding-bottom: 170px; } /* the footer links can scroll clear of the card */
}
.cookie-note .choices, .cookie-settings .choices { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-note .choices .btn { flex: 1 1 auto; }
.cookie-settings .choices { margin: 6px 0 12px; }
.cookie-settings .choices .btn { flex: 1 1 180px; }
.cookie-settings h2 { font-size: 22px; margin-top: 22px; }
@media (min-width: 1100px) { .cookie-note.consent { max-width: 420px; } }
@keyframes cookie-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cookie-note { animation: none; } }
@media print { .cookie-note { display: none; } }

/* ---- responsive --------------------------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side { grid-template-columns: 1fr; }
  .legal-grid { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel); padding: 16px 18px; }
  .toc ol { columns: 2; column-gap: 24px; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .wrap { padding: 0 16px; }
  .page { padding: 28px 16px 56px; }
  .g2, .g3, .g4, .fieldrow { grid-template-columns: 1fr; }
  .top .hdr { padding: 12px var(--gutter); gap: 8px 10px; }
  .logo { gap: 8px; }
  .logo .disp { font-size: 20px; }
  .logo svg { width: 26px; height: 26px; }
  .nav { order: 3; width: 100%; gap: 2px 14px; font-size: 14px; }
  .who { font-size: 13px; gap: 6px; }
  .who .btn.small { padding: 6px 9px; font-size: 13px; }
  .who .name { max-width: 11ch; }
  .card { padding: 18px 16px; }
  .card.narrow { padding: 24px 14px 20px; }
  .hero { padding: 30px 20px; }
  .nf-hero { min-height: 640px; }
  .nf-hero .in { padding: 96px var(--gutter) 56px; }
  .nf-hero .ctas .btn { flex: 1 1 100%; }
  .nf-section { padding: 64px var(--gutter); }
  .nf-news, .nf-market, .nf-download { padding-top: 0; }
  .nf-features, .nf-news { grid-template-columns: 1fr; }
  .nf-band picture img { min-height: 240px; max-height: 360px; }
  .nf-band .txt { padding: 48px var(--gutter); }
  .nf-feature, .nf-facts, .nf-cta { padding: 22px; }
  .codes { grid-template-columns: 1fr; }
  .steps span { font-size: 12px; }
  table { font-size: 14px; }
  .toc ol { columns: 1; }
  .legal-body { font-size: 16px; line-height: 1.68; }
  .legal-body h2 { gap: 10px; }
  .legal-short { padding: 16px 16px; }
  .legal-body th, .legal-body td { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .card, .nf-card, .nf-feature { border: 1px solid CanvasText; }
}
.center-row { justify-content: center; margin-top: 18px; }
