:root {
  --story-ink: #091c36;
  --story-green: #0f7a62;
  --story-mint: #e9fbf5;
  --story-blue-soft: #eaf3ff;
  --story-amber: #f59f24;
  --story-red: #dc3f3f;
  --story-panel: rgba(255, 255, 255, 0.92);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #f5f9fd 0%, #ffffff 36%, #f8fbfe 100%);
}

.story-hero {
  position: relative;
  min-height: min(620px, calc(100vh - 126px));
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 28%, rgba(7, 154, 155, 0.14), transparent 32%),
    linear-gradient(135deg, #eef7ff 0%, #ffffff 44%, #eaf8f5 100%);
}

.story-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(245, 249, 253, 0.94) 0%, rgba(245, 249, 253, 0.78) 42%, rgba(245, 249, 253, 0.28) 100%),
    url("assets/40-shared-work-governance-transition.png") right 8% center / min(720px, 58vw) auto no-repeat;
}

.story-hero-inner {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(50px, 7vw, 76px) 0 clamp(38px, 5vw, 58px);
}

.story-hero h1 {
  max-width: 810px;
  margin: 0 0 20px;
  color: var(--story-ink);
  font-size: clamp(2.75rem, 5.1vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.story-intro,
.story-thesis {
  max-width: 700px;
}

.story-intro {
  margin-bottom: 18px;
  color: #344862;
  font-size: clamp(1.02rem, 1.22vw, 1.18rem);
  line-height: 1.6;
}

.story-thesis {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin: 0 0 24px;
  padding: 10px 14px;
  color: var(--story-green);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(7, 154, 155, 0.24);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 900;
}

.story-section,
.agent-section,
.value-section {
  position: relative;
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.story-band {
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.story-band-inner {
  position: relative;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(68px, 8vw, 110px) 0;
}

.problem-section {
  padding: clamp(72px, 8vw, 112px) 0 clamp(66px, 7vw, 96px);
}

.presentation-next {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 3vw, 42px);
  z-index: 30;
  display: inline-flex;
  min-width: 104px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--paper);
  background: var(--story-ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(6, 25, 67, 0.18);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.presentation-next:hover,
.presentation-next:focus-visible {
  background: var(--blue);
  outline: 3px solid rgba(18, 104, 232, 0.24);
  outline-offset: 3px;
}

.fragment-map {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    minmax(132px, 0.56fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 248, 245, 0.72));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.fragment-map::before {
  content: "";
  position: absolute;
  inset: 50% 6% auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(18, 104, 232, 0.3), rgba(7, 154, 155, 0.38), transparent);
}

.fragment-node,
.workflow-cards article,
.agent-lineup article,
.story-step,
.walkthrough-point-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(6, 25, 67, 0.07);
}

.fragment-node {
  position: relative;
  z-index: 1;
  min-height: 208px;
  padding: 20px;
}

.fragment-node.documents {
  grid-column: 1;
  grid-row: 1;
}

.fragment-node.systems {
  grid-column: 2;
  grid-row: 1;
}

.fragment-node.suppliers {
  grid-column: 4;
  grid-row: 1;
}

.fragment-node.history {
  grid-column: 5;
  grid-row: 1;
}

.fragment-node span,
.workflow-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 16px;
  color: var(--paper);
  background: var(--blue);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.fragment-node.systems span,
.workflow-cards article:nth-child(2) .workflow-number {
  background: var(--teal);
}

.fragment-node.suppliers span,
.workflow-cards article:nth-child(3) .workflow-number {
  background: var(--story-amber);
}

.fragment-node.history span,
.workflow-cards article:nth-child(4) .workflow-number {
  background: var(--story-red);
}

.fragment-node h3,
.workflow-cards h3,
.agent-lineup h3,
.story-step h3,
.walkthrough-point-grid h3 {
  margin-bottom: 8px;
  color: var(--story-ink);
  font-size: 1.06rem;
}

.fragment-node p,
.workflow-cards p,
.agent-lineup p,
.story-step p,
.walkthrough-point-grid p,
.value-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.56;
}

.decision-core {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 3;
  grid-row: 1;
  width: 136px;
  height: 136px;
  place-items: center;
  justify-self: center;
  padding: 18px;
  color: var(--paper);
  background: linear-gradient(135deg, var(--story-ink), #0f7a62);
  border: 6px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  box-shadow: var(--shadow);
  text-align: center;
}

.decision-core strong,
.decision-core span {
  display: block;
}

.decision-core strong {
  font-size: 1.1rem;
}

.decision-core span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.workflow-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.workflow-cards article {
  min-height: 232px;
  padding: 20px;
}

.agent-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(560px, 1.2fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
  padding: clamp(74px, 8vw, 112px) 0;
}

.agent-copy h2,
.value-copy h2 {
  margin-bottom: 16px;
  color: var(--story-ink);
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1;
}

.agent-principles,
.domain-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.agent-principles span,
.domain-grid span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 12px;
  color: var(--story-green);
  background: var(--story-mint);
  border: 1px solid rgba(15, 122, 98, 0.18);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.agent-lineup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-lineup article {
  min-height: 234px;
  padding: 18px;
}

.agent-lineup img {
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
}

.storyboard-section {
  padding: clamp(72px, 8vw, 112px) 0 clamp(66px, 7vw, 96px);
}

.story-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.story-step {
  display: grid;
  min-height: 254px;
  padding: 18px;
}

.story-step span {
  align-self: start;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.story-step strong {
  align-self: end;
  color: var(--story-green);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.walkthrough-step {
  border-color: rgba(245, 159, 36, 0.38);
  background: linear-gradient(180deg, #ffffff, #fff8ec);
}

.close-step {
  border-color: rgba(15, 122, 98, 0.26);
  background: linear-gradient(180deg, #ffffff, #ecfbf5);
}

.walkthrough-band {
  background:
    linear-gradient(180deg, #f7fbff, #ffffff);
}

.walkthrough-video {
  margin: 34px 0 0;
}

.walkthrough-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #071526;
  border: 1px solid rgba(9, 28, 54, 0.16);
  border-radius: 8px;
  box-shadow: 0 22px 58px rgba(6, 25, 67, 0.14);
}

.walkthrough-video figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.walkthrough-point-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.walkthrough-point-grid article {
  overflow: hidden;
}

.walkthrough-point-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.walkthrough-point-grid div {
  padding: 18px;
}

.value-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(74px, 8vw, 112px) 0;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.domain-grid span {
  justify-content: center;
  min-height: 76px;
  color: var(--story-ink);
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(6, 25, 67, 0.06);
  text-align: center;
}

@media (max-width: 1180px) {
  .workflow-cards,
  .agent-lineup,
  .story-timeline,
.walkthrough-point-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fragment-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fragment-node.documents,
  .fragment-node.systems,
  .fragment-node.suppliers,
  .fragment-node.history {
    grid-column: auto;
    grid-row: auto;
  }

  .decision-core {
    grid-column: 1 / -1;
    grid-row: auto;
    width: min(100%, 320px);
    height: auto;
    min-height: 96px;
    border-radius: 8px;
  }
}

@media (max-width: 880px) {
  .story-hero {
    min-height: auto;
  }

  .story-hero-bg {
    background:
      linear-gradient(180deg, rgba(245, 249, 253, 0.92), rgba(245, 249, 253, 0.92)),
      url("assets/40-shared-work-governance-transition.png") center 18% / 620px auto no-repeat;
  }

  .story-hero-inner {
    padding-top: 64px;
    padding-bottom: 46px;
  }

  .story-hero h1 {
    font-size: clamp(2.35rem, 10.6vw, 3.35rem);
    line-height: 1.02;
  }

  .story-intro {
    font-size: 1rem;
  }

  .agent-section,
  .value-section {
    grid-template-columns: 1fr;
  }

  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .story-hero-inner,
  .story-section,
  .story-band-inner,
  .agent-section,
  .value-section {
    width: min(100% - 28px, 1180px);
  }

  .fragment-map,
  .workflow-cards,
  .agent-lineup,
  .story-timeline,
.walkthrough-point-grid,
  .domain-grid {
    grid-template-columns: 1fr;
  }

  .decision-core {
    width: auto;
    min-height: 92px;
    margin-top: 8px;
  }

  .presentation-next {
    right: 14px;
    bottom: 14px;
    min-width: 92px;
    min-height: 40px;
    padding: 9px 13px;
    font-size: 0.84rem;
  }
}
