/* design: v2 */
/* isitfdacleared.com, design v2: an evidence file. Deep plum ink (the hero, page heads, footer), a pale lilac-grey reading
   surface, paper-white cards, and one rubber-stamp orange for the buttons and the stamp. Bricolage Grotesque for headings,
   Albert Sans for text, DM Mono for record numbers (all OFL, self-hosted). It keeps its light surfaces in dark mode too
   (color-scheme: light, no dark overrides), so every pair is checked once, by tests/design.test.ts. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albert-sans.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/fonts/dm-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --brand: #4a2358;        /* deep plum ink: the hero, the page heads, the footer */
  --bg: #ece6ed;           /* pale lilac-grey, the reading surface */
  --card: #f8f5f8;
  --paper: #fbf8ef;        /* the 510(k) sheet */
  --band: #ddd2df;
  --text: #231428;
  --muted: #5b4a63;
  --line: #c5b6c9;
  --rule: #231428;
  --link: #6a2a8f;
  --on-brand: #f8f1fa;
  --on-brand-muted: #d9c7df;
  --stamp: #d9480f;        /* rubber-stamp orange, for marks and rules */
  --btn: #b83d0a;
  --btn-hover: #983207;
  --btn-text: #ffffff;
  /* the three answers: text on its chip, and a solid mark for dots */
  --cited: #17603a; --cited-bg: #d5ecdc; --cited-mark: #2f8a57;
  --maker: #7a4a00; --maker-bg: #f6e2b4; --maker-mark: #b8780d;
  --listed: #2f4560; --listed-bg: #d9e2ee; --listed-mark: #5a7596;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 12px;
  color-scheme: light;
}

