/* IBM Plex, self-hosted (the CSP allows fonts from this origin only). OFL, see fonts/OFL.txt. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

/* Theme tokens, from the public-site design handoff. The spec names "Racing
   Telemetry" tokens; if those arrive, swap the values here and keep the names.
   Nothing below this block names a color. Light only for now: the design has
   no dark theme. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #14202e;           /* navy: text, dark buttons, footer */
  --muted: #3c4654;          /* body copy */
  --subtle: #5b6675;         /* secondary text */
  --line: #e1e4e8;
  --input-line: #d3d8de;
  --dashed: #c3cad3;
  --accent: #1f6fb8;         /* blue: primary buttons, links, nonprofit accents */
  --accent-text: #ffffff;
  --accent-on-dark: #3b8bd6; /* logo and focus ring on navy */
  --orange: #e8851a;         /* logo only */
  --orange-text: #c76f0e;    /* eyebrow, link hover */
  --orange-text-dark: #a35a0a;
  --tint: #f3f6fa;           /* nonprofit panel, page hero */
  --warm: #fdf3e8;           /* business panel, draft notice */
  --warm-text: #5a3a0e;
  --footer-text: #c9d1db;
  --footer-fine: #8c9aad;
  --footer-line: #2a394b;
  --danger: #b42318;
  --link: #14202e;      /* navy, underlined (UI fix 9): 16:1 on white */
  /* Status colors (tags and notices): ok = done, warn = needs attention,
     info = information, neutral = everything else. */
  --ok-text: #146c2e;  --ok-bg: #e8f5ec;  --ok-line: #b7dfc3;
  --warn-text: #8a4b00; --warn-bg: #fdf3e8; --warn-line: #f2c98f;
  --info-text: #1a5a96; --info-bg: #eaf2fb; --info-line: #b9d3ee;
  --error-bg: #fef3f2; --error-line: #fecdca;
  --neutral-text: #3c4654; --neutral-bg: #eef1f4; --neutral-line: #d3d8de;
  --radius: 12px;            /* cards, panels */
  --radius-notice: 8px;
  --radius-control: 6px;     /* buttons, inputs, language switch */
  --gutter: clamp(20px, 5vw, 56px);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
}
main { max-width: 560px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 16px 0;
}
label { display: block; font-weight: 600; margin: 0 0 6px; }
input {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input.code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
button, .button {
  display: inline-block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
button.link {
  background: none;
  color: var(--accent);
  width: auto;
  padding: 8px 0;
}
button[disabled] { opacity: .6; cursor: default; }
.error { color: var(--danger); min-height: 1.5em; margin-top: 8px; }
.notice {
  border-left: 4px solid var(--accent);
  padding: 8px 12px;
  background: var(--surface);
}
dl { display: grid; grid-template-columns: fit-content(55%) 1fr; gap: 4px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* ---- Phase 2 additions ------------------------------------------------- */
main.wide { max-width: 960px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label + input, label + select, label + textarea { margin-bottom: 12px; }
select, textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
fieldset.choice { border: 0; padding: 0; margin: 0 0 12px; display: flex; gap: 16px; flex-wrap: wrap; }
fieldset.choice legend { font-weight: 600; margin-bottom: 6px; }
fieldset.choice label, label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 6px 0; }
fieldset.choice input, label.check input { width: auto; }
.checks { display: grid; gap: 2px; }

nav.top {
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface);
}
nav.top a { color: var(--text); text-decoration: none; padding: 4px 0; }
nav.top a[aria-current="page"] { font-weight: 700; border-bottom: 2px solid var(--accent); }
nav.top .right, nav.top button.link { margin-left: auto; }
/* After a right-pushed item the switcher sits next to it, not halfway between. */
nav.top .right ~ select.lang, nav.top button.link ~ select.lang { margin-left: 0; }

button.secondary, .button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.danger { color: var(--danger) !important; }
button.link.danger { background: none; }

.rows { list-style: none; margin: 16px 0; padding: 0; }
.row {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.row.stack { flex-direction: column; align-items: stretch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions button, .actions .button { width: auto; margin-top: 0; }
.actions input, .actions select { width: auto; flex: 1 1 160px; margin: 0; }
.note { border-left: 3px solid var(--line); padding: 4px 10px; margin: 8px 0; color: var(--muted); }
ul.plain { list-style: none; padding: 0; margin: 8px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); }
.chip-x { width: auto; margin: 0; padding: 0 8px; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; }

.meter { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); }
#meter-text { margin-top: 8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; }
.tile .n { font-size: 1.8rem; font-weight: 700; }

.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 16px 0; }
.filters input, .filters select, .filters button { margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { width: auto; margin: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.card > h2:first-child, .card > form > h2:first-child, form.card > h2:first-child { margin-top: 0; }
.actions label.check { margin: 0; flex: 0 0 auto; }
.actions label.check input { flex: none; width: auto; }

/* ---- Phase 3 additions ------------------------------------------------- */
.mapping { display: grid; gap: 8px; margin-bottom: 12px; }
.map-row { display: grid; grid-template-columns: 1fr minmax(150px, 220px); gap: 8px 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.map-row select { margin: 0; }
.map-row .muted { font-size: .85rem; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); }
.badge.create { color: var(--accent); border-color: var(--accent); }
.badge.update { color: var(--text); border-color: var(--text); }
.badge.review { color: var(--danger); border-color: var(--danger); }
.badge.error { color: var(--accent-text); background: var(--danger); border-color: var(--danger); }
.badge.duplicate { color: var(--muted); }

/* ---- Phase 4 additions ------------------------------------------------- */
.actions.spread { justify-content: space-between; }
.actions.spread h2 { margin: 0; }
label.check.inline { display: inline-flex; margin: 0; }
.row.focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.row .card { margin: 8px 0 0; padding: 12px; }

/* ---- v1.1 and Phase 5 additions ------------------------------------------ */
select.lang { width: auto; margin: 0 0 0 auto; padding: 4px 8px; font-size: .9rem; min-height: 44px; }
.langbar { display: flex; justify-content: flex-end; padding: 8px 16px 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list thead th { font-size: .8rem; color: var(--muted); }
.badge.ok { color: var(--accent); border-color: var(--accent); }
.badge.warn { color: var(--danger); border-color: var(--danger); }
.tile.warn { border-color: var(--danger); }

/* Terms of Use and Privacy Policy */
.notice.draft { border-left-color: var(--orange-text-dark); background: var(--warm); color: var(--warm-text); font-weight: 600; }
.legal-check { margin: 10px 0; }
.legal-check .hint { margin: 2px 0 0 26px; }
footer.legal { max-width: 560px; margin: 32px auto 24px; padding: 0 16px; font-size: .9rem; color: var(--muted); }
footer.legal a { color: inherit; }

/* The coordinator's acceptance records */
.badge.draft { color: var(--orange-text-dark); border-color: var(--orange-text-dark); }
form.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; align-items: end; }
form.filters .actions { display: flex; gap: 8px; align-items: center; grid-column: 1 / -1; }
form.filters .actions > * { width: auto; margin-top: 8px; }
.table-wrap { overflow-x: auto; }

/* ---- UI round (2026-10-24) --------------------------------------------- */
/* A card's own confirmation, next to where the change was made. */
p.ok { color: var(--accent); font-weight: 600; min-height: 1.5em; margin: 8px 0 0; }
p.ok:empty { min-height: 0; margin: 0; }
.field-error { margin: -6px 0 12px; min-height: 0; }
[aria-invalid="true"] { border-color: var(--danger); }
/* The profile's one Save button stays in reach at the bottom of the screen. */
.savebar {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between;
  margin: 16px -16px -64px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.savebar p { margin: 0; color: var(--muted); flex: 1 1 200px; }
.savebar button { width: auto; margin: 0; min-width: 160px; }

/* Links: readable in both themes (the browser's default blue is 1.9:1 on the dark background). */
a, a:visited { color: var(--link); }
nav.top a, nav.top a:visited, .tile, .tile:visited, .button, .button:visited { color: var(--text); }
.button:not(.secondary), .button:not(.secondary):visited { color: var(--accent-text); }

/* Tap targets: at least 24 px in both directions (WCAG 2.5.8), more where there is room; boxes 24 px. */
footer.legal a { display: inline-block; padding: 10px 4px; min-height: 44px; }
/* !important: older layout rules set these inputs to width: auto. */
input[type="checkbox"], input[type="radio"] { width: 24px !important; height: 24px; margin: 0; accent-color: var(--accent); flex: none !important; }
label.check, fieldset.choice label { min-height: 44px; }
.rows .row a { display: inline-block; padding: 8px 0; min-height: 24px; }
.chip-x { min-width: 32px; min-height: 32px; }
nav.top a { padding: 10px 0; }
/* A link alone on its line (like "← Organizations") is a control, not text in a sentence. */
main > p > a:only-child { display: inline-block; padding: 10px 0; }

/* ---- Public site: landing, privacy, terms, support, contact ------------ */
/* Pages use <body class="site">; header and footer come from site.js. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body.site { -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
.site main { max-width: none; padding: 0; margin: 0; flex: 1 0 auto; }
.site h1, .site h2, .site p, .site ul { margin: 0; }
.site a { color: var(--accent); text-decoration: none; }
.site a:hover { color: var(--orange-text); text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap.wide { max-width: 1280px; }

.eyebrow { font: 600 13px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow.small { font-size: 12px; letter-spacing: .1em; }
.eyebrow.orange { color: var(--orange-text); }
.eyebrow.orange-dark { color: var(--orange-text-dark); }
.eyebrow.plain { color: var(--subtle); }

/* Buttons. Hover darkens about 8%. */
.site .btn {
  display: inline-block; width: auto; margin: 0; align-self: flex-start;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.25;
  padding: 14px 22px; border: 1px solid transparent; border-radius: var(--radius-control);
  text-decoration: none; cursor: pointer; text-align: left;
}
.site .btn:hover { filter: brightness(.92); text-decoration: none; }
.site .btn.primary, .site .btn.primary:hover { background: var(--accent); color: var(--accent-text); }
.site .btn.dark, .site .btn.dark:hover { background: var(--text); color: var(--surface); }
.site .btn.light, .site .btn.light:hover { background: var(--surface); color: var(--text); font-size: 15px; padding: 12px 20px; }
.site .btn.outline, .site .btn.outline:hover { background: transparent; color: var(--text); border-color: var(--text); font-size: 15px; padding: 12px 22px; }
.site .btn.outline:hover { background: var(--tint); filter: none; }
.site .btn.small { font-size: 15px; padding: 10px 18px; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); border-bottom: 1px solid var(--line);
}
.site .brand { display: flex; align-items: center; gap: 10px; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.site .brand:hover { color: var(--text); text-decoration: none; }
.brand img { display: block; }
.brand span { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 15px; }
.site .site-nav a.plain { color: var(--text); font-weight: 500; }
.site .site-nav a.strong { font-weight: 600; }
.site .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.lang-switch { display: flex; border: 1px solid var(--input-line); border-radius: var(--radius-control); overflow: hidden; }
.site .lang-switch button {
  width: auto; margin: 0; padding: 6px 10px; border: 0; border-radius: 0;
  font: 600 13px/1.4 var(--font); background: transparent; color: var(--muted);
}
.site .lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--surface); cursor: default; }

/* Footer */
.site-footer { background: var(--text); color: var(--footer-text); font-size: 14px; }
.site-footer :focus-visible { outline-color: var(--accent-on-dark); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-about { display: flex; flex-direction: column; gap: 14px; max-width: 460px; line-height: 1.6; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand span { font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--surface); white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; align-content: flex-start; }
.footer-fine { border-top: 1px solid var(--footer-line); padding-top: 20px; color: var(--footer-fine); }

/* Links on navy (footer, support card): always white and underlined, never the
   orange hover, which fails contrast on navy. */
.site .on-dark a:not(.btn) { color: var(--surface); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site .on-dark a:not(.btn):hover, .site .on-dark a:not(.btn):focus-visible { color: var(--surface); text-decoration-thickness: 2px; }

/* Inner pages */
.page-hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 14px; }
.site .page-hero h1 { font-weight: 600; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -.02em; }
.site .page-hero p { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 680px; text-wrap: pretty; }
.page-body { padding-top: 56px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.site h2.section { font-weight: 600; font-size: 22px; letter-spacing: -.01em; }

.toc { flex: 1 1 200px; max-width: 260px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.site .toc a { color: var(--muted); }
.legal-doc { flex: 999 1 480px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 40px; }
.legal-doc section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.site .legal-doc p { font-size: 16px; line-height: 1.65; color: var(--muted); }
.site .legal-doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; color: var(--muted); }
.site .legal-doc li strong { color: var(--text); }
.legal-doc .table-wrap { overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; color: var(--muted); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal-table th { color: var(--text); font-weight: 600; }
.draft-notice { padding: 16px 20px; background: var(--warm); border-radius: var(--radius-notice); font-size: 15px; line-height: 1.55; color: var(--warm-text); }
.version { font-size: 14px; color: var(--subtle); }
/* The introduction and liability notice. The same box goes on intro emails and the accept screen. */
.liability { border: 1px solid var(--text); border-radius: var(--radius-notice); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.liability .eyebrow { color: var(--text); }
.site .liability p { color: var(--text); }

.faq { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; line-height: 1.4; }
.site .faq details p { padding-top: 10px; max-width: 680px; line-height: 1.65; color: var(--muted); }
.help-card {
  flex: 1 1 260px; background: var(--text); color: var(--surface); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.help-card :focus-visible { outline-color: var(--accent-on-dark); }
.help-card strong { font-weight: 600; font-size: 20px; }
.site .help-card p { font-size: 15px; line-height: 1.6; color: var(--footer-text); }

.contact-info { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 40px;
  font-size: 15px; line-height: 1.6; color: var(--muted); }
.contact-info > div { display: flex; flex-direction: column; gap: 6px; }
.site .contact-info a { font-weight: 600; }
.contact-info .eyebrow { color: var(--subtle); }

/* Sticky only when there is a sidebar column beside the article. */
@media (min-width: 860px) {
  .toc, .help-card { position: sticky; top: 24px; }
}

/* Tap targets: at least 44px tall on every control outside running text. */
.site .brand, .site .site-nav a, .site .lang-switch button, .site .btn,
.footer-links a, .site .toc a, .site .contact-info a { min-height: 44px; }
.site .site-nav a, .footer-links a, .site .toc a, .site .contact-info a { display: inline-flex; align-items: center; }
.footer-links a { padding: 0 4px; }
.site .toc { gap: 0; }
.site .contact-info a { align-self: flex-start; }
.faq details { padding: 4px 0; }
.faq summary { padding: 10px 0; min-height: 44px; }
.site .faq details p { padding-bottom: 14px; }

/* ---- UI fixes, staging 10/24 ---------------------------------------------- */

/* Buttons wrap rather than overflow (Spanish runs about 25% longer): never a
   fixed height or width, and at least 44px tall. */
button, .button { white-space: normal; min-height: 44px; }
button.link { min-height: 44px; }
/* Two link buttons side by side (sign-in's "Send a new code" and "Use a
   different email"): a clear gap, and they wrap rather than run together. */
.link-row { display: flex; flex-wrap: wrap; gap: 0 24px; }
.danger-fill { background: var(--danger); color: var(--accent-text); }

/* 9. Links: navy and underlined in the app and console (on white and on the
   tinted cards alike), never blue on a tint. */
main a:not(.button):not(.row-link) { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
main a:not(.button):not(.row-link):hover { text-decoration-thickness: 2px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* 7. Checkboxes and radios: 24px (WCAG 2.5.8), the whole label is the target, 44px rows. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 24px; height: 24px; margin: 0; flex: none; }
fieldset.choice label, label.check { min-height: 44px; gap: 12px; margin: 0; cursor: pointer; }
.legal-check .hint { margin-left: 36px; }

/* 6. The app's small footer: 44px targets, 12px x 28px apart. */
footer.legal { display: flex; flex-wrap: wrap; gap: 12px 28px; }
footer.legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* 10. The header on every signed-in page; on phones, a menu with Sign out last. */
nav.top { gap: 4px 16px; padding: 8px 16px; }
nav.top .brand { font-weight: 700; margin-right: 8px; }
nav.top .menu { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 0 16px; }
nav.top .menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
nav.top .menu .sign-out { margin-left: auto; }
/* Sign out is navy text, not a blue link, in the app and the console alike. */
nav.top .menu .sign-out, nav.top .menu .sign-out:visited { color: var(--text); font-weight: 500; text-decoration: none; }
nav.top select.lang { margin: 0; min-height: 44px; }
/* The chamber switcher, for people in more than one chamber. */
nav.top select.chamber { width: auto; margin: 0; padding: 4px 8px; font-size: .9rem; min-height: 44px; max-width: 16em; }
nav.top .menu-toggle { display: none; }
.menu-toggle { width: auto; margin: 0 0 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
@media (max-width: 599px) {
  nav.top .menu-toggle { display: block; }
  nav.top .menu { display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  nav.top.open .menu { display: flex; }
  nav.top .menu > * { border-top: 1px solid var(--line); border-radius: 0; }
  nav.top .menu .sign-out { margin-left: 0; text-align: left; }
  nav.top select.lang, nav.top select.chamber { width: 100%; max-width: none; }
  nav.top select.chamber + select.lang { margin-top: 12px; }
}

/* Notices: info (blue), warn (amber), ok (green), neutral (grey). */
.notice { border-left: 4px solid var(--info-line); background: var(--info-bg); color: var(--text);
  border-radius: 0 var(--radius-notice) var(--radius-notice) 0; padding: 12px 16px; margin: 12px 0; }
.notice.info { border-left-color: var(--accent); }
.notice.warn { border-left-color: var(--orange-text-dark); background: var(--warn-bg); }
.notice.ok { border-left-color: var(--ok-text); background: var(--ok-bg); }
.notice.neutral { border-left-color: var(--neutral-line); background: var(--neutral-bg); }
.notice > :last-child { margin-bottom: 0; }

/* Status tags, same four colors. */
.tag { display: inline-block; font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; border: 1px solid; white-space: nowrap; vertical-align: middle; }
.tag.ok { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-line); }
.tag.warn { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-line); }
.tag.info { color: var(--info-text); background: var(--info-bg); border-color: var(--info-line); }
.tag.neutral { color: var(--neutral-text); background: var(--neutral-bg); border-color: var(--neutral-line); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }

/* 8. A row that is one link: 56px, chevron, tint on hover. */
.rows > li.row-item { border-bottom: 1px solid var(--line); }
.row-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 8px; color: var(--text); text-decoration: none; }
.row-link:hover, .row-link:focus-visible { background: var(--tint); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { text-decoration: underline; text-underline-offset: 2px; }
.row-sub { color: var(--subtle); font-size: .92rem; overflow-wrap: anywhere; }
.row-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.chevron { color: var(--subtle); font-size: 1.4rem; line-height: 1; }

/* 5. In-page confirmation, under the button that opened it. */
.confirm-panel { border: 1px solid var(--text); border-radius: var(--radius-notice); padding: 14px 16px; margin: 8px 0; background: var(--surface); }
.confirm-panel .confirm-title { font-weight: 700; margin-bottom: 4px; }
.confirm-panel .actions { margin-top: 10px; }

/* 23. Match stages. */
.stages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; list-style: none; padding: 0; margin: 8px 0;
  font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.stages li + li::before { content: "→"; margin-right: 6px; color: var(--subtle); }
.stages li[aria-current="step"] span { color: var(--accent-text); background: var(--accent); padding: 3px 8px; border-radius: 4px; }

.field-error { color: var(--danger); font-size: 14px; margin: -6px 0 12px; }
.row > .confirm-panel, .row > .field-error { flex-basis: 100%; }
.approval-head { display: flex; justify-content: space-between; gap: 12px; }
.nowrap { white-space: nowrap; }

/* Tables become stacked rows under 600px. Cells carry data-label. */
@media (max-width: 599px) {
  table.list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.list, table.list tbody, table.list tr, table.list td, table.list tbody th { display: block; width: 100%; }
  table.list tbody th { border: 0; padding: 2px 0; }
  table.list tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.list td { border: 0; padding: 2px 0; text-align: left; white-space: normal; }
  table.list td[data-label]::before { content: attr(data-label) ": "; color: var(--subtle); }
}

/* ---- Form feedback: Saving / Saved, field errors, the form banner -------- */
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
fieldset[aria-invalid="true"], div[aria-invalid="true"] { border-left: 3px solid var(--danger); padding-left: 10px; }
.form-error { border: 1px solid var(--error-line); background: var(--error-bg); color: var(--danger); border-radius: var(--radius-notice);
  padding: 12px 16px; margin: 0 0 16px; }
.form-error p { margin: 0; }
.form-error ul { margin: 8px 0 0; padding-left: 20px; }
.form-error a { color: var(--danger) !important; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.save-row button { width: auto; margin: 0; flex: 0 1 auto; }
.save-status { color: var(--ok-text); font-weight: 600; }

/* 4. Profile: one Save for the page, in a bar that sticks to the bottom. */
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; margin: 16px -16px 0; padding: 12px 16px; background: var(--text); color: var(--surface); }
.save-bar strong { font-weight: 600; }
.save-bar .actions button { min-height: 44px; }
.save-bar button.secondary { background: transparent; color: var(--surface); border-color: var(--surface); }
.save-bar .save-status { color: var(--surface); }

/* 17. The main cause area. */
.cause-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cause-row button.link { width: auto; margin: 0; padding: 0 4px; }
.save-bar > div:first-child { display: flex; flex-direction: column; gap: 2px; }

/* Claude (console): the email as sent beside Claude's version, and its brief. */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 8px; }
.compare > div { border: 1px solid var(--line); border-radius: var(--radius-notice); padding: 10px 12px; min-width: 0; }
.compare pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 6px 0 0; }
.brief { border: 1px solid var(--line); border-radius: var(--radius-notice); padding: 10px 12px; margin: 8px 0; }
.brief ul { margin: 6px 0; padding-left: 20px; }

/* The chamber's logo in the console header, and its preview in Settings. */
nav.top .brand { display: inline-flex; align-items: center; gap: 8px; }
nav.top .brand img.chamber-logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.logo-preview { display: block; max-height: 80px; max-width: 240px; object-fit: contain; margin: 8px 0 12px; }
.subdomain-field { display: flex; align-items: center; gap: 6px; }
.subdomain-field input { flex: 0 1 14ch; min-width: 0; }
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
form.inline input { width: 14ch; margin: 0; }

/* A chamber's public page (public/chamber/). */
.chamber-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface); }
.chamber-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 12em; }
.chamber-head .lang-switch { flex-shrink: 0; }
.chamber-page-logo { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.chamber-name { font-weight: 700; overflow-wrap: anywhere; }
.chamber-head .lang-switch button { width: auto; margin: 0; padding: 6px 10px; border: 0; border-radius: 0; min-height: 44px;
  font: 600 13px/1.4 var(--font); background: transparent; color: var(--muted); }
.chamber-head .lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--surface); }
.chamber-description p { margin: 0 0 12px; }
.join-buttons { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.join-buttons .button { margin-top: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.contact-list li { overflow-wrap: anywhere; }
.chamber-foot { text-align: center; padding: 24px 16px 40px; font-size: 14px; }
/* On a phone the heading below already names the chamber. */
@media (max-width: 480px) { .chamber-head .chamber-name { display: none; } }

/* The demo site (src/demo/index.js, public/assets/demo.js). */
.demo-banner { background: #fff4d6; color: #5a3b00; text-align: center; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.demo-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 6px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); font-size: 14px; }
.demo-bar a, .demo-bar button.link { min-height: 32px; display: inline-flex; align-items: center; }
.demo-bar-label { font-weight: 600; }
.demo-emails { max-width: 760px; margin: 12px auto; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.demo-emails pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.demo-views { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 20px 0; }
a.demo-view { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  text-decoration: none; color: var(--text); min-height: 44px; }
a.demo-view strong { color: var(--accent); font-size: 18px; }
a.demo-view:hover { border-color: var(--accent); }
main a.demo-view { text-decoration: none; }
main a.demo-view:hover strong, main a.demo-view:focus-visible strong { text-decoration: underline; }
