/* ==========================================================================
   Dr. Hassan Saeed — "Ledger" theme
   A law-journal / broadsheet system: warm paper, ink, one sealing-wax accent.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #f2ede3;
  --paper-2: #e9e2d4;
  --ink: #1b1814;
  --ink-2: #4a443b;
  --ink-3: #6f675b;
  --rule: #1b1814;
  --rule-soft: #cfc6b5;
  --seal: #8f1f17;
  --seal-ink: #f2ede3;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --label: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;

  --fs-label: 0.78rem;
  --fs-small: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --fs-body: clamp(1.06rem, 1rem + 0.3vw, 1.22rem);
  --fs-lg: clamp(1.4rem, 1.15rem + 1vw, 1.95rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-xxl: clamp(2.6rem, 1.2rem + 5vw, 5.8rem);
  --fs-mast: clamp(3.4rem, 1rem + 11vw, 11.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --measure: 38rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14120f; --paper-2: #1d1a16;
    --ink: #ece5d6; --ink-2: #bdb4a4; --ink-3: #958c7e;
    --rule: #ece5d6; --rule-soft: #3a352d;
    --seal: #d8664f; --seal-ink: #14120f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14120f; --paper-2: #1d1a16;
  --ink: #ece5d6; --ink-2: #bdb4a4; --ink-3: #958c7e;
  --rule: #ece5d6; --rule-soft: #3a352d;
  --seal: #d8664f; --seal-ink: #14120f;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--seal); color: var(--seal-ink); }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.label {
  font-family: var(--label);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-variant-numeric: lining-nums tabular-nums;
}
.label a:hover { color: var(--ink); }
.label .seal, .seal { color: var(--seal); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; font-family: var(--label); }
.skip:focus { left: 8px; }

.u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s;
  padding-bottom: 1px;
}
a:hover .u, a:focus-visible .u, a.u:hover { background-size: 100% 1px; }

.more {
  display: inline-flex; gap: 10px; align-items: baseline;
  margin-top: 22px;
  font-family: var(--label); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
}
.more .arr { transition: transform 0.3s var(--ease); display: inline-block; }
.more:hover .arr { transform: translateX(5px); }

/* ---------- Top strip / navigation ---------- */
.strip {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.strip-left { display: flex; gap: 18px; align-items: center; min-width: 0; }
.wordmark { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark i { color: var(--seal); font-weight: 400; margin-right: 0.15em; }
.strip nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 2.4vw, 32px); }
.strip nav a { font-family: var(--label); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-2); }
.strip nav a:hover, .strip nav .current-menu-item > a, .strip nav a[aria-current] { color: var(--ink); }
.strip nav .current-menu-item > a, .strip nav a[aria-current] { box-shadow: inset 0 -1px 0 var(--seal); }
.theme-btn {
  font-family: var(--label); font-size: 0.85rem; color: var(--ink-3);
  background: none; border: 0; padding: 0; cursor: pointer; min-height: 24px;
}
.theme-btn:hover { color: var(--ink); }
@media (max-width: 640px) {
  .strip .place { display: none; }
  .strip:not(.is-home) .theme-btn { display: none; }
  .wordmark { font-size: 1rem; }
  .wordmark i { display: none; }
  .strip nav ul { gap: 12px; }
  .strip nav a { font-size: 0.84rem; }
}
@media (max-width: 380px) { .strip nav ul { gap: 9px; } .strip nav a { font-size: 0.8rem; } }

/* ---------- Masthead (front page) ---------- */
.mast { padding: clamp(28px, 5vw, 64px) 0 0; }
.mast-name {
  font-size: var(--fs-mast);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 60;
  margin-left: -0.05em;
}
.mast-name .dr {
  font-size: 0.22em; letter-spacing: 0; vertical-align: top;
  font-style: italic; color: var(--seal);
  display: inline-block; margin-right: 0.35em; transform: translateY(0.55em);
}
.mast-rule {
  margin-top: clamp(20px, 3vw, 36px);
  border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 4px 0 0;
}
.mast-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; border-top: 1px solid var(--rule); margin: 0; }
.mast-cols > * { padding: 14px 18px 16px 0; border-right: 1px solid var(--rule-soft); }
.mast-cols > * + * { padding-left: 18px; }
.mast-cols > *:last-child { border-right: 0; }
.mast-cols .tag { font-size: var(--fs-lg); line-height: 1.15; font-style: italic; font-weight: 300; font-variation-settings: "opsz" 40; }
.mast-cols dt { margin-bottom: 4px; }
.mast-cols dd { margin: 0; font-size: var(--fs-small); line-height: 1.4; color: var(--ink-2); }
@media (max-width: 900px) {
  .mast-cols { grid-template-columns: 1fr 1fr; }
  .mast-cols .tag-cell { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .mast-cols > *:nth-child(2) { padding-left: 0; }
  .mast-cols > *:nth-child(3) { border-right: 0; }
  .mast-cols > *:nth-child(4) { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--rule-soft); }
}

