* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-warm: #f4f1ea;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-faint: #9a9a9a;
  --border: #e8e5dd;
  --border-strong: #d4cfc2;
  --ink: #1e3a5f;
  --ink-hover: #15294a;
  --accent-active: #15803d;
  --accent-active-bg: #ecfdf5;
  --accent-queued: #475569;
  --accent-queued-bg: #f1f5f9;
  --accent-complete: #1e3a5f;
  --accent-complete-bg: #eff3f9;
  --accent-retired: #92400e;
  --accent-retired-bg: #fef3c7;
  --accent-future: #94a3b8;
  --accent-future-bg: #f8fafc;
  --accent-reframing: #b45309;
  --accent-reframing-bg: #fef3c7;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(20,20,20,0.04), 0 0 0 1px var(--border);
  --shadow-hover: 0 4px 12px rgba(20,20,20,0.06), 0 0 0 1px var(--border-strong);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Iowan Old Style', 'Palatino', 'Georgia', serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --max-content: 1080px;
}

html { scroll-behavior: smooth; }
html, body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--ink-hover); }
button { font: inherit; cursor: pointer; }

/* ===== layout ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250,249,246,0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: none;
}
.brand .dot { color: var(--accent-active); }
.brand .domain {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-left: 10px;
  font-weight: 400;
  letter-spacing: 0;
}
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  border-bottom: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}
.nav a:hover { background: var(--surface-warm); color: var(--text); }
.nav a.active { background: var(--ink); color: white; }

main {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-warm);
  padding: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.site-footer .gen { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ===== typography ===== */

h1, h2, h3, h4 { font-family: var(--font-serif); letter-spacing: -0.015em; line-height: 1.25; }
h1 { font-size: 40px; font-weight: 600; }
h2 { font-size: 26px; font-weight: 600; margin-top: 48px; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 600; }
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.lead { font-size: 17px; color: var(--text-muted); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-warm); padding: 1px 5px; border-radius: 4px; }

/* ===== hero (index) ===== */

