/* ==========================================================================
   Leafline — landing page
   Tokens mirror the app's `lib/app/theme.dart` (see uploads/COLOR_SCHEME.md).
   Never hard-code a hex below the :root block — use the token.
   ========================================================================== */

:root {
  /* Brand core */
  --forest: #2f4a39;
  --forest-deep: #23302a;
  --clay: #c2683d;
  --paper: #fbf8f1;

  /* Ink */
  --text-primary: #26312a;
  --text-muted: #6e6e64;
  --text-faint: #9a9a8c;
  --sage-text: #a8c0ae;
  --text-body: #3e4a40;

  /* Surfaces & borders */
  --card-white: #ffffff;
  --card-border: #ece6d8;
  --border: #e6e0d3;
  --band: #f3efe4;

  /* Green family */
  --surface-green: #e4eddf;
  --soft-green: #eaf1e4;
  --healthy-border: #d6e3cc;
  --muted-green: #3e6b4e;
  --green-text-2: #5c7563;

  /* Clay family */
  --clay-tint-bg: #fbefe7;
  --clay-tint-border: #f1d9c9;
  --clay-text: #9a6a4f;

  /* Status */
  --progress-track: #eae3d4;
  --dismiss-chip: #efe9da;
  --star-gold: #f0b33e;

  /* Layout — backgrounds run full-bleed, content stays in a centred column.
     The column widths come from the source design's 1180px card minus its own
     inner padding, so the content box is identical to the original at every
     viewport: 1180 − 2×44 = 1092 (nav/hero), 1180 − 2×64 = 1052 (sections). */
  --gutter-nav: clamp(20px, 3.7vw, 44px);
  --gutter-section: clamp(20px, 5.4vw, 64px);
  --inner-nav: 1092px;
  --inner-section: 1052px;
  --pad-nav: max(var(--gutter-nav), calc((100% - var(--inner-nav)) / 2));
  --pad-section: max(var(--gutter-section), calc((100% - var(--inner-section)) / 2));
  --focus: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--clay);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Sections are anchor targets; keep headings clear of the viewport edge. */
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--forest-deep);
  color: var(--text-primary);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--muted-green);
  text-decoration: none;
}

a:hover {
  color: var(--forest);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -180%);
  z-index: 20;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest);
  font-weight: 700;
  transition: transform 0.18s ease;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Page shells — edge-to-edge colour bands
   -------------------------------------------------------------------------- */

.page {
  display: flex;
  flex-direction: column;
}

.shell {
  width: 100%;
}

/* The hero band is split in two so <header>, <main> and <footer> can each be a
   top-level landmark. Both halves share a background, so they read as one band. */
.shell--hero-top,
.shell--hero-bottom {
  background: var(--forest-deep);
}

.shell--body {
  background: var(--paper);
}

.shell--footer {
  background: var(--forest-deep);
}

/* --------------------------------------------------------------------------
   Shared type
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}

.section-head {
  text-align: center;
}

.section-head--narrow {
  max-width: 640px;
  margin-inline: auto;
}

.section-title {
  margin-top: 14px;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}

.section-lede {
  margin-top: 14px;
  font-size: clamp(15.5px, 1.6vw, 17px);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

.section {
  padding-block: clamp(44px, 6.4vw, 76px);
  padding-inline: var(--pad-section);
}

.section--band {
  background: var(--band);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

/* --------------------------------------------------------------------------
   Store badges
   -------------------------------------------------------------------------- */

.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 56px;
  padding: 0 20px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.badge:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.badge__text {
  text-align: left;
  line-height: 1.05;
}

.badge__small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.badge__large {
  font-size: 18px;
  font-weight: 700;
}

.badge--lg {
  height: 58px;
  padding: 0 22px;
}

.badge--lg .badge__large {
  font-size: 19px;
}

/* --------------------------------------------------------------------------
   Pill (used on both dark bands)
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sage-text);
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--clay);
  flex: none;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  padding-inline: var(--pad-nav);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand:hover {
  color: inherit;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.brand__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.9vw, 34px);
}

.nav__link {
  font-size: 15px;
  font-weight: 600;
  color: #c5d4c7;
}

.nav__link:hover {
  color: var(--paper);
}

.nav__cta {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.nav__cta:hover {
  color: var(--forest-deep);
  background: #fff;
}

@media (max-width: 860px) {
  .nav__links .nav__link {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Bottom padding gives the full phone room to stand clear of the features
     band below it — the device used to peek up from a clipped bottom edge. */
  padding-block: clamp(36px, 4.7vw, 56px) clamp(52px, 6vw, 88px);
  padding-inline: var(--pad-nav);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  max-width: 140%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(62, 107, 78, 0.35), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  margin-top: 26px;
  font-size: clamp(44px, 7.4vw, 76px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--paper);
}