/* ---------- Page head (inner pages) ---------- */
.page-head {
  padding: clamp(36px, 6vw, 88px) 0 clamp(24px, 3vw, 40px);
  border-bottom: 3px solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(16px, 4vw, 64px); align-items: end;
}
.page-head h1 {
  font-size: var(--fs-xxl); font-weight: 400; line-height: 0.95; letter-spacing: -0.04em;
  font-variation-settings: "opsz" 60;
}
.page-head h1 i { color: var(--seal); font-weight: 300; }
.page-head .intro { margin-top: 16px; max-width: 40rem; font-style: italic; font-weight: 300; font-size: var(--fs-lg); line-height: 1.3; color: var(--ink-2); font-variation-settings: "opsz" 36; }
.page-head .intro p { margin: 0; }
.page-head .kicker { align-self: start; padding-top: 0.6em; }
@media (max-width: 720px) { .page-head { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Lead essay ---------- */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 88px) 0;
  border-bottom: 1px solid var(--rule);
}
.lead-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lead-meta .label:first-child { color: var(--seal); }
.lead h2 { font-size: var(--fs-xl); font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; font-variation-settings: "opsz" 60; margin-bottom: clamp(18px, 2.4vw, 30px); }
.lead h2 a:hover { color: var(--seal); }
.lede { max-width: 34rem; color: var(--ink-2); }
.lede::first-letter, .prose > p:first-child::first-letter {
  float: left; font-size: 4.3em; line-height: 0.82; padding: 0.06em 0.1em 0 0;
  color: var(--seal); font-weight: 500; font-variation-settings: "opsz" 60;
}
.lead figure { margin: 0; align-self: start; }
.plate { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.plate img {
  width: 100%; height: 100%; object-fit: cover; object-position: 38% 30%;
  filter: grayscale(1) contrast(1.08) brightness(1.02);
  mix-blend-mode: multiply;
  transition: filter 0.6s var(--ease);
}
figure:hover > .plate img, a:hover .plate img { filter: grayscale(0.15) contrast(1.02); }
:root[data-theme="dark"] .plate img { mix-blend-mode: normal; opacity: 0.9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plate img { mix-blend-mode: normal; opacity: 0.9; } }
.plate-cap { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 820px) {
  .lead { grid-template-columns: 1fr; }
  .lead figure { order: -1; }
  .lead .plate { aspect-ratio: 3 / 2; }
}

/* ---------- Sections ---------- */
.sec { padding: clamp(44px, 6vw, 92px) 0; border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(16px, 4vw, 64px); margin-bottom: clamp(28px, 4vw, 52px); align-items: baseline;
}
.sec-head h2 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.sec-head p { max-width: 38rem; color: var(--ink-2); font-style: italic; font-weight: 300; font-size: var(--fs-lg); line-height: 1.3; font-variation-settings: "opsz" 36; }
@media (max-width: 720px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- The Article series (grid of numbered articles) ---------- */
.series { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.art {
  position: relative;
  padding: 22px clamp(14px, 2vw, 28px) 28px;
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.art:nth-child(3n + 1) { padding-left: 0; }
.art:nth-child(3n) { border-right: 0; padding-right: 0; }
.art .num {
  font-size: clamp(4.4rem, 2.6rem + 5.5vw, 8rem);
  line-height: 0.8; font-weight: 300; letter-spacing: -0.05em;
  font-variation-settings: "opsz" 60; font-variant-numeric: lining-nums;
  transition: color 0.3s;
}
.art .num small { font-size: 0.17em; letter-spacing: 0.08em; font-family: var(--label); font-weight: 500; text-transform: uppercase; color: var(--ink-3); vertical-align: top; margin-right: 0.5em; display: inline-block; transform: translateY(1.2em); }
.art h3 { font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.5rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.art p { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.5; }
.art .label { margin-top: auto; }
.art a::after { content: ""; position: absolute; inset: 0; }
.art:hover .num, .art:focus-within .num { color: var(--seal); }
@media (max-width: 860px) {
  .series { grid-template-columns: 1fr; }
  .art, .art:nth-child(n) { padding: 22px 0 26px; border-right: 0; display: grid; grid-template-columns: 4.2rem 1fr; column-gap: 18px; }
  .art .num { grid-row: span 3; font-size: 4.2rem; }
  .art .num small { display: none; }
}

/* ---------- Ledger (list of writing) ---------- */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger li { border-bottom: 1px solid var(--rule-soft); }
.ledger a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 11rem 2rem;
  gap: clamp(12px, 2.5vw, 36px);
  padding: 22px 0; align-items: baseline;
  transition: background 0.25s, padding 0.35s var(--ease);
}
.ledger a:hover { background: var(--paper-2); padding-left: 14px; padding-right: 14px; }
.ledger h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.65rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 6px; }
.ledger h3 .no { color: var(--seal); font-variant-numeric: lining-nums; margin-right: 0.3em; }
.ledger a:hover h3 { color: var(--seal); }
.ledger p { font-size: var(--fs-small); color: var(--ink-2); max-width: 44rem; }
.ledger .go { font-family: var(--label); justify-self: end; transition: transform 0.3s var(--ease); }
.ledger a:hover .go { transform: translateX(4px); color: var(--seal); }
.ledger .empty { padding: 28px 0; color: var(--ink-2); font-style: italic; }
@media (max-width: 760px) {
  .ledger a { grid-template-columns: 1fr; gap: 6px; }
  .ledger .go { display: none; }
}

/* ---------- Filters + search (articles page) ---------- */
.filters {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px;
  padding: 18px 0; margin-bottom: clamp(20px, 3vw, 36px);
}
.filters ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.filters ul a { font-family: var(--label); font-size: 0.95rem; font-weight: 500; color: var(--ink-2); padding: 4px 0; display: inline-block; }
.filters ul a:hover { color: var(--ink); }
.filters ul a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--seal); }
.filters ul .count { color: var(--ink-3); font-weight: 400; margin-left: 4px; font-size: 0.85em; }
.search { display: flex; align-items: center; border-bottom: 1px solid var(--rule); min-width: min(320px, 100%); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: var(--serif); font-size: 1.05rem; font-style: italic; padding: 8px 0;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; }
.search:focus-within { border-bottom-color: var(--seal); box-shadow: 0 1px 0 var(--seal); }
.search button { background: none; border: 0; font-family: var(--label); font-weight: 600; font-size: 0.9rem; color: var(--ink); cursor: pointer; padding: 8px 0 8px 12px; min-height: 40px; }

.pagination { display: flex; gap: 6px 18px; flex-wrap: wrap; padding-top: 28px; font-family: var(--label); font-weight: 500; }
.pagination .page-numbers { color: var(--ink-2); padding: 4px 2px; }
.pagination .current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--seal); }
.pagination a:hover { color: var(--ink); }

