/* PayDecoded — site styles
   Type: Schibsted Grotesk (interface, headings, codes) + Source Serif 4 (reading).
   Colour: ink navy + brand teal; red/amber only carry meaning (hard / soft decline). */

@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --ink: #10213D;
  --ink-2: #44506A;
  --ink-3: #6B768C;
  --paper: #FFFFFF;
  --wash: #F2F4F7;
  --rule: #DCE1E8;
  --teal: #0B7A6F;
  --teal-strong: #0F766E;
  --teal-wash: #E6F4F2;
  --code: #0F766E;
  --red: #B42318;
  --amber: #B54708;
  --focus: #2E90FA;

  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

  --wrap: 72rem;
  --measure: 40rem;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E8EDF4;
    --ink-2: #B3BDCD;
    --ink-3: #8592A8;
    --paper: #0D1626;
    --wash: #142035;
    --rule: #26344E;
    --teal: #5ED3C4;
    --teal-strong: #2BB3A3;
    --teal-wash: #0F2E30;
    --code: #5ED3C4;
    --red: #F97066;
    --amber: #FDB022;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--sans);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
p, li { text-wrap: pretty; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 50; }
.skip:focus { top: 1rem; }

/* ---------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 0.5rem 0.65rem; color: var(--ink-2); text-decoration: none; font-weight: 500; border-radius: 8px; }
.site-nav a:hover { color: var(--ink); background: var(--wash); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal-strong); border-radius: 0; }
.search-open { display: inline-flex; align-items: center; gap: 0.5rem; font: inherit; color: var(--ink-2); background: var(--wash);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.4rem 0.6rem 0.4rem 0.75rem; cursor: pointer; }
.search-open:hover { color: var(--ink); border-color: var(--ink-3); }
.search-open svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
kbd { font: 600 0.75rem/1 var(--sans); border: 1px solid var(--rule); border-radius: 5px; padding: 0.2rem 0.4rem; color: var(--ink-3); background: var(--paper); }
.nav-toggle { display: none; }

@media (max-width: 54rem) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; font: 600 var(--step-0) var(--sans); color: var(--ink);
    background: none; border: 1px solid var(--rule); border-radius: 8px; padding: 0.45rem 0.75rem; cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1rem; height: 2px; background: currentColor; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -5px; } .nav-toggle-bars::after { top: 5px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1.25rem 1.25rem; gap: 0.75rem; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.75rem 0.5rem; font-size: var(--step-1); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal-strong); padding-left: 0.85rem; }
  .search-open { justify-content: center; padding: 0.7rem; }
  .search-open kbd { display: none; }
}

/* ---------------------------------------------------------------- hero + decoder */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--rule); }
.hero-title { font-size: var(--step-5); font-weight: 800; max-width: 22ch; margin: 0 0 1.25rem; letter-spacing: -0.03em; line-height: 1.05; }
.hero-dek { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; margin: 0 0 2.25rem; }

.decoder { position: relative; max-width: 44rem; }
.decoder-label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.decoder-box { display: flex; align-items: center; gap: 0.75rem; background: var(--paper); border: 2px solid var(--ink);
  border-radius: 14px; padding: 0 1rem; transition: border-color .15s, box-shadow .15s; }
