/* Asked by Sian – warm paper, ink and yellow. WCAG 2.2 AA. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Theme tokens ---------- */
:root {
  --bg: #fbf8ef;
  --surface: #ffffff;
  --surface-2: #f6f1e3;
  --surface-3: #ece5d0;
  --ink: #1c1b17;
  --muted: #5b5545;
  --line: #e5dec8;
  --line-strong: #878069;
  --yellow: #ffd500;
  --yellow-hover: #f2c400;
  --yellow-soft: #fff4bf;
  --yellow-line: #d9b100;
  --on-yellow: #1c1b17;
  --link: #1c1b17;
  --link-line: #a88600;
  --focus: #1c1b17;
  --mark-bg: #ffe14d;
  --mark-ink: #1c1b17;
  --hero-bg: #ffd500;
  --hero-ink: #1c1b17;
  --hero-muted: #3a372c;
  --hero-glyph: rgba(28, 27, 23, 0.07);
  --hero-card: rgba(255, 255, 255, 0.6);
  --bar: #5b5545;
  --control: #1c1b17;
  --ok-bg: #e2f2e6; --ok-ink: #1a5c2f; --ok-dot: #2f8a4c;
  --wait-bg: #f0ebdd; --wait-ink: #4d4737; --wait-dot: #958c74;
  --late-bg: #fde5e2; --late-ink: #9b1b13; --late-dot: #d1372b;
  --footer-bg: #1c1b17;
  --footer-ink: #e9e4d6;
  --banner-bg: #1c1b17;
  --banner-ink: #fbf8ef;
  --footer-link: #ffe066;
  --shadow-sm: 0 1px 2px rgba(28, 27, 23, 0.06);
  --shadow: 0 1px 2px rgba(28, 27, 23, 0.05), 0 6px 20px -6px rgba(28, 27, 23, 0.12);
  --shadow-lg: 0 2px 4px rgba(28, 27, 23, 0.04), 0 18px 40px -12px rgba(28, 27, 23, 0.22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --wrap: 76rem;
  --narrow: 48rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }
svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.625rem); }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--link); text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus, h2[tabindex="-1"]:focus { outline: none; }

mark { background: var(--mark-bg); color: var(--mark-ink); padding: 0 0.12em; border-radius: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: var(--narrow); }
@media (min-width: 40em) { .wrap { padding: 0 28px; } }

.muted { color: var(--muted); }

/* ---------- Skip link & banner ---------- */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  background: var(--yellow); color: var(--on-yellow);
  padding: 0.6em 1em; font-weight: 700; border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.site-banner { background: var(--banner-bg); color: var(--banner-ink); font-size: 0.875rem; line-height: 1.45; }
