/* Ivy Link — palette and type from brand/README.md */
:root {
  --ivy-deep: #14361f;
  --ivy: #1f5c33;
  --leaf: #5fb36b;
  --sprout: #c9e8b5;
  --paper: #f6f4ee;
  --ink: #0e1a12;

  --ink-soft: #3b4a3f;
  --line: rgba(14, 26, 18, 0.12);
  --card: #fbfaf6;
  --on-dark: #f6f4ee;
  --on-dark-soft: rgba(246, 244, 238, 0.74);
  --line-dark: rgba(201, 232, 181, 0.16);
  --panel-dark: #183f25;

  --display: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ivy); text-underline-offset: 0.18em; }
a:hover { color: var(--ivy-deep); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 10px; background: var(--sprout); color: var(--ivy-deep); font-weight: 700; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 52px; padding: 0 1.5rem; border: 0; border-radius: 999px;
  font: 700 1rem/1 var(--display); letter-spacing: -0.01em; text-decoration: none;
  cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--sprout { background: var(--sprout); color: var(--ivy-deep); }
.btn--sprout:hover { background: #dcf1cd; color: var(--ivy-deep); }
.btn--ivy { background: var(--ivy); color: var(--paper); }
.btn--ivy:hover { background: var(--ivy-deep); color: var(--paper); }
.btn--line { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--line-dark); }
.btn--line:hover { color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--sprout); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header */
.site-header { background: var(--ivy-deep); color: var(--on-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.site-header__logo { display: block; flex: none; }
.site-header__logo img { height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.site-nav a:not(.btn) { color: var(--on-dark-soft); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--on-dark); }
.site-nav .btn { min-height: 42px; padding: 0 1.1rem; font-size: 0.95rem; }
@media (max-width: 820px) { .site-nav a:not(.btn) { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ivy-deep); color: var(--on-dark); padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: clamp(40px, 6vw, 96px); row-gap: clamp(36px, 5vw, 64px); align-items: start; }
.hero__copy { padding-top: 8px; }
.hero__head { grid-column: 1 / -1; }
.hero__vine { position: absolute; right: -180px; top: -120px; width: 720px; opacity: 0.06; pointer-events: none; }
.hero__kicker { font: 500 0.78rem/1.4 var(--mono); letter-spacing: 0.02em; color: var(--sprout); margin-bottom: 28px; }
.hero h1 { font-size: clamp(3rem, 7.6vw, 6.6rem); line-height: 0.94; letter-spacing: -0.05em; }
.hero h1 span { display: block; color: var(--sprout); }
.hero__lead { max-width: 30rem; font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--on-dark-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__fine { margin-top: 22px; font: 400 0.74rem/1.6 var(--mono); color: var(--on-dark-soft); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Signature: the climbing result */
.climb { --row: 64px; margin: 0; padding: 18px; border-radius: 22px; background: var(--panel-dark); box-shadow: inset 0 0 0 1px var(--line-dark), 0 40px 80px -40px rgba(0, 0, 0, 0.55); }
.climb__bar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px; background: rgba(14, 26, 18, 0.45); box-shadow: inset 0 0 0 1px var(--line-dark); }
.climb__bar svg { width: 16px; height: 16px; flex: none; color: var(--on-dark-soft); }
.climb__query { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.95rem; }
.climb__week { flex: none; font: 500 0.68rem/1 var(--mono); color: var(--sprout); padding: 6px 9px; border-radius: 999px; background: rgba(201, 232, 181, 0.1); }
.climb__list { position: relative; height: calc(5 * var(--row) + 14px); margin: 14px 0 0; padding: 0; list-style: none; }
.climb__row {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--row) - 6px);
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center;
  padding: 0 14px 0 8px; border-radius: 14px;
  transform: translateY(calc(var(--slot, 0) * var(--row) + var(--gap, 0px)));
  transition: transform 0.8s var(--ease), background-color 0.4s, opacity 0.4s;
}
.climb__pos { font: 500 0.82rem/1 var(--mono); color: var(--on-dark-soft); text-align: center; }
.climb__body { min-width: 0; display: grid; gap: 4px; }
.climb__site { font: 400 0.68rem/1.2 var(--mono); color: var(--on-dark-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.climb__title { font-weight: 600; font-size: 0.98rem; line-height: 1.2; color: var(--on-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.climb__row--you { background: rgba(95, 179, 107, 0.14); box-shadow: inset 0 0 0 1px rgba(95, 179, 107, 0.45); z-index: 1; }
.climb__row--you .climb__pos { color: var(--sprout); font-weight: 500; }
.climb__row--you .climb__site { color: var(--sprout); display: flex; align-items: center; gap: 6px; }
.climb__row--you .climb__site img { width: 12px; height: 12px; }
.climb__row--you .climb__title { color: var(--sprout); }
.climb__row.is-far { opacity: 0.72; }
.climb__row.is-far::before { content: ''; position: absolute; left: 14px; right: 14px; top: -11px; border-top: 1.5px dotted rgba(201, 232, 181, 0.28); }
.climb__pos.tick { animation: tick 0.5s var(--ease); }
@keyframes tick { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.climb__answer { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: rgba(14, 26, 18, 0.35); box-shadow: inset 0 0 0 1px var(--line-dark); }
.climb__label { display: inline-flex; align-items: center; gap: 6px; font: 500 0.66rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-dark-soft); }
.climb__label svg { width: 12px; height: 12px; }
.climb__answer p { margin-top: 10px; font-size: 0.95rem; line-height: 1.5; color: var(--on-dark-soft); }
.climb__cite { padding: 1px 7px 2px; border-radius: 6px; background: rgba(201, 232, 181, 0.08); color: var(--on-dark); font: 500 0.78rem/1.4 var(--mono); transition: background-color 0.5s, color 0.5s; }
.climb.is-done .climb__cite { background: var(--sprout); color: var(--ivy-deep); }
.climb figcaption { margin: 14px 4px 0; font: 400 0.66rem/1.5 var(--mono); color: var(--on-dark-soft); }
@media (max-width: 520px) {
  .climb { --row: 60px; padding: 12px; }
  .climb__title { font-size: 0.9rem; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section--dark { background: var(--ivy-deep); color: var(--on-dark); }
.section__head { max-width: 46rem; }
.section h2 { font-size: clamp(2.3rem, 5vw, 4rem); color: var(--ivy-deep); }
.section--dark h2 { color: var(--on-dark); }
.section__lead { margin-top: 20px; font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--ink-soft); max-width: 40rem; }
.section--dark .section__lead { color: var(--on-dark-soft); }

/* How it works: the weekly loop */
.how { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.how .section__head { position: sticky; top: 40px; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } .how .section__head { position: static; } }
.loop { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 40px; }
.loop::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 76px; width: 2px; background: linear-gradient(to top, var(--ivy), var(--leaf)); border-radius: 2px; }
.loop__step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 22px; }
.loop__n { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ivy); color: var(--ivy-deep); font: 500 0.85rem/1 var(--mono); }
.loop h3 { font-size: 1.5rem; letter-spacing: -0.025em; color: var(--ivy-deep); padding-top: 8px; }
.loop p { margin-top: 10px; color: var(--ink-soft); }
.loop__again { display: flex; align-items: center; gap: 12px; margin-left: 2px; font: 500 0.76rem/1.4 var(--mono); color: var(--ivy); }
.loop__again svg { width: 40px; height: 40px; flex: none; }

/* What's included */
.included { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 6vw, 64px); }
@media (max-width: 960px) { .included { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .included { grid-template-columns: 1fr; } }
.included__item { display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 26px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.included__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(31, 92, 51, 0.09); color: var(--ivy); }
.included__icon svg { width: 22px; height: 22px; }
.included__item h3 { margin-top: 6px; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ivy-deep); }
.included__item p { color: var(--ink-soft); }
.included__eg { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font: 400 0.72rem/1.6 var(--mono); color: var(--ivy); }

/* Proof */
.proof { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
@media (max-width: 900px) { .proof { grid-template-columns: 1fr; } }
.proof__stats { display: grid; gap: 22px; margin: 40px 0 0; }
.proof__stats div { padding-top: 18px; border-top: 1px solid var(--line-dark); }
.proof__stats dt { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--sprout); }
.proof__stats dd { margin: 8px 0 0; color: var(--on-dark-soft); font-size: 0.98rem; }
.chart { margin: 0; padding: clamp(18px, 3vw, 28px); border-radius: 22px; background: var(--panel-dark); box-shadow: inset 0 0 0 1px var(--line-dark); }
.chart__title { font-weight: 700; font-size: 1rem; }
.chart__sub { margin-top: 4px; font: 400 0.7rem/1.5 var(--mono); color: var(--on-dark-soft); }
.chart__bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 14px); align-items: end; height: clamp(220px, 30vw, 300px); margin-top: 28px; padding-bottom: 2px; border-bottom: 1px solid var(--line-dark); }
.chart__bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart__fill { height: var(--h); min-height: 4px; border-radius: 8px 8px 2px 2px; background: var(--leaf); }
.chart__bar--muted .chart__fill { background: rgba(95, 179, 107, 0.45); }
.chart__bar--before .chart__fill { background: rgba(201, 232, 181, 0.35); }
.chart__value { margin-bottom: 8px; text-align: center; font: 500 clamp(0.52rem, 1.1vw, 0.68rem)/1.2 var(--mono); color: var(--on-dark); white-space: nowrap; }
.chart__labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 14px); margin-top: 10px; }
.chart__labels span { text-align: center; font: 400 clamp(0.52rem, 1.1vw, 0.66rem)/1.3 var(--mono); color: var(--on-dark-soft); }
.chart figcaption { margin-top: 18px; font: 400 0.68rem/1.6 var(--mono); color: var(--on-dark-soft); }

