/* =====================================================================
   "Brass Age" theme: belles lettres meets the launch pad.
   Parchment, ink and brass by day; a night launch by dark.
   The two :root blocks hold every colour, font and size, and the admin
   Theme page edits them with pickers. Everything after them is layout.
   Fonts are self-hosted in theme/fonts (see fonts.css).
   ===================================================================== */

:root {
  --bg: #f2ebdb;
  --surface: #faf6ec;
  --text: #1f1b16;
  --muted: #6b604f;
  --border: #d8ccb2;
  --accent: #a3461f;
  --accent-text: #fbf6ea;
  --link: #8a3a19;
  --code-bg: #e9dfc8;
  --brass: #a07a2a;
  --grid: rgba(48, 72, 110, 0.07);
  --font-body: "Newsreader", Charter, "Sitka Text", Cambria, Georgia, serif;
  --font-head: "Cormorant Garamond", "Iowan Old Style", Garamond, Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-ornament: "IM Fell English", "Cormorant Garamond", Georgia, serif;
  --text-size: 19px;
  --label-scale: 1.25;
  --line-height: 1.65;
  --measure: 40rem;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d121b;
    --surface: #141b27;
    --text: #ece3cf;
    --muted: #a59b87;
    --border: #2b3445;
    --accent: #e3894e;
    --accent-text: #1a0f08;
    --link: #f1aa76;
    --code-bg: #1a2230;
    --brass: #d3ad5b;
    --grid: rgba(140, 180, 230, 0.05);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Everything is sized relative to --text-size, so the Text size slider scales the whole page */
html { font-size: calc(var(--text-size) * 0.8421); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background-color: var(--bg);
  /* fine paper grain + a faint blueprint grid */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .26 0 0 0 0 .12 .55 0 0 0 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 220px 220px, 28px 28px, 28px 28px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: var(--line-height);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
}
@media (prefers-color-scheme: dark) {
  body {
    /* a field of faint stars instead of paper */
    background-image:
      radial-gradient(1px 1px at 23px 41px, rgba(255, 244, 220, .55), transparent 60%),
      radial-gradient(1px 1px at 151px 97px, rgba(255, 244, 220, .35), transparent 60%),
      radial-gradient(1.5px 1.5px at 89px 173px, rgba(255, 230, 190, .45), transparent 60%),
      radial-gradient(1px 1px at 197px 12px, rgba(200, 220, 255, .4), transparent 60%),
      linear-gradient(var(--grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 220px 220px, 220px 220px, 220px 220px, 220px 220px, 28px 28px, 28px 28px;
  }
}
::selection { background: color-mix(in srgb, var(--brass) 35%, transparent); }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--brass) 70%, transparent); transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -.005em; margin: 1.8em 0 .5em; font-variant-numeric: lining-nums; }
.wrap { width: 100%; max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.icon.flip { transform: scaleX(-1); }
.amp { font-family: var(--font-head); font-style: italic; font-weight: 500; color: var(--brass); padding: 0 .04em; }
.mono, .kicker, .eyebrow, .telemetry, .button, .tags a, .site-nav a, .meta { font-family: var(--font-mono); }

/* ---------- emblem ---------- */
.emblem { width: 42px; height: 42px; flex-shrink: 0; overflow: visible; }
.em-gear { fill: var(--brass); transform-box: fill-box; transform-origin: center; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.em-face { fill: var(--surface); }
.em-orbit, .em-orbit-front { fill: none; stroke: var(--brass); stroke-width: 1.3; }
.em-orbit { opacity: .55; }
.em-planet { fill: var(--accent); }
.em-moon { fill: var(--text); }
.em-star { fill: var(--brass); }
.brand:hover .em-gear { transform: rotate(51.4deg); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 3px double var(--border); }
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4rem; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; line-height: 1; letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tagline { font-style: italic; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .2rem; }
.site-nav { display: flex; align-items: center; gap: .1rem; flex-shrink: 0; }
.site-nav a { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 44px; min-height: 44px; justify-content: center; padding: .25rem .35rem; color: var(--muted); text-decoration: none; font-size: calc(.58rem * var(--label-scale)); letter-spacing: .1em; text-transform: uppercase; border-radius: 2px; }
.site-nav a .icon { width: calc(19px * var(--label-scale)); height: calc(19px * var(--label-scale)); transition: transform .25s; }
.site-nav a:hover { color: var(--accent); }
.site-nav a:hover .icon { transform: translateY(-2px); }
.site-nav a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brass); }
@media (min-width: 720px) {
  .site-nav { gap: .35rem; }
  .site-nav a { flex-direction: row; gap: .45rem; font-size: calc(.68rem * var(--label-scale)); padding: .35rem .6rem; }
  .site-nav a .icon { width: calc(16px * var(--label-scale)); height: calc(16px * var(--label-scale)); }
  .emblem { width: 48px; height: 48px; }
  .brand-title { font-size: 1.7rem; }
}

