:root {
  --bg: #f4f7f1;
  --surface: #ffffff;
  --surface-strong: #0f281f;
  --text: #112018;
  --muted: #53635c;
  --line: #d4ddd6;
  --brand: #176a43;
  --brand-soft: #dff3e7;
  --accent: #c89a3b;
  --danger: #8d3a3a;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(20, 49, 34, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(23,106,67,0.08), transparent 34%),
    linear-gradient(180deg, #f8fbf7 0%, var(--bg) 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 24px 18px 64px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, #0f3928 100%);
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.brand-copy { display: grid; }
.brand-copy small { color: var(--muted); }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--brand); }

.hero {
  display: grid; grid-template-columns: 1.2fr 0.9fr;
  gap: 24px; align-items: stretch; margin-bottom: 28px;
}
.hero-copy, .hero-panel, .panel, .stat-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-copy { padding: 34px; }
.hero-panel { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow {
  display: inline-flex; margin: 0 0 12px; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 8px 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.05; }
h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); max-width: 12ch; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; }
.lead, .section-head p, .panel p, .quote p, .stat-card small {
  color: var(--muted); line-height: 1.6;
}
.hero-actions, .section-head, .toolbar, .tabs, .browse-summary { margin-top: 18px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 18px; border-radius: 999px; font-weight: 700;
  border: 1px solid transparent; transition: .2s ease;
}
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: #0f5937; }
.button-secondary { background: #fff; border-color: var(--line); color: var(--text); }

.mini-grid, .grid-three, .grid-four, .two-column, .quotes, .roadmap, .browse-results {
  display: grid; gap: 18px;
}
.mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quotes, .roadmap, .browse-results { grid-template-columns: 1fr; }

.stat-card { padding: 18px; }
.stat-card span, .metric-row span:first-child, .progress-row span:first-child {
  color: var(--muted); font-size: .92rem; display: block;
}
.stat-card strong { display: block; font-size: 1.9rem; margin-top: 6px; }
.stat-card.emphasis {
  background: linear-gradient(135deg, #0f281f 0%, #123826 100%);
  color: #fff;
}
.stat-card.emphasis span, .stat-card.emphasis small { color: rgba(255,255,255,0.76); }

.section { margin-top: 18px; }
.section-head { margin-bottom: 18px; }
.panel { padding: 22px; }
.split { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.quote { padding: 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.quote footer { margin-top: 12px; color: var(--muted); font-size: .95rem; }
.quote .original {
  color: var(--muted);
  font-size: .92rem;
  margin-top: 10px;
}
.roadmap-item { padding: 20px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #eef2ef;
}
.gallery-card .caption {
  display: grid;
  gap: 6px;
}
.roadmap-item .badge {
  display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  margin-bottom: 10px;
}
.badge.done { background: #dbf6e9; color: var(--brand); }
.badge.active { background: #fff2d9; color: #8a5d00; }
.badge.next { background: #edf2ff; color: #2b4ea2; }

.metric-list, .progress-list { display: grid; gap: 12px; }
.metric-row, .progress-row { display: grid; gap: 6px; }
.metric-row strong { font-size: 1.15rem; }
.progress-track {
  width: 100%; height: 10px; border-radius: 999px; background: #e7ece8; overflow: hidden;
}
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), #2ea068); border-radius: 999px; }

.toolbar, .tabs {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.toolbar input, .toolbar select, .stacked-form input, .stacked-form select, .stacked-form textarea {
  width: 100%; padding: 14px 15px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit;
}
.toolbar input { min-width: 240px; flex: 1; }
.toolbar select { min-width: 180px; }
.tab {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 12px 16px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer;
}
.tab.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }

.browse-summary { color: var(--muted); }
.browse-card {
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow);
  padding: 20px; display: grid; gap: 12px;
}
.meta-line, .sources-line, .missing-line { display: flex; gap: 8px; flex-wrap: wrap; }
.pill, .missing-pill {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700;
}
.pill { background: #edf3ef; color: #335345; }
.missing-pill { background: #fff0f0; color: var(--danger); }
.compact-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.schedule-preview {
  display: grid;
  gap: 8px;
}
.schedule-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f3f7f4;
}
.schedule-item strong {
  font-size: .92rem;
}
.stacked-form { display: grid; gap: 12px; }
.stacked-form label { display: grid; gap: 8px; }
.stacked-form span { font-weight: 700; }
.form-status { min-height: 1.2em; color: var(--muted); }
.form-status.success { color: var(--brand); }
.form-status.error { color: var(--danger); }

@media (max-width: 980px) {
  .hero, .grid-three, .grid-four, .two-column, .split { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  h1 { max-width: none; }
}
