:root {
  color-scheme: light dark;
  --bg: #f7f8f6;
  --text: #171a1d;
  --muted: #5c6268;
  --line: #d8dbd6;
  --panel: #ffffff;
  --panel-soft: #eef2ef;
  --accent: #174f63;
  --accent-strong: #0e3b4b;
  --ok: #176b45;
  --warn: #8a5a00;
  --gold: #a56f13;
  --code-bg: #e9eeeb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111412;
    --text: #f0f2ef;
    --muted: #b6bcb7;
    --line: #363b37;
    --panel: #191d1a;
    --panel-soft: #202722;
    --accent: #86c5d8;
    --accent-strong: #b9e5ef;
    --ok: #86d3aa;
    --warn: #f0c36a;
    --gold: #e0b45d;
    --code-bg: #202722;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.62 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, var(--panel));
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 760;
}

.mark {
  width: 32px;
  height: 32px;
  border: 2px solid var(--text);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.language {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  text-decoration: none;
}

main {
  padding: 50px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ok);
  font-weight: 760;
  font-size: 0.92rem;
}

h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(2.35rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.quick-facts span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 680;
}

.button.primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.orientation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

.orientation h2 {
  margin-bottom: 12px;
  font-size: 1.02rem;
}

.orientation ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.orientation li + li {
  margin-top: 8px;
}

section {
  padding-top: 46px;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  letter-spacing: 0;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
}

.narrow {
  max-width: 820px;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.question-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.chain-step {
  position: relative;
  min-height: 142px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.chain-step:last-child {
  border-right: 0;
}

.chain-num {
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 8px;
}

.chain-step p {
  font-size: 0.91rem;
}

.example-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.decision {
  border-top: 3px solid var(--ok);
  background: var(--panel-soft);
  padding: 18px;
}

.decision.limit {
  border-top-color: var(--warn);
}

.decision ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.decision li + li {
  margin-top: 7px;
}

.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.path {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  min-height: 178px;
}

.path-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 820;
}

.path .time {
  color: var(--ok);
  font-weight: 730;
  font-size: 0.9rem;
}

.path p {
  font-size: 0.95rem;
}

.trial-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.trial-step {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 16px;
}

.guardrail {
  margin-top: 22px;
  border-left: 4px solid var(--warn);
  padding: 12px 0 12px 16px;
}

.deep-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.deep-link {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

footer {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 880px) {
  .hero,
  .question-list,
  .decision-grid,
  .paths,
  .trial-flow,
  .deep-links {
    grid-template-columns: 1fr;
  }

  .chain {
    grid-template-columns: 1fr;
  }

  .chain-step {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chain-step:last-child {
    border-bottom: 0;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  nav {
    justify-content: flex-start;
  }

  main {
    padding-top: 34px;
  }
}

@media (max-width: 520px) {
  .path {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.35rem;
  }
}
