.header-control {
  display: inline-grid;
  place-items: center;
  height: 44px;
  min-width: 44px;
  border: 1px solid var(--control-border);
  border-radius: 3px;
  text-decoration: none;
}
.header-control:hover, .header-control[aria-current="page"] { border-color: var(--leaf); }
.header-control[aria-current="page"] { background: var(--accent-wash); }
.desktop-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.icon-search {
  width: 14px;
  height: 14px;
  transform: translate(-1px, -1px);
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.icon-search::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 6px;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: left;
}
.print-only { display: none; }

.block-next { margin-top: 18px; }
.home-index { margin-top: 20px; }
.link-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-index > li { min-width: 0; }
.sheet .link-index { padding: 0 8px 14px; }
.source-links { padding-block: 5px; }

.document-intro { padding-block: clamp(27px, 4vw, 52px) 24px; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 16px;
  color: var(--leaf);
  font-size: .91rem;
}
.breadcrumb a { text-underline-offset: .2em; }
.document-intro h1 {
  font-size: clamp(2.25rem, 5.1vw, 4.25rem);
  font-weight: 540;
  letter-spacing: -.052em;
  line-height: 1.075;
  text-wrap: balance;
}
.document-intro .narrative > p {
  margin-top: 13px;
  color: var(--body);
  max-width: 67ch;
  font-size: clamp(1.03rem, 2vw, 1.25rem);
}
.document-meta {
  grid-column: span 4;
  align-self: end;
  justify-self: end;
  border-left: 1px solid var(--rule);
  padding: 7px 0 7px 16px;
  width: min(100%, 256px);
}
.document-meta .eyebrow { margin-bottom: 3px; }
.document-meta p:not(.eyebrow) { font-weight: 620; }
.document-meta small { color: var(--body); }
.interior-advice { margin-bottom: 30px; }
.chapter-body, .directory, .search-surface, .notebook-surface { padding-bottom: clamp(35px, 6vw, 65px); }
.chapter-body > .chapter-toc { margin-bottom: 24px; }
.chapter-section {
  padding-block: 27px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.chapter-section h2,
.chronology h2,
.question-section h2, .related-reading h2, .image-record h2, .search-directory h2,
.static-notebook h2, .library h2 {
  font-size: clamp(1.54rem, 3.5vw, 2.35rem);
  letter-spacing: -.035em;
  font-weight: 700;
}
.chapter-section .narrative p {
  max-width: 67ch;
  margin-top: 12px;
  font-size: clamp(1.03rem, 1.8vw, 1.15rem);
  line-height: 1.64;
}
.side-note {
  grid-column: span 4;
  border-left: 2px solid var(--line);
  background: var(--wash);
  padding: 11px 13px 12px;
  min-width: 0;
  align-self: start;
}
.side-note h3, .side-note h4 {
  margin: 0 0 6px;
  font: 700 .95rem/1.4 var(--sans);
  color: var(--leaf);
}
.side-note ul, .question-entry ul { margin: 0; padding: 0; list-style: none; }
.side-note li + li, .question-entry li + li { margin-top: 5px; }
.side-note .text-link, .question-entry .text-link { font-size: .97rem; overflow-wrap: anywhere; }
.law-limit {
  margin-block: 5px;
  color: var(--body);
  font-size: .9375rem;
  line-height: 1.43;
}
.source-review {
  display: inline-block;
  color: var(--body);
  font-weight: 650;
}
.chronology {
  margin-block: 32px 38px;
  padding: 0;
  background: var(--paper);
}
.chronology .section-header { margin: 0; }
.chronology-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-inline-start: 1px solid var(--rule);
}
.chronology-list .chronology-entry {
  display: grid;
  grid-template-columns: minmax(145px, 2fr) minmax(0, 5fr);
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 15px 0 15px 23px;
}
.chronology-list .chronology-entry::before {
  left: -4px;
  top: 21px;
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 3px var(--paper);
}
.chronology-entry .timeline-date { font-size: clamp(1.15rem, 2.1vw, 1.59rem); }
.chronology-entry .timeline-narrative { padding-top: 3px; }
.chronology-entry .timeline-note { margin-top: 8px; }
.chronology-list .chronology-entry:last-child { border-bottom: 0; padding-bottom: 5px; }
.question-section, .related-reading {
  padding-block: 24px 14px;
  border-top: 1px solid var(--line);
}
.question-section h2, .related-reading h2 { margin-bottom: 12px; }
.question-entry .sheet-body { padding-inline-start: 3px; }
.question-entry .sheet-body ul { margin: 7px 0; }
.image-record { max-width: 640px; padding-block: 24px; }
.image-record h2 { margin-bottom: 12px; }
.format-record {
  width: min(100%, 780px);
  margin-block: 14px 24px;
  padding: 20px 23px;
  border: 1px solid var(--line);
  background: var(--wash);
}
.format-heading h2 { margin-top: 4px; font-size: clamp(1.5rem, 3.2vw, 2.2rem); letter-spacing: -.03em; }
.format-heading > p:not(.eyebrow) { margin-top: 6px; }
.format-heading small { color: var(--body); }
.format-record dl { margin-block: 15px; }
.format-record dl > div, .notebook-record > div {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: 5px 12px;
  padding-block: 8px;
  border-top: 1px solid var(--line);
}
.format-record dt, .notebook-record dt { font-weight: 640; }
.format-record dd, .notebook-record dd { margin: 0; }
.tour-listings { width: min(100%, 780px); margin-block: 14px 24px; }
.tour-listings h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.03em; margin-bottom: 6px; }
.tour-listing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 14px; }
.tour-listing { padding: 16px 18px; border: 1px solid var(--line); background: var(--wash); }
.tour-listing h3 { margin-block: 4px 8px; font-size: 1.12rem; }
.tour-listing dl { margin-block: 8px 12px; }
.tour-listing dl > div { padding-block: 6px; border-top: 1px solid var(--line); }
.tour-listing dt { font-weight: 640; }
.tour-listing dd { margin: 0; }
@media (max-width: 640px) { .tour-listing-grid { grid-template-columns: minmax(0, 1fr); } }
.directory .source-list { margin-top: 0; }
.directory .source-entry { padding: 14px 15px; }
.source-entry h2 { font-size: 1.34rem; }
.source-entry .source-work { margin-top: 4px; font-weight: 630; }
.source-entry .source-author { font-size: .91rem; color: var(--body); }
.source-entry .source-work + p, .source-entry .source-author + p { margin-top: 6px; }
.source-entry .source-action { margin-top: 4px; }
.directory .related-reading { margin-top: 24px; }

