:root {
  --paper: #f5f2eb;
  --paper-high: #fbfaf6;
  --ink: #1e211e;
  --muted: #666a63;
  --line: #d8d4ca;
  --accent: #c8502f;
  --accent-dark: #a63d23;
  --terminal: #202320;
  --terminal-text: #f5f1e9;
  --closing-text: #f5f2eb;
  --shell: min(1120px, calc(100% - 48px));
  --radius: 10px;
  --shadow: 0 18px 48px rgba(30, 33, 30, 0.1);
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

button {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  color: var(--muted);
  font-size: 13px;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.text-link:hover {
  color: var(--accent-dark);
}

.site-nav .nav-repo {
  color: var(--ink);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.hero-copy {
  max-width: 500px;
}

.eyebrow,
.closing-label,
.preview-head,
.prompt-label {
  margin: 0;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 22px;
}

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

h1,
h2,
h3 {
  text-wrap: pretty;
}

h1 {
  max-width: 11ch;
  margin-bottom: 26px;
  font-size: clamp(3.2rem, 4.8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.94;
}

h1 span {
  color: var(--accent-dark);
}

.hero-lede {
  max-width: 440px;
  margin-bottom: 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 1.8vw, 1.42rem);
  line-height: 1.3;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

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

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--paper-high);
}

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

.button-light:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper-high);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: gap 180ms ease, color 180ms ease;
}

.text-link:hover {
  gap: 12px;
}

.hero-note {
  max-width: 42ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.report-preview {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-high);
  box-shadow: var(--shadow);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.11em;
}

