/* =========================================================
   ACIS Digital Archive — core stylesheet
   Stanford identity (identity.stanford.edu):
   Cardinal Red #8C1515, Black #2E2D29, Cool Grey #53565A,
   Sandstone #D2C295, Fog #F4F4F4 · Source Serif 4 + Source Sans 3.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
  --cardinal: #8c1515;
  --cardinal-dark: #6f1111;
  --cardinal-darker: #4d0b0b;
  --ink: #2e2d29;
  --ink-soft: #3f3c30;
  --grey: #53565a;
  --muted: #6b6e72;
  --paper: #ffffff;
  --fog: #f4f4f4;
  --fog-warm: #f6f4ef;
  --sandstone: #d2c295;
  --line: #dddcd8;
  --line-strong: #b6b1a9;
  --focus: #006cb8;
  --scan: #f7f3e8;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1240px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 2px;

  /* Type scale: every font-size in the site uses one of these steps. */
  --fs-xs: 0.8rem;   /* labels, eyebrows, captions */
  --fs-sm: 0.9rem;   /* metadata, secondary text, small controls */
  --fs-base: 1rem;   /* body text */
  --fs-md: 1.2rem;   /* small headings, card titles */
  --fs-lg: 1.4rem;   /* medium headings */
  --fs-xl: 1.6rem;   /* large headings, figures */
}

/* -------------------- Base -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 106.25%; } /* 17px */

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--cardinal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cardinal-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.75em 1.25em;
}
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

/* -------------------- Masthead -------------------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.15rem;
}
.masthead__brand { display: flex; align-items: center; gap: 1.4rem; text-decoration: none; color: inherit; min-width: 0; }
.masthead__logo { height: 44px; width: auto; flex: none; }
.masthead__title {
  border-left: 1px solid var(--line-strong);
  padding-left: 1.4rem;
  min-width: 0;
}
.masthead__name {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.masthead__sub { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 0.2rem; }

.header-search { display: flex; flex: 0 1 340px; }
.header-search input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line-strong); border-right: 0;
  padding: 0.55rem 0.8rem; font-size: var(--fs-base); background: #fff;
  border-radius: var(--radius) 0 0 var(--radius);
}
.header-search button {
  border: 1px solid var(--cardinal); background: var(--cardinal); color: #fff;
  padding: 0 0.85rem; cursor: pointer; display: grid; place-items: center;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.header-search button:hover { background: var(--cardinal-dark); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------- Primary nav -------------------- */
.primary-nav { background: var(--paper); border-bottom: 1px solid var(--line); }
.primary-nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.primary-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.2rem; }
.primary-nav__list a {
  display: block;
  padding: 0.85rem 0.95rem 0.75rem;
  font-weight: 600; font-size: var(--fs-base);
  color: var(--ink); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.primary-nav__list li:first-child a { padding-left: 0; }
.primary-nav__list a:hover { color: var(--cardinal); }
.primary-nav__list a[aria-current="page"] { color: var(--cardinal); border-bottom-color: var(--cardinal); }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--line-strong);
  padding: 0.45rem 0.75rem; margin: 0.5rem 0; cursor: pointer; font-size: var(--fs-sm); font-weight: 600;
}
.nav-toggle__bars { position: relative; width: 18px; height: 12px; display: inline-block; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5px; }
.nav-toggle__bars::after { top: 10px; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--sans); font-size: var(--fs-base); font-weight: 600;
  padding: 0.7em 1.35em;
  border: 1px solid var(--cardinal); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--cardinal); color: #fff; }
.btn-primary:hover { background: var(--cardinal-dark); border-color: var(--cardinal-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--cardinal); }
.btn-secondary:hover { background: var(--fog); color: var(--cardinal-dark); }
.btn-quiet { background: none; border-color: var(--line-strong); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--cardinal); font-weight: 600; font-size: var(--fs-sm);
  text-decoration: underline; text-underline-offset: 3px;
}

/* -------------------- Page header / breadcrumbs -------------------- */
.page-head { background: var(--fog-warm); border-bottom: 1px solid var(--line); padding: 1.6rem 0 2rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 0.35rem; }
.page-head__desc { color: var(--grey); max-width: 125ch; text-wrap: pretty; font-size: var(--fs-base); margin: 0; }

.breadcrumb { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 0.9rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--cardinal); }

