/* Shared entrepreneurship reading layout; matches the Model reading rail. */
body > .container:has(> .enterprise-page) { width:100%; max-width:none; margin:0; padding:0; }
.enterprise-page { width:100%; overflow-x:clip; }
.enterprise-layout {
  width: min(calc(100% - 2.5rem), 84rem);
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 4vw, 4.5rem);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(6rem, 10vw, 9rem);
}

.enterprise-story {
  position: relative;
  min-width: 0;
  max-width: 68rem;
}

/* Engineering cycle rail ----------------------------------------------- */
.enterprise-rail {
  --enterprise-progress: 0;
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  align-self: start;
}

.enterprise-rail ol {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The track runs between the first and last marker centres. */
.enterprise-rail-track {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: calc(1rem - 1px);
  width: 2px;
  border-radius: 1px;
  background: rgba(47, 105, 117, 0.2);
}

.enterprise-rail-progress {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(var(--deep-teal), var(--berry));
  transform: scaleY(var(--enterprise-progress));
  transform-origin: top;
}

.enterprise-rail a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  color: rgba(31, 36, 33, 0.5);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color 180ms ease;
}

.enterprise-rail-marker {
  width: 2rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 105, 117, 0.35);
  border-radius: 50%;
  background: var(--cream);
  color: var(--deep-teal);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.enterprise-rail li.is-complete .enterprise-rail-marker {
  border-color: var(--deep-teal);
  background: var(--deep-teal);
  color: var(--white);
}

.enterprise-rail a:hover,
.enterprise-rail a:focus-visible,
.enterprise-rail a[aria-current="location"] {
  color: var(--berry);
}

.enterprise-rail a:focus-visible {
  border-radius: 0.35rem;
  outline: 2px solid var(--berry);
  outline-offset: 0.2rem;
}

.enterprise-rail a:hover .enterprise-rail-marker,
.enterprise-rail a[aria-current="location"] .enterprise-rail-marker {
  border-color: var(--berry);
  background: var(--berry);
  color: var(--white);
  box-shadow: 0 0 0 0.2rem rgba(170, 43, 98, 0.16);
  transform: scale(1.08);
}


.enterprise-rail { top:calc(var(--sticky-top) + 2rem); transition:top 260ms ease; }
.enterprise-page .enterprise-story > section { width:100%; max-width:none; margin-inline:0; padding:clamp(2.5rem,5vw,4rem) 0; border-bottom:1px solid rgba(47,105,117,.2); scroll-margin-top:calc(var(--nav-height) + 2rem); }
.enterprise-page .enterprise-story > section:first-of-type { padding-top:0; }
.enterprise-story :is(.section-heading,.entrepreneurship-heading,.swot-number-heading) { display:block; margin-bottom:2rem; text-align:left; }
.enterprise-story :is(.section-heading,.entrepreneurship-heading,.risk-section-heading,.model-chapter-header) h2 { color:var(--deep-teal); font:400 clamp(2rem,4vw,3.4rem)/1.08 var(--font-display); letter-spacing:-.035em; }
.enterprise-story :is(.commercialization-references-inner,.model-chapter-inner) { width:100%; max-width:none; padding:0; }
.enterprise-story #swot-analysis { padding-inline:0; }
.enterprise-story #swot-analysis :is(.swot-number-heading,.risk-section-heading,.risk-section-heading h2) { text-align:left; }
.enterprise-reference-list { border-top:1px solid rgba(47,105,117,.2); }
.enterprise-reference { border-bottom:1px solid rgba(47,105,117,.2); }
.enterprise-reference summary { display:flex; align-items:baseline; gap:.6rem; padding:1rem 0; color:var(--deep-teal); font-weight:600; cursor:pointer; list-style:none; }
.enterprise-reference summary::-webkit-details-marker { display:none; }
.enterprise-reference summary::after { content:'+'; margin-left:auto; }
.enterprise-reference[open] summary::after { content:'−'; }
.enterprise-reference[open] summary,.enterprise-reference summary:hover { color:var(--berry); }
.enterprise-reference-tag { flex:none; padding:.15rem .4rem; border-radius:.2rem; background:rgba(170,43,98,.1); color:var(--berry); font-size:.7rem; }
.enterprise-reference p { padding:0 0 1rem; margin:0; color:var(--body-text); font-size:.92rem; overflow-wrap:anywhere; }
@media(max-width:1100px) {
 .enterprise-layout { display:block; padding-top:0; }
 .enterprise-rail { position:sticky; z-index:10; top:var(--sticky-top); margin:0 -1.25rem 2.5rem; padding:.55rem 1.25rem; overflow-x:auto; background:rgba(241,230,208,.94); backdrop-filter:blur(8px); border-block:1px solid rgba(47,105,117,.2); }
 .enterprise-rail ol { display:flex; width:max-content; gap:1rem; }
 .enterprise-rail a { display:flex; white-space:nowrap; gap:.45rem; }
 .enterprise-rail-marker { flex:0 0 2rem; }
 .enterprise-page .enterprise-story > section { scroll-margin-top:calc(var(--nav-height) + 5rem); }
}
@media(prefers-reduced-motion:reduce) { .enterprise-rail,.enterprise-rail a,.enterprise-rail-marker { transition:none; } }
@media print { .enterprise-rail { display:none; } .enterprise-layout { display:block; } }

/* The removed chapter numbers no longer reserve their old grid column. */
.enterprise-page .enterprise-story .entrepreneurship-section { display:block; padding-inline:0; }
.enterprise-page .enterprise-story :is(.entrepreneurship-content,.risk-section-heading) { width:100%; max-width:none; }
.enterprise-page .enterprise-story .entrepreneurship-content h2 { max-width:none; font:400 clamp(2rem,4vw,3.4rem)/1.08 var(--font-display); letter-spacing:-.035em; }
.enterprise-page .enterprise-story .section-heading { display:block; }

/* One continuous reading surface; cards and data visualizations keep their fills.
   Override legacy alternating fills, funding's !important fill, and risk hover fills. */
.enterprise-page {
  background: var(--cream);
}
.enterprise-page .enterprise-story > section,
.enterprise-page .enterprise-story > section:hover {
  background: transparent !important;
}