.hero {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}
.hero .eyebrow { color: var(--accent-active); }
.hero h1 { margin-bottom: 8px; }
.hero .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.status-grid > div h3 { font-family: var(--font-sans); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.status-grid p { font-size: 15px; line-height: 1.55; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--accent-active);
  border-radius: 999px;
}
.progress-label { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

/* ===== milestone timeline ===== */

.timeline {
  position: relative;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 24px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  top: calc(24px + 14px);
  height: 2px;
  background: var(--border-strong);
  z-index: 0;
}
.timeline-node {
  position: relative;
  flex: 0 0 230px;
  scroll-snap-align: start;
  padding: 0 12px;
  z-index: 1;
}
.timeline-node .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent-future);
  margin: 0 auto 12px;
  position: relative;
}
.timeline-node[data-state="complete"] .dot { background: var(--accent-complete); border-color: var(--accent-complete); }
.timeline-node[data-state="complete"] .dot::after { content: '✓'; color: white; font-size: 14px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; line-height: 1; }
.timeline-node[data-state="active"] .dot {
  background: var(--accent-active);
  border-color: var(--accent-active);
  box-shadow: 0 0 0 6px var(--accent-active-bg);
}
.timeline-node[data-state="active"] .dot::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--accent-active);
  opacity: 0.5;
  animation: pulse 2.4s ease-out infinite;
}
.timeline-node[data-state="queued"] .dot { border-color: var(--accent-queued); }
.timeline-node[data-state="retired"] .dot { background: var(--accent-retired-bg); border-color: var(--accent-retired); }
.timeline-node[data-state="retired"] .dot::after { content: '×'; color: var(--accent-retired); font-size: 18px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; line-height: 1; }
.timeline-node[data-state="reframing"] .dot,
.timeline-node[data-state="deferred"] .dot { border-color: var(--accent-reframing); border-style: dashed; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

.timeline-node .id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 4px;
}
.timeline-node .name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}
.timeline-node .meta {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.timeline-node[data-state="active"] .name { color: var(--accent-active); }
.timeline-node[data-state="retired"] .name { color: var(--accent-retired); text-decoration: line-through; text-decoration-color: var(--accent-retired); text-decoration-thickness: 1px; }

/* ===== tracks ===== */

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.track-card {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s;
}
.track-card:hover { box-shadow: var(--shadow-hover); }
.track-card h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.track-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

/* ===== badges & chips ===== */

.badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.active { background: var(--accent-active-bg); color: var(--accent-active); }
.badge.queued { background: var(--accent-queued-bg); color: var(--accent-queued); }
.badge.complete { background: var(--accent-complete-bg); color: var(--accent-complete); }
.badge.retired { background: var(--accent-retired-bg); color: var(--accent-retired); }
.badge.future { background: var(--accent-future-bg); color: var(--accent-future); }
.badge.reframing, .badge.deferred { background: var(--accent-reframing-bg); color: var(--accent-reframing); }

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  margin-right: 4px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

/* ===== recent updates ===== */

.recent-feed { display: grid; gap: 12px; }
.recent-item {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
}
.recent-item .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.recent-item .body { font-size: 14px; color: var(--text); }

/* ===== vision ===== */

.vision-section { margin-bottom: 48px; }
.vision-section h2 { margin-top: 0; }
.vision-section .body p { font-size: 16px; line-height: 1.65; color: var(--text); }
.vision-section .body p + p { margin-top: 1em; }

.tagline-banner {
  background: var(--ink);
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 40px;
}
.tagline-banner .eyebrow { color: rgba(255,255,255,0.6); }
.tagline-banner .quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 500;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.concept-card {
  background: var(--surface);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.concept-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.concept-card h3 { font-family: var(--font-serif); font-size: 18px; margin-bottom: 8px; }
.concept-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

.callout {
  background: var(--surface-warm);
  border-left: 3px solid var(--ink);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.callout .eyebrow { color: var(--ink); margin-bottom: 6px; }

/* ===== principles ===== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  position: sticky;
  top: 70px;
  z-index: 5;
}
.filter-bar .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-faint);
  margin-right: 8px;
}
.filter-btn {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  color: var(--text-muted);
  transition: all 0.12s;
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active { background: var(--ink); color: white; border-color: var(--ink); }

.principle-group { margin-bottom: 40px; }
.principle-group .group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.principle-group h2 { margin: 0; }
.principle-group .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.principle-card {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.principle-card:hover { box-shadow: var(--shadow-hover); }
.principle-card.candidate { border-left: 3px solid var(--accent-reframing); }
.principle-card.under_review { border-left: 3px solid var(--accent-future); }
.principle-card .name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}
.principle-card .one-line {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.principle-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
}
.principle-card .meta .chip { font-size: 10.5px; padding: 2px 8px; margin: 0 4px 0 0; }
.principle-card .meta .created {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  margin-left: auto;
  align-self: center;
}
.principle-card.hidden { display: none; }

/* ===== archive ===== */

.archive-section { margin-bottom: 56px; }

.completed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.completed-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.completed-card .name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}
.completed-card .date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
.completed-card .desc { font-size: 14px; color: var(--text-muted); }

.retired-card {
  background: var(--surface);
  border-left: 4px solid var(--accent-retired);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}
.retired-card .name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.retired-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--accent-retired); margin-bottom: 12px; }
.retired-card .desc { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

.log-feed { display: grid; gap: 12px; position: relative; }
.log-feed::before {
  content: '';
  position: absolute;
  left: 95px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.log-item {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
}
.log-item .date-col {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
  padding-top: 18px;
  white-space: nowrap;
}
.log-item .body-col {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
}
.log-item .body-col::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--bg);
  z-index: 1;
}
.log-item .title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}
.log-item .qualifier { font-size: 11px; color: var(--text-faint); margin-left: 6px; font-weight: 400; }
.log-item .summary { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

.adr-list { display: grid; gap: 10px; }
.adr-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  align-items: center;
}
.adr-item .id { font-family: var(--font-mono); font-size: 12px; color: var(--ink); font-weight: 600; }
.adr-item .title { font-size: 14px; }

/* ===== utility ===== */

.section-intro { color: var(--text-muted); font-size: 16px; max-width: 720px; margin-bottom: 24px; }
.section-intro p + p { margin-top: 0.8em; }

.loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ===== responsive ===== */

@media (max-width: 720px) {
  main { padding: 24px 16px 64px; }
  .site-header .inner { padding: 12px 16px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand .domain { display: none; }
  .nav a { padding: 5px 10px; font-size: 13px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; margin-top: 32px; }
  .hero { padding: 24px; }
  .hero .tagline { font-size: 16px; }
  .tagline-banner { padding: 24px; }
  .tagline-banner .quote { font-size: 18px; }
  .status-grid { grid-template-columns: 1fr; gap: 20px; }
  .recent-item { grid-template-columns: 1fr; gap: 4px; }
  .recent-item .date { font-size: 11px; }
  .timeline-node { flex-basis: 180px; }
  .log-item { grid-template-columns: 78px 1fr; gap: 16px; }
  .log-feed::before { left: 86px; }
  .filter-bar { top: 60px; }
}
