:root {
  --paper: #f4f7f3;
  --paper-2: #e7edf0;
  --surface: #fffefa;
  --surface-cool: #edf4f2;
  --ink: #101411;
  --muted: #53605a;
  --quiet: #7a8580;
  --line: #d3ded8;
  --line-strong: #aebdb5;
  --green: #14724f;
  --green-soft: #dff3e8;
  --blue: #255d87;
  --blue-soft: #dbeaf3;
  --amber: #9a650b;
  --amber-soft: #f2e4c0;
  --red: #9d4540;
  --red-soft: #f1d9d4;
  --shadow: 0 24px 70px rgba(20, 31, 27, 0.12);
  --container: min(1160px, calc(100vw - 40px));
  --header-height: 70px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f8faf6 0, var(--paper) 520px, #eef4f1 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: var(--green);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(20, 114, 79, 0.34);
  outline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 14px;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px max(20px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(20, 31, 27, 0.10);
  background: rgba(248, 250, 246, 0.94);
  backdrop-filter: blur(18px);
}

.site-header[data-scrolled] {
  box-shadow: 0 12px 30px rgba(35, 31, 23, 0.08);
}

.brand,
.site-nav,
.site-footer nav,
.footer-brand {
  display: flex;
  align-items: center;
}

.brand,
.footer-brand {
  gap: 11px;
  font-weight: 850;
}

.brand span {
  white-space: nowrap;
}

.site-nav {
  gap: clamp(12px, 1.6vw, 22px);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
}

.site-nav a,
.site-footer a,
.header-link,
.text-action {
  border-bottom: 1px solid transparent;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible,
.header-link:hover,
.header-link:focus-visible,
.text-action:hover,
.text-action:focus-visible {
  color: var(--green);
  border-color: currentColor;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  font-weight: 800;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
}

.nav-toggle-lines {
  width: 18px;
  height: 12px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 10px / 100% 2px no-repeat;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(88vh - var(--header-height));
  border-bottom: 1px solid var(--line);
}

.hero-background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.30;
  pointer-events: none;
}

.hero-background::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(248, 250, 246, 0.96), rgba(248, 250, 246, 0.80) 54%, rgba(231, 237, 240, 0.70)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(244, 247, 243, 0.78));
}

.hero-stage {
  position: relative;
  width: var(--container);
  margin: 0 auto;
  padding: clamp(70px, 9vh, 112px) 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(370px, 0.64fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.hero-inner {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 940px;
  margin: 0 0 18px;
  font-size: clamp(3.8rem, 10vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 3.2vw, 2.75rem);
  line-height: 1.04;
  font-weight: 760;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

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

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-proof span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.76);
  color: #34413a;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 850;
}

.hero-console {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(237, 244, 242, 0.96));
  box-shadow: var(--shadow);
  padding: 20px;
}

.hero-console::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.console-header span,
.object-code,
.package-grid h3,
.agent-grid strong {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.console-header strong {
  color: var(--green);
}

.console-stack {
  display: grid;
  gap: 10px;
}

.console-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.console-row.is-active {
  border-color: rgba(20, 114, 79, 0.42);
  background: var(--green-soft);
}

.console-row > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(20, 114, 79, 0.11);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.console-row strong {
  display: block;
}

.console-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.receipt-preview {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.receipt-preview div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 254, 250, 0.78);
  padding: 12px 14px;
}

.receipt-preview span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 760;
}

