/* ================================================================
   Primitives — Logo, Link, Button, Plate, Pill, Arrow
   ================================================================ */

/* Logo — paints in --fg via mask-image so it inherits theme automatically.
   Sizes per Build_Handoff.md §4: 28px desktop, 24px mobile. */
.logo {
  display: inline-block;
  height: 28px;
  width: auto;
  aspect-ratio: 36 / 40;
  background-color: var(--fg);
  -webkit-mask: url(../assets/bremges-logo.svg) no-repeat center / contain;
          mask: url(../assets/bremges-logo.svg) no-repeat center / contain;
  transition: background-color 120ms ease;
}
@media (max-width: 640px) {
  .logo { height: 24px; }
}

/* Logo plate — frames the round mark inside a square hairline plate.
   Stages the logo as the warm element in a rectilinear system. */
.logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  transition: border-color 180ms ease;
}
.logo-plate:hover { border-color: var(--fg); }
.logo-plate .logo { height: 24px; }
@media (max-width: 640px) {
  .logo-plate { width: 32px; height: 32px; }
  .logo-plate .logo { height: 20px; }
}

/* Inline text link — body text */
.tlink {
  color: var(--accent-strong);
  border-bottom: 1px solid currentColor;
  transition: color 120ms ease, border-color 120ms ease;
}
.tlink:hover { color: var(--fg); border-color: var(--fg); }

/* Nav-style link (no underline, color shift only) */
.nlink {
  color: var(--fg);
  transition: color 120ms ease;
}
.nlink:hover { color: var(--accent-strong); }

/* Button — primary (filled) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: var(--body-sm);
  font-weight: 500;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* Button — ghost (transparent fill on hover) */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: var(--body-sm);
  font-weight: 500;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  transition: background-color 120ms ease, color 120ms ease;
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Pill — availability (inverted: ink fill, paper text, ruby dot) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.04em;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
}
.pill .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  /* Square dot — no radius. No pulse. */
}

/* Square bullet for tag lists */
.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: var(--body-sm);
  color: var(--fg-muted);
}
.tag-list > li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag-list > li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--fg-muted);
  /* square — no radius */
}
.tag-list > li:first-child::before { display: none; }
.tag-list > li:first-child { padding-left: 0; }

/* Right-arrow — the one decorative element */
.arrow {
  display: inline-block;
  transition: transform 180ms ease;
}
a:hover .arrow,
button:hover .arrow { transform: translateX(4px); }

/* Plate — case study image mat (24px mat, 1px hairline, no shadow, no chrome) */
.plate {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color 180ms ease;
}
.plate:hover { border-color: var(--border-strong); }
.plate__inner {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  /* square corners — §3 */
}
.plate__img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 240ms ease;
}
.plate:hover .plate__img { transform: scale(1.02); }

/* Outcome badge in upper-right of visual */
.plate__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--fg);
  color: var(--bg);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Role-relevance chip (per-referrer §13) */
.relevance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

/* ================================================================
   Utility bar (§6.1)
   ================================================================ */

