:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --ink: #18241b;
  --muted: #5b6b60;
  --accent: #176b3a;
  --accent-strong: #0f4d28;
  --accent-soft: #e2efe6;
  --line: #dde6df;
  --shadow: 0 1px 2px rgba(23, 36, 27, 0.06), 0 8px 24px rgba(23, 36, 27, 0.06);
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1511;
    --surface: #18201a;
    --ink: #e8f0eb;
    --muted: #a7b8ac;
    --accent: #4fbf7d;
    --accent-strong: #7fd6a4;
    --accent-soft: #1d3025;
    --line: #27322a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

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

.brand .dot {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  vertical-align: middle;
}

.badge.dim {
  background: transparent;
  color: var(--muted);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 44rem;
  margin: 0 0 2rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.06s ease, box-shadow 0.12s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

/* Sections */
.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.section .sub {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 40rem;
}

/* Cards */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.4rem;
}

/* Project feature */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.feature .meta-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.feature .meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}

.feature .meta-list li span:first-child {
  color: var(--muted);
}

.feature .meta-list li span:last-child {
  font-weight: 600;
}

/* Status table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

th {
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill.done {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill.now {
  background: #fdeeca;
  color: #7a4e00;
}

@media (prefers-color-scheme: dark) {
  .status-pill.now {
    background: #3a2f14;
    color: #ffd479;
  }
}

.status-pill.next {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Sensor chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 550;
}

.chip strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* Callout */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* Lists */
.lede-list {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.lede-list li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.lede-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

ol.steps {
  padding-left: 1.1rem;
}

ol.steps li {
  margin-bottom: 0.6rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  margin-top: 2rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.site-footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer .parent-link {
  font-weight: 650;
  color: var(--ink);
}

.site-footer small {
  color: var(--muted);
}

/* Typography helpers */
.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 44rem;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .site-header .container {
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}
