body {
  font-family: 'Manrope', 'Inter', sans-serif;
  background: radial-gradient(ellipse at 25% 15%, #191e39, transparent 75%), #0d1020;
}
.stacks-explained-hero {
  margin-top: 88px;
  height: min(900px, calc(100svh - 88px));
  min-height: 0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(circle, rgba(141, 162, 213, .09) 1px, transparent 1px);
  background-size: 36px 36px;
}
.stacks-explained-stage { display: flex; flex-direction: column; gap: 16px; width: 100%; height: 100%; max-width: 1440px; }
#stacks-explained-title { text-align: left; }
#stacks-film { display: block; flex: 1; min-height: 0; width: 100%; height: 0; overflow: visible; }
#stacks-film text { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#stacks-film .mono { font-family: ui-monospace, SFMono-Regular, monospace; }
@media (max-width: 640px) {
  .stacks-explained-hero { margin-top: 80px; padding: 12px 8px; height: min(740px, calc(100svh - 80px)); }
}

#stacks-timeline { flex: none; min-width: 0; color: #d5dcec; }
#stacks-timeline[hidden] { display: none; }
.stacks-timeline-summary { display: flex; justify-content: space-between; gap: 16px; font-size: .8125rem; line-height: 1.5; }
.stacks-timeline-summary > :first-child { color: #fff; font-weight: 600; }
.stacks-timeline-time { flex: none; font-variant-numeric: tabular-nums; }
.stacks-timeline-viewport { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #4d6088 transparent; }
.stacks-timeline-rail { position: relative; display: grid; grid-template-columns: repeat(var(--section-count), minmax(0, 1fr)); min-width: 1200px; padding: 12px 4px 8px; }
.stacks-timeline-track { position: absolute; top: 16px; left: 4px; right: 4px; height: 3px; background: #48546d; pointer-events: none; }
.stacks-timeline-fill { width: 100%; height: 100%; background: #599aff; transform: scaleX(var(--progress, 0)); transform-origin: left; }
.stacks-timeline-track::after { content: ''; position: absolute; left: calc(var(--progress, 0) * 100%); top: -3px; height: 9px; width: 2px; background: #fff; box-shadow: 0 0 8px #599aff; }
.stacks-timeline-section { position: relative; display: flex; align-items: flex-start; min-height: 64px; padding: 22px 10px 6px; border: 0; border-radius: 4px; background: transparent; color: #d5dcec; cursor: pointer; text-align: left; }
.stacks-timeline-section::before { content: ''; position: absolute; top: 1px; left: 0; width: 2px; height: 9px; background: #a6b3ce; }
.stacks-timeline-label { display: block; font-size: .8125rem; line-height: 1.35; transform-origin: top left; transition: transform 160ms ease, color 160ms ease; }
.stacks-timeline-section[aria-current] { color: #fff; background: rgba(51, 116, 255, .12); }
.stacks-timeline-section:focus-visible { outline: 2px solid #73aaff; outline-offset: -2px; }
.stacks-timeline-section:focus-visible .stacks-timeline-label { transform: scale(1.07); color: #fff; }
.stacks-timeline-hint { display: none; margin: 4px 0 0; color: #bdc8df; font-size: .75rem; }
@media (hover: hover) and (pointer: fine) {
  .stacks-timeline-section:hover .stacks-timeline-label { transform: scale(1.07); color: #fff; }
}
@media (max-width: 1247px) {
  .stacks-timeline-hint { display: block; }
}
@media (max-width: 640px) {
  .stacks-explained-hero { min-height: 700px; }
  .stacks-explained-stage { gap: 10px; }
  .stacks-timeline-summary { gap: 8px; font-size: .75rem; }
  .stacks-timeline-rail { min-width: 1440px; }
  .stacks-timeline-section { min-height: 64px; padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .stacks-timeline-label { transition: none; }
}

.stacks-walkthrough-heading { flex: none; }
.stacks-walkthrough-heading p { margin: 8px 0 0; color: #d5dcec; font-size: 1rem; line-height: 1.5; }
.stacks-guide-section { display: flex; align-items: center; min-height: min(900px, calc(100svh - 88px)); padding: 88px 24px; scroll-margin-top: 88px; }
#how-to-configure-a-stack { background: #19243a; }
.stacks-guide-content { width: 100%; max-width: 1440px; margin: 0 auto; }
.stacks-guide-heading { margin-bottom: 40px; }
#stacks-explained-title, .stacks-guide-heading h2 { margin: 0; color: #fff; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 900; line-height: 1.15; letter-spacing: -.025em; }
.stacks-guide-heading p { max-width: 850px; margin: 18px 0 0; color: #d5dcec; font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.6; }
.stack-shared-mission { margin: 0 0 32px; padding: 4px 0 4px 22px; border-left: 3px solid #3374ff; }
.stack-shared-mission h3, .stack-shared-mission h4 { margin: 0 0 12px; color: #9fc2ff; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.25; }
.stack-shared-mission p { margin: 0; color: #fff; font-size: clamp(1.125rem, 1.7vw, 1.35rem); line-height: 1.6; overflow-wrap: anywhere; }
.stack-persona-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stack-persona-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack-persona-config { min-width: 0; padding: 28px; border: 1px solid #35415d; border-radius: 12px; background: rgba(24, 32, 53, .7); }
.stack-persona-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.stack-persona-avatar { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 50%; background: #0a0f1e; }
.stack-persona-heading h3, .stack-persona-heading h4 { margin: 0; color: #fff; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.stack-persona-config > h4, .stack-persona-config > h5 { margin: 26px 0 12px; color: #fff; font-size: .875rem; font-weight: 700; }
.stack-integration-list, .stack-responsibilities { margin: 0; padding-left: 20px; list-style: disc; color: #e5eaf4; font-size: .9375rem; line-height: 1.6; }
.stack-integration-list li + li, .stack-responsibilities li + li { margin-top: 10px; }
.stack-integration-list li::marker, .stack-responsibilities li::marker { color: #8eaddd; }
.stack-integration-list img { display: inline-block; width: 22px; height: 22px; margin-right: 7px; vertical-align: -5px; object-fit: contain; }
.stacks-example-section { background: radial-gradient(ellipse at 80% 20%, rgba(42, 70, 130, .16), transparent 70%), rgba(7, 11, 24, .5); }
.stack-example-intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "title ." "description action"; column-gap: 24px; margin-bottom: 28px; }
.stack-example-intro h3 { grid-area: title; margin: 0 0 14px; color: #fff; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.3; }
.stack-example-intro p { grid-area: description; margin: 0; color: #d5dcec; font-size: 1rem; line-height: 1.7; }
.stack-example-action { grid-area: action; display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.stack-example-action .catalog-deploy-button { padding: 14px 22px; font-size: 1rem; }
.stack-example-action .catalog-deploy-button:focus-visible { outline: 2px solid #9fc2ff; outline-offset: 5px; }
@media (max-width: 900px) {
  .stack-example-intro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "action" "description"; }
  .stack-example-action { justify-content: flex-start; margin-bottom: 24px; }
  .stack-persona-grid { grid-template-columns: minmax(0, 1fr); }
  .stacks-guide-section { min-height: 0; padding: 64px 24px; }
}
@media (max-width: 640px) {
  .stacks-explained-hero { height: min(820px, calc(100svh - 80px)); min-height: 760px; }
  .stacks-walkthrough-heading p { font-size: .875rem; }
  .stacks-guide-section { padding: 56px 20px; scroll-margin-top: 80px; }
  .stacks-guide-heading { margin-bottom: 30px; }
  .stack-persona-config { padding: 24px; }
  .stack-persona-grid { gap: 20px; }
  .stack-persona-heading { gap: 14px; }
  .stack-shared-mission { padding-left: 18px; }
  .stack-example-action .catalog-deploy-button { width: 100%; justify-content: center; }
}

.stack-responsibility-explainer { max-width: 1000px; margin-top: 40px; color: #d5dcec; font-size: 1rem; line-height: 1.7; }
.stack-responsibility-explainer h2 { margin: 0 0 16px; color: #fff; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.3; }
.stack-responsibility-explainer p { margin: 0 0 16px; }
.stack-responsibility-explainer ul { padding: 0; margin: 24px 0 0; list-style: none; }
.stack-responsibility-explainer li { display: flex; align-items: flex-start; gap: 12px; }
.stack-responsibility-explainer li > svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: #9fc2ff; }
.stack-responsibility-explainer li + li { margin-top: 12px; }
.stack-responsibility-explainer strong { color: #fff; }
