/* ==========================================================================
   Legal Solutions LLC — "Table of Authorities"
   A litigation brief as a website: a sticky table of contents with dot
   leaders, a tracked-changes cover sheet, numbered parts with folios, a
   transcript-page FAQ, a pleading-caption form and footnotes for a footer.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Cardo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cardo-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cardo';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cardo-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cardo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cardo-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Overpass';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/overpass-latin-var.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* Palette: oxblood, parchment, graphite, brass. Text pairs are checked in README.md. */
  --parchment: #f3ead8;
  --rail-bg: #ece2cc;
  --sheet: #fbf8f1;
  --graphite: #232327;
  --muted: #57524a;
  --oxblood: #6b1d24;
  --oxblood-deep: #4c1218;
  --brass: #b08d48;
  --brass-ink: #765a1f;
  --rule: #dccfb5;
  --rule-strong: #b9a985;
  --highlight: rgb(176 141 72 / 0.22);
  --shade: rgb(35 35 39 / 0.5);

  /* Type */
  --serif: 'Cardo', 'Iowan Old Style', Georgia, serif;
  --sans: 'Overpass', 'Segoe UI', system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 1.9rem);
  --step-3: clamp(2rem, 1.55rem + 2vw, 3rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.4vw, 4.4rem);

  /* Space */
  --space-s: 1rem;
  --space-m: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-l: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);

  /* Shape */
  --radius: 2px;
  --shadow-sheet: 0 1px 0 var(--rule), 0 18px 40px -24px rgb(35 35 39 / 0.45);
  --rail-w: 18.5rem;
  --bar-h: 4rem;
  --measure: 60rem;
  --line: 1.75rem; /* transcript line grid */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 1rem);
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

a {
  color: var(--oxblood);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--oxblood-deep); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

svg { display: block; }

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--graphite);
  color: var(--parchment);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--parchment); }

/* ---------- Components: buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.2rem 1.35rem 0;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn svg { width: 1.1rem; height: 1.1rem; margin-top: -0.2rem; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--oxblood); color: var(--parchment); }
.btn-primary:hover { background: var(--oxblood-deep); color: var(--parchment); }

.btn-ghost { border-color: var(--graphite); color: var(--graphite); }
.btn-ghost:hover { background: var(--graphite); color: var(--parchment); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--oxblood);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { color: var(--oxblood-deep); text-decoration-thickness: 2px; }

/* ---------- Layout: rail + document ---------- */
.page { min-height: 100vh; }

main { display: block; }

/* ---------- Header: mobile bar, desktop rail ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: var(--parchment);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s ease;
}
.rail.is-scrolled { box-shadow: 0 8px 20px -16px rgb(35 35 39 / 0.6); }

/* Dimmed page behind the open Contents sheet. */
.rail::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--shade);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-open .rail::after { opacity: 1; pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--graphite);
  text-decoration: none;
}
.brand:hover { color: var(--graphite); }
.brand-mark { flex: none; width: 2.1rem; height: 2.1rem; color: var(--oxblood); }
.brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.brand-name small {
  margin-top: 0.3rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-cta { min-height: 2.75rem; padding-inline: 1rem; }
.cta-short { display: none; }

.contents-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 44px;
  min-height: 2.75rem;
  padding: 0.15rem 0.85rem 0;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
  background: transparent;
  color: var(--graphite);
  font: 650 0.95rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.contents-toggle svg { width: 1.15rem; height: 1.15rem; margin-top: -0.15rem; }
.contents-toggle:hover,
.contents-toggle[aria-expanded="true"] { background: var(--graphite); color: var(--parchment); }

.rail-notice { display: none; }

/* The Contents sheet (mobile): rises from the bottom of the screen. */
.contents {
  position: fixed;
  inset: auto 0 0;
  z-index: 2;
  max-height: min(88vh, 40rem);
  overflow-y: auto;
  padding: 1.25rem var(--gutter) 1.5rem;
  background: var(--sheet);
  border-top: 4px solid var(--oxblood);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -20px 40px -20px rgb(35 35 39 / 0.5);
  visibility: hidden;
  transform: translateY(104%);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.32s;
}
.contents.is-open {
  visibility: visible;
  transform: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.contents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.contents-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}
.contents-close {
  min-height: 44px;
  padding: 0.15rem 0.9rem 0;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
  background: none;
  color: var(--graphite);
  font: 650 0.9rem/1 var(--sans);
  cursor: pointer;
}
.contents-close:hover { background: var(--graphite); color: var(--parchment); }

/* Table of contents with dot leaders and page numbers. */
.toc {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 2.9rem;
  padding: 0.75rem 0.25rem 0.45rem;
  border-bottom: 1px solid var(--rule);
  color: var(--graphite);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.toc a::after {
  content: '';
  order: 2;
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--rule-strong);
}
.toc-num {
  flex: none;
  width: 2.1rem;
  color: var(--brass-ink);
  font-style: italic;
}
.toc-label { order: 1; }
.toc-page {
  order: 3;
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.toc a:hover { color: var(--oxblood); }
.toc a:hover .toc-label { text-decoration: underline; text-underline-offset: 0.18em; }
.toc a[aria-current] { color: var(--oxblood); }
.toc a[aria-current] .toc-num { color: var(--oxblood); }
.toc a[aria-current]::after { border-bottom-color: var(--oxblood); }

.contents-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: var(--step--1);
}
.contents-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
}
.contents-contact a:hover { color: var(--oxblood); }
.contents-contact svg { width: 1.05rem; height: 1.05rem; margin-top: -0.2rem; }

