/* ============================================================================
   BASKORP design system — Phase 0 foundation
   The "3279 system": IBM 3279 colour-terminal heritage. Mainframe green is the
   site chrome; each app keeps its icon colour as its "field colour".
   ========================================================================== */

/* ─── 0.1 Design tokens ─────────────────────────────────────────────────── */
:root {
  /* The six decided colours (§5) — do NOT introduce other hues. */
  --bg:         #0A0C0A;   /* near-black terminal background            */
  --prose:      #E8E8E4;   /* body text — readable neutral, never green */
  --green:      #33E633;   /* site chrome: labels, headers, PG-ART      */
  --ironlog:    #9B7BFF;   /* Iron Log field colour (icon purple)       */
  --foodlocker: #22C9DB;   /* Food Locker field colour (icon teal)      */
  --cta:        #FFD75F;   /* 3279 yellow — CTAs / download buttons only */

  /* Supporting tokens are ALPHA derivations of the six above — no new hues. */
  --prose-dim:   rgba(232, 232, 228, 0.62);  /* secondary prose          */
  --prose-faint: rgba(232, 232, 228, 0.38);  /* captions, meta           */
  --panel:       rgba(232, 232, 228, 0.03);  /* lifted panel surface     */
  --border:      rgba(51, 230, 51, 0.24);    /* green-tinted hairlines    */
  --border-soft: rgba(232, 232, 228, 0.12);  /* neutral hairlines         */
  --green-glow:  rgba(51, 230, 51, 0.14);    /* faint phosphor bloom      */

  /* Type */
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, "Courier New", monospace;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale (fluid, 1.2 minor-third-ish) */
  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
  --step-0:  clamp(0.95rem, 0.90rem + 0.25vw, 1.05rem);
  --step-1:  clamp(1.15rem, 1.05rem + 0.5vw,  1.4rem);
  --step-2:  clamp(1.45rem, 1.25rem + 1vw,    2rem);
  --step-3:  clamp(1.85rem, 1.5rem + 1.8vw,   2.9rem);

  --measure: 68ch;          /* comfortable reading width for prose        */
  --wrap: 1080px;           /* max content width                          */
  --radius: 3px;
}

/* ─── Reset & base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--prose);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 0.2: prose is the body face and the neutral colour — never phosphor green. */
p, li, dd, blockquote, figcaption { color: var(--prose); }
p { margin: 0 0 1rem; }

/* Headings & chrome use the mono display face. */
h1, h2, h3, h4, h5, h6,
.label, .status-line, .brand, .nav a, .panel-header, .kbd-hint, .cta-btn {
  font-family: var(--font-mono);
}
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: 0.01em; font-weight: 600; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img, svg { max-width: 100%; height: auto; }

/* ─── Accessibility: visible keyboard focus + skip link ─────────────────── */
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
  border-radius: 1px;
}
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1000;
  background: var(--cta);
  color: var(--bg);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Reusable label — the "field name" chrome element. */
.label {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

/* ─── 0.3 Header + ISPF status line ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

/* Dataset-style status line, e.g. BASKORP.SYS ─ READY */
.status-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 4px 24px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--prose-faint);
  border-bottom: 1px solid var(--border-soft);
}
.status-line .dsn { color: var(--green); }
.status-line .sep { color: var(--border); }
.status-line .status-ok { color: var(--green); }
.status-line .status-clock { margin-left: auto; color: var(--prose-dim); }

.nav-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--green);
  text-shadow: 0 0 12px var(--green-glow);
}
.brand:hover { text-decoration: none; }

/* ─── Global navigation ─────────────────────────────────────────────────── */
.nav {
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}
.nav a,
.nav .nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 7px 12px;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--prose-dim);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a:hover,
.nav a[aria-current="page"],
.nav .nav-dropdown > summary:hover {
  color: var(--green);
  background: var(--green-glow);
  text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--green); }

