:root {
  --ink: #172d3c;
  --muted: #5d6d78;
  --line: #dce3e7;
  --paper: #fff;
  --ground: #f1f4f5;
  --rust: #c54b32;
  --blue: #274b65;
  --green: #4d897c;
  --gold: #d1a34b;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; text-underline-offset: 3px; }
button, a, input, summary { touch-action: manipulation; }
button, select { cursor: pointer; }
button { color: var(--blue); }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -90px; left: 12px; z-index: 20; background: white; padding: 15px; }
.skip-link:focus { top: 8px; }

.banner {
  padding: 20px 32px;
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(420px, 1.7fr) minmax(200px, .65fr);
  gap: 26px;
  align-items: center;
  border-top: 4px solid var(--rust);
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 12px; letter-spacing: .1em; font-weight: 800; line-height: 1.5; }
.brand-mark { font-size: 35px; letter-spacing: -3px; white-space: nowrap; line-height: 1; }
.brand-mark > span { color: var(--rust); padding: 0 3px; }
.brand b { font-weight: 450; font-size: 10px; letter-spacing: 0; color: var(--muted); }
.banner-message { display: flex; gap: 24px; align-items: center; min-width: 0; }
.banner h1 { font-size: clamp(26px, 2.25vw, 34px); line-height: 1.04; letter-spacing: -1.3px; margin: 0; white-space: nowrap; }
.banner h1 span { color: var(--rust); }
.banner-message p { font-size: 12px; line-height: 1.6; margin: 0; max-width: 330px; }
.banner-message strong { font-weight: 650; }
.banner-note { font-size: 12px; line-height: 1.65; color: var(--muted); border-left: 1px solid var(--line); padding-left: 20px; margin: 0; }

.pillar-nav { display: flex; align-items: stretch; position: sticky; top: 0; z-index: 6; background: rgba(255, 255, 255, .98); padding: 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 26px; }
.pillar-nav > a { padding: 17px 4px 14px; font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; }
.pillar-nav > a > span { font-size: 11px; font-weight: 500; color: var(--muted); margin-right: 8px; }
.pillar-nav > a[aria-current="page"] { border-color: var(--rust); color: var(--rust); }
.pillar-nav > .nav-hint { margin-left: auto; align-self: center; color: var(--muted); font-size: 12px; font-weight: 500; min-height: 36px; padding: 9px 0; border-bottom: 0; text-decoration: underline; }
.pillar-nav > .nav-hint:hover { color: var(--rust); }