.site-banner .wrap { display: flex; align-items: center; gap: 0.6rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.site-banner a { color: inherit; text-decoration-color: currentColor; }
.site-banner :focus-visible { outline-color: var(--yellow); }
.banner-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--yellow); flex: none; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.site-name { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 650; font-size: 1.375rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.logo {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none;
  background: var(--yellow); color: var(--on-yellow); border-radius: 50%;
  font-family: var(--serif); font-weight: 800; font-size: 1.3rem; line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(28, 27, 23, 0.12);
}
.site-header nav { margin-left: auto; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.site-header nav a {
  display: inline-block; padding: 0.45rem 0.8rem; border-radius: 999px;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--ink);
}
.site-header nav a:hover { background: var(--surface-2); }
.site-header nav a[aria-current="page"] { background: var(--yellow-soft); box-shadow: inset 0 0 0 1px var(--yellow-line); }

@media (max-width: 30em) {
  .header-inner { gap: 0.5rem; }
  .site-name { font-size: 1.2rem; gap: 0.45rem; }
  .site-name .logo { width: 1.85rem; height: 1.85rem; font-size: 1.15rem; }
  .site-header nav a { padding: 0.4rem 0.6rem; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-ink); padding: 3rem 0 4.5rem; }
.hero::after {
  content: "?"; position: absolute; right: -1.5rem; top: -7rem; pointer-events: none;
  font-family: var(--serif); font-weight: 800; font-size: 30rem; line-height: 1; color: var(--hero-glyph);
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; }
.hero-text { flex: 1 1 28rem; min-width: 0; }
.portrait {
  flex: none; width: 140px; height: 187px; object-fit: cover;
  border-radius: var(--radius-lg); border: 5px solid var(--surface); box-shadow: var(--shadow-lg);
  transform: rotate(-2deg); background: var(--surface);
}
.hero h1 { max-width: 21ch; margin-bottom: 0.6rem; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8125rem; margin-bottom: 0.6rem; }
.hero .eyebrow { display: inline-block; background: var(--hero-card); padding: 0.25rem 0.7rem; border-radius: 999px; }
.lead { font-size: 1.1875rem; line-height: 1.55; max-width: 44rem; }
.hero .lead { color: var(--hero-muted); }
.hero a { color: var(--hero-ink); text-decoration-color: currentColor; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 600; margin: 0; }
/* Contact card in the hero */
.hero-contact {
  flex: 1 1 100%; max-width: 40rem; background: var(--surface); color: var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.1rem 1.25rem 1rem;
}
.hero-contact h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.hero-contact .office h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.4rem; }
.hero .hero-contact a { color: var(--link); text-decoration-color: var(--link-line); }
.hero-contact-more { margin: 0.6rem 0 0; font-size: 0.875rem; font-weight: 600; }
@media (min-width: 72em) {
  .hero-inner { flex-wrap: nowrap; }
  .hero-contact { flex: 0 0 19rem; }
}

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.9375rem; }
.contact-row { display: flex; align-items: flex-start; gap: 0.6rem; min-width: 0; }
.contact-row > svg { margin-top: 0.2em; color: var(--muted); }
.contact-row a { overflow-wrap: anywhere; }
.contact-row address { font-style: normal; line-height: 1.45; }
.contact-map { padding-left: 1.75rem; font-size: 0.875rem; }
.contact-inline { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.offices .office { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.offices h3 { margin-bottom: 0.6rem; }

.follow-up { background: var(--yellow-soft); border: 1px solid var(--yellow-line); border-radius: var(--radius-lg); padding: 1.15rem 1.35rem; margin-bottom: 2.5rem; }
.follow-up h2 { font-size: 1.2rem; }
.follow-up p { margin-bottom: 0.6rem; }
.follow-up .contact-row > svg { color: var(--ink); }

.icon-external { width: 0.8em; height: 0.8em; margin-left: 0.2em; vertical-align: -0.05em; }

@media (max-width: 40em) {
  .hero { padding: 2rem 0 4rem; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .portrait { width: 104px; height: 139px; }
  .hero::after { font-size: 18rem; top: -3rem; }
}

/* ---------- Inner page hero ---------- */
.page-hero { background: var(--hero-bg); color: var(--hero-ink); padding: 1.75rem 0 2.25rem; position: relative; overflow: hidden; }
.page-hero a { color: var(--hero-ink); text-decoration-color: currentColor; }
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero .lead { color: var(--hero-muted); margin-bottom: 0; }
.page-hero .lead a { font-weight: 600; }
.page-hero .eyebrow { color: var(--hero-muted); }
.page-body { padding-top: 2rem; }

.breadcrumb ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem; font-size: 0.875rem; font-weight: 500; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.45rem 0 0.3rem; opacity: 0.6; }

/* ---------- Search ---------- */
.explorer { position: relative; z-index: 2; }
.search-bar {
  margin: -2.5rem 0 2rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.1rem 1.25rem 1rem;
}
@media (min-width: 40em) { .search-bar { padding: 1.4rem 1.75rem 1.2rem; } }
.search-label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1.3rem; height: 1.3rem; color: var(--muted); pointer-events: none; }
.search-input input {
  width: 100%; min-height: 3.25rem; padding: 0.6rem 1rem 0.6rem 3rem;
  font: inherit; font-size: 1.125rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.search-input input::placeholder { color: var(--muted); opacity: 1; }
.search-input input:focus-visible { outline-offset: 1px; border-color: var(--ink); }
.hint { margin: 0.45rem 0 0; font-size: 0.875rem; color: var(--muted); }

/* ---------- Explorer layout ---------- */
.explorer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 64em) {
  .explorer-grid { grid-template-columns: 18.5rem minmax(0, 1fr); gap: 2rem; align-items: start; }
}

/* ---------- Filters ---------- */
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.filter-panel > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem; min-height: 3rem; border-radius: var(--radius-lg);
}
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary::after {
  content: ""; width: 0.6rem; height: 0.6rem; border: solid var(--ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-3px); transition: transform 0.15s;
}
.filter-panel[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.filter-panel[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.filter-panel h2 { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; font-family: var(--sans); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }
.filter-count { font-weight: 600; font-size: 0.875rem; color: var(--muted); }

#filters { padding: 1.1rem 1.25rem 1.25rem; display: grid; gap: 1rem; }
@media (min-width: 40em) and (max-width: 63.99em) {
  #filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #filters .checks, #filters .form-actions, #filters .date-range { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 0.9375rem; padding: 0; }
.field-inline { flex-direction: row; align-items: center; gap: 0.5rem; }

select, input[type="date"] {
  font: inherit; font-size: 0.9375rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  min-height: 2.75rem; padding: 0.4rem 0.65rem; width: 100%;
}
.field-inline select { width: auto; }
select:hover, input[type="date"]:hover { border-color: var(--ink); }

.date-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem; margin-top: 0.15rem; }
.date-pair label { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.2rem; font-weight: 500; }
.date-pair input { padding: 0.4rem 0.4rem; font-size: 0.875rem; }

.checks { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.checks legend { font-weight: 600; font-size: 0.9375rem; padding: 0; margin-bottom: 0.4rem; }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9375rem; line-height: 1.45; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; accent-color: var(--control); flex: none; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding-top: 0.25rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-size: 0.9375rem; font-weight: 650; cursor: pointer; text-decoration: none;
  background: var(--yellow); color: var(--on-yellow);
  border: 1px solid var(--yellow-line); border-radius: 999px;
  min-height: 2.75rem; padding: 0.45rem 1.25rem; box-shadow: var(--shadow-sm);
}
.button:hover { background: var(--yellow-hover); }
.button-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; padding-inline: 0.5rem; }
.button-quiet:hover { background: var(--surface-2); }
.button-small { min-height: 2.5rem; padding: 0.3rem 1rem; font-size: 0.875rem; background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.button-small:hover { background: var(--yellow-soft); }

.link-button {
  font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--link); background: none; border: 0;
  padding: 0.3rem 0.25rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 0.2em;
}

/* ---------- Summary ---------- */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 2rem; }
@media (min-width: 40em) { .summary { padding: 1.5rem 1.75rem; } }
.summary h2 { font-size: 1.375rem; }
.summary-scope { font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; color: var(--muted); letter-spacing: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.75rem; margin: 0 0 1.5rem; }
.stat { background: var(--surface-2); border-radius: var(--radius); padding: 0.85rem 1rem; }
.stat:first-child { background: var(--yellow-soft); }
.stat dt { font-size: 0.8125rem; font-weight: 600; color: var(--muted); margin-bottom: 0.2rem; }
.stat:first-child dt { color: var(--ink); }
.stat dd { margin: 0; }
.stat-value { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.02em; }
.stat-note { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 0.15rem; }

