:root {
  --story-paper: #f5f7f3;
  --story-surface: #ffffff;
  --story-ink: #142019;
  --story-muted: #68756d;
  --story-line: #d9e1da;
  --story-green: #126746;
  --story-deep: #083e2a;
  --story-clay: #9b4f31;
  --story-gold: #b78b28;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --max: 1380px;
  --gutter: clamp(20px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--story-paper);
  color: var(--story-ink);
  font-family: var(--sans);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.page-nav {
  font-size: 13px;
  font-weight: 600;
}

.page-nav .nav-links {
  font-family: var(--sans);
  letter-spacing: 0;
}

.story-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 3px;
  background: var(--story-clay);
}

.story-page {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 103, 70, 0.045), transparent 36rem),
    var(--story-paper);
  color: var(--story-ink);
}

.story-hero {
  min-height: calc(88vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: clamp(34px, 5.2vw, 76px);
  align-items: center;
  padding-block: clamp(72px, 8vw, 118px) clamp(54px, 7vw, 88px);
  border-bottom: 1px solid var(--story-line);
}

.story-eyebrow,
.story-label,
.story-tag,
.story-mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.074em;
  text-transform: uppercase;
}

.story-eyebrow,
.story-label {
  color: var(--story-green);
}

.story-hero h1,
.story-section h2,
.story-final h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.story-hero h1 {
  max-width: 860px;
  margin-top: 18px;
  font-size: clamp(3.35rem, 6.5vw, 6.7rem);
}

.story-deck {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--story-muted);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.story-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 850px;
  margin-top: 38px;
  border: 1px solid var(--story-line);
  background: var(--story-line);
}

.story-chip {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.story-chip strong {
  display: block;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
}

.story-chip span {
  max-width: 19ch;
  color: var(--story-muted);
}

.story-visual {
  margin: 0;
}

.story-visual img,
.story-photo img,
.story-asset img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #e9eee8;
}

.story-visual img {
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(10, 28, 15, 0.18);
}

.story-caption {
  display: grid;
  grid-template-columns: 0.32fr 0.68fr;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(18, 42, 28, 0.18);
  color: var(--story-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.story-caption b {
  color: var(--story-ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.068em;
  text-transform: uppercase;
}

.story-subnav {
  position: sticky;
  top: 68px;
  z-index: 74;
  border-bottom: 1px solid var(--story-line);
  background: rgba(245, 247, 243, 0.94);
  backdrop-filter: blur(16px);
}

.story-subnav-inner {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  font-size: 0.78rem;
  scrollbar-width: none;
}

.story-subnav-inner::-webkit-scrollbar {
  display: none;
}

.story-subnav a {
  color: var(--story-muted);
  white-space: nowrap;
}

.story-subnav a:hover {
  color: var(--story-green);
}

.story-section {
  border-bottom: 1px solid var(--story-line);
  padding-block: clamp(62px, 7.4vw, 104px);
}

.story-page > .story-section:last-of-type {
  padding-bottom: clamp(26px, 3.2vw, 44px);
}

.story-section.dark {
  background: var(--story-deep);
  color: white;
}

.story-section.dark .story-label,
.story-section.dark .story-tag {
  color: #9ecbb3;
}

.story-section.dark .story-standfirst,
.story-section.dark p,
.story-section.dark td {
  color: rgba(255, 255, 255, 0.72);
}

.story-thesis {
  padding: clamp(32px, 4.4vw, 58px);
  border: 1px solid #29382f;
  border-radius: 8px;
  background: var(--story-deep);
  color: white;
}

.story-thesis blockquote {
  max-width: 900px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 4.35rem);
  font-weight: 500;
  line-height: 1.08;
}

.story-thesis strong {
  color: #b6d4c1;
  font-weight: 500;
}

.story-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.58fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: end;
  margin-bottom: clamp(34px, 5vw, 72px);
}

.story-section h2,
.story-final h2 {
  max-width: 860px;
  margin-top: 14px;
  font-size: clamp(2.35rem, 4.35vw, 4.7rem);
}

.story-standfirst {
  margin: 0;
  color: var(--story-muted);
  font-size: clamp(1rem, 1.2vw, 1.13rem);
  line-height: 1.72;
  text-wrap: pretty;
}

.story-decision-grid,
.story-case-grid,
.story-finance-grid,
.story-standards-grid,
.story-record-grid,
.story-proof-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--story-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--story-line);
  gap: 1px;
}