/* Apps disclosure — native <details>, keyboard-accessible with no framework JS. */
.nav-dropdown { position: relative; }
.nav-dropdown > summary {
  list-style: none;
  user-select: none;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after {
  content: "▾";
  font-size: 0.7em;
  color: var(--prose-faint);
}
.nav-dropdown[open] > summary::after { color: var(--green); }
.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.nav-menu li { display: block; }
.nav-menu a { display: block; width: 100%; }
.nav-menu .field-ironlog { color: var(--ironlog); }
.nav-menu .field-foodlocker { color: var(--foodlocker); }
.nav-menu .field-ironlog:hover { background: rgba(155, 123, 255, 0.12); color: var(--ironlog); }
.nav-menu .field-foodlocker:hover { background: rgba(34, 201, 219, 0.12); color: var(--foodlocker); }

/* Mobile toggle — hidden on desktop. */
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ─── Main content ──────────────────────────────────────────────────────── */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* Reading column for prose-heavy pages (PG-ART, blog). */
.prose { max-width: var(--measure); }
.prose h2 { margin: 2.4rem 0 0.9rem; color: var(--green); }
.prose h3 { margin: 1.8rem 0 0.7rem; color: var(--prose); }
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; }
.prose li { margin: 0.3rem 0; }

/* ─── Panel — ISPF-style section container ──────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 8px 14px;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  color: var(--green);
  border-bottom: 1px solid var(--border-soft);
}
.panel-body { padding: 20px; }

/* ─── CTA button — 3279 yellow, download / primary actions only ─────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 11px 20px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--cta);
  border: 1px solid var(--cta);
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.cta-btn:hover { filter: brightness(1.08); text-decoration: none; }
.cta-btn:active { transform: translateY(1px); }
.cta-btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }

/* Secondary / ghost button — inherits a field colour via --accent. */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--accent, var(--green));
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); text-decoration: none; }

/* ─── App icon marks ────────────────────────────────────────────────────── */
/* Source icons are rounded-square app icons on a white canvas; clip the white
   corners with border-radius so they sit cleanly on the dark background. */
.app-icon {
  display: block;
  border-radius: 22%;
  overflow: hidden;
}
.app-icon--sm { width: 48px; }
.app-icon--md { width: 88px; }
.app-icon--lg { width: 128px; }

/* ─── Sawtooth signature ────────────────────────────────────────────────── */
.sawtooth { display: block; width: 100%; height: auto; color: var(--green); }
.sawtooth--divider { max-width: 320px; margin: 2.5rem auto; opacity: 0.7; }
.sawtooth--hero { max-width: 640px; }

/* Caption clarifying the sawtooth's total-load y-axis. */
.saw-caption {
  max-width: 640px;
  margin: 0.6rem 0 0;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--prose-dim);
}
.saw-caption strong { color: var(--green); font-weight: 600; }

/* Animated draw-on for the hero variant; disabled under reduced-motion. */
.sawtooth--hero .saw-line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: saw-draw 2.8s ease forwards;
}
@keyframes saw-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sawtooth--hero .saw-line { animation: none; stroke-dashoffset: 0; }
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.footer-inner a {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--prose-dim);
}
.footer-inner a:hover { color: var(--green); }
.footer-sep { color: var(--border); }
/* Function-key-style hint row. */
.kbd-hint {
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--prose-faint);
}
.kbd-hint b { color: var(--green); font-weight: 600; }

/* ============================================================================
   Phase 1 — Home + PG-ART page components
   ========================================================================== */

/* ─── Home hero ─────────────────────────────────────────────────────────── */
.home-hero {
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--border-soft);
}
.home-hero .label { display: block; margin-bottom: 1rem; }
.home-h1 {
  max-width: 20ch;
  font-size: var(--step-3);
  color: var(--prose);
  text-wrap: balance;
}
.home-sub {
  margin-top: 1.1rem;
  max-width: 60ch;
  color: var(--prose-dim);
  font-size: var(--step-1);
  line-height: 1.6;
}

/* Hero sawtooth figure on the home page. */
.home-saw { margin: 2rem 0 0; }
.home-saw .sawtooth--hero { max-width: 640px; }

/* ─── Section lead (label + heading + intro) ────────────────────────────── */
.section-lead { margin: 52px 0 4px; }
.section-lead .label { display: block; margin-bottom: 0.6rem; }
.section-lead h2 { font-size: var(--step-2); color: var(--green); }
.section-lead p {
  max-width: var(--measure);
  margin: 0.9rem 0 0;
  color: var(--prose-dim);
  font-size: var(--step-0);
}
.section-lead .strip-link { display: inline-block; margin-top: 1rem; }

