@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap');

:root {
  --ink: #242820;
  --muted: #65675e;
  --green: #205842;
  --green-dark: #163d2e;
  --paper: #f2efe7;
  --paper-dark: #e9e5da;
  --line: #cfcec2;
  --acid: #d8df79;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", monospace;
  --max: 1160px;
  --gutter: clamp(22px, 6vw, 82px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-dark); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.container {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

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

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.06em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  background: var(--green);
  color: var(--acid);
  font: 500 13px var(--mono);
  letter-spacing: -.08em;
}

nav { display: flex; gap: clamp(18px, 3vw, 38px); }

nav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover { color: var(--green); }

/* The hero is deliberately split: large editorial type on the left,
   practical code panel on the right. */
.hero {
  position: relative;
  min-height: 495px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  align-items: center;
  gap: clamp(45px, 9vw, 130px);
  padding-block: 75px 94px;
}

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

.kicker, .section-tag {
  margin: 0;
  color: var(--green);
  font: 11px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kicker { margin-bottom: 20px; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.045em;
}

h1 {
  margin: 0;
  font-size: clamp(50px, 8vw, 94px);
  line-height: .91;
}

h1 span { color: var(--green); }

.lead {
  max-width: 480px;
  margin: 25px 0 21px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.official-link {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.official-link a { text-decoration-thickness: 1px; }
.official-link span { padding-left: 4px; }

.referral-panel {
  align-self: center;
  padding: 20px 0 18px;
  border-block: 1px solid var(--ink);
}

.panel-label, .label {
  display: block;
  margin: 0 0 11px;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.code-line { display: flex; align-items: center; gap: 14px; }

.code {
  color: var(--green);
  font: 500 clamp(29px, 4vw, 40px)/1.15 var(--mono);
  letter-spacing: .1em;
}

.copy-button {
  flex: 0 0 auto;
  border: 1px solid var(--green);
  padding: 9px 12px;
  background: transparent;
  color: var(--green);
  font: 700 11px var(--sans);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.copy-button:hover { background: var(--green); color: var(--paper); }
.copy-button:active { transform: translateY(1px); }

.panel-foot {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.hero-index {
  position: absolute;
  right: 0;
  bottom: 23px;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .06em;
}

.section { padding-block: clamp(62px, 8vw, 100px); border-top: 1px solid var(--line); }

.article {
  display: grid;
  grid-template-columns: minmax(110px, .45fr) minmax(0, 1.6fr) minmax(120px, .55fr);
  column-gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.section-tag { grid-column: 1; padding-top: 10px; }

.article-body { grid-column: 2; }

.article h2 {
  max-width: 650px;
  margin: 0 0 25px;
  font-size: clamp(34px, 5vw, 55px);
  line-height: 1.02;
}

.article p { color: #50554d; }
.article-body > p { max-width: 650px; }
.article p a { font-weight: 700; }

.margin-note {
  grid-column: 3;
  align-self: center;
  margin-top: 54px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.margin-note p { margin: 10px 0 0; }
.margin-rule { display: block; width: 28px; border-top: 2px solid var(--green); }

.process { background: var(--paper-dark); }

.steps {
  margin: 30px 0 25px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 13px;
  padding: 16px 0;
  border-top: 1px solid #c9c7bb;
}

.steps li:last-child { border-bottom: 1px solid #c9c7bb; }

.step-number {
  padding-top: 4px;
  color: var(--green);
  font: 11px var(--mono);
}

.steps h3 { margin: 0 0 3px; font-size: 15px; }
.steps p { margin: 0; color: var(--muted); font-size: 13px; }

.note {
  max-width: 680px;
  padding: 12px 0 12px 17px;
  border-left: 2px solid var(--green);
  color: #50554d;
  font-size: 12px;
}

.note strong { color: var(--ink); }

.questions .article-body { max-width: 760px; }

details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-child { border-bottom: 1px solid var(--line); }

summary {
  position: relative;
  padding-right: 35px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  position: absolute;
  right: 3px;
  top: -3px;
  color: var(--green);
  font: 20px var(--mono);
}

details[open] summary::after { content: "−"; }
details p { max-width: 620px; margin: 11px 0 2px; font-size: 13px; }

.about-section { background: #e7e5d9; }
.about-copy { max-width: 700px; }
.about-copy h2 { max-width: 520px; }
.signature {
  margin-top: 25px;
  color: var(--ink) !important;
  font-family: var(--serif);
  font-size: 20px;
}

/* Closing band uses the same green as the referral code, not another card. */
.bottom-cta { padding-block: 40px; background: var(--green-dark); color: var(--paper); }

.bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.bottom-cta .section-tag { color: var(--acid); }
.bottom-cta h2 { margin: 8px 0 3px; font-size: clamp(32px, 4vw, 43px); }
.bottom-cta p:not(.section-tag) { margin: 0; color: #d7dfd8; font-size: 12px; }

.bottom-code {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.bottom-code strong {
  color: var(--acid);
  font: 500 22px var(--mono);
  letter-spacing: .1em;
}

.copy-button-light { border-color: var(--paper); color: var(--paper); }
.copy-button-light:hover { background: var(--paper); color: var(--green-dark); }

.footer {
  padding-block: 27px 22px;
  background: #222820;
  color: #d5d8cf;
  font-size: 11px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 35px;
  padding-bottom: 16px;
  border-bottom: 1px solid #4a5047;
}

.footer p { margin: 0; }
.footer-title { line-height: 1.6; }
.footer-title strong { color: white; font-size: 13px; }
.footer-links { display: flex; gap: 22px; padding-top: 15px; }
.footer a { color: #e0e4d5; }
.copyright { margin-top: 16px !important; color: #aeb4a9; font: 10px var(--mono); }

@media (max-width: 760px) {
  :root { --gutter: 22px; }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 35px;
    padding-block: 62px 72px;
  }

  .hero-copy { max-width: 600px; }
  .referral-panel { width: min(100%, 430px); }
  .hero-index { bottom: 18px; }

  .article {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .section-tag, .article-body, .margin-note { grid-column: 1; }
  .section-tag { padding-top: 0; }
  .article h2 { margin-bottom: 19px; }
  .margin-note { margin: 10px 0 0; max-width: 240px; }
  .bottom-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .nav-wrap { min-height: 64px; }
  nav { gap: 13px; }
  nav a { font-size: 10px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 29px; height: 26px; }
  h1 { font-size: clamp(47px, 13vw, 64px); }
  .code-line { justify-content: space-between; }
  .copy-button { padding: 9px 10px; }
  .footer-top { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}



/* Keep editorial sections aligned instead of spreading content across the grid. */
.article {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 12px;
}

.article > .section-tag,
.article > .article-body,
.article > .margin-note {
  grid-column: 1;
}

.article > .section-tag {
  padding-top: 0;
}

.article-body,
.questions .article-body {
  width: 100%;
  max-width: 720px;
  justify-self: start;
}

.article-body > p {
  max-width: 680px;
}

.margin-note {
  max-width: 280px;
  margin: 18px 0 0;
}

.questions .article-body details,
.questions .article-body summary,
.questions .article-body details p {
  width: 100%;
}