/* telemetry strip: mission clock since the first dispatch */
.telemetry { border-bottom: 1px solid var(--border); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.telemetry-inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: .45rem; padding-bottom: .45rem; }
.telemetry-inner > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.telemetry-inner > .met { flex-shrink: 0; }
.telemetry i { font-style: normal; color: var(--brass); }
.met { font-variant-numeric: tabular-nums; white-space: nowrap; }
.met::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: .55em; vertical-align: .1em; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); animation: beacon 2.4s ease-in-out infinite; }
@keyframes beacon { 50% { opacity: .35; box-shadow: 0 0 0 1px transparent; } }

.owner-bar { background: var(--code-bg); font-family: var(--font-mono); font-size: calc(.68rem * var(--label-scale)); letter-spacing: .06em; }
.owner-bar .wrap { display: flex; gap: .5rem; padding-top: .4rem; padding-bottom: .4rem; align-items: center; }
.owner-bar span { margin-left: auto; color: var(--muted); }

main.wrap { padding-top: 2.25rem; padding-bottom: 3.5rem; min-height: 60vh; }

/* reading progress: a rocket riding a brass rail */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; pointer-events: none; }
.progress-bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: linear-gradient(90deg, transparent, var(--brass) 30%, var(--accent)); }
.progress-rocket { position: absolute; right: -9px; top: -7px; width: 17px; height: 17px; color: var(--accent); transform: rotate(90deg); opacity: 0; transition: opacity .3s; }
.progress.moving .progress-rocket { opacity: 1; }

/* ---------- shared labels ---------- */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: 0 0 .55rem; font-size: calc(.66rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kicker .no { color: var(--brass); font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.kicker .rule { flex: 1 1 1.5rem; height: 1px; min-width: 1rem; background: linear-gradient(90deg, var(--brass), color-mix(in srgb, var(--brass) 15%, transparent)); }
.kicker time { white-space: nowrap; }
.kicker .read { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
.kicker .read .icon { width: calc(12px * var(--label-scale)); height: calc(12px * var(--label-scale)); color: var(--brass); }
.badge { display: inline-block; font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--accent); color: var(--accent-text); padding: .15rem .5rem; border-radius: 1px; }
.eyebrow { display: flex; align-items: center; gap: .45rem; font-size: calc(.66rem * var(--label-scale)); letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin: 0 0 .5rem; }
.eyebrow a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.eyebrow .icon { width: 15px; height: 15px; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { margin: 0; font-size: clamp(2.5rem, 10vw, 3.4rem); }
.lead { color: var(--muted); font-size: 1.08em; font-style: italic; margin: .45rem 0 0; }

/* ---------- dispatch cards ---------- */
.post-list { display: grid; gap: 1.6rem; }
.post-list > * { min-width: 0; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 0 var(--border), 0 14px 30px -24px rgba(40, 25, 5, .45); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
/* brass corner brackets, like a mounted specimen plate */
.card::before {
  content: ""; position: absolute; inset: 7px; z-index: 2; pointer-events: none;
  --b: var(--brass); --l: 16px; --w: 1.5px;
  background:
    linear-gradient(var(--b), var(--b)) top left / var(--l) var(--w),
    linear-gradient(var(--b), var(--b)) top left / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) top right / var(--l) var(--w),
    linear-gradient(var(--b), var(--b)) top right / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) bottom left / var(--l) var(--w),
    linear-gradient(var(--b), var(--b)) bottom left / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) bottom right / var(--l) var(--w),
    linear-gradient(var(--b), var(--b)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  transition: inset .35s cubic-bezier(.2, .8, .2, 1);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 var(--border), 0 22px 36px -24px rgba(40, 25, 5, .55); }
.card:hover::before { inset: 4px; }
.card-image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--code-bg); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
/* photos rest slightly sepia, then "develop" to full colour on hover */
.card-image img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.28) saturate(.88) contrast(1.02); transition: filter .8s ease, transform .8s ease; }
.card:hover .card-image img { filter: none; transform: scale(1.02); }
.card-body { padding: 1.3rem 1.4rem 1.35rem; }
.card-title { margin: 0 0 .45rem; font-size: 1.75rem; line-height: 1.08; }
.card-featured .card-title { font-size: clamp(2rem, 8vw, 2.5rem); }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is clickable */
.card-title a:hover { color: var(--accent); }
.excerpt { margin: 0 0 1rem; color: var(--muted); font-size: .96em; line-height: 1.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-foot .tags { position: relative; z-index: 3; }
.more { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; font-family: var(--font-mono); font-size: calc(.66rem * var(--label-scale)); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--brass); white-space: nowrap; }
.more .icon { width: 22px; height: 22px; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.card:hover .more { color: var(--accent); }
.card:hover .more .icon { transform: translateX(4px); }
@media (min-width: 720px) {
  .card.has-image:not(.card-featured) { display: grid; grid-template-columns: 1fr 14rem; }
  .card.has-image:not(.card-featured) .card-image { order: 2; aspect-ratio: auto; height: 100%; min-height: 11rem; border-bottom: 0; border-left: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; }
}

/* luggage-tag tags with a punched eyelet */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; }
.tags a {
  position: relative; display: inline-block; padding: .3rem .6rem .3rem 1.15rem;
  font-size: calc(.6rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--text);
  background: var(--code-bg);
  clip-path: polygon(.55rem 0, 100% 0, 100% 100%, .55rem 100%, 0 50%);
  transition: background .2s, color .2s;
}
.tags a::before { content: ""; position: absolute; left: .45rem; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brass) 60%, transparent); }
.tags a:hover { background: var(--brass); color: var(--surface); }