/* ─── Home app cards ────────────────────────────────────────────────────── */
.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px 0 8px;
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  border-top-color: var(--accent);
}
/* The whole card is a link to the product page (stretched-link pattern);
   the Download / Source actions sit above it via z-index and stay independent. */
.app-card:hover,
.app-card:focus-within { cursor: pointer; }
.app-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.app-card-head .app-icon { flex-shrink: 0; }
.app-card-dsn {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--prose-faint);
}
.app-card-title { color: var(--accent); margin-top: 2px; }
.app-card-title a { color: var(--accent); text-decoration: none; }
.app-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Stretch the title link across the whole card so clicking the box navigates. */
.app-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.app-card-lede {
  font-size: var(--step-0);
  color: var(--prose);
  margin-bottom: 14px;
}
.app-card-feats {
  list-style: none;
  margin: 0 0 22px;
  flex: 1 0 auto;
}
.app-card-feats li {
  position: relative;
  padding-left: 1.3em;
  font-size: var(--step--1);
  color: var(--prose-dim);
  margin: 0.4rem 0;
}
.app-card-feats li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}
.app-card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ─── Home strips (PG-ART / consulting) ─────────────────────────────────── */
.strip {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr auto;
  align-items: center;
  gap: 12px 28px;
  padding: 22px 0;
  border-top: 1px solid var(--border-soft);
}
.strip:last-of-type { border-bottom: 1px solid var(--border-soft); }
.strip-head .label { display: block; margin-bottom: 0.35rem; }
.strip-title { font-size: var(--step-1); color: var(--green); }
.strip-body { color: var(--prose-dim); font-size: var(--step-0); margin: 0; }
.strip-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.strip-keywords span {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--prose);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.strip-link {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ─── Document pages (PG-ART) ───────────────────────────────────────────── */
.doc-hero {
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.doc-hero .label { display: block; margin-bottom: 0.9rem; }
.doc-hero h1 { font-size: var(--step-3); color: var(--green); }
.doc-lede {
  max-width: var(--measure);
  margin: 1rem 0 2rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--prose);
}
.doc .prose section { margin-top: 2.4rem; }
.doc .prose section:first-child { margin-top: 1.6rem; }

/* Precise-rules definition list */
.rules { margin: 1.2rem 0; }
.rules dt {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 1.2rem;
}
.rules dd {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  color: var(--prose);
}

/* Self-experiment stat grid */
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 1.4rem 0 1.6rem;
}
.stat {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--green);
  line-height: 1.1;
}
.stat-cap {
  display: block;
  margin-top: 6px;
  font-size: var(--step--1);
  color: var(--prose-dim);
}

.doc-cta {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.doc-cta h2 { margin-top: 0 !important; color: var(--ironlog); }

/* ============================================================================
   Phase 2 — Product pages (Iron Log, Food Locker)
   Each page inherits its app's field colour via `style="--accent:…"`.
   ========================================================================== */

/* ─── Product hero: icon page-mark beside title + one-liner ─────────────── */
.product-hero {
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.product-hero .label { display: block; margin-bottom: 1rem; }
.product-hero-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}
.product-hero-inner .app-icon { flex-shrink: 0; }
.product-hero h1 { font-size: var(--step-3); color: var(--accent); }
.product-lede {
  margin-top: 0.6rem;
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--prose);
}

/* Accent the section headers with the field colour on product pages. */
.product .prose h2 { color: var(--accent); }

/* ─── "How progression works" figure ────────────────────────────────────── */
.progression {
  margin: 1.4rem 0 0.5rem;
  padding: 20px 18px 12px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.progression .sawtooth--hero { max-width: 100%; }
.progression figcaption {
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--prose-dim);
}

/* ─── Install / download panel (ISPF-style) ─────────────────────────────── */
.install { margin: 1.6rem 0 0.5rem; }
.install .panel-header .dsn { color: var(--accent); }
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.install-trust {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--prose-dim);
  margin: 0 0 14px;
}
.install-trust b { color: var(--accent); font-weight: 600; }
.install-note {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: var(--step--1);
  color: var(--prose-dim);
}
.install-note code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  color: var(--prose);
  background: rgba(232, 232, 228, 0.06);
  border-radius: 2px;
}