.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--fog { background: var(--fog-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section__head h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 0; }
.section__head p { color: var(--grey); margin: 0.35rem 0 0; max-width: 62ch; }

.notice {
  display: flex; gap: 0.75rem; align-items: flex-start;
  border: 1px solid var(--line); border-left: 3px solid var(--sandstone);
  background: #fff; padding: 0.85rem 1rem; font-size: var(--fs-sm); color: var(--grey);
  margin: 0 0 1.5rem;
}
.notice strong { color: var(--ink); }

/* -------------------- Hero -------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 85% 40%, rgba(140, 21, 21, 0.55), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem; align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero__kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sandstone); margin-bottom: 1rem; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; margin-bottom: 0.3em; }
.hero__dates { display: block; font-weight: 400; font-style: italic; color: rgba(255, 255, 255, 0.72); font-size: 0.62em; margin-top: 0.3em; }
.hero__desc { color: rgba(255, 255, 255, 0.84); font-size: var(--fs-md); max-width: 56ch; margin-bottom: 1.8rem; }

.hero-search { display: flex; background: #fff; border-radius: var(--radius); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6); max-width: 640px; }
.hero-search select {
  border: 0; border-right: 1px solid var(--line); background: var(--fog);
  padding: 0 0.9rem; font-size: var(--fs-sm); color: var(--ink); max-width: 38%;
  border-radius: var(--radius) 0 0 var(--radius);
}
.hero-search input { flex: 1; min-width: 0; border: 0; padding: 1rem 1rem; font-size: var(--fs-base); color: var(--ink); background: transparent; }
.hero-search input:focus-visible, .hero-search select:focus-visible { outline-offset: -3px; }
.hero-search button {
  border: 0; background: var(--cardinal); color: #fff; font-weight: 600;
  padding: 0 1.4rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hero-search button:hover { background: var(--cardinal-dark); }

.hero__try { margin: 1rem 0 0; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.7); }
.hero__try a { color: #fff; margin-left: 0.35rem; }
.hero__try a:hover { color: var(--sandstone); }

.hero__collage { position: relative; height: 380px; }
.hero__collage .thumb { position: absolute; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.7); }
.hero__collage .thumb:nth-child(1) { width: 230px; left: 4%; top: 30px; transform: rotate(-6deg); }
.hero__collage .thumb:nth-child(2) { width: 240px; left: 30%; top: 0; transform: rotate(2deg); z-index: 1; }
.hero__collage .thumb:nth-child(3) { width: 230px; left: 55%; top: 50px; transform: rotate(7deg); }

.stats { background: var(--cardinal-darker); color: #fff; position: relative; }
.stats__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__list li { padding: 1.1rem 1.4rem; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stats__list li:first-child { border-left: 0; padding-left: 0; }
.stats__num { display: block; font-family: var(--serif); font-size: var(--fs-xl); font-weight: 600; line-height: 1.1; }
.stats__label { display: block; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.72); }

/* -------------------- Document facsimile thumbnails -------------------- */
.thumb {
  display: block;
  aspect-ratio: 8.5 / 11;
  background: var(--scan);
  border: 1px solid #e3dccb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 18px -12px rgba(46, 45, 41, 0.4);
  overflow: hidden;
  container-type: inline-size;
  position: relative;
}
.thumb::after { /* subtle paper tone / scan vignette */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(120, 100, 60, 0.08) 100%);
  pointer-events: none;
}
.fx {
  display: flex; flex-direction: column; align-items: center;
  height: 100%;
  padding: 11cqw 12cqw;
  gap: 2.6cqw;
  font-family: "Times New Roman", Times, serif;
  color: #3b3831;
  text-align: center;
}
.fx > * { display: block; }
.fx-docket { align-self: flex-end; font-size: 4.2cqw; }
.fx-court { font-size: 5cqw; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; margin-top: 2cqw; }
.fx-caps { font-size: 5.4cqw; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3; }
.fx-caps--left { align-self: flex-start; text-align: left; }
.fx-small { font-size: 4.2cqw; font-style: italic; line-height: 1.3; }
.fx-small--left { align-self: flex-start; }
.fx-rule { width: 40%; height: 1px; background: #6d6758; margin: 1.5cqw 0; }
.fx-rule--full { width: 100%; }
.fx-line { width: 100%; height: 1.4cqw; min-height: 1px; background: #cfc6b2; border-radius: 1px; flex: none; }
.fx-line:nth-child(3n) { width: 88%; }
.fx-line--center { align-self: center; width: 70%; }
.fx-line--short { align-self: flex-start; width: 42%; }
.fx-gap { height: 3cqw; }
.fx-letterhead {
  align-self: stretch; text-align: center; font-size: 3.6cqw; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid #8c1515; padding-bottom: 2.5cqw; margin-bottom: 2cqw; color: #5d574b;
}
.fx-letterhead b { display: block; font-size: 9cqw; letter-spacing: 0.2em; color: #8c1515; }
.fx-date { align-self: flex-end; font-size: 4cqw; }
.fx-sig { align-self: flex-start; width: 34%; height: 5cqw; margin-top: 3cqw; border-bottom: 1.5px solid #3b3831; border-radius: 0 0 40% 10%; transform: skewX(-18deg); }
.fx-bullets { align-self: stretch; display: flex; flex-direction: column; gap: 3.2cqw; padding-left: 5cqw; }
.fx-bullets .fx-line { position: relative; }
.fx-bullets .fx-line::before { content: ""; position: absolute; left: -5cqw; top: -0.2cqw; width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #9c937d; }
.fx-caption { align-self: stretch; display: grid; grid-template-columns: 1fr 4cqw 1fr; gap: 2cqw; margin: 2cqw 0; }
.fx-caption > span:not(.fx-caption__brace) { display: flex; flex-direction: column; gap: 2cqw; justify-content: center; }
.fx-caption__brace { border-left: 1px solid #6d6758; }
.fx-cover {
  width: 34cqw; height: 34cqw; border: 1px solid #8c1515; border-radius: 50%;
  display: grid !important; place-items: center; margin: 8cqw 0 5cqw;
}
.fx-cover b { font-size: 8cqw; letter-spacing: 0.14em; color: #8c1515; padding-left: 0.14em; }
.fx--other .fx-caps { margin-bottom: 1cqw; }

/* -------------------- Series grid (home) -------------------- */
.series-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.series-card {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line); background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.series-card:hover { border-color: var(--line-strong); box-shadow: 0 14px 30px -20px rgba(46, 45, 41, 0.5); color: inherit; }
.series-card__media {
  background: #e9e6df; padding: 1.4rem 1.6rem 0; height: 190px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.series-card__media .thumb { width: 100%; transition: transform 200ms ease; }
.series-card:hover .series-card__media .thumb { transform: translateY(-4px); }
.series-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.series-card__series { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.series-card__name { font-family: var(--serif); font-size: var(--fs-md); font-weight: 600; margin: 0.2rem 0 0.3rem; line-height: 1.2; }
.series-card:hover .series-card__name { color: var(--cardinal); }
.series-card__meta { font-size: var(--fs-sm); color: var(--grey); margin-top: auto; }

/* -------------------- Item cards (featured / related / grid view) -------------------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem 1.5rem; }
.card__link { display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; }
.card__link:hover { color: inherit; }
.card__media { display: block; background: #ebe8e1; padding: 1.4rem 2.2rem; margin-bottom: 0.9rem; border: 1px solid var(--line); }
.card__media .thumb { width: 100%; }
.card__type { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card__title { font-family: var(--serif); font-size: var(--fs-base); font-weight: 600; line-height: 1.3; margin: 0.2rem 0; }
.card__link:hover .card__title { color: var(--cardinal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.card__date { font-size: var(--fs-sm); color: var(--grey); }

/* -------------------- Timeline histogram (home) -------------------- */
.timeline { border: 1px solid var(--line); background: #fff; padding: 1.5rem 1.5rem 1rem; }
.timeline__bars {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  height: 150px; align-items: end;
  border-bottom: 1px solid var(--line-strong);
}
.timeline__bar {
  position: relative; display: block; height: 100%;
  text-decoration: none;
}
.timeline__fill {
  position: absolute; left: 50%; bottom: 0; width: min(64%, 36px); transform: translateX(-50%);
  background: var(--cardinal); border-radius: 4px 4px 0 0;
  transition: background-color 120ms ease;
}
.timeline__bar:hover .timeline__fill, .timeline__bar:focus-visible .timeline__fill { background: var(--cardinal-dark); }
.timeline__bar:hover { background: var(--fog); }
.timeline__count {
  position: absolute; left: 50%; transform: translate(-50%, -1.5em);
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink); opacity: 0; transition: opacity 120ms ease;
  white-space: nowrap;
}
.timeline__bar:hover .timeline__count, .timeline__bar:focus-visible .timeline__count { opacity: 1; }
.timeline__years { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin-top: 0.4rem; }
.timeline__years span { text-align: center; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline__note { font-size: var(--fs-sm); color: var(--muted); margin: 0.8rem 0 0; }

/* -------------------- About teaser -------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.prose { max-width: 68ch; }
.prose p { color: var(--ink-soft); }
.prose h2 { font-size: var(--fs-xl); margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }

.facts { border-top: 3px solid var(--cardinal); background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.4rem 1.5rem 0.6rem; }
.facts h2, .facts h3 { font-size: var(--fs-md); margin-bottom: 0.9rem; }
.facts dl { margin: 0; }
.facts dl > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); font-size: var(--fs-base); }
.facts dt { font-weight: 700; color: var(--grey); }
.facts dd { margin: 0; }

/* -------------------- Ask band -------------------- */
.ask-band { background: var(--ink); color: #fff; }
.ask-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.ask-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.ask-band p { color: rgba(255, 255, 255, 0.8); }
.ask-band .label { color: var(--sandstone); }
.ask-band__examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.ask-band__examples a {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.1rem; border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; text-decoration: none; font-family: var(--serif); font-style: italic; font-size: var(--fs-base);
}
.ask-band__examples a:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.ask-band__examples a span { font-style: normal; color: var(--sandstone); }

/* -------------------- Browse: search + facets + results -------------------- */
.browse-search { display: flex; max-width: 760px; margin-top: 1.3rem; }
.browse-search input {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-right: 0;
  padding: 0.8rem 1rem; font-size: var(--fs-base); background: #fff; border-radius: var(--radius) 0 0 var(--radius);
}
.browse-search .btn { border-radius: 0 var(--radius) var(--radius) 0; }

.browse-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2.5rem; padding-top: 2rem; padding-bottom: 3rem; align-items: start; }

.facets { font-size: var(--fs-base); }
.facets__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.facets__head h2 { font-family: var(--sans); font-size: var(--fs-base); font-weight: 700; margin: 0; }
.facet { border-top: 1px solid var(--line); padding: 0.9rem 0 1rem; }
.facet:last-child { border-bottom: 1px solid var(--line); }
.facet legend, .facet__title {
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--grey); padding: 0; margin-bottom: 0.6rem;
}
fieldset.facet { border: 0; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
fieldset.facet legend { float: left; width: 100%; }
fieldset.facet legend + * { clear: both; }
fieldset.facet:last-child { border-bottom: 1px solid var(--line); }
.facet__opt { display: flex; align-items: center; gap: 0.55rem; padding: 0.22rem 0; cursor: pointer; }
.facet__opt input { accent-color: var(--cardinal); width: 16px; height: 16px; margin: 0; flex: none; }
.facet__opt span:first-of-type { flex: 1; }
.facet__count { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; background: var(--fog); padding: 0 0.45rem; border-radius: 9px; }
.facet__range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.facet__range select, .toolbar select {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; padding: 0.4rem 0.5rem; border-radius: var(--radius); font-size: var(--fs-sm);
}
.facet__range span { color: var(--muted); font-size: var(--fs-sm); }

.toolbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem 1.5rem;
  padding-bottom: 0.9rem; border-bottom: 2px solid var(--ink);
}
.toolbar__count { font-size: var(--fs-base); margin: 0; }
.toolbar__count strong { font-weight: 700; }
.toolbar__controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.toolbar__controls label { font-size: var(--fs-sm); color: var(--grey); display: flex; align-items: center; gap: 0.45rem; }
.toolbar select { width: auto; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.view-toggle button { background: #fff; border: 0; padding: 0.35rem 0.55rem; cursor: pointer; color: var(--grey); display: grid; place-items: center; }
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line-strong); background: var(--fog); border-radius: 999px;
  padding: 0.2rem 0.4rem 0.2rem 0.8rem; font-size: var(--fs-sm); cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip b { font-weight: 600; color: var(--grey); }
.chip__x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; font-size: var(--fs-xs); line-height: 1; }

.results { list-style: none; margin: 0; padding: 0; }
.result {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.4rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.result__thumb { display: block; text-decoration: none; }
.result__thumb .thumb { width: 96px; transition: box-shadow 140ms ease; }
.result__thumb:hover .thumb { box-shadow: 0 0 0 2px var(--cardinal); }
.result__title { font-size: var(--fs-md); margin: 0 0 0.35rem; }
.result__title a { color: var(--ink); text-decoration: none; }
.result__title a:hover { color: var(--cardinal); text-decoration: underline; }
.result__meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; margin: 0 0 0.5rem; font-size: var(--fs-sm); }
.result__meta div { display: flex; gap: 0.35rem; }
.result__meta dt { color: var(--muted); }
.result__meta dt::after { content: ":"; }
.result__meta dd { margin: 0; color: var(--ink-soft); }
.result__desc { color: var(--grey); font-size: var(--fs-base); margin: 0 0 0.35rem; max-width: 80ch; }
.result__subjects { font-size: var(--fs-sm); color: var(--muted); margin: 0; font-style: italic; }

.results--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.75rem 1.4rem; padding-top: 1.5rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 0.3rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination button {
  min-width: 2.3rem; height: 2.3rem; padding: 0 0.7rem;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-size: var(--fs-sm);
}
.pagination button:hover:not([disabled]) { border-color: var(--ink); }
.pagination button[aria-current="page"] { background: var(--cardinal); border-color: var(--cardinal); color: #fff; font-weight: 700; }
.pagination button[disabled] { opacity: 0.4; cursor: default; }
.pagination:empty { display: none; }

.empty-state { text-align: center; padding: 3.5rem 1rem; border: 1px dashed var(--line-strong); margin-top: 1.5rem; }
.empty-state h2, .empty-state h3 { font-size: var(--fs-lg); }
.empty-state p { color: var(--grey); }

.series-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.series-intro__facts { display: flex; gap: 2rem; margin: 1.1rem 0 0; }
.series-intro__facts div { border-left: 2px solid var(--sandstone); padding-left: 0.8rem; }
.series-intro__facts dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.series-intro__facts dd { margin: 0; font-family: var(--serif); font-size: var(--fs-md); font-weight: 600; }

/* -------------------- Item page -------------------- */
.item-head { padding: 1.6rem 0 0; }
.item-head__series { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.item-head__series a { text-decoration: none; }
.item-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 30ch; margin: 0.35rem 0 0.4rem; }
.item-head__sub { color: var(--grey); font-size: var(--fs-base); margin: 0; }

.item-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); padding: 1.6rem 0 3rem; align-items: start; }

.viewer { background: #3a3935; border-radius: var(--radius); overflow: hidden; }
.viewer__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.55rem 0.8rem; background: #2a2926; color: rgba(255, 255, 255, 0.85); font-size: var(--fs-sm);
}
.viewer__tools { display: flex; gap: 0.2rem; }
.viewer__tools button {
  background: none; border: 1px solid transparent; color: rgba(255, 255, 255, 0.85);
  padding: 0.3rem; border-radius: var(--radius); cursor: pointer; display: grid; place-items: center;
}
.viewer__tools button:hover { border-color: rgba(255, 255, 255, 0.3); }
.viewer__stage { padding: 2.2rem clamp(1.5rem, 8%, 4.5rem); display: grid; place-items: center; min-height: 420px; }
.viewer__stage .thumb { width: min(100%, 420px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.7); }
.viewer__strip { display: flex; gap: 0.6rem; padding: 0.8rem; background: #2a2926; overflow-x: auto; }
.viewer__strip .thumb { width: 44px; flex: none; opacity: 0.55; box-shadow: none; }
.viewer__strip .thumb:first-child { opacity: 1; outline: 2px solid var(--sandstone); outline-offset: 2px; }
.viewer__more { color: rgba(255, 255, 255, 0.6); font-size: var(--fs-xs); align-self: center; white-space: nowrap; padding-left: 0.3rem; }
.viewer__caption { font-size: var(--fs-sm); color: var(--muted); margin: 0.6rem 0 0; }

.item-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.5rem; }
.item-abstract { color: var(--ink-soft); margin-bottom: 1.6rem; }

.meta-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); margin-bottom: 1.8rem; }
.meta-table caption { text-align: left; font-family: var(--serif); font-size: var(--fs-md); font-weight: 600; padding-bottom: 0.6rem; }
.meta-table th, .meta-table td { text-align: left; vertical-align: top; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.meta-table th { width: 32%; padding-right: 1rem; font-weight: 700; color: var(--grey); }
.meta-table tr:last-child th, .meta-table tr:last-child td { border-bottom: 1px solid var(--line); }
.meta-table code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; word-break: break-all; }
.subject-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin: 0; padding: 0; list-style: none; }

.cite { border: 1px solid var(--line); background: var(--fog-warm); padding: 1.2rem 1.3rem; margin-bottom: 1.6rem; }
.cite h2 { font-size: var(--fs-md); margin-bottom: 0.7rem; }
.cite__tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-strong); margin-bottom: 0.9rem; }
.cite__tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 0.35rem 0.9rem 0.45rem; cursor: pointer; font-weight: 600; color: var(--grey); font-size: var(--fs-sm);
}
.cite__tabs button:first-child { padding-left: 0; }
.cite__tabs button[aria-selected="true"] { color: var(--cardinal); border-bottom-color: var(--cardinal); }
.cite__text { font-family: var(--serif); font-size: var(--fs-base); line-height: 1.55; margin: 0 0 0.9rem; word-break: break-word; }
.cite__copy { font-size: var(--fs-sm); padding: 0.45em 1em; }

.rights { font-size: var(--fs-sm); color: var(--grey); border-left: 3px solid var(--line-strong); padding: 0.1rem 0 0.1rem 1rem; }
.rights strong { color: var(--ink); }

.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: 1.2rem 0; font-size: var(--fs-base); }
.pager a { text-decoration: none; max-width: 45%; }
.pager a:hover { text-decoration: underline; }
.pager small { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pager a:last-child { text-align: right; margin-left: auto; }

/* -------------------- About page -------------------- */
.doc-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 290px; gap: 3rem; padding-top: 2.5rem; padding-bottom: 3.5rem; align-items: start; }
.toc { position: sticky; top: 1.5rem; font-size: var(--fs-sm); }

/* Pinned beside the text for the full length of the page; compact so it fits a laptop screen. */
.doc-rail { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
.doc-rail .facts { margin-bottom: 1rem; padding: 1.1rem 1.2rem 0.4rem; }
.doc-rail .facts h2 { font-size: var(--fs-md); margin-bottom: 0.6rem; }
.doc-rail .facts dl > div { grid-template-columns: 5.6rem 1fr; gap: 0.6rem; padding: 0.45rem 0; font-size: var(--fs-sm); line-height: 1.45; }
.doc-rail .facts dt { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.15rem; }
.doc-rail .aside-box { padding: 1rem 1.2rem; }
.doc-rail .aside-box h2 { font-size: var(--fs-base); margin-bottom: 0.3rem; }
.doc-rail .rail-links a { padding: 0.3rem 0; font-size: var(--fs-sm); }
.aside-box .rail-links { list-style: none; padding: 0; margin: 0; }
.rail-links li + li { border-top: 1px solid var(--line); }
.rail-links a { display: block; padding: 0.45rem 0; text-decoration: none; font-weight: 600; }
.rail-links a:hover { text-decoration: underline; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.35rem 0 0.35rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--grey); text-decoration: none; }
.toc a:hover { color: var(--cardinal); border-left-color: var(--cardinal); }
.prose section { scroll-margin-top: 1.5rem; padding-bottom: 1.2rem; }
.prose section + section { border-top: 1px solid var(--line); padding-top: 1.8rem; }
.series-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); margin: 0.5rem 0 1.5rem; }
.series-table th, .series-table td { text-align: left; padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.series-table td:first-child { white-space: nowrap; }
.series-table thead th { font-size: var(--fs-xs); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
.series-table td.num { font-variant-numeric: tabular-nums; }

/* -------------------- Ask page -------------------- */
.ask-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; padding-top: 2rem; padding-bottom: 3.5rem; align-items: start; }
.ask-form { border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius); }
.ask-form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 108, 184, 0.18); }
.ask-form textarea { display: block; width: 100%; border: 0; padding: 1rem 1.1rem; font-size: var(--fs-base); resize: none; overflow: hidden; background: transparent; }
.ask-form textarea:focus-visible { outline: none; }
.ask-form__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0.7rem 0.6rem 1.1rem; border-top: 1px solid var(--line); background: var(--fog); font-size: var(--fs-sm); color: var(--muted); }
.example-questions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.example-questions button {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.4rem 0.95rem; cursor: pointer; font-size: var(--fs-sm); text-align: left;
}
.example-questions button:hover { border-color: var(--cardinal); color: var(--cardinal); }

