/* chindu.co.uk — monochrome. Fraunces for headlines, Source Serif for reading and the running head
   (Adobe's release, for true small capitals), Instrument Sans for the few small labels.
   Two alignment lines on long pages: the page's left margin (name, section label, headline, byline)
   and a centred reading column (photos, text, Next). */

:root {
  --col: 680px;
  --wide: 840px;
  --paper: #fbfaf8;
  --ink: #161517;
  --text: #2c2a2e;
  --meta: #66625c;
  --underline: rgba(22, 21, 23, .35);
  --rule: #e6e3de;
  --note-bg: #f1efeb;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --smallcaps: "Source Serif SC", "Source Serif 4", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161517; --ink: #f1eee8; --text: #d8d4cc; --meta: #9a958c; --underline: rgba(241, 238, 232, .4); --rule: #2b292c; --note-bg: #201f21;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--text); font-family: var(--serif); margin: 0; padding: 0 clamp(16px, 4vw, 48px); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; }
.shell { max-width: 1240px; margin: 0 auto; }

/* ---------- running head ---------- */
.site-head { display: block; padding-top: calc(30px + env(safe-area-inset-top, 0px)); margin-bottom: calc(3 * 1.62 * 20px - 40px); }
.sig { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.brand, .menu-btn, .menu-close { font-family: var(--smallcaps); font-variant-caps: all-small-caps; font-size: 19px; letter-spacing: .1em; }
.brand { color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu-btn, .menu-close { font-size: 17px; color: var(--meta); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.menu-btn:hover, .menu-close:hover { color: var(--ink); }
.slogan { font-style: italic; font-size: 17px; color: var(--meta); margin: 6px 0 0; }
.site-nav { display: none; }
.site-nav.open {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34em); column-gap: clamp(32px, 6vw, 96px); align-content: start;
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; background: var(--paper);
  padding: calc(30px + env(safe-area-inset-top, 0px)) calc(max(0px, (100vw - 1240px) / 2) + clamp(16px, 4vw, 48px)) calc(40px + env(safe-area-inset-bottom, 0px));
}
.site-nav.open > * { grid-column: 2; }
.site-nav .menu-close { justify-self: end; margin-bottom: clamp(40px, 8vw, 96px); }
.site-nav a { font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0; font-weight: 320; font-size: 25px; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); text-decoration: none; padding-block: 13px; border-bottom: 1px solid var(--rule); }
.site-nav a:hover, .site-nav a[aria-current] { font-style: italic; }
body.menu-open { overflow: hidden; }

/* ---------- article and page ---------- */
.post-head { display: grid; gap: 28px; padding-block: clamp(48px, 8vw, 104px) 0; }
.head-text { display: grid; gap: 26px; }
.tag-chip, .chip { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none; border: 1px solid var(--rule); padding: 5px 10px; width: fit-content; }
.tag-chip:hover, .chip:hover { border-color: var(--ink); }
h1 {
  font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0; font-weight: 320;
  font-size: clamp(50px, 7.4vw, 108px); max-width: 15ch; line-height: .92; letter-spacing: -.035em;
  color: var(--ink); margin: 0; text-wrap: balance;
}
.byrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: clamp(2px, calc(3.2vw - 26px), 18px); font-size: 18px; color: var(--meta); }
.byline { margin: 0; font-weight: 500; color: var(--ink); }
.byline i { font-weight: 400; color: var(--meta); }

.lead { padding-top: clamp(36px, 5vw, 56px); }
.feature { width: min(var(--wide), 100%); margin: 0 auto; }
.feature img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 48%; }
.feature figcaption, .gh-content figcaption { font-family: var(--sans); font-size: 13.5px; line-height: 1.4; color: var(--meta); margin-top: 8px; }