/* ---------- type ---------- */
body { font-family: var(--sans); font-size: 17.5px; line-height: 1.6; background: var(--bg); color: var(--text); font-weight: 400; }
main { overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.02; margin: 0.1em 0 0.3em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.95rem); line-height: 1.15; margin: 1.7em 0 0.5em; }
h3 { font-size: 1.15rem; line-height: 1.25; margin: 0 0 0.3em; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
strong, b { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.k, .code, .k-line { font-family: var(--mono); }
.wrap { max-width: 1180px; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16.5px; } }
::selection { background: var(--stamp); color: #ffffff; }
.label { font-size: 0.88rem; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { background: var(--bg); border-bottom: 0; }
.header-row { padding-top: 10px; padding-bottom: 10px; max-width: none; padding-left: clamp(16px, 3.6vw, 56px); padding-right: clamp(16px, 3.6vw, 56px); }
.brand { gap: 10px; }
.brand svg.logo-mark { width: 40px; height: 40px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.main-nav { gap: 4px 24px; }
.main-nav a { font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--text); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--link); text-decoration-color: var(--stamp); text-decoration-thickness: 3px; }
.menu-btn { font-family: var(--display); font-weight: 700; color: var(--text); border: 2px solid var(--text); border-radius: 10px; background: var(--bg); }
@media (max-width: 760px) {
  .wordmark { font-size: 1.2rem; }
  .brand svg.logo-mark { width: 34px; height: 34px; }
  .has-menu.menu-open .main-nav a { border-top-color: var(--line); }
}

/* ---------- buttons ---------- */
.btn { background: var(--btn); color: var(--btn-text); border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; padding: 12px 22px; border: 0; cursor: pointer; }
.btn:hover { background: var(--btn-hover); color: var(--btn-text); }

/* ---------- the lookup box ---------- */
.lookup label { display: block; font-family: var(--display); font-weight: 700; font-size: 0.95rem; margin: 0 0 6px; }
.lookup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.lookup input[type="search"] { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 1.1rem; padding: 12px 16px; border: 3px solid var(--rule); border-radius: 10px; background: #ffffff; color: var(--text); }
.lookup input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.lookup input[type="search"]:focus { outline: 3px solid var(--stamp); outline-offset: 2px; }
.lookup-hero label { color: var(--on-brand); }
.lookup-inline { max-width: 560px; margin: 0.6em 0 1.2em; }

/* ---------- home: the hero ---------- */
.hero { background: var(--brand); color: var(--on-brand); position: relative; overflow: hidden; }
.hero-in { max-width: none; padding: 34px clamp(16px, 3.6vw, 56px) 0; display: grid; grid-template-columns: minmax(0, 33rem) minmax(0, 1fr); gap: 20px 40px; align-items: end; }
.hero-text { padding-bottom: 46px; align-self: center; }
.hero h1 { color: var(--on-brand); font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 0.98; margin: 0 0 16px; }
.hero-sub { font-size: 1.15rem; line-height: 1.5; margin: 0 0 22px; max-width: 30em; color: var(--on-brand); }
.hero-note { font-size: 0.9rem; color: var(--on-brand-muted); margin: 14px 0 0; }
.hero-art { line-height: 0; justify-self: end; width: 100%; max-width: 760px; }
.hero-art .hero-scene { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 26px; }
  .hero-text { padding-bottom: 6px; }
  .hero-art { max-width: 560px; justify-self: center; }
}
@media (max-width: 600px) { .hero h1 { font-size: 2.5rem; } .hero-sub { font-size: 1.04rem; } }

/* ---------- home: the sections under it ---------- */
.ladder-section, .ledger-section, .shelf-section { padding-top: 8px; padding-bottom: 8px; }
.section-sub { color: var(--muted); margin-top: -0.2em; }
.uk-line { margin-top: 1.4em; padding: 12px 16px; border-left: 5px solid var(--stamp); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }

/* the four steps: a staircase, each step a bit further right and darker */
.ladder ol { list-style: none; margin: 1.2em 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.ladder li { counter-increment: step; position: relative; background: var(--card); border: 2px solid var(--rule); border-radius: var(--radius); padding: 12px 18px 12px 62px; }
.ladder li::before { content: counter(step); position: absolute; left: 14px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--rule); color: var(--card); font-family: var(--display); font-weight: 800; display: grid; place-items: center; }
.ladder li:nth-child(3)::before { background: var(--cited); }
.ladder li:nth-child(2) { margin-left: clamp(0px, 3vw, 36px); }
.ladder li:nth-child(3) { margin-left: clamp(0px, 6vw, 72px); border-color: var(--cited); }
.ladder li:nth-child(4) { margin-left: clamp(0px, 9vw, 108px); }
.ladder h3 { margin: 0; }
.ladder p { margin: 2px 0 0; }

.shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 1em 0; }
.shelf { background: var(--card); border: 2px solid var(--rule); border-radius: var(--radius); padding: 16px 20px; box-shadow: 5px 5px 0 var(--rule); }
.shelf h3 { font-size: 1.35rem; }
.shelf p { margin: 0; }

/* ---------- article pages: the head is a plum card with its spot beside the heading ---------- */
.article-wrap { padding-top: 0; }
.crumbs { margin: 0; padding: 4px 0 12px; font-size: 0.88rem; color: var(--muted); }
.page-head, .page-head.has-art { background: var(--brand); color: var(--on-brand); border-radius: 18px; padding: 24px clamp(18px, 3vw, 36px) 20px; margin-bottom: 26px; max-width: none; align-items: center; }
.page-head h1 { color: var(--on-brand); margin-top: 0; }
.page-head .lede, .page-head .byline, .page-head .byline a, .page-head .disclosure, .page-head .disclosure a { color: var(--on-brand); }
.page-head .lede { font-size: 1.15rem; }
.page-head .byline { font-size: 0.86rem; color: var(--on-brand-muted); }
.page-head .byline a, .page-head .disclosure a { color: var(--on-brand-muted); }
.page-head-art { width: clamp(96px, 17vw, 190px); }
@media (max-width: 560px) { .page-head.has-art { flex-direction: row; gap: 10px; } .page-head-art { width: 84px; } .page-head h1 { font-size: 1.85rem; } }
.page-body { max-width: 940px; }
.page-body h2 { margin-top: 1.5em; }
.toc { border: 2px solid var(--rule); background: var(--card); border-radius: var(--radius); }
.toc-title { font-family: var(--display); font-weight: 700; }

/* the answer at the top of a brand page */
.verdict { background: var(--card); border: 2px solid var(--rule); border-left: 10px solid var(--stamp); border-radius: var(--radius); padding: 16px 22px; margin: 0 0 1.4em; }
.verdict p { margin: 0 0 0.7em; }
.verdict .label { margin-bottom: 0; }
.verdict-lead { font-size: 1.12rem; }

/* ---------- chips, in the three answers' colours ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; line-height: 1.2; padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; font-family: var(--sans); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip-cited { color: var(--cited); background: var(--cited-bg); } .chip-cited::before { background: var(--cited-mark); }
.chip-maker { color: var(--maker); background: var(--maker-bg); } .chip-maker::before { background: var(--maker-mark); }
.chip-listed { color: var(--listed); background: var(--listed-bg); } .chip-listed::before { background: var(--listed-mark); }
.none { color: var(--muted); font-size: 0.9rem; }

/* ---------- tables: ruled like a ledger ---------- */
.table-scroll { overflow-x: auto; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--card); margin: 1em 0; }
.records { width: 100%; font-size: 0.93rem; border-collapse: collapse; }
.records th, .records td { padding: 10px 13px; border-bottom: 1.5px solid var(--line); text-align: left; vertical-align: top; background: transparent; }
.records thead th { background: var(--band); font-family: var(--display); font-weight: 700; font-size: 0.92rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.records tbody th { font-weight: 650; min-width: 190px; }
.records tr:last-child > * { border-bottom: 0; }
.records small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.35; font-weight: 400; margin-top: 2px; }
.records small.code { font-family: var(--mono); }
.records .firm { font-weight: 600; display: block; }
.records td.num, .records th.num { white-space: nowrap; }
.records .k { white-space: nowrap; }
.more-names { margin: 0.6em 0; }
.more-names summary { cursor: pointer; font-weight: 700; color: var(--link); }
@media (max-width: 760px) {
  .records thead { display: none; }
  .records, .records tbody, .records tr, .records th, .records td { display: block; }
  .records tr { padding: 10px 12px; border-bottom: 1.5px solid var(--line); }
  .records tr:last-child { border-bottom: 0; }
  .records th, .records td { padding: 0; border: 0; min-width: 0; }
  .records td { margin-top: 5px; }
}

