/* ==========================================================================
   Concept D — Plan. Estimate. Manage. Forecast.
   Consolidated direction: brand-forward hero, then four scrolling stages
   that follow one example project (always orange) from user-drawn scope to
   capacity planning.

   Motion model
   - Native scrolling only: no scroll-jacking, no JavaScript.
   - Scroll-linked effects use CSS scroll-driven animations and are applied
     only when the browser supports them AND the visitor has not asked for
     reduced motion. Otherwise every element is simply shown in its final
     state, so nothing depends on animation to be readable.
   - Beat-by-beat reveals inside the sticky illustrations are desktop-only
     (>= 960px), where the illustration stays in view beside the text.
   ========================================================================== */

.concept-d {
  --d-header-h: 4.25rem;
  background: var(--spp-offwhite);
}

/* Sticky header (4.25rem bar + 3px progress strip + border) plus breathing room.
   Literal value: --d-header-h lives on <body>, so <html> cannot read it. */
html:has(.concept-d) {
  scroll-padding-top: 5.5rem;
}

.d-h2 {
  font-size: var(--text-2xl);
  line-height: 1.15;
}

/* Example-project key: orange with a navy edge so it reads on light and dark */
.d-key {
  display: inline-block;
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 3px;
  background: var(--spp-orange);
  box-shadow: 0 0 0 2px var(--spp-navy);
  vertical-align: -0.1em;
}

.theme-dark .d-key {
  box-shadow: 0 0 0 2px var(--spp-offwhite);
}

/* ---- Header ------------------------------------------------------------ */
.d-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(7 31 44 / 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--spp-navy-700);
}

.d-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--d-header-h);
}

.d-lockup {
  font-size: 1.1875rem;
}

.d-lockup .lockup__mark {
  width: 2.625rem;
}

.d-stagenav {
  margin-left: auto;
}

.d-stagenav ol {
  display: flex;
  gap: var(--space-1);
  margin: 0;
}

.d-stagenav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill);
  color: var(--spp-slate-300);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.d-stagenav__link:hover {
  color: var(--spp-offwhite);
  background: var(--spp-navy-800);
}

.d-stagenav__n {
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  color: var(--spp-teal-300);
}

.d-header__status {
  border-color: #2b6280;
}

/* Four-segment progress strip along the bottom of the header */
.d-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  height: 3px;
}

.d-progress__seg {
  position: relative;
  background: var(--spp-navy-700);
  overflow: hidden;
}

@media (max-width: 1060px) {
  .d-stagenav {
    display: none;
  }

  .d-header__status {
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  .d-header__status {
    display: none; /* the hero and closing section carry the status */
  }
}

/* ---- Hero -------------------------------------------------------------- */
.d-hero {
  position: relative;
  background: var(--spp-navy);
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(4rem, 2.5rem + 6vw, 7.5rem);
  isolation: isolate;
  overflow: clip;
}

/* Faint survey grid with a teal glow behind the mark */
.d-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 40% 34% at 50% 26%, rgb(15 122 122 / 0.32), transparent 70%),
    linear-gradient(rgb(29 77 102 / 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgb(29 77 102 / 0.55) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  background-position: center, center top, center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 35%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 80% at 50% 35%, #000 35%, transparent 80%);
}

.d-hero__inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-5);
}

.d-hero__mark {
  width: clamp(9.5rem, 5rem + 15vw, 18.5rem);
  height: auto;
  overflow: visible;
  margin-bottom: var(--space-3);
}

.d-hero__name {
  font-size: clamp(2.75rem, 1rem + 7.4vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: var(--weight-bold);
  color: var(--spp-offwhite);
}

.d-hero__pro {
  font-weight: var(--weight-semibold);
  color: var(--spp-teal-300);
}

.d-hero__tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  font-size: clamp(1.375rem, 0.95rem + 1.9vw, 2.375rem);
  color: var(--spp-offwhite);
  margin-top: var(--space-2);
}