.decoder-box:focus-within { border-color: var(--teal-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal-strong) 22%, transparent); }
.decoder-box svg { width: 1.4rem; height: 1.4rem; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.decoder-box input { flex: 1; min-width: 0; text-overflow: ellipsis; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 500 var(--step-2)/1 var(--sans); padding: 1rem 0; }
.decoder-box input::placeholder { color: var(--ink-3); font-weight: 400; }
.decoder-box input::-webkit-search-cancel-button { display: none; }
.decoder-results { list-style: none; margin: 0.5rem 0 0; padding: 0.35rem; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(16, 33, 61, .35); position: absolute; left: 0; right: 0; z-index: 30;
  max-height: min(26rem, 60vh); overflow: auto; }
.decoder-results li { margin: 0; }
.decoder-results [role=option] a { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.25rem 1rem; align-items: baseline; padding: 0.7rem 0.8rem;
  border-radius: 10px; color: var(--ink); text-decoration: none; }
.decoder-results [aria-selected="true"] a, .decoder-results [role=option] a:hover { background: var(--wash); }
.res-code { grid-row: span 2; font-weight: 800; font-size: var(--step-2); color: var(--code);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.res-code.is-long { font: 600 0.8rem/1.3 var(--mono); white-space: normal; word-break: break-all; }
.res-title { font-weight: 600; line-height: 1.3; }
.res-section { font-size: var(--step--1); color: var(--ink-3); }
.decoder-empty { padding: 1rem 0.8rem; color: var(--ink-2); }
.decoder-empty a { font-weight: 600; color: var(--teal); }
mark { background: color-mix(in srgb, var(--teal-strong) 20%, transparent); color: inherit; border-radius: 3px; }
.decoder-try { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0 0; color: var(--ink-3); }
.chip { font: 700 var(--step--1)/1 var(--sans); color: var(--ink); background: var(--wash);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.8rem; cursor: pointer; }
.chip:hover { border-color: var(--teal-strong); color: var(--teal); }

/* hero layout + decoded example */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.hero-sample { font-size: var(--step--1); background: var(--paper); border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: 0 1px 0 var(--rule), 0 22px 44px -28px rgba(16, 33, 61, .45); overflow: hidden; }
.sample-raw { padding: 1.1rem 1.25rem 1.25rem; background: var(--wash); }
.sample-head { display: flex; justify-content: space-between; font-weight: 700; margin: 0 0 0.9rem; }
.sample-status { color: var(--red); }
.sample-raw dl { margin: 0; display: grid; gap: 0.4rem; }
.sample-raw dl div { display: flex; justify-content: space-between; gap: 1rem; }
.sample-raw dt { color: var(--ink-3); }
.sample-raw dd { margin: 0; font-weight: 600; }
.sample-raw dd.sample-code { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.sample-decoded { position: relative; padding: 1.35rem 1.25rem 1.25rem; border-top: 2px dashed var(--rule); }
.sample-decoded::before, .sample-decoded::after { content: ""; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule); }
.sample-decoded::before { left: -9px; } .sample-decoded::after { right: -9px; }
.sample-meaning { font-size: var(--step-0); margin: 0 0 0.6rem; }
.sample-tag { display: inline-block; font-weight: 700; font-size: 0.8rem; border-radius: 999px; padding: 0.2rem 0.6rem; margin: 0 0 0.75rem; }
.sample-tag.is-soft { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.sample-next { color: var(--ink-2); margin: 0 0 0.9rem; }
.sample-link { font-weight: 600; }
@media (max-width: 64rem) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-sample { max-width: 28rem; } }
@media (max-width: 40rem) { .hero-sample { display: none; } }

/* search dialog (all pages) */
.search-dialog { width: min(100% - 2rem, 40rem); margin: 12vh auto auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.search-dialog::backdrop { background: rgba(9, 18, 33, .55); backdrop-filter: blur(2px); }
.decoder-dialog .decoder-box { border-color: var(--teal-strong); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5); }
.decoder-dialog .decoder-results { position: static; }
.decoder-close { font: 600 var(--step--1) var(--sans); color: var(--ink-2); background: var(--wash); border: 1px solid var(--rule);
  border-radius: 8px; padding: 0.35rem 0.6rem; cursor: pointer; }

/* ---------------------------------------------------------------- post lists */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.home-latest { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.home-latest h2, .topics h2, .related h2 { font-size: var(--step-3); margin: 0 0 1.5rem; }
.more { font-weight: 600; text-decoration: none; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.post-row.has-code { grid-template-columns: 7.5rem 1fr; }
.post-row:last-child { border-bottom: 1px solid var(--rule); }
.row-code { font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--code);
  letter-spacing: -0.03em; padding-top: 0.15rem; overflow-wrap: anywhere; }
.row-codetag { font: 600 0.8rem/1.4 var(--mono); color: var(--code); background: var(--teal-wash); border-radius: 5px; padding: 0 0.4rem; }
.row-title { font-size: var(--step-2); margin: 0 0 0.4rem; line-height: 1.25; }
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { color: var(--teal); text-decoration: underline; }
.row-title a::after { content: ""; position: absolute; inset: 0; }   /* whole row clickable */
.post-row { position: relative; }
.row-desc { color: var(--ink-2); margin: 0 0 0.6rem; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; font-size: var(--step--1); color: var(--ink-3); }
.row-section { color: var(--teal); font-weight: 600; }
.post-row.is-featured { padding: 0 0 2rem; border-top: 0; }
.post-row.is-featured .row-title { font-size: var(--step-4); letter-spacing: -0.025em; line-height: 1.1; max-width: 26ch; }
.post-row.is-featured .row-desc { font-size: var(--step-1); -webkit-line-clamp: 3; }
.post-row.is-featured.has-code { grid-template-columns: 10rem 1fr; }
.post-row.is-featured .row-code { font-size: 4.2rem; }
.post-list.is-compact .row-title { font-size: var(--step-1); }
.post-list.is-compact .row-code { font-size: 1.9rem; }
.post-list.is-compact .post-row.has-code { grid-template-columns: 6rem 1fr; }
@media (max-width: 40rem) {
  .post-row.has-code, .post-row.is-featured.has-code, .post-list.is-compact .post-row.has-code { grid-template-columns: 1fr; gap: 0.5rem; }
  .row-code, .post-row.is-featured .row-code { font-size: 2.2rem; }
  .post-row.is-featured .row-title { font-size: var(--step-3); }
}

.topics { background: var(--wash); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.topic-grid a { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.25rem 1.25rem 1.1rem; background: var(--paper);
  color: var(--ink); text-decoration: none; }
.topic-grid a:hover .topic-name { color: var(--teal); text-decoration: underline; }
.topic-name { font-weight: 700; font-size: var(--step-1); }
.topic-desc { color: var(--ink-2); font-size: var(--step--1); flex: 1; }
.topic-count { font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: 0.4rem; }
.trust { padding: clamp(2.5rem, 5vw, 3.5rem) 0; max-width: var(--wrap); }
.trust h2 { font-size: var(--step-2); margin: 0 0 0.75rem; }
.trust p { font-family: var(--serif); font-size: var(--step-1); line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 0; }
.empty { color: var(--ink-2); }

/* ---------------------------------------------------------------- article */
.post-head { padding: clamp(1.75rem, 4vw, 3rem) 0 2rem; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1.75rem; padding: 0; font-size: var(--step--1); }
.crumbs li + li::before { content: "/"; margin: 0 0.55rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--teal); text-decoration: underline; }
.post-code { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.post-code-value { font-weight: 800; font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem); line-height: 0.95; color: var(--code);
  letter-spacing: -0.04em; }
.post-code-value.is-long { font: 600 clamp(1.4rem, 1rem + 1.5vw, 2rem)/1.2 var(--mono); letter-spacing: 0; word-break: break-all; }
.post-code-label { font-weight: 600; color: var(--ink-2); }
.post-title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; max-width: 24ch; margin: 0 0 1rem; }
.post-dek { font-family: var(--serif); font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; margin: 0 0 1.5rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--rule);
  font-size: var(--step--1); color: var(--ink-3); }
.post-meta a { color: var(--ink-2); font-weight: 600; text-decoration: none; }

.post-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 15rem; justify-content: start; gap: clamp(3rem, 6vw, 6rem); padding-bottom: 3rem; }
.post-grid .toc { grid-column: 2; grid-row: 1; }
.post-grid .prose { grid-column: 1; grid-row: 1; }
.toc-box { position: sticky; top: 5.5rem; font-size: var(--step--1); }
.toc-box summary { font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; padding: 0.25rem 0 0.75rem; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc-box a { display: block; padding: 0.4rem 0 0.4rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2);
  text-decoration: none; line-height: 1.35; }