/* ---------- clearances: each on its own slip ---------- */
.clearances { list-style: none; margin: 1em 0; padding: 0; display: grid; gap: 12px; }
.clearances li { background: var(--paper); border: 2px solid var(--rule); border-radius: var(--radius); padding: 12px 18px; }
.clearances p { margin: 3px 0; }
.k-line { font-size: 1rem; }
.k-line .k { font-size: 1.15rem; font-weight: 400; }
.k-meta { color: var(--muted); font-family: var(--sans); font-size: 0.88rem; margin-left: 8px; }
.k-applicant { font-weight: 700; }
.k-how { color: var(--muted); font-size: 0.88rem; }

/* ---------- the explainer on every brand page ---------- */
.explainer { background: var(--band); border-radius: var(--radius); padding: 16px 22px; margin: 1.6em 0; }
.explainer h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.explainer ul { margin: 0; padding-left: 1.2em; }
.explainer li { margin: 0.35em 0; }
.ladder.explainer { background: transparent; padding: 0; }

/* ---------- shop links ---------- */
.shops { display: grid; gap: 8px; margin: 0.6em 0; }
.shops p { margin: 0; display: flex; align-items: center; gap: 12px; }
.shop-flag { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; border: 2px solid var(--rule); border-radius: 6px; padding: 1px 7px; background: var(--card); }

/* ---------- search results ---------- */
.results { list-style: none; margin: 1em 0; padding: 0; display: grid; gap: 12px; }
.result { background: var(--card); border: 2px solid var(--rule); border-radius: var(--radius); padding: 12px 18px; }
.result h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 0.3em; }
.result p { margin: 0.35em 0; }
.no-record { background: var(--card); border: 2px solid var(--rule); border-left: 10px solid var(--listed-mark); border-radius: var(--radius); padding: 6px 22px 14px; margin: 1.4em 0; }
.no-record h2 { margin-top: 0.7em; }

/* ---------- FAQs ---------- */
.faqs details { border-bottom: 1.5px solid var(--line); padding: 12px 0; }
.faqs summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; font-family: var(--sans); font-weight: 700; color: var(--stamp); font-size: 1.4rem; line-height: 1; }
.faqs details[open] summary::after { content: "\2212"; }

/* ---------- footer: the same green ---------- */
.site-footer { background: var(--brand); color: var(--on-brand-muted); border-top: 0; margin-top: 56px; padding-top: 40px; }
.site-footer a { color: var(--on-brand-muted); }
.site-footer a:hover { color: var(--on-brand); }
.footer-brand .brand, .footer-brand .wordmark { color: var(--on-brand); }
.footer-col h2 { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--on-brand); }
.footer-legal::before { border-top-color: #6d4a7c; }

/* the logo's plum strokes would vanish on the plum footer */
.site-footer .logo-mark circle { stroke: var(--on-brand); }
.site-footer .logo-mark path:last-child { stroke: var(--on-brand); }