.ask-answer { margin-top: 2rem; border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.ask-answer__question { font-family: var(--serif); font-size: var(--fs-lg); font-weight: 600; margin-bottom: 1rem; }
.ask-answer__text { font-size: var(--fs-base); line-height: 1.7; color: var(--ink-soft); }
.ask-answer__text sup a { font-size: 0.75em; font-weight: 700; text-decoration: none; padding: 0 0.15em; }
.ask-answer > h3 { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 1.6rem 0 0.4rem; }
.ask-sources { list-style: none; margin: 0; padding: 0; counter-reset: src; }
.ask-sources .result { grid-template-columns: 2rem 72px minmax(0, 1fr); gap: 1rem; }
.ask-sources .result::before { counter-increment: src; content: counter(src); font-weight: 700; color: var(--cardinal); font-size: var(--fs-base); padding-top: 0.15rem; }
.ask-sources .result__thumb .thumb { width: 72px; }

.aside-box { border: 1px solid var(--line); padding: 1.2rem 1.3rem; background: var(--fog-warm); font-size: var(--fs-sm); }
.aside-box + .aside-box { margin-top: 1rem; }
.aside-box h2 { font-size: var(--fs-base); margin-bottom: 0.5rem; }
.aside-box p { color: var(--grey); }
.aside-box p:last-child, .aside-box ul:last-child { margin-bottom: 0; }
.aside-box ul { padding-left: 1.1rem; color: var(--grey); }

/* -------------------- Contact page -------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; padding: 2.5rem 0 1rem; }
.contact-card { border: 1px solid var(--line); border-top: 3px solid var(--cardinal); padding: 1.4rem 1.4rem 1.2rem; background: #fff; }
.contact-card h2 { font-size: var(--fs-md); }
.contact-card p { color: var(--grey); font-size: var(--fs-base); }
.contact-card address { font-style: normal; font-size: var(--fs-base); line-height: 1.7; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--fog-warm); border-top: 1px solid var(--line); margin-top: 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.25fr; gap: 2.5rem 3rem; padding: 3.2rem 0 3rem; }
.site-footer__grid > :first-child p { max-width: 34ch; }
/* Every column: same heading, same text size and line height, so rows line up across the footer. */
.site-footer h2 { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); line-height: 1.4; margin: 0 0 1rem; padding-bottom: 0.7rem; position: relative; }
.site-footer h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 1.75rem; height: 2px; background: var(--cardinal); }
.site-footer__org { color: var(--ink) !important; font-weight: 600; text-decoration: none; }
.site-footer__org:hover { color: var(--cardinal) !important; text-decoration: underline; }
.site-footer p, .site-footer address, .site-footer ul { font-size: var(--fs-sm); line-height: 1.9; font-style: normal; margin: 0; }
.site-footer p, .site-footer address { color: var(--grey); }
.site-footer address a { color: var(--grey); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul a { color: var(--ink); text-decoration: none; }
.site-footer ul a:hover { color: var(--cardinal); text-decoration: underline; }

/* Stanford Law School footer (mirrors law.stanford.edu) */
.sls-footer { background: #2b2f31; color: #cfd2d4; padding: 3rem 0 3.2rem; font-size: var(--fs-sm); }
.sls-footer__grid { display: grid; grid-template-columns: 1.45fr repeat(6, 1fr); gap: 2rem 1.6rem; }
.sls-footer h2 { font-family: var(--sans); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin: 0 0 0.7rem; }
.sls-footer ul { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.sls-footer nav ul:last-child { margin-bottom: 0; }
.sls-footer li { line-height: 1.35; margin-bottom: 0.55rem; }
.sls-footer a { color: #cfd2d4; text-decoration: none; }
.sls-footer a:hover { color: #fff; text-decoration: underline; }
.sls-footer__wordmark { display: block; font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.05; color: #fff !important; margin-bottom: 1.4rem; }
.sls-footer__wordmark:hover { text-decoration: none !important; }
.sls-footer address { font-style: normal; line-height: 1.6; margin: 0 0 1rem; }
.sls-footer__social { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; }
.sls-footer__social li { margin: 0; }
.sls-footer__social a { display: grid; place-items: center; width: 28px; height: 28px; background: #474c4f; border-radius: var(--radius); color: #fff; }
.sls-footer__social a:hover { background: var(--cardinal); }
.sls-footer__social svg { width: 16px; height: 16px; }

/* Stanford University global footer */
.global-footer { background: var(--cardinal); color: #fff; padding: 1.6rem 0 1.7rem; font-size: var(--fs-sm); }
.global-footer .wrap { display: flex; align-items: flex-start; gap: 1rem 3rem; }
.global-footer__brand { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1; text-align: center; flex: none; }
.global-footer__brand small { display: block; font-size: 0.6em; letter-spacing: 0.02em; margin-top: 0.15em; }
.global-footer ul { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.global-footer__primary { font-size: var(--fs-base); font-weight: 600; }
.global-footer a { color: #fff; text-decoration: none; }
.global-footer a:hover { text-decoration: underline; color: #fff; }
.global-footer__copy { margin: 0.2rem 0 0; opacity: 0.9; }

/* -------------------- Responsive -------------------- */
@media (max-width: 1100px) {
  .series-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero__collage .thumb:nth-child(1) { width: 190px; }
  .hero__collage .thumb:nth-child(2) { width: 200px; }
  .hero__collage .thumb:nth-child(3) { width: 190px; }
}

@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .doc-rail { grid-column: 2; position: static; max-height: none; }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__collage { display: none; }
  .split, .ask-band__inner, .item-layout, .ask-layout { grid-template-columns: minmax(0, 1fr); }
  .browse-layout { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .facets { border: 1px solid var(--line); padding: 0 1rem; }
  .facets details > summary { cursor: pointer; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .toc { position: static; }
  .doc-rail { grid-column: auto; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .sls-footer__grid { grid-template-columns: repeat(3, 1fr); }
  .sls-footer__id { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .stats__list { grid-template-columns: repeat(2, 1fr); }
  .stats__list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .series-intro { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html { font-size: 100%; } /* 16px on small screens */
  .masthead__logo { height: 32px; }
  .masthead__brand { gap: 0.9rem; }
  .masthead__title { padding-left: 0.9rem; }
  .masthead__name { font-size: var(--fs-md); }
  .masthead__sub { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav__list { display: none; }
  .primary-nav.is-open .primary-nav__list { display: flex; flex-direction: column; width: 100%; padding-bottom: 0.5rem; }
  .primary-nav .wrap { flex-wrap: wrap; flex-direction: row-reverse; justify-content: flex-start; }
  .primary-nav__list a, .primary-nav__list li:first-child a { padding: 0.6rem 0; border-bottom: 0; border-left: 3px solid transparent; }
  .primary-nav__list a[aria-current="page"] { border-left-color: var(--cardinal); padding-left: 0.7rem; }
  .series-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .series-card__media { height: 140px; padding: 1rem 1.1rem 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .card__media { padding: 1rem 1.3rem; }
  .hero-search { flex-wrap: wrap; }
  .hero-search select { max-width: none; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.6rem 0.9rem; border-radius: var(--radius) var(--radius) 0 0; }
  .hero-search button { padding: 0 1rem; border-radius: 0 0 var(--radius) 0; }
  .result { grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; }
  .result__thumb .thumb { width: 64px; }
  .ask-sources .result { grid-template-columns: 1.4rem 56px minmax(0, 1fr); }
  .ask-sources .result__thumb .thumb { width: 56px; }
  .timeline { padding: 1rem 0.6rem 0.8rem; }
  .timeline__years span:nth-child(even) { visibility: hidden; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .sls-footer__grid { grid-template-columns: 1fr 1fr; }
  .global-footer .wrap { flex-direction: column; gap: 1rem; }
  .global-footer__brand { text-align: left; }
  .facts dl > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .meta-table th { width: 38%; }
  .viewer__stage { min-height: 0; }
  .series-intro__facts { gap: 1.2rem; flex-wrap: wrap; }
}

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

@media print {
  .primary-nav, .header-search, .site-footer, .sls-footer, .global-footer, .viewer__bar, .item-actions, .cite__tabs, .cite__copy { display: none !important; }
}

/* -------------------- Legacy section (About) -------------------- */
.prose h3 { font-size: var(--fs-md); margin: 2rem 0 0.7rem; }
.principles { margin: 0.4rem 0 1.4rem; counter-reset: principle; border-top: 1px solid var(--line); }
.principles > div {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: 0.4rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.principles > div::before {
  counter-increment: principle; content: counter(principle);
  grid-row: span 2; font-family: var(--serif); font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; color: var(--cardinal);
}
.principles dt { font-weight: 700; color: var(--ink); }
.principles dd { margin: 0.15rem 0 0; color: var(--ink-soft); }
.reading { padding-left: 1.1rem; color: var(--ink-soft); }
.reading li + li { margin-top: 0.4rem; }

/* -------------------- Ask the Archive status messages -------------------- */
.ask-status { border: 1px solid var(--line); border-left: 3px solid var(--line-strong); background: var(--fog-warm); padding: 1rem 1.2rem; margin: 0; }
.ask-status h3 { margin: 0 0 0.35rem; font-family: var(--serif); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.ask-status p { margin: 0; color: var(--grey); }
.ask-status--error { border-left-color: var(--cardinal); }
.ask-status--loading { color: var(--grey); border-left-color: var(--sandstone); }
.ask-form[aria-busy="true"] .btn { opacity: 0.6; cursor: progress; }
.ask-answer__note { font-size: var(--fs-sm); color: var(--muted); margin: -0.4rem 0 0; font-style: italic; }
.ask-answer__text sup { line-height: 0; }

/* -------------------- Contact page -------------------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; padding-top: 2.5rem; padding-bottom: 3.5rem; align-items: stretch; }
/* The form stretches to the sidebar's height; the message box absorbs the extra space. */
.contact-layout > section { display: flex; flex-direction: column; }
.contact-form { flex: 1; display: flex; flex-direction: column; }
.contact-form .field--grow { flex: 1; display: flex; flex-direction: column; }
.contact-form .field--grow textarea { flex: 1; }
.contact-aside { align-self: start; }
.contact-form { border: 1px solid var(--line); background: #fff; padding: 1.6rem 1.6rem 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; }
.field .req { color: var(--cardinal); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  display: block; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; padding: 0.6rem 0.75rem; font-size: var(--fs-base);
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--cardinal); box-shadow: 0 0 0 1px var(--cardinal); }
.contact-form__actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.3rem; }
.contact-form__hint { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.contact-form__hint span { color: var(--cardinal); }
.contact-status { margin-top: 1.2rem; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--sandstone); background: var(--fog-warm); font-size: var(--fs-sm); color: var(--ink-soft); }
.contact-status--success { border-left-color: #2e7d4f; }
.contact-status--error { border-left-color: var(--cardinal); }
.contact-aside address { font-style: normal; color: var(--grey); line-height: 1.7; }
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.2rem 1rem 1rem; }
}