.d-hero__tagline span {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  white-space: nowrap;
}

.d-hero__tagline span + span::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border: 2px solid var(--spp-teal-300);
  transform: scaleY(0.6) rotate(45deg);
}

.d-hero__lede {
  max-width: 40rem;
  font-size: var(--text-lg);
  color: var(--spp-slate-300);
  margin-top: var(--space-2);
}

.d-hero__lede strong {
  color: var(--spp-offwhite);
  font-weight: var(--weight-semibold);
}

.d-hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-4);
}

.d-hero__meta .status-pill {
  border-color: #2b6280;
}

.d-hero__cue {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  font-weight: var(--weight-semibold);
  color: var(--spp-teal-300);
}

.d-hero__cue::after {
  content: "↓";
}

@media (max-width: 520px) {
  .d-hero__tagline span + span::before {
    display: none;
  }

  .d-hero__tagline {
    column-gap: 0.6rem;
  }
}

/* ---- Overview ---------------------------------------------------------- */
.d-overview {
  padding-block: var(--section-pad) calc(var(--section-pad) * 0.6);
}

.d-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--space-5) var(--space-8);
  align-items: start;
}

.d-overview .eyebrow {
  margin-bottom: var(--space-4);
}

.d-overview__body {
  display: grid;
  gap: var(--space-4);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.d-overview__key {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--spp-white);
  border: 1px solid var(--color-line);
  font-size: var(--text-sm);
  color: var(--color-text);
}

@media (max-width: 860px) {
  .d-overview__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Stage layout ------------------------------------------------------ */
.d-stage {
  position: relative;
  padding-block: var(--section-pad);
}

.d-stage.theme-dark {
  background: var(--spp-navy);
  /* irregular top edge, like a drawn limit meeting the page */
  clip-path: polygon(0 2.25rem, 22% 0.5rem, 63% 1.75rem, 100% 0, 100% 100%, 0 100%);
  padding-top: calc(var(--section-pad) * 0.6 + 2.25rem);
}

.d-stage--manage {
  padding-top: calc(var(--section-pad) * 0.6);
}

.d-stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5.5rem);
  align-items: start;
}

.d-stage--flip .d-stage__grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.d-stage--flip .d-stage__visual {
  order: -1;
}

.d-stage__visual {
  position: sticky;
  top: calc(var(--d-header-h) + 2.5rem);
  margin: 0;
}

.d-stage__n {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  color: var(--color-text-muted);
}

.d-stage__n span {
  color: var(--color-accent-text);
}

.d-stage__title {
  margin-top: var(--space-3);
}

.d-stage__word {
  display: block;
  font-size: clamp(3rem, 1.6rem + 5.6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.d-stage__lead {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.d-stage__intro {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 34rem;
}

/* Beats: the steps within a stage */
.d-beats {
  margin: var(--space-7) 0 0;
  counter-reset: beat;
}

.d-beat {
  position: relative;
  padding: var(--space-5) 0 var(--space-5) 3.5rem;
  border-top: 1px solid var(--color-line);
}

.d-beat::before {
  counter-increment: beat;
  content: counter(beat);
  position: absolute;
  left: 0;
  top: var(--space-5);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent-text);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 0.875rem;
  color: var(--color-accent-text);
}

.d-beat h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
}

.d-beat p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

.d-cap {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Hand-off between stages */
.d-handoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
}

.d-handoff__line {
  position: relative;
  width: 2px;
  height: 3.5rem;
  background: repeating-linear-gradient(var(--color-accent-text) 0 4px, transparent 4px 9px);
}

.d-handoff__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.75rem;
  height: 0.75rem;
  margin: -0.375rem 0 0 -0.375rem;
  border-radius: 3px;
  background: var(--spp-orange);
  box-shadow: 0 0 0 2px var(--spp-navy);
}

.theme-dark .d-handoff__dot {
  box-shadow: 0 0 0 2px var(--spp-offwhite);
}