.hero__lede {
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: #c5d4c7;
  max-width: 560px;
  text-wrap: pretty;
}

.hero__lede em {
  font-style: normal;
  color: var(--paper);
  font-weight: 600;
}

.hero__actions {
  margin-top: 30px;
}

.hero__proof {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sage-text);
}

.hero__proof span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Phone mockup — deliberately cropped, "peeking" out of the hero floor. */

.hero__device {
  margin-top: clamp(32px, 3.7vw, 44px);
  position: relative;
}

.phone {
  width: 300px;
  border-radius: 46px;
  padding: 11px;
  background: #0f1613;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.phone__screen {
  border-radius: 36px;
  overflow: hidden;
  background: var(--paper);
  line-height: 0;
}

/* The real in-app "3 plants are thirsty" screen, exported as a screenshot with
   the OS status bar cropped off so the device frame reads as the phone. */
.phone__shot {
  display: block;
  width: 100%;
  height: auto;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--paper);
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  animation: ll-float 5s ease-in-out infinite;
}

.float-card--water {
  top: 78px;
  right: -84px;
}

.float-card--done {
  bottom: 96px;
  left: -92px;
  animation-duration: 6.5s;
}

.float-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.float-card__icon--clay {
  background: var(--clay-tint-bg);
}

.float-card__icon--green {
  background: var(--soft-green);
}

.float-card__text {
  text-align: left;
  line-height: 1.25;
}

.float-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.float-card__meta {
  font-size: 12px;
  font-weight: 600;
}

.float-card__meta--clay {
  color: var(--clay-text);
}

.float-card__meta--green {
  color: var(--green-text-2);
}

@keyframes ll-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* Below ~900px the float cards no longer fit beside the phone. Tuck them in
   against the device rather than letting them push the layout wider. */
@media (max-width: 900px) {
  .float-card--water {
    top: 40px;
    right: -34px;
  }

  .float-card--done {
    bottom: 72px;
    left: -40px;
  }
}

@media (max-width: 620px) {
  .float-card {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero__device {
    transform: scale(0.92);
    transform-origin: top center;
  }
}


/* Inline elements used as stacked text blocks (span-in-span, so the markup
   stays valid inside <p> and <figcaption>). */
.float-card__text,
.quote figcaption > span {
  display: block;
}

.float-card__title,
.float-card__meta,
.quote__role {
  display: block;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.feature-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-white);
  padding: 24px;
}

.feature--highlight {
  border-color: var(--healthy-border);
  background: var(--soft-green);
}

.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature__icon--green {
  background: var(--soft-green);
}

.feature__icon--clay {
  background: var(--clay-tint-bg);
}

.feature__icon--white {
  background: var(--card-white);
}

.feature__title {
  margin-top: 18px;
  font-size: 19px;
  font-weight: 700;
}

.feature__body {
  margin-top: 9px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.chips {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--card-white);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-body);
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */

.steps {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--card-white);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 30px 26px;
}

.step__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step__num {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  flex: none;
}

.step__num--clay {
  background: var(--clay);
}

.step__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.step__label--clay {
  color: var(--clay-text);
}

.step__title {
  margin-top: 20px;
  font-size: 21px;
  font-weight: 700;
}

.step__body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Privacy band
   -------------------------------------------------------------------------- */

.privacy {
  padding-block: clamp(44px, 5.4vw, 64px);
  padding-inline: var(--pad-section);
  background: var(--forest-deep);
  color: var(--paper);
  text-align: center;
}

.privacy__title {
  margin: 20px auto 0;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 620px;
  text-wrap: balance;
}

.privacy__body {
  margin: 16px auto 0;
  font-size: clamp(15.5px, 1.6vw, 17px);
  line-height: 1.55;
  color: #c5d4c7;
  max-width: 560px;
  text-wrap: pretty;
}

.stats {
  margin: 30px 0 0;
  display: flex;
  gap: clamp(24px, 3.7vw, 44px);
  justify-content: center;
  flex-wrap: wrap;
}

.stat__label {
  margin: 0;
}

.stat__value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.stat__label {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sage-text);
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.plans {
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
}

.plan {
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-white);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.plan--featured {
  position: relative;
  border: 1.5px solid var(--clay);
  box-shadow: 0 20px 44px rgba(194, 104, 61, 0.16);
}

.plan__flag {
  position: absolute;
  top: -13px;
  left: 32px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--clay);
  border-radius: 999px;
  padding: 5px 12px;
}

.plan__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-body);
}

.plan__name--clay {
  color: var(--clay-text);
}

