/* ==========================================================================
   kamalashila.co.uk
   A quiet, reading-first design: warm paper, one serif, a single clay accent.
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */

:root {
  --paper:        #f6f2ec;
  --paper-raised: #fffdfa;
  --paper-sunk:   #eee8df;
  --ink:          #1d1a16;
  --ink-soft:     #5d564c;
  --ink-faint:    #8b8377;
  --rule:         rgba(29, 26, 22, 0.13);
  --rule-strong:  rgba(29, 26, 22, 0.26);
  --accent:       #9c3a2b;
  --accent-soft:  #b8604f;
  --accent-wash:  rgba(156, 58, 43, 0.08);
  --sage:         #5f6d58;
  --shadow:       0 1px 2px rgba(29, 26, 22, .05), 0 8px 24px -12px rgba(29, 26, 22, .18);
  --shadow-lift:  0 2px 4px rgba(29, 26, 22, .06), 0 18px 40px -18px rgba(29, 26, 22, .28);

  --serif: 'Newsreader', Iowan Old Style, Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 4.25rem;

  color-scheme: light;
}

:root:not([data-theme='light']) {
  @media (prefers-color-scheme: dark) {
    --paper:        #14120f;
    --paper-raised: #1c1915;
    --paper-sunk:   #100e0c;
    --ink:          #ece6dc;
    --ink-soft:     #a9a094;
    --ink-faint:    #7c7468;
    --rule:         rgba(236, 230, 220, 0.14);
    --rule-strong:  rgba(236, 230, 220, 0.28);
    --accent:       #e08b76;
    --accent-soft:  #c97258;
    --accent-wash:  rgba(224, 139, 118, 0.10);
    --sage:         #9aab90;
    --shadow:       0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-lift:  0 2px 4px rgba(0,0,0,.45), 0 18px 40px -18px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper:        #14120f;
  --paper-raised: #1c1915;
  --paper-sunk:   #100e0c;
  --ink:          #ece6dc;
  --ink-soft:     #a9a094;
  --ink-faint:    #7c7468;
  --rule:         rgba(236, 230, 220, 0.14);
  --rule-strong:  rgba(236, 230, 220, 0.28);
  --accent:       #e08b76;
  --accent-soft:  #c97258;
  --accent-wash:  rgba(224, 139, 118, 0.10);
  --sage:         #9aab90;
  --shadow:       0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-lift:  0 2px 4px rgba(0,0,0,.45), 0 18px 40px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.68;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

::selection { background: var(--accent-wash); }

mark {
  background: var(--accent-wash);
  color: inherit;
  padding: 0.05em 0.25em;
  border-radius: 3px;
}

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: from-font; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- helpers -------------------------------------------------------------- */

.u-sans { font-family: var(--sans); }

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 200;
  transform: translateY(-200%);
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: 6px;
  font-family: var(--sans); font-size: 0.875rem; text-decoration: none;
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(72rem, 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.wrap--narrow { width: min(48rem, 100% - var(--gutter) * 2); }

/* --- header --------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header[data-scrolled='true'] { border-bottom-color: var(--rule); }

.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; }
.brand__name {
  font-size: 1.3rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.1;
}
.brand__sub {
  font-family: var(--sans); font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  margin-top: 0.22em;
}

/* --- primary nav ---------------------------------------------------------- */

.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav__item { position: relative; }

.nav__link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  padding: 0.55rem 0.7rem; border-radius: 7px;
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.nav__link:hover, .nav__item:focus-within > .nav__link { color: var(--ink); background: var(--accent-wash); }
.nav__link[aria-current='page'] { color: var(--ink); }
.nav__link[aria-current='page']::after {
  content: ''; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.15rem;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}
.nav__chev { width: 0.5rem; height: 0.5rem; opacity: .5; transition: transform .2s; }
.nav__item:hover .nav__chev, .nav__item:focus-within .nav__chev { transform: rotate(180deg); }

.nav__panel {
  position: absolute; top: calc(100% + 0.35rem); left: -0.4rem;
  min-width: 15.5rem; padding: 0.5rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__item:hover > .nav__panel,
.nav__item:focus-within > .nav__panel { opacity: 1; visibility: visible; transform: none; }

.nav__panel a {
  display: block; padding: 0.4rem 0.6rem; border-radius: 7px;
  font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-soft);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav__panel a:hover { background: var(--accent-wash); color: var(--ink); }
.nav__panel a.is-heading { font-weight: 600; color: var(--ink); margin-top: 0.35rem; }
.nav__panel a.is-heading:first-child { margin-top: 0; }
.nav__panel a.is-child { padding-left: 1.4rem; font-size: 0.78125rem; }

.header__tools { display: flex; align-items: center; gap: 0.25rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 2.25rem; height: 2.25rem; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--accent-wash); color: var(--ink); border-color: var(--rule); }
.icon-btn svg { width: 1.125rem; height: 1.125rem; }

.nav-toggle { display: none; }

@media (max-width: 62rem) {
  .nav, .search-open { display: none; }
  .nav-toggle { display: inline-grid; }
}

/* --- mobile drawer -------------------------------------------------------- */

.drawer {
  position: fixed; inset: 0; z-index: 150;
  background: var(--paper);
  padding: 1.25rem var(--gutter) 3rem;
  overflow-y: auto;
  display: none;
}
.drawer[open] { display: block; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.drawer__group { border-top: 1px solid var(--rule); padding: 0.85rem 0; }
.drawer__group > a, .drawer summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 1.25rem; font-weight: 500; text-decoration: none; cursor: pointer;
  list-style: none;
}
.drawer summary::-webkit-details-marker { display: none; }
.drawer details[open] summary .nav__chev { transform: rotate(180deg); }
.drawer__sub { padding: 0.6rem 0 0.2rem; display: grid; gap: 0.1rem; }
.drawer__sub a {
  font-family: var(--sans); font-size: 0.9375rem; color: var(--ink-soft);
  text-decoration: none; padding: 0.4rem 0;
}
.drawer__sub a.is-child { padding-left: 1rem; font-size: 0.875rem; color: var(--ink-faint); }

/* --- search --------------------------------------------------------------- */

.search-open {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-faint);
  background: var(--paper-sunk); border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.4rem 0.75rem 0.4rem 0.7rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.search-open:hover { border-color: var(--rule-strong); color: var(--ink-soft); }
.search-open svg { width: 0.9375rem; height: 0.9375rem; }
.search-open kbd {
  font-family: var(--sans); font-size: 0.6875rem; padding: 0.05rem 0.3rem;
  border: 1px solid var(--rule); border-radius: 4px; color: var(--ink-faint);
}

.search-dialog {
  width: min(38rem, 100% - 2rem); max-height: 70vh;
  margin: 12vh auto auto; padding: 0;
  background: var(--paper-raised); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.search-dialog::backdrop { background: rgba(20, 18, 15, .45); backdrop-filter: blur(3px); }
.search-dialog__field { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.search-dialog__field svg { width: 1.0625rem; height: 1.0625rem; color: var(--ink-faint); flex: none; }
.search-dialog input {
  flex: 1; border: 0; background: none; color: inherit;
  font-family: var(--serif); font-size: 1.0625rem; padding: 0.15rem 0;
}
.search-dialog input:focus { outline: none; }
.search-results { max-height: 52vh; overflow-y: auto; padding: 0.5rem; margin: 0; list-style: none; }
.search-results li a {
  display: block; padding: 0.6rem 0.75rem; border-radius: 9px; text-decoration: none;
}
.search-results li a:hover, .search-results li a:focus-visible { background: var(--accent-wash); }
.search-results__title { font-weight: 500; }
.search-results__meta { font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint); }
.search-results__snippet { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.5; margin-top: 0.15rem; }
.search-results mark { background: var(--accent-wash); color: inherit; border-radius: 2px; }
.search-empty { padding: 1.5rem 1.25rem; color: var(--ink-faint); font-family: var(--sans); font-size: 0.875rem; }

/* --- hero ----------------------------------------------------------------- */

.hero { position: relative; padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
}
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: saturate(.75); }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 55%, transparent), var(--paper) 88%);
}

