/* Fonts are self-hosted (SIL Open Font License) so no visitor data goes to a font CDN. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/spectral-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/fonts/spectral-latin-400-italic.woff2") format("woff2"); }

/* Vigilo — design tokens
   Ledger-paper green, auditor's red pencil for tick marks and high risk,
   blue pencil for links. Spectral for headings, Public Sans for everything else. */
:root {
  --paper: #F3F6F0;
  --sheet: #FBFCFA;
  --ledger: #E4ECE1;
  --rule: #BFD1C3;
  --ink: #16302A;
  --ink-2: #4B6358;
  --red: #B4232A;
  --red-wash: #F6E3E1;
  --blue: #2848A0;
  --amber: #8E5C00;
  --amber-wash: #F5EBD6;
  --green: #2E6B47;
  --green-wash: #DDEBDF;
  --focus: #2848A0;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: 3.052rem;
  --radius: 3px;
  --measure: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1C18; --sheet: #13231D; --ledger: #172A23; --rule: #2B4238;
    --ink: #E3ECE5; --ink-2: #9DB3A7; --red: #F0727A; --red-wash: #3A1D1F;
    --blue: #9BB3F2; --amber: #E2B565; --amber-wash: #33291A; --green: #7CC49A; --green-wash: #1B3328;
    --focus: #9BB3F2; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans); font-feature-settings: "tnum" 1;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, var(--step-4)); }
h3 { font-size: var(--step-1); font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em; justify-content: center;
  font: 600 var(--step-0)/1 var(--sans); padding: 0.8em 1.2em; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--blue)); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--ledger); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.small { font-size: var(--step--1); padding: 0.55em 0.85em; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.3em; }
.hint { font-weight: 400; color: var(--ink-2); font-size: var(--step--1); }
input[type=text], input[type=email], input[type=password], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--sheet);
  border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 0.6em 0.7em;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
