:root {
  --bg: #0f1117;
  --bg-elevated: #161922;
  --bg-card: #1a1e28;
  --text: #e8eaed;
  --text-secondary: #9aa3b2;
  --text-tertiary: #6b7280;
  --accent: #ff9900;
  --accent-dim: rgba(255, 153, 0, 0.12);
  --info: #6eb5ff;
  --info-bg: rgba(110, 181, 255, 0.1);
  --success: #5fd48a;
  --success-bg: rgba(95, 212, 138, 0.12);
  --warning: #f0b429;
  --warning-bg: rgba(240, 180, 41, 0.12);
  --violet: #9966ff;
  --stroke: #2a3140;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", monospace;
  --max-w: 980px;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--info);
}

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* Header */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.muted {
  color: var(--text-secondary);
}

.tertiary {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.section-gap {
  margin-top: 28px;
}

/* Pills */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--stroke);
}

.pill-info {
  color: var(--info);
  background: var(--info-bg);
  border-color: rgba(110, 181, 255, 0.25);
}

.pill-neutral {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.pill-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(95, 212, 138, 0.25);
}

.pill-warning {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: rgba(240, 180, 41, 0.25);
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.stat-info .stat-value {
  color: var(--info);
}

/* Callout */
.callout {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  border-left-width: 3px;
}

.callout-info {
  background: var(--info-bg);
  border-left-color: var(--info);
}

.callout-warning {
  background: var(--warning-bg);
  border-left-color: var(--warning);
}

.callout-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
  color: var(--text-secondary);
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .stats {
    grid-template-columns: 1fr;
  }
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-body {
  padding: 16px;
}

.card-body-flush {
  padding: 0;
}

.card-borderless {
  background: transparent;
  border: none;
}

.card-borderless .card-body {
  padding: 12px 0;
  border-left: 2px solid var(--stroke);
  padding-left: 16px;
}

.divider {
  height: 1px;
  background: var(--stroke);
  margin: 12px 0;
}

/* Lists */
.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullet-list li {
  padding: 3px 0;
  color: var(--text-secondary);
}

.bullet-list li::before {
  content: "· ";
  color: var(--text-tertiary);
}

/* Orbit diagram */
.orbit-diagram {
  width: 100%;
  height: auto;
  display: block;
}

.orbit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--stroke);
}

.orbit-row:last-child {
  border-bottom: none;
}

.orbit-row-text {
  flex: 1;
  min-width: 0;
}

.orbit-row-text strong {
  display: block;
  margin-bottom: 2px;
}

.orbit-row-text span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Todo / roadmap */
.todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--stroke);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.todo-in-progress .todo-icon {
  border-color: var(--info);
  color: var(--info);
}

.todo-pending .todo-icon {
  color: var(--text-tertiary);
}

/* Loop steps */
.loop-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.loop-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loop-step strong {
  display: block;
  margin-bottom: 4px;
}

.loop-step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.loop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.loop-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 640px) {
  .loop-grid {
    grid-template-columns: 1fr;
  }
}

/* Collapsible */
details.collapsible {
  margin-top: 28px;
}

details.collapsible summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 8px 0;
  user-select: none;
}

details.collapsible summary::-webkit-details-marker {
  display: none;
}

details.collapsible summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.85rem;
  transition: transform 0.15s;
}

details.collapsible[open] summary::before {
  transform: rotate(90deg);
}

details.collapsible .count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

details.collapsible .collapsible-body {
  padding-top: 8px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  text-align: left;
  padding: 10px 16px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--stroke);
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
  color: var(--text-secondary);
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

/* Art pills row */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Footer note */
.footer-note {
  margin-top: 28px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.site-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
