/* ==========================================================================
   GREENLEAF EDUCATION — edu.css
   Components that exist only on this landing and the document pages.
   Every value comes from the tokens in main.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.edu-eyebrow {
  max-width: none;
}
.chat--edu {
  width: 100%;
}

/* --------------------------------------------------------------------------
   STAT CARDS — the squeeze
   -------------------------------------------------------------------------- */
.statgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}
.statgrid .metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}
/* The source line always sits on the card's floor. */
.statgrid .metric__src {
  margin-top: auto;
  padding-top: var(--space-4);
}
/* Plain-language headline first, the explanation underneath. */
.metric__head {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 20px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-hi);
}
.metric__head + .metric__label {
  margin-top: var(--space-3);
}

/* --------------------------------------------------------------------------
   SOURCE MAP — whose voice is it (sits on the forest block)
   -------------------------------------------------------------------------- */
.srcmap {
  display: grid;
}
.srcmap__nodes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
}
.srcmap__nodes li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--bone);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
}
.srcmap__nodes li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex: 0 0 auto;
}
.srcmap__lines {
  display: block;
  width: 100%;
  height: clamp(44px, 6vw, 88px);
}
.srcmap__lines line {
  stroke: rgba(245, 243, 239, 0.22);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.srcmap__answer {
  justify-self: center;
  background: var(--dark-card);
  border: 1px solid var(--sage);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-7);
  text-align: center;
  display: grid;
  gap: 6px;
}
.srcmap__pct {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--bone);
}

/* --------------------------------------------------------------------------
   TIMELINE — twelve months, drawn by the scroll
   -------------------------------------------------------------------------- */
.timeline__rail {
  position: relative;
  height: 4px;
  background: var(--muted);
  border-radius: var(--radius-pill);
  margin: var(--space-8) 0 var(--space-4);
  overflow: hidden;
}
.timeline__seg {
  position: absolute;
  top: 0;
  height: 4px;
}
/* Months 1–2 solid, months 3–12 as a dashed stroke. */
.timeline__seg--a {
  left: 0;
  width: 17%;
  background: var(--leaf);
}
.timeline__seg--b {
  left: 17%;
  right: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--sage) 0 10px,
    transparent 10px 18px
  );
}
/* The wipe that follows the scroll. Only ever covers the rail, never text. */
.timeline__veil {
  position: absolute;
  top: -4px;
  bottom: -4px;
  right: 0;
  left: 0;
  background: var(--muted);
  transform-origin: right center;
}
/* Each label sits where its month starts on the rail: (month − 1) / 12. */
.timeline__ticks {
  position: relative;
  height: 18px;
  margin-bottom: var(--space-8);
}
.timeline__ticks li {
  position: absolute;
  top: 0;
  white-space: nowrap;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-lo);
}
.timeline__ticks li:nth-child(1) {
  left: 0;
}
.timeline__ticks li:nth-child(2) {
  left: 16.667%;
}
.timeline__ticks li:nth-child(3) {
  left: 41.667%;
}
.timeline__ticks li:nth-child(4) {
  left: 66.667%;
}
.timeline__ticks li:nth-child(5) {
  left: 91.667%;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.tl-phase {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-7) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.tl-phase > .mono {
  color: var(--leaf-ink);
}
.tl-phase--b > .mono {
  color: var(--text-lo);
}
.tl-phase h3 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
}
.tl-phase > p:not(.mono) {
  font-size: 15px;
  line-height: var(--lh-relaxed);
  color: var(--text-lo);
}

/* --------------------------------------------------------------------------
   DASHBOARD MOCK — a product frame, clearly labelled as a demo
   -------------------------------------------------------------------------- */
