/* CEF Radar - the 55+ design system (PRODUCT_SPEC §5.1). One file, system fonts, one accent, no motion, no shadows.
   Text never below 16px; body 19px; targets 48px; single 720px column; light and dark from the same rules. */

:root {
  --bg:#FFFFFF; --bg-soft:#F3F4F6; --ink:#111827; --ink-2:#374151; --line:#D1D5DB;
  --accent:#1D4ED8; --accent-soft:#E8EFFF; --visited:#4C1D95;
  --text-sm:1rem;        /* 16px FLOOR: footer, meta, table cells */
  --text-base:1.1875rem; /* 19px body, rows, inputs, buttons (18px below 400px) */
  --text-lg:1.375rem;    /* 22px search input text, answer lead, primary buttons */
  --text-xl:1.625rem;    /* 26px h2 */
  --text-2xl:2rem;       /* 32px h1 inner pages */
  --text-3xl:2.5rem;     /* 40px home question; 32px on mobile */
  --lh:1.6; --measure:34em; --content-max:720px; --wide-max:960px;
  --s1:8px; --s2:16px; --s3:24px; --s4:32px; --s6:48px; --s8:64px;
  --radius:8px; --target:48px; --focus:3px solid var(--accent);
  --on-accent:#FFFFFF;
  --tap:calc((var(--target) - 1.6em) / 2);   /* pads an inline link up to the 48px target without breaking the line */
  --font:-apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#0F172A; --bg-soft:#1E293B; --ink:#F1F5F9; --ink-2:#CBD5E1; --line:#334155;
    --accent:#93B4FF; --accent-soft:#1E2A4A; --visited:#C4B5FD; --on-accent:#0F172A;
  }
}
:root[data-theme="dark"] {
  --bg:#0F172A; --bg-soft:#1E293B; --ink:#F1F5F9; --ink-2:#CBD5E1; --line:#334155;
  --accent:#93B4FF; --accent-soft:#1E2A4A; --visited:#C4B5FD; --on-accent:#0F172A;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--text-base); line-height: var(--lh); font-weight: 400;
  -webkit-text-size-adjust: 100%;
}
@media (max-width: 400px) { :root { --text-base:1.125rem; } }
h1, h2, h3, p, ul, ol, dl, figure, table { margin: 0; }
h1, h2, h3, strong, b, th, dt { font-weight: 700; }
h1 { font-size: var(--text-2xl); line-height: 1.25; margin-block: var(--s2) var(--s2); max-width: var(--measure); }
h1.home-h1 { font-size: var(--text-3xl); }
@media (max-width: 600px) { h1.home-h1 { font-size: var(--text-2xl); } }
h2 { font-size: var(--text-xl); line-height: 1.3; margin-block: var(--s4) var(--s2); max-width: var(--measure); }
h3 { font-size: var(--text-base); margin-block: var(--s2) var(--s1); max-width: var(--measure); }
p { max-width: var(--measure); margin-block: 0 var(--s2); }
ul.plain, ol.plain { padding-left: 1.2em; max-width: var(--measure); }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:visited { color: var(--visited); }
a:hover { text-decoration-thickness: 2px; }
p a, dd a, .note a, .facts-dl a, .glossary a { display: inline-block; padding-block: var(--tap); min-width: var(--target); text-align: left; }
:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: var(--text-sm); }
small, .helper, .meta, .asof, .site-footer, td, th, caption, figcaption, .crumbs, .sort, .stale, .question { font-size: var(--text-sm); }
.helper, .asof, .meta, .site-footer, figcaption, .question { color: var(--ink-2); }
.sub, .lead { font-size: var(--text-base); color: var(--ink-2); margin-block: 0 var(--s3); }
.lead { font-size: var(--text-lg); color: var(--ink); }
.note { padding: var(--s2); background: var(--bg-soft); border-radius: var(--radius); }
.stale { padding: var(--s2); border: 2px solid var(--line); border-radius: var(--radius); color: var(--ink); margin-block: var(--s3); max-width: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--s3); }
@media (max-width: 400px) { .wrap { padding-inline: var(--s2); } }
main { display: block; padding-block: var(--s3) var(--s6); }
section { margin-block: 0 var(--s4); }
.skip { position: absolute; left: -999px; top: 0; padding: var(--s2); background: var(--bg); color: var(--accent); min-height: var(--target); }
.skip:focus { left: var(--s2); z-index: 1; }

