/* Case study: long read */

.case-top { padding-block: clamp(28px, 4vw, 48px) clamp(48px, 7vw, 88px); }
.case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: clamp(32px, 6vw, 64px); }
.case-top .arrow-link svg { transform: rotate(180deg); }
.case-top h1 { font-size: var(--step-4); line-height: 1.05; }
.case-top .lede { margin-top: 24px; font-size: var(--step-2); line-height: 1.35; color: var(--fg-2); }


.case-body { display: grid; grid-template-columns: minmax(0, 1fr); }

.chapter { padding-bottom: clamp(64px, 9vw, 120px); scroll-margin-top: 90px; }
.chapter > h2 { font-size: var(--step-3); margin-bottom: 22px; }
.chapter > h3 { font-size: var(--step-1); margin: 40px 0 10px; }
.chapter > p { color: var(--fg-2); }
.chapter > p + p { margin-top: 16px; }
.chapter > p strong { color: var(--fg); font-weight: 500; }
.chapter blockquote { margin: 28px 0 0; font-size: 1.1875rem; line-height: 1.35; }
.chapter blockquote cite { display: block; margin-top: 10px; font-size: var(--step--1); font-style: normal; color: var(--fg-3); }

.fig { margin-top: 32px; background: var(--stage); border-radius: 8px; padding: clamp(18px, 3.5vw, 44px); }
.fig figcaption { margin-top: 18px; color: var(--fg-3); font-size: var(--step--1); }
.fig svg { display: block; width: 100%; max-width: 760px; height: auto; margin-inline: auto; }
.fig svg text { font-family: var(--font); }

/* Phases */
.phases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.phases li { padding: 16px 14px 18px; background: var(--stage-2); }
.phases li:first-child { border-radius: 6px 0 0 6px; }
.phases li:last-child { border-radius: 0 6px 6px 0; }
.phases b { display: block; font-weight: 500; margin-bottom: 4px; }
.phases span { color: var(--fg-2); font-size: var(--step--1); line-height: 1.45; display: block; }
.phases li.hl { background: var(--idr); }
.phases li.hl span { color: var(--idr-ink); }
@media (max-width: 760px) {
  .phases { grid-template-columns: 1fr; }
  .phases li, .phases li:first-child, .phases li:last-child { border-radius: 0; }
  .phases li:first-child { border-radius: 6px 6px 0 0; }
  .phases li:last-child { border-radius: 0 0 6px 6px; }
}

