/* Verification Dossier / Case File Report theme. See agent/design-guidelines.md */
:root {
  color-scheme: light;
  --bg: #eee3c8; --surface: #f8f2e1; --surface-2: #e4d7b8; --ink: #221c12; --muted: #665a41; --rule: #d8c89e;
  --link: #8a2226; --focus: #a3272c;
  --panel: #15181c; --panel-2: #1d2126; --panel-ink: #eee3c8; --panel-muted: #a8a08c;
  --stamp: #a3272c; --navy: #1f2b3d; --gold: #b08a3e;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrapw: 72rem;
  --r: 8px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15181c; --surface: #1d2126; --surface-2: #191c20; --ink: #ede6d3; --muted: #a49c86; --rule: #34383e;
  --link: #e08087; --focus: #c85259;
  --panel: #0f1114; --panel-2: #17191d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15181c; --surface: #1d2126; --surface-2: #191c20; --ink: #ede6d3; --muted: #a49c86; --rule: #34383e;
    --link: #e08087; --focus: #c85259;
    --panel: #0f1114; --panel-2: #17191d;
  }
}

/* topic tones: --c fill, --c-ink text on fill, --c-text text on page */
.t-stamp { --c: #a3272c; --c-ink: #fbeceb; --c-text: #8a2226; }
.t-gold  { --c: #b08a3e; --c-ink: #2b2107; --c-text: #8c6d2e; }
.t-navy  { --c: #1f2b3d; --c-ink: #eef1f5; --c-text: #1f2b3d; }
:root[data-theme="dark"] .t-stamp { --c-text: #e28e91; }
:root[data-theme="dark"] .t-gold  { --c-text: #d1af6d; }
:root[data-theme="dark"] .t-navy  { --c-text: #94a7c2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-stamp { --c-text: #e28e91; }
  :root:not([data-theme="light"]) .t-gold  { --c-text: #d1af6d; }
  :root:not([data-theme="light"]) .t-navy  { --c-text: #94a7c2; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 1.05rem/1.68 var(--serif); overflow-x: hidden; transition: background-color .25s, color .25s; padding-bottom: env(safe-area-inset-bottom); }
main { flex: 1; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--stamp); color: #fbeceb; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; font-weight: 900; letter-spacing: -.005em; text-transform: uppercase; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { width: min(var(--wrapw), 100% - 2rem); margin-inline: auto; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
.short { display: none; }
.sec-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 900; }

/* ---------- shop strip ---------- */
.shopbar { background: var(--panel); color: var(--panel-ink); font: 700 .82rem/1.4 var(--display); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid rgba(255,255,255,.08); }
.shopbar-in { width: min(var(--wrapw), 100% - 2rem); margin-inline: auto; padding: .5rem 0; display: flex; gap: .9rem; align-items: baseline; justify-content: center; white-space: nowrap; overflow: hidden; }
.shopbar-in > span { overflow: hidden; text-overflow: ellipsis; color: var(--panel-muted); }
.shopbar a { color: #d1af6d; font-weight: 700; text-decoration: none; }
.shopbar a:hover { text-decoration: underline; }
.shopbar a span { display: inline-block; transition: transform .15s; }
.shopbar a:hover span { transform: translateX(3px); }

/* ---------- masthead: folder-tab nav ---------- */
.bar { background: var(--bg); border-bottom: 2px solid var(--rule); }
.bar-in { width: min(var(--wrapw), 100% - 2rem); margin-inline: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: .5rem 2rem; padding: .9rem 0 0; }
.brand { color: var(--ink); text-decoration: none; padding-bottom: .9rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo-mark { width: 1.8rem; height: 1.8rem; flex: none; transition: transform .3s ease; }
.brand:hover .logo-mark { transform: rotate(-8deg); }
.lm-ring { stroke: var(--navy); }
.lm-ring-in { stroke: var(--gold); }
.lm-tick { stroke: var(--stamp); }
.brand-name { font: 900 1.3rem/1 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.brand-name em { font: italic 400 1em/1 var(--serif); text-transform: none; color: var(--stamp); font-style: italic; padding-right: .1em; }
.bar nav { display: flex; justify-content: flex-end; gap: .3rem; font: 700 .82rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; align-self: end; }
.bar nav a {
  position: relative; color: var(--muted); text-decoration: none;
  padding: .6rem .95rem .55rem; margin-bottom: -2px;
  background: var(--surface-2); border: 2px solid var(--rule); border-bottom: none;
  border-radius: 7px 7px 0 0;
  transition: color .15s, background-color .15s, transform .15s;
}
.bar nav a:hover { color: var(--ink); transform: translateY(-2px); }
.bar nav a[aria-current] { color: var(--ink); background: var(--bg); border-color: var(--rule); box-shadow: inset 0 3px 0 var(--stamp); transform: translateY(-2px); z-index: 1; }
.theme-toggle { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .55rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .2s, border-color .2s; }
.theme-toggle:hover { border-color: var(--stamp); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.is-home .bar { background: var(--panel); color: var(--panel-ink); border-bottom-color: rgba(255,255,255,.14); }
.is-home .brand { color: var(--panel-ink); }
.is-home .bar nav a { color: var(--panel-muted); background: var(--panel-2); border-color: rgba(255,255,255,.14); }
.is-home .bar nav a:hover { color: var(--panel-ink); }
.is-home .bar nav a[aria-current] { color: var(--panel-ink); background: var(--panel); }
.is-home .theme-toggle { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: var(--panel-ink); }

@media (max-width: 52rem) {
  .long { display: none; } .short { display: inline; }
  .bar-in { grid-template-columns: 1fr auto; padding: .7rem 0 0; align-items: center; }
  .brand { padding-bottom: .6rem; }
  .bar nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin-inline: -.2rem; gap: .2rem; overflow-x: auto; scrollbar-width: none; font-size: .78rem; padding-top: .5rem; }
  .bar nav a { padding: .5rem .65rem .45rem; }
  .bar nav::-webkit-scrollbar { display: none; }
  .theme-toggle { margin-bottom: .6rem; }
  .brand-name { font-size: 1.15rem; }
}

/* ---------- shared bits ---------- */
.kicker, .row-cat, .chk-label { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .6rem; font: 700 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--c-text, var(--muted)); }
.kicker b, .filters b, .crumb-cat b, .row-cat b, .chk-label b, .cover-eyebrow b { display: inline-grid; place-items: center; min-width: 2em; height: 1.7em; padding: 0 .3em; border-radius: 50%; background: var(--c, var(--ink)); color: var(--c-ink, var(--bg)); font: 700 .8em/1 var(--mono); letter-spacing: 0; text-transform: none; }
.meta, .row-meta { margin: .8rem 0 0; font: 400 .74rem/1.3 var(--mono); color: var(--muted); letter-spacing: .01em; }
.desc, .row-desc { margin: .5rem 0 0; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.btn { font: 700 .88rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; cursor: pointer; border: 1.5px solid var(--ink); background: none; color: var(--ink); padding: .85rem 1.3rem; border-radius: 6px; transition: background .15s, color .15s, transform .15s; }
.btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.empty { color: var(--muted); font-family: var(--display); }

.btn-shop, .btn-ghost, .btn-dark { display: inline-flex; align-items: center; gap: .6rem; font: 700 .95rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; padding: 1.05rem 1.5rem; border-radius: 6px; transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s; }
.btn-shop span, .btn-dark span, .read-link span { display: inline-block; transition: transform .2s; }
.btn-shop:hover span, .btn-dark:hover span, .read-link:hover span { transform: translateX(4px); }
.btn-shop { background: var(--stamp); color: #fbeceb; box-shadow: 0 12px 28px -14px rgba(163,39,44,.75); }
.btn-shop:hover { transform: translateY(-3px); background: #8a2226; }
.btn-ghost { color: var(--panel-ink); border: 1.5px solid rgba(255,255,255,.28); }
.btn-ghost:hover { border-color: #d1af6d; color: #d1af6d; }
.btn-dark { background: #0f1114; color: #eee3c8; box-shadow: 0 14px 30px -16px rgba(0,0,0,.8); }
.btn-dark:hover { transform: translateY(-3px); background: #0a0c0e; }

/* ---------- approved-stamp CTA (shop band + end-of-post) ---------- */
.stamp-cta { position: relative; display: flex; align-items: center; gap: 1.1rem; text-decoration: none; color: inherit; padding: 1.1rem 1.4rem; border: 2px solid var(--stamp); border-radius: var(--r); background: var(--surface); transition: transform .2s, box-shadow .2s; }
.stamp-cta:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px var(--stamp); }
.stamp-cta-ring { width: 2.8rem; height: 2.8rem; flex: none; color: var(--stamp); }
.stamp-cta-ring circle, .stamp-cta-ring path { stroke: currentColor; }
.stamp-cta-text { display: flex; flex-direction: column; gap: .15rem; }
.stamp-cta-text strong { font: 900 1.02rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.stamp-cta-text small { font: 400 .82rem/1.3 var(--serif); color: var(--muted); }
.stamp-cta-arrow { margin-left: auto; font-size: 1.2rem; transition: transform .2s; }
.stamp-cta:hover .stamp-cta-arrow { transform: translateX(4px); }

/* ---------- home: hero cover sheet ---------- */
.hero { position: relative; overflow: hidden; color: var(--panel-ink); background: var(--panel); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: linear-gradient(90deg, var(--stamp) 0 34%, var(--gold) 34% 67%, var(--navy) 67%); }
.hero-in { display: grid; gap: 2rem; align-items: center; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.cover { position: relative; padding: clamp(1.6rem, 3.4vw, 2.4rem) clamp(1.6rem, 3.4vw, 2.2rem); background: var(--panel-2); border-top: 5px double rgba(238,227,200,.55); border-bottom: 1px solid rgba(238,227,200,.18); box-shadow: 0 22px 44px -30px rgba(0,0,0,.7); }
.cover-eyebrow { margin: 0 0 1rem; font: 700 .7rem/1 var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--gold); }
.cover-eyebrow b { margin-right: .5rem; }
.dateline { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.2rem; font: 400 .78rem/1 var(--mono); color: var(--panel-muted); letter-spacing: .04em; text-transform: uppercase; }
.dateline::before { content: ""; width: 1.6rem; height: 2px; background: var(--stamp); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 900; line-height: 1.04; letter-spacing: 0; max-width: 19ch; text-transform: none; }
.hero-sub { margin: 1.4rem 0 0; font-size: clamp(1rem, 1.6vw, 1.14rem); line-height: 1.55; color: var(--panel-muted); max-width: 32rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-art { width: 100%; max-width: 17rem; justify-self: center; height: auto; overflow: visible; color: var(--panel-muted); }
@media (min-width: 60rem) {
  .hero-in { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 3rem; }
  .hero-art { max-width: 20rem; justify-self: end; }
}
@media (max-width: 30rem) { .btn-shop, .btn-ghost { width: 100%; justify-content: center; } }

.ha-doc { stroke: rgba(238,227,200,.3); }
.ha-box { stroke: rgba(238,227,200,.4); }
.ha-check { stroke: #d1af6d; }
.ha-rule { stroke: rgba(238,227,200,.2); stroke-width: 4; }
.ha-stamp-ring { stroke: var(--stamp); }
.ha-stamp-ring-in { stroke: var(--stamp); opacity: .6; }
.ha-stamp-tick { stroke: var(--stamp); }

/* ---------- home: checklist (replaces colour-tile topic table) ---------- */
.checklist-sec { padding: clamp(2.2rem, 5.5vw, 3.5rem) 0 .5rem; }
.checklist { list-style: none; margin: 1.4rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.chk { display: flex; align-items: center; gap: 1rem; padding: 1.15rem .3rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: background-color .15s, padding-left .15s; }
.chk:hover { background: var(--surface); padding-left: .6rem; }
.chk-box { flex: none; width: 1.6rem; height: 1.6rem; color: var(--c, var(--stamp)); }
.chk-box svg { width: 100%; height: 100%; stroke: currentColor; }
.chk-box path { opacity: 0; transition: opacity .15s; }
.chk:hover .chk-box path, .chk:focus-visible .chk-box path { opacity: 1; }
.chk-body { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }
.chk-label { margin: 0; font-size: .78rem; }
.chk-blurb { font: 400 .92rem/1.4 var(--serif); color: var(--muted); }
.chk-n { flex: none; font: 700 .78rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- home: shop band ---------- */
.shopband { padding: clamp(2.2rem, 5.5vw, 3.5rem) 0; }
.shopband-in { display: flex; justify-content: center; }
.shopband .stamp-cta { max-width: 34rem; width: 100%; }

/* ---------- report table (replaces card grid everywhere PostCard is used) ---------- */
.report-sec { padding: 1rem 0 3rem; }
.list.report { list-style: none; margin: 1.25rem 0 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: rpt; }
.row {
  counter-increment: rpt;
  position: relative; display: grid;
  grid-template-columns: 2.6rem auto 1fr auto; align-items: start; gap: .3rem 1rem;
  padding: 1.1rem .6rem; border-bottom: 1px solid var(--rule);
  transition: background-color .15s;
}
.row[hidden] { display: none; }
.list.report .row:nth-child(even) { background: color-mix(in srgb, var(--c, var(--navy)) 5%, var(--surface)); }
.row:hover { background: color-mix(in srgb, var(--c, var(--navy)) 10%, var(--surface)); }
.row-n { font: 700 .82rem/1.9 var(--mono); color: var(--muted); }
.row-n::before { content: counter(rpt, decimal-leading-zero); }
.row-cat { margin: 0; align-self: center; }
.row-main { grid-column: 3; min-width: 0; }
.row h2, .row h3 { font-size: 1.05rem; font-weight: 900; line-height: 1.25; text-transform: none; }
.row h2 a, .row h3 a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 3px; text-underline-offset: .12em; transition: text-decoration-color .2s; }
.row h2 a::after, .row h3 a::after { content: ""; position: absolute; inset: 0; }
.row:hover h2 a, .row:hover h3 a { text-decoration-color: var(--c, var(--stamp)); }
.row-desc { display: none; }
.row-tag { grid-column: 3; align-self: start; margin-top: .5rem; font: 700 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--c-text, var(--muted)); }
.row-meta { grid-column: 3; align-self: start; margin: .3rem 0 0; min-width: 0; }
@media (min-width: 46rem) {
  .row { grid-template-columns: 2.6rem 9rem 1fr auto 9rem; }
  .row-desc { display: block; }
  .row-tag { grid-column: 4; margin-top: 0; align-self: center; }
  .row-meta { grid-column: 5; align-self: center; white-space: nowrap; margin: 0; }
}

/* ---------- library, search, filters ---------- */
.lib-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.search { flex: 1 1 18rem; max-width: 28rem; }
.search input { width: 100%; font: 500 1rem var(--serif); color: var(--ink); background: var(--surface) no-repeat .95rem 50% / 1.1rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23889890' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.5-4.5'/%3E%3C/svg%3E"); border: 1.5px solid var(--rule); border-radius: 6px; padding: .85rem 1rem .85rem 2.7rem; transition: border-color .15s, box-shadow .15s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 4px rgba(163,39,44,.16); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.filters button { display: inline-flex; align-items: center; gap: .45rem; font: 700 .82rem/1 var(--display); text-transform: uppercase; letter-spacing: .01em; background: var(--surface); border: 1.5px solid var(--rule); padding: .5rem .8rem .5rem .55rem; border-radius: 6px; color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, color .15s, transform .15s; }
.filters [data-chip="all"] { padding-left: .8rem; }
.filters button > span { font: 500 .76em/1 var(--mono); color: var(--muted); text-transform: none; }
.filters button:hover { border-color: var(--c, var(--ink)); transform: translateY(-1px); }
.filters button[aria-pressed="true"] { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: var(--c-ink, var(--bg)); }
.filters button[aria-pressed="true"] > span { color: inherit; opacity: .75; }
.filters button[aria-pressed="true"] b { background: rgba(0,0,0,.14); color: inherit; }
.more { margin: 2rem 0; }

/* ---------- cover-sheet header (category / archive / folder) ---------- */
.cover-head { position: relative; padding: clamp(1.8rem, 4.4vw, 2.6rem) clamp(1.4rem, 3vw, 2rem); margin: clamp(1.6rem, 4vw, 2.5rem) 0 1.5rem; background: var(--surface); border-top: 5px double var(--rule); border-bottom: 1px solid var(--rule); box-shadow: 0 16px 30px -26px rgba(0,0,0,.4); }
.cover-eyebrow { display: block; }
.cover-head h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); font-weight: 900; letter-spacing: 0; line-height: 1.03; }
.cover-head p:not(.cover-eyebrow) { color: var(--muted); margin: .8rem 0 0; font-size: 1.03rem; max-width: 38rem; text-transform: none; }

/* ---------- article (kept calm) ---------- */
.art { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 1rem; }
.art-head { position: relative; isolation: isolate; padding: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.art-head::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--bg)) 0%, var(--bg) 100%); border-bottom: 1px solid var(--rule); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font: 500 .78rem/1.4 var(--mono); color: var(--muted); margin: 0 0 1.2rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumb-cat { display: inline-flex; align-items: center; gap: .4rem; color: var(--c-text) !important; font-weight: 700; text-transform: none; }
.art-head h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.06; letter-spacing: 0; max-width: 22ch; text-transform: none; }
.art-lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.5; font-style: italic; color: var(--muted); margin: 1.1rem 0 0; max-width: 44rem; text-transform: none; }
.art-meta { font: 400 .76rem/1.4 var(--mono); color: var(--muted); margin: 1.2rem 0 0; }
.toc { display: none; }
@media (min-width: 68rem) {
  .art { grid-template-columns: 15rem minmax(0, 44rem); column-gap: 4rem; justify-content: center; }
  .art-head { grid-column: 1 / -1; }
  .toc { display: block; grid-column: 1; grid-row: 2 / span 2; align-self: start; position: sticky; top: 1.5rem; padding-top: 2.4rem; font: 500 .84rem/1.35 var(--serif); text-transform: none; }
  .toc p { margin: 0 0 .8rem; font: 700 .68rem/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); counter-reset: s; }
  .toc li { counter-increment: s; }
  .toc a { display: flex; gap: .6rem; padding: .4rem 0 .4rem .9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
  .toc a::before { content: counter(s, decimal-leading-zero); font: 500 .74rem/1.6 var(--mono); opacity: .7; }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current] { color: var(--c-text); border-left-color: var(--c); }
  .prose, .post-tools { grid-column: 2; }
}

.prose { font-size: 1.04rem; line-height: 1.73; overflow-wrap: anywhere; padding-top: 1rem; max-width: 44rem; text-transform: none; }
@media (min-width: 48rem) { .prose { font-size: 1.09rem; } }
.prose p, .prose ul, .prose ol { margin: 1.1em 0; }
.prose h2 { font-size: clamp(1.28rem, 2.3vw, 1.62rem); margin: 2.2em 0 .3em; scroll-margin-top: 1rem; font-weight: 900; }
.prose h2::before { content: ""; display: block; width: 2.2rem; height: 4px; border-radius: 2px; background: var(--c); margin-bottom: .7rem; }
.prose h3 { font-size: 1.08rem; margin: 1.9em 0 .2em; font-weight: 900; }
.prose h2 + p, .prose h3 + p { margin-top: .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose li::marker { color: var(--c-text); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose a { color: var(--link); }
.prose blockquote { margin: 1.8em 0; padding: 1rem 1.25rem; border-radius: 8px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-left: 4px solid var(--c); font-style: italic; }
.prose blockquote p { margin: .3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose code { font: .85em var(--mono); background: var(--surface-2); padding: .12em .35em; border-radius: 5px; }
.table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font: 400 .87rem/1.45 var(--serif); font-variant-numeric: tabular-nums; }
.prose th { text-align: left; font: 700 .66rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .06em; padding: .8rem .9rem; background: var(--ink); color: var(--bg); white-space: nowrap; }
.prose thead tr { box-shadow: inset 0 -3px 0 var(--c); }
.prose td { padding: .7rem .9rem; border-top: 1px solid var(--rule); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: var(--surface-2); }

.post-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.post-tools a { font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); text-decoration: none; padding: .6rem .85rem; border: 1.5px solid var(--rule); border-radius: 6px; transition: border-color .15s; }
.post-tools a:hover { border-color: var(--c); }

.related { padding-top: 3rem; }
.related h2 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 900; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 2rem 3.5rem; }
.end-shop { display: flex; justify-content: center; margin-block: 0 4rem; }
.end-shop .stamp-cta { max-width: 30rem; width: 100%; }
.pager a { display: block; padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font: 700 .95rem/1.3 var(--display); text-transform: uppercase; transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--stamp); transform: translateY(-2px); }
.pager span { display: block; font: 500 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .5rem; }
.pager .next { text-align: right; }
@media (max-width: 36rem) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* ---------- footer ---------- */
.foot { position: relative; margin-top: 3rem; padding: 3rem 0 2rem; color: var(--panel-muted); font: 400 .9rem/1.5 var(--serif); background: var(--panel); }
.foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--stamp) 0 34%, var(--gold) 34% 67%, var(--navy) 67%); }
.is-home .foot { margin-top: 1rem; }
.foot-in { width: min(var(--wrapw), 100% - 2rem); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-end; }
.foot p { margin: 0; max-width: 26rem; }
.foot-brand { margin-bottom: .7rem !important; color: var(--panel-ink); }
.foot-brand .brand-name { font-size: 1.6rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; }
.foot nav a { display: inline-flex; align-items: center; gap: .45rem; color: var(--panel-ink); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; font-family: var(--display); font-size: .85rem; }
.foot nav a i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); }
.foot nav a span { font: 400 .76rem var(--mono); color: var(--panel-muted); text-transform: none; }
.foot nav a:hover { text-decoration: underline; text-decoration-color: var(--c); }
.foot-copy { width: min(var(--wrapw), 100% - 2rem); margin: 2rem auto 0 !important; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); font: 400 .74rem/1 var(--mono); max-width: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
