@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
  --primary: #173B6E;
  --primary-hover: #12315D;
  --primary-soft: #DEE8F5;
  --accent: #2F6FB3;
  --accent-warm: #C88A3D;
  --accent-warm-soft: #F5E7D3;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-alt: #EEF3F9;
  --text: #1B2430;
  --text-muted: #5B6B7F;
  --line: #C8D7EE;
  --success: #2E7D5A;
  --warning: #C48A2C;
  --radius: 8px;
  --radius-lg: 12px;
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --container: 1100px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.header {
  background: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo:hover { text-decoration: none; }

.header__logo-badge {
  font-family: var(--font-base);
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--accent-warm);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle__icon {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: white;
  left: 0;
}

.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after { top: 7px; }

/* Checkbox hack for mobile nav */
.nav-checkbox { display: none; }

.nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav__link {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav__link:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.nav__link--active {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.breadcrumbs a { color: var(--accent); }
.breadcrumbs__sep { color: var(--line); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero__subtitle {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.hero__date {
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== SECTION ===== */
.section {
  padding: 3rem 0;
}

.section__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

/* ===== METRICS GRID ===== */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.metric-card__icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.metric-card__value-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.metric-card__value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.metric-card__delta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  animation: delta-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.6s;
}

.metric-card__delta--up {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  color: var(--success);
}

.metric-card__delta--down {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  color: #C62828;
}

.metric-card__delta--zero {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.metric-card__delta-icon {
  font-size: 0.625rem;
}

@keyframes delta-pop {
  0% { opacity: 0; transform: scale(0.5) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes value-reveal {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.metric-card__value {
  animation: value-reveal 0.5s ease both;
}

.metric-card:nth-child(1) .metric-card__value { animation-delay: 0.1s; }
.metric-card:nth-child(2) .metric-card__value { animation-delay: 0.15s; }
.metric-card:nth-child(3) .metric-card__value { animation-delay: 0.2s; }
.metric-card:nth-child(4) .metric-card__value { animation-delay: 0.25s; }
.metric-card:nth-child(5) .metric-card__value { animation-delay: 0.3s; }
.metric-card:nth-child(6) .metric-card__value { animation-delay: 0.35s; }
.metric-card:nth-child(7) .metric-card__value { animation-delay: 0.4s; }
.metric-card:nth-child(8) .metric-card__value { animation-delay: 0.45s; }

.metric-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
}

.metric-card__detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== CHANGE CARDS (category progress for "What new") ===== */
.change-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.change-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: change-card-in 0.5s ease both;
}

.change-card:nth-child(1) { animation-delay: 0.1s; }
.change-card:nth-child(2) { animation-delay: 0.2s; }
.change-card:nth-child(3) { animation-delay: 0.3s; }
.change-card:nth-child(4) { animation-delay: 0.4s; }
.change-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes change-card-in {
  0% { opacity: 0; transform: translateY(16px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.change-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.change-card__icon {
  font-size: 1.5rem;
}

.change-card__delta {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}

.change-card__delta--up {
  background: #E8F5E9;
  color: var(--success);
}

.change-card__delta--down {
  background: #FFEBEE;
  color: #C62828;
}

.change-card__value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.change-card__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.change-card__bar {
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
}

.change-card__bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.change-card__bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== PROGRESS ===== */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.progress-item {}

.progress-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.progress-item__label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.progress-item__stats {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.progress-item__bar {
  height: 10px;
  background: var(--surface-alt);
  border-radius: 5px;
  overflow: hidden;
}

.progress-item__fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-item__fill--done {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.progress-item__fill--wip {
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.progress-item__legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-dot--done { background: var(--primary); }
.legend-dot--wip { background: var(--accent-warm); }
.legend-dot--todo { background: var(--line); }

/* ===== COMPARISON TABLE ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-table td:first-child {
  color: var(--text-muted);
  width: 45%;
}

.compare-table td:last-child {
  color: var(--primary);
  font-weight: 500;
}

.compare-table tr:hover td {
  background: var(--surface-alt);
}

/* ===== INDEX LIST ===== */
.index-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.index-item {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.index-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.index-item__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.index-item__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== MARKDOWN CONTENT ===== */
.md-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.md-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary);
  margin: 2rem 0 1rem;
  line-height: 1.25;
}

.md-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
  margin: 1.75rem 0 0.75rem;
  line-height: 1.3;
}

.md-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary);
  margin: 1.5rem 0 0.5rem;
}

.md-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
}

.md-content p {
  margin: 0 0 1rem;
}

.md-content ul, .md-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.md-content li {
  margin-bottom: 0.25rem;
}

.md-content blockquote {
  border-left: 4px solid var(--accent-warm);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--accent-warm-soft);
  color: var(--text);
  font-style: italic;
}

.md-content code {
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'Consolas', 'Monaco', monospace;
}

.md-content pre {
  background: var(--primary);
  color: white;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
}

.md-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.md-content th,
.md-content td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.md-content th {
  background: var(--surface-alt);
  font-weight: 600;
  font-size: 0.8125rem;
}

.md-content tr:nth-child(even) td {
  background: var(--bg);
}

.md-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.md-content img {
  max-width: 100%;
  border-radius: var(--radius);
}

.md-content a {
  color: var(--accent);
}

/* ===== STATUS BADGES ===== */
.status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
}

.status--done {
  background: #E8F5E9;
  color: var(--success);
}

.status--wip {
  background: #FFF3E0;
  color: var(--warning);
}

.status--todo {
  background: var(--surface-alt);
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8125rem;
  margin-top: 2rem;
}

.footer a { color: rgba(255,255,255,0.8); }

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: var(--accent-warm-soft);
  border: 1px solid var(--accent-warm);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}

.highlight-box__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.highlight-box p {
  margin: 0;
  line-height: 1.6;
}

/* ===== TASK BOARD ===== */
.task-board {}

.task-board__summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.task-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.task-stat__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.task-stat__dot--done { background: var(--success); }
.task-stat__dot--wip { background: var(--accent-warm); }
.task-stat__dot--open { background: var(--line); }

.task-stat__count {
  font-weight: 700;
  color: var(--primary);
}

.task-board__groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.task-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.task-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}

.task-group__header:hover {
  background: var(--primary-soft);
}

.task-group__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-group__icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.task-group--collapsed .task-group__icon {
  transform: rotate(-90deg);
}

.task-group--collapsed .task-group__body {
  display: none;
}

.task-group__badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 8px;
}

.task-group__body {
  padding: 0;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

.task-item:last-child {
  border-bottom: none;
}

.task-item__status {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}

.task-item__status--closed {
  background: #E8F5E9;
  color: var(--success);
}

.task-item__status--in_progress {
  background: #FFF3E0;
  color: var(--accent-warm);
  animation: pulse-wip 2s infinite;
}

@keyframes pulse-wip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.task-item__status--open {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.task-item__content {
  flex: 1;
  min-width: 0;
}

.task-item__title {
  font-weight: 500;
  color: var(--text);
}

.task-item__title--closed {
  color: var(--text-muted);
}

.task-item__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.task-item__id {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.task-item__priority {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 3px;
}

.task-item__priority--p0 { background: #FFEBEE; color: #C62828; }
.task-item__priority--p1 { background: #FFF3E0; color: #E65100; }
.task-item__priority--p2 { background: #E8F5E9; color: #2E7D32; }
.task-item__priority--p3 { background: var(--surface-alt); color: var(--text-muted); }
.task-item__priority--p4 { background: var(--surface-alt); color: var(--text-muted); }

.task-sub {
  padding-left: 2.5rem;
  background: var(--bg);
}

.task-sub .task-item {
  border-bottom-color: var(--line);
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

.task-sub .task-item__status {
  width: 14px;
  height: 14px;
  font-size: 0.5rem;
}

.task-item__close-reason {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .task-board__summary { gap: 0.5rem; }
  .task-stat { font-size: 0.8125rem; padding: 0.375rem 0.75rem; }
  .task-group__header { padding: 0.625rem 1rem; }
  .task-item { padding: 0.5rem 1rem; }
  .task-sub { padding-left: 1.5rem; }
}

/* ===== SITE TREE ===== */
.site-tree {
  font-size: 0.9375rem;
  line-height: 1.8;
}

.site-tree__group {
  margin-bottom: 1.5rem;
}

.site-tree__group-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
  padding: 0.5rem 0 0.25rem;
  border-bottom: 2px solid var(--line);
}

.site-tree__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-tree__item {
  position: relative;
  padding: 0.375rem 0 0.375rem 1.75rem;
}

.site-tree__item::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.site-tree__item:last-child::before {
  bottom: 50%;
}

.site-tree__item::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 1rem;
  width: 0.75rem;
  height: 1px;
  background: var(--line);
}

.site-tree__page {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 2px 0;
}

.site-tree__url {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--surface-alt);
  padding: 1px 6px;
  border-radius: 4px;
}

.site-tree__name {
  color: var(--text);
  font-weight: 500;
}

.site-tree__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 8px;
  line-height: 1.6;
}

.site-tree__tag--static {
  background: #E8F5E9;
  color: var(--success);
}

.site-tree__tag--dynamic {
  background: #E3F2FD;
  color: var(--accent);
}

.site-tree__tag--cms {
  background: #FFF3E0;
  color: var(--accent-warm);
}

.site-tree__tag--wip {
  background: #FFF3E0;
  color: var(--warning);
}

.site-tree__sublist {
  list-style: none;
  padding: 0 0 0 1.75rem;
  margin: 0;
}

.site-tree__sublist .site-tree__item::before {
  left: 0.25rem;
}

.site-tree__sublist .site-tree__item::after {
  left: 0.25rem;
  width: 0.625rem;
}

.site-tree__sublist .site-tree__item {
  padding-left: 1.25rem;
}

.site-tree__summary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .site-tree { font-size: 0.875rem; }
  .site-tree__url { font-size: 0.75rem; }
  .site-tree__sublist { padding-left: 1rem; }
}

/* ===== DELTA BADGES ===== */
.delta-badge {
  display: inline-block;
  font-family: var(--font-base);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 0.25rem;
  vertical-align: middle;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.delta-badge--up {
  background: #E8F5E9;
  color: var(--success);
}

.delta-badge--down {
  background: #FFEBEE;
  color: #C62828;
}

/* ===== CHANGELOG ===== */
.changelog {
  display: flex;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}

.changelog__timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.25rem;
  gap: 0;
}

.changelog__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.changelog__line {
  width: 2px;
  flex: 1;
  background: var(--line);
  min-height: 20px;
}

.changelog__content {
  flex: 1;
  min-width: 0;
}

.changelog__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.changelog__date {
  font-weight: 600;
  color: var(--primary);
}

.changelog__arrow {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.changelog__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.changelog__item {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: 1px solid var(--surface-alt);
}

.changelog__item:last-child {
  border-bottom: none;
}

.changelog__item::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.5rem;
  color: var(--success);
  font-weight: 700;
  font-size: 0.75rem;
}

.changelog__commits {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.changelog__commits-title {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.changelog__commit {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.9);
  padding: 0.25rem 0;
}

.changelog__commit code {
  color: var(--accent-warm);
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .changelog { flex-direction: column; gap: 0.5rem; padding: 1rem; }
  .changelog__timeline { flex-direction: row; }
  .changelog__line { min-height: 2px; min-width: 20px; height: 2px; }
  .changelog__header { flex-wrap: wrap; gap: 0.5rem; }
}

/* ===== CHANGELOG COMMITS ===== */
.changelog-commits {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

.changelog-commits__title {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* ===== TIMELINE COMMITS ===== */
.timeline__commit {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #E8F5E9;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.timeline__commit:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline__commit code {
  color: #F9A825;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.timeline__commit-msg {
  color: rgba(255,255,255,0.95);
  line-height: 1.4;
}

.timeline__commit-hash {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ===== TIMELINE (What New) ===== */
.timeline-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.timeline-header__date {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-header__date--now {
  color: var(--primary);
}

.timeline-header__arrow {
  font-size: 1.5rem;
  color: var(--accent);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
}

.timeline__item {
  display: flex;
  gap: 1.25rem;
  animation: timeline-in 0.5s ease both;
}

@keyframes timeline-in {
  0% { opacity: 0; transform: translateX(-16px); }
  100% { opacity: 1; transform: translateX(0); }
}

.timeline__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.timeline__dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline__line {
  width: 2px;
  flex: 1;
  min-height: 32px;
  background: linear-gradient(to bottom, var(--primary), var(--line));
}

.timeline__content {
  flex: 1;
  padding-bottom: 1.5rem;
  padding-top: 0.25rem;
}

.timeline__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.timeline__label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.timeline__delta {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}

.timeline__delta--up {
  background: #E8F5E9;
  color: var(--success);
}

.timeline__delta--down {
  background: #FFEBEE;
  color: #C62828;
}

.timeline__bar {
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.375rem;
}

.timeline__bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation: bar-grow 1s ease both;
  animation-delay: 0.3s;
}

@keyframes bar-grow {
  0% { width: 0 !important; }
}

.timeline__values {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: 'Consolas', 'Monaco', monospace;
}

.timeline__cur {
  font-weight: 700;
  color: var(--primary);
}

.timeline__arrow {
  color: var(--accent);
}

/* ===== TIMELINE STRIP (snapshots overview) ===== */
.timeline-stamps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  justify-content: center;
}

.timeline-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.timeline-stamp__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-stamp__loc {
  font-family: 'Consolas', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-stamp--current .timeline-stamp__date {
  color: var(--primary);
}

.timeline-stamp--current .timeline-stamp__loc {
  color: var(--accent);
  font-size: 1rem;
}

.timeline-stamp__sep {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 0.25rem;
}

/* ===== TIMELINE ROWS (per-metric sparklines) ===== */
.timeline-rows {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.timeline-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  animation: timeline-row-in 0.5s ease both;
}

@keyframes timeline-row-in {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.timeline-row__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.timeline-row__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.timeline-row__label {
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.timeline-row__delta {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}

.timeline-row__delta--up {
  background: #E8F5E9;
  color: var(--success);
}

.timeline-row__delta--down {
  background: #FFEBEE;
  color: #C62828;
}

.timeline-row__track {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.timeline-row__conn {
  position: absolute;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, var(--primary-soft), var(--accent));
  border-radius: 2px;
  pointer-events: none;
}

.timeline-row__dot-wrap {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-row__dot {
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.timeline-row__dot--past {
  background: var(--primary-soft);
  border-color: var(--line);
}

.timeline-row__dot--current {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 111, 179, 0.2);
}

.timeline-row__dot-wrap:hover .timeline-row__dot {
  transform: scale(1.4);
  z-index: 2;
}

.timeline-row__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.timeline-row__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--primary);
}

.timeline-row__dot-wrap:hover .timeline-row__tooltip {
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-checkbox:checked ~ .nav {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
  }

  .nav__link {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .hero__title { font-size: 1.75rem; }
  .hero__subtitle { font-size: 1rem; }
  .hero { padding: 2rem 1rem; }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card__value { font-size: 2rem; }
  .metric-card { padding: 1rem; }

  .section { padding: 2rem 0; }
  .section__title { font-size: 1.5rem; }

  .md-content { padding: 1.5rem 1rem 3rem; }

  .index-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .metric-card__value { font-size: 1.75rem; }
  .metric-card__icon { font-size: 1.25rem; }
}
