:root {
  --bg: #f3f0e9;
  --paper: #fbf9f4;
  --surface: rgba(251, 249, 244, 0.88);
  --panel: #fcfaf6;
  --panel-strong: #f7f2e9;
  --ink: #181c19;
  --muted: #5f675f;
  --line: rgba(24, 28, 25, 0.14);
  --line-strong: rgba(24, 28, 25, 0.24);
  --green: #466854;
  --green-soft: #e6eee8;
  --amber: #80632d;
  --amber-soft: #efe2c8;
  --red: #8e5144;
  --red-soft: #f2dfd8;
  --shadow: 0 28px 80px rgba(24, 28, 25, 0.11);
  --page-width: min(1220px, calc(100vw - 48px));
  color: var(--ink);
  background: var(--bg);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(70, 104, 84, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
}

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

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

h1,
h2,
h3,
p,
dl,
dt,
dd,
ul,
pre {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: 5.8rem;
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: 3.3rem;
  line-height: 0.98;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  line-height: 1.15;
}

p {
  line-height: 1.7;
}

.site-header,
.hero-grid,
.pillar-section,
.section-heading,
.proof-grid,
.evidence-grid,
.protocol-section,
.install-grid,
.site-footer {
  width: var(--page-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(24, 28, 25, 0.1);
  background: rgba(243, 240, 233, 0.9);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions,
.specimen-header,
.memo-header,
.footer-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
}

.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 52px 0 42px;
}

.hero-image,
.hero-veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  filter: grayscale(28%) saturate(78%) contrast(1.02) brightness(0.96);
}

.hero-veil {
  background:
    linear-gradient(90deg, rgba(243, 240, 233, 0.94) 6%, rgba(243, 240, 233, 0.76) 44%, rgba(243, 240, 233, 0.52) 100%),
    linear-gradient(180deg, rgba(243, 240, 233, 0.22) 0%, rgba(243, 240, 233, 0.82) 100%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 42px;
  align-items: end;
  min-height: 72vh;
}

.hero-copy {
  max-width: 720px;
  padding: 24px 0;
}

.eyebrow,
.review-grid dt,
.specimen-list dt,
.memo-metrics dt,
.protocol-stats span,
.command-card span {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lead,
.section-heading p,
.proof-grid p,
.review-summary,
.input-note,
.memo-list li,
.command-card p,
.site-footer p {
  color: var(--muted);
}

.lead {
  max-width: 640px;
  margin-bottom: 28px;
  font-size: 1.25rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

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

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

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-note {
  max-width: 600px;
  margin-bottom: 0;
  color: rgba(24, 28, 25, 0.72);
  font-size: 0.96rem;
}

.review-panel,
.pillar-section article,
.proof-grid article,
.specimen-card,
.evidence-note-card,
.protocol-sheet,
.command-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-panel {
  padding: 24px;
  backdrop-filter: blur(16px);
}

.review-header,
.protocol-stats,
.input-row,
.memo-metrics,
.install-grid {
  display: grid;
}

.review-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.panel-title {
  margin-bottom: 0;
  font-size: 2rem;
}

.status-badge,
.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.94rem;
  font-weight: 700;
}

.status-badge.high,
.risk-pill.high {
  background: var(--red-soft);
  color: var(--red);
}

.risk-pill.moderate {
  background: var(--amber-soft);
  color: var(--amber);
}

.risk-pill.low {
  background: var(--green-soft);
  color: var(--green);
}

.review-grid,
.specimen-list,
.memo-metrics {
  margin: 0;
}

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

.review-grid div:last-child {
  grid-column: 1 / -1;
}

.review-grid dt,
.specimen-list dt,
.memo-metrics dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.review-grid dd,
.specimen-list dd,
.memo-metrics dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.review-summary {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.pillar-section,
.proof-grid,
.evidence-grid,
.install-grid {
  gap: 16px;
}

.pillar-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  margin-bottom: 92px;
}

.pillar-section article {
  min-height: 188px;
  padding: 22px;
}

.pillar-section h2 {
  margin-bottom: 10px;
  font-size: 1.9rem;
}

.pillar-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.proof-section,
.evidence-section,
.protocol-section,
.faq-section,
.install-section {
  padding: 0 0 92px;
}

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

.section-heading p {
  max-width: 700px;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proof-grid article {
  min-height: 236px;
  padding: 24px;
}

.proof-grid span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.specimen-card,
.evidence-note-card,
.protocol-sheet,
.command-card {
  background: var(--panel);
}

.specimen-card,
.evidence-note-card,
.command-card {
  padding: 24px;
}

.specimen-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.specimen-header span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.specimen-list {
  display: grid;
  gap: 18px;
}

.memo-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.evidence-note-card h3 {
  max-width: 460px;
}

.evidence-note-card p {
  max-width: 560px;
  color: var(--muted);
}

.static-metrics {
  margin-top: 24px;
}

.memo-list {
  margin-bottom: 0;
  padding-left: 20px;
}

.memo-list li + li {
  margin-top: 12px;
}

.protocol-section {
  position: relative;
}

.protocol-sheet {
  overflow: hidden;
  padding: 0;
}

.protocol-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.protocol-stats div {
  padding: 22px 18px;
}

.protocol-stats div + div {
  border-left: 1px solid var(--line);
}

.protocol-stats strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.protocol-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.protocol-rules article {
  padding: 24px;
}

.protocol-rules article + article {
  border-top: 1px solid var(--line);
}

.protocol-rules p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.faq-grid article {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.faq-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.install-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
}

.command-card {
  min-height: 264px;
}

.command-card span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.command-card pre {
  margin: 16px 0;
  overflow: auto;
  border-radius: 8px;
  padding: 16px;
  background: var(--ink);
  color: #edf4ee;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.command-card code {
  font: inherit;
}

.command-card a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--green);
  font-weight: 600;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 0 0 72px;
}

.site-footer h2 {
  margin-bottom: 0;
}

.footer-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1180px) {
  :root {
    --page-width: min(1220px, calc(100vw - 36px));
  }

  h1 {
    font-size: 4.8rem;
  }

  h2 {
    font-size: 2.9rem;
  }

  .hero-grid,
  .evidence-grid,
  .faq-grid,
  .install-grid,
  .proof-grid,
  .pillar-section,
  .protocol-stats,
  .site-footer {
    grid-template-columns: 1fr;
  }

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

  .protocol-stats div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .command-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --page-width: min(1220px, calc(100vw - 24px));
  }

  .site-header,
  .nav-links,
  .hero-actions,
  .footer-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    gap: 10px;
  }

  .hero-section {
    padding-top: 34px;
    padding-bottom: 32px;
  }

  .hero-grid {
    gap: 24px;
    min-height: auto;
  }

  h1 {
    font-size: 3.45rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .lead {
    font-size: 1.08rem;
  }

  .button {
    width: 100%;
  }

  .memo-metrics,
  .review-header {
    grid-template-columns: 1fr;
  }

  .proof-section,
  .evidence-section,
  .protocol-section,
  .faq-section,
  .install-section {
    padding-bottom: 60px;
  }

  .pillar-section {
    margin-bottom: 60px;
  }
}