.tag-cloud { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .65rem; }
.tag-cloud a { display: inline-flex; align-items: center; gap: .6rem; position: relative; padding: .55rem .9rem .55rem 1.5rem; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); clip-path: polygon(.8rem 0, 100% 0, 100% 100%, .8rem 100%, 0 50%); }
.tag-cloud a::before { content: ""; position: absolute; left: .7rem; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--brass); }
.tag-cloud a:hover { background: var(--code-bg); color: var(--accent); }
.tag-cloud span { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); color: var(--brass); }

/* pagination & post navigation */
.pagination, .post-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2.5rem; font-family: var(--font-mono); font-size: calc(.7rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; }
.pagination a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--brass); }
.pagination a .icon, .post-nav .icon { width: 22px; height: 22px; }
.pagination a:last-child { justify-self: end; }
.page-count { font-family: var(--font-head); font-style: italic; font-size: 1rem; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.page-count i { font-style: normal; }
.post-nav { grid-template-columns: 1fr 1fr; border-top: 3px double var(--border); padding-top: 1.5rem; }
.post-nav a { text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; letter-spacing: 0; text-transform: none; line-height: 1.2; }
.post-nav a > span:first-child { display: flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-weight: 400; font-size: calc(.62rem * var(--label-scale)); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: .35rem; }
.post-nav .next { text-align: right; }
.post-nav .next > span:first-child { justify-content: flex-end; }
.post-nav a:hover { color: var(--accent); }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 2px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); font-size: calc(.68rem * var(--label-scale)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.button:hover { color: var(--accent-text); filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button.ghost:hover { border-color: var(--brass); color: var(--accent); filter: none; }
.button .icon { width: 17px; height: 17px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.share-btn:hover .icon { transform: translate(4px, -4px) rotate(-6deg); }

/* ---------- single post ---------- */
.post-header { margin-bottom: 2rem; text-align: left; }
.post-title { font-size: clamp(2.5rem, 10.5vw, 3.6rem); margin: .2rem 0 0; line-height: 1.02; letter-spacing: -.012em; text-wrap: balance; }
.post-header .lead { font-size: 1.15em; text-wrap: pretty; }
/* compass-rose rule under the header */
.post-header::after, .prose hr {
  content: ""; display: block; height: 24px; margin: 1.75rem auto 0; max-width: 18rem; border: 0;
  background: var(--brass);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24'%3E%3Cpath d='M0 12h92M148 12h92' stroke='%23000' stroke-width='1'/%3E%3Ccircle cx='98' cy='12' r='1.8'/%3E%3Ccircle cx='142' cy='12' r='1.8'/%3E%3Ccircle cx='120' cy='12' r='8.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3Cpath d='M120 1l2.3 8.7L131 12l-8.7 2.3L120 23l-2.3-8.7L109 12l8.7-2.3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24'%3E%3Cpath d='M0 12h92M148 12h92' stroke='%23000' stroke-width='1'/%3E%3Ccircle cx='98' cy='12' r='1.8'/%3E%3Ccircle cx='142' cy='12' r='1.8'/%3E%3Ccircle cx='120' cy='12' r='8.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3Cpath d='M120 1l2.3 8.7L131 12l-8.7 2.3L120 23l-2.3-8.7L109 12l8.7-2.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.notice { font-family: var(--font-mono); font-size: calc(.7rem * var(--label-scale)); letter-spacing: .06em; background: var(--code-bg); border-left: 3px solid var(--accent); padding: .55rem .8rem; margin: 0 0 1.2rem; }
.post-cover { margin: 0 0 2.25rem; padding: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: 6px 6px 0 -1px var(--bg), 6px 6px 0 0 color-mix(in srgb, var(--brass) 55%, transparent); }
.post-cover img { width: 100%; }

.prose { counter-reset: fig; hanging-punctuation: first; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure, .prose .table-wrap, .prose .embed { margin: 0 0 1.35em; }
/* illuminated initial with a hint of letterpress mis-registration */
.prose > p:first-child::first-letter {
  float: left; font-family: var(--font-ornament); font-size: 4.1em; line-height: .78; margin: .07em .1em 0 -.02em; padding: 0;
  color: var(--accent); text-shadow: .045em .045em 0 color-mix(in srgb, var(--brass) 55%, transparent);
}
.prose > p:first-child::first-line { font-variant: small-caps; letter-spacing: .045em; }
.prose h2 { font-size: 1.85rem; margin-top: 2em; }
.prose h2::before { content: "§"; font-family: var(--font-ornament); color: var(--brass); margin-right: .35em; font-weight: 400; }
.prose h3 { font-size: 1.45rem; }
.prose h4 { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.prose ul { list-style: none; padding-left: 1.4em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.05em; top: .68em; width: .34em; height: .34em; background: var(--brass); transform: rotate(45deg); }
.prose ul ul > li::before { background: transparent; box-shadow: inset 0 0 0 1.2px var(--brass); }
.prose ul > li.task::before { display: none; }
.prose ol { padding-left: 1.6em; }
.prose ol > li::marker { font-family: var(--font-mono); font-size: .78em; color: var(--brass); }
.prose li { margin: .35em 0; padding-left: .1em; }
.prose li.task { list-style: none; margin-left: -1.4em; }
.prose li.task input { margin: 0 .5em 0 0; accent-color: var(--accent); }
.prose blockquote { position: relative; margin-left: 0; padding: .1em 0 .1em 2.3rem; font-style: italic; font-size: 1.06em; color: var(--muted); }
.prose blockquote::before { content: "“"; position: absolute; left: -.05rem; top: -.3rem; font-family: var(--font-head); font-style: normal; font-weight: 700; font-size: 4rem; line-height: 1; color: var(--brass); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose a[href^="http"]::after { content: "↗"; font-family: var(--font-mono); font-size: .62em; vertical-align: .55em; margin-left: .12em; color: var(--brass); text-decoration: none; display: inline-block; }
.prose code { font-family: var(--font-mono); font-size: .8em; background: var(--code-bg); padding: .1em .35em; border-radius: 2px; }
/* code blocks read like a received transmission */
.prose pre {
  position: relative; background: var(--code-bg); padding: 2.4rem 1.1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; font-size: .82em; line-height: 1.6;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--text) 3%, transparent) 3px 4px);
}
.prose pre::before { content: "▸ Incoming transmission"; position: absolute; top: .7rem; left: 1.1rem; font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.prose pre::after { content: ""; position: absolute; top: .95rem; right: 1rem; width: 34px; height: 6px; background: radial-gradient(circle, var(--brass) 2.2px, transparent 2.6px) 0 0 / 12px 6px repeat-x; opacity: .8; }
.prose pre code { background: none; padding: 0; font-size: 1em; }
/* figures as mounted plates, numbered in Roman numerals */
.prose figure { margin-left: 0; margin-right: 0; counter-increment: fig; }
.prose figure img, .prose > p > img { padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 1px; margin: 0 auto; box-shadow: 0 16px 28px -22px rgba(40, 25, 5, .55); }
.prose figcaption { font-style: italic; font-size: .88rem; color: var(--muted); text-align: center; margin-top: .75rem; }
.prose figcaption::before { content: "Fig. " counter(fig, upper-roman) " — "; font-family: var(--font-mono); font-style: normal; font-size: calc(.62rem * var(--label-scale)); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.prose mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--brass) 40%, transparent) 55%); color: inherit; padding: 0 .1em; }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92em; border-top: 3px double var(--border); border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.prose th, .prose td { border-bottom: 1px dotted var(--border); padding: .6em .7em; text-align: left; vertical-align: top; }
.embed { position: relative; aspect-ratio: 16 / 9; padding: 6px; background: var(--surface); border: 1px solid var(--border); }
.embed iframe { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border: 0; }
/* a little compass rose closes every dispatch */
.prose > p:last-child::after {
  content: ""; display: inline-block; width: .75em; height: .75em; margin-left: .4em; vertical-align: -.02em; background: var(--brass);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l2.8 9.2L24 12l-9.2 2.8L12 24l-2.8-9.2L0 12l9.2-2.8z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l2.8 9.2L24 12l-9.2 2.8L12 24l-2.8-9.2L0 12l9.2-2.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose hr { margin: 2.6em auto; }

.post-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 2.75rem 0 0; }

.related { margin-top: 3rem; }
.related h2 { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-weight: 400; font-size: calc(.68rem * var(--label-scale)); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin: 0 0 1rem; }
.related h2 .icon { width: 17px; height: 17px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1.1rem; }
.related-item { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: var(--text); }
.related-item img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; padding: 4px; background: var(--surface); border: 1px solid var(--border); filter: sepia(.28) saturate(.88); transition: filter .8s; }
.related-item:hover img { filter: none; }
.related-title { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1.15; }
.related-item:hover .related-title { color: var(--accent); }
.related-item time { font-family: var(--font-mono); color: var(--muted); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- archive: a ledger with dotted leaders ---------- */
.archive-year h2 { display: flex; align-items: baseline; gap: .6rem; font-size: 2.2rem; margin: 2.25rem 0 .25rem; }
.archive-year h2 small { font-family: var(--font-mono); font-weight: 400; font-size: calc(.66rem * var(--label-scale)); letter-spacing: .2em; color: var(--brass); }
.archive-year:first-child h2 { margin-top: 0; }
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-month { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 1.3rem 0 .2rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.archive-list a { display: flex; align-items: baseline; gap: .6rem; padding: .55rem 0; text-decoration: none; color: var(--text); }
.archive-no { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); color: var(--brass); letter-spacing: .06em; flex-shrink: 0; }
.archive-title { font-family: var(--font-head); font-weight: 600; font-size: 1.22rem; line-height: 1.2; }
.leader { flex: 1; min-width: 1.5rem; border-bottom: 1.5px dotted color-mix(in srgb, var(--muted) 55%, transparent); transform: translateY(-.3em); }
.archive-list time { font-family: var(--font-mono); color: var(--muted); font-size: calc(.66rem * var(--label-scale)); letter-spacing: .06em; white-space: nowrap; }
.archive-list a:hover .archive-title { color: var(--accent); }

/* ---------- search ---------- */
.search-form { position: relative; }
.search-icon { position: absolute; left: 0; top: 50%; width: 24px; height: 24px; margin-top: -12px; color: var(--brass); pointer-events: none; }
.search-form input { width: 100%; font: italic 1.5rem var(--font-head); padding: .6rem 0 .6rem 2.2rem; border: 0; border-bottom: 2px solid var(--text); background: transparent; color: var(--text); border-radius: 0; -webkit-appearance: none; appearance: none; }
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; background: linear-gradient(45deg, transparent 45%, var(--brass) 45% 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--brass) 45% 55%, transparent 55%); }
.search-form input::placeholder { color: var(--muted); opacity: .8; }
.search-form input:focus { outline: none; border-bottom-color: var(--accent); }
.search-status { font-family: var(--font-mono); color: var(--muted); font-size: calc(.66rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; min-height: 1.4em; margin-top: 1rem; }
.search-results { display: grid; }
.result { display: block; padding: 1rem 0; border-bottom: 1px dotted var(--border); text-decoration: none; color: var(--text); }
.result h2 { margin: 0 0 .25rem; font-size: 1.45rem; }
.result:hover h2 { color: var(--accent); }
.result p { margin: .2rem 0 0; color: var(--muted); font-size: .94em; }
.result mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--brass) 45%, transparent) 55%); color: inherit; padding: 0 .05em; }
.result .result-tags { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-top: .45rem; }