/* Desktop: give each beat scroll room while the illustration stays pinned */
@media (min-width: 960px) {
  .d-beat {
    min-height: 34vh;
  }

  .d-beat:last-child {
    min-height: 44vh;
  }
}

/* Tablet and phone: heading, then illustration, then beats; nothing pinned */
@media (max-width: 959px) {
  .d-stage__grid,
  .d-stage--flip .d-stage__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .d-stage__text {
    display: contents;
  }

  .d-stage__head {
    order: 1;
  }

  .d-stage__visual,
  .d-stage--flip .d-stage__visual {
    order: 2;
    position: relative;
    top: auto;
  }

  .d-beats {
    order: 3;
    margin-top: 0;
  }
}

/* ---- Plan: reference map with user-drawn limits ------------------------ */
.d-plan__map {
  position: relative;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.d-map {
  width: 100%;
  height: auto;
}

.d-map__grid {
  fill: none;
  stroke: #d9e2e7;
  stroke-width: 1;
}

.d-map__woods-base {
  fill: rgb(15 122 122 / 0.08);
}

.d-map__creek {
  fill: none;
  stroke: #86c8c4;
  stroke-width: 5;
  stroke-linecap: round;
}

.d-map__road-casing {
  fill: none;
  stroke: #c4cfd6;
  stroke-width: 20;
}

.d-map__road {
  fill: none;
  stroke: var(--spp-white);
  stroke-width: 15;
}

.d-map__bldg rect {
  fill: #cfd8de;
  stroke: #b3c0c9;
  stroke-width: 1;
}

.d-map__north circle {
  fill: var(--spp-offwhite);
  stroke: var(--spp-gray-300);
}

.d-map__north path {
  fill: var(--spp-navy);
}

.d-map__frame {
  fill: none;
  stroke: var(--spp-gray-300);
}

.d-map__excl {
  stroke: var(--spp-navy);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.d-map__limits-fill {
  fill: var(--spp-orange);
  fill-opacity: 0.16;
}

/* Navy casing under the orange line keeps the drawn limit above 3:1 on the map */
.d-map__limits-casing {
  fill: none;
  stroke: var(--spp-navy);
  stroke-width: 5.5;
  stroke-linejoin: round;
}

.d-map__limits-line {
  fill: none;
  stroke: var(--spp-orange);
  stroke-width: 2.75;
  stroke-linejoin: round;
}

/* Square edit handles: this geometry is drawn and adjusted by the user */
.d-map__handles rect {
  fill: var(--spp-white);
  stroke: var(--spp-navy);
  stroke-width: 1.75;
}

.d-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--spp-gray-300);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.95);
  box-shadow: var(--shadow-sm);
  color: var(--spp-navy);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
}

.d-tag--map {
  left: 2.5%;
  top: 4%;
  color: var(--spp-slate-600);
  font-weight: var(--weight-medium);
}

.d-tag--limits {
  left: 20%;
  top: 13%;
}

.d-tag--area {
  left: 42%;
  top: 47%;
  transform: translateX(-50%);
}

.d-tag--excl {
  left: 63%;
  top: 36%;
}

.d-tag__sw {
  width: 0.875rem;
  height: 0.625rem;
  border-radius: 2px;
}

.d-tag__sw--limits {
  background: rgb(245 124 0 / 0.25);
  border: 2px solid var(--spp-orange);
  box-shadow: 0 0 0 1px var(--spp-navy);
}

.d-tag__sw--excl {
  border: 1px dashed var(--spp-navy);
  background: repeating-linear-gradient(45deg, rgb(11 45 63 / 0.6) 0 1px, transparent 1px 4px);
}

.d-notes {
  position: relative;
  z-index: 2;
  width: min(23rem, 74%);
  margin: -3.25rem 0 0 auto;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--spp-gray-300);
  border-radius: var(--radius-md);
  background: var(--spp-white);
  box-shadow: var(--shadow-md);
}

.d-notes__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
}

.d-notes__title span {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--spp-gray);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.d-notes__rows {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.4;
}

