/* Archives Online Catalogue – Directorate of Archives & Libraries Khyber Pakhtunkhwa
   Colours are taken from the Directorate's emblem: ink blue lettering, gold ribbon, green wreath. */

@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* Downloaded only when a page actually contains Urdu text */
@font-face { font-family: "Noto Nastaliq Urdu"; src: url("../fonts/noto-nastaliq-urdu-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --ink: #1a2c5b;
  --ink-deep: #13214a;
  --btn: #1a2c5b;
  --rule: #1a2c5b;
  --btn-hover: #2e4c9e;
  --link: #2e4c9e;
  --gold: #e3bd1c;
  --leaf: #3d6b2c;
  --warn: #a1341c;
  --paper: #f5f6f3;
  --surface: #ffffff;
  --text: #1d232b;
  --muted: #5b6573;
  --line: #d9dde3;
  --line-strong: #b9c0ca;
  --tint-ink: #eef1f8;
  --tint-leaf: #e6efe1;
  --tint-warn: #f8e6e1;
  --mark: #fbe9a6;
  --chart-a: #2e4c9e;
  --chart-b: #4f8a3b;

  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;

  --s-1: 0.8125rem;   /* 13 */
  --s0: 1rem;         /* 16 */
  --s1: 1.0625rem;    /* 17 body */
  --s2: 1.3125rem;    /* 21 */
  --s3: 1.75rem;      /* 28 */
  --s4: 2.5rem;       /* 40 */
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0f1a38; --ink-deep: #0a1228; --btn: #3b5cc4; --btn-hover: #4f6fd6; --rule: #6680cf; --link: #a9bdf2; --gold: #e3bd1c; --leaf: #8cc47a; --warn: #f2a48c;
    --paper: #11151d; --surface: #181d28; --text: #e6e9ef; --muted: #a2abb9; --line: #2b3343; --line-strong: #3d4659;
    --tint-ink: #1e2740; --tint-leaf: #1d2b1c; --tint-warn: #35201b; --mark: #5c4a0c;
    --chart-a: #7f9be6; --chart-b: #79b866;
  }
}
:root[data-theme="dark"] {
  --ink: #0f1a38; --ink-deep: #0a1228; --btn: #3b5cc4; --btn-hover: #4f6fd6; --rule: #6680cf; --link: #a9bdf2; --gold: #e3bd1c; --leaf: #8cc47a; --warn: #f2a48c;
  --paper: #11151d; --surface: #181d28; --text: #e6e9ef; --muted: #a2abb9; --line: #2b3343; --line-strong: #3d4659;
  --tint-ink: #1e2740; --tint-leaf: #1d2b1c; --tint-warn: #35201b; --mark: #5c4a0c;
  --chart-a: #7f9be6; --chart-b: #79b866;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 var(--s1)/1.55 var(--sans); font-variant-numeric: tabular-nums;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--text); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, var(--s4)); letter-spacing: -0.01em; }
h2 { font-size: var(--s2); }
p { margin: 0 0 1em; }
code { font-size: 0.95em; background: var(--tint-ink); padding: 0.1em 0.35em; border-radius: 3px; }
mark { background: var(--mark); color: inherit; padding: 0 0.08em; border-radius: 2px; }
:lang(ur) { font-family: var(--urdu); line-height: 2.1; }
.muted { color: var(--muted); }
.small { font-size: var(--s-1); }
.nowrap { white-space: nowrap; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }

/* ---------------- Masthead ---------------- */
.masthead { background: var(--ink); color: #fff; border-bottom: 4px solid var(--gold); }
.masthead-in { display: flex; align-items: center; gap: 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; flex-wrap: wrap; }
.brand-logo { flex: none; display: block; background: #fff; border-radius: 50%; padding: 4px; line-height: 0; }
.brand-logo img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.brand-name { color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.45rem); line-height: 1.25; }
.brand-sub { color: #d7def0; text-decoration: none; font-size: var(--s0); margin-top: 0.15rem; }
.brand-name:hover, .brand-sub:hover { text-decoration: underline; }
.masthead-search { display: flex; flex: 0 1 22rem; margin-left: auto; }
.masthead-search input { flex: 1; min-width: 0; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 0.6rem 0.75rem; font: inherit; font-size: var(--s0); }
.masthead-search button { border: 0; background: var(--gold); color: #1d232b; font: 600 var(--s0) var(--sans); padding: 0 1rem; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.mainnav { background: var(--ink-deep); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: thin; }
.mainnav a { display: block; padding: 0.65rem 0.8rem; color: #dfe5f3; text-decoration: none; font-size: var(--s0); font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.mainnav a:hover { color: #fff; border-bottom-color: #ffffff55; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }

/* ---------------- Home ---------------- */
.hero { padding: 1.5rem 0 2rem; max-width: 52rem; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); margin-bottom: 0.35em; }
.lede { font-size: var(--s2); color: var(--muted); max-width: 44rem; line-height: 1.45; }
.hero .lede { font-family: var(--serif); }
.hero-search { display: flex; gap: 0; margin-top: 1.5rem; border: 2px solid var(--btn); border-radius: var(--radius); background: var(--surface); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--s2); padding: 0.85rem 1rem; }
.hero-search select { width: auto; flex: none; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; padding: 0 0.75rem; }
.hero-search button { border: 0; background: var(--btn); color: #fff; font: 600 var(--s1) var(--sans); padding: 0 1.5rem; cursor: pointer; }
.hero-search button:hover { background: var(--btn-hover); }
.hero-tip { margin-top: 0.75rem; font-size: var(--s0); color: var(--muted); }

.block { margin-top: 2.75rem; }
.block > h2 { padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; }
.collections th, .collections td { text-align: left; vertical-align: top; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.collections thead th { font: 600 var(--s-1) var(--sans); color: var(--muted); padding-top: 0; }
.collections tbody th a { font-family: var(--serif); font-size: var(--s2); font-weight: 600; }
.collections tbody th span { display: block; font-weight: 400; color: var(--muted); font-size: var(--s0); margin-top: 0.2rem; max-width: 38rem; }
.collections td { font-size: var(--s0); }
.num { text-align: right !important; white-space: nowrap; }
.collections td.num { font-size: var(--s2); font-family: var(--serif); font-weight: 600; }
.unit { display: block; font: 400 var(--s-1) var(--sans); color: var(--muted); }

.legend { list-style: none; display: flex; gap: 1.25rem; padding: 0; margin: 0 0 0.5rem; font-size: var(--s0); }
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.sw-fr { background: var(--chart-a); } .sw-pub { background: var(--chart-b); }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 400 12px var(--sans); }
.chart .seg-fr { fill: var(--chart-a); }
.chart .seg-pub { fill: var(--chart-b); }
.chart .hit { fill: transparent; }
.chart .bar { cursor: default; outline: none; }
.chart .bar:hover .hit, .chart .bar:focus .hit { fill: var(--tint-ink); }
.chart-tip { min-height: 1.6em; font-size: var(--s0); color: var(--text); margin-top: 0.35rem; }
.chart-table { margin-top: 0.75rem; font-size: var(--s0); }
.chart-table summary { cursor: pointer; color: var(--link); }
table.data { margin-top: 0.75rem; font-size: var(--s0); }
table.data th, table.data td { padding: 0.45rem 0.75rem 0.45rem 0; border-bottom: 1px solid var(--line); text-align: left; }
table.data thead th { color: var(--muted); font-weight: 600; font-size: var(--s-1); }
.updated { margin-top: 2.5rem; font-size: var(--s0); }

/* ---------------- Section header & search form ---------------- */
.sec-head { margin-bottom: 1.25rem; }
.sec-head .lede { font-size: var(--s1); margin-bottom: 0; }
.searchform { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; }
.mainrow { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field.grow { flex: 1 1 18rem; }
.field label, legend { font-size: var(--s-1); font-weight: 600; color: var(--muted); }
input[type="text"], input[type="search"], input[type="number"], input[type="month"], select {
  font: inherit; font-size: var(--s0); color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.55rem 0.65rem; min-height: 2.6rem; width: 100%;
}
select { padding-right: 2rem; }
.mainrow .field:not(.grow) select { min-width: 11rem; }
input:focus, select:focus { border-color: var(--link); }
select:disabled { opacity: 0.6; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem; padding: 0 1.4rem; border: 0; border-radius: var(--radius);
  background: var(--btn); color: #fff; font: 600 var(--s0) var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--btn-hover); color: #fff; }
.btn-quiet { display: inline-flex; align-items: center; min-height: 2.3rem; padding: 0 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--link); font: 500 var(--s0) var(--sans); cursor: pointer; text-decoration: none; }
.btn-quiet:hover { border-color: var(--link); }

.adv { margin-top: 0.9rem; }
.adv summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: var(--s0); display: inline-block; }
.adv-body { padding-top: 0.75rem; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0.5rem 0 0; padding: 0.75rem 0 0.25rem; }
legend { padding: 0 0.5rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.8rem 1rem; }
.field.check { flex-direction: row; align-items: center; gap: 0.5rem; padding-top: 1.4rem; }
.field.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.field.check label { font-size: var(--s0); font-weight: 400; color: var(--text); }
.adv-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.4rem 0.25rem 0.75rem; border-radius: 999px; background: var(--tint-ink);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: var(--s0); }
.chip .x { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; color: var(--muted); font-size: 1.05rem; line-height: 1; }
.chip:hover .x { background: var(--btn); color: #fff; }
.chip-clear { font-size: var(--s0); margin-left: 0.25rem; }

/* ---------------- Results layout ---------------- */
.layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 2rem; margin-top: 1.5rem; align-items: start; }
.facet-wrap > summary { display: none; }
.facet { margin-bottom: 1.5rem; }
.facet h2 { font: 600 var(--s0) var(--sans); color: var(--text); margin: 0 0 0.4rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--rule); }
.facet ul { list-style: none; margin: 0; padding: 0; }
.facet ul.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.75rem; }
.facet li a { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; text-decoration: none; color: var(--text); font-size: var(--s0); line-height: 1.35; border-bottom: 1px solid var(--line); }
.facet li a:hover .fl { color: var(--link); text-decoration: underline; }
.facet .fn { color: var(--muted); font-size: var(--s-1); padding-top: 0.1rem; }
.facet .more { font-size: var(--s-1); margin-top: 0.4rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; justify-content: space-between; padding-bottom: 0.75rem; border-bottom: 2px solid var(--rule); }
.count { margin: 0; font-size: var(--s0); }
.viewopts { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: var(--s0); }
.viewopts label { color: var(--muted); font-size: var(--s-1); font-weight: 600; }
.viewopts select { width: auto; min-height: 2.3rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.tools { display: flex; gap: 0.5rem; }

.reclist { list-style: none; margin: 0; padding: 0; }
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.rec-title { font-family: var(--serif); font-size: 1.125rem; line-height: 1.45; color: var(--text); text-decoration: none; display: block; max-width: 48rem; }
.rec-title:hover { color: var(--link); text-decoration: underline; }
.rec-title:lang(ur) { font-size: 1.15rem; line-height: 2.2; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; margin: 0.35rem 0 0; font-size: var(--s0); color: var(--muted); }
.rec-meta > .path { color: var(--text); }
.rec-meta .sep { color: var(--line-strong); padding: 0 0.15rem; }
.compact .rec { padding: 0.75rem 0; }
.compact .rec-title { font-size: var(--s1); }

/* The box label: the signature element. Where the record sits, set like the label on an archive box. */
.boxlabel { display: flex; margin: 0; border: 1.5px solid var(--rule); border-top-width: 4px; border-top-color: var(--gold); border-radius: 3px; background: var(--surface); align-self: start; }
.boxlabel > div { padding: 0.3rem 0.7rem 0.35rem; min-width: 4.25rem; }
.boxlabel > div + div { border-left: 1px solid var(--line-strong); }
.boxlabel dt { font-size: 0.6875rem; color: var(--muted); font-weight: 600; line-height: 1.2; }
.boxlabel dd { margin: 0; font-weight: 600; font-size: var(--s0); color: var(--text); white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.boxlabel dd:lang(ur) { line-height: 1.6; }

.status { font-weight: 600; }
.status.on { color: var(--leaf); }
.status.off { color: var(--warn); }

.pager { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; margin-top: 1.75rem; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; padding: 0; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; padding: 0 0.7rem; border-radius: var(--radius); font-size: var(--s0); text-decoration: none; }
.pager a { border: 1px solid var(--line-strong); background: var(--surface); }
.pager a:hover { border-color: var(--link); }
.pager [aria-current="page"] { background: var(--btn); color: #fff; font-weight: 600; }
.pager .off { color: var(--muted); opacity: 0.6; }
.pager .gap { min-width: 1.25rem; padding: 0; color: var(--muted); }
.jump { display: flex; align-items: center; gap: 0.5rem; font-size: var(--s0); }
.jump label { color: var(--muted); font-size: var(--s-1); font-weight: 600; }
.jump input { width: 5.5rem; }
.jump button { min-height: 2.6rem; padding: 0 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--link); font: 500 var(--s0) var(--sans); cursor: pointer; }

.empty { padding: 1.5rem 0; max-width: 40rem; }
.empty p { font-family: var(--serif); font-size: var(--s2); }
.empty li { margin-bottom: 0.4rem; }

/* ---------------- Record page ---------------- */
.recnav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: var(--s0); margin-bottom: 1.25rem; }
.recnav .step { display: flex; gap: 1.25rem; }
.record { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 2rem); }
.crumbs { font-size: var(--s0); color: var(--muted); margin-bottom: 1rem; }
.crumbs .sep { padding: 0 0.3rem; color: var(--line-strong); }
.record-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.record-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 400; line-height: 1.35; margin: 0; max-width: 46rem; }
.record-head h1:lang(ur) { line-height: 2.2; }
.record-head .boxlabel > div { padding: 0.45rem 0.9rem; }
.record-head .boxlabel dd { font-size: var(--s2); font-family: var(--serif); }
.fields { margin: 1.25rem 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 2rem; }
.fields > div { display: contents; }
.fields dt, .fields dd { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.fields dt { color: var(--muted); font-size: var(--s0); font-weight: 600; }
.fields dd { margin: 0; }
.cite { margin-top: 1.75rem; padding: 1rem 1.1rem; background: var(--tint-ink); border-radius: var(--radius); }
.cite h2 { font: 600 var(--s0) var(--sans); margin-bottom: 0.4rem; }
.cite-text { font-family: var(--serif); margin-bottom: 0.75rem; }

.cal-wrap { margin-top: 1.75rem; }
.cal-wrap h2 { font-size: var(--s1); }
.sw-on { background: var(--tint-leaf); border: 2px solid var(--leaf); }
.sw-off { background: repeating-linear-gradient(135deg, var(--tint-warn) 0 3px, var(--warn) 3px 4px); border: 2px solid var(--warn); }
.sw-none { border: 2px dashed var(--line-strong); }
.cal { max-width: 40rem; }
.cal-headrow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-headrow span { font-size: var(--s-1); color: var(--muted); font-weight: 600; text-align: center; padding-bottom: 0.25rem; }
.day { min-height: 3.6rem; border-radius: 3px; padding: 0.3rem 0.35rem; display: flex; flex-direction: column; gap: 0.1rem; overflow: hidden; }
.day b { font-size: var(--s0); }
.day small { font-size: 0.6875rem; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.day.on { background: var(--tint-leaf); border: 1px solid var(--leaf); }
.day.off { background: repeating-linear-gradient(135deg, var(--tint-warn) 0 6px, transparent 6px 9px); border: 2px solid var(--warn); }
.day.off b { color: var(--warn); }
.day.none { border: 1px dashed var(--line-strong); color: var(--muted); }
.day.blank { min-height: 0; }

.months { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.4rem; }
.months a, .months .off { display: flex; flex-direction: column; padding: 0.5rem 0.6rem; border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none; font-weight: 600; background: var(--surface); }
.months small { font-weight: 400; font-size: var(--s-1); color: var(--muted); }
.months a[aria-current="page"] { background: var(--btn); color: #fff; border-color: var(--btn); }
.months a[aria-current="page"] small { color: #d7def0; }
.months .off { color: var(--muted); border-style: dashed; background: transparent; }
.years { margin-top: 1rem; font-size: var(--s0); }
.years a { margin-right: 0.6rem; }
.issues { columns: 16rem; column-gap: 2rem; padding-left: 1.2rem; }
.issues li { margin-bottom: 0.35rem; break-inside: avoid; }

/* ---------------- Lists page ---------------- */
.jumpnav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: var(--s0); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree li { border-bottom: 1px solid var(--line); }
.tree summary, .tree .leaf, .tree ul li { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 6.5rem; gap: 1rem; padding: 0.55rem 0; align-items: baseline; }
.tree summary { cursor: pointer; list-style: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary .tl::before { content: "+"; display: inline-block; width: 1.2rem; color: var(--muted); font-weight: 600; }
.tree details[open] summary .tl::before { content: "−"; }
.tree .leaf .tl { padding-left: 1.2rem; }
.tree ul { list-style: none; margin: 0 0 0.5rem; padding: 0 0 0 2.4rem; }
.tree ul li { border-bottom: 1px dashed var(--line); }
.tree ul li:last-child { border-bottom: 0; }
.tm { color: var(--muted); font-size: var(--s0); }
.tn { text-align: right; font-size: var(--s0); color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.two .tree summary, .two .tree .leaf { grid-template-columns: minmax(0, 1fr) 7rem 6.5rem; }

/* ---------------- Global search ---------------- */
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--rule); padding-bottom: 0.4rem; }
.group-head h2 { margin: 0; }
.group-head p { margin: 0; color: var(--muted); font-size: var(--s0); }
.group .reclist { margin-bottom: 1rem; }

/* ---------------- Help / notices ---------------- */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.75rem; }
.prose p, .prose li { line-height: 1.65; }
.tips td:first-child { white-space: nowrap; }
.notice { max-width: 38rem; padding: 2rem 0; }

/* ---------------- Footer ---------------- */
.foot { background: var(--surface); border-top: 1px solid var(--line); font-size: var(--s0); color: var(--muted); }
.foot-in { padding-top: 1.5rem; padding-bottom: 2rem; max-width: 76rem; }
.foot p { max-width: 52rem; }
.foot p:first-child a { font-family: var(--serif); font-weight: 600; font-size: var(--s1); }

/* ---------------- Small screens ---------------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .facet-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 1rem; }
  .facet-wrap > summary { display: block; cursor: pointer; padding: 0.75rem 0; font-weight: 600; color: var(--link); }
  .facet-wrap[open] { padding-bottom: 0.5rem; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .masthead-in { gap: 0.6rem 0.75rem; flex-wrap: wrap; }
  .brand-text { flex: 1 1 0; }
  .masthead-search { flex: 1 1 100%; }
  .brand-logo img { width: 48px; height: 48px; }
  .masthead-search { max-width: none; }
  .hero-search { flex-wrap: wrap; }
  .hero-search input { flex-basis: 100%; font-size: var(--s1); }
  .hero-search select { border-left: 0; border-top: 1px solid var(--line); flex: 1; min-height: 2.8rem; }
  .hero-search button { min-height: 2.8rem; }
  .collections thead { display: none; }
  .collections tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); padding: 0.75rem 0; }
  .collections th, .collections td { border: 0; padding: 0.15rem 0; }
  .collections tbody th { grid-column: 1 / -1; }
  .collections td.num { text-align: left !important; grid-column: 1; }
  .collections td:nth-child(3) { grid-column: 1; }
  .collections td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  .rec { grid-template-columns: minmax(0, 1fr); }
  .boxlabel { justify-self: start; }
  .record-head { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .fields dt { border-bottom: 0; padding-bottom: 0; font-size: var(--s-1); }
  .fields dd { padding-top: 0.1rem; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .tree summary, .tree .leaf, .tree ul li, .two .tree summary, .two .tree .leaf { grid-template-columns: minmax(0, 1fr) auto; }
  .tree .tm { display: none; }
  .day { min-height: 2.6rem; }
  .day small { display: none; }
  .pager { flex-direction: column; align-items: flex-start; }
}

/* ---------------- Print ---------------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead { background: none; color: #000; border-bottom: 2px solid #000; }
  .brand-name, .brand-sub { color: #000; }
  .mainnav, .masthead-search, .searchform, .facets, .viewopts, .tools, .pager, .chips, .recnav, .foot, .skip, .cite button, .chart-table, .hero-search, .hero-tip { display: none !important; }
  .layout { display: block; }
  .rec { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .record { border: 0; padding: 0; }
  mark { background: none; font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .boxlabel, .day { border: 1px solid CanvasText; }
  .chart .seg-fr, .chart .seg-pub { fill: CanvasText; }
}