.search-panel, .search-directory { max-width: 820px; }
.search-panel label { display: block; margin-bottom: 5px; font-weight: 670; }
.search-field { display: flex; align-items: center; gap: 10px; padding-left: 15px; border: 1px solid var(--control-border); background: var(--paper); }
.search-field:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.search-field input {
  font: 1.08rem var(--sans);
  width: 100%;
  padding: 12px;
  border: 0;
  color: var(--ink);
  background: transparent;
  outline: 0;
}
.status-line { min-height: 1.45em; color: var(--body); font-size: .94rem; margin-block: 8px; }
.search-results { margin: 0; padding: 0; list-style: none; }
.search-results li { border-top: 1px solid var(--line); padding: 12px 0; }
.search-results h2 { margin: 3px 0; font-size: 1.24rem; }
.search-results a { text-underline-offset: .2em; }
.search-results li > p:last-child { color: var(--body); }
.search-directory { margin-top: 24px; }
.search-directory h2 { margin-bottom: 10px; }
.search-directory .link-index + .link-index { margin-top: 10px; }

button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button.button { border: 1px solid transparent; }
.secondary-button {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--control-border);
  border-radius: 3px;
  background: var(--wash);
  color: var(--ink);
  font-weight: 650;
}
.secondary-button:hover { border-color: var(--leaf); background: var(--accent-wash); }
.text-button {
  border: 0;
  background: transparent;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-color: var(--underline);
  color: var(--leaf);
  font-weight: 660;
  text-align: left;
}
.text-button:hover { color: var(--accent-hover); }
.notebook-inputs, .notebook-paper {
  min-width: 0;
  border: 1px solid var(--line);
  padding: clamp(15px, 2.6vw, 25px);
}
.notebook-inputs { background: var(--wash); }
.notebook-paper h2, .comparison > h3 {
  font-size: clamp(1.34rem, 2.25vw, 1.84rem);
  letter-spacing: -.03em;
}
.notebook-inputs fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.notebook-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 12px !important;
}
.choice-row, .compare-check { display: flex; align-items: flex-start; gap: 7px; }
.choice-row, .compare-check, .static-checklist label { cursor: pointer; }
.choice-row {
  border: 1px solid var(--control-border);
  background: var(--paper);
  min-height: 44px;
  padding: 7px 8px;
  line-height: 1.25;
  align-items: center;
}
.choice-row:has(:checked) { background: var(--accent-wash); border-color: var(--leaf); }
.choice-row:hover { border-color: var(--leaf); }
.choice-row input, .compare-check input, .static-checklist input {
  accent-color: var(--leaf);
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
  margin: 0;
}
.choice-row span { min-width: 0; overflow-wrap: anywhere; }
.notebook-selects {
  margin-top: 13px;
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.notebook-selects label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  color: var(--body);
  font-size: 1rem;
  font-weight: 640;
}
.notebook-selects select {
  display: block;
  width: 100%;
  padding: 5px 7px;
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: 2px;
  background: var(--paper);
}
.estimate-note { color: var(--body); font-size: .9375rem; line-height: 1.45; }
.notebook-selects + .estimate-note { margin-top: 8px; }
.notebook-questions { margin-top: 12px; }
.notebook-questions > fieldset { display: grid; gap: 5px; padding-bottom: 9px; }
.notebook-inputs > .text-button { margin-top: 7px; }
.removed-label { font-weight: 650; margin-top: 8px; }
[data-removed] ul { margin: 0; padding-inline-start: 16px; }