/* header: 64px, not sticky, wordmark + four text links (wrap on narrow screens) */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .bar { min-height: var(--s8); display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding-block: var(--s1); }
.wordmark { font-weight: 700; font-size: var(--text-lg); color: var(--ink); text-decoration: none; min-height: var(--target); display: inline-flex; align-items: center; }
.wordmark:visited { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: var(--s2); }
.site-header nav a { display: inline-flex; align-items: center; min-height: var(--target); padding-inline: var(--s1); color: var(--ink); text-decoration: none; }
.site-header nav a:visited { color: var(--ink); }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 600px) { .site-header nav { width: 100%; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s4) var(--s6); }
.site-footer p { max-width: none; margin-block: 0 var(--s2); }
.site-footer a { color: var(--accent); display: inline-block; padding-block: var(--tap); }
.footer-links a { padding-inline: var(--s1); }

/* breadcrumb */
.crumbs { font-size: var(--text-base); margin-block: 0 var(--s2); }
.crumbs a { display: inline-block; padding-block: var(--tap); min-width: var(--target); text-align: left; }

/* ---------- buttons, forms ---------- */
.btn, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: var(--target); padding: var(--s1) var(--s3); border-radius: var(--radius);
  font: inherit; font-size: var(--text-base); text-decoration: none; cursor: pointer;
  border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent);
}
.btn:visited, button:visited { color: var(--on-accent); }
.btn--secondary, summary.btn { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.btn--secondary:visited { color: var(--accent); }
.btn--primary { background: var(--accent); color: var(--on-accent); font-size: var(--text-lg); min-height: 56px; }
.btn:hover, button:hover { text-decoration: underline; }
summary.btn { list-style: none; width: fit-content; margin-block: var(--s2); }
summary.btn::-webkit-details-marker { display: none; }
label { display: block; font-size: var(--text-base); margin-block: 0 var(--s1); }
input[type="search"], input[type="email"], input[type="text"] {
  width: 100%; min-height: 56px; padding: var(--s1) var(--s2); font: inherit; font-size: var(--text-lg);
  color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius);
}
input:focus-visible { border-color: var(--accent); outline: var(--focus); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--accent); }
.search, .email-form { margin-block: 0 var(--s3); max-width: var(--content-max); }
.search-row { display: flex; gap: var(--s2); align-items: stretch; }
.search-row input { flex: 1 1 auto; min-width: 0; }
.search-row button { min-height: 56px; min-width: 140px; font-size: var(--text-lg); flex: 0 0 auto; }
@media (max-width: 600px) { .search-row { flex-direction: column; } .search-row button { width: 100%; } }
.helper { margin-block: var(--s1) 0; }
.suggest { list-style: none; padding: 0; margin: 0; border: 2px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.suggest li a { display: flex; align-items: center; min-height: var(--target); padding: var(--s1) var(--s2); text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.suggest li a:focus-visible, .suggest li a:hover { background: var(--accent-soft); text-decoration: underline; }
.suggest li:first-child a { border-top: 0; }
form + .helper { margin-top: var(--s1); }

/* ---------- answer boxes ---------- */
.answer { padding: var(--s4); border-radius: var(--radius); border: 2px solid var(--line); background: var(--bg-soft); margin-block: 0 var(--s3); }
.answer--yes { border-color: var(--accent); background: var(--accent-soft); }
.answer .question { margin-block: 0 var(--s1); }
.answer h2 { margin-block: 0 var(--s2); }
.answer h2:last-child, .answer p:last-child { margin-bottom: 0; }
.answer ul.plain li { margin-block: var(--s1); }
.answer ul.plain li a { display: inline-block; padding-block: var(--tap); min-width: var(--target); text-align: left; }
.open-event { border-top: 1px solid var(--line); padding-top: var(--s2); margin-top: var(--s2); }
.open-event h3 { margin-top: 0; }
.open-event .do { margin-block: 0 var(--s2); }
.open-event p:last-of-type { margin-bottom: var(--s1); }
.answer .doc { margin-bottom: 0; }

/* ---------- rows (whole row is one link) ---------- */
.rows { list-style: none; padding: 0; margin: 0 0 var(--s2); display: flex; flex-direction: column; gap: var(--s1); }
.rows li { border-bottom: 1px solid var(--line); }
.rows li a {
  display: block; min-height: var(--s8); padding: var(--s2); text-decoration: none; color: var(--ink); border-radius: var(--radius);
}
.rows li a:visited { color: var(--ink); }
.rows li a:hover, .rows li a:focus-visible { background: var(--bg-soft); }
.rows li a strong { text-decoration: underline; color: var(--accent); }
.rows li a:visited strong { color: var(--visited); }
.rows .meta { display: inline-block; margin-left: var(--s1); }
.rows b { margin-left: var(--s1); }
.links { list-style: none; padding: 0; margin: 0 0 var(--s2); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.links li a { display: inline-flex; align-items: center; min-height: var(--target); padding-inline: var(--s1); }
.links li a[aria-current="true"] { font-weight: 700; }
.filters h2 { margin-block: var(--s3) var(--s1); }
.sort { margin-block: 0 var(--s2); }
.sort a, .sort b { display: inline-block; padding-block: var(--tap); padding-inline: var(--s1); min-width: var(--target); text-align: left; }
details.more { margin-block: 0 var(--s3); }
details.more > summary.btn { margin-block: var(--s1) var(--s2); }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.timeline li { border-bottom: 1px solid var(--line); padding-block: var(--s2); }
.timeline .when { margin-block: 0 var(--s1); }
.timeline p { margin-block: 0 var(--s1); }
.doc { display: inline-flex; align-items: center; min-height: var(--target); }

/* ---------- facts, holdings ---------- */
.facts { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.facts li { border-bottom: 1px solid var(--line); padding-block: var(--s2); max-width: var(--measure); }
.facts li:first-child { padding-top: 0; }
.asof { display: block; margin-top: var(--s1); }
.asof .doc { min-height: var(--target); }
.holdings { padding-left: 1.6em; margin: 0 0 var(--s2); max-width: var(--measure); }
.holdings li { min-height: var(--target); padding-block: var(--s1); border-bottom: 1px solid var(--line); }
.facts-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s3); margin-block: var(--s3); max-width: var(--content-max); }
.facts-dl dt { color: var(--ink-2); }
.facts-dl dd { margin: 0; }
@media (max-width: 600px) { .facts-dl { grid-template-columns: 1fr; } .facts-dl dd { margin-bottom: var(--s1); } }
.glossary dt { margin-top: var(--s2); }
.glossary dd { margin: 0 0 var(--s1); max-width: var(--measure); }
.toc { padding-left: 1.4em; margin-block: 0 var(--s3); }
.toc li a { display: inline-block; padding-block: var(--tap); min-width: var(--target); text-align: left; }

/* chart: one accent line, one grey zero line, HTML labels (16px), no legend */
figure { margin-block: var(--s3); max-width: var(--content-max); }
.chart-grid { display: flex; gap: var(--s1); align-items: stretch; height: 200px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; flex: 0 0 4.5em; text-align: right; color: var(--ink-2); font-size: var(--text-sm); }
.chart { flex: 1 1 auto; min-width: 0; height: 100%; display: block; border-left: 2px solid var(--line); }
.chart-x { display: flex; justify-content: space-between; padding-left: calc(4.5em + var(--s1)); color: var(--ink-2); font-size: var(--text-sm); margin-block: var(--s1) 0; }
.chart-axis { stroke: var(--line); stroke-width: 2; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
figcaption { margin-top: var(--s2); max-width: var(--measure); }

/* ---------- card (alerts) ---------- */
.card { background: var(--bg-soft); padding: var(--s4); border-radius: var(--radius); margin-block: var(--s4); }
.card h2 { margin-top: 0; }
.card form { margin-block: 0 var(--s2); }
.card .helper { margin-top: var(--s2); }

/* ---------- tables: 4 columns max, 16px cells, 48px rows, cards below 720px ---------- */
.table-wrap { max-width: var(--wide-max); overflow-x: auto; margin-block: var(--s2) var(--s3); }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; padding-block: var(--s1); color: var(--ink-2); }
th, td { text-align: left; padding: var(--s1) var(--s2); min-height: var(--target); height: var(--target); border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-2); }
td a { display: inline-block; padding-block: var(--tap); min-width: var(--target); text-align: left; }
@media (max-width: 720px) {
  table, thead, tbody, tr, th, td { display: block; height: auto; }
  thead { position: absolute; left: -999px; }
  tr { border-bottom: 2px solid var(--line); padding-block: var(--s1); }
  td { border: 0; padding: var(--s1) 0; }
  td::before { content: attr(data-label) ": "; color: var(--ink-2); }
}

/* ---------- pager ---------- */
.pager { display: flex; gap: var(--s2); flex-wrap: wrap; margin-block: var(--s3); }

/* numbers */
td, .facts, .holdings, .rows, .answer { font-variant-numeric: tabular-nums; }

/* ---------- Your alerts (alerts.html): label + Stop rows, matches, options ---------- */
.rows--alerts li, .rows--matches li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap;
  min-height: 56px; padding: var(--s1) 0;
}
.rows--alerts .row__label, .rows--matches .row__label { flex: 1 1 16em; min-width: 0; }
.rows--alerts .row__label a, .rows--matches .row__label a { display: inline-block; padding-block: var(--tap); min-height: auto; }
.inline { display: inline-block; margin: 0; }
.btn--link { background: var(--bg); color: var(--accent); border-color: var(--bg); text-decoration: underline; padding-inline: var(--s2); }
.btn--link:visited { color: var(--accent); }
.notice { padding: var(--s2); background: var(--bg-soft); border-radius: var(--radius); margin-block: 0 var(--s3); max-width: var(--measure); }
.notice form, .notice .btn--link { vertical-align: baseline; }
.checks { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.checks li { display: flex; align-items: flex-start; gap: var(--s2); min-height: var(--target); padding-block: var(--s1); }
.checks input[type="checkbox"] { width: 32px; height: 32px; margin: var(--s1) 0 0; flex: 0 0 auto; accent-color: var(--accent); }
.checks input[type="checkbox"]:focus-visible { outline: var(--focus); outline-offset: 2px; }
.checks label { margin: 0; padding-block: var(--s1); }
.options { margin-block: var(--s2) var(--s3); }
.options ul + .btn, .options ul + button { margin-block: var(--s1) 0; }
.state { display: inline-block; padding-inline: var(--s1); color: var(--ink-2); }
/* More options: the category rows keep the state word next to its sentence (left-aligned, one row each); the stacked
   forms and links after them get the 8px-plus gap §5.1 requires between targets. */
.links--categories { display: block; }
.links--categories li { margin-block: 0 var(--s1); }
.links--categories li form { display: flex; align-items: center; gap: var(--s2); flex-wrap: nowrap; }
.links--categories .btn--link { flex: 1 1 auto; justify-content: flex-start; text-align: left; }
.links--categories .state { flex: 0 0 auto; }
#options > form.inline, #options > div, #options > p { display: block; margin-block: 0 var(--s2); }
#options > div > form.inline { margin-block: 0; }
.form--email button { margin-block: var(--s2) 0; }
.print-only { display: none; }
.error { margin-block: var(--s1) 0; }
.error:empty { display: none; }
input.is-error { border-color: var(--accent); }
