/* ===== Page-specific styles ===== */

.hlw-hero {
  position: relative;
  padding: clamp(64px, 6vw, 88px) 0 var(--s-8);
  overflow: hidden;
}
.hlw-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 480px at 80% 20%, rgba(232,215,184,0.32), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hlw-hero .container { position: relative; z-index: 1; display: grid; gap: var(--s-5); }
@media (min-width: 980px) {
  .hlw-hero .container {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    align-items: start;
    gap: var(--s-7);
  }
  .hlw-hero .eyebrow,
  .hlw-hero h1,
  .hlw-hero .lede,
  .hlw-hero .support { grid-column: 1; }
  .hlw-hero-panel { grid-column: 2; grid-row: 1 / span 5; }
  .hlw-hero .loop { grid-column: 1 / -1; }
}
.hlw-hero h1 {
  max-width: min(100%, 17.5em);
  margin: 0;
  font-size: clamp(44px, 5vw, 74px);
  line-height: 1.03;
  letter-spacing: 0;
}
.hlw-hero .lede {
  font-family: var(--face-display);
  font-size: clamp(20px, 2.1vw, 23px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 74ch;
  margin: 0;
  text-wrap: pretty;
}
.hlw-hero .support {
  color: var(--ink-muted);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 76ch;
  margin: 0;
}
.hlw-hero-panel {
  align-self: center;
}
.hlw-hero-panel .flow-node { background: rgba(255,255,255,0.72); }

/* ===== Coaching Loop — primary diagram ===== */
.loop {
  margin: var(--s-8) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  justify-items: center;
  width: 100%;
}
.loop-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 88px 8px 116px;
}
.loop-diagram {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.loop-diagram > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.loop-step {
  position: absolute;
  width: 25%;
  max-width: 160px;
  display: grid;
  gap: 3px;
  font-family: var(--face-ui);
}
.loop-step .ls-num { font-family: var(--face-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--lucy-blue); }
.loop-step .ls-name { font-family: var(--face-display); font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.loop-step .ls-tag { font-family: var(--face-ui); font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }

/* Labels positioned outside the ring (radius 38%) so they never overlap nodes or the center caption.
   Origin point is the dot; transforms place the label on the appropriate radial side. */
.loop-step.s1 { left: 50%; top: -2%;  transform: translate(-50%, -100%); text-align: center; }
.loop-step.s2 { left: 100%; top: 38.24%; transform: translate(2%, -50%); text-align: left; }
.loop-step.s3 { left: 75%; top: 100%; transform: translate(-10%, 4%); text-align: left; }
.loop-step.s4 { left: 25%; top: 100%; transform: translate(-90%, 4%); text-align: right; }
.loop-step.s5 { left: 0%;  top: 38.24%; transform: translate(-102%, -50%); text-align: right; }

.loop-foot {
  max-width: 56ch;
  margin: 0 auto;
  text-align: center;
  display: grid; gap: var(--s-3);
}
.loop-foot p {
  font-family: var(--face-display);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
  text-wrap: pretty;
}
.loop-foot p strong { color: var(--ink); font-weight: 600; }

@media (max-width: 720px) {
  .loop-frame { padding: 0; }
  .loop-diagram {
    aspect-ratio: auto;
    max-width: none;
    display: grid;
    gap: var(--s-3);
  }
  .loop-diagram > svg {
    position: relative;
    aspect-ratio: 1 / 1;
    width: min(300px, 72vw);
    height: auto;
    justify-self: center;
    overflow: visible;
  }
  .loop-step {
    position: static;
    transform: none !important;
    width: 100%;
    max-width: none;
    text-align: left !important;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 2px var(--s-3);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--ink-faint);
  }
  .loop-step .ls-num { grid-row: 1 / span 2; }
  .loop-step .ls-name { font-size: 15px; }
  .loop-step .ls-tag { font-size: 11.5px; }
}

/* ===== Evolutionary Framework spine =====
   A progressive spine: numbered stages with mechanism, earned outcome, and
   failure mode if skipped. Horizontal on desktop with directional arrows
   between stages; vertical on mobile with a downward connector. Each stage
   carries load-bearing content, not just a label. */
.spine {
  margin-top: var(--s-7);
  display: grid;
  gap: var(--s-3);
  position: relative;
}
.spine-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  counter-reset: spinen;
  position: relative;
}
@media (min-width: 880px) {
  .spine-track {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--s-3);
    align-items: stretch;
  }
}
.spine-stage {
  position: relative;
  border: 1px solid var(--ink-faint);
  background: #fff;
  border-radius: var(--r-card);
  padding: var(--s-5);
  display: grid;
  gap: var(--s-3);
  align-content: start;
  counter-increment: spinen;
  box-shadow: 0 18px 38px -32px rgba(11, 15, 42, 0.22);
}
.spine-stage .stage-num {
  font-family: var(--face-mono);
  font-size: 13px;
  color: var(--lucy-blue);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.spine-stage .stage-num::before {
  content: counter(spinen, decimal-leading-zero);
}
.spine-stage h4 {
  font-family: var(--face-display);
  font-size: clamp(22px, 1.7vw, 26px);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}
.spine-stage .stage-earns {
  font-family: var(--face-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--lucy-blue);
}
.spine-stage .stage-mechanism {
  font-family: var(--face-display);
  font-size: clamp(14.5px, 0.98vw, 16px);
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0;
}
.spine-stage .stage-skip {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--ink-faint);
  font-family: var(--face-ui);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.spine-stage .stage-skip strong {
  color: var(--refuse);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  display: block;
  margin-bottom: 2px;
}
.spine-stage .stage-anchor {
  padding-top: var(--s-2);
  font-family: var(--face-ui);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.spine-stage .stage-anchor a {
  color: var(--lucy-blue);
  text-decoration: none;
  font-weight: 600;
}
.spine-stage .stage-anchor a:hover { text-decoration: underline; }

/* Directional connector between stages (down on mobile, right on desktop). */
.spine-stage::after {
  content: "↓";
  position: absolute;
  bottom: calc(-1 * var(--s-4));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--face-ui);
  font-size: 18px;
  color: var(--sand-deep);
  line-height: 1;
  z-index: 1;
}
.spine-stage:last-child::after { content: none; }

@media (min-width: 880px) {
  .spine-stage::after {
    content: "→";
    top: 50%;
    bottom: auto;
    left: auto;
    right: calc(-1 * var(--s-3));
    transform: translate(50%, -50%);
    font-size: 18px;
    background: var(--paper);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
}

/* ===== Stage detail blocks ===== */
.stage-band { padding: var(--s-9) 0; border-top: 1px solid var(--ink-faint); }
.stage-band .stage-head {
  display: grid; gap: var(--s-2);
  margin-bottom: var(--s-6);
  max-width: 64ch;
}
.stage-band .stage-num {
  font-family: var(--face-mono);
  font-size: 13px; letter-spacing: 0.06em; color: var(--lucy-blue);
}
.stage-band h2 { font-size: clamp(28px, 3.4vw, 40px); }
.stage-band .stage-claim {
  font-family: var(--face-display);
  font-size: clamp(20px, 2.1vw, 24px);
  line-height: 1.4;
  color: var(--ink);
  text-wrap: pretty;
  font-weight: 500;
  border-left: 2px solid var(--sand-deep);
  padding: 6px 0 6px var(--s-4);
  margin-top: var(--s-3);
}
.stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 880px) { .stage-grid { grid-template-columns: repeat(2, 1fr); } }

.stage-card {
  border: 1px solid var(--ink-faint);
  background: #fff;
  border-radius: var(--r-card);
  padding: var(--s-6);
  display: grid; gap: var(--s-3);
}
.stage-card h3 {
  font-family: var(--face-display);
  font-size: 22px;
  font-weight: 600;
}
.stage-card p {
  font-family: var(--face-display);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.stage-card .sc-foot {
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--ink-faint);
  font-family: var(--face-ui);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ===== Loop steps detail (5-step flow §5) ===== */
.lsd {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin-top: var(--s-2);
  counter-reset: lsdnum;
}
@media (min-width: 720px) { .lsd { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); } }
@media (min-width: 1100px) { .lsd { grid-template-columns: repeat(3, 1fr); } }
.lsd-step {
  border: 1px solid var(--ink-faint);
  background: #fff;
  border-radius: var(--r-card);
  padding: var(--s-5);
  display: grid; gap: var(--s-2); align-content: start;
  position: relative;
  counter-increment: lsdnum;
}
.lsd-step::before {
  content: counter(lsdnum, decimal-leading-zero);
  font-family: var(--face-mono);
  font-size: 12px; color: var(--lucy-blue); letter-spacing: 0.06em;
}
.lsd-step h4 {
  font-family: var(--face-display);
  font-size: 20px;
  font-weight: 600;
}
.lsd-step p {
  font-family: var(--face-ui);
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}
@media (min-width: 720px) {
  .lsd-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -10px; top: 26px;
    color: var(--sand-deep);
    font-size: 16px;
    z-index: 1;
    display: none;
  }
}