.post { padding-block: clamp(40px, 6vw, 72px) 40px; }
.post-page { padding-bottom: clamp(56px, 8vw, 96px); }
.body { width: min(var(--col), 100%); margin-inline: auto; font-size: 20px; line-height: 1.62; font-optical-sizing: auto; }
.body > * { margin-block: 0 1.05em; }
.body p { text-wrap: pretty; hanging-punctuation: first; }
.body > h1:empty, .body > h2:empty, .body > h3:empty, .body > p:empty { display: none; } /* empty leftovers from WordPress */
.body a { text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.body a:hover { text-decoration-color: var(--ink); }
.body h2, .body h3 { font-family: var(--display); font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 0; font-weight: 340; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; margin: 1.8em 0 .6em; }
.body h2 { font-size: 30px; }
.body h3 { font-size: 24px; }
.body ul, .body ol { padding-left: 1.3em; }
.body li { margin-bottom: .4em; }

/* drop caps: the opening, and a smaller one after each section break (Granta) */
.body > p.dropcap::first-letter {
  font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0; font-weight: 320;
  float: left; font-size: 4.6em; line-height: .82; padding: .06em .08em 0 0; color: var(--ink);
}
/* every piece opens the same way: words set bold at the start of a drop-cap paragraph lose the bold */
.body > p.dropcap > strong:first-child,
.body > p.dropcap > strong:first-child *,
.post-template .body hr + p > strong:first-child,
.post-template .body hr + p > strong:first-child * { font-weight: inherit; }
.body hr { border: 0; height: 0; margin: 2.4em 0 0; }
.body > p.announce { font-size: 17px; line-height: 1.5; color: var(--meta); margin-bottom: 2em; }
.body > p.announce a { color: var(--ink); }
.post-template .body hr + p::first-letter {
  font-family: var(--display); font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 0; font-weight: 330;
  float: left; font-size: 3.05em; line-height: .86; padding: .04em .07em 0 0; color: var(--ink);
}

/* quotations: his quotes are real quoted passages, so set quietly, indented, not as pull quotes */
.body blockquote {
  margin: 1.6em 0 1.6em 1.4em; padding: 0;
  font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0; font-weight: 340;
  font-size: 23px; line-height: 1.4; color: var(--ink); text-wrap: pretty;
}
.body blockquote p:last-child { margin-bottom: 0; }

/* photos inside the text: never cropped; wider than the text; tall ones limited in height */
.body .kg-image-card, .body .kg-gallery-card, .body .kg-embed-card, .body figure { margin: 2em calc((min(var(--col), 100%) - min(var(--wide), 100vw - 2 * clamp(16px, 4vw, 48px))) / 2); }
.body .kg-image-card img, .body figure > img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(80vh, 640px); margin-inline: auto; }
.body .kg-width-wide, .body .kg-width-full { width: auto; } /* "wide" and "full" are capped at the photo width: never edge to edge */
.body .kg-width-full img, .body .kg-width-wide img { width: 100%; }
.body .kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.body .kg-gallery-row { display: flex; gap: 8px; }
.body .kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.body .kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.body iframe { max-width: 100%; }
.body iframe[src*="youtube"], .body iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.body figcaption { text-align: left; width: 100%; }
.body .kg-image-card.small { float: left; width: auto; max-width: 42%; margin: .35em 1.6em .8em 0; }
.body .kg-image-card.small img { width: auto; max-width: 100%; max-height: none; margin: 0; }
.body .kg-image-card.small figcaption { width: auto; }
.body hr, .body .kg-image-card:not(.small), .body .kg-gallery-card, .body .kg-embed-card, .body blockquote { clear: both; }

/* one way on */
.pn { width: min(var(--col), 100%); margin-inline: auto; padding-block: 56px 72px; }
.pn a { display: grid; gap: 8px; text-decoration: none; }
.pn .dir { font-family: var(--smallcaps); font-variant-caps: all-small-caps; font-size: 17px; letter-spacing: .1em; color: var(--meta); }
.pn .t { font-family: var(--display); font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 0; font-weight: 330; font-size: 30px; line-height: 1.1; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.pn a:hover .t { text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: .15em; }

/* ---------- homepage ---------- */
.read { font-family: var(--sans); font-size: 14px; color: var(--ink); text-decoration: none; }
.read:hover { text-decoration: underline; text-underline-offset: .2em; }
.home-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 5vw, 72px); align-items: end; padding-block: clamp(40px, 6vw, 72px) clamp(40px, 5vw, 64px); }
.home-lead.no-photo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.home-lead figure { margin: 0; }
.home-lead img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.home-lead .txt { display: grid; gap: 20px; }
.home-lead h2 { margin: 0; font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0; font-weight: 320; font-size: clamp(38px, 4.6vw, 64px); line-height: .98; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.home-lead p { margin: 0; font-size: 20px; line-height: 1.5; text-wrap: pretty; }
.home-lead h2 a, .ch-head h3 a, .ch-feature h4 a, .ch-list a { text-decoration: none; }
.home-lead h2 a:hover, .ch-head h3 a:hover, .ch-feature h4 a:hover, .ch-list a:hover { text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: .12em; }

.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px clamp(32px, 5vw, 72px); padding-block: clamp(56px, 7vw, 96px) 0; }
.ch-head { display: grid; gap: 12px; align-content: start; }
.ch-head h3 { margin: 0; font-family: var(--display); font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 0; font-weight: 300; font-size: clamp(36px, 3.8vw, 52px); line-height: 1; letter-spacing: -.025em; color: var(--ink); }
.ch-head .read { margin-top: 8px; }
.ch-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px clamp(24px, 4vw, 48px); align-items: start; }
.ch-feature { display: grid; gap: 14px; margin: 0; }
.ch-feature img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
/* section leads: the tagged lead wins over the latest; the list never repeats the lead and stays at three */
.ch-leads { display: grid; }
.chapter:has(.ch-feature.tagged) .ch-feature.latest { display: none; }
.chapter:has(.ch-feature.tagged) .ch-list li:nth-child(n+4) { display: none; }
.chapter:not(:has(.ch-feature.tagged)) .ch-list li:first-child { display: none; }
.ch-feature.no-photo h4 { font-size: clamp(30px, 3vw, 38px); line-height: 1.04; }
.ch-feature.no-photo p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text); max-width: 30em; }
.ch-feature h4 { margin: 0; font-family: var(--display); font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 0; font-weight: 330; font-size: 28px; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.ch-list li { display: grid; gap: 6px; }
.ch-list a { font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0; font-weight: 340; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.ch-list p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--text); }
.chapter.textonly .ch-body, .ch-body:not(:has(.ch-feature)) { grid-template-columns: minmax(0, 1fr); }
.chapter.textonly .ch-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 4vw, 48px); }
.chapter.textonly .ch-list li { gap: 10px; align-content: start; }
.chapter.textonly .ch-list li a { font-size: 25px; }
.all-link { padding-block: clamp(56px, 7vw, 96px) 8px; margin: 0; }