.hero__eyebrow { color: var(--accent); letter-spacing: 0.18em; }
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 400; line-height: 1.02; letter-spacing: -0.03em;
  margin: 0.5rem 0 0;
}
.hero__dates {
  font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.1em;
  color: var(--ink-faint); margin-top: 1rem;
}
.hero__lede {
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.5; color: var(--ink-soft);
  max-width: 32rem; margin-top: 1.25rem;
}

/* --- intro / portrait ----------------------------------------------------- */

.intro {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2rem, 6vw, 3.5rem);
}
@media (min-width: 52rem) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); align-items: start; }
}
.intro__figure { margin: 0; }
.intro__figure img { border-radius: 10px; box-shadow: var(--shadow); width: 100%; }
.intro__figure figcaption {
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint);
  margin-top: 0.6rem; line-height: 1.4;
}

.pull {
  margin: 0; max-width: 40rem; padding-left: clamp(1rem, 3vw, 1.75rem);
  border-left: 2px solid var(--accent);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}
.pull p + p { margin-top: 1rem; }
.pull cite {
  display: block; margin-top: 1rem; font-style: normal;
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* --- section headers ------------------------------------------------------ */

.section { padding-block: clamp(2rem, 5vw, 3.25rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section__head { max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.section__head h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; margin: 0.5rem 0 0;
}
.section__head p { color: var(--ink-soft); margin: 0.75rem 0 0; }

/* --- cards ---------------------------------------------------------------- */

.cards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
@media (min-width: 46rem) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--paper);
  text-decoration: none;
  transition: background .2s;
}
.card:hover { background: var(--paper-raised); }
.card__eyebrow { color: var(--accent); }
.card h3 { font-size: 1.5rem; font-weight: 400; letter-spacing: -0.015em; margin: 0; }
.card p { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.6; margin: 0; }
.card__more {
  margin-top: auto; padding-top: 1rem;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none;
}
a.card__more { padding-top: 0; }
a.card__more:hover svg { transform: translateX(3px); }
.card:hover .card__more svg { transform: translateX(3px); }
.card__more svg { width: 0.875rem; height: 0.875rem; transition: transform .2s; }

/* --- list of links (section indexes, archive) ----------------------------- */

.entries { list-style: none; margin: 0; padding: 0; }
.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry a {
  display: grid; gap: 0.15rem 1.5rem; align-items: baseline;
  padding: 1.15rem 0.25rem; text-decoration: none;
  transition: padding-left .2s, background .2s;
}
@media (min-width: 46rem) {
  .entry a { grid-template-columns: minmax(0, 1fr) 6rem; }
  .entry__meta { text-align: right; }
}
.entry a:hover { padding-left: 0.85rem; background: var(--accent-wash); }
.entry__title { font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.01em; }
.entry__desc { grid-column: 1; color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.55; margin-top: 0.2rem; }
.entry__meta { font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* --- notice --------------------------------------------------------------- */

.notice {
  display: grid; gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--paper-raised);
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: 12px;
}
.notice h2 { font-size: 1.25rem; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.notice p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.6; }
.notice a { color: var(--accent); }

/* --- article -------------------------------------------------------------- */

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(1.25rem, 3vw, 2rem); }
.prose > .page-head { grid-column: text; margin-top: 0; }
.page-head__crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint); margin-bottom: 1rem;
}
.page-head__crumbs a { color: var(--ink-faint); text-decoration: none; }
.page-head__crumbs a:hover { color: var(--accent); text-decoration: underline; }
.page-head h1 {
  font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.5rem);
  font-weight: 400; line-height: 1.08; letter-spacing: -0.025em; margin: 0;
  max-width: 24ch;
}
.page-head__meta { font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-faint); margin-top: 1rem; }
.page-head__lede { font-size: 1.1875rem; color: var(--ink-soft); line-height: 1.55; margin: 1.25rem 0 0; max-width: 40rem; }

