:root {
  --paper: #f3f1eb;
  --paper-2: #faf9f6;
  --ink: #1d2522;
  --muted: #69716d;
  --line: #d8d7d1;
  --accent: #285d4b;
  --accent-soft: #dfe9e3;
  --sidebar: #ebe9e2;
  --max: 1480px;
  --reading: 760px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

img {
  display: block;
  max-width: 100%;
}

button, input { font: inherit; }

.site-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 38px 28px 32px;
}

.site-mark {
  display: grid;
  gap: 2px;
  text-decoration: none;
  margin-bottom: 30px;
}

.site-mark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.72rem;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.site-mark > span:last-child {
  margin-top: 7px;
  font-size: .82rem;
  color: var(--muted);
}

.site-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
}

.search-label {
  display: block;
  margin-bottom: 7px;
  font-size: .76rem;
  font-weight: 700;
}

.note-search {
  width: 100%;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  outline: none;
}

.note-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 93, 75, .12);
}

.filter-group {
  margin-top: 28px;
}

.filter-group h2 {
  margin: 0 0 8px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.filter-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 5px 7px;
  margin: 1px 0;
  border-radius: 7px;
  cursor: pointer;
  color: #3f4743;
  font-size: .9rem;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--paper-2);
  color: var(--accent);
}

.filter-button.is-active {
  font-weight: 700;
}

.sidebar-links {
  display: grid;
  gap: 7px;
  padding-top: 26px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.sidebar-links a {
  font-size: .86rem;
  text-decoration: none;
}

.sidebar-links a:hover { text-decoration: underline; }

.sidebar-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
}

.main-content {
  min-width: 0;
  padding: 58px clamp(28px, 5vw, 78px) 80px;
}

.archive-header {
  max-width: 870px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.archive-header h1 {
  max-width: 760px;
  margin: 7px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .99;
}

.archive-intro {
  max-width: 720px;
  margin: 0;
  font-size: 1.07rem;
  color: #4f5853;
}

.archive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 27px 0 18px;
  color: var(--muted);
  font-size: .85rem;
}

.archive-toolbar p { margin: 0; }

.clear-filters {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 3px 0;
}

.clear-filters:hover { text-decoration: underline; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
}

.note-card {
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(24, 34, 30, .07);
}

.note-card[hidden] { display: none !important; }

.note-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfe3df;
}

.note-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 3rem;
  color: var(--accent);
}

.note-card-body {
  padding: 23px 24px 21px;
}

.note-meta,
.post-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.note-card h2 {
  margin: 10px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.note-card h2 a { text-decoration: none; }
.note-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.note-card-body > p {
  margin: 0;
  color: #525b57;
  font-size: .94rem;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 19px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
}

.no-results {
  margin-top: 35px;
  color: var(--muted);
}

.sidebar-toggle { display: none; }

.post {
  max-width: 1040px;
}

.post-header {
  max-width: 850px;
}

.back-link {
  display: inline-block;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: .86rem;
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

.post-header h1 {
  margin: 12px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2.65rem, 5.7vw, 5.5rem);
  letter-spacing: -.048em;
  line-height: .98;
}

.post-deck {
  max-width: 780px;
  margin: 0;
  color: #4d5752;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.55;
}

.post-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 23px;
  color: var(--muted);
  font-size: .82rem;
}

.post-hero {
  max-width: 960px;
  margin: 42px 0 48px;
}

.post-hero img {
  width: 100%;
  max-height: 570px;
  object-fit: cover;
  border-radius: var(--radius);
}