.story-card,
.story-decision,
.story-case,
.story-finance,
.story-standard,
.story-record-grid article,
.story-proof-metrics div {
  min-height: 230px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.story-decision b,
.story-phase b,
.story-record-grid b {
  color: var(--story-clay);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.story-card h3,
.story-decision h3,
.story-case h3,
.story-finance h3,
.story-standard b,
.story-pathway h3,
.story-phase h3,
.story-cluster-copy h3,
.story-record-grid h3,
.story-market-copy h3 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.16;
}

.story-card p,
.story-decision p,
.story-case p,
.story-finance p,
.story-standard p,
.story-pathway p,
.story-phase li,
.story-detail p,
.story-detail li,
.story-record-grid p,
.story-cluster-copy p,
.story-market-copy p {
  color: var(--story-muted);
  line-height: 1.66;
  text-wrap: pretty;
}

.story-decision span {
  display: block;
  margin-top: 28px;
  color: var(--story-green);
}

.story-cluster-proof {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  border: 1px solid var(--story-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--story-line);
}

.story-cluster-number,
.story-cluster-copy {
  min-height: 360px;
  padding: clamp(28px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.72);
}

.story-cluster-number {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--story-deep);
  color: white;
}

.story-cluster-number strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(5.6rem, 12vw, 12rem);
  font-weight: 500;
  line-height: 0.88;
}

.story-cluster-number span,
.story-cluster-number p {
  display: block;
  max-width: 24ch;
  color: rgba(255,255,255,0.7);
}

.story-cluster-copy h3 {
  font-size: clamp(2rem, 3.8vw, 4rem);
}

.story-record-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.story-record-grid article {
  min-height: 220px;
}

.story-stats,
.story-pathways,
.story-budget,
.story-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.14);
  gap: 1px;
}

.story-stat {
  min-height: 188px;
  padding: 28px;
  background: rgba(255,255,255,0.04);
}

.story-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.3vw, 5rem);
  font-weight: 500;
  line-height: 1;
}

.story-stat span {
  display: block;
  max-width: 18ch;
  margin-top: 22px;
  color: rgba(255,255,255,0.7);
}

.story-table-wrap {
  margin-top: 34px;
  overflow-x: auto;
}

.story-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.story-table th,
.story-table td {
  border-bottom: 1px solid rgba(255,255,255,0.16);
  padding: 18px;
  text-align: left;
  vertical-align: top;
}

.story-table th {
  color: #a9d0ba;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.story-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(38px, 6vw, 96px);
  align-items: start;
}

.story-photo {
  margin: 0;
}

.story-photo img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
}

.story-note h2 {
  margin-top: 14px;
}

.story-note p {
  max-width: 760px;
  color: var(--story-muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.story-gates {
  margin-top: 34px;
  border-top: 1px solid var(--story-line);
}

.story-gate {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--story-line);
  padding: 20px 0;
}

.story-gate b {
  color: var(--story-clay);
  font-family: var(--mono);
}

.story-gate h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}

.story-gate p {
  margin: 8px 0 0;
}

.story-assets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(38px, 5vw, 74px);
}

.story-asset {
  margin: 0;
}

.story-asset img {
  aspect-ratio: 1 / 0.9;
  object-fit: cover;
  object-position: center top;
}

.story-asset figcaption,
.story-photo figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(18, 42, 28, 0.16);
  color: var(--story-muted);
  font-size: 0.82rem;
  line-height: 1.48;
}

.story-pathways {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--story-line);
  background: var(--story-line);
}

.story-pathway {
  min-height: 430px;
  padding: 30px;
  background: rgba(255,255,255,0.72);
}

.story-pathway dl {
  margin: 30px 0 0;
}

.story-pathway div {
  border-top: 1px solid var(--story-line);
  padding: 15px 0;
}

.story-pathway dt {
  color: var(--story-green);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.story-pathway dd {
  margin: 7px 0 0;
  color: var(--story-muted);
}

.story-case-grid,
.story-finance-grid,
.story-standards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-finance-grid,
.story-standards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-budget {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: var(--story-line);
  background: var(--story-line);
}

.story-budget-panel {
  padding: clamp(26px, 3.6vw, 48px);
  background: rgba(255,255,255,0.72);
}

.story-budget-panel h3 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 500;
}

.story-budget-line {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--story-line);
  padding: 16px 0;
}

.story-budget-line strong {
  text-align: right;
}

.story-budget-line.total {
  color: var(--story-green);
  font-weight: 700;
}

.story-budget-line.story-highlight {
  color: var(--story-clay);
}

.story-market {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  border: 1px solid var(--story-line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
}

.story-market-media {
  min-height: 100%;
  margin: 0;
}

.story-market-media img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.story-market-copy {
  padding: clamp(30px, 4.5vw, 64px);
}

.story-market-copy h3 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 4vw, 4.5rem);
}

.story-market-copy blockquote {
  margin: 34px 0 0;
  padding: 24px;
  border-left: 4px solid var(--story-green);
  background: rgba(18, 103, 70, 0.07);
  color: var(--story-ink);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1.22;
}

.story-proof-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.story-proof-metrics div {
  min-height: 190px;
}

.story-proof-metrics strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.6vw, 4rem);
  font-weight: 500;
  line-height: 0.95;
}

.story-proof-metrics span {
  display: block;
  margin-top: 18px;
  color: var(--story-muted);
  line-height: 1.55;
}

.story-chart {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(28px, 4vw, 64px);
}

.story-volume {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  overflow: hidden;
}