main { padding: 24px 32px 0; outline: none; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 14px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; color: var(--muted); }
.view-heading h2 { font-size: clamp(27px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -1.1px; margin: 0; text-wrap: balance; }
.view-heading p:not(.eyebrow) { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 9px 0 0; max-width: 850px; }
.view-links { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 12px; color: var(--blue); }
.view-links a { display: inline-flex; align-items: center; min-height: 36px; }

.story-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0 0 17px; margin: 0 0 19px; border-bottom: 1px solid #cbd6dc; }
.story-nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; font-size: 12px; font-weight: 650; color: var(--blue); text-decoration: none; }
.story-nav a:hover { color: var(--rust); text-decoration: underline; }
.story-section:focus, .card:focus { outline: none; }
.story-section { margin: 0 0 36px; scroll-margin-top: 80px; }
.story-heading { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 15px; }
.story-number { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 4px; background: var(--ink); color: white; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.story-heading > div { min-width: 0; padding-top: 1px; }
.story-heading h3 { font-size: 20px; font-weight: 750; letter-spacing: -.45px; line-height: 1.3; margin: 0; }
.story-description { font-size: 13px; line-height: 1.5; margin: 5px 0 0; color: var(--muted); max-width: 950px; }
.story-section--lead .story-number { background: var(--rust); }
.story-section + .story-section { padding-top: 25px; border-top: 1px solid #cbd6dc; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px #19364a04; scroll-margin-top: 80px; }
.card-header { padding: 20px 22px 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin-bottom: 10px; }
.card-kicker { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .055em; text-transform: uppercase; margin: 0 0 9px; line-height: 1.5; }
.card-meta .card-kicker { margin: 0; }
.evidence-tag { display: inline-flex; align-items: center; flex-shrink: 0; border: 1px solid #dce4e9; border-radius: 3px; padding: 3px 6px; background: #f3f6f8; color: var(--blue); font-size: 10px; line-height: 1.3; font-weight: 650; white-space: nowrap; }
.card h3, .card .card-title { font-size: 22px; font-weight: 750; letter-spacing: -.6px; line-height: 1.2; margin: 0; text-wrap: pretty; }
.card .lead { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 9px 0 0; }
.card .lead strong { color: var(--ink); font-weight: 650; }
.card .stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; margin: 13px 0 2px; font-size: 34px; line-height: 1.15; letter-spacing: -1px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat small { font-size: 12px; line-height: 1.5; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.chart-wrap { padding: 12px 13px 6px; min-width: 0; }
.chart-axis { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 7px 10px 0; display: flex; justify-content: space-between; gap: 10px; }
.chart-axis > span:last-child { text-align: right; }
.data-chart { display: block; width: 100%; height: auto; overflow: visible; }
.axis-label { font-family: inherit; font-size: 11px; fill: #5b6b75; }
.axis-grid { stroke: #e4e9ec; stroke-width: 1; }
.axis-zero { stroke: #97a7b0; stroke-width: 1.2; }
.value-label { font-family: inherit; font-size: 12px; fill: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-mark, .chart-point { cursor: crosshair; outline: none; }
.chart-mark:hover, .chart-mark:focus { filter: brightness(.9); stroke: #122e42; stroke-width: 2; }
.chart-point:hover circle:last-child, .chart-point:focus circle:last-child { r: 5; stroke: var(--ink); stroke-width: 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; font-size: 12px; color: #52636f; margin: 3px 10px 12px; line-height: 1.4; }
.chart-legend > span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.treemap-label, .treemap-value { fill: white; font-family: inherit; }
.treemap-label { font-weight: 600; }
.treemap-value { font-weight: 750; }

.card-bottom { padding: 13px 22px 10px; margin-top: auto; border-top: 1px solid #edf0f2; background: #fcfdfd; font-size: 12px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.card-bottom > p { margin: 0 0 8px; }
.card-bottom > p:last-child { margin-bottom: 4px; }
.source-line { font-size: 12px; }
.cite { color: var(--blue); font-weight: 650; font-size: 12px; white-space: nowrap; text-decoration: none; margin-left: 3px; }
.cite:hover { text-decoration: underline; }
.card details { margin-top: 2px; }
.card summary { cursor: pointer; display: list-item; min-height: 36px; padding: 9px 0; font-size: 12px; line-height: 1.5; font-weight: 650; color: var(--blue); }
.card details p { font-size: 12px; line-height: 1.6; margin: 5px 0 10px; }
.controls { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 12px 0 2px; }
.controls label { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--blue); font-size: 12px; line-height: 1.4; cursor: pointer; }
.controls input { accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }
.controls select { min-height: 36px; max-width: 100%; padding: 7px 10px; color: var(--blue); background: white; border: 1px solid var(--line); border-radius: 4px; }
.chip { min-height: 36px; border: 1px solid #cdd8de; border-radius: 4px; background: white; padding: 8px 12px; font-size: 12px; line-height: 1.3; }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: white; }
.compare-note { padding: 11px 12px; background: #f5f7f8; font-size: 12px; line-height: 1.55; margin: 9px 9px 12px; border-left: 2px solid #a1b5be; color: var(--muted); }
.compare-note strong { color: var(--ink); }
.formula { background: #f4f6f7; padding: 12px; margin: 8px 10px; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; line-height: 1.55; border-radius: 4px; }
.formula strong { color: var(--rust); }
.mini-table { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 8px; }
.mini-table td, .mini-table th { padding: 7px 3px; text-align: right; border-bottom: 1px solid #e8edf0; }
.mini-table td:first-child, .mini-table th:first-child { text-align: left; }
.pension-amount-summary { margin: 0 10px 18px; }
.pension-amount-summary .lead { margin-top: 5px; }
.debt-chart-panel { min-width: 0; }
.debt-chart-panel h5 { margin: 10px 10px 0; font-size: 13px; font-weight: 650; line-height: 1.4; }
.debt-chart-panel + .debt-chart-panel { border-top: 1px solid var(--line); padding-top: 6px; }
.debt-chart-panel .chart-axis { margin-top: 6px; }
.card--wide { grid-column: 1 / -1; }

.references { margin-top: 35px; padding-top: 25px; border-top: 1px solid #cbd6dc; scroll-margin-top: 80px; }
.references h3 { font-size: 23px; margin: 0 0 8px; letter-spacing: -.5px; }
.references-intro { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0 0 18px; }
.reference-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 25px; padding: 0; list-style: none; margin: 0; }
.reference-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 7px; font-size: 12px; line-height: 1.6; padding: 13px 8px; border-top: 1px solid #dce3e7; scroll-margin-top: 80px; outline: none; overflow-wrap: anywhere; }
.reference-list li:target { background: #fff6e7; box-shadow: inset 3px 0 var(--gold); }
.reference-number { color: var(--blue); font-weight: 700; }
.reference-type { display: block; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.reference-title { font-weight: 650; }
.reference-scope { margin: 5px 0; color: var(--muted); }
.reference-original { font-size: 12px; color: var(--blue); }
.inspiration { font-size: 12px; color: var(--muted); margin: 20px 0 0; line-height: 1.6; }
.site-footer { margin: 32px 32px 0; padding: 20px 0 25px; display: flex; gap: 25px; align-items: center; border-top: 1px solid #cbd6dc; font-size: 12px; color: var(--muted); }
.site-footer > span { font-weight: 700; white-space: nowrap; }
.site-footer p { max-width: 750px; margin: 0; line-height: 1.6; }
.site-footer > a { margin-left: auto; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
#chart-tooltip { position: fixed; z-index: 30; max-width: min(350px, calc(100vw - 24px)); padding: 12px 14px; background: #172d3c; color: white; border-radius: 5px; box-shadow: 0 4px 20px #132b3f30; white-space: pre-line; font-size: 13px; line-height: 1.5; pointer-events: none; font-variant-numeric: tabular-nums; }

@media (min-width: 1100px) {
  .card--wide { display: grid; grid-template-columns: minmax(250px, .32fr) minmax(0, .68fr); align-items: start; }
  .card--wide .card-header { padding: 25px 24px; }
  .card--wide .chart-wrap { padding: 18px 18px 10px 0; }
  .card--wide .card-bottom { grid-column: 1 / -1; width: 100%; }
  #incentive-debt.card--wide { display: flex; align-items: stretch; }
  #incentive-debt.card--wide .card-header { padding: 22px 24px 0; }
  #incentive-debt.card--wide .chart-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 8px 18px 16px; }
  #incentive-debt.card--wide .debt-chart-panel + .debt-chart-panel { border-top: 0; border-left: 1px solid var(--line); padding-top: 0; padding-left: 20px; }
}

@media (min-width: 1800px) {
  .reference-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1150px) {
  .banner { grid-template-columns: 220px 1fr; }
  .banner-note { display: none; }
  .banner-message { justify-content: space-between; }
  .banner-message p { max-width: 290px; }
  .view-links { flex-direction: column; align-items: flex-start; gap: 0; }
  .card-header { padding: 18px 18px 0; }
  .card-bottom { padding: 12px 18px 9px; }
  .card h3, .card .card-title { font-size: 21px; }
}

@media (max-width: 800px) {
  .banner { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .brand-mark { font-size: 30px; }
  .brand b { display: none; }
  .brand { font-size: 11px; }
  .banner-message { justify-content: flex-start; gap: 28px; }
  .banner h1 { font-size: 30px; }
  .banner-message p { max-width: 330px; }
  .pillar-nav { padding: 0 20px; gap: 22px; }
  .pillar-nav > a { font-size: 13px; padding-top: 16px; padding-bottom: 13px; }
  .pillar-nav > .nav-hint { display: none; }
  main { padding: 22px 20px 0; }
  .dashboard-grid, .dashboard-grid--support { grid-template-columns: 1fr; gap: 16px; }
  .view-heading { display: block; }
  .view-heading h2 { font-size: 29px; }
  .view-links { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: 14px; margin-top: 8px; }
  .story-nav { gap: 3px 17px; margin-bottom: 20px; padding-bottom: 12px; }
  .story-heading h3 { font-size: 20px; }
  .story-section { margin-bottom: 28px; }
  .story-section + .story-section { padding-top: 22px; }
  .reference-list { grid-template-columns: 1fr; }
  .site-footer { margin: 26px 20px 0; flex-wrap: wrap; gap: 13px; }
  .site-footer p { order: 3; max-width: none; }
  .card h3, .card .card-title { font-size: 23px; }
  .card-header { padding: 20px 20px 0; }
  .card-bottom { padding: 13px 20px 9px; }
}

@media (max-width: 520px) {
  .banner-message { display: block; }
  .banner h1 { font-size: 31px; white-space: normal; }
  .banner-message p { margin-top: 11px; max-width: none; }
  .banner h1 br { display: block; }
  .card-meta { gap: 6px 8px; }
  .card-kicker { font-size: 10px; }
  .chart-axis { font-size: 11px; }
  .data-chart .axis-label { font-size: 16px; }
  .data-chart .value-label { font-size: 18px; }
  #migration-nl .axis-label, #migration-dk .axis-label, #incentive-per .axis-label { font-size: 14px; }
}

@media (max-width: 420px) {
  .banner { padding: 16px; gap: 15px; }
  .pillar-nav { padding: 0 12px; gap: 10px; justify-content: space-between; }
  .pillar-nav > a { font-size: 12px; }
  .pillar-nav > a > span { margin-right: 3px; font-size: 10px; }
  main { padding: 20px 12px 0; }
  .view-heading h2 { font-size: 27px; }
  .view-links { font-size: 12px; }
  .story-heading { gap: 9px; }
  .story-heading h3 { font-size: 19px; }
  .story-number { width: 26px; height: 26px; }
  .card-header { padding: 18px 15px 0; }
  .card-bottom { padding: 12px 15px 8px; }
  .card h3, .card .card-title { font-size: 22px; }
  .chart-wrap { padding: 9px 5px 5px; }
  .chart-legend { gap: 7px 12px; }
  .card .stat { font-size: 32px; }
  .site-footer { margin-inline: 12px; }
}

/* Monetary amounts take priority within the incentives evidence cards. */
#incentivos .card--economic .stat {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 4px;
  padding: 13px 17px;
  border-left: 3px solid var(--rust);
  border-radius: 0 5px 5px 0;
  background: #fbf2ed;
  color: #9d3d29;
  font-size: clamp(38px, 3.8vw, 52px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1.5px;
}
#incentivos .card--economic .stat small {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
#incentivos .card--economic .lead strong { font-size: 16px; font-weight: 750; }
#incentivos .card--economic .chart-axis { color: var(--ink); font-weight: 600; }
#incentivos .card--economic .value-label { font-size: 15px; font-weight: 800; }
#incentivos .card--economic .debt-chart-panel h5 { font-size: 15px; font-weight: 750; }
#incentivos .card--economic .card-bottom > p:first-child { color: var(--ink); font-weight: 600; }
#incentive-per .stat { font-size: 42px; font-weight: 800; color: var(--blue); }

@media (max-width: 520px) {
  #incentivos .card--economic .stat { font-size: 38px; padding: 12px 14px; }
  #incentive-per .stat { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
