
.project-intro { border-bottom: 1px solid var(--line); }
.case-layout { display: grid; grid-template-columns: 13rem minmax(0,1fr); gap: clamp(1.5rem,5vw,5rem); }
.case-content { background: #fff; padding-inline: clamp(1rem, 3vw, 2.25rem); }
.case-index { position: sticky; top: 1.5rem; align-self: start; padding-top: 1.3rem; }
.case-index .eyebrow, .case-section .eyebrow { color: var(--accent); }
.case-index ol, .element-rail, .site-tree, .site-tree ul, .project-swatches { list-style: none; padding: 0; margin: 0; }
.case-index a { display: grid; grid-template-columns: .55rem 1.2rem 1fr; align-items: center; gap: .55rem; min-height: 3.3rem; text-decoration: none; }
.case-index a:hover { text-decoration: underline; text-underline-offset: .2em; }
.case-index a[aria-current] { color: var(--accent); font-weight: 750; }
.case-index .step { color: var(--soft); font-size: .72rem; }
.track { align-self: stretch; position: relative; background: #dbe1d8; overflow: hidden; }
.track::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--fill,0)); transform-origin: top; }
.case-index li:first-child .track { border-radius: 1rem 1rem 0 0; }
.case-index li:last-child .track { border-radius: 0 0 1rem 1rem; }
.case-section { scroll-margin-top: 1.5rem; padding-block: clamp(2rem,6vw,4rem); }
.case-section + .case-section { border-top: 1px solid var(--line); }
.case-section > .eyebrow { display: flex; align-items: center; gap: .6rem; color: var(--aubergine); }
.case-section > .eyebrow::before { content: ""; width: 1.35rem; height: .25rem; border-radius: 1rem; background: var(--glacier-mint); }
.case-section h2 { font: 500 clamp(2rem,5vw,3.4rem)/1.08 Georgia,serif; letter-spacing: -.035em; }
.case-section > p:not(.eyebrow) { max-width: 62ch; }
.brief-facts { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; background: #e8efe7; padding: 1rem; margin: 1.5rem 0 0; }
.brief-facts dt { font-weight: 700; }
.brief-facts dd { margin: .15rem 0 0; color: var(--soft); }
.case-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.rail-controls { display: flex; gap: .4rem; }
.rail-controls button { font: inherit; min-width: 2.6rem; min-height: 2.6rem; color: var(--accent); background: #fffdf7; border: 1px solid var(--accent); cursor: pointer; }
.rail-controls button:disabled { opacity: .45; cursor: default; }
.element-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(18rem,85%); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .35rem .35rem 1rem; scrollbar-color: var(--accent) #e8efe7; }
.element-rail li { min-height: 14rem; display: flex; flex-direction: column; align-items: start; scroll-snap-align: start; padding: 1rem; border: 1px solid var(--line); background: #fffdf7; }
.element-rail li:nth-child(odd) { background: #e8efe7; }
.element-rail h3 { font-size: 1.6rem; }
.element-rail p { margin: .25rem 0 .8rem; }
.element-rail a { margin-top: auto; color: var(--accent); text-underline-offset: .2em; }
.element-rail:focus-visible { outline: 3px solid #167b69; outline-offset: 3px; }
.site-tree a { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .7rem; background: #fffdf7; border: 1px solid var(--line); padding: .55rem .8rem; text-decoration: none; }
.site-tree a:hover { background: #e8efe7; text-decoration: underline; }
.site-tree small, .project-swatches small { color: var(--soft); }
.site-tree ul { padding-left: clamp(.5rem,2vw,1.2rem); margin-left: .5rem; border-left: 1px solid var(--line); }
.site-tree li + li, .site-tree ul { margin-top: .4rem; }
.project-swatches { display: grid; grid-template-columns: repeat(auto-fit,minmax(7.5rem,1fr)); gap: .65rem; margin-block: 1.4rem; }
.project-swatches li { padding: .45rem; border: 1px solid var(--line); background: #fffdf7; }
.project-swatches .swatch { display: block; height: 3.5rem; border: 1px solid var(--line); margin-bottom: .4rem; }
.project-swatches code, .project-swatches small { display: block; }
@media (max-width: 47rem) {
  .case-layout { display: block; }
  .case-index { top: 0; z-index: 1; padding: .35rem 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .case-index > p, .case-index .step { display: none; }
  .case-index ol { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .case-index a { grid-template-columns: 1fr; grid-template-rows: .24rem 1fr; gap: .3rem; min-height: 2.5rem; font-size: .76rem; text-align: center; padding-bottom: .2rem; }
  .track::after { transform: scaleX(var(--fill,0)); transform-origin: left; }
  .case-index li:first-child .track { border-radius: 1rem 0 0 1rem; }
  .case-index li:last-child .track { border-radius: 0 1rem 1rem 0; }
  .case-section { scroll-margin-top: 4rem; }
}


.palette-study { margin-block: 2rem; }
.palette-study > h3, .base-palette-heading { margin: 0; }
.palette-study > p { max-width: 62ch; }
.palette-options { display: grid; grid-template-columns: minmax(0, 19rem); }
.palette-option { display: flex; flex-direction: column; background: #fffdf7; border: 1px solid var(--line); }
.palette-example { background: var(--aubergine); color: #fffdf7; padding: 1rem; }
.palette-kicker { display: block; font-size: .72rem; font-weight: 650; }
.palette-kicker::before { content: ""; display: block; width: 1.6rem; height: 2px; margin-bottom: .65rem; background: var(--glacier-mint); }
.palette-example p { font: 500 clamp(1.35rem,3vw,1.9rem)/1.1 Georgia,serif; margin: 1rem 0 0; }
.palette-example-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid #fffdf74d; padding-top: .55rem; margin-top: 1rem; font-size: .82rem; }
.palette-arrow { color: var(--glacier-mint); font-size: 1rem; }


.view-design-decisions { margin-block:1.5rem; }
.view-design-decisions > div { padding:1rem 0;border-top:1px solid var(--line); }
.view-design-decisions dt { font-weight:700; }
.view-design-decisions dd { margin:.5rem 0 0;line-height:1.8; }
@media(max-width:47rem) { .case-index ol { grid-template-columns:repeat(5,minmax(0,1fr)); } }

.journey { margin: 1.75rem 0 0; padding: clamp(.85rem, 4vw, 2rem); background: #e8efe7; border-radius: 1rem; }
.journey figcaption { color: var(--soft); font-size: .85rem; margin-bottom: 1rem; }
.journey-steps { list-style: none; margin: 0; padding: 0; }
.journey-node { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(.65rem, 3vw, 1rem); padding: clamp(.75rem, 3vw, 1.25rem); background: #fff; border: 1px solid var(--line); border-radius: .75rem; }
.journey-number { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--aubergine); color: var(--glacier-mint); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.journey-node .eyebrow { margin: 0; }
.journey-node h3 { margin: .25rem 0; font-size: clamp(1.2rem, 3vw, 1.65rem); }
.journey-node p:last-child { margin: .4rem 0 0; }
.journey-connector { display: flex; align-items: center; gap: .6rem; padding-inline-start: calc(clamp(.75rem, 3vw, 1.25rem) + .625rem); color: var(--aubergine); font-size: .8rem; font-weight: 700; }
.journey-connector svg { display: block; flex: none; clip-path: inset(0 0 var(--arrow-hidden, 0%) 0); }
.journey-connector path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.journey-stage--before .journey-node { background: var(--paper); }
.journey-stage--before .journey-number { background: var(--soft); color: #fff; }
.journey-stage--pivot .journey-node { background: var(--aubergine); border-color: var(--aubergine); color: #fffdf7; }
.journey-stage--pivot .journey-number { background: var(--glacier-mint); color: var(--aubergine); }
.journey-stage--pivot .eyebrow { color: var(--glacier-mint); }
.journey-stage--after .journey-number { background: var(--accent); }
.journey-connector--report path { stroke-dasharray: 4 4; }
.implementation-notes { max-width: 62ch; }
.implementation-notes dt { font-weight: 700; }
.implementation-notes dd { margin: .4rem 0 0; }
.implementation-notes dd + dt { margin-top: 1rem; }
.capture-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.capture-results > div { background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; }
.capture-results > div:last-child { background: var(--aubergine); color: #fffdf7; }
.capture-results > div:last-child .eyebrow, .capture-results > div:last-child strong { color: var(--glacier-mint); }
.capture-results strong { display: block; font: 2.75rem/1.2 Georgia, serif; margin-block: .25rem; }
.capture-results p { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .journey-connector svg { clip-path: none; }
}
.capture-count { display: inline-block; min-inline-size: 2.45em; font-variant-numeric: tabular-nums; }

.seasonality { margin: 1.5rem 0; padding: clamp(.85rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: .85rem; background: #fffdf7; }
.seasonality figcaption .eyebrow, .seasonality-note { margin: 0; }
.seasonality h3 { margin: .45rem 0; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.seasonality figcaption p:last-child { margin: .5rem 0 1rem; }
.seasonality-chart > svg { display: block; width: 100%; height: auto; }
.seasonality-grid { fill: none; stroke: var(--line); }
.seasonality-axis { fill: var(--soft); font: 600 13px system-ui, sans-serif; }
.seasonality-lines { fill: none; stroke-width: 3; stroke-linecap: round; }
.seasonality-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .85rem 0; list-style: none; }
.seasonality-legend li { display: flex; align-items: center; gap: .35rem; font-size: .8rem; }
.seasonality-note { color: var(--soft); font-size: .8rem; }

.seasonality-legend button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .5rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.seasonality-legend button[aria-pressed="false"] { background: transparent; text-decoration: line-through; }
.seasonality-legend button[aria-pressed="false"] svg { opacity: .45; }
.seasonality-legend button:disabled { padding: 0; border: 0; background: transparent; cursor: auto; }
.seasonality-lines [data-series-hidden] { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .seasonality-chart[data-draw="pending"] .seasonality-lines path { clip-path: inset(0 100% 0 0); }
  .seasonality-chart[data-draw="active"] .seasonality-lines path {
    --series-slot: 3.35s;
    animation: draw-season-series var(--series-slot) ease-in-out calc(var(--series-order) * var(--series-slot)) both;
  }
  .seasonality-chart[data-draw="active"] .seasonality-lines path:not(:first-child):not(:last-child) {
    animation-name: draw-and-wipe-season-series;
  }
}
@keyframes draw-season-series {
  from { clip-path: inset(0 100% 0 0); }
  57%, to { clip-path: inset(0); }
}

@keyframes draw-and-wipe-season-series {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 100%); }
  57%, 75% { clip-path: inset(0); }
}