.plan__price {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.plan__amount {
  font-size: clamp(36px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan__cadence {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-faint);
}

.plan__body {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.plan__features {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  color: var(--text-body);
}

.plan__features svg {
  flex: none;
  margin-top: 1px;
}

.plan--featured .plan__features li {
  font-weight: 600;
  color: var(--text-primary);
}

.plan__cta {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--forest);
  color: var(--forest);
  font-size: 16px;
  font-weight: 700;
}

.plan__cta:hover {
  background: var(--forest);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */

.rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quotes {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.quote {
  background: var(--card-white);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 26px;
  margin: 0;
}

.quote p {
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.quote figcaption {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--surface-green);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex: none;
}

.quote__avatar--clay {
  background: var(--clay-tint-bg);
  color: var(--clay);
}

.quote__role {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.25;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  margin: 40px auto 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-white);
  overflow: hidden;
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}

.faq__icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--soft-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.25s ease;
}

.faq__q[aria-expanded="true"] .faq__icon {
  transform: rotate(45deg);
}

/* 0fr → 1fr animates to the content's natural height with no JS measuring. */
.faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.25s ease, visibility 0.25s;
}

.faq__panel > div {
  overflow: hidden;
}

.faq__item.is-open .faq__panel {
  grid-template-rows: 1fr;
  visibility: visible;
}

.faq__a {
  padding: 0 24px 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Final CTA + footer
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 6.4vw, 76px);
  padding-inline: var(--pad-section);
  background: var(--forest);
  color: var(--paper);
  text-align: center;
}

.cta__glow {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 400px;
  max-width: 140%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(194, 104, 61, 0.28), transparent 70%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
}

.cta__mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin-inline: auto;
}

.cta__title {
  margin: 24px auto 0;
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 620px;
  text-wrap: balance;
}

.cta__body {
  margin: 16px auto 0;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.5;
  color: #c5d4c7;
  max-width: 480px;
  text-wrap: pretty;
}

.cta__actions {
  margin-top: 32px;
}

.footer {
  padding-block: 40px;
  padding-inline: var(--pad-section);
  background: var(--forest-deep);
  color: var(--sage-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.footer__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--sage-text);
}

.footer__links a:hover {
  color: var(--paper);
}

.footer__legal {
  font-size: 13.5px;
  color: #7e9384;
}

/* --------------------------------------------------------------------------
   Responsive grid collapses
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .feature-grid,
  .steps,
  .quotes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .feature-grid,
  .steps,
  .quotes,
  .plans {
    grid-template-columns: 1fr;
  }

  .plan {
    padding: 26px;
  }

  .footer {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Legal / long-form pages (privacy.html, terms.html — see scripts/build-legal.py)
   -------------------------------------------------------------------------- */

.legal-head {
  padding-block: clamp(32px, 4.4vw, 52px) clamp(28px, 3.6vw, 44px);
  padding-inline: var(--pad-section);
  text-align: center;
}

.legal-head__inner {
  max-width: 760px;
  margin-inline: auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sage-text);
}

.legal-back:hover {
  color: var(--paper);
}

.legal-head__title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--paper);
}

.legal-head__meta {
  margin-top: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sage-text);
}

.legal {
  max-width: 768px;
  margin-inline: auto;
  padding-block: clamp(40px, 5vw, 64px);
  padding-inline: var(--gutter-section);
  color: var(--text-body);
  font-size: 16.5px;
  line-height: 1.7;
}

.legal h2 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  scroll-margin-top: 24px;
}

.legal > h2:first-child {
  margin-top: 0;
}

.legal p {
  margin: 0 0 1.1em;
}

.legal a {
  color: var(--muted-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover {
  color: var(--forest);
}

.legal strong {
  font-weight: 700;
  color: var(--text-primary);
}

.legal ul {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.legal li {
  margin: 0.4em 0;
}

.legal li::marker {
  color: var(--muted-green);
}

.legal code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: var(--band);
  font-size: 0.9em;
}

.legal hr {
  border: 0;
  border-top: 1px solid var(--card-border);
  margin: 2em 0;
}

/* Placeholder / warning callouts (the source docs' blockquotes). */
.legal__note {
  margin: 0 0 1.6em;
  padding: 15px 18px;
  border: 1px solid var(--clay-tint-border);
  border-radius: 14px;
  background: var(--clay-tint-bg);
  color: var(--clay-text);
  font-size: 15px;
}

.legal__note strong {
  color: var(--clay-text);
}

.legal__table-wrap {
  margin: 0 0 1.4em;
  overflow-x: auto;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.legal th,
.legal td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--band);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Motion & print
   -------------------------------------------------------------------------- */

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

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