textarea { min-height: 7em; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 1.1em; }
.form-row { display: grid; gap: 1em; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.notice { border-left: 3px solid var(--blue); background: var(--sheet); padding: 0.8em 1em; margin: 0 0 1.2em; }
.notice.error { border-color: var(--red); background: var(--red-wash); }
.notice.ok { border-color: var(--green); background: var(--green-wash); }

/* Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 0.35em; font: 600 1.55rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark svg { width: 1.05em; height: 1.05em; color: var(--red); }

/* ---------------------------------------------------------------- site */
.site-nav { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-nav .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.site-nav nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.site-nav nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--step--1); }
.site-nav nav a:hover { text-decoration: underline; }
/* Log in / Start free (or Client area) stay outside the collapsible menu, so they show on phones too. */
.nav-cta { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.nav-cta .btn { padding: 0.6em 0.95em; white-space: nowrap; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .site-nav .wrap { gap: 0.5rem; }
  .site-nav nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 1rem 16px 1.4rem; gap: 1rem; }
  .site-nav nav.open { display: flex; }
  .nav-cta { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 400px) {
  .site-nav .wordmark { font-size: 1.3rem; }
  .nav-cta { gap: 0.35rem; }
  .nav-cta .btn, .site-nav .menu-toggle { padding: 0.55em 0.6em; }
}

.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.hero .fine { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The working paper: the one memorable thing on the page */
.wp {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px; position: relative;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px color-mix(in srgb, var(--ink) 40%, transparent);
  font-size: var(--step--1); margin: 0;
}
.wp-head { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 0.9rem 1.1rem 0.7rem; border-bottom: 2px solid var(--ink); }
.wp-head strong { font-family: var(--serif); font-size: 1.1rem; }
.wp-ref { font-family: var(--serif); font-size: 1.35rem; color: var(--red); font-weight: 600; grid-row: span 2; align-self: center; }
.wp table { width: 100%; border-collapse: collapse; }
.wp th { text-align: left; font-weight: 600; font-size: 0.78rem; color: var(--ink-2); padding: 0.45rem 0.6rem; background: var(--ledger); border-bottom: 1px solid var(--rule); }
.wp td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.wp td + td, .wp th + th { border-left: 1px solid var(--rule); }
.wp td.num, .wp th.num { text-align: right; }
.wp .tick { width: 22px; height: 18px; color: var(--red); display: block; margin: 0 auto; }
.wp .tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.35s ease-out forwards; }
.wp tr:nth-child(1) .tick path { animation-delay: 0.5s; }
.wp tr:nth-child(2) .tick path { animation-delay: 0.75s; }
.wp tr:nth-child(3) .tick path { animation-delay: 1s; }
.wp tr:nth-child(4) .tick path { animation-delay: 1.25s; }
.wp tr:nth-child(5) .tick path { animation-delay: 1.5s; }
.wp tr:nth-child(6) .tick path { animation-delay: 1.75s; }
/* The flagged tool: a plain red-pencil box. Negative margin keeps the name aligned with the other rows. */
.wp .flagged { display: inline-block; border: 1.5px solid var(--red); border-radius: 2px; padding: 0 0.3em; margin: 0 -0.3em; color: var(--red); font-weight: 600; animation: flag 0.4s 2.1s ease-out both; }
@keyframes flag { from { border-color: transparent; color: inherit; } }
.wp-note { font-family: var(--serif); font-style: italic; color: var(--red); padding: 0.75rem 1.1rem 0.95rem; opacity: 0; animation: fadein 0.5s 2.7s forwards; }
.wp-sign { display: flex; justify-content: space-between; padding: 0.6rem 1.1rem 0.9rem; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.78rem; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .wp .tick path { animation: none; stroke-dashoffset: 0; }
  .wp .flagged { animation: none; }
  .wp-note { animation: none; opacity: 1; }
}
@media (max-width: 520px) { .wp .hide-sm { display: none; } }

.risk { font-weight: 650; }
.risk.high { color: var(--red); }
.risk.medium { color: var(--amber); }
.risk.low { color: var(--ink-2); }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section > .wrap > h2 { max-width: 22ch; }
.section .intro { margin-bottom: 2.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > div { padding: 0 clamp(1rem, 4vw, 3rem) 0 0; }
.split > div + div { border-left: 1px solid var(--rule); padding: 0 0 0 clamp(1rem, 4vw, 3rem); }
.split ul { padding-left: 1.1em; margin: 0 0 1.4em; }
.split li { margin-bottom: 0.45em; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--rule); padding: 2.5rem 0 0; }
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.steps li { counter-increment: step; padding: 1.2rem 1.4rem 0 0; border-top: 2px solid var(--ink); margin-right: 1.4rem; }
.steps li::before { content: counter(step); display: block; font: 600 var(--step-3)/1 var(--serif); color: var(--red); margin-bottom: 0.6rem; }
.steps h3 { margin-bottom: 0.35em; }
.steps p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { margin-right: 0; } }

.checks { border-top: 2px solid var(--ink); }
.checks .row { display: grid; grid-template-columns: 7rem 15rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.checks .code { font-family: var(--serif); font-weight: 600; color: var(--red); font-size: var(--step-1); }
.checks .name { font-weight: 650; }
.checks p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .checks .row { grid-template-columns: 4.5rem 1fr; } .checks p { grid-column: 2; } }

.files-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.files-list div { padding: 1.1rem 1.2rem 1.1rem 0; border-bottom: 1px solid var(--rule); }
.files-list strong { display: block; font-family: var(--serif); font-size: var(--step-1); }
.files-list span { color: var(--ink-2); font-size: 0.95rem; }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 2rem; border: 1px solid var(--rule); background: var(--sheet); }
.flow > div { padding: 1.4rem; }
.flow > div + div { border-left: 1px solid var(--rule); }
.flow h3 { font-size: var(--step-0); }
.flow .where { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.6rem; display: block; }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } .flow > div + div { border-left: 0; border-top: 1px solid var(--rule); } }