.page-hero { margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); }
.prose > .page-hero { grid-column: wide; margin-top: 0; }
.page-hero img {
  width: 100%; max-height: 24rem; object-fit: cover;
  border-radius: 10px; box-shadow: var(--shadow);
}
/* first body element after the head or hero shouldn't get the stacking margin */
.prose > .page-head + *, .prose > .page-hero + * { margin-top: 0; }

/* Prose grid: body text on a comfortable measure, figures allowed to breathe. */
.prose {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [wide-start] minmax(0, 6rem)
    [text-start] min(var(--measure), 100%)
    [text-end] minmax(0, 6rem)
    [wide-end] minmax(0, 1fr)
    [full-end];
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
.prose > * { grid-column: text; margin-block: 0; }
.prose > * + * { margin-top: 1.15em; }

.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-weight: 500; letter-spacing: -0.015em; line-height: 1.25;
  margin-top: 2.25em; margin-bottom: 0;
}
.prose > h2 + *, .prose > h3 + *, .prose > h4 + * { margin-top: 0.7em; }
.prose h2 { font-size: 1.625em; }
.prose h3 { font-size: 1.3125em; }
.prose h4 { font-size: 1.125em; }
.prose h5, .prose h6 { font-size: 1em; color: var(--ink-soft); }