.notebook-paper {
  background: var(--paper);
  border-top: 3px solid var(--leaf);
  box-shadow: 4px 4px 0 #d9e3e0;
}
.sequence-header { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; }
.sequence-header button { flex: 0 0 auto; }
.reading-sequence { margin: 1px 0 11px; padding: 0; list-style: none; counter-reset: reading; }
.reading-sequence > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  counter-increment: reading;
}
.reading-sequence > li::before {
  content: counter(reading);
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background: var(--accent-wash);
  color: var(--leaf);
  font-size: .86rem;
  font-weight: 700;
}
.reading-sequence a { color: var(--ink); font-weight: 700; text-underline-offset: .18em; }
.reading-sequence small { display: block; color: var(--body); }
.remove-chapter {
  width: 44px;
  height: 44px;
  border-radius: 3px;
  border: 1px solid var(--control-border);
  background: transparent;
  color: var(--body);
  font-size: 1.25rem;
  line-height: 1;
}
.remove-chapter:hover { background: var(--wash); border-color: var(--control-border); }
.plan-note {
  color: var(--body);
  margin: 5px 0 9px;
  border-left: 2px solid var(--accent-hover);
  background: var(--wash);
  padding: 6px 9px;
  font-size: .94rem;
}
.plan-block {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.plan-block h3, .notebook-content h3 { margin-bottom: 6px; font-size: 1.07rem; }
.plan-block > ul { margin: 0; padding-left: 18px; }
.plan-block > ul li + li { margin-top: 5px; }
.plan-block a, .notebook-content a, .comparison a { text-underline-offset: .19em; }
.known-list { color: var(--body); line-height: 1.46; }
.notebook-record { margin: 6px 0; }
.notebook-record > div { padding-block: 5px; }
.notebook-references small { display: block; color: var(--body); line-height: 1.4; }
.notebook-references .law-limit { margin-block: 3px; }
.reading-conclusion {
  border-top: 1px solid var(--line);
  margin-top: 7px;
  padding-block: 8px 3px;
  color: var(--body);
  font-size: .94rem;
}
.notebook-actions { margin-block: 9px 12px; }
.notebook-actions .status-line:empty { display: none; }
.action-row, .saved-actions { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; }
[data-editing]:not(:empty) { margin-bottom: 5px; color: var(--body); font-size: .94rem; }
.storage-state { padding: 7px 10px; background: var(--wash); border-left: 2px solid var(--accent-hover); }
.library { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.library > p { margin-top: 4px; color: var(--body); }
.saved-entries { list-style: none; margin: 10px 0; padding: 0; max-width: 900px; }
.saved-entries > li {
  display: flex;
  gap: 8px 15px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
  background: var(--wash);
}
.saved-entries h3 { font-size: 1.08rem; }
.saved-description small { color: var(--body); }
.compare-check { align-items: center; font-weight: 640; }
.comparison:not(:empty) { margin-top: 12px; }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 12px; margin-top: 8px; }
.comparison-grid article { min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--wash); }
.comparison-grid h4 { font-size: 1.12rem; }
.comparison-grid dl { margin-block: 8px; }
.comparison-grid dt { font-weight: 670; }
.comparison-grid dd { margin: 0 0 4px; }
.comparison-grid ul { margin: 6px 0; padding-inline-start: 18px; }
.static-checklist { list-style: none; padding: 0 !important; }
.static-checklist li { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }

