.source-header-nav { display: flex; gap: 1.5rem; }
.source-header-nav a { font-size: .84rem; font-weight: 700; text-decoration: none; }
.source-header-nav a:hover, .source-header-nav a:focus-visible { color: var(--orange); }

.source-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .65fr);
  gap: 7vw;
  padding: 7rem max(6vw, 42px) 5rem;
  border-bottom: 1px solid var(--rule);
}
.source-hero > * { min-width: 0; }
.source-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 6vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1;
}
.source-intro { max-width: 760px; margin: 2rem 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.source-principle { align-self: end; padding: 2rem; border: 1px solid var(--ink); background: rgba(255,255,255,.28); }
.source-principle p { margin: 0; }
.source-principle-label { margin-bottom: 1rem !important; color: var(--orange); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.source-date { margin-top: 1.5rem !important; color: var(--ink-soft); font-size: .78rem; }

.source-tools {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: 1.1rem max(6vw, 42px);
  border-bottom: 1px solid var(--rule);
  background: rgba(244,239,228,.97);
}
.search-field span { display: block; margin-bottom: .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.search-field input { width: 100%; padding: .85rem 1rem; border: 1px solid rgba(17,44,67,.35); border-radius: 0; background: #fffdf8; color: var(--ink); font: inherit; }
.search-field input:focus { outline: 2px solid var(--orange); outline-offset: 2px; }
.source-actions { display: flex; gap: .75rem; align-items: center; }
.source-actions button, .source-actions a { min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.source-actions button:hover, .source-actions button:focus-visible, .source-actions a:hover, .source-actions a:focus-visible { border-color: var(--orange); color: var(--orange); }

.source-layout { display: grid; grid-template-columns: minmax(210px, .28fr) minmax(0, 1fr); gap: 5vw; padding: 4rem max(6vw, 42px) 8rem; }
.chapter-panel { align-self: start; position: sticky; top: 190px; max-height: calc(100vh - 220px); overflow: auto; padding-right: 1rem; }
.chapter-panel > p { margin: 0 0 1rem; color: var(--orange); font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.chapter-panel nav { display: grid; }
.chapter-panel a { padding: .55rem 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-size: .76rem; line-height: 1.35; text-decoration: none; }
.chapter-panel a:hover, .chapter-panel a:focus-visible { color: var(--orange); }

.source-chapter { scroll-margin-top: 190px; margin-bottom: 5rem; }
.source-chapter h2 { margin: 0 0 2rem; font-family: var(--serif); font-size: clamp(2rem, 3.8vw, 3.7rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.1; }
.note-card { scroll-margin-top: 190px; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 1.4rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.note-number { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--orange); color: var(--orange); font-family: var(--serif); }
.note-body { min-width: 0; }
.note-body p { margin: 0; overflow-wrap: anywhere; }
.note-body a { color: var(--orange); text-underline-offset: 3px; }
.note-link { margin-top: .8rem !important; }
.note-link button { padding: 0; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: .72rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.note-link button:hover, .note-link button:focus-visible { color: var(--orange); }
.search-empty { padding: 3rem; border: 1px solid var(--rule); font-family: var(--serif); font-size: 1.2rem; }
.loading { color: var(--ink-soft); }
.source-footer { display: flex; justify-content: space-between; gap: 3rem; padding: 2.5rem max(6vw, 42px); background: var(--ink); color: #d6e1e8; font-size: .78rem; }
.source-footer p { margin: 0; max-width: 620px; }

@media (max-width: 900px) {
  .source-hero, .source-layout { grid-template-columns: 1fr; }
  .source-principle { margin-top: 1rem; }
  .chapter-panel { position: static; max-height: none; padding: 0; }
  .chapter-panel nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .source-tools { top: 72px; grid-template-columns: 1fr; }
  .source-actions { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .site-header { min-height: 72px; padding: .8rem 1.2rem; }
  .site-header .brand { min-width: 0; }
  .brand-series { display: none; }
  .source-header-nav { gap: .8rem; }
  .source-header-nav a { font-size: .72rem; }
  .source-header-nav a:last-child { display: none; }
  .source-hero, .source-tools, .source-layout, .source-footer { width: 100%; max-width: 100%; min-width: 0; }
  .source-hero { padding: 4.5rem 1.2rem 3rem; }
  .source-hero h1 { max-width: 100%; font-size: clamp(2.8rem, 13vw, 4.2rem); overflow-wrap: anywhere; }
  .source-intro, .source-principle { width: 100%; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
  .source-tools { padding: 1rem 1.2rem; }
  .source-actions > * { width: 100%; text-align: center; }
  .source-layout { padding: 2.5rem 1.2rem 5rem; }
  .chapter-panel nav { grid-template-columns: 1fr; }
  .note-card { grid-template-columns: 38px minmax(0, 1fr); gap: .8rem; }
  .note-number { width: 34px; height: 34px; }
  .source-footer { display: grid; padding: 2rem 1.2rem; }
}

@media print {
  .site-header, .source-tools, .chapter-panel, .note-link { display: none !important; }
  body { background: white; font-size: 10.5pt; }
  .source-hero { display: block; padding: 0 0 2rem; }
  .source-principle { margin-top: 1.5rem; break-inside: avoid; }
  .source-layout { display: block; padding: 2rem 0; }
  .source-chapter { break-before: page; }
  .source-chapter:first-child { break-before: auto; }
  .note-card { break-inside: avoid; }
  .source-footer { background: white; color: var(--ink); padding: 2rem 0 0; border-top: 1px solid var(--ink); }
}
