/* ==========================================================================
   Fairherst Contributor Network
   contributors.fairherst.com
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --black:        #000000;
  --ink:          #08090A;
  --surface:      #0D0F11;
  --surface-2:    #131619;
  --line:         rgba(255, 255, 255, 0.10);
  --line-strong:  rgba(255, 255, 255, 0.20);

  --paper:        #F4F2ED;
  --text:         #E8E6E1;
  --muted:        #9BA0A6;
  --faint:        #6B7178;

  /* Neutral grey accent. No colour on the page beyond black, white and grey. */
  --accent:       #C9CDD2;
  --accent-soft:  rgba(255, 255, 255, 0.06);
  --accent-line:  rgba(255, 255, 255, 0.30);

  /* Headings: Gloock (400 only, no italic, no bold). Body: DM Sans. */
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Gloock", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;

  /* Button face + easing lifted straight from fairherst.com. */
  --btn-face: #F2F2F2;
  --btn-ease: cubic-bezier(0.25, 1, 0.33, 1);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: 0.5em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
::selection { background: var(--accent); color: #000; }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--paper); color: #000; padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- Layout primitives -------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 780px; }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--line { border-top: 1px solid var(--line); }
.section--surface { background: var(--surface); }

.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }

/* Gloock is a single-weight (400) display serif with no true italic. Never
   ask for bold or italic on it, the browser will synthesise both badly. */
h1, .h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--paper);
  font-weight: 400;
  font-style: normal;
}
h2, .h2 {
  font-family: var(--serif);
  font-size: clamp(1.95rem, 3.8vw, 2.95rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--paper);
  font-weight: 400;
}
h3, .h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.26;
  letter-spacing: -0.01em;
  color: var(--paper);
  font-weight: 400;
}
h5, .h5 {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.3;
  letter-spacing: -0.008em;
  color: var(--paper);
  font-weight: 400;
  margin: 0 0 16px;
}
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.66;
  color: var(--muted);
  max-width: 62ch;
}
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 20px; color: var(--muted); font-size: 1.05rem; }
.section-head--center p { margin-inline: auto; }

/* --- Buttons ------------------------------------------------------------
   Matched to fairherst.com: fully-rounded pill, #F2F2F2 face on black text,
   DM Sans 600 in sentence case with slight negative tracking, a leading dash
   before the label, and the house 0.45s cubic-bezier(.25,1,.33,1) easing.
   Hover on the main site is a straight opacity drop to .87, with no colour shift.
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 32px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
  text-decoration: none; border: 1px solid transparent; border-radius: 200px;
  cursor: pointer; white-space: nowrap;
  transition:
    opacity 0.45s var(--btn-ease),
    transform 0.45s var(--btn-ease),
    color 0.45s var(--btn-ease),
    border-color 0.45s var(--btn-ease),
    background-color 0.45s var(--btn-ease);
}
.btn--primary { background: var(--btn-face); color: #000; }
.btn--primary:hover { opacity: 0.87; }

/* Site nav pills are transparent with white text; the hairline reads the same
   at rest on a black page and keeps a usable secondary action. */
.btn--ghost { border-color: var(--line-strong); color: var(--paper); background: transparent; }
.btn--ghost:hover { border-color: var(--paper); opacity: 0.87; }


