:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --bg-elevated: #ffffff;
  --bg-muted: #ecefeb;
  --text: #1d2320;
  --text-muted: #58635d;
  --line: #d7ddd6;
  --line-strong: #b3beb4;
  --accent: #285c52;
  --accent-strong: #163f38;
  --accent-soft: #e3eeea;
  --accent-contrast: #ffffff;
  --brass: #9b6d2f;
  --blue-gray: #4e6674;
  --shadow: 0 18px 46px rgba(31, 39, 35, 0.08);
  --radius: 8px;
  --header-height: 76px;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a18;
  --bg-elevated: #202521;
  --bg-muted: #2a302c;
  --text: #f2f0e9;
  --text-muted: #bdc4bb;
  --line: #3a423c;
  --line-strong: #566158;
  --accent: #8ac4b7;
  --accent-strong: #b8e4dc;
  --accent-soft: #243a35;
  --accent-contrast: #10221f;
  --brass: #d7ad6a;
  --blue-gray: #9ab5c2;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 14px;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
}

.nav-shell,
.section-inner {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand small {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 2px;
}

.nav-menu a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 8px 9px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.nav-menu a:hover,
.nav-menu a.is-active,
.nav-menu a[aria-current="location"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.nav-toggle:hover,
.theme-toggle:hover {
  border-color: var(--line-strong);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.theme-toggle {
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
}

.theme-toggle__icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.theme-toggle__icon::after {
  position: absolute;
  inset: -5px auto auto 7px;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  content: "";
  transition: transform 160ms ease;
}

[data-theme="dark"] .theme-toggle__icon::after {
  transform: translateX(-8px);
}

.theme-toggle__text {
  display: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.section {
  padding-block: 74px;
}

.hero {
  padding-block: 56px 72px;
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 34px;
}

.hero-copy {
  max-width: 74ch;
}

.section-kicker,
.article-type {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.1;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: 2.55rem;
}

h2 {
  margin-bottom: 18px;
  font-size: 2rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

p {
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero-subtitle {
  max-width: 58ch;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.5;
}

.hero-message {
  max-width: 66ch;
  margin-bottom: 30px;
  font-size: 1.02rem;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active,
.contact-links a:active {
  transform: translateY(0);
}

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

.button-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-contrast);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.systems-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.decision-panel {
  align-self: center;
  background: color-mix(in srgb, var(--bg-elevated) 78%, var(--bg));
  box-shadow: none;
}

.decision-panel .systems-panel__header {
  padding: 16px;
}

.decision-panel .systems-panel__header strong {
  max-width: 300px;
  color: color-mix(in srgb, var(--text) 86%, var(--text-muted));
  font-size: 1.08rem;
}

.decision-panel .decision-stack div {
  padding: 15px 16px;
}

.decision-panel .decision-stack span {
  color: var(--text-muted);
}

.decision-panel .decision-stack strong {
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
  font-size: 0.93rem;
}

.systems-panel__header {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.systems-panel__header span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.systems-panel__header strong {
  max-width: 340px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.18;
}

.decision-stack {
  display: grid;
  gap: 0;
}

.decision-stack div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.decision-stack div:last-child {
  border-bottom: 0;
}

.decision-stack span {
  color: var(--blue-gray);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.decision-stack strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.split-layout {
  display: grid;
  gap: 28px;
}

.section-copy {
  max-width: 72ch;
}

.section-copy p:last-child,
.contact-panel p:last-child,
.card p:last-child,
.decision-card p:last-child,
.ecosystem-route p:last-of-type,
.writing-article p:last-child,
.starting-point-callout p:last-child,
.timeline-item p:last-child {
  margin-bottom: 0;
}

.section-heading {
  max-width: 72ch;
  margin-bottom: 30px;
}

.decision-proof {
  border-block: 1px solid var(--line);
  background: var(--bg-elevated);
}

.decision-proof__inner {
  display: grid;
  gap: 28px;
}

.decision-proof__intro {
  max-width: 62ch;
}

.decision-proof__intro p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.06rem;
}

.proof-steps {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.proof-steps article {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-block: 18px;
}

.proof-steps span {
  color: var(--blue-gray);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.proof-steps p {
  max-width: 66ch;
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.03rem;
  line-height: 1.58;
}

.reflection,
.starting-points,
.questions {
  background: var(--bg);
}

.reflection,
.starting-points {
  border-bottom: 1px solid var(--line);
}

.questions {
  border-block: 1px solid var(--line);
}

.editorial-section {
  max-width: 920px;
}

.editorial-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

.editorial-heading .section-kicker {
  text-transform: none;
}

.editorial-prose {
  max-width: 72ch;
}

.editorial-prose p {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.68;
}

.editorial-prose p:last-child {
  margin-bottom: 0;
}

.question-lines {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
}

.question-lines p {
  margin: 0;
  color: var(--text);
}

.starting-point-list {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
}

.starting-point-list span {
  color: var(--text);
  font-size: 1.02rem;
}

.starting-point-callout {
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
}

.starting-point-callout h3 {
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.25;
}

.leaders,
.judgment,
.start {
  border-block: 1px solid var(--line);
  background: var(--bg-elevated);
}

.leaders .section-copy p:first-child,
.judgment .section-copy > p:first-child {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.decision-grid {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.decision-card {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-block: 22px;
}

.decision-card h3 {
  font-size: 1.18rem;
}

.decision-card .article-type {
  color: var(--blue-gray);
}

.judgment-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: judgment;
}

.judgment-list li {
  position: relative;
  min-height: 42px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0 50px;
  color: var(--text-muted);
}

.judgment-list li::before {
  position: absolute;
  left: 0;
  top: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent-strong);
  content: counter(judgment);
  counter-increment: judgment;
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px;
  padding-block: 0 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: block;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 5px solid var(--bg);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline-item h3 {
  margin-bottom: 8px;
}

.ecosystem-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.ecosystem-route {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-block: 22px;
}

.ecosystem-route h3 {
  font-size: 1.18rem;
}

.ecosystem-route--primary h3 {
  color: var(--accent-strong);
}

.ecosystem-route a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.ecosystem-route a:hover {
  color: var(--accent);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

.writing-articles {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.writing-article {
  border-bottom: 1px solid var(--line);
  padding-block: 24px;
}

.writing-article h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.writing-article a {
  color: var(--text);
  text-decoration: none;
  text-decoration-color: transparent;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.writing-article a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.18em;
}

.writing-cta {
  margin-top: 24px;
}

.contact-panel {
  display: grid;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.contact-links {
  font-style: normal;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.contact-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 24px;
}

.footer-inner {
  display: grid;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-inner a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--text-muted);
  font-weight: 800;
  text-decoration: none;
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.footer-inner a:hover {
  color: var(--accent-strong);
}

.footer-inner a.footer-tertiary {
  font-weight: 700;
  opacity: 0.78;
}

@media (max-width: 1039px) {
  .nav-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: grid;
    max-height: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    opacity: 0;
    transition:
      max-height 180ms ease,
      opacity 180ms ease,
      border-color 180ms ease;
  }

  .nav-menu.is-open {
    max-height: 440px;
    border-color: var(--line);
    opacity: 1;
  }

  .nav-menu a {
    min-height: 44px;
    border-radius: 0;
    padding: 13px 16px;
  }

  .brand small {
    display: none;
  }
}

@media (min-width: 640px) {
  .section {
    padding-block: 86px;
  }

  .hero {
    padding-block: 62px 82px;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  .theme-toggle__text {
    display: inline;
  }

  .decision-grid,
  .ecosystem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--line);
  }

  .decision-card,
  .ecosystem-route {
    border-right: 1px solid var(--line);
    padding: 24px;
  }
}

@media (min-width: 840px) {
  h1 {
    font-size: 3.75rem;
  }

  h2 {
    font-size: 2.75rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(280px, 0.68fr);
    gap: 42px;
  }

  .decision-proof__inner {
    grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1fr);
    align-items: start;
  }

  .proof-steps article {
    grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
    gap: 22px;
  }

  .split-layout {
    grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  }

  .contact-panel {
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    padding: 36px;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    padding-bottom: 34px;
  }

  .timeline-item:nth-child(odd) div {
    grid-column: 1;
    text-align: right;
  }

  .timeline-item:nth-child(even) div {
    grid-column: 3;
  }

  .timeline-marker {
    grid-column: 2;
    justify-self: center;
    margin-top: 0;
  }
}

@media (min-width: 1040px) {
  .nav-shell {
    grid-template-columns: auto 1fr auto;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 1120px) {
  .section {
    padding-block: 96px;
  }

  .hero {
    padding-block: 70px 88px;
  }
}

@media (max-width: 420px) {
  .nav-shell,
  .section-inner {
    width: min(100% - 24px, 1160px);
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .button,
  .contact-links a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