.bar-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.bar-table caption { text-align: left; font-weight: 700; margin-bottom: 0.4rem; }
.bar-table thead th { text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0.3rem 0.5rem 0.4rem 0; }
.bar-table th[scope="row"] { text-align: left; font-weight: 500; padding: 0.4rem 1rem 0.4rem 0; width: 46%; }
.bar-table th[scope="row"] a { text-decoration-color: var(--line-strong); }
.bar-table td { padding: 0.4rem 0; }
.bar-table tbody tr + tr { border-top: 1px solid var(--line); }
.bar-cell { display: flex; align-items: center; gap: 0.6rem; }
.bar { display: block; height: 0.6rem; min-width: 3px; background: var(--bar); border-radius: 999px; }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.875rem; }
@media (max-width: 36em) { .bar-table th[scope="row"] { width: 58%; } }

/* ---------- Results ---------- */
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.results-head h2 { margin-bottom: 0.15rem; }
.results-count { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.results-tools label { font-size: 0.875rem; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer;
  font: inherit; font-size: 0.875rem; color: var(--ink);
  background: var(--yellow-soft); border: 1px solid var(--yellow-line); border-radius: 999px;
  min-height: 2.25rem; padding: 0.25rem 0.5rem 0.25rem 0.85rem;
}
.chip-label { font-weight: 600; }
.chip-x { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-size: 1.1rem; line-height: 1; margin-left: 0.15rem; }
.chip:hover .chip-x { background: var(--yellow); color: var(--on-yellow); }

.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 1.25rem; }
.downloads-label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9375rem; }
.downloads ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.results-list { display: grid; gap: 1rem; }

