/* ============================================================
   AxiomInference — project pages, hubs and live-data components.
   Loaded AFTER styles.css; reuses its design tokens. Deliberately
   separate so nothing shared with the Kestrel 1 app page changes.
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Project hero ---------- */
.p-hero { padding-top: clamp(28px, 5vw, 52px); padding-bottom: clamp(24px, 4vw, 36px); }
.p-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.p-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.p-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 20px; }
.p-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-1px); border-color: #b9b7ae; }

.pill-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.p-hero-art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  isolation: isolate;
}
.p-hero-art > img.art-bg { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 5 / 4; display: block; }
.p-hero-art.with-shot { padding: clamp(18px, 4vw, 40px); }
.p-hero-art.with-shot > img.art-bg { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto; }

/* Framed app screenshot */
.p-shot {
  background: #0e0e0d;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.p-shot img { display: block; width: 100%; height: auto; border-radius: 7px; }

/* Live stat strip */
.p-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: clamp(28px, 4vw, 44px) 0 0;
}
.p-stat { background: var(--paper); padding: 16px 20px; margin: 0; }
.p-stat dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.p-stat dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

/* In-page anchor chips */
.p-anchors { border-bottom: 1px solid var(--line); background: var(--paper-warm); }
.p-anchors ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.p-anchors a {
  display: block;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.p-anchors a:hover { color: var(--ink); border-color: #b9b7ae; }
[id] { scroll-margin-top: 84px; }

/* ---------- Sections ---------- */
.p-section.alt { background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.p-head { max-width: 64ch; margin: 0 0 clamp(24px, 4vw, 40px); }
.p-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.p-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.p-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.p-split.rev > :first-child { order: 2; }
.p-split.top { align-items: start; }
.p-split h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 12px; }
.p-split p { color: var(--ink-soft); margin: 0 0 12px; }
.p-list { padding-left: 18px; color: var(--ink-soft); margin: 10px 0; }
.p-list li { margin: 8px 0; }
.p-list strong, .p-split p strong { color: var(--ink); }

.p-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr)); }
.p-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--paper);
}
.p-card .num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.p-card h3 { font-family: var(--font-display); font-size: 1.14rem; margin: 10px 0 8px; letter-spacing: -0.005em; }
.p-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.p-card code, .p-split code, .p-table code, .p-head code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(22, 21, 15, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Dark band */
.p-band {
  background: var(--panel);
  color: var(--panel-text);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
}
.p-band h2, .p-band h3 { color: var(--panel-text); font-family: var(--font-display); letter-spacing: -0.01em; }
.p-band p { color: var(--panel-text-soft); }
.p-band .eyebrow { color: var(--panel-text-soft); }
.p-band code { background: rgba(255, 255, 255, 0.08); color: var(--panel-text); }
.p-band .p-card { background: #141413; border-color: var(--panel-line); }
.p-band .p-card h3 { color: var(--panel-text); }
.p-band .p-card p, .p-band .p-card .num { color: var(--panel-text-soft); }

.p-note {
  border-left: 3px solid var(--ink);
  background: var(--paper-warm);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 18px 0 0;
}
.p-note strong { color: var(--ink); }

/* ---------- Figures & galleries ---------- */
.p-figure { margin: 0; }
.p-figure .frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fcfcfb;
}
.p-figure .frame img { display: block; width: 100%; height: auto; }
.p-figure.on-dark .frame { background: #0b0f19; border-color: #1c2233; }
.p-figure figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 12px; max-width: 72ch; }
.p-figure figcaption strong { color: var(--ink); }
.p-gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.p-gallery a { display: block; text-decoration: none; }
.p-gallery .p-shot { transition: transform 0.18s ease; }
.p-gallery a:hover .p-shot { transform: translateY(-3px); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.p-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.p-table th, .p-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-warm);
  font-weight: 500;
}
.p-table tr:last-child td { border-bottom: 0; }
.p-table td.n, .p-table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-table .win { color: #1f7a3f; font-weight: 600; }
.p-table .lose { color: #9a2b2b; }

.p-spec { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; margin: 0; border-top: 1px solid var(--line); }
.p-spec dt { padding: 12px 0; color: var(--ink-soft); font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.p-spec dd { margin: 0; padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); font-weight: 500; }

/* ---------- Code, tabs, steps ---------- */
.p-code { background: var(--panel); color: var(--panel-text); border-radius: 14px; margin: 14px 0; overflow: hidden; }
.p-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--panel-line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-text-soft);
}
.p-code-head .dots { display: inline-flex; gap: 6px; }
.p-code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a36; display: block; }
.p-code-head button {
  background: transparent;
  border: 1px solid var(--panel-line);
  color: var(--panel-text-soft);
  border-radius: 999px;
  padding: 3px 12px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.p-code-head button:hover { color: var(--panel-text); border-color: #4a4842; }
.p-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  font-weight: 500;
  white-space: pre;
}
.p-code .c { color: #7d7a70; }
.p-code .p { color: #7dd3a8; }

.p-tablist { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.p-tablist [role="tab"] {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.p-tablist [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.p-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.p-steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.p-steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding-top: 3px;
}
.p-steps strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 2px; }
.p-steps span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Timeline (Fable lineage) ---------- */
.p-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.p-timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.p-timeline li { position: relative; padding: 0 0 28px 44px; }
.p-timeline li:last-child { padding-bottom: 0; }
.p-timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid #b9b7ae;
}
.p-timeline li.is-current::before { background: var(--ink); border-color: var(--ink); }
.p-timeline li.is-bad::before { border-color: #c9807f; }
.tl-ver { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.tl-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 2px 0 6px; }
.tl-text { color: var(--ink-soft); font-size: 0.95rem; margin: 0; max-width: 62ch; }
.tl-text .bad { color: #9a2b2b; font-weight: 600; }

/* ---------- Bars ---------- */
.p-bars { display: grid; gap: 16px; }
.p-bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.94rem; margin-bottom: 7px; }
.p-bar-top span:last-child { font-family: var(--font-mono); font-size: 0.82rem; color: var(--panel-text-soft); }
.p-bar-track { height: 10px; background: #1d1d1b; border-radius: 999px; overflow: hidden; }
.p-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #a855f7); }
.p-bar-sub { font-size: 0.82rem; color: var(--panel-text-soft); margin: 6px 0 0; }

/* ---------- Live data components ---------- */
.live-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 26px; background: var(--paper); }
.live-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 14px; letter-spacing: -0.005em; }
.live-note { color: var(--ink-soft); font-size: 0.85rem; margin: 12px 0 0; }
.live-empty { color: var(--ink-soft); font-size: 0.93rem; margin: 0 0 8px; }
.text-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.rel-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rel-tag { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; }
.rel-when { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-soft); }
.rel-name { margin: 8px 0 12px; font-family: var(--font-display); font-size: 1.05rem; }
.rel-notes { max-height: 340px; overflow: auto; margin: 12px 0 16px; padding-right: 8px; color: var(--ink-soft); font-size: 0.95rem; }
.rel-notes p { margin: 8px 0; }
.md-h { margin: 16px 0 6px; font-family: var(--font-display); font-size: 0.95rem; color: var(--ink); }
.md-list { margin: 6px 0; padding-left: 20px; }
.md-list li { margin: 4px 0; }

.ver-row { border-bottom: 1px solid var(--line); }
.ver-row:first-child { border-top: 1px solid var(--line); }
.ver-row summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 4px; cursor: pointer; list-style: none; }
.ver-row summary::-webkit-details-marker { display: none; }
.ver-row summary::after { content: "+"; color: var(--ink-soft); font-family: var(--font-mono); }
.ver-row[open] summary::after { content: "\2212"; }
.ver-tag { font-family: var(--font-display); font-weight: 600; }
.ver-date { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-soft); }
.ver-pre { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--ink-soft); }
.ver-body { padding: 0 4px 18px; color: var(--ink-soft); font-size: 0.93rem; }
.ver-body p { margin: 6px 0; }