.prose a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }

.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }

.prose blockquote {
  padding-left: 1.25em; border-left: 2px solid var(--rule-strong);
  color: var(--ink-soft); font-style: italic;
}

/* <pre> in this content is always a verse quotation, never code — wrap it. */
.prose pre {
  font-family: inherit; font-size: 0.9375em; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: break-word; overflow-x: auto;
  padding-left: 1.25em; border-left: 2px solid var(--rule-strong);
  color: var(--ink-soft); margin-block: 2em;
}
.prose :where(code, kbd, samp) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em; background: var(--paper-sunk);
  padding: 0.1em 0.35em; border-radius: 4px;
}

.prose figure { grid-column: wide; margin-block: 2.25em; }
.prose figure img {
  width: auto; max-width: 100%; max-height: 34rem;
  margin-inline: auto; border-radius: 8px;
}
.prose figcaption {
  font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-faint);
  line-height: 1.5; margin-top: 0.7rem; text-align: center;
}
.prose > img { border-radius: 8px; margin-block: 2em; }

.prose table { grid-column: wide; width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose :where(td, th) { border: 1px solid var(--rule); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-sunk); font-weight: 600; }
.table-scroll { grid-column: wide; overflow-x: auto; }
.table-scroll table { width: 100%; min-width: 34rem; }

.prose iframe { grid-column: wide; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }

.prose a[href$='.pdf'] {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.prose a[href$='.pdf']::after {
  content: 'PDF'; font-family: var(--sans); font-size: 0.5625rem; font-weight: 700;
  letter-spacing: 0.08em; vertical-align: 0.35em; margin-left: 0.3em;
  color: var(--ink-faint);
}

/* --- next / prev ---------------------------------------------------------- */

.pager { display: grid; gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); }
@media (min-width: 46rem) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: block; padding: 1.5rem clamp(1rem, 3vw, 2rem); background: var(--paper);
  text-decoration: none; transition: background .2s;
}
.pager a:hover { background: var(--paper-raised); }
.pager a:last-child:nth-child(2) { text-align: right; }
.pager__title { font-size: 1.125rem; font-weight: 500; margin-top: 0.25rem; display: block; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunk);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  margin-top: auto;
}
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 46rem) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }
.site-footer h2 { font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__about { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.6; max-width: 26rem; margin: 0; }
.site-footer__name { font-size: 1.25rem; margin: 0 0 0.6rem; }
.site-footer__legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint);
}

/* --- page shell ----------------------------------------------------------- */

body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1; }