/* Age bars */
.bars { display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 84px; gap: 14px; align-items: center; font-size: var(--step--1); }
.bars .track { height: 22px; background: var(--stage-2); border-radius: 3px; overflow: hidden; }
.bars .track, .bars .fill { display: block; }
.bars .fill { height: 100%; background: #5e5952; transform-origin: left; }
.bars li.via .fill { background: var(--idr); }
.bars .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-size: var(--step--1); color: var(--fg-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
@media (max-width: 560px) { .bars li { grid-template-columns: 80px 1fr 64px; gap: 8px; } }

/* Two column lists (value proposition) */
.vp { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.vp > div { background: var(--stage-2); padding: 20px; }
.vp > div:nth-child(1) { border-radius: 6px 0 0 0; }
.vp > div:nth-child(2) { border-radius: 0 6px 0 0; }
.vp > div:nth-child(5) { border-radius: 0 0 0 6px; }
.vp > div:nth-child(6) { border-radius: 0 0 6px 0; }
.vp h3 { font-weight: 500; font-size: var(--step-0); margin-bottom: 8px; }
.vp p { color: var(--fg-2); font-size: var(--step--1); line-height: 1.5; }
.vp-head { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 10px; color: var(--fg-3); font-size: var(--step--1); }
@media (max-width: 640px) {
  .vp, .vp-head { grid-template-columns: 1fr; }
  .vp-head span:last-child { display: none; }
  .vp > div { border-radius: 0 !important; }
}

/* Criteria */
.criteria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.criteria li { display: grid; gap: 8px; align-content: start; }
.criteria b { font-weight: 500; font-size: var(--step-1); line-height: 1.25; }
.criteria span { color: var(--fg-2); font-size: var(--step--1); }
.criteria .res { color: var(--fg); font-size: var(--step--1); }
.criteria .res.miss { color: var(--idr); }
@media (max-width: 760px) { .criteria { grid-template-columns: 1fr; } }

/* Results */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.results h3 { font-weight: 500; margin-bottom: 4px; }
.results p { color: var(--fg-2); font-size: var(--step--1); }
.results .big { font-size: var(--step-3); font-variant-numeric: tabular-nums; line-height: 1.05; margin-bottom: 10px; }
.stack { display: flex; height: 26px; border-radius: 3px; overflow: hidden; gap: 2px; margin: 4px 0 10px; }
.stack span { display: block; height: 100%; }
@media (max-width: 760px) { .results { grid-template-columns: 1fr; } }

/* Budget */
.budget .stack { height: 40px; }
.budget-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 32px; margin-top: 18px; font-size: var(--step--1); }
.budget-list li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: baseline; color: var(--fg-2); }
.budget-list i { width: 10px; height: 10px; border-radius: 2px; }
.budget-list b { font-weight: 400; color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .budget-list { grid-template-columns: 1fr; } }

/* Roadmap */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.road > div { background: var(--stage-2); padding: 18px; }
.road > div:first-child { border-radius: 6px 0 0 6px; background: var(--idr); }
.road > div:last-child { border-radius: 0 6px 6px 0; }
.road h3 { font-weight: 500; margin-bottom: 10px; }
.road li { color: var(--fg-2); font-size: var(--step--1); padding-block: 3px; }
.road > div:first-child li { color: var(--idr-ink); }
@media (max-width: 760px) { .road { grid-template-columns: 1fr 1fr; } .road > div { border-radius: 0 !important; } }

/* Team */
.team { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; color: var(--fg-2); }
.team li b { color: var(--fg); font-weight: 500; }

.case-end { padding-block: 32px clamp(64px, 9vw, 120px); display: flex; flex-wrap: wrap; gap: 12px; }

/* SVG model tokens */
.m-box { fill: var(--stage-2); }
.m-box-hl { fill: var(--idr); }
.m-line { stroke: #57534c; stroke-width: 1.5; fill: none; }
.m-line-hl { stroke: var(--idr); stroke-width: 2; fill: none; }
.m-t { fill: var(--fg); font-size: 15px; }
.m-t-b { fill: var(--fg); font-size: 16px; font-weight: 500; }
.m-t-2 { fill: var(--fg-2); font-size: 13px; }
.m-t-3 { fill: var(--fg-3); font-size: 13px; }
.m-t-ink { fill: var(--idr-ink); font-size: 15px; font-weight: 500; }
.m-dot { fill: var(--fg); }
.m-dot-hl { fill: var(--idr); }
.m-axis { stroke: #3d3a35; stroke-width: 1; }
.fig-scroll { overflow-x: auto; }
.fig-scroll svg { min-width: 640px; }
.fig > svg, .fig-scroll > svg { max-height: none; }

/* Report theme: one step lighter than the page so the sheet reads as a layer */
.report {
  --bg: #161514;
  --stage: #1e1d1b;
  --stage-2: #282624;
  background: var(--bg);
  color: var(--fg);
}
.report .criteria .res.miss { color: #ff5a3c; }
.phases li.hl b, .phases li.hl span, .road > div:first-child h3, .road > div:first-child li { color: var(--idr-ink); }

/* Light model boards: dark elements stand out on a pale surface */
.fig {
  --fg: #161616;
  --fg-2: #474644;
  --fg-3: #5c5b58;
  --stage-2: #1c1b1a;
  background: #ecebe8;
  color: var(--fg);
}
.fig .phases li, .fig .vp > div, .fig .road > div {
  --fg: #efece6; --fg-2: #b4afa6; --fg-3: #9a958c;
  color: var(--fg);
}
.fig .phases li.hl, .fig .road > div:first-child { --fg-2: #fff6f2; }
.fig svg .m-box { fill: #1c1b1a; }
.fig svg text.in { fill: #efece6; }
.fig svg .m-t-2.in, .fig svg .m-t-3.in { fill: #b4afa6; }
.fig .m-line { stroke: #8c887f; }
.fig .m-axis { stroke: #b9b5ad; }
.fig .bars .track { background: #d8d6d1; }
.fig .bars .fill { background: #3a3835; }
.fig .legend i[style*="5e5952"] { background: #3a3835 !important; }
.report .fig .criteria .res.miss { color: #a3220e; }
.budget-list li.is-design span, .budget-list li.is-design b { color: var(--idr); font-weight: 500; }
.vp h3 { font-weight: 600; }
.fig .vp > div:nth-child(even) { background: var(--idr); --fg: #fff; --fg-2: #fff6f2; color: #fff; }
.criteria b { font-weight: 600; }
#learned { padding-bottom: 0; }
.case-end { padding-top: clamp(32px, 4vw, 48px); }
.case-end .btn { min-height: 56px; padding: 0 28px; }

/* Text spans the full column, like the body copy */
.case-top h1, .case-top .lede, .chapter > h2, .chapter > h3, .chapter blockquote { max-width: none; text-wrap: pretty; }

/* Quotes sit against a thin rule */
.chapter blockquote { border-left: 1.5px solid var(--fg); padding-left: clamp(20px, 2.6vw, 32px); }
.chapter blockquote + blockquote { margin-top: 24px; }

/* Age groups as two stacked rows */
.bars-stack { gap: 14px; }
.bars-stack li { grid-template-columns: 140px 1fr 84px; }
.fig .bars-stack .track { display: flex; gap: 2px; height: 44px; background: none; }
.bars-stack .seg {
  display: flex; align-items: center; padding: 0 12px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums; color: #fff;
}
.bars-stack .s-idr { background: var(--idr); }
.bars-stack .s-idr-2 { background: #d9796a; color: #1c1b1a; }
.bars-stack .s-ink { background: #1c1b1a; }
.bars-stack .s-ink-2 { background: #6b6762; }
@media (max-width: 560px) { .bars-stack li { grid-template-columns: 1fr; gap: 6px; } .bars-stack .v { text-align: left; } }

/* Intro: two columns, sized like the project page overview */
.case-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.case-top h1 { font-size: var(--step-3); line-height: 1.2; }
.case-top .lede { margin-top: 16px; font-size: var(--step-0); line-height: 1.55; color: var(--fg-2); }
.case-intro-brief h2 { font-size: var(--step--1); font-weight: 400; color: var(--fg-3); line-height: 1.55; }
.case-intro-brief p { margin-top: 4px; }
.case-intro-brief blockquote {
  margin: 22px 0 0; padding-left: 16px; border-left: 1.5px solid var(--fg);
  font-size: var(--step-0); line-height: 1.5; text-wrap: pretty;
}
.case-intro-brief cite { display: block; margin-top: 8px; font-size: var(--step--1); font-style: normal; color: var(--fg-3); }
.case-top { padding-bottom: clamp(32px, 5vw, 56px); }
#brief .fig { margin-top: 0; }
@media (max-width: 800px) { .case-intro { grid-template-columns: 1fr; } }

/* Chapter opening in two columns: title and text left, first figure right */
.chapter-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.chapter-split-text h2 { font-size: var(--step-3); margin-bottom: 22px; }
.chapter-split-text p { color: var(--fg-2); }
.chapter-split > .fig { margin-top: 0; padding: clamp(16px, 2vw, 28px); }
.chapter-split .fig-scroll svg { min-width: 0; }
.chapter-split + .fig { margin-top: clamp(32px, 4vw, 48px); }
@media (max-width: 900px) {
  .chapter-split { grid-template-columns: minmax(0, 1fr); }
  .chapter-split > .fig { margin-top: 8px; }
  .chapter-split .fig-scroll svg { min-width: 640px; }
}

/* Added for the Aktivitets Forum case (new classes only, the IdrætsID case doesn't use them) */
.t-rodsol { --idr: #c8202e; --idr-ink: #ffffff; }
.t-paretify, .sheet.t-paretify { --idr: #8f6a45; --idr-ink: #ffffff; }
.t-paretify .chapter > blockquote + p, .t-paretify .chapter > .fig + p { margin-top: 28px; }
.t-paretify .chapter > p + .fig { margin-top: 28px; }
.fig-stack { display: grid; gap: 14px; }
.fig-stack img { display: block; width: 100%; height: auto; border-radius: 6px; }
.fig-label { display: block; margin-bottom: 6px; font-size: var(--step--1); color: var(--fg-3); }
.case-logo .on-light { display: none; }
[data-theme="light"] .case-logo .on-dark { display: none; }
[data-theme="light"] .case-logo .on-light { display: block; }
.sheet.t-rodsol .chapter > blockquote + p, .sheet.t-rodsol .chapter > .fig + p { margin-top: 28px; }
.fig-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fig-photos img, .fig > img { display: block; width: 100%; height: auto; border-radius: 6px; }
.fig-photos.is-tall { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.fig .problems li { --fg: #efece6; --fg-2: #b4afa6; background: var(--stage-2); color: var(--fg); padding: 16px 16px 18px; }
.problems li b { display: block; font-weight: 500; line-height: 1.35; }
.problems li span { display: block; margin-top: 6px; font-size: var(--step--1); color: var(--fg-2); line-height: 1.45; }
.fig .problems li.hl { background: var(--idr); --fg-2: #ffe9eb; }
.problems li:first-child { border-radius: 6px 0 0 0; }
.problems li:nth-child(3) { border-radius: 0 6px 0 0; }
.problems li:nth-child(4) { border-radius: 0 0 0 6px; }
.problems li:last-child { border-radius: 0 0 6px 0; }
.concepts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.concepts li { display: grid; gap: 8px; align-content: start; }
.concepts img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border-radius: 6px; background: #fff; }
.concepts b { font-weight: 600; font-size: var(--step-1); margin-top: 6px; }
.concepts span { color: var(--fg-2); font-size: var(--step--1); line-height: 1.5; }
.concepts .res { color: var(--fg); font-weight: 500; }
.concepts .res.is-chosen { color: var(--idr); }
.report .fig .concepts .res.is-chosen { color: #a8121e; }
.t-rodsol .chapter > blockquote + p, .t-rodsol .chapter > .fig + p { margin-top: 28px; }
.t-rodsol .chapter > p + .fig { margin-top: 28px; }
.case-logo.is-light { background: #fff; }
.case-logo.is-light img { height: 46px; }
/* Same logos as the landing page and About timeline, without a background tile */
.case-logo.is-plain { width: auto; height: 56px; background: none; border-radius: 0; place-items: center start; }
.case-logo.is-plain img { height: 56px; width: auto; }
@media (max-width: 640px) {
  .fig-photos, .fig-photos.is-tall, .concepts { grid-template-columns: 1fr; }
  .problems { grid-template-columns: 1fr; }
  .problems li, .problems li:first-child, .problems li:nth-child(3), .problems li:nth-child(4), .problems li:last-child { border-radius: 0; }
}

/* DIF mark beside the case title */
.case-logo { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 24px; border-radius: 6px; background: var(--idr); }
.case-logo img { width: auto; height: 32px; }
.case-intro-brief p + p { margin-top: 14px; }