/* Capability archetype tier table */
.teach-map {
  margin-top: var(--s-7);
  display: grid;
  gap: var(--s-4);
}
.teach-map-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-4);
}
.teach-panel {
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.68);
  padding: clamp(22px, 2.4vw, 34px);
  box-shadow: 0 20px 50px -42px rgba(11,15,42,0.36);
}
.teach-panel.solution {
  border-color: rgba(53, 89, 242, 0.34);
  background: linear-gradient(135deg, rgba(53,89,242,0.96), rgba(39,66,202,0.94));
  color: #fff;
  box-shadow: 0 22px 58px -34px rgba(53,89,242,0.58);
}
.teach-label {
  font-family: var(--face-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.teach-panel.solution .teach-label {
  color: rgba(255,255,255,0.72);
}
.teach-panel h3 {
  margin: var(--s-2) 0 var(--s-3);
  font-family: var(--face-display);
  font-size: clamp(28px, 2.4vw, 40px);
  line-height: 1.05;
  color: var(--ink);
}
.teach-panel.solution h3 {
  color: #fff;
}
.teach-panel p {
  margin: 0;
  font-family: var(--face-display);
  font-size: 17px;
  line-height: 1.52;
  color: var(--ink-muted);
  text-wrap: pretty;
}
.teach-panel.solution p {
  color: rgba(255,255,255,0.82);
}
.teach-chip-grid {
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
.teach-chip-grid span,
.solution-step {
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.62);
  padding: 13px 15px;
  font-family: var(--face-ui);
  font-size: 14.5px;
  line-height: 1.25;
  color: var(--ink);
}
.solution-steps {
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}
.solution-step {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.solution-step h4 {
  margin: 0 0 6px;
  font-family: var(--face-ui);
  font-size: 16px;
  line-height: 1.15;
  color: #fff;
}
.solution-step p {
  font-family: var(--face-ui);
  font-size: 13.5px;
  line-height: 1.42;
  color: rgba(255,255,255,0.82);
}
.teach-tools {
  margin-top: var(--s-5) !important;
  font-family: var(--face-ui) !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
}
@media (max-width: 900px) {
  .teach-map-top,
  .solution-steps {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .teach-chip-grid {
    grid-template-columns: 1fr;
  }
}
.tier-tbl {
  margin-top: var(--s-5);
  display: grid; gap: 0;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.tier-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--ink-faint);
}
.tier-row:last-child { border-bottom: 0; }
.tier-row .tier-name {
  font-family: var(--face-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.tier-row .tier-desc {
  font-family: var(--face-display);
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.55;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .tier-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Alternatives table */
.alt-tbl {
  margin-top: var(--s-6);
  display: grid; gap: 0;
  border-top: 1px solid var(--ink-faint);
}
.alt-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--ink-faint);
  align-items: start;
}
.alt-row.head {
  font-family: var(--face-ui);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  padding: var(--s-3) 0;
}
.alt-row .alt-name {
  font-family: var(--face-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.alt-row .alt-good {
  font-family: var(--face-display);
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.alt-row .alt-add {
  font-family: var(--face-display);
  font-size: 17px;
  color: var(--ink);
  line-height: 1.5;
  border-left: 2px solid var(--lucy-blue);
  padding-left: var(--s-4);
}
@media (max-width: 880px) {
  .alt-row { grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-5) 0; }
  .alt-row.head { display: none; }
  .alt-row .alt-name::before {
    content: "Alternative · ";
    font-family: var(--face-ui); font-size: 11px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--lucy-blue);
    font-weight: 600;
    display: block; margin-bottom: 4px;
  }
  .alt-row .alt-good::before { content: "What it does well — "; font-family: var(--face-ui); font-size: 12px; color: var(--ink-soft); font-style: normal; }
  .alt-row .alt-add::before { content: "What Lucy adds — "; font-family: var(--face-ui); font-size: 12px; color: var(--lucy-blue); font-weight: 600; display: block; margin-bottom: 4px; }
  .alt-row .alt-add { padding-left: var(--s-4); }
}

/* Verticals */
.vert-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--s-3);
  margin-top: var(--s-6);
}
@media (min-width: 720px) { .vert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .vert-grid { grid-template-columns: repeat(3, 1fr); } }
.vert-card {
  border: 1px solid var(--ink-faint);
  background: #fff;
  border-radius: var(--r-card);
  padding: var(--s-5) var(--s-6);
  display: grid; gap: var(--s-2); align-content: start;
}
.vert-card .v-num {
  font-family: var(--face-mono); font-size: 11px;
  color: var(--ink-soft); letter-spacing: 0.06em;
}
.vert-card h4 {
  font-family: var(--face-display);
  font-size: 21px;
  font-weight: 600;
}
.vert-card p {
  font-family: var(--face-display);
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

/* SCC mini diagram for §3 */
.scc {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.scc-cell {
  border: 1px solid var(--ink-faint);
  background: #fff;
  border-radius: var(--r-md);
  padding: var(--s-4);
  display: grid; gap: 6px;
  font-family: var(--face-ui);
}
.scc-cell .scc-letter {
  font-family: var(--face-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--lucy-blue);
  line-height: 1;
}
.scc-cell .scc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.scc-cell .scc-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.scc-cell .scc-status {
  font-family: var(--face-ui); font-size: 11px;
  margin-top: 4px; color: var(--ok); font-weight: 600;
}
.scc-cell.refused .scc-letter { color: var(--refuse); }
.scc-cell.refused .scc-status { color: var(--refuse); }
@media (max-width: 720px) { .scc { grid-template-columns: 1fr; } }
