.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.site-nav-links {
  display: flex;
  gap: 0.6rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  border: none;
  background: none;
  padding: 0;
}

.brand-logo img {
  height: 30px;
  width: auto;
  display: block;
}

.brand-foliage {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.14;
  filter: sepia(0.12) saturate(0.85);
}

.foliage-a {
  left: 0;
  top: 4rem;
  width: 280px;
}

.foliage-b {
  right: 0;
  bottom: 0;
  width: 300px;
}

@media (max-width: 1300px) {
  .brand-foliage {
    display: none;
  }
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  border-color: transparent;
}

/* ---------- storyboard pipeline ---------- */

.storyboard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
  padding-left: 34px;
}

.storyboard-track {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 33px;
  width: 3px;
  background: var(--line);
  border-radius: 3px;
}

.storyboard-line {
  position: absolute;
  top: 8px;
  left: 33px;
  width: 3px;
  height: calc(100% - 16px);
  background: linear-gradient(180deg, var(--baseline), var(--accent), var(--accent-3));
  border-radius: 3px;
  transform: scaleY(0);
  transform-origin: top;
}

.story-stage {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.75rem 2.6rem 0.75rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  cursor: pointer;
}

.story-stage:hover {
  border-color: var(--accent);
}

.story-stage.expanded {
  border-color: var(--accent-3);
  box-shadow: 0 0 22px rgba(110, 10, 0, 0.25);
}

.story-toggle {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.2s ease, color 0.2s ease;
}

.story-stage.expanded .story-toggle {
  transform: rotate(180deg);
  border-color: var(--accent-3);
  color: var(--accent-3);
}

.story-expand {
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.story-expand-inner {
  padding-top: 0.7rem;
}

.story-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--baseline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  z-index: 1;
}

.story-eyebrow {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}

.story-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.story-lede {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.story-detail {
  margin: 0.5rem 0 0;
  color: var(--text);
  line-height: 1.55;
  font-size: 0.92rem;
}

.stage-deliverable {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(174, 63, 37, 0.12);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

/* the featured stage — Run Simulation & Analyze Performance */

.story-stage.featured {
  position: relative;
  grid-template-columns: 72px 1fr;
  padding: 1.6rem 1.8rem;
  border: 2px solid var(--accent-3);
  background: linear-gradient(135deg, rgba(174, 63, 37, 0.08), rgba(110, 10, 0, 0.08));
  box-shadow: 0 10px 34px rgba(110, 10, 0, 0.14);
  overflow: hidden;
}

.featured-aura {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(110, 10, 0, 0.22) 0%, rgba(110, 10, 0, 0) 65%);
  pointer-events: none;
  z-index: 0;
}

.story-stage.featured .story-node,
.story-stage.featured .story-body {
  position: relative;
  z-index: 1;
}

.story-stage.featured .story-node {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  border-color: var(--accent-3);
}

.story-stage.featured .story-eyebrow {
  color: var(--accent-3);
}

.story-stage.featured h3 {
  font-size: 1.35rem;
}

.story-stage.featured .story-lede {
  font-size: 1rem;
}

.story-node {
  cursor: pointer;
}

@media (max-width: 700px) {
  .storyboard {
    padding-left: 0;
  }
  .storyboard-track,
  .storyboard-line {
    display: none;
  }
  .story-stage,
  .story-stage.featured {
    grid-template-columns: 1fr;
  }
}

/* ---------- analyzed performance (nested in featured stage) ---------- */

.performance-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.1rem;
}

.performance-card {
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.performance-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.performance-card h4 em {
  font-style: italic;
}

.performance-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .performance-categories {
    grid-template-columns: 1fr;
  }
}