.d-notes__rows div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-line);
}

.d-notes__rows dt {
  color: var(--spp-slate-600);
  font-weight: var(--weight-semibold);
}

.d-notes__rows dd {
  color: var(--spp-navy);
}

@media (max-width: 959px) {
  .d-notes {
    width: auto;
    margin: var(--space-4) 0 0;
  }
}

@media (max-width: 520px) {
  .d-tag {
    font-size: 0.625rem;
    padding: 0.1875rem 0.375rem;
  }

  .d-tag--limits {
    left: 4%;
    top: 14%;
  }

  .d-tag--excl {
    left: auto;
    right: 3%;
    top: 30%;
  }

  .d-notes__rows div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
  }
}

/* ---- Estimate: structure built from the scope -------------------------- */
.d-est {
  display: grid;
}

.d-est__kicker {
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--spp-teal-300);
}

.d-est__scope {
  padding: var(--space-4) var(--space-5);
  border: 1px solid #2b6280;
  border-left: 5px solid var(--spp-orange);
  border-radius: var(--radius-md);
  background: var(--spp-navy-800);
}

.d-est__scope-name {
  margin-top: var(--space-1);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  color: var(--spp-offwhite);
}

.d-est__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--spp-slate-300);
}

.d-est__groups {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding-block: 1.75rem;
}

/* Connectors: scope → groups → estimate */
.d-est__groups::before,
.d-est__groups::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 1.75rem;
  border-left: 1.5px dashed var(--spp-teal-300);
}

.d-est__groups::before {
  top: 0;
}

.d-est__groups::after {
  bottom: 0;
}

.d-est__group {
  padding: var(--space-4);
  border: 1px solid var(--spp-navy-700);
  border-radius: var(--radius-md);
  background: var(--spp-navy-950);
}

.d-est__label {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--spp-offwhite);
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
}

.d-chips li {
  padding: 0.1875rem 0.625rem;
  border: 1px solid #2b6280;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--spp-slate-300);
}

.d-est__result {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  border: 1.5px dashed var(--spp-teal-300);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--spp-offwhite);
  font-size: var(--text-sm);
}

@media (max-width: 440px) {
  .d-est__groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Manage: workflow board -------------------------------------------- */
.d-board {
  --d-board-gap: 0.625rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--d-board-gap);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--spp-gray);
  box-shadow: var(--shadow-md);
}

.d-board__col {
  display: grid;
  align-content: start;
  gap: var(--d-board-gap);
}

.d-board__head {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--spp-gray-300);
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spp-slate-600);
}

.d-card {
  display: grid;
  align-content: center;
  gap: 0.375rem;
  min-height: 3.75rem;
  padding: 0.625rem;
  border: 1px solid var(--spp-gray-300);
  border-radius: var(--radius-md);
  background: var(--spp-white);
}

/* Generic placeholder lines: deliberately schematic, not fake data */
.d-card span {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #d5dde3;
}

.d-card span:first-child {
  width: 82%;
}

.d-card span:last-child {
  width: 52%;
}

.d-card--example {
  position: relative;
  z-index: 2;
  border: 2px solid var(--spp-navy);
  border-left: 6px solid var(--spp-orange);
  box-shadow: var(--shadow-md);
}

.d-card__name {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  line-height: 1.2;
  color: var(--spp-navy);
}

.d-card__meta {
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--spp-slate-600);
}

.d-record {
  display: grid;
  gap: var(--space-3);
  width: min(24rem, 84%);
  margin: calc(-1 * var(--space-5)) var(--space-5) 0 auto;
  position: relative;
  z-index: 3;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--spp-gray-300);
  border-radius: var(--radius-md);
  background: var(--spp-white);
  box-shadow: var(--shadow-lg);
}

.d-record__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
}

.d-record__items,
.d-record__team {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
}

.d-record__items li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  border: 1px solid var(--spp-gray-300);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--spp-navy);
}

.d-record__items li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--spp-teal);
}