@media (max-width: 560px) {
  .product-hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ============================================================================
   Phase 3 — Consulting + About
   ========================================================================== */

/* ─── Consulting credibility line ───────────────────────────────────────── */
.credibility {
  max-width: var(--measure);
  margin: 0.4rem 0 0;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
  color: var(--prose-dim);
  font-size: var(--step-0);
}
.credibility .label { display: block; margin-bottom: 0.35rem; }
.credibility strong { color: var(--prose); font-weight: 600; }

/* ─── Service blocks ────────────────────────────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 1.4rem 0 0.5rem;
}
.service { display: flex; flex-direction: column; }
.service .panel-header .dsn { color: var(--green); }
.service .panel-body { padding: 18px; }
.service h3 {
  margin: 0 0 0.6rem;
  color: var(--green);
  font-size: var(--step-1);
}
.service p { margin: 0; color: var(--prose-dim); font-size: var(--step--1); }

/* ─── Field notes (blog posts as proof) ─────────────────────────────────── */
.fieldnotes {
  list-style: none;
  margin: 1.2rem 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 10px;
}
.fieldnote a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
  color: var(--prose);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fieldnote a:hover {
  text-decoration: none;
  background: var(--green-glow);
  border-left-color: var(--green);
}
.fieldnote-title {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--prose);
}
.fieldnote a:hover .fieldnote-title { color: var(--green); }
.fieldnote-meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prose-faint);
}

/* ─── Contact panel ─────────────────────────────────────────────────────── */
.contact { margin: 1.6rem 0 0.5rem; }
.contact .panel-header .dsn { color: var(--green); }
.contact .panel-body p { color: var(--prose-dim); }
.contact-actions { margin: 16px 0 0 !important; }

/* ─── About link list ───────────────────────────────────────────────────── */
.links { margin: 1.6rem 0 0.5rem; }
.links .panel-header .dsn { color: var(--green); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.linklist li:last-child { border-bottom: none; }
.linklist-key {
  flex-shrink: 0;
  width: 8.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  color: var(--green);
}
.linklist a {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  word-break: break-all;
}

@media (max-width: 480px) {
  .linklist li { flex-direction: column; gap: 0.15rem; }
  .linklist-key { width: auto; }
}

/* ============================================================================
   Phase 4 — Blog listing, post typography, syntax highlighting
   ========================================================================== */

/* ─── Tag filter (blog listing) ─────────────────────────────────────────── */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.4rem 0 1.8rem;
}
.tag-btn {
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--prose-dim);
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tag-btn::before { content: "#"; color: var(--prose-faint); margin-right: 1px; }
.tag-btn:hover { color: var(--green); border-color: var(--border); }
.tag-btn.is-active {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
}
.tag-btn.is-active::before { color: var(--bg); }

/* ─── Post list ─────────────────────────────────────────────────────────── */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.post-item[hidden] { display: none; }
.post-item-link {
  display: block;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
  color: var(--prose);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.post-item-link:hover {
  text-decoration: none;
  background: var(--green-glow);
  transform: translateX(2px);
}
.post-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prose-faint);
}
.post-item-tag {
  padding: 1px 7px;
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.post-item-tag::before { content: "#"; opacity: 0.6; }
.post-item-title {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--prose);
  line-height: 1.25;
}
.post-item-link:hover .post-item-title { color: var(--green); }
.post-item-excerpt {
  display: block;
  font-size: var(--step--1);
  color: var(--prose-dim);
  line-height: 1.55;
}
.post-list-empty { color: var(--prose-dim); font-family: var(--font-mono); }

/* ─── Single post: meta line + tag chips ────────────────────────────────── */
.post-hero .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--prose-dim);
}
.post-meta-sep { color: var(--border); }
.tag-chip {
  padding: 1px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.tag-chip::before { content: "#"; opacity: 0.6; }
.tag-chip:hover { text-decoration: none; background: var(--green-glow); }

.post-foot {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-soft);
}