.btn--sm { padding: 11px 24px; font-size: 16px; font-weight: 500; letter-spacing: -0.021em; gap: 10px; }
.btn--lg { padding: 20px 40px; font-size: 18px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* The site sets its mark before the label, not after; order:-1 does that
   without touching the markup. The glyph itself is hidden and drawn as a rule. */
.btn__arrow {
  order: -1; flex-shrink: 0;
  font-size: 0; line-height: 0;
  width: 22px; height: 1px; background: currentColor;
  transition: width 0.45s var(--btn-ease);
}
.btn:hover .btn__arrow { width: 32px; }
.btn--sm .btn__arrow { width: 16px; }
.btn--sm:hover .btn__arrow { width: 24px; }

.textlink {
  color: var(--paper); text-decoration: none;
  border-bottom: 1px solid var(--accent-line); padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.textlink:hover { color: var(--accent); border-color: var(--accent); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-stuck { border-bottom-color: var(--line); background: rgba(0,0,0,0.9); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand__mark {
  font-family: var(--serif); font-size: 21px; letter-spacing: -0.015em;
  color: var(--paper); font-weight: 400;
}
.brand__divider { width: 1px; height: 16px; background: var(--line-strong); align-self: center; }
.brand__sub {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; align-self: center;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 15px; font-weight: 500; letter-spacing: -0.021em;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s; position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }

/* The header pills are hidden on small screens, so the same two actions are
   mirrored into the mobile nav panel and shown only there. */
.nav__action { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); width: 42px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.5px; background: var(--paper); position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--paper);
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; transform: translateY(-12px);
    opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .nav__action { display: block; color: var(--paper); font-weight: 600; }
  .nav__action:last-child { border-bottom: 0; }
}

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(72px, 12vw, 150px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 900px;
  background:
    radial-gradient(60% 55% at 22% 42%, rgba(255,255,255,0.07), transparent 68%),
    radial-gradient(45% 45% at 82% 12%, rgba(255,255,255,0.04), transparent 70%);
  pointer-events: none;
}
/* 1.5fr gives the headline and lede a comfortable measure against the pull
   quote in the narrower right-hand column. */
.hero__grid { position: relative; display: grid; grid-template-columns: 1.5fr 0.8fr; gap: clamp(36px, 5vw, 72px); align-items: end; }
.hero h1 { max-width: 15ch; }
/* Gloock has no italic, so accent the phrase with colour instead of a slant. */
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lede { margin-top: 28px; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__note { margin-top: 22px; font-size: 13.5px; color: var(--faint); }
.hero__aside { border-left: 1px solid var(--line); padding-left: clamp(24px, 3vw, 40px); }
.hero__aside p { font-size: 15px; color: var(--muted); }

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 28px; }
}

/* --- Brand marquee ------------------------------------------------------
   Seamless loop: the track holds two identical groups and travels -50%, so
   the second group lands exactly where the first began.
   ------------------------------------------------------------------------ */
.brands { padding-block: clamp(56px, 7vw, 92px); }
.brands h2 { text-align: center; }

.marquee {
  margin-top: clamp(30px, 4vw, 52px); overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex; align-items: center;
  gap: clamp(44px, 5.5vw, 84px); padding-right: clamp(44px, 5.5vw, 84px);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* Every logo was sliced from the master PNG at the same pixel height, so one
   CSS height keeps their relative sizes exactly as the main site sets them. */
.marquee img {
  height: clamp(22px, 2.5vw, 32px); width: auto; display: block;
  flex-shrink: 0; opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}

/* --- Two column ---------------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.two-col--sticky > :first-child { position: sticky; top: 110px; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col--sticky > :first-child { position: static; }
}

/* --- Auth ----------------------------------------------------------------
   Focused single-column page for the contributor portal sign-in.
   ------------------------------------------------------------------------ */
.auth {
  min-height: calc(100vh - 72px);
  display: grid; place-items: center;
  padding: clamp(40px, 7vw, 80px) var(--gutter);
  position: relative; overflow: hidden;
}
.auth::before {
  content: ""; position: absolute; inset: -30% 0 auto; height: 620px;
  background: radial-gradient(46% 58% at 50% 30%, rgba(255,255,255,0.06), transparent 70%);
  pointer-events: none;
}
.auth__card { position: relative; width: 100%; max-width: 430px; }
.auth__card h1 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); margin-bottom: 12px; }
.auth__intro { color: var(--muted); font-size: 15.5px; margin-bottom: 34px; }
.auth__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: -4px 0 26px;
}
.auth__row .consent { margin: 0; font-size: 14px; }
.auth__row a { font-size: 14px; }
.auth__alt {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted); text-align: center;
}
.auth__back { display: block; margin-top: 28px; text-align: center; font-size: 14px; color: var(--faint); text-decoration: none; }
.auth__back:hover { color: var(--muted); }

.password-input { position: relative; }
.password-input input { padding-right: 78px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-radius: var(--radius);
  transition: color 0.2s;
}
.password-toggle:hover { color: var(--paper); }