.story-volume div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  padding: 18px;
}

.story-volume div:last-child {
  border-bottom: 0;
}

.story-bars {
  height: 340px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
}

.story-bar {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  overflow: hidden;
}

.story-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #dca86d, var(--story-clay));
}

.story-bar span {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: white;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.story-timeline {
  border-color: var(--story-line);
  background: var(--story-line);
}

.story-phase {
  min-height: 280px;
  padding: 24px;
  background: rgba(255,255,255,0.72);
}

.story-phase ul {
  margin: 24px 0 0;
  padding-left: 18px;
}

.story-detail {
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: rgba(255,255,255,0.64);
  margin-top: 14px;
  overflow: hidden;
}

.story-detail summary {
  cursor: pointer;
  padding: 20px 24px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.story-detail div {
  border-top: 1px solid var(--story-line);
  padding: 0 24px 22px;
}

.story-detail p,
.story-detail ol,
.story-detail ul {
  max-width: 760px;
}

.story-detail li {
  max-width: 720px;
}

.story-final {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  padding: clamp(32px, 4.5vw, 58px);
  border: 1px solid #29382f;
  border-radius: 8px;
  background: var(--story-deep);
  color: white;
}

.story-final p {
  max-width: 780px;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 1080px) {
  .story-hero,
  .story-head,
  .story-split,
  .story-chart,
  .story-cluster-proof,
  .story-market {
    grid-template-columns: 1fr;
  }

  .story-decision-grid,
  .story-case-grid,
  .story-finance-grid,
  .story-standards-grid,
  .story-record-grid,
  .story-proof-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-assets,
  .story-stats,
  .story-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .story-hero {
    min-height: 0;
    padding-block: 64px 56px;
  }

  .story-hero h1 {
    font-size: clamp(3rem, 14vw, 4.25rem);
  }

  .story-chips,
  .story-decision-grid,
  .story-case-grid,
  .story-finance-grid,
  .story-standards-grid,
  .story-record-grid,
  .story-proof-metrics,
  .story-assets,
  .story-stats,
  .story-pathways,
  .story-budget,
  .story-timeline,
  .story-cluster-proof,
  .story-market,
  .story-final {
    grid-template-columns: 1fr;
  }

  .story-cluster-number,
  .story-cluster-copy {
    min-height: 0;
  }

  .story-market-media img {
    min-height: 300px;
  }

  .story-subnav {
    top: 60px;
  }

  .story-section h2,
  .story-final h2 {
    font-size: clamp(2.35rem, 11vw, 3.35rem);
  }

  .story-thesis {
    padding: 28px;
  }

  .story-thesis blockquote {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  .story-caption {
    grid-template-columns: 1fr;
  }

  .story-final .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-progress {
    display: none;
  }
}

/* Final DTP pass for story pages. */
html,
body {
  overflow-x: clip;
}

.story-hero h1,
.story-deck,
.story-section h2,
.story-final h2,
.story-thesis blockquote,
.story-cluster-number strong {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.story-visual {
  box-shadow: 0 18px 44px rgba(10, 28, 15, 0.13);
}

@media (max-width: 760px) {
  .story-hero h1 {
    font-size: clamp(2.75rem, 11vw, 3.55rem);
    line-height: 1.04;
  }

  .story-deck {
    font-size: 1.08rem;
    line-height: 1.5;
  }

  .story-section h2,
  .story-final h2 {
    font-size: clamp(2rem, 8.4vw, 2.75rem);
    line-height: 1.08;
  }

  .story-thesis blockquote {
    font-size: clamp(1.9rem, 8.8vw, 2.7rem);
  }
}

/* Final story-page nav and button standardisation. */
.story-subnav {
  position: sticky;
  top: calc(var(--nav-height-final, 68px) + 10px);
  z-index: 92;
  width: min(calc(100% - 32px), 1180px);
  margin: 10px auto 0;
  border: 1px solid rgba(20, 23, 20, 0.11);
  border-radius: 999px;
  background: rgba(247, 248, 244, 0.90);
  box-shadow: 0 12px 32px rgba(20, 30, 23, 0.07);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  overflow: hidden;
}

.story-subnav-inner {
  width: 100%;
  max-width: none;
  min-height: 46px;
  gap: 8px;
  padding: 0 14px;
}

.story-subnav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(20, 23, 20, 0.66);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.story-subnav a:hover,
.story-subnav a:focus-visible {
  border-color: rgba(18, 103, 70, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--story-ink);
}

.story-final .button,
.story-page .button {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.12;
}

@media (max-width: 760px) {
  .story-subnav {
    top: calc(var(--nav-height-final, 62px) + 8px);
    width: calc(100% - 20px);
    margin-top: 8px;
    border-radius: 16px;
  }

  .story-subnav-inner {
    min-height: 42px;
    padding-inline: 8px;
  }

  .story-final .button,
  .story-page .button {
    min-height: 44px;
    padding-inline: 16px;
  }
}