/* ─── Post body typography (rendered Markdown) ──────────────────────────── */
.post-body { margin-top: 1.8rem; }
.post-body h2 { margin: 2.4rem 0 0.9rem; color: var(--green); }
.post-body h3 { margin: 1.9rem 0 0.7rem; color: var(--prose); }
.post-body h4 {
  margin: 1.6rem 0 0.6rem;
  font-family: var(--font-mono);
  color: var(--prose);
  font-size: var(--step-0);
  letter-spacing: 0.04em;
}
.post-body p, .post-body li { line-height: 1.7; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.post-body a:hover { text-decoration-color: currentColor; }
.post-body img {
  display: block;
  margin: 1.4rem 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.post-body hr {
  margin: 2.2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.post-body blockquote {
  margin: 1.4rem 0;
  padding: 2px 16px;
  border-left: 2px solid var(--green);
  color: var(--prose-dim);
  font-style: italic;
}
.post-body table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: var(--step--1);
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td {
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  text-align: left;
}
.post-body th { color: var(--green); font-family: var(--font-mono); }

/* Inline code */
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  color: var(--prose);
  background: rgba(232, 232, 228, 0.06);
  border-radius: 2px;
}

/* Code blocks (kramdown + rouge: div.highlighter-rouge > div.highlight > pre.highlight) */
.post-body pre,
.post-body .highlight,
.post-body .highlighter-rouge .highlight {
  background: rgba(232, 232, 228, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.post-body .highlighter-rouge { margin: 1.4rem 0; }
.post-body pre {
  margin: 1.4rem 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--prose);
}
.post-body .highlight { margin: 0; }
.post-body .highlight pre { margin: 0; border: 0; background: transparent; }
/* Reset inline-code styling inside blocks */
.post-body pre code {
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

/* ─── Rouge syntax tokens — palette used as "field colours" for code ────── */
.post-body .highlight .c,  .post-body .highlight .cm,
.post-body .highlight .c1, .post-body .highlight .cp,
.post-body .highlight .cs, .post-body .highlight .cd { color: var(--prose-dim); font-style: italic; } /* comments */
.post-body .highlight .k,  .post-body .highlight .kd,
.post-body .highlight .kn, .post-body .highlight .kp,
.post-body .highlight .kr, .post-body .highlight .kt,
.post-body .highlight .kv, .post-body .highlight .o,
.post-body .highlight .ow { color: var(--green); } /* keywords / operators */
.post-body .highlight .s,  .post-body .highlight .s1,
.post-body .highlight .s2, .post-body .highlight .sb,
.post-body .highlight .sc, .post-body .highlight .sd,
.post-body .highlight .se, .post-body .highlight .sh,
.post-body .highlight .si, .post-body .highlight .sx,
.post-body .highlight .sr, .post-body .highlight .ss { color: var(--foodlocker); } /* strings */
.post-body .highlight .m,  .post-body .highlight .mi,
.post-body .highlight .mf, .post-body .highlight .mh,
.post-body .highlight .mo, .post-body .highlight .il,
.post-body .highlight .kc, .post-body .highlight .no,
.post-body .highlight .bp { color: var(--cta); } /* numbers / constants */
.post-body .highlight .nf, .post-body .highlight .nc,
.post-body .highlight .nn, .post-body .highlight .nb,
.post-body .highlight .nd, .post-body .highlight .na { color: var(--ironlog); } /* names / functions */
.post-body .highlight .err { color: var(--prose); background: transparent; }
.post-body .highlight .gp { color: var(--prose-faint); } /* shell prompt */

/* ─── Responsive: Home + doc pages ──────────────────────────────────────── */
@media (max-width: 760px) {
  .strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-hero { padding-top: 8px; }
}

/* ─── Responsive: mobile nav ────────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
  }
  .nav[data-open="true"] { display: block; }
  .nav-bar { position: relative; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav a, .nav .nav-dropdown > summary { padding: 12px; }
  .nav-dropdown { position: static; }
  .nav-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    margin: 2px 0 2px 12px;
  }
  main { padding: 28px 16px 56px; }
  .status-line { padding: 4px 16px; font-size: 0.62rem; }
  .nav-bar { padding: 12px 16px; }
  .footer-inner { padding: 20px 16px; }
}