/* ---------- empty & lost ---------- */
.empty, .lost { text-align: center; padding: 2.5rem 0 1rem; }
.empty h1, .lost h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); margin: .3rem 0 .4rem; }
.empty p { color: var(--muted); font-style: italic; }
.empty-quill { width: 64px; height: 64px; color: var(--brass); }
.lost .eyebrow { justify-content: center; }
.lost-sat { width: 84px; height: 84px; color: var(--brass); animation: drift 9s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 50% { transform: translate(10px, -8px) rotate(8deg); } }
.lost-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- footer colophon ---------- */
.site-footer { border-top: 3px double var(--border); color: var(--muted); margin-top: 1rem; }
.footer-inner { padding-top: 2.25rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
.colophon { text-align: center; margin-bottom: 1.75rem; }
.emblem-foot { width: 44px; height: 44px; opacity: .9; }
.emblem-foot .em-gear { animation: turn 60s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.fin { font-family: var(--font-ornament); font-style: italic; font-size: 1.7rem; color: var(--text); margin: .35rem 0 .1rem; line-height: 1; }
.colophon-line { font-family: var(--font-mono); font-size: calc(.6rem * var(--label-scale)); letter-spacing: .18em; text-transform: uppercase; margin: 0; }
.colophon-line i { font-style: normal; color: var(--brass); }
.colophon-line .amp { font-size: 1.4em; text-transform: none; letter-spacing: 0; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; font-size: .85rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 1.1rem; font-family: var(--font-mono); font-size: calc(.64rem * var(--label-scale)); letter-spacing: .12em; text-transform: uppercase; }
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-links .icon { width: 16px; height: 16px; color: var(--brass); }

/* back-to-top rocket */
.liftoff { position: fixed; right: calc(1rem + env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 25; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--brass); background: var(--surface); color: var(--accent); cursor: pointer; box-shadow: 0 10px 24px -12px rgba(40, 25, 5, .6); transition: opacity .3s, transform .3s; }
.liftoff[hidden] { display: grid; opacity: 0; pointer-events: none; transform: translateY(12px); }
.liftoff .icon { width: 24px; height: 24px; transition: transform .3s; }
.liftoff .flame { color: var(--brass); opacity: 0; transition: opacity .2s; }
.liftoff:hover .icon { transform: translateY(-3px); }
.liftoff:hover .flame { opacity: 1; animation: flicker .12s steps(2) infinite; }
.liftoff.launch .icon { animation: launch .9s cubic-bezier(.55, 0, .8, .3) forwards; }
.liftoff.launch .flame { opacity: 1; }
@keyframes flicker { 50% { opacity: .4; } }
@keyframes launch { 0% { transform: translateY(0); } 15% { transform: translateY(2px); } 100% { transform: translateY(-110vh); } }

@media (max-width: 420px) {
  html { font-size: calc(var(--text-size) * 0.8); } /* a touch smaller on narrow phones */
  .brand-tagline { display: none; }
  .emblem { width: 38px; height: 38px; }
  .brand-title { font-size: 1.35rem; }
  .card-body { padding: 1.15rem 1.15rem 1.2rem; }
}

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

/* =====================================================================
   Departments. Each one has its own ink (set in Settings); dark mode
   lightens it automatically so it stays readable on the night sky.
   ===================================================================== */
[style*="--dept"] { --ink: var(--dept); }
@media (prefers-color-scheme: dark) {
  [style*="--dept"] { --ink: color-mix(in oklab, var(--dept) 52%, #fff); }
}

/* the section strip under the header */
.departments { border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); }
.departments::-webkit-scrollbar { display: none; }
.dept-inner { display: flex; gap: 1.25rem; padding-top: .5rem; padding-bottom: .5rem; padding-right: 2.5rem; }
.departments a { display: inline-flex; align-items: center; gap: .45rem; min-height: 32px; font-family: var(--font-mono); font-size: calc(.6rem * var(--label-scale)); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap; }
.departments a .icon { width: calc(15px * var(--label-scale)); height: calc(15px * var(--label-scale)); color: var(--ink); transition: transform .25s; }
.departments a .amp { font-size: 1.35em; text-transform: none; letter-spacing: 0; color: var(--ink); }
.departments a:hover { color: var(--ink); }
.departments a:hover .icon { transform: rotate(-8deg) scale(1.08); }
.departments a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--ink); }
@media (min-width: 720px) { .departments { -webkit-mask: none; mask: none; } .dept-inner { justify-content: center; gap: 2rem; padding-right: 1.25rem; } }

/* department label on cards and posts */
.dept-line { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .55rem; }
.dept-link { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink, var(--brass)); }
.dept-link .icon { width: calc(16px * var(--label-scale)); height: calc(16px * var(--label-scale)); }
.dept-link .amp { color: inherit; font-size: 1.35em; text-transform: none; letter-spacing: 0; }
.dept-link:hover { color: var(--text); }
.card.has-dept { border-top: 3px solid var(--ink); }
.card.has-dept::before { --b: var(--ink); }
.post.has-dept .prose > p:first-child::first-letter { color: var(--ink); }
.post.has-dept .post-header::after, .post.has-dept .prose hr { background: var(--ink); }
.post.has-dept .prose h2::before, .post.has-dept .prose blockquote::before { color: var(--ink); }

