/* Selma audience research: shared styles, built from the selma.au design tokens */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #FFFFFF;
  --black: #1D1D1F;
  --grey: #6E6E73;
  --muted: #86868B;
  --light-grey: #F5F5F7;
  --line: rgba(0,0,0,0.09);
  --accent: #534AB7;
  --accent-light: #9B95D8;
  --accent-dark: #3D358A;
  --accent-wash: #EEEDF8;
  --night: #0A0A0C;
  --pad: clamp(64px, 8vw, 120px);
  --good: #1E7F4F;
  --warn: #9A5B00;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 60px); }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 60px); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 56px; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 60px);
}
.nav-logo { font-size: 17px; font-weight: 700; color: var(--black); letter-spacing: -0.01em; white-space: nowrap; }
.nav-logo span { font-weight: 400; font-size: 12px; color: var(--accent); margin-left: 6px; }
.nav-links { display: flex; gap: clamp(12px, 2.2vw, 28px); list-style: none; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--grey); white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--black); }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 4px; }
@media (max-width: 860px) {
  .nav-inner { height: auto; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { width: 100%; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 78vh; background: var(--night);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 clamp(56px, 8vh, 96px); overflow: hidden; color: white;
}
.hero.short { min-height: 56vh; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; opacity: 0.9; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,12,0.25) 0%, rgba(10,10,12,0.5) 45%, rgba(10,10,12,0.92) 100%);
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero-byline { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 18px; }
.hero-title { font-size: clamp(40px, 7.5vw, 96px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 20px; max-width: 14ch; }
.hero.short .hero-title { font-size: clamp(36px, 6vw, 72px); max-width: 18ch; }
.hero-sub { font-size: clamp(17px, 2.2vw, 24px); font-weight: 300; color: rgba(255,255,255,0.72); line-height: 1.5; max-width: 620px; }

/* ---------- SECTIONS ---------- */
section { padding: var(--pad) 0; }
section.grey { background: var(--light-grey); }
section.tight { padding: calc(var(--pad) * 0.6) 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 24px; max-width: 22ch; }
h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -0.01em; margin: 40px 0 12px; line-height: 1.3; }
h4 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
p { margin-bottom: 1em; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.65; color: var(--grey); max-width: 760px; }
.prose { max-width: 760px; color: #333336; font-size: 17px; }
.prose p { margin-bottom: 1.1em; }
.prose ul, .list { margin: 0 0 1.2em 1.2em; }
.prose li, .list li { margin-bottom: 0.45em; }
.centre { text-align: center; }
.centre h2, .centre .lead { margin-left: auto; margin-right: auto; }
.statement { font-size: clamp(22px, 3.2vw, 36px); font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; max-width: 820px; margin: 0 auto; }
.muted { color: var(--grey); }
.small { font-size: 14px; }

/* ---------- STAT TILES ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 32px; }
.stat { background: var(--white); border-radius: 18px; padding: 26px 24px; border: 0.5px solid var(--line); }
section.grey .stat { border: none; }
.stat-num { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--black); }
.stat-label { font-size: 14px; color: var(--grey); margin-top: 8px; line-height: 1.45; }
.stat-src { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- CARDS ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; margin-top: 32px; }
.card { background: var(--white); border-radius: 18px; padding: 28px 26px; border: 0.5px solid var(--line); display: flex; flex-direction: column; }
section.grey .card { border: none; }
.card p { color: var(--grey); font-size: 15px; }
.card .num { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }
.card h3 { margin-top: 0; }
.card .keyline { font-size: 15px; color: var(--black); font-weight: 600; margin-top: auto; padding-top: 14px; border-top: 0.5px solid var(--line); }
a.card { color: inherit; transition: transform 0.15s, box-shadow 0.15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.card .go { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 12px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 24px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: var(--light-grey); border-radius: 18px; padding: 28px; }
section.grey .panel { background: var(--white); }
.panel h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.panel ul { margin-left: 1.1em; }
.panel li { margin-bottom: 0.7em; font-size: 15.5px; color: #333336; }

/* ---------- TABLES ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0 8px; border-radius: 14px; border: 0.5px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); background: var(--light-grey); padding: 12px 16px; border-bottom: 0.5px solid var(--line); vertical-align: bottom; }
section.grey th { background: #FAFAFB; }
td { padding: 12px 16px; border-bottom: 0.5px solid var(--line); vertical-align: top; color: #333336; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td strong { color: var(--black); }
tr.hl td { background: var(--accent-wash); }
.caption { font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 900px; }

/* ---------- TAGS ---------- */
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 50px; vertical-align: middle; white-space: nowrap; }
.tag.v { background: #E6F3EC; color: var(--good); }
.tag.s { background: #EEF0F4; color: #4A5060; }
.tag.e { background: #FBF0E0; color: var(--warn); }
.tag.a { background: var(--accent-wash); color: var(--accent-dark); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 50px; background: var(--accent-wash); color: var(--accent-dark); margin: 0 6px 6px 0; }

/* ---------- AUDIENCE SUB-NAV ---------- */
.subnav { background: var(--light-grey); border-bottom: 0.5px solid var(--line); }
.subnav .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 14px; padding-bottom: 14px; scrollbar-width: none; }
.subnav a { font-size: 13px; font-weight: 600; color: var(--grey); padding: 7px 16px; border-radius: 50px; white-space: nowrap; background: var(--white); }
.subnav a.active { background: var(--accent); color: white; }

/* ---------- CALLOUTS ---------- */
.callout { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: 20px 24px; border-radius: 0 14px 14px 0; margin: 28px 0; max-width: 820px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-dark); }
.quote { font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; max-width: 820px; }
.quote cite { display: block; font-size: 14px; font-weight: 500; color: var(--grey); font-style: normal; margin-top: 12px; }

/* ---------- TIMELINE ---------- */
.timeline { margin-top: 32px; position: relative; }
.tl-item { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 18px 0; border-top: 0.5px solid var(--line); }
.tl-date { font-weight: 700; color: var(--accent); font-size: 15px; }
.tl-item h4 { font-size: 17px; }
.tl-item p { color: var(--grey); font-size: 15px; margin: 0; }
.tl-item.past .tl-date { color: var(--muted); }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- BAR CHARTS (HTML) ---------- */
.chart { margin-top: 28px; max-width: 900px; }
.chart-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.chart-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 14px; align-items: center; margin-bottom: 10px; position: relative; }
.bar-label { font-size: 14px; color: #333336; text-align: right; line-height: 1.3; }
.bar-track { position: relative; height: 26px; }
.bar { position: absolute; top: 0; height: 26px; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar.alt { background: var(--accent-light); }
.bar-range { position: absolute; top: 3px; height: 20px; background: var(--accent); border-radius: 4px; min-width: 6px; }
.bar-range.alt { background: var(--accent-light); }
.bar-val { position: absolute; top: 3px; font-size: 13px; font-weight: 600; color: var(--black); white-space: nowrap; }
.bar-row[data-tip] { cursor: default; }
.bar-row:hover .bar, .bar-row:hover .bar-range { filter: brightness(1.12); }
.axis { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 14px; margin-top: 4px; }
.axis-ticks { position: relative; height: 18px; border-top: 0.5px solid rgba(0,0,0,0.2); }
.axis-ticks span { position: absolute; top: 4px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 640px) {
  .bar-row, .axis { grid-template-columns: 1fr; gap: 4px; }
  .bar-label { text-align: left; }
  .axis > div:first-child { display: none; }
}
#tip { position: fixed; pointer-events: none; z-index: 2000; background: var(--black); color: white; font-size: 13px; line-height: 1.45; padding: 8px 12px; border-radius: 8px; max-width: 280px; opacity: 0; transition: opacity 0.1s; }

/* ---------- CALCULATOR ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.calc-inputs { background: var(--white); border-radius: 18px; padding: 28px; }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label output { color: var(--accent); font-variant-numeric: tabular-nums; }
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.calc-out { background: var(--night); color: white; border-radius: 18px; padding: 28px; }
.calc-out .row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 0.5px solid rgba(255,255,255,0.12); font-size: 15px; }
.calc-out .row:last-child { border-bottom: none; }
.calc-out .row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-out .big { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 16px; }
.calc-out .lbl { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-light); font-weight: 700; }
.calc-out .note { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.presets button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--accent); color: var(--accent); background: white; padding: 6px 14px; border-radius: 50px; cursor: pointer; }
.presets button:hover, .presets button.on { background: var(--accent); color: white; }

/* ---------- POSITION MAP ---------- */
.map-wrap { background: var(--white); border-radius: 18px; padding: 20px; margin-top: 28px; overflow-x: auto; }
.map-wrap svg { width: 100%; min-width: 640px; height: auto; display: block; }

/* ---------- SOURCES ---------- */
.sources { font-size: 13px; color: var(--grey); margin-top: 28px; padding-top: 20px; border-top: 0.5px solid var(--line); }
.sources h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sources ol { margin-left: 1.3em; columns: 2; column-gap: 40px; }
.sources li { margin-bottom: 6px; break-inside: avoid; word-break: break-word; }
@media (max-width: 800px) { .sources ol { columns: 1; } }

/* ---------- FOOTER ---------- */
footer { background: var(--night); color: rgba(255,255,255,0.55); padding: 56px 0; font-size: 14px; }
footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer strong { color: white; }
footer a { color: var(--accent-light); }
.next-link { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.btn { display: inline-block; font-size: 15px; font-weight: 600; background: var(--accent); color: white; padding: 13px 28px; border-radius: 50px; }
.btn:hover { background: var(--accent-dark); color: white; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.ghost:hover { background: var(--accent-wash); color: var(--accent-dark); }

@media print {
  .nav, .subnav { display: none; }
  .hero { min-height: auto; padding-top: 60px; }
  section { padding: 40px 0; }
}