.d-record__team li {
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-pill);
  background: var(--spp-navy);
  color: var(--spp-offwhite);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

@media (max-width: 600px) {
  .d-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--space-3);
  }

  .d-record {
    width: auto;
    margin: var(--space-3) 0 0;
  }
}

/* ---- Forecast: workload vs capacity ------------------------------------ */
.d-fc {
  display: grid;
}

.d-fc__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-4);
  font-size: var(--text-xs);
  color: var(--spp-slate-300);
}

.d-fc__legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.d-fc__sw {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 2px;
}

.d-fc__sw--c {
  background: var(--spp-teal-300);
}

.d-fc__sw--p {
  border: 1px solid var(--spp-teal-300);
  background: repeating-linear-gradient(45deg, var(--spp-teal-300) 0 2px, transparent 2px 5px);
}

.d-fc__sw--e {
  background: var(--spp-orange);
}

.d-fc__sw--cap {
  height: 0;
  width: 1.25rem;
  border-radius: 0;
  border-top: 2px dashed var(--spp-offwhite);
}

.d-fc__chart {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--spp-navy-700);
  border-radius: var(--radius-lg);
  background: var(--spp-navy-950);
}

.d-fc__lane-name {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spp-offwhite);
}

.d-fc__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.d-fc__base {
  fill: none;
  stroke: #2b6280;
  stroke-width: 1;
}

.d-fc__c rect {
  fill: var(--spp-teal-300);
}

.d-fc__e rect {
  fill: var(--spp-orange);
}

.d-fc__p rect {
  stroke: var(--spp-teal-300);
  stroke-width: 1;
}

.d-fc__cap {
  fill: none;
  stroke: var(--spp-offwhite);
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.d-fc__flag {
  fill: none;
  stroke: var(--spp-offwhite);
  stroke-width: 2;
}

.d-fc__weeks {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: calc(-1 * var(--space-2)) 0 0;
  font-size: 0.6875rem;
  text-align: center;
  color: var(--spp-slate-300);
}

.d-fc__notes {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
  color: var(--spp-slate-300);
}

.d-fc__notes li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.d-fc__ring {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  border: 2px solid var(--spp-offwhite);
}

@media (max-width: 440px) {
  .d-fc__chart {
    padding: var(--space-3);
  }

  .d-fc__weeks {
    font-size: 0.5625rem;
  }
}

/* ---- Conclusion -------------------------------------------------------- */
.d-close {
  padding-block: var(--section-pad);
}

.d-close__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  text-align: center;
}

.d-close__inner .status-pill {
  background: var(--spp-white);
}

.d-close__inner > p:not(.status-pill) {
  max-width: 42rem;
  color: var(--color-text-muted);
}

.d-close__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
}

.d-close__steps a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-5);
  border: 1px solid var(--spp-gray-300);
  border-radius: var(--radius-pill);
  background: var(--spp-white);
  color: var(--spp-navy);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.d-close__steps a:hover {
  border-color: var(--spp-teal);
  color: var(--spp-navy);
}

.d-close__steps span {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--spp-teal);
}

/* ---- Footer ------------------------------------------------------------ */
.d-footer {
  background: var(--spp-navy);
  padding-block: var(--space-7);
}

.d-footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-5) var(--space-8);
  align-items: center;
}

.d-footer__brand {
  display: grid;
  gap: var(--space-3);
}

.d-footer__tagline {
  font-size: var(--text-sm);
  color: var(--spp-slate-300);
}

.d-footer__note {
  justify-self: end;
  max-width: 32rem;
  text-align: right;
}

@media (max-width: 760px) {
  .d-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .d-footer__note {
    justify-self: start;
    text-align: left;
  }
}

/* ==========================================================================
   Motion (progressive enhancement)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* Brand mark layers settle into place on load (time-based, plays once) */
  .d-hm__layer {
    animation: d-settle 1100ms var(--ease-out) both;
  }

  .d-hm__layer--1 {
    --d-from: 7px;
  }

  .d-hm__layer--2 {
    --d-from: 0px;
    animation-name: d-fade;
    animation-duration: 700ms;
  }

  .d-hm__layer--3 {
    --d-from: -7px;
  }
}