/* ---------- Quote ---------- */
.quote { padding: clamp(56px, 9vw, 140px) 0; border-bottom: 1px solid var(--rule); }
.quote blockquote { margin: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); }
.quote p { font-size: clamp(1.8rem, 1rem + 3.4vw, 4.2rem); line-height: 1.06; font-weight: 300; letter-spacing: -0.025em; font-variation-settings: "opsz" 60; text-indent: -0.42em; }
.quote p em { font-style: italic; color: var(--seal); }
.quote cite { font-style: normal; display: block; margin-top: 26px; }
.quote cite a { color: var(--ink); }
.quote .mark { font-size: clamp(5rem, 3rem + 6vw, 10rem); line-height: 0.7; color: var(--seal); }
@media (max-width: 720px) { .quote blockquote { grid-template-columns: 1fr; } .quote .mark { display: none; } .quote p { text-indent: 0; } }

/* ---------- Record (author summary) ---------- */
.record { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); }
.record .bio { font-size: var(--fs-lg); line-height: 1.32; letter-spacing: -0.01em; max-width: 46rem; font-variation-settings: "opsz" 36; }
.record dl { margin: clamp(28px, 4vw, 48px) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.record dl > div { padding: 18px 24px 22px 0; border-bottom: 1px solid var(--rule-soft); }
.record dl > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rule-soft); }
.record dt { margin-bottom: 8px; }
.record dd { margin: 0; line-height: 1.45; }
.record dd span { display: block; color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 720px) {
  .record { grid-template-columns: 1fr; }
  .record dl { grid-template-columns: 1fr; }
  .record dl > div:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- Topics ---------- */
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.topic { display: flex; flex-direction: column; gap: 10px; padding: 26px clamp(14px, 2vw, 28px) 30px 0; border-right: 1px solid var(--rule-soft); }
.topic + .topic { padding-left: clamp(14px, 2vw, 28px); }
.topic:last-child { border-right: 0; }
.topic h3 { font-size: var(--fs-xl); font-weight: 400; line-height: 0.95; letter-spacing: -0.035em; font-variation-settings: "opsz" 60; }
.topic h3 i { font-weight: 300; }
.topic p { color: var(--ink-2); font-size: var(--fs-small); }
.topic:hover h3 { color: var(--seal); }
@media (max-width: 820px) {
  .topics { grid-template-columns: 1fr; }
  .topic, .topic + .topic { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--rule-soft); }
}