.commit-list { list-style: none; margin: 0; padding: 0; }
.commit-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.commit-list li:first-child { padding-top: 0; }
.commit-list li:last-child { border-bottom: 0; }
.commit-sha { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); text-decoration: none; padding-top: 2px; }
.commit-sha:hover { color: var(--ink); text-decoration: underline; }
.commit-msg { display: block; font-weight: 500; font-size: 0.95rem; overflow-wrap: anywhere; }
.commit-meta { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }

/* Roadmap */
.road-progress { margin-bottom: 22px; }
.road-bar { height: 10px; border-radius: 999px; background: #ece9e0; overflow: hidden; }
.road-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fd6c0, #2f6bff); }
.road-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin: 10px 0 0; }
.road-list { list-style: none; margin: 0; padding: 0; }
.road-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.road-item:last-child { border-bottom: 1px solid var(--line); }
.road-mark {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 0.7rem; border: 1.5px solid #c9c7bf; color: var(--ink-soft); margin-top: 1px;
}
.is-done .road-mark { background: #1f7a3f; border-color: #1f7a3f; color: #fff; }
.is-running .road-mark { border-color: #2f6bff; color: #2f6bff; animation: road-pulse 1.8s ease-in-out infinite; }
@keyframes road-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 107, 255, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(47, 107, 255, 0); } }
.road-body summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.road-body summary::-webkit-details-marker { display: none; }
.road-body summary::after { content: "+"; margin-left: auto; color: var(--ink-soft); font-family: var(--font-mono); }
.road-body details[open] summary::after { content: "\2212"; }
.road-title { font-weight: 600; }
.road-badge { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: #2f6bff; border: 1px solid #b9c9f7; border-radius: 999px; padding: 2px 8px; }
.road-detail { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.92rem; }

/* Home: activity feed */
.activity-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.activity-row {
  display: grid;
  grid-template-columns: 130px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
}
.activity-chip { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; }
.activity-kind { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.activity-kind.is-release { color: #1f7a3f; }
.activity-text { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-text:hover { text-decoration: underline; }
.activity-when { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Project cards (home + hubs + "more projects") ---------- */
.proj-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.proj-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proj-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proj-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.proj-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.4); border-color: #cfcdc4; }
.proj-card-art { aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; position: relative; }
.proj-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.proj-card:hover .proj-card-art img { transform: scale(1.03); }
.proj-card-art.shot { display: grid; place-items: center; padding: 6% 8% 0; }
.proj-card-art.shot img.bg { position: absolute; inset: 0; }
.proj-card-art.shot .p-shot { position: relative; width: 100%; align-self: end; border-radius: 12px 12px 0 0; padding: 6px 6px 0; }
.proj-card-art.shot .p-shot img { border-radius: 6px 6px 0 0; transition: none; transform: none; }
.proj-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj-cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.proj-card h3 { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.01em; margin: 0; }
.proj-card p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.proj-meta {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.proj-go { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--ink); white-space: nowrap; }
.proj-card:hover .proj-go .btn-arrow { transform: translateX(3px); }
.proj-card .btn-arrow { display: inline-block; transition: transform 0.15s ease; }
.proj-grid.compact .proj-card-art { aspect-ratio: 16 / 6; }
.proj-grid.compact h3 { font-size: 1.15rem; }

.hub-group + .hub-group { margin-top: clamp(40px, 6vw, 64px); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: a bare 1fr can't shrink below its content's min-width,
     so one long unbreakable line (a URL, a hash) would widen the whole page. */
  .p-hero-grid, .live-grid, .p-split { grid-template-columns: minmax(0, 1fr); }
  .p-split.rev > :first-child { order: 0; }
  .proj-grid.cols-2, .proj-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
}
/* Grid children must be allowed to shrink so overflow:auto blocks scroll internally. */
.p-split > *, .p-hero-grid > *, .live-grid > *, .proj-grid > * { min-width: 0; }
.p-split p, .p-card p, .p-card h3, .p-spec dd, .p-note, .p-list li, .live-card, .tl-text, .p-bar-sub { overflow-wrap: anywhere; }
/* The header CTA is redundant on phones (the hero has its own buttons) and doesn't fit beside the brand + menu button. */
@media (max-width: 520px) {
  .site-nav .nav-cta { display: none; }
}
@media (max-width: 640px) {
  .activity-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .activity-chip { grid-column: 1; }
  .activity-kind { grid-column: 2; text-align: right; }
  .activity-text { grid-column: 1 / -1; white-space: normal; }
  .activity-when { grid-column: 1 / -1; }
  .p-spec { grid-template-columns: 1fr; }
  .p-spec dt { border-bottom: 0; padding-bottom: 0; }
  .p-spec dd { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-running .road-mark { animation: none; }
  .proj-card, .proj-card-art img, .p-gallery .p-shot { transition: none; }
}

/* ---------- Small utilities ---------- */
.btn-ver { font-family: var(--font-mono); font-weight: 500; font-size: 0.82em; opacity: 0.75; }
.btn-ver:not(:empty)::before { content: "\00b7"; margin-right: 6px; }
.footer-links { flex-wrap: wrap; row-gap: 10px; }
.road-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); margin-left: 8px; }
.road-body summary .road-date { margin-left: 4px; margin-right: 0; }

/* ---------- Council flow (Axiom CLI) ---------- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.flow-step { background: #141413; border: 1px solid var(--panel-line); border-radius: var(--radius-md); padding: 20px 22px; }
.flow-num { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--panel-text-soft); }
.flow-step h4 { font-family: var(--font-display); font-size: 1.25rem; margin: 6px 0 8px; color: var(--panel-text); }
.flow-step p { margin: 0; font-size: 0.93rem; color: var(--panel-text-soft); }
.flow-arrow { align-self: center; color: #5a5850; font-size: 1.4rem; }
.flow-outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.flow-out { border: 1px dashed #3a3a36; border-radius: var(--radius-sm); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.flow-out b { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #3ddc97; font-weight: 500; }
.flow-out span { color: var(--panel-text); font-size: 0.95rem; }
.flow-foot { margin: 18px 0 0; font-size: 0.9rem; max-width: 80ch; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .flow-outcomes { grid-template-columns: 1fr; }
}

/* ---------- Kestrel block-stack schematic ---------- */
.stack { display: grid; grid-template-columns: repeat(20, 1fr); gap: 6px; margin: 18px 0 16px; }
.blk { display: block; aspect-ratio: 1 / 1.5; border-radius: 6px; }
.blk.g { background: linear-gradient(180deg, #2fd6c0, #2f6bff); }
.blk.a { background: linear-gradient(180deg, #f7a8c4, #f3c94a); }
.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 0.88rem; color: var(--panel-text-soft); }
.stack-legend span { display: flex; align-items: center; gap: 10px; }
.stack-legend .blk { width: 14px; height: 20px; aspect-ratio: auto; flex: none; border-radius: 4px; }
.tiers { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--panel-line); }
.tiers span { border: 1px solid var(--panel-line); border-radius: 999px; padding: 8px 14px; font-size: 0.88rem; color: var(--panel-text); background: #141413; }
.tiers b { color: #5a5850; font-weight: 400; }
.pillar .evidence { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.02em; color: #7d7a70; margin-top: 8px; }
@media (max-width: 640px) { .stack { grid-template-columns: repeat(10, 1fr); } }

.repo-list { list-style: none; margin: 0; padding: 0; }
.repo-list li { border-bottom: 1px solid var(--line); }
.repo-list li:last-child { border-bottom: 0; }
.repo-list a { display: block; padding: 14px 0; text-decoration: none; }
.repo-list a:hover strong { text-decoration: underline; }
.repo-list strong { display: block; font-family: var(--font-display); }
.repo-list span { display: block; color: var(--ink-soft); font-size: 0.88rem; margin-top: 2px; }

.p-stack { display: grid; gap: clamp(28px, 4vw, 44px); margin-bottom: 8px; }
