:root {
  --background: #070806;
  --background-raised: #0c0d0b;
  --surface: rgba(13, 15, 13, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(214, 164, 71, 0.46);
  --border-soft: rgba(236, 226, 204, 0.13);
  --text: #eee6d4;
  --muted: #b9ad98;
  --faint: #807762;
  --accent: #d8a84f;
  --accent-soft: rgba(216, 168, 79, 0.18);
  --good: #98c379;
  --code: #9fd0ff;
  --radius: 6px;
  --page-gutter: clamp(1rem, 3vw, 2.5rem);
  color: var(--text);
  background: var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 11%, rgba(216, 168, 79, 0.09), transparent 26rem),
    linear-gradient(180deg, #090a08 0%, #070806 42%, #050604 100%);
}

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

.site-header,
main {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid var(--border-soft);
}

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

.brand {
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 760;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 2px solid currentColor;
}

.brand-mark::before {
  clip-path: polygon(0 0, 45% 0, 45% 14%, 14% 14%, 14% 45%, 0 45%);
}

.brand-mark::after {
  clip-path: polygon(100% 100%, 55% 100%, 55% 86%, 86% 86%, 86% 55%, 100% 55%);
}

.site-header nav {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.98rem;
}

.site-header nav a {
  color: var(--text);
  opacity: 0.9;
}

.site-header nav a:hover {
  color: var(--accent);
}

main {
  padding: 0 var(--page-gutter) 3rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(2rem, 5vw, 5rem);
  min-height: 285px;
  padding: clamp(2.6rem, 6vw, 4.8rem) 0 2rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-atmosphere {
  min-height: 230px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(7, 8, 6, 0.08), rgba(7, 8, 6, 0.82)),
    repeating-linear-gradient(90deg, rgba(238, 230, 212, 0.06) 0 1px, transparent 1px 54px),
    linear-gradient(135deg, rgba(216, 168, 79, 0.26), transparent 23%),
    linear-gradient(180deg, #15140f, #050604);
  box-shadow: inset 0 0 0 1px rgba(236, 226, 204, 0.08);
  mask-image: linear-gradient(90deg, transparent 0%, black 28%, black 100%);
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(3.2rem, 7.5vw, 6.3rem);
  font-weight: 790;
  line-height: 0.96;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.hero-subhead {
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  font-weight: 780;
  line-height: 1;
}

.hero-text {
  max-width: 660px;
  margin-top: 1.4rem;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  line-height: 1.55;
}

.contract-flow {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.62fr) minmax(260px, 1fr) minmax(260px, 0.95fr);
  gap: clamp(1rem, 2.2vw, 2rem);
  align-items: center;
  margin-top: 1.2rem;
}

.panel,
.action-step,
.code-proof,
.process-note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.panel {
  min-height: 220px;
  overflow: hidden;
}

.panel h2 {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 520;
  line-height: 1.2;
  text-align: center;
}

.outcome-icon {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(238, 230, 212, 0.42);
  color: var(--accent);
}

.screen-state {
  display: grid;
  gap: 0.7rem;
  padding: 1.05rem 1.25rem 1.35rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.screen-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.8fr) minmax(68px, 0.82fr) minmax(88px, 1fr);
  gap: 0.7rem;
  align-items: center;
  min-height: 38px;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(238, 230, 212, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.screen-row:first-child {
  border-color: var(--border);
  background: var(--accent-soft);
}

.element-kind {
  color: var(--faint);
  font-size: 0.8rem;
}

.screen-row strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 680;
}

.action-chip,
.value-chip {
  justify-self: end;
  max-width: 100%;
  padding: 0.35rem 0.48rem;
  border: 1px solid rgba(216, 168, 79, 0.42);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(216, 168, 79, 0.09);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}

.value-chip {
  border-color: rgba(238, 230, 212, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.action-step {
  position: relative;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  padding: 1.25rem 1rem;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  text-align: center;
}

.action-step::before,
.action-step::after {
  position: absolute;
  top: 50%;
  width: clamp(1rem, 2vw, 2.8rem);
  height: 1px;
  content: "";
  background: var(--accent);
}

.action-step::before {
  right: 100%;
}

.action-step::after {
  left: 100%;
}

.action-step span {
  font-size: 0.9rem;
}

.action-step code {
  display: block;
  max-width: 100%;
  padding: 0.8rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background: #090a08;
  font-size: 0.9rem;
  white-space: nowrap;
}

.diff-list,
.expectation-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 1.05rem 1.25rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.diff-list div,
.expectation-list div {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(238, 230, 212, 0.13);
}

.expectation-list div {
  grid-template-columns: minmax(72px, 0.58fr) minmax(0, 1.42fr);
}

.diff-list div:last-child,
.expectation-list div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--accent);
}

dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
}

.expectation-list dd {
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.diff-list div:first-child dt::before {
  content: "+ ";
  color: var(--good);
}

.diff-list div:nth-child(2) dt::before {
  content: "~ ";
  color: var(--accent);
}

.expectation-list div:last-child dd {
  color: var(--good);
}

.code-proof {
  margin-top: 1.15rem;
  overflow: hidden;
}

.code-proof pre {
  margin: 0;
  padding: 1.25rem clamp(1rem, 2vw, 1.6rem);
  overflow-x: auto;
  color: var(--code);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 1.35rem;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.outcomes article {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 1.15rem;
  padding: clamp(1.35rem, 3vw, 2.2rem) clamp(1rem, 2vw, 1.5rem);
}

.outcomes article + article {
  border-left: 1px solid var(--border-soft);
}

.outcome-icon {
  grid-row: 1 / 3;
  width: 58px;
  height: 58px;
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.outcome-icon::before {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.1rem;
}

.agent-icon::before {
  content: "AI";
}

.test-icon::before {
  content: "OK";
}

.audit-icon::before {
  content: "AX";
}

.outcomes h2,
.process-note h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: 0;
}

.outcomes p,
.process-note p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  line-height: 1.55;
}

.process-note {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.35rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.target-mark {
  position: relative;
  width: 74px;
  height: 74px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.target-mark::before,
.target-mark::after {
  position: absolute;
  content: "";
  background: var(--accent);
}

.target-mark::before {
  top: 50%;
  left: -18px;
  width: calc(100% + 36px);
  height: 1px;
}

.target-mark::after {
  top: -18px;
  left: 50%;
  width: 1px;
  height: calc(100% + 36px);
}

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

  .hero-atmosphere {
    min-height: 120px;
    mask-image: linear-gradient(180deg, black, transparent);
  }

  .contract-flow {
    grid-template-columns: 1fr 1fr;
  }

  .action-step {
    order: 2;
  }

  .diff-panel {
    order: 3;
  }

  .expectation-panel {
    order: 4;
  }

  .action-step::before,
  .action-step::after {
    display: none;
  }
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .contract-flow,
  .outcomes,
  .process-note {
    grid-template-columns: 1fr;
  }

  .outcomes article + article {
    border-top: 1px solid var(--border-soft);
    border-left: 0;
  }

  .process-note {
    align-items: start;
  }
}

@media (max-width: 520px) {
  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  main {
    padding-bottom: 1.5rem;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero-atmosphere {
    display: none;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .hero-subhead {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .panel {
    min-height: 0;
  }

  .outcomes article {
    grid-template-columns: 1fr;
  }

  .outcome-icon {
    margin-bottom: 1rem;
  }

  .code-proof pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