/* ---------- Question card ---------- */
.q-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 1.15rem 1.25rem 0.9rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.q-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
@media (min-width: 40em) { .q-card { padding: 1.35rem 1.6rem 1rem; } }
.q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.q-ref { margin: 0; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.01em; }
.q-ref a { text-decoration-color: var(--line-strong); }
.q-text { font-size: 1.0625rem; line-height: 1.6; margin: 0.6rem 0 0.75rem; }
.q-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; margin: 0 0 0.6rem; font-size: 0.875rem; color: var(--muted); }
.q-meta div { display: flex; gap: 0.3rem; }
.q-meta dt { font-weight: 600; color: var(--ink); }
.q-meta dt::after { content: ":"; }
.q-meta dd { margin: 0; }
.q-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.35rem 0 0.2rem; font-size: 0.875rem; }
.q-links a { text-decoration-color: var(--line-strong); }
.q-pending { color: var(--muted); font-style: italic; }

.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--muted);
}
.badge-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.status-answered { background: var(--ok-bg); color: var(--ok-ink); }
.status-answered .badge-dot { background: var(--ok-dot); }
.status-awaiting { background: var(--wait-bg); color: var(--wait-ink); }
.status-awaiting .badge-dot { background: var(--wait-dot); }
.status-overdue { background: var(--late-bg); color: var(--late-ink); }
.status-overdue .badge-dot { background: var(--late-dot); }

.q-answer { border-top: 1px solid var(--line); margin-top: 0.5rem; }
.q-answer > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.35rem 0; font-weight: 650; font-size: 0.9375rem;
}
.q-answer > summary::-webkit-details-marker { display: none; }
.q-answer > summary::before {
  content: ""; width: 0.5rem; height: 0.5rem; border: solid var(--ink); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform 0.15s; margin: 0 0.15rem 0 0.1rem;
}
.q-answer[open] > summary::before { transform: rotate(45deg); }
.q-answer > summary:hover .summary-text { text-decoration: underline; text-underline-offset: 0.2em; }
.answer-body { background: var(--surface-2); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 0.6rem; font-size: 1rem; }

/* ---------- Answer content ---------- */
.answer-html > :last-child, .exchange > :last-child, .turn > :last-child { margin-bottom: 0; }
.answer-note { font-size: 0.875rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.table-wrap table { border-collapse: collapse; font-size: 0.875rem; min-width: 100%; }
.table-wrap td, .table-wrap th { border-bottom: 1px solid var(--line); padding: 0.45rem 0.7rem; vertical-align: top; text-align: left; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tr:first-child td { font-weight: 650; background: var(--surface-3); }

.exchange { display: grid; gap: 0.9rem; }
.turn { border-left: 3px solid var(--line-strong); padding-left: 1rem; }
.turn-sian { border-left-color: var(--yellow); border-left-width: 4px; }
.turn p { margin-bottom: 0.5em; }
.turn .speaker { font-weight: 700; font-size: 0.875rem; margin-bottom: 0.15rem; }

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; }
.empty p:last-child { margin: 0; }

.notice { background: var(--yellow-soft); border: 1px solid var(--yellow-line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.75rem; }
.notice p:last-child { margin: 0; }

/* ---------- Pagination ---------- */
.pagination ul { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: center; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 2.75rem; min-height: 2.75rem;
  padding: 0.3rem 0.85rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--ink);
}
.pagination a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pagination a[aria-current="page"] { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow-line); }
.pagination .ellipsis { padding: 0 0.25rem; color: var(--muted); }