.cta-band { background: var(--ink); color: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-band h2 { color: var(--paper); }
.cta-band p { color: color-mix(in srgb, var(--paper) 80%, var(--ink)); }
.cta-band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn.secondary { background: transparent; color: var(--paper); }

.site-footer { padding: 2.5rem 0 3rem; font-size: var(--step--1); color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-left: auto; }
.site-footer a { color: var(--ink-2); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); margin-bottom: 3rem; }
.plan { padding: 1.6rem 1.6rem 1.8rem 0; border-bottom: 1px solid var(--rule); }
.plan + .plan { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
.plan .price { font: 600 var(--step-4)/1 var(--serif); margin: 0.4rem 0 0.2rem; }
.plan .price small { font: 400 var(--step-0) var(--sans); color: var(--ink-2); }
.plan ul { padding-left: 1.1em; margin: 1rem 0 1.4rem; }
.plan li { margin-bottom: 0.4em; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan + .plan { padding-left: 0; border-left: 0; } }

.narrow { max-width: 720px; }
.form-card { background: var(--sheet); border: 1px solid var(--rule); padding: clamp(1.2rem, 4vw, 2rem); }
.auth-page { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 3rem 16px; }
.auth-page .form-card { width: min(460px, 100%); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--rule); border-radius: var(--radius); margin-bottom: 1.2rem; }
.seg label { margin: 0; padding: 0.7em; text-align: center; cursor: pointer; font-weight: 500; font-size: var(--step--1); }
.seg input { position: absolute; opacity: 0; }
.seg input:checked + span { font-weight: 700; }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -3px; }
.prose h2 { margin-top: 1.6em; font-size: var(--step-2); }
.prose li { margin-bottom: 0.4em; max-width: var(--measure); }