/* ---------- Document register (resources) ---------- */
.archive-list { list-style: none; margin: 0; padding: 0; counter-reset: doc; border-top: 1px solid var(--rule); }
.archive-list li { counter-increment: doc; border-bottom: 1px solid var(--rule-soft); }
.archive-list a { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 10rem; gap: clamp(12px, 2.5vw, 36px); padding: 20px 0; align-items: baseline; }
.archive-list a::before {
  content: "Doc. " counter(doc, decimal-leading-zero);
  font-family: var(--label); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.archive-list h3 { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); font-weight: 500; line-height: 1.25; }
.archive-list p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 4px; }
.archive-list .kind { justify-self: end; text-align: right; }
.archive-list .kind b { color: var(--seal); font-weight: 600; }
@media (max-width: 720px) {
  .archive-list a { grid-template-columns: 1fr; gap: 4px; }
  .archive-list .kind { justify-self: start; text-align: left; }
}

/* ---------- Two-column links block (about / 404) ---------- */
.index-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.index-links a { padding: 22px 24px 26px 0; border-right: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 8px; }
.index-links a + a { padding-left: 24px; }
.index-links a:last-child { border-right: 0; }
.index-links h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); font-weight: 500; line-height: 1.15; }
.index-links p { color: var(--ink-2); font-size: var(--fs-small); }
.index-links a:hover h3 { color: var(--seal); }
@media (max-width: 760px) {
  .index-links { grid-template-columns: 1fr; }
  .index-links a, .index-links a + a { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--rule-soft); }
}

/* ---------- Single post ---------- */
.post-head {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(16px, 4vw, 64px);
  padding: clamp(36px, 6vw, 88px) 0 clamp(28px, 4vw, 48px);
}
.post-head .side { display: flex; flex-direction: column; gap: 6px; padding-top: 0.5em; }
.post-head .series-tag { color: var(--seal); }
.post-head h1 {
  font-size: var(--fs-xxl); font-weight: 400; line-height: 0.98; letter-spacing: -0.035em;
  font-variation-settings: "opsz" 60; max-width: 18ch; text-wrap: balance;
}
.post-head h1 .no { display: block; font-size: 0.32em; letter-spacing: 0; font-family: var(--label); font-weight: 500; text-transform: uppercase; color: var(--seal); margin-bottom: 0.9em; }
.post-head .meta { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 720px) { .post-head { grid-template-columns: 1fr; gap: 14px; } .post-head .side { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; padding-top: 0; } }