.utility-bar {
  min-height: 36px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-size: var(--body-sm);
  position: relative;
  z-index: 50;
}
.utility-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.utility-bar__right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.utility-bar__right > a {
  color: var(--fg-muted);
  transition: color 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.utility-bar__right > a:hover { color: var(--fg); }
.utility-bar__bookcall {
  color: var(--accent-strong) !important;
  font-weight: 500;
}
.utility-bar__bookcall:hover { color: var(--fg) !important; }

@media (max-width: 640px) {
  .utility-bar__resume { display: none; }
}

/* ================================================================
   Nav (§6.2)
   ================================================================ */

.nav {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: var(--body-sm);
  font-weight: 500;
}

/* ================================================================
   Hero (§6.3)
   ================================================================ */

.hero {
  padding-top: clamp(56px, 7vw, 112px);
  padding-bottom: clamp(48px, 6vw, 96px);
}
.hero__eyebrow {
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.hero__headline {
  margin-bottom: 28px;
  max-width: 14ch;
  white-space: pre-line;
}
.hero__sub {
  color: var(--fg-muted);
  max-width: 56ch;
  margin-bottom: 56px;
}
.hero__proof-eyebrow {
  color: var(--fg-subtle);
  margin-bottom: 4px;
}
.hero__proof-rows {
  border-top: 1px solid var(--border);
  margin-bottom: 40px;
}
.hero__proof-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  transition: color 120ms ease;
}
.hero__proof-row:hover { color: var(--accent-strong); }
.hero__proof-client {
  font-weight: 500;
  font-size: var(--sub-headline);
}
.hero__proof-outcome {
  color: var(--fg-muted);
  font-size: var(--body);
  flex: 1;
  margin-left: 24px;
}
.hero__proof-row:hover .hero__proof-outcome {
  color: var(--accent-strong);
}
.hero__proof-row:hover .hero__proof-client {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
@media (max-width: 640px) {
  .hero__proof-row { flex-wrap: wrap; }
  .hero__proof-outcome { margin-left: 0; flex-basis: 100%; }
}
.hero__ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero__secondary {
  color: var(--accent-strong);
  border-bottom: 1px solid currentColor;
  transition: color 120ms ease;
  padding-bottom: 1px;
  font-size: var(--body-sm);
  font-weight: 500;
}
.hero__secondary:hover { color: var(--fg); }

/* ================================================================
   Section header
   ================================================================ */

.section {
  padding-top: clamp(64px, 7vw, 112px);
  padding-bottom: clamp(64px, 7vw, 112px);
}
.section__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 56px;
  max-width: 60ch;
}
.section__dek {
  color: var(--fg-muted);
}

/* ================================================================
   Selected Work (§6.4)
   ================================================================ */

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 80px;
}
.work-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 56px;
  align-items: center;
  scroll-margin-top: 88px;
}
.work-card:nth-child(even) {
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
}
.work-card:nth-child(even) .work-card__visual { order: -1; }
@media (max-width: 900px) {
  .work-card { grid-template-columns: 1fr; gap: 28px; }
  .work-card:nth-child(even) { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-card__visual { order: 0; }
}
.work-card__eyebrow {
  color: var(--fg-muted);
  margin-bottom: 14px;
}
.work-card__title {
  display: block;
  color: var(--fg);
  margin-bottom: 18px;
  transition: color 120ms ease;
}
.work-card__title:hover { color: var(--accent-strong); }
.work-card__outcome {
  color: var(--fg-muted);
  margin-bottom: 22px;
  max-width: 50ch;
}
.work-card__chip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.work-card__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 22px;
  color: var(--accent-strong);
  font-size: var(--body-sm);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 120ms ease;
}
.work-card__cta:hover { color: var(--fg); }
.work-card__visual { display: block; }

.work-closing {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--body-sm);
}

/* ================================================================
   Plate placeholder — flat block + single mono label.
   Real screenshots replace this once approval-cleared.
   ================================================================ */

.placeholder-art {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-muted);
  text-align: center;
  padding: 24px;
}
.placeholder-art__label {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  letter-spacing: 0.04em;
  max-width: 80%;
}

/* Typographic plate — for confidential or visuals-not-yet work.
   Reads as a deliberate metric card, not a "screenshot pending" placeholder. */