/* ---------------------------------------------------------------- app */
.app-bar { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.app-bar .wrap { display: flex; align-items: center; gap: 1.6rem; min-height: 58px; flex-wrap: wrap; }
.app-bar .wordmark { font-size: 1.3rem; }
.app-bar nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.app-bar nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--step--1); padding: 0.3em 0; border-bottom: 2px solid transparent; }
.app-bar nav a[aria-current=page] { color: var(--ink); border-color: var(--red); }
.app-bar .who { margin-left: auto; display: flex; gap: 0.9rem; align-items: center; font-size: var(--step--1); color: var(--ink-2); }
.app-main { padding: 2rem 0 4rem; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: 0; }
.crumbs { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.4rem; }
.crumbs a { color: var(--ink-2); }
.panel { background: var(--sheet); border: 1px solid var(--rule); padding: 1.3rem 1.4rem; margin-bottom: 1.4rem; }
.panel > h2 { font-size: var(--step-2); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.ledger { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.ledger th { text-align: left; font-weight: 600; font-size: var(--step--1); color: var(--ink-2); padding: 0.55rem 0.7rem; background: var(--ledger); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.ledger td { padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger td + td, .ledger th + th { border-left: 1px solid var(--rule); }
.ledger .num { text-align: right; white-space: nowrap; }
.ledger tr:hover td { background: color-mix(in srgb, var(--ledger) 45%, transparent); }
.ledger a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.ledger a.rowlink:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ref { font-family: var(--serif); font-weight: 600; color: var(--red); white-space: nowrap; }

.chip { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.15em 0.55em; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap; }
.chip.prohibited, .chip.high, .chip.open { color: var(--red); }
.chip.conditional, .chip.medium, .chip.in_review { color: var(--amber); }
.chip.approved, .chip.accepted, .chip.signed { color: var(--green); }
.chip.unlisted, .chip.low, .chip.draft, .chip.dismissed, .chip.amended { color: var(--ink-2); }
.chip.solid.signed { background: var(--green); color: var(--sheet); border-color: var(--green); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); margin-bottom: 1.4rem; }
.stats div { padding: 0.9rem 1rem 0.9rem 0; }
.stats div + div { padding-left: 1rem; border-left: 1px solid var(--rule); }
.stats b { display: block; font: 600 var(--step-3)/1.1 var(--serif); }
.stats span { font-size: var(--step--1); color: var(--ink-2); }
.stats .alert b { color: var(--red); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(3) { padding-left: 0; border-left: 0; } }

.progress { list-style: none; display: flex; padding: 0; margin: 0 0 1.6rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.progress li { padding: 0.5rem 1.2rem 0.6rem 0; margin-right: 1.2rem; font-size: var(--step--1); color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.progress li.done { color: var(--ink); }
.progress li.done::before { content: "✓ "; color: var(--red); font-weight: 700; }
.progress li.current { color: var(--ink); font-weight: 650; border-color: var(--ink); }

.dropzone { border: 1.5px dashed var(--rule); padding: 1.2rem; background: var(--paper); text-align: center; }
.dropzone.drag { border-color: var(--ink); background: var(--ledger); }
.dropzone input[type=file] { border: 0; background: transparent; padding: 0.4rem 0; }
.inline-form { display: inline; }
.actions-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.issue { border-left: 3px solid var(--rule); padding: 0.6rem 0 0.6rem 0.9rem; margin-bottom: 0.8rem; }
.issue.s3 { border-color: var(--red); }
.issue.s2 { border-color: var(--amber); }
.issue h3 { font-size: var(--step-0); margin-bottom: 0.2em; }
.issue p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.issue .meta { font-size: 0.8rem; color: var(--ink-2); margin-top: 0.3rem; }
.radio-set { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.radio-set label { display: flex; gap: 0.6rem; align-items: baseline; font-weight: 500; font-size: var(--step-0); margin: 0; padding: 0.6rem 0.75rem; border: 1.5px solid var(--rule); border-radius: var(--radius); cursor: pointer; }
.radio-set label:has(input:checked) { border-color: var(--ink); background: var(--ledger); }
.radio-set small { display: block; color: var(--ink-2); font-weight: 400; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.2rem; margin: 0; font-size: 0.95rem; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.policy-out { white-space: pre-wrap; font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; background: var(--sheet); border: 1px solid var(--rule); padding: 1.4rem; max-height: 60vh; overflow: auto; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); }
.empty h2 { color: var(--ink); }

[aria-label^="QR code"] svg { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------- help centre */
.help-banner { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; justify-content: space-between; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--red); padding: 0.8rem 1.1rem; margin-bottom: 1.4rem; }
.help-banner p { margin: 0; }
.help-video h2 { margin-bottom: 0.3em; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ledger); border: 1px solid var(--rule); max-width: 960px; }
.video-frame video, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.video-frame.placeholder { display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.video-frame.placeholder p { margin-inline: auto; }
.video-soon { font: 600 var(--step-2)/1.2 var(--serif); color: var(--ink); margin-bottom: 0.3em; }
.help-toc { margin: 0 0 2rem; padding: 1rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.help-toc h2 { font-size: var(--step-1); font-family: var(--sans); font-weight: 650; margin-bottom: 0.4em; }
.help-toc ol { columns: 2 14rem; margin: 0; padding-left: 1.3em; }
.help-toc li { margin-bottom: 0.2em; }
.help section { padding-top: 0.5rem; margin-bottom: 2.4rem; scroll-margin-top: 1rem; }
.help section h2 { margin-top: 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.help h3 { margin-top: 1.4em; scroll-margin-top: 1rem; }
.help-table { margin: 0.4rem 0 1.2rem; max-width: 900px; }
.help-table td:first-child { white-space: nowrap; }
.code-block { background: var(--sheet); border: 1px solid var(--rule); padding: 0.7em 0.9em; overflow-x: auto; font-size: 0.92rem; max-width: var(--measure); }
.help code { font-size: 0.92em; background: var(--ledger); padding: 0.05em 0.3em; border-radius: 2px; overflow-wrap: anywhere; }
.faq details, .catalog-list { border-bottom: 1px solid var(--rule); padding: 0.7rem 0; max-width: 820px; }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary, .catalog-list summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 0.6rem 0 0.2rem; }
@media (max-width: 640px) { .help-table td:first-child { white-space: normal; } }

/* Export guides */
.guide-steps li { margin-bottom: 0.7em; }
dl.facts.guide-facts { margin: 1.4rem 0; }
.chooser details { border-bottom: 1px solid var(--rule); padding: 0.45rem 0; }
.chooser summary { cursor: pointer; font-weight: 600; font-size: var(--step--1); }
.chooser p { margin: 0.4rem 0 0.2rem; }

/* Website assistant ("Ask Vigilo"), app/templates/_assistant.html */
.va-open { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; box-shadow: 0 4px 18px rgb(0 0 0 / 0.18); }
.va-panel { position: fixed; right: 1rem; bottom: 1rem; z-index: 51; width: min(24rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 2rem)); display: flex; flex-direction: column; background: var(--sheet);
  color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: 0 8px 30px rgb(0 0 0 / 0.22); }
.va-panel[hidden], .va-open[hidden], .va-lead[hidden] { display: none; }
.va-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rule); font-weight: 600; }
.va-head button { background: none; border: 0; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.va-log { flex: 1; overflow-y: auto; padding: 0.8rem; font-size: var(--step--1); line-height: 1.5; }
.va-msg { margin: 0 0 0.7rem; padding: 0.55rem 0.7rem; border-radius: var(--radius); white-space: pre-wrap; }
.va-msg.bot { background: var(--ledger); }
.va-msg.me { background: var(--ink); color: var(--paper); margin-left: 2.5rem; }
.va-msg a { color: inherit; }
.va-note { font-size: 0.75rem; color: var(--ink-2); padding: 0 0.8rem 0.4rem; margin: 0; }
.va-form { display: flex; gap: 0.4rem; padding: 0.6rem 0.8rem; border-top: 1px solid var(--rule); }
.va-form input, .va-lead input[type=text], .va-lead input[type=email] { flex: 1; min-width: 0;
  font: inherit; font-size: var(--step--1); padding: 0.5em 0.6em; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.va-lead { padding: 0.6rem 0.8rem; border-top: 1px solid var(--rule); display: grid; gap: 0.4rem; font-size: var(--step--1); }
.va-lead label.va-check { display: flex; gap: 0.4rem; align-items: flex-start; font-size: 0.75rem; color: var(--ink-2); }
.va-talk { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer;
  font: inherit; font-size: 0.8rem; padding: 0 0.8rem 0.6rem; text-align: left; }
@media print { .va-open, .va-panel { display: none !important; } }

/* Homepage problem statistics */
.stats-band { padding-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.6rem; }
.stats figure { margin: 0; border-top: 1.5px solid var(--ink); padding-top: 0.8rem; }
.stats .stat { font-family: var(--serif, Georgia, serif); font-size: 2.6rem; line-height: 1; margin: 0 0 0.5rem; }
.stats figcaption { font-size: var(--step--1); line-height: 1.5; }
.stats cite { display: block; margin-top: 0.5rem; font-style: normal; font-size: 0.75rem; color: var(--ink-2); }

/* Homepage latest notes, and tables inside blog posts */
.note-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.4rem; }
.note-card { border-top: 1.5px solid var(--ink); padding-top: .8rem; }
.note-card h3 { font-size: 1.15rem; line-height: 1.3; }
.note-card h3 a { color: inherit; text-decoration: none; }
.note-card h3 a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid var(--rule); }
.table-wrap th { background: var(--ledger); border-bottom: 1.5px solid var(--ink); }