/* ---------- Question page ---------- */
.question-page .badges { margin-bottom: 1.25rem; }
.ref-pill { display: inline-block; background: var(--ink); color: var(--yellow); padding: 0.2rem 0.65rem; border-radius: 999px; margin-right: 0.4rem; letter-spacing: 0.04em; }
.page-hero .eyebrow { line-height: 2; }
.question-title { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); line-height: 1.3; font-weight: 550; letter-spacing: -0.01em; margin: 0.25rem 0 0.75rem; text-wrap: pretty; }
.asked-by { font-size: 0.9375rem; color: var(--hero-muted); margin-bottom: 0.9rem; }
.question-page .page-hero .badges { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.75rem; margin: 0 0 2rem; }
.facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }
.facts dt { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.fact-note { display: block; font-weight: 400; font-size: 0.875rem; color: var(--muted); }
.answer-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem 1.25rem; margin-bottom: 2.5rem; }
@media (min-width: 40em) { .answer-section { padding: 1.75rem 2rem; } }
.page-section { margin-bottom: 2.5rem; }
.page-section h2, .all-list h2 { font-size: 1.375rem; }
.link-list { padding-left: 1.25rem; }
.link-list li { margin-bottom: 0.45rem; }
.related-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.related-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.15rem; }
.related-list a { font-weight: 650; }
.related-list .muted { font-size: 0.875rem; }
.prev-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.prev-next a {
  display: flex; flex-direction: column; text-decoration: none; font-weight: 650; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 1.1rem; min-width: 12rem;
}
.prev-next a:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.prev-next .pn-next { text-align: right; margin-left: auto; }
.pn-dir { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.count { font-family: var(--sans); font-weight: 500; font-size: 1rem; color: var(--muted); letter-spacing: 0; }
.all-list section { margin-bottom: 2.5rem; }

/* ---------- About page ---------- */
.prose h2 { margin-top: 2.25rem; }
.prose .lead { margin-bottom: 1.5rem; }
.glossary { margin: 0; }
.glossary dt { font-weight: 700; margin-top: 1.1rem; }
.glossary dd { margin: 0.2rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 5rem; background: var(--footer-bg); color: var(--footer-ink); padding: 3rem 0 3.5rem; font-size: 0.9375rem; }
.site-footer a { color: var(--footer-link); text-decoration-color: currentColor; }
.site-footer :focus-visible { outline-color: var(--yellow); }
.footer-inner { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48em) { .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .footer-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.footer-heading { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.footer-contact address { font-style: normal; margin-bottom: 0.6rem; }
.footer-small { font-size: 0.8125rem; opacity: 0.85; }
.footer-name { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 650; color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .portrait { transform: none; }
}

@media (forced-colors: active) {
  .badge, .button, .chip, .pagination a, .stat, .facts > div { border: 1px solid CanvasText; }
  .bar { forced-color-adjust: none; background: CanvasText; }
  .logo, .banner-dot { forced-color-adjust: none; }
  .pagination a[aria-current="page"] { outline: 2px solid Highlight; }
}

@media print {
  .site-banner, .site-header nav, .sidebar, .search-bar, .downloads, .chips, .pagination, .skip-link, .summary { display: none !important; }
  body, .hero, .page-hero, .site-footer { background: #fff !important; color: #000 !important; }
  .hero::after { display: none; }
  .q-card, .answer-section, .facts > div { box-shadow: none; border-color: #999; }
}