.toc-box a:hover { color: var(--ink); }
.toc-box a.is-active { color: var(--ink); border-left-color: var(--teal-strong); font-weight: 600; }
@media (max-width: 60rem) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-grid .toc, .post-grid .prose { grid-column: 1; grid-row: auto; }
  .toc-box { position: static; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 2rem; }
  .toc-box summary { padding: 0; display: flex; justify-content: space-between; }
  .toc-box summary::after { content: "Show"; font-weight: 600; color: var(--teal); }
  .toc-box[open] summary::after { content: "Hide"; }
  .toc-box[open] summary { padding-bottom: 0.75rem; }
}

/* reading text */
.prose { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; color: var(--ink); font-optical-sizing: auto; }
.prose > * { margin-top: 0; margin-bottom: 1.15em; }
.prose h2 { font-size: var(--step-3); font-weight: 750; margin: 2.2em 0 0.6em; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: var(--step-1); font-weight: 700; margin: 1.8em 0 0.5em; letter-spacing: -0.01em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 650; }
.prose code { font: 0.86em/1 var(--mono); background: var(--wash); border: 1px solid var(--rule); border-radius: 5px; padding: 0.1em 0.35em; }
.prose blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 3px solid var(--rule); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose img { height: auto; border-radius: var(--radius); }
.prose figure { margin-inline: 0; }