/* Narrow screens: shorter CTA label and an icon-only Contents toggle. */
@media (max-width: 639px) {
  .cta-long {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .cta-short { display: inline; }
  .toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .contents-toggle { padding: 0 0.7rem; }
  .contents-toggle svg { margin-top: 0; }
}

@media (max-width: 479px) {
  .brand-name small { display: none; }
  .brand-name { font-size: 1.1rem; }
}

@media (max-width: 359px) {
  .brand-mark { width: 1.8rem; height: 1.8rem; }
  .brand-name { font-size: 1rem; }
  .rail { gap: 0.45rem; }
  .rail-cta { padding-inline: 0.75rem; }
}

/* Desktop: the header becomes a sticky left column, like a brief's contents page. */
@media (min-width: 1024px) {
  html { scroll-padding-top: 1.5rem; }

  .page {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }

  .rail {
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2rem 1.6rem 1.75rem;
    background: var(--rail-bg);
    border-bottom: 0;
    border-right: 3px double var(--rule-strong);
  }
  .rail.is-scrolled { box-shadow: none; }
  .rail::after,
  .contents-head .contents-close,
  .contents-toggle { display: none; }

  .brand { margin: 0 0 2.25rem; }

  .contents {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .contents-title {
    padding-bottom: 0.4rem;
    border-bottom: 1.5px solid var(--graphite);
    font-size: 0.78rem;
    font-family: var(--sans);
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .toc a { min-height: 2.75rem; font-size: 1.06rem; padding-inline: 0; }
  .toc-num { width: 1.9rem; }

  .rail-cta { margin-top: 1.6rem; }

  .rail-notice {
    display: block;
    margin: auto 0 0;
    padding-top: 1.5rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
  }
  .rail-notice strong { color: var(--oxblood); }

  main,
  .site-footer { grid-column: 2; }
}

/* ---------- Shared document parts ---------- */
.cover,
.part,
.legal {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.part {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--rule);
}

.part-head {
  position: relative;
  max-width: 44rem;
  margin-bottom: var(--space-l);
}
.part-num {
  margin: 0 0 0.35rem;
  color: var(--brass-ink);
  font-family: var(--serif);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1;
}
.part-head h2 { font-size: var(--step-3); margin-bottom: 0.9rem; }
.part-intro { margin: 0; color: var(--muted); font-size: 1.12rem; max-width: 40rem; }

.folio {
  margin: var(--space-l) 0 0;
  padding-bottom: var(--space-m);
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  text-align: center;
  letter-spacing: 0.1em;
}

/* Footnote reference marks. */
sup { line-height: 0; }
.fn-ref {
  display: inline-block;
  min-width: 1em;
  padding: 0 0.1em;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.fn-ref:hover { text-decoration: underline; }

@media (min-width: 1180px) {
  /* Roman numerals hang in the margin, the way briefs set point headings. */
  .part-num {
    position: absolute;
    top: 0.6rem;
    right: calc(100% + 1.4rem);
    margin: 0;
  }
}

/* ---------- Section: cover sheet (tracked changes) ---------- */
.cover { padding-top: var(--space-l); }

.review-bar {
  display: none;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.js .review-bar { display: flex; }
.review-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.review-switch {
  display: inline-flex;
  padding: 3px;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
}
.review-switch button {
  min-height: 2.5rem;
  min-width: 44px;
  padding: 0.15rem 0.9rem 0;
  border: 0;
  border-radius: 1px;
  background: none;
  color: var(--graphite);
  font: 650 0.88rem/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
@media (max-width: 399px) {
  .review-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
.review-switch button:hover { background: var(--rule); }
.review-switch button[aria-pressed="true"] { background: var(--graphite); color: var(--parchment); }

.cover-grid {
  display: grid;
  gap: var(--space-m);
}

.sheet {
  position: relative;
  padding: clamp(1.5rem, 1rem + 3vw, 3.25rem);
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}
.sheet::before {
  /* Pleading-paper margin rule down the left edge. */
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(0.6rem, 0.3rem + 1.2vw, 1.4rem);
  border-left: 3px double var(--rule);
}

.stamp {
  display: inline-grid;
  justify-items: center;
  gap: 0.15rem;
  margin: 0 0 1.25rem;
  padding: 0.6rem 1rem 0.5rem;
  border: 3px double var(--oxblood);
  border-radius: 6px;
  color: var(--oxblood);
  font-family: var(--sans);
  text-transform: uppercase;
  line-height: 1.1;
  transform: rotate(-5deg);
}
.stamp-word { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.2em; }
.stamp-date {
  padding: 0.15rem 0.6rem 0;
  border-block: 1.5px solid var(--oxblood);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}
.stamp-place { font-size: 0.66rem; font-weight: 750; letter-spacing: 0.1em; }

@media (min-width: 600px) {
  /* The stamp sits over the sheet's top corner, clear of the headline. */
  .stamp {
    position: absolute;
    top: -1.6rem;
    right: clamp(0.75rem, 3vw, 2rem);
    margin: 0;
    background: var(--sheet);
  }
  .sheet-caption { padding-right: 11rem; }
  .sheet { margin-top: 1.6rem; }
}

.sheet-caption {
  margin-bottom: 1rem;
  color: var(--brass-ink);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sheet h1 {
  margin-bottom: 1.5rem;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

/* Track-changes marks: deletions struck in oxblood, insertions underlined in brass. */
del,
ins {
  text-decoration-thickness: 2px;
  transition: opacity 0.4s ease, color 0.5s ease, text-decoration-color 0.5s ease;
}
del {
  color: var(--oxblood);
  text-decoration-line: line-through;
}
ins {
  color: var(--brass-ink);
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 0.16em;
}
.sheet h1 del,
.sheet h1 ins { text-decoration-thickness: 3px; }

.sheet.is-resolving del { opacity: 0; }
.sheet.is-final del { display: none; }
.sheet.is-final ins { color: inherit; text-decoration-color: transparent; }

.anchor {
  background: var(--highlight);
  color: inherit;
  border-bottom: 1px dotted var(--brass-ink);
  transition: background-color 0.3s ease;
}
.anchor.is-linked { background: rgb(176 141 72 / 0.45); }
.sheet.is-final .anchor { background: transparent; border-bottom-color: transparent; }

.sheet-lede { font-size: var(--step-1); line-height: 1.55; }
.sheet-text { color: var(--muted); max-width: 38rem; }

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
}

.sheet-notice {
  clear: both;
  margin: 0;
  padding: 1rem 1.1rem 0.85rem;
  border: 1.5px solid var(--oxblood);
  border-left-width: 6px;
  background: var(--parchment);
  font-size: 0.98rem;
  line-height: 1.55;
}
.sheet-notice strong { color: var(--oxblood); }

/* Margin comments, as in a word processor's review pane. */
.margin-notes {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.note {
  position: relative;
  padding: 0.8rem 0.95rem 0.6rem;
  background: var(--sheet);
  border-left: 3px solid var(--oxblood);
  box-shadow: 0 1px 0 var(--rule);
  font-size: 0.92rem;
  line-height: 1.5;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.note:hover { transform: translateX(-3px); box-shadow: 0 8px 18px -12px rgb(35 35 39 / 0.5); }
.note p { margin: 0; }
.note .note-head {
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.note-id {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.35rem 0;
  background: var(--oxblood);
  color: var(--sheet);
  border-radius: 1px;
}

@media (min-width: 640px) and (max-width: 1179px) {
  .margin-notes { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1180px) {
  .cover-grid { grid-template-columns: minmax(0, 1fr) 13.5rem; }
  .margin-notes { align-content: start; padding-top: 8.5rem; gap: 1.5rem; }
  .note::before {
    /* Dashed lead line back to the page edge. */
    content: '';
    position: absolute;
    top: 1.3rem;
    right: 100%;
    width: var(--space-m);
    border-top: 1px dashed var(--oxblood);
  }
}

/* ---------- Section: I. services as a table of authorities ---------- */
.part-services { display: grid; }
.bates-art {
  width: min(100%, 20rem);
  height: auto;
  margin: calc(-1 * var(--space-s)) 0 var(--space-l);
}
.bates-art-label {
  fill: var(--oxblood);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

@media (min-width: 1100px) {
  .part-services { grid-template-columns: minmax(0, 1fr) 19rem; column-gap: var(--space-l); }
  .part-services > .part-head { grid-column: 1; }
  .bates-art { grid-column: 2; grid-row: 1; align-self: center; margin: 0 0 var(--space-l); }
  .part-services > .authorities,
  .part-services > .folio { grid-column: 1 / -1; }
}

.authorities {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--graphite);
}
.authority {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.authority-line {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0.8rem;
  font-size: var(--step-2);
}
.authority-letter {
  flex: none;
  width: 2.2rem;
  color: var(--brass-ink);
  font-style: italic;
}
.leader {
  display: none;
  flex: 1 1 2rem;
  min-width: 2rem;
  border-bottom: 2px dotted var(--rule-strong);
}
.authority-time {
  grid-column: 2;
  color: var(--oxblood);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.authority > p {
  max-width: 44rem;
  margin-left: 2.8rem;
}
.delivered { color: var(--muted); font-size: 0.95rem; }
.delivered span {
  display: block;
  color: var(--graphite);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .authority-line { display: flex; }
  .leader { display: block; }
  .authority-time { white-space: nowrap; }
}

@media (max-width: 479px) {
  .authority > p { margin-left: 0; }
  .authority-line { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .authority-letter { width: auto; }
}

/* ---------- Section: II. procedure as numbered pleading paragraphs ---------- */
.paragraphs {
  counter-reset: para;
  max-width: 46rem;
  margin: 0;
  padding: 0 0 0 clamp(1rem, 0.5rem + 2vw, 2rem);
  list-style: none;
  border-left: 3px double var(--rule-strong);
}
.paragraphs li {
  counter-increment: para;
  position: relative;
  padding: 0 0 1.75rem 3.25rem;
}
.paragraphs li:last-child { padding-bottom: 0.25rem; }
.paragraphs li::before {
  content: counter(para) '.';
  position: absolute;
  top: -0.1rem;
  left: 0;
  color: var(--brass-ink);
  font-family: var(--serif);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1;
}
.paragraphs h3 {
  margin-bottom: 0.4rem;
  font-size: var(--step-1);
  font-weight: 700;
}
.paragraphs p { margin: 0; }

/* ---------- Section: III. limits ---------- */
.notice-frame {
  max-width: 50rem;
  padding: clamp(1.25rem, 0.6rem + 3vw, 2.75rem);
  background: var(--sheet);
  border: 2px solid var(--oxblood);
  outline: 1px solid var(--oxblood);
  outline-offset: -8px;
}
.notice-lead {
  margin-bottom: 1.5rem;
  color: var(--oxblood);
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.3;
}
.limits {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.limits li {
  position: relative;
  padding: 0.85rem 0 0.75rem 1.6rem;
  border-top: 1px solid var(--rule);
}
.limits li::before {
  content: '\00A7';
  position: absolute;
  left: 0;
  top: 0.72rem;
  color: var(--brass-ink);
  font-family: var(--serif);
  font-size: 1.2rem;
}
.notice-foot {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1.5px solid var(--graphite);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Section: IV. company record ---------- */
.record {
  display: grid;
  gap: var(--space-l);
  align-items: end;
}
.docket {
  margin: 0;
  border-top: 1.5px solid var(--graphite);
}
.docket div {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.docket dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.docket dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.4;
}
.peak-art { width: min(100%, 17rem); height: auto; }
.peak-art-label {
  fill: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

@media (min-width: 640px) {
  .docket div { grid-template-columns: 10rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
}
@media (min-width: 1100px) {
  .record { grid-template-columns: minmax(0, 1fr) 17rem; }
}

/* ---------- Section: V. questions as a transcript page ---------- */
.transcript {
  max-width: 48rem;
  padding: clamp(1.25rem, 0.8rem + 2.5vw, 2.5rem) clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}
.transcript-head {
  margin-bottom: var(--line);
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--graphite);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}
.transcript-head p { margin: 0; }
.transcript-head p + p { color: var(--muted); font-weight: 600; }

/* Every line sits on one grid so the gutter numbers line up with the text. */
.transcript-body {
  position: relative;
  padding-left: 3.4rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: var(--line);
}
.gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2.4rem;
  overflow: hidden;
  padding-right: 0.55rem;
  border-right: 3px double var(--rule-strong);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: var(--line);
  text-align: right;
  white-space: pre;
  font-variant-numeric: tabular-nums;
}
.qa { margin-bottom: var(--line); }
.qa:last-child { margin-bottom: 0; }
.q,
.a {
  margin: 0;
  padding-left: 2.6rem;
  text-indent: -2.6rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: var(--line);
}
.q { font-weight: 700; }
.a { color: var(--graphite); }
.qa-tag {
  display: inline-block;
  width: 2.6rem;
  text-indent: 0;
  color: var(--oxblood);
  font-weight: 800;
}
.transcript-end {
  margin: var(--line) 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

@media (max-width: 479px) {
  .transcript-body { padding-left: 2.6rem; }
  .gutter { width: 1.9rem; padding-right: 0.4rem; }
  .q, .a { padding-left: 2rem; text-indent: -2rem; }
  .qa-tag { width: 2rem; }
}

/* ---------- Section: VI. engagement request as a pleading caption ---------- */
.caption {
  max-width: 54rem;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  padding: clamp(1rem, 0.5rem + 2.5vw, 2.25rem);
}
.form-required { margin-bottom: 0.9rem; color: var(--muted); font-size: 0.88rem; }

.caption-grid {
  display: grid;
  border: 1.5px solid var(--graphite);
}
.caption-grid > * { padding: 1.1rem 1.1rem 0.6rem; }
.caption-court { border-bottom: 1.5px solid var(--graphite); }
.caption-court p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.caption-court .caption-court-name {
  color: var(--graphite);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
}
.caption-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 0.9rem;
  border-top: 1.5px solid var(--graphite);
  border-bottom: 1px solid var(--rule-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.caption-v {
  margin: 0.25rem 0 0.9rem;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  text-align: center;
}

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.caption-grid fieldset { padding-bottom: 0.3rem; }
.caption-parties { order: 1; }
.caption-box { order: 2; }
.caption-matter { order: 3; }

@media (min-width: 760px) {
  .caption-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .caption-court { order: 0; border-right: 1.5px solid var(--graphite); }
  .caption-box { order: 1; border-top: 0; border-bottom: 1.5px solid var(--graphite); }
  .caption-parties { order: 2; border-right: 1.5px solid var(--graphite); }
  .caption-matter { order: 3; }
}

.field { margin-bottom: 1rem; }
.field label,
.field legend {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.req { color: var(--oxblood); }
.optional { color: var(--muted); font-weight: 500; }
.field-pair { display: grid; gap: 0 1rem; }
@media (min-width: 520px) {
  .field-pair { grid-template-columns: 1fr 1fr; }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.55rem 0.65rem 0.4rem;
  border: 0;
  border-bottom: 1.5px solid var(--graphite);
  border-radius: 0;
  background: var(--parchment);
  color: var(--graphite);
  font: 1rem/1.4 var(--sans);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--graphite) 50%), linear-gradient(-45deg, transparent 50%, var(--graphite) 50%);
  background-position: calc(100% - 1.1rem) 52%, calc(100% - 0.75rem) 52%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
textarea { resize: vertical; min-height: 7.5rem; }
input:hover,
select:hover,
textarea:hover { border-bottom-color: var(--oxblood); }
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline-offset: 1px; background-color: var(--sheet); }

[aria-invalid="true"] { border-bottom-color: var(--oxblood); border-bottom-width: 3px; }

.field-hint { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.85rem; }
.field-error { margin: 0.3rem 0 0; color: var(--oxblood); font-size: 0.88rem; font-weight: 700; }
.field-error:empty { display: none; }

.caption-body {
  padding: 1.25rem 1.1rem 0.5rem;
  border: 1.5px solid var(--graphite);
  border-top: 0;
}
.caption-title {
  margin-bottom: 1.25rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.checks { display: grid; gap: 0 1rem; }
@media (min-width: 640px) {
  .checks { grid-template-columns: 1fr 1fr; }
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.6rem 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}
.field .check { display: flex; margin: 0; font-weight: 500; }
.check input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  accent-color: var(--oxblood);
}
.services-field legend { margin-bottom: 0.1rem; }
.services-field.is-invalid legend,
.field-confirm .check:has([aria-invalid="true"]) { color: var(--oxblood); }

.field-confirm {
  padding: 0.75rem 0.9rem 0.4rem;
  background: var(--parchment);
  border-left: 4px solid var(--oxblood);
}

/* Bots fill every field; people never see this one. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.caption-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 1rem;
}
.caption-submit .btn { min-width: 12rem; }
.form-legal { margin: 0; color: var(--muted); font-size: 0.88rem; }

.form-status { margin-bottom: 1rem; }
.form-status:empty { display: none; }
.form-status {
  padding: 0.85rem 1rem 0.7rem;
  border-left: 4px solid var(--graphite);
  background: var(--parchment);
  font-size: 0.95rem;
}
.form-status.is-error { border-left-color: var(--oxblood); }

.engage-direct { max-width: 44rem; margin-top: var(--space-m); color: var(--muted); }
.engage-direct a { font-weight: 650; }

/* ---------- Footer: footnotes ---------- */
.site-footer {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-l) var(--gutter) var(--space-m);
  font-size: 0.9rem;
  line-height: 1.55;
}
.footnotes {
  position: relative;
  counter-reset: fn;
  margin: 0 0 1.5rem;
  padding: 1.1rem 0 0;
  list-style: none;
}
.footnotes::before {
  /* The short rule that separates footnotes from the text above. */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 9rem;
  border-top: 1px solid var(--graphite);
}
.footnotes li {
  counter-increment: fn;
  position: relative;
  max-width: 50rem;
  margin-bottom: 0.65rem;
  padding-left: 1.6rem;
}
.footnotes li::before {
  content: counter(fn);
  position: absolute;
  top: -0.2em;
  left: 0;
  color: var(--oxblood);
  font-size: 0.75em;
  font-weight: 800;
}
.colophon { margin: 0; color: var(--muted); font-size: 0.82rem; }

/* ---------- Pages: legal documents ---------- */
.legal { padding-top: var(--space-l); padding-bottom: var(--space-l); }
.legal-head {
  max-width: 46rem;
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-m);
  border-bottom: 1.5px solid var(--graphite);
}
.legal-kicker {
  margin-bottom: 0.75rem;
  color: var(--brass-ink);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.legal-head h1 { font-size: var(--step-4); margin-bottom: 1rem; }
.legal-head p:last-child { margin: 0; color: var(--muted); font-size: 1.1rem; }

.prose {
  counter-reset: sec;
  max-width: 46rem;
}
.prose h2 {
  counter-increment: sec;
  margin: 2.75rem 0 0.9rem;
  font-size: var(--step-2);
}
.prose h2::before {
  content: '\00A7\00A0' counter(sec) '. ';
  color: var(--brass-ink);
  font-style: italic;
}
.prose h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: var(--step-1);
  font-weight: 700;
}
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--brass-ink); }
.prose address { font-style: normal; margin-bottom: 1em; }
.prose code { font-size: 0.92em; overflow-wrap: anywhere; }

.callout {
  padding: 1.1rem 1.2rem 0.9rem;
  background: var(--sheet);
  border: 1.5px solid var(--oxblood);
  border-left-width: 6px;
}

/* Tables read across on wide screens and stack into label/value blocks on narrow ones. */
.table-wrap { margin: 1.25rem 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.45;
}
caption { text-align: left; }
th,
td {
  padding: 0.7rem 0.75rem 0.55rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
thead th {
  border-bottom: 1.5px solid var(--graphite);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
tbody tr:nth-child(odd) { background: var(--sheet); }

@media (max-width: 719px) {
  table,
  tbody,
  tr,
  td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { margin-bottom: 0.9rem; border: 1px solid var(--rule); }
  td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0.75rem 0.45rem;
  }
  td:last-child { border-bottom: 0; }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-top: 0.1rem;
  }
}

/* 404: a missing exhibit. */
.missing {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}
.missing-tab {
  width: min(100%, 12rem);
  height: auto;
}
.missing-tab-text {
  fill: var(--sheet);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.missing-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
@media (min-width: 760px) {
  .missing { grid-template-columns: minmax(0, 1fr) 15rem; }
}

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  z-index: 60;
  max-width: 27rem;
  margin-left: auto;
  padding: 1.25rem 1.3rem 1.1rem;
  background: var(--sheet);
  border-top: 5px solid var(--oxblood);
  box-shadow: 0 24px 48px -20px rgb(35 35 39 / 0.55), 0 0 0 1px var(--rule);
}
.consent-title {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}
.consent-text { margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.55; }
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.consent-btn {
  flex: 1 1 8rem;
  min-height: 2.9rem;
  padding: 0.2rem 1rem 0;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--graphite);
  color: var(--parchment);
  font: 650 0.92rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.consent-btn:hover { background: var(--oxblood); border-color: var(--oxblood); }
.consent-btn-save { background: var(--oxblood); border-color: var(--oxblood); }
.consent-btn-save:hover { background: var(--oxblood-deep); border-color: var(--oxblood-deep); }
.consent-link {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--oxblood);
  font: 650 0.9rem/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.consent-link:hover { color: var(--oxblood-deep); }

.consent-dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-top: 5px solid var(--oxblood);
  background: var(--sheet);
  color: var(--graphite);
  box-shadow: 0 30px 60px -20px rgb(35 35 39 / 0.6);
}
.consent-dialog::backdrop { background: var(--shade); }
.consent-dialog-inner { padding: 1.5rem 1.5rem 1.25rem; }
.consent-categories { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.consent-category { padding: 0.9rem 0 0.6rem; border-top: 1px solid var(--rule); }
.consent-category p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.88rem; }
.consent-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.consent-category h3 { font-family: var(--sans); font-size: 1rem; font-weight: 750; }
.consent-always { color: var(--brass-ink); font-size: 0.82rem; font-weight: 700; }
.consent-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.consent-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.consent-switch-track {
  position: relative;
  width: 2.9rem;
  height: 1.6rem;
  border: 1.5px solid var(--graphite);
  border-radius: 999px;
  background: var(--parchment);
  transition: background-color 0.2s ease;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 0.16rem;
  left: 0.18rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--graphite);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.consent-switch input:checked + .consent-switch-track { background: var(--oxblood); border-color: var(--oxblood); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(1.25rem); background: var(--sheet); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 2px solid var(--oxblood); outline-offset: 3px; }

/* ---------- Motion: reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .rail,
  .review-bar,
  .margin-notes,
  .consent,
  .caption,
  .skip-link { display: none; }
  .page { display: block; }
  body { background: #fff; }
  .sheet,
  .transcript { box-shadow: none; }
}