/* Early access */
.early { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .early { grid-template-columns: 1fr; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 500 0.8rem/1.9 var(--mono); color: var(--ivy); }
.steps strong { display: block; font-size: 1.08rem; color: var(--ivy-deep); }
.steps span { display: block; margin-top: 4px; color: var(--ink-soft); }
.steps--dark li { border-color: var(--line-dark); }
.steps--dark li::before { color: var(--sprout); }
.steps--dark strong { color: var(--on-dark); }
.steps--dark span { color: var(--on-dark-soft); }

/* Pricing */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.plan { padding: clamp(28px, 4vw, 44px); border-radius: 26px; background: var(--ivy-deep); color: var(--on-dark); }
.plan__name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.plan__name img { width: 26px; height: 26px; }
.plan__price { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.plan__price strong { font-size: clamp(3.6rem, 7vw, 5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.plan__price span { font: 400 0.82rem/1 var(--mono); color: var(--on-dark-soft); }
.plan__terms { margin-top: 10px; color: var(--on-dark-soft); }
.plan ul { margin: 28px 0 32px; padding: 0; list-style: none; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.plan li svg { width: 20px; height: 20px; margin-top: 3px; color: var(--leaf); }
.plan .btn { width: 100%; }

/* FAQ */
.faq { max-width: 52rem; margin-top: clamp(32px, 5vw, 56px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em; color: var(--ivy-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ivy); border-bottom: 2px solid var(--ivy); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 24px; max-width: 44rem; color: var(--ink-soft); }

/* Closing band + footer */
.closer { background: var(--ivy-deep); color: var(--on-dark); padding: clamp(64px, 9vw, 112px) 0; }
.closer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.closer h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.closer h2 span { color: var(--sprout); }
.site-footer { background: var(--ink); color: var(--on-dark-soft); padding: 40px 0; font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer img { height: 24px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }

/* Signup */
.signup { padding: clamp(40px, 7vw, 88px) 0 var(--section); }
.signup .wrap {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas: 'intro form' 'summary form'; grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 96px); row-gap: 32px; align-items: start;
}
.signup__intro { grid-area: intro; }
.signup .summary { grid-area: summary; margin-top: 0; }
.signup .form { grid-area: form; }
@media (max-width: 900px) { .signup .wrap { grid-template-columns: 1fr; grid-template-areas: 'intro' 'form' 'summary'; grid-template-rows: auto; } }
.signup h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); color: var(--ivy-deep); }
.signup__lead { margin-top: 18px; font-size: 1.15rem; color: var(--ink-soft); }
.summary { margin-top: 32px; padding: 26px; border-radius: var(--radius); background: var(--ivy-deep); color: var(--on-dark); }
.summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.summary__row strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; }
.summary__row span { font: 400 0.74rem/1.4 var(--mono); color: var(--on-dark-soft); }
.summary .steps { margin-top: 18px; }
.summary .steps li { padding: 14px 0; }
.form { padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(14, 26, 18, 0.35); }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-weight: 700; font-size: 0.95rem; color: var(--ivy-deep); }
.field label small { font-weight: 500; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 0; border-radius: 12px;
  background: #fff; box-shadow: inset 0 0 0 1.5px rgba(14, 26, 18, 0.18);
  font: 400 1rem/1.4 var(--display); color: var(--ink);
  transition: box-shadow 0.15s;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7a857c; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ivy), 0 0 0 4px rgba(201, 232, 181, 0.8); }
.field input[aria-invalid='true'] { box-shadow: inset 0 0 0 2px #b3261e; }
.field__error { font-size: 0.88rem; color: #b3261e; }
.field__error:empty { display: none; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; margin-top: 4px; }
.form__fine { margin-top: 14px; font-size: 0.86rem; color: var(--ink-soft); text-align: center; }
.notice { margin-bottom: 22px; padding: 14px 16px; border-radius: 12px; background: rgba(201, 232, 181, 0.55); color: var(--ivy-deep); font-size: 0.95rem; }
.notice--error { background: #fbe7e5; color: #8c1d18; }
.notice:empty { display: none; }

/* Welcome + simple pages */
.page { padding: clamp(48px, 8vw, 104px) 0 var(--section); }
.page .wrap { max-width: 820px; }
.page h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--ivy-deep); }
.page__lead { margin-top: 18px; font-size: 1.2rem; color: var(--ink-soft); }
.page .steps { margin-top: 40px; }
.prose h2 { margin-top: 40px; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ivy-deep); }
.prose p, .prose ul { margin-top: 14px; color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .updated { margin-top: 12px; font: 400 0.74rem/1.5 var(--mono); color: var(--ink-soft); }

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