.table-scroll { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font: 400 var(--step--1)/1.45 var(--sans); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 700; background: var(--wash); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

.takeaways { font-family: var(--sans); background: var(--teal-wash); border-radius: var(--radius); padding: 1.25rem 1.5rem 0.75rem; margin: 2em 0; }
.takeaways h2 { font-size: var(--step-0); margin: 0 0 0.75rem; letter-spacing: 0; color: var(--teal-strong); }
.takeaways ul { margin: 0; padding-left: 1.1em; font-size: var(--step-0); line-height: 1.55; }
.takeaways li { margin-bottom: 0.6em; }

.flow { font-family: var(--sans); margin: 2em 0; padding: 1.25rem 1.25rem 1.4rem; border: 1px solid var(--rule); border-radius: var(--radius); }
.flow figcaption { font-weight: 700; font-size: var(--step-0); margin-bottom: 1rem; }
.flow ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.flow li { counter-increment: step; position: relative; margin: 0; padding: 2.4rem 0.9rem 0.9rem; background: var(--wash); border-radius: 8px;
  font-size: var(--step--1); line-height: 1.4; font-weight: 500; }
.flow li::before { content: counter(step); position: absolute; top: 0.75rem; left: 0.9rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--teal-strong); color: #fff; font-weight: 700; font-size: 0.75rem; display: grid; place-items: center; }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { font: 650 var(--step-1)/1.35 var(--sans); padding: 1rem 2.25rem 1rem 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.25rem; top: 1.35rem; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq details > :not(summary) { margin-top: 0; }
.faq details > :last-child { margin-bottom: 1.25rem; }

.post-foot { font-family: var(--sans); font-size: var(--step--1); line-height: 1.6; color: var(--ink-2); background: var(--wash);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 3em; }
.post-foot p { margin: 0; }
.related { padding: 0 0 4rem; }

/* ---------------------------------------------------------------- pages */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.75rem; }
.page-intro { font-family: var(--serif); font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 52ch; margin: 0 0 1rem; }
.static-page { padding-bottom: 4rem; }
.static-page .prose { max-width: var(--measure); }
.contact-email { font-family: var(--sans); font-size: var(--step-2); font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0 4rem; color: var(--ink-3); }
.pager a { font-weight: 600; }
.notfound { padding-bottom: 6rem; }
.notfound .decoder { margin-top: 2rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--wash); font-size: var(--step--1); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-name { font-weight: 800; font-size: var(--step-1); color: var(--ink); margin: 0 0 0.5rem; }
.footer-brand p:last-child { max-width: 36ch; margin: 0; }
.footer-h { font-weight: 700; color: var(--ink); margin: 0 0 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.footer-base { border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; }
.footer-base p { margin: 0; color: var(--ink-3); }
@media (max-width: 44rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toc, .related, .search-dialog { display: none !important; }
  .post-grid { display: block; }
  .faq details > * { display: block; }
}
