:root {
  --paper: #f4f0e6;
  --paper-deep: #e8dfcf;
  --ink: #292b27;
  --muted: #68675f;
  --berry: #8c3142;
  --moss: #536049;
  --blue: #52717d;
  --gold: #b48a42;
  --rule: rgba(41, 43, 39, 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif;
  --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(82, 113, 125, 0.055) 31px, rgba(82, 113, 125, 0.055) 32px),
    var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.27;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--berry); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  min-height: 74px;
  padding: 14px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--ink);
  background: rgba(244, 240, 230, 0.94);
}

.home-mark {
  justify-self: start;
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.header-note {
  justify-self: center;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  height: 1px;
  margin: 6px 0;
  background: currentColor;
}

.site-nav {
  justify-self: end;
  display: flex;
  gap: 24px;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.site-nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-color: currentColor; }

.masthead {
  position: relative;
  min-height: min(790px, calc(100vh - 74px));
  overflow: hidden;
  padding: clamp(36px, 5vw, 78px) clamp(20px, 6vw, 92px) 56px;
  border-bottom: 1px solid var(--ink);
}

.masthead-title {
  position: relative;
  z-index: 2;
  width: min-content;
  max-width: 100%;
  margin: 0;
  color: var(--berry);
  font-family: var(--hand);
  font-size: clamp(4rem, 12vw, 10.5rem);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.masthead-kicker {
  position: absolute;
  top: 44px;
  right: clamp(20px, 6vw, 92px);
  width: 170px;
  padding-top: 8px;
  border-top: 2px solid var(--gold);
  font-family: var(--sans);
  font-size: 0.7rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.masthead-photo {
  position: absolute;
  top: 190px;
  right: 9vw;
  width: clamp(300px, 38vw, 560px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 42%;
  border: 10px solid #f9f5ec;
  box-shadow: 0 16px 32px rgba(41, 43, 39, 0.18);
  transform: rotate(2.2deg);
}

.masthead-intro {
  position: absolute;
  left: clamp(20px, 9vw, 140px);
  bottom: 64px;
  z-index: 3;
  width: min(430px, 43vw);
  padding: 24px 28px 22px;
  color: #f8f4ea;
  background: var(--moss);
  box-shadow: 8px 8px 0 var(--gold);
  transform: rotate(-1deg);
}
.masthead-intro p { margin: 0; font-size: clamp(1.04rem, 2vw, 1.35rem); line-height: 1.5; }
.masthead-intro strong { font-family: var(--hand); font-size: 1.2em; }

.side-note {
  position: absolute;
  right: 4.5vw;
  bottom: 42px;
  width: 190px;
  color: var(--berry);
  font-family: var(--hand);
  font-size: 0.92rem;
  line-height: 1.45;
  transform: rotate(4deg);
}
.side-note::before { content: "\2197"; display: block; font-size: 2rem; }

.journal-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
  border-bottom: 1px solid var(--ink);
}

.letter {
  padding: clamp(56px, 8vw, 116px) clamp(24px, 9vw, 150px);
}
.letter-inner { max-width: 760px; }
.letter h2 {
  margin: 0 0 24px;
  font-family: var(--hand);
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1;
  transform: rotate(-1deg);
}
.letter .lead { font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.55; }
.letter-signoff { margin-top: 28px; color: var(--berry); font-family: var(--hand); font-size: 1.5rem; }

.margin-index {
  padding: 64px clamp(24px, 4vw, 54px);
  border-left: 1px solid var(--ink);
  background: rgba(232, 223, 207, 0.58);
}
.margin-index h2,
.margin-index h3 {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.margin-index ul { margin: 0 0 52px; padding: 0; list-style: none; }
.margin-index li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.margin-index .years { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.margin-index .years a { font-family: var(--hand); font-size: 1.4rem; text-decoration: none; }
.mini-note { color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.practice-ledger {
  padding: clamp(64px, 9vw, 120px) clamp(22px, 7vw, 110px);
  background: #efe8da;
  border-bottom: 1px solid var(--ink);
}
.section-label {
  margin: 0 0 14px;
  color: var(--berry);
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.practice-heading {
  max-width: 860px;
  margin: 0 0 64px;
  font-size: clamp(2.35rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1.04;
}
.ledger {
  max-width: 1120px;
  margin: 0 auto;
  border-top: 2px solid var(--ink);
}
.ledger-row {
  display: grid;
  grid-template-columns: 62px minmax(190px, 0.8fr) minmax(240px, 1.7fr);
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-number { color: var(--berry); font-family: var(--hand); font-size: 1.3rem; }
.ledger-row h3 { margin: 0; font-size: 1.22rem; font-weight: 600; }
.ledger-row p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.community-note {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  min-height: 440px;
  border-bottom: 1px solid var(--ink);
}
.community-photo { min-height: 440px; width: 100%; height: 100%; object-fit: cover; }
.community-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 6vw, 86px);
  color: #f7f0e5;
  background: var(--berry);
}
.community-copy h2 { margin: 0 0 20px; font-family: var(--hand); font-size: clamp(2.1rem, 4vw, 3.7rem); line-height: 1.1; }
.community-copy p { max-width: 480px; margin: 0 0 22px; }
.community-links { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: end;
  padding: 46px clamp(20px, 6vw, 90px);
  color: #eee7da;
  background: var(--ink);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.7;
}
.site-footer a { color: inherit; }
.footer-brand { font-family: var(--hand); font-size: 1.5rem; }
.footer-center { text-align: center; }
.footer-right { text-align: right; }

.page-shell { width: min(1380px, 100%); margin: 0 auto; }
.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 50px;
  align-items: end;
  padding: clamp(64px, 8vw, 120px) clamp(22px, 7vw, 108px) 58px;
  border-bottom: 1px solid var(--ink);
}
.page-intro h1 { max-width: 820px; margin: 0; font-size: clamp(3.1rem, 7.5vw, 7rem); font-weight: 400; line-height: 0.95; }
.page-intro p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.page-intro .scribble { color: var(--berry); font-family: var(--hand); font-size: clamp(1.2rem, 2vw, 1.75rem); transform: rotate(-2deg); }

.journal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.23fr) minmax(0, 1fr);
}
.journal-rail {
  padding: 52px 32px 80px clamp(22px, 5vw, 70px);
  border-right: 1px solid var(--ink);
}
.journal-rail { position: sticky; top: 0; align-self: start; }
.journal-rail h2 { margin: 0 0 16px; font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; }
.journal-rail a { display: block; padding: 6px 0; text-decoration: none; }
.journal-rail a:hover { padding-left: 5px; }

.post-diary { padding: 54px clamp(22px, 6vw, 88px) 100px; }
.post-entry {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(260px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: 42px 0 58px;
  border-bottom: 1px solid var(--rule);
}
.post-entry:nth-child(even) { grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.65fr); }
.post-entry:nth-child(even) .post-visual { order: 2; transform: rotate(1.2deg); }
.post-entry:nth-child(odd) .post-visual { transform: rotate(-1.2deg); }
.post-visual {
  min-height: 220px;
  aspect-ratio: 4 / 3;
  border: 7px solid #faf7ef;
  background: var(--paper-deep);
  box-shadow: 5px 7px 0 rgba(41, 43, 39, 0.15);
}
.post-visual img { width: 100%; height: 100%; object-fit: cover; }
.post-visual.placeholder { display: grid; place-items: center; color: var(--berry); font-family: var(--hand); font-size: 2rem; }
.post-date { margin: 0 0 10px; color: var(--berry); font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; }
.post-entry h2 { margin: 0 0 16px; font-size: clamp(1.8rem, 3.6vw, 3.25rem); font-weight: 400; line-height: 1.08; }
.post-entry h2 a { text-decoration: none; }
.post-entry p { margin: 0 0 18px; color: var(--muted); }
.read-link { font-family: var(--sans); font-size: 0.74rem; text-transform: uppercase; }

.article-shell { width: min(1180px, 100%); margin: 0 auto; }
.article-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 760px);
  gap: 40px;
  padding: clamp(64px, 9vw, 130px) clamp(22px, 6vw, 80px) 52px;
}
.article-date { padding-top: 14px; color: var(--berry); font-family: var(--sans); font-size: 0.72rem; line-height: 1.5; text-transform: uppercase; }
.article-header h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.2rem); font-weight: 400; line-height: 0.98; }
.article-author { margin: 24px 0 0; color: var(--muted); font-style: italic; }
.article-rule { width: min(1010px, calc(100% - 44px)); margin: 0 auto; border: 0; border-top: 1px solid var(--ink); }
.article-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 700px) minmax(120px, 0.22fr);
  gap: clamp(25px, 5vw, 64px);
  padding: 58px clamp(22px, 5vw, 64px) 110px;
}
.article-side { color: var(--muted); font-family: var(--hand); font-size: 0.92rem; line-height: 1.55; }
.article-side.right { padding-top: 220px; transform: rotate(2deg); }
.article-body { min-width: 0; font-size: 1.08rem; }
.article-body p { margin: 0 0 1.45em; }
.article-body p:first-child::first-letter { float: left; margin: 0.05em 0.1em 0 0; color: var(--berry); font-size: 4.2rem; line-height: 0.8; }
.article-body h1,
.article-body h2,
.article-body h3 { margin: 1.8em 0 0.65em; line-height: 1.15; }
.article-body img { width: calc(100% + 80px); max-width: none; margin: 44px 0 44px -40px; border: 8px solid #faf7ef; box-shadow: 8px 10px 0 rgba(41, 43, 39, 0.14); transform: rotate(-0.7deg); }
.article-body li { margin-bottom: 0.5em; }
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.article-nav a { min-height: 150px; padding: 32px clamp(22px, 5vw, 70px); text-decoration: none; }
.article-nav a + a { border-left: 1px solid var(--ink); text-align: right; }
.article-nav small { display: block; margin-bottom: 8px; color: var(--berry); font-family: var(--sans); font-size: 0.68rem; text-transform: uppercase; }

.policy-page { width: min(980px, calc(100% - 44px)); margin: 0 auto; padding: 80px 0 110px; }
.policy-page h1 { margin: 0 0 18px; font-size: clamp(3rem, 7vw, 6rem); font-weight: 400; line-height: 1; }
.policy-page .policy-intro { margin-bottom: 60px; color: var(--berry); font-family: var(--hand); }
.policy-list { padding: 0; list-style: none; counter-reset: policy; border-top: 2px solid var(--ink); }
.policy-list li { counter-increment: policy; display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.policy-list li::before { content: counter(policy, decimal-leading-zero); color: var(--berry); font-family: var(--hand); }

.not-found { min-height: 70vh; display: grid; place-items: center; padding: 50px 22px; text-align: center; }
.not-found h1 { margin: 0; color: var(--berry); font-family: var(--hand); font-size: clamp(4rem, 14vw, 10rem); font-weight: 500; }
.not-found p { max-width: 520px; }

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-note { display: none; }
  .masthead { min-height: 760px; }
  .masthead-photo { top: 230px; right: 5vw; width: 52vw; }
  .masthead-intro { width: 52vw; }
  .side-note { display: none; }
  .journal-band { grid-template-columns: 1fr 250px; }
  .community-note { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: 130px minmax(0, 1fr); }
  .article-side.right { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .site-header { min-height: 62px; padding: 10px 18px; }
  .home-mark { font-size: 0.9rem; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px 18px 18px;
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: 10px 0; }
  .masthead { min-height: 720px; padding: 28px 18px 40px; }
  .masthead-title { font-size: clamp(3.8rem, 19vw, 5rem); line-height: 0.86; }
  .masthead-kicker { top: 232px; left: 22px; right: auto; width: 145px; }
  .masthead-photo { top: 275px; right: -22px; width: 76vw; max-height: 330px; }
  .masthead-intro { left: 18px; bottom: 36px; width: calc(100% - 54px); padding: 18px 20px; }
  .journal-band { grid-template-columns: 1fr; }
  .letter { padding: 64px 22px; }
  .margin-index { border-top: 1px solid var(--ink); border-left: 0; padding: 48px 22px; }
  .margin-index ul { margin-bottom: 36px; }
  .practice-ledger { padding: 64px 22px; }
  .practice-heading { margin-bottom: 42px; }
  .ledger-row { grid-template-columns: 42px 1fr; gap: 12px; }
  .ledger-row p { grid-column: 2; }
  .community-note { grid-template-columns: 1fr; }
  .community-photo { min-height: 300px; max-height: 390px; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  .footer-center, .footer-right { text-align: left; }
  .page-intro { grid-template-columns: 1fr; gap: 26px; padding: 58px 22px 36px; }
  .journal-layout { grid-template-columns: 1fr; }
  .journal-rail { position: static; display: flex; gap: 18px; padding: 22px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .journal-rail h2 { flex: 0 0 auto; margin: 8px 0 0; }
  .journal-rail a { flex: 0 0 auto; }
  .post-diary { padding: 18px 22px 70px; }
  .post-entry,
  .post-entry:nth-child(even) { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 46px; }
  .post-entry:nth-child(even) .post-visual { order: 0; }
  .post-visual { min-height: 0; }
  .article-header { grid-template-columns: 1fr; gap: 14px; padding: 58px 22px 38px; }
  .article-date { padding: 0; }
  .article-grid { grid-template-columns: 1fr; gap: 24px; padding: 40px 22px 72px; }
  .article-side { display: none; }
  .article-body img { width: calc(100% + 20px); margin-left: -10px; border-width: 5px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a { min-height: 120px; }
  .article-nav a + a { border-top: 1px solid var(--ink); border-left: 0; text-align: left; }
  .policy-list li { grid-template-columns: 40px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
