:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --ink: #18201f;
  --muted: #59615d;
  --line: rgba(24, 32, 31, 0.14);
  --soft: #ece5d8;
  --accent: #176b5d;
  --accent-dark: #0e493f;
  --accent-soft: rgba(23, 107, 93, 0.12);
  --code: #102420;
  --shadow: 0 24px 60px rgba(24, 32, 31, 0.08);
}

* { box-sizing: border-box; }

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

a { color: var(--accent-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow { width: min(820px, calc(100% - 2rem)); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.96);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 0;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  justify-content: flex-end;
  font-size: 0.95rem;
}

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

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active {
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.hero {
  padding: 5.2rem 0 4rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 2rem;
  align-items: center;
}

.page-hero {
  padding: 4.4rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 900px;
  font-size: clamp(2.45rem, 6.4vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 32, 31, 0.1);
}

.section { padding: 4rem 0; }
.section.muted { background: var(--soft); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 2rem;
  align-items: start;
}

.grid { display: grid; gap: 1rem; }
.grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.matrix-card {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.matrix-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

.matrix-table thead th {
  border-top: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.matrix-table td:first-child {
  color: var(--ink);
  font-weight: 760;
}

.implementation-card a {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.implementation-card h3 {
  font-size: 1.3rem;
}

.card,
.summary-card,
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.summary-card {
  background:
    linear-gradient(145deg, rgba(23, 107, 93, 0.12), rgba(255, 253, 248, 0.95)),
    var(--paper);
}

.stack > * + * { margin-top: 0.85rem; }
.stack > *:last-child { margin-bottom: 0; }

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

.plain-list li {
  padding: 0.68rem 0;
  border-top: 1px solid var(--line);
}

.plain-list li:first-child { border-top: 0; }

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  margin: 0.5rem 0;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
}

.code-card {
  background: var(--code);
  color: #dcebe5;
  overflow: auto;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  font: 0.92rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.cta-panel p { margin: 0; }

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
  .hero { padding-top: 3.6rem; }
  .hero-grid,
  .split,
  .grid.two-up,
  .grid.three-up,
  .grid.four-up,
  .step-card {
    grid-template-columns: 1fr;
  }
  h1 { letter-spacing: -0.055em; }
}