.post-plate { margin: 0 0 clamp(36px, 5vw, 64px); border-top: 3px solid var(--rule); padding-top: 4px; }
.post-plate .frame { border-top: 1px solid var(--rule); padding-top: clamp(14px, 2vw, 22px); }
.post-plate img { width: 100%; max-height: 78vh; object-fit: cover; background: var(--paper-2); }
.post-plate figcaption { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; }
.post-rule { border: 0; border-top: 3px solid var(--rule); margin: 0 0 clamp(36px, 5vw, 64px); }

.post-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); }
.post-body .aside { position: relative; }
.post-body .aside .sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.post-body .aside .label { display: block; }
@media (max-width: 900px) { .post-body { grid-template-columns: 1fr; } .post-body .aside { display: none; } }

/* Long-form prose: styles WordPress block content as it comes */
.prose { max-width: var(--measure); font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.28rem); line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose > p:first-child { display: flow-root; }
.prose > p:first-child::first-letter { font-size: 3.9em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--seal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--seal); }
.prose sup { font-size: 0.65em; line-height: 0; }
.prose em { font-style: italic; }
.prose strong { font-weight: 650; }
.prose h2, .prose h3, .prose h4 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin-top: 1.8em; }
.prose h2 { font-size: 1.5em; } .prose h3 { font-size: 1.25em; }
.prose hr { border: 0; text-align: center; margin: 2.2em 0; }
.prose hr::before { content: "§"; color: var(--seal); font-size: 1.2em; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 2px solid var(--seal); font-style: italic; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose figure { margin: 2em 0; }
.prose figure img { background: var(--paper-2); }
.prose figcaption, .prose .wp-element-caption {
  margin-top: 10px; font-family: var(--label); font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); line-height: 1.45;
}
.prose .wp-block-image.size-full img { width: auto; }
.prose .is-resized img { width: auto; }
.prose .aligncenter, .prose .aligncenter img { margin-left: auto; margin-right: auto; }
@media (min-width: 1100px) {
  .prose > figure.wp-block-image.size-large, .prose > .wp-block-columns { margin-right: -10rem; }
}
/* Columns blocks (classic themes also receive core block CSS; this keeps preview + theme consistent) */
.prose .wp-block-columns { display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: flex-start; margin: 1.6em 0; }
.prose .wp-block-column { flex: 1 1 0; min-width: 0; }
.prose .wp-block-column[style*="flex-basis"] { flex-grow: 0; }
.prose .wp-block-column > * + * { margin-top: 1.1em; }
.prose .wp-block-column > figure:first-child { margin-top: 0; }
@media (max-width: 781px) {
  .prose .wp-block-columns { flex-direction: column; }
  .prose .wp-block-column, .prose .wp-block-column[style*="flex-basis"] { flex-basis: 100% !important; width: 100%; }
}
/* Links to PDF documents render as document slips */
.prose a[href$=".pdf"] {
  display: inline-flex; align-items: baseline; gap: 12px;
  padding: 12px 18px 12px 14px; border: 1px solid var(--rule); text-decoration: none;
  font-family: var(--label); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
.prose a[href$=".pdf"]::before { content: "PDF"; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--seal); }
.prose a[href$=".pdf"]::after { content: "↓"; font-weight: 400; }
.prose a[href$=".pdf"]:hover { background: var(--ink); color: var(--paper); }
.prose p:has(> a[href$=".pdf"]:only-child) + p:has(> a[href$=".pdf"]:only-child) { margin-top: 10px; }

/* Series navigator on article pages */
.series-nav { margin-top: clamp(48px, 6vw, 80px); border-top: 3px solid var(--rule); padding-top: 4px; }
.series-nav .inner { border-top: 1px solid var(--rule); padding-top: 18px; }
.series-nav ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border-left: 1px solid var(--rule-soft); }
.series-nav li { border-right: 1px solid var(--rule-soft); }
.series-nav ol a {
  display: block; text-align: center; padding: 10px 0 8px;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); font-weight: 300; line-height: 1; font-variant-numeric: lining-nums;
  transition: background 0.2s, color 0.2s;
}
.series-nav ol a:hover { background: var(--paper-2); color: var(--seal); }
.series-nav ol a[aria-current] { background: var(--ink); color: var(--paper); }
.series-nav .titles { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.series-nav .titles span:last-child { text-align: right; }
.series-nav .titles a:hover { color: var(--seal); }
@media (max-width: 560px) { .series-nav ol { grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule-soft); } .series-nav li { border-bottom: 1px solid var(--rule-soft); } }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); margin-top: clamp(48px, 6vw, 80px); }
.post-nav a { padding: 22px 24px 26px 0; display: flex; flex-direction: column; gap: 8px; }
.post-nav a + a, .post-nav .next { padding-left: 24px; border-left: 1px solid var(--rule-soft); text-align: right; align-items: flex-end; }
.post-nav h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); font-weight: 500; line-height: 1.2; }
.post-nav a:hover h3 { color: var(--seal); }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a + a, .post-nav .next { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule-soft); text-align: left; align-items: flex-start; }
}