/* rubber "Opinion" stamp, with a little ink grain */
.stamp {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: .2em; line-height: 1;
  color: var(--ink, var(--accent)); border: 2px solid currentColor; border-radius: 3px; transform: rotate(-5deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 0 0 0 2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 0 0 0 2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.stamp-sm { font-size: calc(.54rem * var(--label-scale)); padding: .28rem .45rem .22rem .6rem; border-width: 1.5px; margin-left: auto; }
.stamp-lg { font-size: .82rem; padding: .5rem .7rem .42rem .9rem; margin: .4rem 0 .9rem .1rem; outline: 1.5px solid currentColor; outline-offset: 3px; transform: rotate(-6deg); }

/* pull quote: a line from the piece, set large between rules */
.prose .pullquote { position: relative; margin: 2.4em 0; padding: 1.4em .5em 1.15em; text-align: center; border-top: 1px solid var(--ink, var(--brass)); border-bottom: 1px solid var(--ink, var(--brass)); }
.prose .pullquote::before { content: "“"; position: absolute; top: 0; left: 50%; transform: translate(-50%, -52%); padding: 0 .3em; background: var(--bg); font-family: var(--font-head); font-weight: 700; font-size: 2.8rem; line-height: 1; color: var(--ink, var(--brass)); }
.prose .pullquote p { margin: 0; font-family: var(--font-head); font-style: italic; font-weight: 500; font-size: 1.7em; line-height: 1.18; color: var(--text); text-wrap: balance; }
@media (min-width: 900px) { .prose .pullquote { margin-left: -3rem; margin-right: -3rem; } }

/* newspaper dateline at the start of a piece (no drop cap with it) */
.dateline { font-family: var(--font-mono); font-size: .68em; font-weight: 700; letter-spacing: .1em; color: var(--ink, var(--accent)); white-space: nowrap; }
.prose.has-dateline > p:first-child::first-letter { float: none; font: inherit; color: inherit; text-shadow: none; margin: 0; line-height: inherit; }
.prose.has-dateline > p:first-child::first-line { font-variant: normal; letter-spacing: normal; }

/* department banner page */
.masthead { text-align: center; padding-bottom: 1.6rem; margin-bottom: 2rem; border-bottom: 3px double var(--ink); }
.masthead-icon { width: 76px; height: 76px; padding: 15px; color: var(--ink); border: 1px solid var(--ink); border-radius: 50%; outline: 1px dashed color-mix(in srgb, var(--ink) 50%, transparent); outline-offset: 5px; margin: .25rem auto 1.1rem; display: block; }
.masthead .eyebrow { justify-content: center; color: var(--muted); }
.masthead h1 { margin: 0; font-size: clamp(2.6rem, 11vw, 3.6rem); }
.masthead h1 .amp { color: var(--ink); }
.masthead .lead { margin-top: .5rem; }
.masthead-count { font-family: var(--font-mono); font-size: calc(.62rem * var(--label-scale)); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin: .9rem 0 0; }

/* archive: tiny department mark before each title */
.archive-dept { display: inline-flex; color: var(--ink); margin-right: .4rem; vertical-align: -.1em; }
.archive-dept .icon { width: 15px; height: 15px; }
