:root {
  --ink: #17211e;
  --muted: #59645f;
  --line: #d8dfdc;
  --paper: #ffffff;
  --soft: #f3f6f5;
  --green: #173f35;
  --green-light: #dbe9e3;
  --orange: #b84f2b;
  --blue: #176486;
  --code: #101714;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--orange);
}

.hero {
  position: relative;
  display: flex;
  min-height: 680px;
  height: 78vh;
  max-height: 820px;
  align-items: center;
  overflow: hidden;
  color: white;
  background-image: url("docs/assets/in718-reconstruction.webp");
  background-position: center 58%;
  background-size: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: rgba(9, 19, 16, 0.76);
}

.hero-content {
  position: relative;
  width: min(90vw, var(--max-width));
  margin: 0 auto;
}

.hero-content .eyebrow {
  color: #9fddd0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 76px;
  line-height: 1;
}

.hero-subtitle {
  max-width: 820px;
  margin: 24px 0 0;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.25;
}

.hero-summary {
  max-width: 700px;
  margin: 20px 0 0;
  color: #e2ebe7;
  font-size: 17px;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

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

.button-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.18);
}

.button:hover,
.button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.facts {
  color: white;
  background: var(--green);
}

.section-inner {
  width: min(90vw, var(--max-width));
  margin: 0 auto;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.fact-grid div {
  min-width: 0;
  padding: 24px 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.fact-grid div:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.fact-grid strong,
.fact-grid span {
  display: block;
}

.fact-grid strong {
  font-size: 25px;
  line-height: 1.2;
}

.fact-grid span {
  margin-top: 5px;
  color: #c8dbd4;
  font-size: 13px;
}

.section {
  padding: 104px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.section-heading > p:last-child,
.representation-copy > p,
.repo-inner p {
  color: var(--muted);
  font-size: 18px;
}

.math {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-steps article {
  padding: 30px 30px 30px 0;
}

.method-steps article + article {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.method-steps p,
.use-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.step-index {
  display: block;
  margin-bottom: 20px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wide-figure img {
  width: 100%;
}

.representation {
  background: var(--soft);
}

.representation-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  align-items: center;
}

.representation-copy h2 {
  margin-bottom: 24px;
}

.representation-spec {
  margin: 36px 0 0;
  border-top: 1px solid var(--line);
}

.representation-spec div {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.representation-spec dt {
  font-weight: 800;
}

.representation-spec dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.representation figure img {
  width: 100%;
  background: white;
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 54px;
  background: var(--green-light);
  border-top: 3px solid var(--green);
}

.evidence-strip div {
  padding: 24px;
}

.evidence-strip div + div {
  border-left: 1px solid #b8ccc4;
}

.evidence-strip strong,
.evidence-strip span {
  display: block;
}

.evidence-strip strong {
  font-size: 24px;
  line-height: 1.2;
}

.evidence-strip span {
  margin-top: 6px;
  color: #38524a;
  font-size: 13px;
}

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

.result-grid figure {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.result-grid figcaption {
  min-height: 84px;
  margin: 0;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.use-section {
  color: white;
  background: var(--green);
}

.use-section .eyebrow {
  color: #e7a387;
}

.use-section .section-heading > p:last-child,
.use-grid p {
  color: #c8dbd4;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.use-grid > div {
  padding: 28px 28px 28px 0;
}

.use-grid > div + div {
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.use-grid code {
  color: white;
}

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

.commands > div {
  min-width: 0;
}

.command-label {
  margin: 0 0 8px;
  color: #b7d7cd;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

pre {
  min-height: 100%;
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: #edf5f1;
  background: var(--code);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.65;
}

.repo-section {
  padding: 74px 0;
  background: #e9eef2;
  border-top: 1px solid #cad5dc;
}

.repo-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}

.repo-inner h2 {
  font-size: 34px;
}

.repo-inner p {
  max-width: 740px;
  margin-bottom: 0;
}

.button-dark {
  color: white;
  background: var(--ink);
}

footer {
  color: #c9d2ce;
  background: #101714;
}

.footer-inner {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.footer-inner strong {
  color: white;
}

@media (max-width: 900px) {
  .hero {
    min-height: 620px;
    height: 74vh;
  }

  h1 {
    font-size: 60px;
  }

  .hero-subtitle {
    font-size: 23px;
  }

  .fact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-grid div:nth-child(2) {
    border-right: 1px solid rgba(255, 255, 255, 0.22);
  }

  .fact-grid div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

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

  .representation figure {
    max-width: 720px;
  }

  .result-grid,
  .commands {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 58px;
    padding: 0 20px;
  }

  nav {
    gap: 15px;
  }

  nav a {
    font-size: 12px;
  }

  nav a:nth-child(3) {
    display: none;
  }

  .hero {
    min-height: 560px;
    height: 72vh;
    max-height: 650px;
    background-position: 37% center;
  }

  .hero-content,
  .section-inner {
    width: min(90vw, var(--max-width));
  }

  h1 {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .button {
    width: 100%;
  }

  .fact-grid strong {
    font-size: 21px;
  }

  .fact-grid div {
    padding: 18px 15px;
  }

  .section {
    padding: 72px 0;
  }

  h2 {
    font-size: 32px;
  }

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

  .section-heading > p:last-child,
  .representation-copy > p,
  .repo-inner p {
    font-size: 16px;
  }

  .method-steps,
  .use-grid,
  .evidence-strip {
    grid-template-columns: 1fr;
  }

  .method-steps article,
  .method-steps article + article,
  .use-grid > div,
  .use-grid > div + div {
    padding: 22px 0;
    border-left: 0;
  }

  .method-steps article + article,
  .use-grid > div + div {
    border-top: 1px solid var(--line);
  }

  .use-grid > div + div {
    border-top-color: rgba(255, 255, 255, 0.24);
  }

  .evidence-strip div + div {
    border-top: 1px solid #b8ccc4;
    border-left: 0;
  }

  .representation-grid {
    gap: 42px;
  }

  .representation-spec div {
    grid-template-columns: 100px 1fr;
  }

  pre {
    padding: 18px;
    font-size: 11px;
  }

  .repo-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .repo-inner h2 {
    font-size: 30px;
  }

  .footer-inner {
    min-height: 104px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