/* ---------- About ---------- */
.about-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); padding: clamp(36px, 5vw, 72px) 0; border-bottom: 1px solid var(--rule); }
.about-body .prose { max-width: none; }
.about-body .prose > .wp-block-columns { margin: 0; margin-right: 0; gap: clamp(24px, 4vw, 56px); }
.about-body .prose .wp-block-column:first-child { flex: 0 0 38%; }
.about-body .prose .wp-block-column:first-child img { width: 100%; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; transition: filter 0.6s var(--ease); }
.about-body .prose .wp-block-column:first-child img:hover { filter: none; }
:root[data-theme="dark"] .about-body .prose img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .about-body .prose img { mix-blend-mode: normal; } }
.about-body .prose .wp-block-column:last-child p { font-size: var(--fs-lg); line-height: 1.38; letter-spacing: -0.01em; font-variation-settings: "opsz" 36; }
.about-body .prose .wp-block-column:last-child p:first-child::first-letter { float: left; font-size: 3.4em; line-height: 0.8; padding: 0.06em 0.08em 0 0; color: var(--seal); }
@media (max-width: 720px) { .about-body { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); padding: clamp(36px, 5vw, 72px) 0; }
.contact .note p + p { margin-top: 10px; }
.contact .note p { color: var(--ink-2); font-size: var(--fs-small); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px clamp(20px, 3vw, 40px); max-width: 52rem; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink);
  font-family: var(--serif); font-size: 1.25rem; padding: 8px 0 10px; border-radius: 0;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--seal); box-shadow: 0 1px 0 var(--seal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; justify-self: start;
  background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  font-family: var(--label); font-weight: 600; font-size: 1rem; letter-spacing: 0.03em;
  padding: 14px 22px; min-height: 48px; border-radius: 0;
  transition: background 0.2s;
}
.btn:hover { background: var(--seal); color: var(--seal-ink); }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.notice { grid-column: 1 / -1; padding: 14px 18px; border-left: 3px solid var(--seal); background: var(--paper-2); font-size: var(--fs-small); }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; } .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { padding-top: clamp(56px, 8vw, 120px); padding-bottom: 28px; border-top: 1px solid var(--rule); }
.foot-cta { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); align-items: end; }
.foot-cta a.big { font-size: clamp(2.4rem, 1rem + 6vw, 7rem); line-height: 0.92; letter-spacing: -0.045em; font-variation-settings: "opsz" 60; display: inline-block; }
.foot-cta a.big i { color: var(--seal); }
.foot-cta a.big .arr { display: inline-block; transition: transform 0.4s var(--ease); font-weight: 300; }
.foot-cta a.big:hover .arr { transform: translate(8px, -8px); }
.foot-cta p { color: var(--ink-2); margin-top: 14px; max-width: 30rem; font-size: var(--fs-small); }
.colophon { margin-top: clamp(48px, 7vw, 96px); padding-top: 14px; border-top: 3px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.colophon a:hover { color: var(--ink); }
@media (max-width: 720px) { .foot-cta { grid-template-columns: 1fr; } }

/* ---------- Motion (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .mast-name .ch { display: inline-block; animation: rise 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(0.25em); } }
.js .mast-rule { transform-origin: left; animation: draw 1.2s var(--ease) 0.15s both; }
@keyframes draw { from { transform: scaleX(0); } }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--seal); transform-origin: left; transform: scaleX(0); z-index: 20; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .mast-name .ch, .js .mast-rule { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  * { scroll-behavior: auto !important; }
}
@media print {
  .strip, .foot, .series-nav, .post-nav, .progress, .post-body .aside { display: none !important; }
  body { background: #fff; color: #000; }
}