.dash-mock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.dash-mock__chrome {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 12px 16px;
  background: var(--bone);
  border-bottom: 1px solid var(--border);
}
.dash-mock__dots {
  display: inline-flex;
  gap: 6px;
}
.dash-mock__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.dash-mock__url {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-lo);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  user-select: none;
}
.dash-mock__body {
  padding: clamp(20px, 2.6vw, 32px);
  display: grid;
  gap: var(--space-6);
}
.dash-mock__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
}
.dash-mock__score {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(46px, 5.6vw, 72px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text-hi);
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 6px 0;
}
/* The unit only — the counted number keeps the full display size. */
.dash-mock__score > span:not([data-count]) {
  font-size: 0.4em;
  color: var(--leaf-ink);
}
.dash-mock__score .dash-mock__delta {
  margin-left: 10px;
}
/* Positive change reads in sky, so it is never mistaken for the brand leaf. */
.dash-mock__delta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--sky-soft);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  align-self: center;
}
.donut {
  position: relative;
  width: 118px;
  height: 118px;
  flex: 0 0 auto;
}
.donut svg {
  transform: rotate(-90deg);
  display: block;
}
.donut__track {
  fill: none;
  stroke: var(--muted);
  stroke-width: 14;
}
.donut__arc {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 14;
  stroke-linecap: round;
}
.donut__val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--text-hi);
}
.engines {
  display: grid;
  gap: var(--space-3);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
}
/* A dot per engine, in greenleaf.studio's engine colours. */
.engines li > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.engines li > span:first-child::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--engine, var(--muted-fg));
}
.engines li:nth-child(1) {
  --engine: oklch(0.72 0.13 165);
}
.engines li:nth-child(2) {
  --engine: oklch(0.72 0.14 60);
}
.engines li:nth-child(3) {
  --engine: oklch(0.7 0.13 250);
}
.engines li:nth-child(4) {
  --engine: oklch(0.75 0.12 195);
}
.engines li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 42px;
  gap: var(--space-4);
  align-items: center;
  font-size: 13px;
  color: var(--text-mid);
}
.bar__track {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--muted);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: var(--v, 0%);
  border-radius: var(--radius-pill);
  background: var(--leaf);
}
.engines b {
  font-weight: 500;
  text-align: right;
  color: var(--text-hi);
}
.qlist {
  display: grid;
  border-top: 1px solid var(--border);
}
.qlist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mid);
}
.qlist b {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  background: var(--muted);
}
/* Semantic states from the palette: sky = cited, amber = omitted. */
.qlist b.is-win {
  background: var(--sky-soft);
}
.qlist b.is-gap {
  background: var(--amber-soft);
}

/* --------------------------------------------------------------------------
   DOCUMENT PAGES — privacy policy and anything else that is just prose
   -------------------------------------------------------------------------- */
.doc {
  padding: calc(var(--header-h) + var(--section-y-tight)) 0 var(--section-y);
}
.doc__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.doc h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  margin-bottom: var(--space-4);
}
.doc__date {
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--border);
}
.doc h2 {
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.3;
  margin: var(--space-8) 0 var(--space-4);
}
.doc p {
  font-size: 17px;
  line-height: var(--lh-relaxed);
  color: var(--text-mid);
}
.doc p + p {
  margin-top: var(--space-4);
}
.doc a:not(.link-mono) {
  color: var(--leaf-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc__back {
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.footer--min .footer__grid {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: var(--space-7);
}
@media (max-width: 700px) {
  .footer--min .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .statgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1080px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Where the last month's span is narrower than its label, the label ends
     at the rail's end instead of running past it. */
  .timeline__ticks li:nth-child(5) {
    left: auto;
    right: 0;
  }
}
@media (max-width: 760px) {
  .dash-mock__top {
    grid-template-columns: minmax(0, 1fr);
  }
  .srcmap__lines {
    display: none;
  }
  .srcmap__answer {
    justify-self: start;
    margin-top: var(--space-5);
  }
  .engines li {
    grid-template-columns: 100px minmax(0, 1fr) 38px;
  }
}
@media (max-width: 700px) {
  .statgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .statgrid .metric {
    padding: var(--space-5);
  }
  /* Source pills in a 2 x 2 grid. */
  .srcmap__nodes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .srcmap__nodes li {
    justify-content: center;
  }
  /* Only the first and last month labels. */
  .timeline__ticks li:nth-child(2),
  .timeline__ticks li:nth-child(3),
  .timeline__ticks li:nth-child(4) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline__veil {
    display: none;
  }
}