/* ---------- section page, archive, error ---------- */
.sec-col { max-width: 760px; margin-inline: auto; padding-bottom: clamp(32px, 5vw, 64px); }
.sec-head { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 6vw, 72px); display: grid; gap: 22px; }
.h-xl { font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0; font-weight: 320; line-height: .92; letter-spacing: -.035em; color: var(--ink); margin: 0; text-wrap: balance; max-width: none; }
.sec-head .h-xl { font-size: clamp(56px, 9vw, 128px); margin-left: calc(-1 * min(240px, 16vw)); }
.sec-head .desc { font-size: 22px; line-height: 1.45; margin: 0; max-width: 28em; text-wrap: pretty; }
.sec-head .desc a { text-decoration-color: var(--underline); text-underline-offset: .2em; }
.sec-head .count { font-family: var(--sans); font-size: 13px; color: var(--meta); }
.piece { display: grid; gap: 16px; padding-bottom: clamp(56px, 7vw, 88px); }
.piece figure { margin: 0 0 6px; }
.piece img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.piece h2 { margin: 0; font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 40, "WONK" 0; font-weight: 320; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.piece h2 a { text-decoration: none; }
.piece h2 a:hover { text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: .12em; }
.piece p { margin: 0; font-size: 19.5px; line-height: 1.55; text-wrap: pretty; max-width: 34em; }
.sec-more { padding-bottom: 24px; }
.more-btn { display: inline-block; font-family: var(--serif); font-size: 17px; color: var(--ink); background: none; border: 1px solid var(--rule); padding: 10px 18px; cursor: pointer; text-decoration: none; }
.more-btn:hover { border-color: var(--ink); }
.archive { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.archive li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 20px; padding-block: 16px 15px; border-bottom: 1px solid var(--rule); }
.archive a { font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0; font-weight: 340; font-size: 23px; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); text-decoration: none; text-wrap: balance; }
.archive a:hover { text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: .15em; }
.archive span { font-family: var(--sans); font-size: 13px; color: var(--meta); white-space: nowrap; }

/* ---------- footer: mirrors the running head ---------- */
.site-foot { border-top: 1px solid var(--rule); margin-top: 24px; padding-block: 24px calc(44px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; font-family: var(--smallcaps); font-variant-caps: all-small-caps; font-size: 15px; letter-spacing: .1em; color: var(--meta); }
.site-foot nav { display: flex; gap: 10px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 900px) {
  .home-lead, .chapter, .ch-body, .chapter.textonly .ch-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .site-nav.open { grid-template-columns: 1fr; }
  .site-nav.open > * { grid-column: 1; }
  .sec-head .h-xl { margin-left: 0; }
  .body .kg-image-card, .body .kg-gallery-card, .body .kg-embed-card, .body figure { margin-inline: 0; }
}
@media (max-width: 560px) {
  .feature img { aspect-ratio: 3 / 2; }
  .body .kg-image-card.small { float: none; max-width: 100%; margin: 1.6em 0; }
  .site-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-foot nav { order: -1; }
}