@media (max-width: 760px) {
  .document-intro { padding-block: 26px 20px; }
  .breadcrumb { margin-bottom: 11px; }
  .document-intro .narrative p { margin-top: 9px; }
  .document-meta, .side-note { grid-column: auto; }
  .document-meta {
    justify-self: stretch;
    width: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding: 6px 0 0;
  }
  .document-meta .eyebrow { display: none; }
  .side-note { margin-top: 4px; }
  .chronology { padding: 0; }
  .chronology-list .chronology-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-right: 1px;
  }
  .chronology-entry .timeline-date { margin: 2px 0 4px; }
  .chronology-entry .timeline-narrative { padding-top: 0; }
  .format-record { padding: 14px; }
  .notebook-paper { box-shadow: 3px 3px 0 #d9e3e0; }
}
@media (max-width: 450px) {
  .header-inner { gap: 10px; }
  .link-index { grid-template-columns: 1fr; }
  .format-record dl > div { grid-template-columns: 1fr; gap: 1px; }
}
@media (max-width: 375px) {
  .header-search { display: none; }
}
@media (max-width: 340px) {
  .header-notebook { display: inline-grid; }
  .brand small { max-width: 18ch; }
}
@media print {
  :root { color: #111; background: white; }
  .site-header, .skip-link, .site-footer, .breadcrumb, .screen-only, .chapter-toc,
  .notebook-inputs, .notebook-actions, .sequence-header button, .remove-chapter, .library,
  .notebook-app .status-line, .storage-state, .advice-details { display: none; }
  .print-only { display: block; }
  .wrap { width: 100%; }
  .document-intro { padding-block: 0 10pt; }
  .document-intro h1, .notebook-paper h2, .static-notebook h2 { font-size: 21pt; }
  .advice-wrap { margin-bottom: 14pt; }
  .notice {
    display: block;
    border: 1px solid #aaa;
    background: white;
    padding: 7pt;
    break-inside: avoid;
  }
  .notice-symbol { display: none; }
  .advice-print { margin: 4pt 0 0; padding-left: 12pt; }
  .advice-print a { overflow-wrap: anywhere; }
  .advice-print a::after { content: " (" attr(href) ")"; font-size: .82em; font-weight: 400; }
  .chapter-body, .directory, .notebook-surface { padding-bottom: 0; }
  .static-notebook, .notebook-surface .notebook-paper { display: block; }
  .notebook-surface .notebook-paper, .notebook-surface .static-notebook {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: white;
  }
  .notebook-content { margin-top: 10pt; }
  .reading-sequence > li { grid-template-columns: 24px 1fr; }
  .plan-block h3, .notebook-content h3 { break-after: avoid; }
  .notebook-references li { break-inside: avoid; }
  .print-url { color: #444; font-size: .82em; overflow-wrap: anywhere; }
}
