:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #14140F;
  --ink-soft: #5B5B55;
  --ink-faint: #9A9A92;
  --border: #E8E6DF;
  --border-strong: #D4D1C5;
  --accent: #3A5A40;
  --accent-soft: #556B5B;
  --highlight: #F3F0E6;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 48px 32px 48px 48px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
}

.sidebar-brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 4px;
  text-decoration: none;
  display: block;
}

.sidebar-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
}

.nav-group {
  margin-bottom: 32px;
}

.nav-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.nav-group a {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 0;
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: color 0.15s, border-color 0.15s;
}

.nav-group a:hover {
  color: var(--ink);
}

.nav-group a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.nav-group .idx {
  display: inline-block;
  width: 28px;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Main */
main {
  padding: 80px 80px 160px;
  max-width: 880px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--mono);
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 72px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

section:first-of-type > h2:first-child,
.hero + section > h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 48px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 36px 0 12px;
}

h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 24px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

p { margin: 0 0 16px; }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; color: var(--ink); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

a:hover { border-bottom-color: var(--accent); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
ul li::marker { color: var(--ink-faint); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--highlight);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
}

pre {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.6;
  margin: 16px 0 24px;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--highlight);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

blockquote p { margin: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 13.5px;
  font-family: var(--sans);
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--highlight);
  border-bottom: 1px solid var(--border-strong);
}

tr:hover td { background: rgba(243, 240, 230, 0.4); }
td code { font-size: 12px; }

/* Hero */
.hero {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  flex-wrap: wrap;
}

.hero-meta span strong {
  color: var(--ink);
  font-weight: 500;
  margin-left: 6px;
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--ink-faint);
  border-bottom: none;
}

.breadcrumb a:hover { color: var(--ink); }

.breadcrumb .sep {
  display: inline-block;
  margin: 0 10px;
  opacity: 0.5;
}

/* Release header block */
.release-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 16px 0 28px;
  font-family: var(--mono);
  font-size: 12px;
}

.release-meta dt {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}

.release-meta dd {
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.status-shipped { background: #D4E4D6; color: #2D4A33; }
.status-progress { background: #F0E5C5; color: #6B5720; }
.status-upnext { background: #E4DEF0; color: #4A3D68; }
.status-queued { background: #EAE8E0; color: #6B6858; }
.status-post { background: #E8E2D4; color: #6B5720; }

/* Roadmap table specific */
.roadmap-table td:first-child {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  width: 48px;
}

/* Release section (index.html inline) */
.release {
  scroll-margin-top: 24px;
  padding-top: 40px;
}

.release + .release {
  margin-top: 40px;
}

/* Callout */
.callout {
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
}

.callout strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

/* Prev/Next navigation at bottom of one-pagers */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.pager a {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
  color: var(--ink);
}

.pager a:hover {
  border-color: var(--border-strong);
  background: var(--highlight);
}

.pager a.prev { text-align: left; }
.pager a.next { text-align: right; }

.pager .pager-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pager .pager-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.pager a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Footer */
.footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* Kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.kanban-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 18px;
  min-height: 400px;
}

.kanban-col h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--ink);
}

.kanban-col .kanban-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.kanban-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.kanban-card:hover {
  border-color: var(--border-strong);
  background: var(--highlight);
}

.kanban-card-id {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.kanban-card-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.kanban-card-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.kanban-card-meta .sep {
  opacity: 0.5;
  margin: 0 6px;
}

.kanban-card-dep {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  font-style: italic;
}

/* Kanban responsive */
@media (max-width: 1400px) {
  .kanban { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .kanban { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 960px) {
  body { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    padding: 32px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  main { padding: 48px 24px 120px; }
  .hero h1 { font-size: 32px; }
  .pager { grid-template-columns: 1fr; }
  main { max-width: none; }
}

/* Print-friendly */
@media print {
  .sidebar, .pager { display: none; }
  body { grid-template-columns: 1fr; }
  main { max-width: none; padding: 24px; }
  h2 { page-break-after: avoid; }
  table, pre, blockquote { page-break-inside: avoid; }
}