.plate__type {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  text-align: center;
}
.plate__type-eyebrow {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.plate__type-metric {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(72px, 8vw + 16px, 128px);
  line-height: 0.95;
  color: var(--fg);
  letter-spacing: -0.03em;
}
.plate__type-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  max-width: 28ch;
}
/* Statement variant — for short phrases instead of numeric metrics */
.plate__type--statement .plate__type-metric {
  font-size: clamp(34px, 3.6vw + 12px, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ================================================================
   Numbered section openers — editorial chapter markers
   ================================================================ */

.page-section__head--numbered {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
  max-width: none;
}
.page-section__number {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(48px, 5vw + 8px, 80px);
  line-height: 0.9;
  color: var(--fg);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.page-section__head-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 60ch;
}
@media (max-width: 640px) {
  .page-section__head--numbered { grid-template-columns: 1fr; gap: 14px; }
}

/* ================================================================
   Mono trim — Ascend mock; flip globally if approved
   ================================================================ */

.page-ascend .page-hero__meta,
.page-ascend .tldr__label,
.page-ascend .tldr__row .k,
.page-ascend .footer__col-head,
.page-ascend .footer__colophon,
.page-ascend .back-link {
  font-family: var(--font-sans);
}
.page-ascend .sidenote {
  font-family: var(--font-sans);
  font-style: italic;
}

/* ================================================================
   Point of View (§6.5) — single full-bleed quote, no decoration
   ================================================================ */

.pov {
  padding-top: clamp(72px, 8vw, 144px);
  padding-bottom: clamp(72px, 8vw, 144px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pov__quote {
  font-style: italic;
  font-weight: 500;
  max-width: 22ch;
  letter-spacing: -0.015em;
}
.pov__attribution {
  margin-top: 28px;
  color: var(--fg-muted);
  font-size: var(--body-sm);
}

/* ================================================================
   Approach (§6.6)
   ================================================================ */

.approach {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: start;
}
@media (max-width: 900px) {
  .approach { grid-template-columns: 1fr; gap: 32px; }
}
.approach__body {
  color: var(--fg-muted);
  margin-bottom: 28px;
}
.approach__stack {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}
.approach__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--accent-strong);
  font-weight: 500;
  font-size: var(--body-sm);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ================================================================
   About (§6.8)
   ================================================================ */

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 72px;
  align-items: start;
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
}
.about__currently {
  font-style: italic;
  color: var(--fg-muted);
  margin-bottom: 24px;
  max-width: 56ch;
}
.about__bio {
  color: var(--fg);
  max-width: 60ch;
  margin-bottom: 24px;
}
.about__grounding {
  font-style: italic;
  color: var(--fg-muted);
  max-width: 58ch;
  margin-bottom: 32px;
}
.about__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 500;
  font-size: var(--body-sm);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.page-hero__masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}
.page-hero__masthead-text { min-width: 0; }
@media (max-width: 720px) {
  .page-hero__masthead { grid-template-columns: 1fr; gap: 24px; }
}
.about__meta {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
}
.about__meta-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.about__meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.about__meta-row .k { color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.about__meta-row .v { color: var(--fg); }

/* ================================================================
   Footer (§6.9)
   ================================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding-top: clamp(56px, 6vw, 96px);
  padding-bottom: clamp(40px, 4vw, 64px);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr; align-items: start; }
}
.footer__available {
  font-size: var(--headline);
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 28ch;
}
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: var(--body-sm);
}
.footer__contact a:not(.btn) { color: var(--fg); }
.footer__contact a:not(.btn):hover { color: var(--accent-strong); }
.footer__contact .btn { align-self: flex-start; color: var(--bg); }
.footer__contact .btn:hover { color: var(--bg); }

.footer__cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: var(--body-sm);
}
@media (max-width: 640px) {
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__col-head {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer__col a { color: var(--fg-muted); }
.footer__col a:hover { color: var(--fg); }
.footer__colophon {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__colophon a { color: var(--fg-muted); }
.footer__colophon a:hover { color: var(--fg); }

/* ================================================================
   Detail pages — case study, about, approach, colophon, text
   ================================================================ */

.page-hero {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}
.page-hero__eyebrow {
  color: var(--fg-muted);
  margin-bottom: 18px;
}
.page-hero__headline {
  max-width: 22ch;
  margin-bottom: 24px;
}
.page-hero__dek {
  color: var(--fg-muted);
  max-width: 60ch;
}
.page-hero__meta {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
}
.page-hero__meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.page-hero__meta-row .k {
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.page-hero__meta-row .v { color: var(--fg); font-size: clamp(15px, 0.3vw + 14px, 17px); line-height: 1.45; }

.page-section {
  padding-top: clamp(48px, 5vw, 80px);
  padding-bottom: clamp(48px, 5vw, 80px);
  border-bottom: 1px solid var(--border);
}
.page-section:last-of-type { border-bottom: 0; }
.page-section__head {
  margin-bottom: 32px;
  max-width: 60ch;
}
.page-section__head .t-eyebrow { color: var(--fg-muted); margin-bottom: 10px; }

.prose {
  max-width: 64ch;
  font-size: var(--body);
  color: var(--fg);
}
.prose > * + * { margin-top: 18px; }
.prose h3 {
  font-size: var(--headline);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h4 {
  font-size: var(--sub-headline);
  font-weight: 500;
  margin-top: 28px;
  margin-bottom: 8px;
}
.prose p { color: var(--fg); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent-strong);
  border-bottom: 1px solid currentColor;
  transition: color 120ms ease;
}
.prose a:hover { color: var(--fg); }
.prose blockquote {
  border-left: 2px solid var(--fg);
  padding-left: 18px;
  font-style: italic;
  color: var(--fg-muted);
  margin: 24px 0;
}
.prose ul, .prose ol {
  padding-left: 0;
  list-style: none;
}
.prose ul > li, .prose ol > li {
  position: relative;
  padding-left: 22px;
  margin-top: 6px;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--fg);
}
.prose ol {
  counter-reset: o;
}
.prose ol > li {
  counter-increment: o;
}
.prose ol > li::before {
  content: counter(o, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-subtle);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 1px 6px;
  border: 1px solid var(--border);
}
.prose pre {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 18px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 24px 0;
}
.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: var(--body-sm);
}
.prose table th,
.prose table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose table th {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
}

/* Case-study footer — closing nav with hairline rule */
.case-footer {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  padding-bottom: clamp(48px, 6vw, 96px);
  margin-top: clamp(48px, 6vw, 96px);
}

/* Case-study figure — single full-width shot */
.case-figure {
  margin: 32px 0;
}
.case-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-soft, #fff);
}
.case-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Case-study figure — paired phone screenshots */
.case-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.case-shots figure { margin: 0; }
.case-shots img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-soft, #fff);
}
.case-shots figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
@media (max-width: 720px) {
  .case-shots { grid-template-columns: 1fr; }
}