.post-body {
  max-width: var(--reading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.77;
}


.post-body h2,
.post-body h3 {
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.post-body h2 {
  margin: 2.5em 0 .7em;
  font-size: 2rem;
}

.post-body h3 {
  margin: 2.2em 0 .65em;
  font-size: 1.55rem;
}

.post-body a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.post-body ul,
.post-body ol {
  padding-left: 1.35em;
}

.post-body li {
  margin: .35em 0;
}

.post-body blockquote {
  margin: 1.8em 0;
  padding: 1px 0 1px 22px;
  border-left: 3px solid var(--accent);
  color: #4a554f;
}

.post-body img {
  width: 100%;
  height: auto;
  margin: 2.2em 0 .7em;
  border-radius: 14px;
  background: #e3e5e1;
}

.post-body em {
  color: #4f5b55;
}

.post-footer {
  max-width: var(--reading);
  margin-top: 55px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-tags-label {
  margin: 0 0 10px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: .78rem;
}

.post-disclaimer {
  margin-top: 24px;
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 1050px) {
  .site-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar-inner { padding-left: 22px; padding-right: 22px; }
  .notes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar-toggle {
    display: inline-flex;
    position: fixed;
    z-index: 30;
    left: 16px;
    top: 14px;
    gap: 7px;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(250, 249, 246, .94);
    color: var(--ink);
    box-shadow: 0 4px 16px rgba(24, 34, 30, .08);
  }

  .site-shell { display: block; }

  .sidebar {
    position: fixed;
    z-index: 25;
    inset: 0 auto 0 0;
    width: min(86vw, 330px);
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: 12px 0 35px rgba(22, 30, 27, .12);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-inner {
    position: static;
    max-height: 100vh;
    padding-top: 68px;
  }

  .main-content {
    padding: 78px 20px 62px;
  }

  .archive-header h1,
  .post-header h1 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .notes-grid { gap: 20px; }
  .note-card-body { padding: 20px; }
  .post-hero { margin: 30px 0 36px; }
  .post-body { font-size: 1.03rem; }
}

/* Editorial system — V4 */
.content-column {
  min-width: 0;
}

/* Signature editorial element: one Idea central per note, without card styling. */
.idea-central {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  margin: 3em 0 3.15em;
  padding: 18px 0 20px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.idea-central-label {
  margin: 2px 0 0;
  color: var(--accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.idea-central-text {
  margin: 0;
  color: #33403b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.58;
}

.post-body h2 {
  padding-top: .15em;
}

.post-body h3 {
  margin-top: 1.8em;
  font-size: 1.32rem;
}

/* Horizontal rules are not part of the normal editorial vocabulary. */
.post-body hr {
  margin: 3em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.note-figure {
  margin: 2.6em 0 2.8em;
}

.note-figure img {
  margin: 0;
  width: 100%;
  border-radius: 14px;
  background: #e3e5e1;
}

.note-figure figcaption,
.post-hero figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .78rem;
  line-height: 1.5;
}

.zoomable-image {
  cursor: zoom-in;
}

.zoomable-image:focus-visible {
  outline: 3px solid rgba(40, 93, 75, .35);
  outline-offset: 4px;
}

.section-label {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.recommended-citation,
.related-notes,
.post-tags-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.recommended-citation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.recommended-citation h2,
.related-notes h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.citation-text {
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.65;
}

.citation-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}

.citation-copy {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: .76rem;
}

.citation-copy:hover {
  border-color: var(--accent);
}

.citation-copy:focus-visible {
  outline: 3px solid rgba(40, 93, 75, .2);
  outline-offset: 2px;
}

.citation-status {
  display: block;
  min-height: 1.2em;
  margin-top: 5px;
  color: var(--accent);
  font-size: .72rem;
}

.related-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.related-note {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.related-note-meta {
  margin: 0;
  color: var(--accent);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.related-note h3 {
  margin: 7px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.24;
}

.related-note h3 a {
  text-decoration: none;
}

.related-note h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.related-note > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.post-editorial-meta {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}

.post-editorial-meta p {
  margin: 6px 0;
}

.post-exit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
}

.post-exit-links a {
  color: var(--accent);
  font-size: .82rem;
  text-decoration: none;
}

.post-exit-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  margin: 0 clamp(28px, 5vw, 78px);
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.site-footer-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.site-footer-author {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer-links a {
  color: var(--accent);
  font-size: .82rem;
  text-decoration: none;
}

.site-footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-note {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.55;
}

/* Full-screen teaching view for figures and hero images. */
.image-lightbox {
  width: min(96vw, 1700px);
  height: min(94vh, 1100px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #101412;
  color: #f7f7f4;
  overflow: hidden;
}

.image-lightbox::backdrop {
  background: rgba(8, 11, 10, .88);
}

.image-lightbox-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.image-lightbox-counter {
  color: rgba(255, 255, 255, .7);
  font-size: .78rem;
}

.image-lightbox-close,
.image-lightbox-nav {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.image-lightbox-close {
  width: 38px;
  height: 38px;
  font-size: 1.85rem;
  line-height: 1;
}

.image-lightbox-stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  height: calc(100% - 54px);
  min-height: 0;
  align-items: stretch;
}

.image-lightbox-nav {
  align-self: stretch;
  font-size: 2.5rem;
  opacity: .75;
}

.image-lightbox-nav:hover {
  background: rgba(255, 255, 255, .06);
  opacity: 1;
}

.image-lightbox-figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 18px 12px 14px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.image-lightbox-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  align-self: center;
  justify-self: center;
}

.image-lightbox-figure figcaption {
  width: min(100%, 1080px);
  max-height: 18vh;
  margin: 12px 0 0;
  padding: 0 10px 2px;
  overflow: auto;
  color: rgba(255, 255, 255, .8);
  font-size: .8rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 760px) {
  .site-footer {
    margin: 0 20px;
    padding: 28px 0 34px;
  }

  .site-footer-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-links {
    justify-content: flex-start;
  }

  .idea-central {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 2.5em 0;
    padding: 15px 0 17px;
  }

  .idea-central-text {
    font-size: 1.08rem;
  }

  .recommended-citation-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .related-notes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .image-lightbox {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .image-lightbox-stage {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .image-lightbox-nav {
    font-size: 2rem;
  }

  .image-lightbox-figure {
    padding-left: 4px;
    padding-right: 4px;
  }
}