.auth-notice {
  display: none; margin-top: 22px; padding: 18px 20px;
  border-left: 2px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px; color: var(--text);
}
.auth-notice.is-visible { display: block; }
.auth-notice p { margin: 0 0 8px; }
.auth-notice p:last-child { margin: 0; }

/* --- Ledger --------------------------------------------------------------
   Rule-separated prospectus list: serif term on the left, copy on the right.
   Replaces the boxed feature-card grid: no cells, no numerals, no equal
   heights forcing the copy to pad itself out.
   ------------------------------------------------------------------------ */
.ledger { margin: 0; border-top: 1px solid var(--line); }
.ledger__row {
  display: grid; grid-template-columns: minmax(200px, 0.9fr) 2fr;
  gap: clamp(20px, 5vw, 72px);
  padding: clamp(26px, 3vw, 38px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.ledger dt {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.18;
  letter-spacing: -0.012em; color: var(--paper);
}
.ledger dd { margin: 0; color: var(--muted); font-size: 16.5px; max-width: 60ch; }

.ledger--tight .ledger__row {
  grid-template-columns: minmax(110px, 0.5fr) 2fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 20px 0;
}
.ledger--tight dt { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.ledger--tight dd { font-size: 15.5px; }

@media (max-width: 700px) {
  .ledger__row, .ledger--tight .ledger__row { grid-template-columns: 1fr; gap: 10px; }
}

.panel {
  border: 1px solid var(--line); background: var(--surface);
  padding: clamp(28px, 3.5vw, 44px); border-radius: var(--radius);
}
.panel--feature { border-color: var(--accent-line); background: var(--accent-soft); }

/* --- Checklists --------------------------------------------------------- */
.check { list-style: none; padding: 0; margin: 0; }
.check li {
  position: relative; padding-left: 34px; margin-bottom: 18px;
  color: var(--muted); font-size: 15.5px;
}
.check li strong { color: var(--paper); font-weight: 600; display: block; margin-bottom: 2px; }
/* Drawn as a masked SVG rather than a rotated box corner: a real check with
   round joins holds its weight at any size and can be set solid white. */
.check li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 19px; height: 19px; border: 0; transform: none;
  background-color: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.2 10.6l4.5 4.5L16.8 5.2' fill='none' stroke='%23000' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.2 10.6l4.5 4.5L16.8 5.2' fill='none' stroke='%23000' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Steps -------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: clamp(20px, 4vw, 56px);
  padding: 36px 0; border-top: 1px solid var(--line); align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__idx {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--accent);
  padding-top: 6px;
}
.step h3 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }
.step__meta {
  margin-top: 14px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
}
@media (max-width: 780px) {
  .step { grid-template-columns: 1fr; gap: 14px; }
}

/* --- Topic tags --------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tags li {
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px;
  font-size: 13.5px; color: var(--muted); margin: 0;
  transition: border-color 0.2s, color 0.2s;
}
.tags li:hover { border-color: var(--accent-line); color: var(--paper); }

/* --- FAQ ---------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 26px 48px 26px 0; position: relative;
  font-family: var(--serif); font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--paper);
  font-weight: 400; letter-spacing: -0.008em; transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 13px;
  margin-top: -6px;
  background:
    linear-gradient(var(--accent), var(--accent)) center/13px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/1.5px 13px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 60px 28px 0; color: var(--muted); font-size: 15.5px; max-width: 78ch; }
.faq__body p:last-child { margin-bottom: 0; }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 120% at 50% 100%, rgba(255,255,255,0.08), transparent 70%);
}
.cta-band__inner { position: relative; text-align: center; padding-block: clamp(72px, 10vw, 130px); }
.cta-band h2 { max-width: 18ch; margin-inline: auto; }
.cta-band p { margin: 24px auto 0; color: var(--muted); max-width: 56ch; }
.cta-band .hero__cta { justify-content: center; }

/* --- Footer ------------------------------------------------------------- */
/* No top border: the slightly lighter --ink background is separation enough,
   and a hairline there read as a stray white line against the black above. */
.site-footer { background: var(--ink); padding-block: 64px 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 18px; font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 11px; }
.footer-grid a { font-size: 14.5px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-grid a:hover { color: var(--paper); }
.footer-about p { font-size: 14.5px; color: var(--faint); max-width: 38ch; margin-top: 18px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--faint);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- Doc layout (style guide) ------------------------------------------- */
.page-head { padding-block: clamp(60px, 8vw, 104px) clamp(36px, 4vw, 56px); position: relative; }
.page-head::before {
  content: ""; position: absolute; inset: -30% 0 auto; height: 620px;
  background: radial-gradient(48% 60% at 20% 40%, rgba(255,255,255,0.06), transparent 70%);
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-head .lede { margin-top: 26px; }
.page-meta {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
}
.page-meta strong { color: var(--muted); font-weight: 500; }

/* The page head already carries bottom padding; without this the first section
   below it stacks its own full top padding and opens a ~180px hole. */
.page-head + .section { padding-top: clamp(20px, 3vw, 44px); }

.doc { display: grid; grid-template-columns: 250px 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; padding-bottom: 100px; }
.toc { position: sticky; top: 100px; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 8px; }
.toc h4 {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 16px; font-weight: 600;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a {
  display: block; padding: 7px 0 7px 30px; font-size: 14px; color: var(--faint);
  text-decoration: none; position: relative; transition: color 0.2s;
  border-left: 1px solid transparent; margin-left: -1px;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 8px; font-family: var(--mono); font-size: 10px; top: 9px;
  color: var(--line-strong); transition: color 0.2s;
}
.toc a:hover { color: var(--muted); }
.toc a.is-active { color: var(--paper); border-left-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.toc a.is-active::before { color: var(--accent); }
.toc__rule { border-left: 1px solid var(--line); }

.doc-body { max-width: 74ch; }
.doc-body section { padding-block: clamp(36px, 4vw, 52px); border-top: 1px solid var(--line); }
.doc-body section:first-child { border-top: 0; padding-top: 0; }
.doc-body h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem); margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 14px;
}
.doc-body h2 .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.doc-body h3 {
  font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--paper);
  letter-spacing: 0.01em; margin: 34px 0 12px; text-transform: none;
}
.doc-body p, .doc-body li { color: var(--muted); font-size: 16px; }
.doc-body strong { color: var(--paper); font-weight: 600; }
.doc-body ul, .doc-body ol { padding-left: 1.3em; }
.doc-body li { margin-bottom: 10px; }
.doc-body li::marker { color: var(--accent); }

.rule-table { width: 100%; border-collapse: collapse; margin: 22px 0 28px; font-size: 15px; }
.rule-table th, .rule-table td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.rule-table th {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
  font-weight: 600; border-bottom-color: var(--line-strong);
}
.rule-table td { color: var(--muted); }
.rule-table td:first-child { color: var(--paper); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.callout {
  border-left: 2px solid var(--accent); background: var(--accent-soft);
  padding: 20px 24px; margin: 26px 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p { margin: 0; color: var(--text); font-size: 15px; }
.callout strong { color: var(--accent); }
.callout--warn { border-left-color: #C0554C; background: rgba(192, 85, 76, 0.10); }
.callout--warn strong { color: #E0837A; }

.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 26px 0; }
.do-dont > div { background: var(--black); padding: 22px 24px; }
.do-dont h4 {
  margin: 0 0 14px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
}
.do-dont .yes h4 { color: var(--accent); }
.do-dont .no h4 { color: #C0554C; }
.do-dont p { margin: 0 0 10px; font-size: 15px; }
.do-dont p:last-child { margin: 0; }
.do-dont .sample { color: var(--paper); font-family: var(--serif); font-size: 1.05rem; line-height: 1.42; font-weight: 400; }
@media (max-width: 640px) { .do-dont { grid-template-columns: 1fr; } }

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--paper); z-index: 120; transition: width 0.1s linear;
}

@media (max-width: 940px) {
  .doc { grid-template-columns: 1fr; }
  .toc {
    position: static; max-height: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px; background: var(--surface);
  }
  .toc ol { columns: 2; column-gap: 24px; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* --- Forms -------------------------------------------------------------- */
.form-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(40px, 5vw, 72px); align-items: start; padding-bottom: 100px; }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; } }

.form-aside { position: sticky; top: 100px; display: grid; gap: 20px; }
@media (max-width: 960px) { .form-aside { position: static; } }

.fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.fieldset + .fieldset { border-top: 1px solid var(--line); padding-top: 40px; margin-top: 40px; }
.fieldset > legend {
  font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.6rem); color: var(--paper);
  padding: 0; margin-bottom: 6px; letter-spacing: -0.01em; font-weight: 400;
}
.fieldset__hint { color: var(--faint); font-size: 14px; margin: 0 0 26px; }

.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.field label, .field .label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  letter-spacing: 0.02em; margin-bottom: 8px;
}
.field .req { color: var(--accent); margin-left: 3px; }
.field .opt { color: var(--faint); font-weight: 400; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.field .hint { display: block; font-size: 13px; color: var(--faint); margin: -2px 0 10px; font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%; background: var(--surface); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-family: inherit; font-size: 15.5px;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}
.field input::placeholder, .field textarea::placeholder { color: #4E545B; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--paper); background: var(--surface-2);
}
/* Country select and national number read as one joined control. */
.phone-input { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr); }
.phone-input select {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right-color: transparent;
  padding-right: 34px;
  background-position: calc(100% - 16px) 22px, calc(100% - 10px) 22px;
  text-overflow: ellipsis;
}
.phone-input input { border-radius: 0 var(--radius) var(--radius) 0; }
.phone-input select:focus, .phone-input input:focus { position: relative; z-index: 1; }
@media (max-width: 520px) {
  .phone-input { grid-template-columns: 1fr; }
  .phone-input select { border-radius: var(--radius) var(--radius) 0 0; border-right-color: var(--line); border-bottom-color: transparent; }
  .phone-input input { border-radius: 0 0 var(--radius) var(--radius); }
}

.field .counter { display: block; text-align: right; font-size: 12px; color: var(--faint); margin-top: 6px; font-family: var(--mono); }
.field .counter.is-over { color: #E0837A; }

.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #C0554C; }
.error-msg { display: none; color: #E0837A; font-size: 13px; margin-top: 7px; }
.field.has-error .error-msg,
.fieldset.has-error > .error-msg { display: block; }
.choice.is-locked { opacity: 0.45; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  font-size: 14.5px; color: var(--muted); font-weight: 400; margin: 0;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.choice:hover { border-color: var(--line-strong); color: var(--text); }
.choice input { accent-color: var(--accent); margin: 3px 0 0; flex-shrink: 0; width: 15px; height: 15px; }
.choice:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--paper); }

.consent { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; font-size: 14.5px; color: var(--muted); }
.consent input { accent-color: var(--accent); margin: 4px 0 0; width: 15px; height: 15px; flex-shrink: 0; }
.consent a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-line); }

.form-submit { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 40px; }
.form-status { margin-top: 18px; font-size: 14px; color: var(--faint); }

.timeline { list-style: none; margin: 0; padding: 0; counter-reset: tl; }
.timeline li {
  position: relative; padding: 0 0 22px 30px; margin: 0;
  border-left: 1px solid var(--line); counter-increment: tl;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -4.5px; top: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}
.timeline strong { display: block; color: var(--paper); font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.timeline span { font-size: 14px; color: var(--faint); }

.thanks { display: none; }
.thanks.is-visible { display: block; }
form.is-submitted { display: none; }

/* --- Reveal --------------------------------------------------------------
   Content is visible by DEFAULT. The hidden-then-fade-in state is scoped to
   .js, which is only set once the page has confirmed the script is alive.
   Without this, a failed or blocked site.js leaves whole sections invisible.
   ------------------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .toc, .cta-band, .progress { display: none !important; }
  body { background: #fff; color: #111; }
  .doc { grid-template-columns: 1fr; }
  h1, h2, h3, .doc-body strong { color: #000; }
  .doc-body p, .doc-body li, .rule-table td { color: #333; }
}