.preview-output,
.code-block,
.prompt-block,
.contract-code,
.install-note code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.copy-button {
  min-height: 56px;
  padding: 0 17px;
  border: 0;
  border-left: 1px solid rgba(245, 241, 233, 0.18);
  background: transparent;
  color: rgba(245, 241, 233, 0.72);
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.copy-button:hover {
  background: var(--accent);
  color: var(--paper-high);
}

.preview-output {
  margin: 0;
  padding: 26px 28px 28px;
  overflow-x: auto;
  background: var(--terminal);
  color: rgba(245, 241, 233, 0.83);
  font-size: clamp(0.78rem, 1.45vw, 1rem);
  line-height: 1.75;
  white-space: pre;
}

.output-title {
  color: var(--terminal-text);
  font-weight: 700;
}

.report-preview figcaption {
  padding: 15px 18px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.proof-item + .proof-item {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.proof-item strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.install-section,
.method-section,
.contract-section {
  padding-top: clamp(96px, 12vw, 156px);
  padding-bottom: clamp(96px, 12vw, 156px);
}

.section-heading {
  max-width: 700px;
}

.section-heading h2,
.closing-panel h2 {
  max-width: 13ch;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.section-heading > p:last-child,
.step-meta p,
.method-steps p,
.method-aside p,
.contract-copy > p,
.closing-panel > div > p:last-child {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.step-list {
  margin: 60px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.step-row {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(28px, 7vw, 96px);
  padding: 28px 0;
}

.step-row + .step-row {
  border-top: 1px solid var(--line);
}

.step-meta {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.step-number {
  color: var(--accent-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step-meta h3,
.method-steps h3,
.method-aside h3,
.contract-copy h3 {
  margin-bottom: 9px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.code-block,
.prompt-block {
  min-width: 0;
  border-radius: 7px;
}

.code-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  background: var(--terminal);
  color: var(--terminal-text);
}

.code-block code {
  min-width: 0;
  padding: 18px 19px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.code-block .copy-button {
  min-height: 100%;
}

.prompt-block {
  display: grid;
  gap: 13px;
  padding: 18px 19px 20px;
  border: 1px solid var(--line);
  background: var(--paper-high);
}

.prompt-label {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.prompt-block code {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.install-note {
  display: grid;
  gap: 10px;
  margin: 24px 0 0 60px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.setup-inline-code {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-high);
}

.install-note code {
  min-width: 0;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.setup-inline-code .copy-button {
  min-height: 100%;
  border-color: var(--line);
  color: var(--ink);
}

.setup-inline-code .copy-button:hover,
.setup-inline-code .copy-button:focus-visible {
  background: var(--accent);
  color: var(--paper-high);
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  gap: clamp(48px, 10vw, 150px);
  align-items: start;
  margin-top: 62px;
}

.method-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.method-steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.method-aside {
  max-width: 360px;
  border-left: 2px solid var(--accent);
  padding-left: 24px;
}

.method-aside .text-link,
.contract-copy .text-link {
  margin-top: 26px;
}

.contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(42px, 9vw, 128px);
  align-items: center;
  margin-top: 62px;
}

.contract-code {
  min-width: 0;
  margin: 0;
  padding: 27px 29px;
  overflow-x: auto;
  border-radius: 7px;
  background: var(--terminal);
  color: var(--terminal-text);
  font-size: 13px;
  line-height: 1.75;
}

.code-key {
  color: #e88964;
}

.code-string {
  color: #c1d4a5;
}

.code-number {
  color: #e4c98f;
}

.contract-copy {
  max-width: 350px;
}

.boundary-list {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.closing-section {
  padding-bottom: clamp(72px, 9vw, 112px);
}

.closing-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(30px, 5vw, 54px);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--closing-text);
}

.closing-label {
  margin-bottom: 19px;
  color: var(--accent);
}

.closing-panel h2 {
  margin-bottom: 16px;
  color: var(--closing-text);
}

.closing-panel > div > p:last-child {
  color: color-mix(in srgb, var(--closing-text) 72%, transparent);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer > span:first-child,
.site-footer a {
  color: var(--ink);
  font-weight: 750;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .report-preview {
    animation: fade-up 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .report-preview {
    animation-delay: 90ms;
  }
}

@media (min-width: 901px) {
  h1 span {
    display: block;
    white-space: nowrap;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d201e;
    --paper-high: #252925;
    --ink: #f0eee7;
    --muted: #adb2a9;
    --line: #464c46;
    --accent: #ef8963;
    --accent-dark: #ff9a72;
    --terminal: #111412;
    --terminal-text: #f0eee7;
    --closing-text: #f0eee7;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  }

  .button-primary {
    color: #1d201e;
  }

  .button-primary:hover {
    color: #1d201e;
  }

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

  .button-light:hover {
    color: #1d201e;
  }

  .closing-panel {
    background: #111412;
  }
}

@media (max-width: 900px) {
  :root {
    --shell: min(720px, calc(100% - 36px));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 58px;
    padding-top: 72px;
  }

  .hero-copy {
    max-width: 620px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3.4rem, 10vw, 5.1rem);
  }

  .step-row,
  .contract-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .method-layout {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .method-aside,
  .contract-copy {
    max-width: 520px;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .header-inner {
    min-height: 68px;
  }

  .site-nav {
    gap: 14px;
    font-size: 12px;
  }

  .site-nav a:nth-child(2) {
    display: none;
  }

  .hero {
    gap: 44px;
    padding-top: 60px;
    padding-bottom: 76px;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.75rem, 13vw, 4.4rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .button {
    width: max-content;
  }

  .preview-output {
    padding: 23px 20px 25px;
    font-size: 12px;
  }

  .proof-strip {
    grid-template-columns: 1fr;
  }

  .proof-item {
    padding: 18px 0;
  }

  .proof-item + .proof-item {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-left: 0;
  }

  .install-section,
  .method-section,
  .contract-section {
    padding-top: 92px;
    padding-bottom: 92px;
  }

  .section-heading h2,
  .closing-panel h2 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .step-list,
  .method-layout,
  .contract-layout {
    margin-top: 44px;
  }

  .step-meta {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }

  .step-meta h3,
  .method-steps h3,
  .method-aside h3,
  .contract-copy h3 {
    font-size: 23px;
  }

  .install-note {
    margin-left: 0;
  }

  .setup-inline-code {
    width: 100%;
  }

  .method-steps li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }

  .contract-code {
    padding: 22px 19px;
    font-size: 11px;
  }

  .closing-panel {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 24px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 420px) {
  .site-nav a:nth-child(3) {
    display: none;
  }

  .preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .code-block {
    grid-template-columns: 1fr;
  }

  .code-block .copy-button {
    min-height: 42px;
    border-top: 1px solid rgba(245, 241, 233, 0.18);
    border-left: 0;
    text-align: left;
  }

  .setup-inline-code {
    grid-template-columns: 1fr;
  }

  .setup-inline-code .copy-button {
    min-height: 42px;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