.receipt-preview strong {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 860;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

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

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-flow {
  position: relative;
  width: var(--container);
  margin: clamp(28px, 6vh, 58px) auto 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.hero-flow div {
  min-height: 130px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.hero-flow div:last-child {
  border-right: 0;
}

.hero-flow span,
.feature-grid span,
.agent-grid span {
  display: block;
  margin-bottom: 24px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-flow strong {
  display: block;
  font-size: 1.18rem;
}

.hero-flow p,
.feature-grid p,
.object-list p,
.package-grid p,
.agent-grid p,
.site-footer p,
.faq-list p {
  color: var(--muted);
}

.hero-flow p {
  margin: 6px 0 0;
}

.status-bar {
  display: flex;
  justify-content: center;
  padding: 18px 20px;
  border-block: 1px solid rgba(154, 101, 11, 0.26);
  background: #fff4d4;
  color: #372604;
}

.status-bar p {
  width: var(--container);
  margin: 0;
}

.trust-ribbon {
  width: var(--container);
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(20, 31, 27, 0.07);
}

.trust-ribbon a {
  min-height: 148px;
  padding: 18px;
  border-right: 1px solid var(--line);
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.trust-ribbon a:last-child {
  border-right: 0;
}

.trust-ribbon a:hover,
.trust-ribbon a:focus-visible {
  background: var(--surface-cool);
  color: var(--green);
}

.trust-ribbon span,
.trust-evidence span,
.timeline span,
.boundary-grid span {
  display: block;
  margin-bottom: 20px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trust-ribbon strong {
  display: block;
  margin-bottom: 6px;
}

.trust-ribbon p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.section {
  padding: clamp(74px, 11vw, 128px) 0;
}

.section-open {
  background: var(--paper);
}

.section-panel {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
}

.section-heading,
.feature-grid,
.object-layout,
.developer-grid,
.rail-table,
.agent-grid,
.faq-list,
.site-footer {
  width: var(--container);
  margin-inline: auto;
}

.section-heading {
  margin-bottom: clamp(30px, 5vw, 52px);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.text-action {
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 850;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article,
.object-list a,
.quickstart,
.package-grid a,
.agent-grid a,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature-grid article {
  min-height: 260px;
  padding: 24px;
}

.object-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.object-list {
  display: grid;
  gap: 12px;
}

.object-list a {
  padding: 22px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.object-list a:hover,
.object-list a:focus-visible,
.package-grid a:hover,
.package-grid a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  background: #fbfffc;
}

.object-code {
  display: block;
  margin-bottom: 22px;
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 760;
}

.protocol-diagram {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 24px;
}

.diagram-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  min-height: 84px;
}

.diagram-row span,
.diagram-row strong {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
}

.diagram-row strong {
  justify-content: center;
  background: rgba(223, 241, 231, 0.16);
  color: #e5f7ec;
}

.diagram-arrow {
  height: 36px;
  position: relative;
}

.diagram-arrow::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.28);
}

.developer-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
}

.quickstart {
  overflow: hidden;
  background: #161914;
  color: #fff;
}

.quickstart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.quickstart h3 {
  margin: 0;
}

.quickstart button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88rem;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.package-grid a {
  min-height: 160px;
  padding: 22px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.section-rail {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.rail-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.rail-row {
  display: grid;
  grid-template-columns: 0.65fr 1.75fr 0.6fr;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.rail-row:last-child {
  border-bottom: 0;
}

.rail-head {
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-row span:first-child {
  font-weight: 850;
}

mark {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-grid a {
  min-height: 210px;
  padding: 22px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.agent-grid a:hover,
.agent-grid a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.agent-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.faq-section {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 0 20px;
}

.faq-list summary {
  cursor: pointer;
  padding: 20px 0;
  font-weight: 850;
}

.faq-list p {
  max-width: 780px;
  margin-bottom: 20px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
}

.learn-hero {
  width: var(--container);
  margin: 0 auto;
  padding: clamp(74px, 11vw, 128px) 0 clamp(32px, 6vw, 60px);
}

.learn-hero h1 {
  max-width: 920px;
  font-size: clamp(3.4rem, 10vw, 7.4rem);
}

.learn-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.learn-path-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.learn-path-summary a {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.learn-path-summary a:hover,
.learn-path-summary a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  background: var(--surface-cool);
}

.learn-path-summary span {
  display: block;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.learn-path-summary strong {
  display: block;
  color: var(--ink);
}

.learn-index {
  padding: 0 0 clamp(74px, 11vw, 128px);
}

.learn-group {
  width: var(--container);
  margin: 0 auto clamp(44px, 7vw, 76px);
}

.learn-group:last-child {
  margin-bottom: 0;
}

.learn-group-heading {
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.learn-group-heading h2 {
  max-width: 720px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.04;
}

.learn-grid {
  width: 100%;
  margin-inline: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-section .learn-grid {
  width: var(--container);
  margin-inline: auto;
}

.learn-card {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.learn-card:hover,
.learn-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.learn-card span {
  margin-bottom: 30px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.learn-card h2,
.learn-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.08;
}

.learn-card p {
  color: var(--muted);
}

.learn-card small {
  margin-top: auto;
  color: var(--quiet);
  font-weight: 760;
}

.article-page {
  padding-bottom: clamp(74px, 11vw, 128px);
}

.article-hero {
  width: var(--container);
  margin: 0 auto;
  padding: clamp(62px, 10vw, 116px) 0 clamp(34px, 6vw, 64px);
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--green);
  font-weight: 850;
}

.article-hero h1 {
  max-width: 960px;
  font-size: clamp(3.1rem, 9vw, 7rem);
}

.article-deck {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  color: var(--quiet);
  font-size: 0.92rem;
  font-weight: 760;
}

.article-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 7px 11px;
}

.article-layout {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 0.36fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: start;
}

.article-aside {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.article-aside h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.article-aside ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.article-aside li + li {
  margin-top: 9px;
}

.article-toc {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.article-toc h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.article-toc ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.article-toc a,
.article-content a:not(.button),
.boundary-grid a,
.readiness-table a {
  color: var(--green);
  font-weight: 820;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-content {
  max-width: 780px;
}

.article-content section {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-bottom: 34px;
}

.article-content h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.06;
}

.article-content h3 {
  margin-top: 20px;
}

.article-content p {
  color: #343832;
  font-size: 1.06rem;
}

.article-action,
.trust-evidence {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.article-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
}

.article-action span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.article-action h2,
.trust-evidence h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.article-action p {
  max-width: 540px;
  margin-bottom: 0;
}

.trust-evidence {
  margin-top: 34px;
  background: linear-gradient(180deg, var(--surface), var(--surface-cool));
}

.readiness-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.readiness-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr 1.05fr 0.85fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.readiness-row:last-child {
  border-bottom: 0;
}

.readiness-head {
  background: #111812;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.boundary-grid,
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.boundary-grid article,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
}

.boundary-grid h3,
.timeline h3 {
  margin-bottom: 8px;
}

.boundary-grid p,
.timeline p {
  margin-bottom: 12px;
}

.related-section {
  margin-top: clamp(48px, 8vw, 88px);
}

@media (max-width: 980px) {
  :root {
    --container: min(100vw - 28px, 760px);
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-top: 4px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  h1 {
    font-size: clamp(3.4rem, 15vw, 6.4rem);
  }

  .hero-stage,
  .hero-flow,
  .feature-grid,
  .object-layout,
  .developer-grid,
  .package-grid,
  .agent-grid,
  .trust-ribbon,
  .learn-path-summary,
  .learn-grid,
  .article-layout,
  .rail-row,
  .readiness-row,
  .boundary-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .hero-flow div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-flow div:last-child {
    border-bottom: 0;
  }

  .trust-ribbon a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-ribbon a:last-child {
    border-bottom: 0;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rail-head {
    display: none;
  }

  .rail-row:not(.rail-head) span::before {
    display: block;
    margin-bottom: 4px;
    color: var(--quiet);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .rail-row:not(.rail-head) span:nth-child(1)::before {
    content: "Rail";
  }

  .rail-row:not(.rail-head) span:nth-child(2)::before {
    content: "Role";
  }

  .rail-row:not(.rail-head) span:nth-child(3)::before {
    content: "Status";
  }

  .readiness-head {
    display: none;
  }

  .readiness-row {
    align-items: start;
  }

  .readiness-row:not(.readiness-head) > *::before {
    display: block;
    margin-bottom: 4px;
    color: var(--quiet);
    font-size: 0.72rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
  }

  .readiness-row:not(.readiness-head) > *:nth-child(1)::before {
    content: "Surface";
  }

  .readiness-row:not(.readiness-head) > *:nth-child(2)::before {
    content: "Allowed";
  }

  .readiness-row:not(.readiness-head) > *:nth-child(3)::before {
    content: "Gate";
  }

  .readiness-row:not(.readiness-head) > *:nth-child(4)::before {
    content: "Evidence";
  }

  .article-action {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  :root {
    --container: calc(100vw - 28px);
    --header-height: 64px;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 8px 0 2px;
    font-size: 0.84rem;
    white-space: normal;
  }

  .site-header[data-nav-open] .site-nav {
    display: grid;
  }

  .site-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 0 12px;
    color: var(--ink);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand span {
    max-width: 126px;
    white-space: normal;
    line-height: 1.08;
  }

  .header-link {
    min-height: 38px;
    padding-inline: 12px;
  }

  h1 {
    font-size: 3.55rem;
    line-height: 0.94;
  }

  h2 {
    font-size: 2.25rem;
    line-height: 1.02;
  }

  .hero {
    min-height: auto;
  }

  .hero-stage {
    padding: 56px 0 20px;
    gap: 22px;
  }

  .hero-inner {
    padding-top: 0;
  }

  .hero-subtitle {
    font-size: 1.48rem;
  }

  .hero-copy,
  .learn-hero p:not(.eyebrow),
  .article-deck {
    font-size: 1.02rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .console-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .receipt-preview div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .receipt-preview strong,
  .receipt-preview span,
  code {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .hero-flow {
    margin: 16px auto 18px;
  }

  .hero-flow div,
  .trust-ribbon a,
  .feature-grid article,
  .package-grid a,
  .agent-grid a,
  .learn-card {
    min-height: auto;
    padding: 16px;
  }

  .section {
    padding: 56px 0;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .protocol-diagram,
  .quickstart {
    margin-top: 4px;
  }

  .diagram-row {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .diagram-row span,
  .diagram-row strong {
    min-height: 46px;
  }

  .diagram-arrow {
    height: 18px;
  }

  .quickstart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .learn-hero {
    padding: 52px 0 28px;
  }

  .learn-hero h1 {
    font-size: 3.05rem;
    line-height: 0.98;
  }

  .learn-path-summary a {
    min-height: auto;
  }

  .learn-card span {
    margin-bottom: 18px;
  }

  .article-hero {
    padding: 46px 0 28px;
  }

  .article-hero h1 {
    font-size: 2.78rem;
    line-height: 1;
  }

  .article-meta {
    gap: 8px;
    margin-top: 18px;
  }

  .article-aside {
    padding: 16px;
  }

  .article-toc {
    display: none;
  }

  .article-content,
  .article-content p {
    max-width: 100%;
    font-size: 1rem;
  }

  .article-content section {
    padding-top: 22px;
    margin-bottom: 28px;
  }

  .article-content h2 {
    font-size: 1.8rem;
  }

  .article-content a:not(.button) {
    overflow-wrap: anywhere;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 360px) {
  .brand span {
    display: none;
  }
}

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