/* Palette follows the Copenhagen Business School identity (design.cbs.dk) */
:root {
  --cbs-blue: #4967AA;
  --cbs-dark: #242E70;
  --cbs-mid: #6793D6;
  --cbs-light: #C9E0F5;
  --cbs-green: #50A192;
  --cbs-red: #E66A57;

  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --surface-2: #EAF1FA;
  --ink: #1A2150;
  --ink-soft: #4A5480;
  --heading: var(--cbs-dark);
  --accent: var(--cbs-blue);
  --accent-strong: #3A5694;
  --line: #D5DFEE;
  --ok: #3E8C7E;
  --need: var(--cbs-red);
  --focus: #6793D6;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1433;
    --surface: #151D47;
    --surface-2: #1C2759;
    --ink: #E6ECF8;
    --ink-soft: #A9B5D6;
    --heading: #F2F5FC;
    --accent: #8FB0E8;
    --accent-strong: #B4CBF2;
    --line: #2A3772;
    --ok: #6FC2B3;
    --need: #F08D7D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1433; --surface: #151D47; --surface-2: #1C2759; --ink: #E6ECF8; --ink-soft: #A9B5D6;
  --heading: #F2F5FC; --accent: #8FB0E8; --accent-strong: #B4CBF2; --line: #2A3772; --ok: #6FC2B3; --need: #F08D7D;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-weight: 650; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--cbs-dark); display: grid; place-items: center; }
.brand-mark span { width: 12px; height: 12px; border: 2px solid var(--cbs-light); border-radius: 3px; box-shadow: 5px 5px 0 -2px var(--cbs-mid); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 12px; border-radius: var(--radius-s); font-size: 15px; }
.nav a:hover { color: var(--heading); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--heading); background: var(--surface-2); font-weight: 600; }

/* Type */
h1, h2, h3 { color: var(--heading); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; margin: 0 0 20px; max-width: 18ch; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 1.12rem; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
.lede { font-family: var(--serif); font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.5; color: var(--ink); max-width: 38em; margin: 0 0 16px; }
.muted { color: var(--ink-soft); }
.prose { font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; max-width: 40em; }
.prose p { margin: 0 0 1em; }
.kicker { color: var(--accent-strong); font-weight: 600; font-size: 15px; margin: 0 0 14px; }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 24px; color: var(--ink-soft); font-size: 15px; }

/* The chain */
.chain-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.chain-head p { margin: 0; max-width: 46ch; color: var(--ink-soft); font-size: 15px; }
.chain { list-style: none; margin: 0; padding: 8px 0 20px; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.chain li { flex: 0 0 auto; display: flex; align-items: stretch; scroll-snap-align: start; }
.chain li::before { align-self: center; }
.chain li + li::before {
  content: ""; width: 24px; height: 2px; background: var(--cbs-mid); position: relative;
  background-image: linear-gradient(90deg, var(--cbs-mid) 60%, transparent 0); background-size: 8px 2px;
}
.block {
  width: 192px; min-height: 196px; height: 100%; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-m);
  transition: border-color .2s, transform .2s;
}
.block:hover { border-color: var(--accent); transform: translateY(-2px); }
.block-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-soft); }
.block-year { font-weight: 700; color: var(--cbs-dark); font-size: 15px; background: var(--cbs-light); padding: 1px 8px; border-radius: 4px; }
:root[data-theme="dark"] .block-year { color: #0E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .block-year { color: #0E1433; } }
.block-title { font-weight: 650; color: var(--heading); font-size: 1.05rem; line-height: 1.25; }
.block-tag { font-size: 14px; color: var(--ink-soft); line-height: 1.4; flex: 1; }
.hash { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 8px; display: flex; justify-content: space-between; }
.hash b { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .chain li { opacity: 0; animation: link-in .5s ease forwards; }
  .chain li:nth-child(2) { animation-delay: .12s } .chain li:nth-child(3) { animation-delay: .24s }
  .chain li:nth-child(4) { animation-delay: .36s } .chain li:nth-child(5) { animation-delay: .48s }
  .chain li:nth-child(6) { animation-delay: .6s }
}
@keyframes link-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* Areas */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 32px; margin-top: 24px; }
.areas div { border-left: 3px solid var(--cbs-light); padding-left: 16px; }
.areas p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.stats { display: flex; gap: 40px; flex-wrap: wrap; align-items: baseline; margin: 16px 0 8px; }
.stat b { display: block; font-size: 2.2rem; color: var(--heading); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: 14px; }

/* Research list */
.paper-list { list-style: none; padding: 0; margin: 24px 0 0; }
.paper-list li { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.paper-list li:last-child { border-bottom: 1px solid var(--line); }
.paper-year { font-weight: 700; color: var(--accent-strong); font-size: 1.05rem; }
.paper-list h3 a { text-decoration: none; color: var(--heading); }
.paper-list h3 a:hover { color: var(--accent); }
.paper-list .meta { font-size: 14.5px; color: var(--ink-soft); margin: 2px 0 8px; }
.paper-list .tag { margin: 0; font-family: var(--serif); font-size: 1.02rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12.5px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-soft); }
.chip.oa { background: color-mix(in srgb, var(--cbs-green) 18%, transparent); color: var(--ok); }
@media (max-width: 600px) { .paper-list li { grid-template-columns: 1fr; gap: 4px; } }