@keyframes d-settle {
  from {
    translate: 0 var(--d-from);
    opacity: 0.3;
  }
}

@keyframes d-fade {
  from {
    opacity: 0;
  }
}

/* Scroll-linked effects that only need an anonymous view() timeline */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .d-stage__visual {
      animation: d-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }

    .d-handoff__dot {
      animation: d-travel linear both;
      animation-timeline: view();
      animation-range: cover 25% cover 65%;
    }
  }
}

@keyframes d-rise {
  from {
    opacity: 0;
    translate: 0 2.5rem;
  }
}

@keyframes d-travel {
  from {
    translate: 0 -1.5rem;
    opacity: 0.2;
  }

  to {
    translate: 0 1.5rem;
  }
}

/* Named timelines: header progress, active stage, and beat-by-beat reveals */
@supports (timeline-scope: none) and (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .concept-d {
      timeline-scope: --d-plan, --d-estimate, --d-manage, --d-forecast;
    }

    .d-stage--plan { view-timeline-name: --d-plan; timeline-scope: --d-p1, --d-p2, --d-p3, --d-p4; }
    .d-stage--estimate { view-timeline-name: --d-estimate; timeline-scope: --d-e1, --d-e2, --d-e3, --d-e4; }
    .d-stage--manage { view-timeline-name: --d-manage; timeline-scope: --d-m1, --d-m2, --d-m3, --d-m4; }
    .d-stage--forecast { view-timeline-name: --d-forecast; timeline-scope: --d-f1, --d-f2, --d-f3, --d-f4; }

    .d-beat--p1 { view-timeline-name: --d-p1; }
    .d-beat--p2 { view-timeline-name: --d-p2; }
    .d-beat--p3 { view-timeline-name: --d-p3; }
    .d-beat--p4 { view-timeline-name: --d-p4; }
    .d-beat--e1 { view-timeline-name: --d-e1; }
    .d-beat--e2 { view-timeline-name: --d-e2; }
    .d-beat--e3 { view-timeline-name: --d-e3; }
    .d-beat--e4 { view-timeline-name: --d-e4; }
    .d-beat--m1 { view-timeline-name: --d-m1; }
    .d-beat--m2 { view-timeline-name: --d-m2; }
    .d-beat--m3 { view-timeline-name: --d-m3; }
    .d-beat--m4 { view-timeline-name: --d-m4; }
    .d-beat--f1 { view-timeline-name: --d-f1; }
    .d-beat--f2 { view-timeline-name: --d-f2; }
    .d-beat--f3 { view-timeline-name: --d-f3; }
    .d-beat--f4 { view-timeline-name: --d-f4; }

    /* Header progress: each segment fills while its stage crosses mid-screen */
    .d-progress__seg::after {
      content: "";
      position: absolute;
      inset: 0;
      background: var(--spp-teal-300);
      transform-origin: left center;
      animation: d-fill linear both;
      animation-range: cover 50vh cover calc(100% - 50vh);
    }

    .d-progress__seg--plan::after { animation-timeline: --d-plan; }
    .d-progress__seg--estimate::after { animation-timeline: --d-estimate; }
    .d-progress__seg--manage::after { animation-timeline: --d-manage; }
    .d-progress__seg--forecast::after { animation-timeline: --d-forecast; }

    /* Active stage link: styled only while its stage is under mid-screen */
    .d-stagenav__link {
      animation: d-on linear;
      animation-fill-mode: none;
      animation-range: cover 50vh cover calc(100% - 50vh);
    }

    .d-stagenav__link--plan { animation-timeline: --d-plan; }
    .d-stagenav__link--estimate { animation-timeline: --d-estimate; }
    .d-stagenav__link--manage { animation-timeline: --d-manage; }
    .d-stagenav__link--forecast { animation-timeline: --d-forecast; }
  }

  /* Beat-by-beat reveals: desktop only, where the illustration is pinned */
  @media (prefers-reduced-motion: no-preference) and (min-width: 960px) {
    .d-beat::before {
      animation: d-beat-on linear;
      animation-fill-mode: none;
      animation-range: cover 40vh cover calc(100% - 40vh);
    }

    .d-beat--p1::before { animation-timeline: --d-p1; }
    .d-beat--p2::before { animation-timeline: --d-p2; }
    .d-beat--p3::before { animation-timeline: --d-p3; }
    .d-beat--p4::before { animation-timeline: --d-p4; }
    .d-beat--e1::before { animation-timeline: --d-e1; }
    .d-beat--e2::before { animation-timeline: --d-e2; }
    .d-beat--e3::before { animation-timeline: --d-e3; }
    .d-beat--e4::before { animation-timeline: --d-e4; }
    .d-beat--m1::before { animation-timeline: --d-m1; }
    .d-beat--m2::before { animation-timeline: --d-m2; }
    .d-beat--m3::before { animation-timeline: --d-m3; }
    .d-beat--m4::before { animation-timeline: --d-m4; }
    .d-beat--f1::before { animation-timeline: --d-f1; }
    .d-beat--f2::before { animation-timeline: --d-f2; }
    .d-beat--f3::before { animation-timeline: --d-f3; }
    .d-beat--f4::before { animation-timeline: --d-f4; }

    .d-rv,
    .d-draw,
    .d-rv-grow rect {
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-range: cover 18vh cover 42vh;
    }

    .d-rv { animation-name: d-reveal; }

    .d-draw {
      stroke-dasharray: 1;
      animation-name: d-draw;
    }

    .d-rv-grow rect {
      transform-box: fill-box;
      transform-origin: 50% 100%;
      animation-name: d-grow;
    }

    .d-rv--p2, .d-draw--p2 { animation-timeline: --d-p2; }
    .d-rv--p3 { animation-timeline: --d-p3; }
    .d-rv--p4 { animation-timeline: --d-p4; }
    .d-rv--e1 { animation-timeline: --d-e1; }
    .d-rv--e2 { animation-timeline: --d-e2; }
    .d-rv--e3 { animation-timeline: --d-e3; }
    .d-rv--e4 { animation-timeline: --d-e4; }
    .d-rv--m1 { animation-timeline: --d-m1; }
    .d-rv--m2 { animation-timeline: --d-m2; }
    .d-rv--m4 { animation-timeline: --d-m4; }
    .d-rv--f2 { animation-timeline: --d-f2; }
    .d-rv--f3 { animation-timeline: --d-f3; }
    .d-rv--f4 { animation-timeline: --d-f4; }
    .d-rv-grow--f1 rect { animation-timeline: --d-f1; }
    .d-rv-grow--f4 rect { animation-timeline: --d-f4; }

    /* The example project moves from Estimating to Scheduled */
    .d-card--example {
      animation: d-move linear both;
      animation-timeline: --d-m3;
      animation-range: cover 18vh cover 42vh;
    }
  }
}

@keyframes d-fill {
  from {
    transform: scaleX(0);
  }
}

@keyframes d-on {
  from,
  to {
    color: var(--spp-offwhite);
    background: var(--spp-navy-800);
  }
}

@keyframes d-beat-on {
  from,
  to {
    background: var(--color-accent-text);
    color: var(--color-bg);
  }
}

@keyframes d-reveal {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}

@keyframes d-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes d-grow {
  from {
    transform: scaleY(0);
  }
}

@keyframes d-move {
  to {
    translate: calc(200% + 2 * var(--d-board-gap)) 0;
  }
}

/* Windows High Contrast: keep drawn geometry and keys visible */
@media (forced-colors: active) {
  .d-key,
  .d-handoff__dot {
    forced-color-adjust: none;
  }
}