/* TL;DR — laid out as columns matching the meta grid above */
.tldr {
  margin-top: 28px;
}
.tldr__label { display: none; }
.tldr__rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.tldr__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.tldr__row .k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}
.tldr__row .v {
  color: var(--fg);
  font-size: clamp(14px, 0.2vw + 13px, 15px);
  line-height: 1.5;
}

/* Sidenote — used inline within prose */
.sidenote {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-muted);
  border-left: 2px solid var(--fg);
  padding: 4px 0 4px 14px;
  margin: 18px 0;
  max-width: 56ch;
  font-style: italic;
}

/* Back link at top of detail pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-muted);
  margin-bottom: 24px;
  transition: color 120ms ease;
}
.back-link:hover { color: var(--fg); }

/* Colophon page — key/value grid + stat cards */
.colophon-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .colophon-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}
.colophon-pairs {
  display: grid;
  gap: 0;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  border-top: 1px solid var(--border);
}
.colophon-pair {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.colophon-pair .k {
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.colophon-pair .v { color: var(--fg); word-break: break-word; }
.colophon-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.colophon-stat {
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.colophon-stat .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.colophon-stat .v {
  font-family: var(--font-mono);
  font-size: var(--headline);
  color: var(--fg);
  font-feature-settings: "tnum" 1;
}

/* Stub block for pages that aren't drafted yet */
.stub {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--fg-muted);
  max-width: 64ch;
  margin-top: 32px;
}
.stub strong { color: var(--fg); }