/* Paper page */
.crumb { font-size: 14.5px; margin: 32px 0 20px; }
.crumb a { text-decoration: none; }
.paper-head h1 { max-width: 24ch; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.paper-head .meta { color: var(--ink-soft); margin: 0 0 4px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-s);
  font: 600 15px var(--sans); text-decoration: none; border: 1.5px solid var(--accent); cursor: pointer;
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent-strong); }
.btn.ghost:hover { background: var(--surface-2); color: var(--heading); }
:root[data-theme="dark"] .btn:not(.ghost) { color: #0E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost) { color: #0E1433; } }

.paper-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .paper-grid { grid-template-columns: 1fr; gap: 32px; } }
.findings { list-style: none; padding: 0; margin: 0; }
.findings li { padding: 12px 0 12px 28px; border-top: 1px solid var(--line); position: relative; }
.findings li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 10px; height: 10px; border-radius: 2px; background: var(--cbs-green); }
.note { font-size: 14px; color: var(--ink-soft); background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 14px; margin: 0 0 20px; }
.cite { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; font-size: 14.5px; }
.cite p { margin: 0 0 10px; }

/* Explainer player */
.player { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.stage { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.caption { padding: 16px 20px 6px; min-height: 104px; }
.caption strong { display: block; color: var(--heading); font-size: 1.15rem; letter-spacing: -0.01em; }
.caption span { color: var(--ink-soft); font-size: 15px; }
.controls { display: flex; align-items: center; gap: 10px; padding: 8px 14px 14px; }
.controls button {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--heading); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.controls button:hover { border-color: var(--accent); }
.controls button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.progress { flex: 1; display: flex; gap: 4px; }
.progress button { flex: 1; height: 6px; border-radius: 3px; border: 0; background: var(--line); padding: 0; cursor: pointer; overflow: hidden; width: auto; }
.progress button i { display: block; height: 100%; width: 0; background: var(--accent); }
.progress button.done i { width: 100%; }
.counter { font-size: 13px; color: var(--ink-soft); min-width: 44px; text-align: right; }

/* SVG scene styles */
.sv-node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.sv-node .glyph { stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sv-node text, .sv-label { fill: var(--ink); font: 600 15px var(--sans); }
.sv-sub { fill: var(--ink-soft); font: 500 13px var(--sans); }
.sv-arrow { stroke: var(--cbs-mid); stroke-width: 2; fill: none; stroke-dasharray: 6 5; }
.sv-arrowhead { fill: var(--cbs-mid); }
.sv-cell { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.sv-cell.on { fill: color-mix(in srgb, var(--cbs-light) 70%, var(--surface)); stroke: var(--accent); }
.sv-head { fill: var(--ink-soft); font: 600 13px var(--sans); }
.sv-celltext { fill: var(--heading); font: 600 14px var(--sans); }
.sv-bar.need { fill: var(--need); }
.sv-bar.bft { fill: var(--accent); }
.sv-bar.cft { fill: var(--cbs-green); }
.sv-axis { stroke: var(--line); stroke-width: 1; }
.sv-ref { stroke: var(--need); stroke-width: 1.5; stroke-dasharray: 5 4; }
.sv-reftext { fill: var(--need); font: 600 12px var(--sans); }
.sv-value { fill: var(--heading); font: 700 14px var(--sans); }
.sv-statement { fill: var(--heading); font: 700 30px var(--sans); letter-spacing: -0.02em; }
.sv-listnum { fill: var(--accent); font: 700 15px var(--sans); }
.sv-pill { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.sv-vs { fill: var(--ink-soft); font: 700 16px var(--sans); }
.anim { opacity: 0; transform-box: fill-box; transform-origin: center; }
.anim.in { opacity: 1; transition: opacity .55s ease, transform .55s ease; }
@media (prefers-reduced-motion: no-preference) {
  .anim { transform: translateY(8px); }
  .anim.in { transform: none; }
  .sv-arrow.in { animation: flow 1.2s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -22; } }

/* Teaching */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-top: 24px; }
.cols p { margin: 0; color: var(--ink-soft); }
.topics { columns: 2 280px; padding-left: 20px; margin: 16px 0 0; }
.topics li { margin-bottom: 8px; break-inside: avoid; }

/* Media */
.media-list { list-style: none; padding: 0; margin: 24px 0 0; }
.media-list li { display: grid; grid-template-columns: 72px 110px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.media-list .kind { color: var(--ink-soft); font-size: 14px; }
.media-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
@media (max-width: 600px) { .media-list li { grid-template-columns: 1fr; gap: 2px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14.5px; color: var(--ink-soft); margin-top: 40px; }
.foot-grid { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.foot-grid ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; gap: 16px; flex-wrap: wrap; }
.foot-grid h4 { margin: 0; color: var(--heading); font-size: 14px; }
.lang-switch a[aria-current="true"] { font-weight: 700; text-decoration: none; color: var(--heading); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sv-legend { fill: var(--ink-soft); font: 500 12px var(--sans); }
.media-list.guest li { grid-template-columns: 1fr; }
.media-list.guest h3 { margin: 0; }
.media-list.guest .kind { margin: 2px 0 6px; }

/* Chain carousel */
.chain-wrap { position: relative; }
.chain { scrollbar-width: none; scroll-behavior: smooth; }
.chain::-webkit-scrollbar { display: none; }
.block-mini { height: 92px; margin: -6px -6px 2px; border-radius: 8px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.block-mini svg { width: 100%; height: 100%; display: block; }
.block-mini .sv-node text, .block-mini .sv-label { font-size: 17px; }
.chain-ctl { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.chain-ctl button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--heading); display: grid; place-items: center; cursor: pointer; padding: 0; }
.chain-ctl button:hover { border-color: var(--accent); }
.explainer-video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--surface-2); display: block; }
.sub-h { margin: 24px 0 10px; font-size: 1rem; color: var(--ink-soft); }
.chip.link { background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.chip.link:hover { background: var(--accent-strong); color: #fff; }
:root[data-theme="dark"] .chip.link { color: #0E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.link { color: #0E1433; } }

/* Supervision page */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sup-stats { margin-top: 28px; gap: 28px 44px; }
.tm-scroll { overflow-x: auto; margin-top: 20px; }
.tm { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.tm th, .tm td { padding: 10px 4px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.tm thead th { border-top: 0; color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.tm tbody th { text-align: left; font-weight: 500; color: var(--ink); width: 30%; padding-right: 16px; }
.tm .cell { display: inline-flex; flex-wrap: wrap; gap: 3px; justify-content: center; max-width: 40px; }
.tdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; }
.t-dlt { background: #4967AA; } .t-rpa { background: #50A192; } .t-ent { background: #9AA6C8; } .t-plat { background: #E66A57; } .t-ai { background: #E3A33B; }
:root[data-theme="dark"] .t-dlt { background: #8FB0E8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-dlt { background: #8FB0E8; } }
.tm-key { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-soft); margin: 16px 0 0; }
.tm-key span { display: inline-flex; align-items: center; gap: 6px; }
.tx { width: 100%; min-width: 640px; table-layout: fixed; border-collapse: separate; border-spacing: 4px; font-size: 14px; margin-top: 16px; }
.tx thead th { font-weight: 500; color: var(--ink-soft); font-size: 13px; text-align: center; vertical-align: bottom; padding: 4px; }
.tx thead .tdot { display: block; margin: 0 auto 6px; }
.tx tbody th { text-align: left; font-weight: 500; width: 30%; padding: 0 12px 0 0; }
.tx td { text-align: center; height: 40px; border-radius: 6px; background: var(--surface-2); color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.tx td[style] { background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--surface-2)); color: var(--heading); }
.tx tr.tx-tot td, .tx tr.tx-tot th { background: transparent; color: var(--ink-soft); font-weight: 500; height: 28px; }
.tm-tot { width: 130px; text-align: left !important; white-space: nowrap; }
.tm td.tm-tot { display: flex; align-items: center; gap: 8px; }
.tm-bar { display: inline-block; height: 6px; width: calc(var(--w) * 0.8); min-width: 4px; border-radius: 3px; background: var(--cbs-light); }
.tm-tot b { font-variant-numeric: tabular-nums; color: var(--heading); }
.eras { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.eras li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0; padding: 18px 20px; }
.eras h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.eras p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.era-y { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.lv { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; margin-top: 24px; }
.lv-col { display: flex; flex-direction: column; align-items: stretch; height: 100%; justify-content: flex-end; gap: 6px; }
.lv-stack { height: var(--h); display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.lv-stack span { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; min-height: 0; }
.lv-b { background: var(--cbs-mid); color: #0E1433; }
.lv-m { background: var(--cbs-dark); color: #fff; }
.lv-y { text-align: center; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lv-key { font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.key-b { background: var(--cbs-mid); } .key-m { background: var(--cbs-dark); margin-left: 12px; }
:root[data-theme="dark"] .lv-m { background: #8FB0E8; color: #0E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lv-m, :root:not([data-theme="light"]) .key-m { background: #8FB0E8; color: #0E1433; } }
:root[data-theme="dark"] .key-m { background: #8FB0E8; }
@media (max-width: 560px) { .lv { gap: 4px; height: 160px; } .lv-y { font-size: 10px; } }
.tx td.hi { color: #fff; }
:root[data-theme="dark"] .tx td.hi { color: #0E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tx td.hi { color: #0E1433; } }
.explainer-video.yt { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); }
.explainer-video.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Private area */
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--need); border: 1px solid currentColor; border-radius: 99px; padding: 1px 8px; margin-left: 2px; }
.site-footer .signin { color: var(--ink-soft); }
