/* State of Separation 2026. Colours, type and logo use follow The Separation Guide Brand Guidelines v4 (Feb 2021):
   Green primary, Blue/Orange/Purple secondary, Grey in place of black, Beige and Light Beige neutrals, Stolzl (Typekit). */
:root {
  --green: #3cbcb3;        /* primary */
  --green-ink: #1d7f77;    /* green darkened for text on light backgrounds (contrast) */
  --blue: #1f93bf;
  --orange: #ea865f;
  --purple: #9e3e66;
  --light-purple: #c5638c;
  --light-blue: #b7dae9;
  --lightest-blue: #e2f1fa;
  --light-orange: #fbaa8a;
  --grey: #5a5a5c;         /* replaces black */
  --ink: #48484a;          /* headings: Grey, one step deeper for large type */
  --line: #dddddd;         /* Light Grey */
  --beige: #f5f3ee;
  --paper: #fbfaf8;        /* Light Beige */
  --brand-bar: linear-gradient(90deg, var(--green) 0 25%, var(--blue) 25% 50%, var(--orange) 50% 75%, var(--purple) 75%);
  --font: "stolzl", "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(72, 72, 74, .06), 0 8px 24px rgba(72, 72, 74, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--grey); font: 300 17px/1.65 var(--font); }
b, strong, h1, h2, h3, figcaption, summary, th { font-weight: 500; }
a { color: var(--blue); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.draft { background: var(--purple); color: #fff; text-align: center; font-size: 14px; padding: 8px 16px; }

/* site bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.topbar .logo { display: block; width: 180px; flex: none; }   /* brand minimum: 180px wide on screen */
.topbar .logo img { display: block; width: 100%; height: auto; }
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; padding: 11px 22px; border-radius: 999px; font-weight: 500; transition: background .2s, transform .2s; white-space: nowrap; }
.btn:hover { background: var(--green-ink); transform: translateY(-1px); }
.btn.small { padding: 9px 18px; font-size: 15px; }
.embed .topbar { display: none; }

/* hero */
.hero { background: var(--beige); padding: 56px 0 44px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--brand-bar); }
.eyebrow { color: var(--green-ink); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; margin: 0 0 14px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 56px); line-height: 1.08; margin: 0 0 20px; font-weight: 500; color: var(--ink); max-width: 20ch; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--purple); }
.hero .lede { font-size: 19px; max-width: 62ch; margin: 0; }
.hero-note { margin: 14px 0 0; max-width: 90ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.stat { background: #fff; border-radius: var(--radius); padding: 20px 20px 18px; box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--green)); }
.stat:nth-child(2) { --c: var(--blue); }
.stat:nth-child(3) { --c: var(--orange); }
.stat:nth-child(4) { --c: var(--purple); }
.stat b { display: block; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.1; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; display: block; margin-top: 8px; line-height: 1.45; }

/* sections */
section.block { padding: 52px 0; scroll-margin-top: 72px; }
section.block:nth-of-type(even) { background: #fff; }
.num { display: inline-block; color: var(--green-ink); background: rgba(60, 188, 179, .14); font-weight: 500; font-size: 13px; letter-spacing: .08em; padding: 3px 12px; border-radius: 999px; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; margin: 10px 0 14px; font-weight: 500; color: var(--ink); max-width: 26ch; letter-spacing: -.005em; }
h3 { font-size: 19px; margin: 0 0 8px; color: var(--ink); }
.cols { display: grid; grid-template-columns: 4fr 5fr; gap: 24px 48px; align-items: start; }
/* chart column: the chart, with any callout under it (moved there by app.js); a chart on its own stays in view beside longer text */
.aside { display: grid; gap: 20px; align-self: start; }
.aside .callout { margin: 0; }
.aside:not(:has(.callout)) { position: sticky; top: 104px; }
.embed .aside { position: static !important; }
/* footnotes, moved by app.js to a full-width row under both columns */
.foot { column-gap: 48px; margin-top: 24px; }
.foot::before { content: ''; display: block; border-top: 1px solid var(--line); margin-bottom: 14px; column-span: all; }
.foot:has(> .note ~ .note) { column-count: 2; }
.foot .note { margin: 0 0 8px; break-inside: avoid; }
.prose p { margin: 0 0 14px; max-width: 60ch; }
.prose .big { font-size: 21px; line-height: 1.5; color: var(--ink); }
.note { font-size: 14px; color: var(--grey); opacity: .9; }

/* charts */
figure.chart { margin: 0; background: #fff; border-radius: var(--radius); padding: 28px 28px 22px; box-shadow: var(--shadow); }
section.block:nth-of-type(even) figure.chart { background: var(--paper); box-shadow: none; border: 1px solid var(--line); }
figure.chart figcaption { color: var(--ink); font-size: 20px; margin-bottom: 4px; }
figure.chart .sub { font-size: 15px; margin-bottom: 20px; }
.chart .pair-head { font-size: 15px; font-weight: 600; color: var(--ink); margin: 16px 0 4px; }
.chart .pair-head:first-of-type { margin-top: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart svg text { font-family: var(--font); fill: var(--grey); }
/* SVG text is in viewBox units and scales down with the chart, so it is set larger than body copy */
.chart svg .lbl { font-size: 18px; }
.chart svg .val { font-size: 19px; font-weight: 500; fill: var(--ink); }
.chart svg .axis { font-size: 15px; }
.chart svg .track { fill: var(--beige); }
.chart .legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; margin-top: 12px; }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
details.data { margin-top: 14px; font-size: 14px; }
details.data summary { cursor: pointer; color: var(--blue); }
table { border-collapse: collapse; width: 100%; margin-top: 8px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* chart animation: bars grow and labels fade in when the chart scrolls into view */
.anim .bar { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 80ms); }
.anim .col { transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.anim .val, .anim .ref { opacity: 0; transition: opacity .4s ease; transition-delay: calc(var(--i, 0) * 80ms + 600ms); }
.anim.in .bar { transform: scaleX(1); }
.anim.in .col { transform: scaleY(1); }
.anim.in .val, .anim.in .ref { opacity: 1; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim .bar, .anim .col, .anim .val, .anim .ref, .reveal { transform: none !important; opacity: 1 !important; transition: none !important; }
}

/* cost build-up (stacked bar) */
.stack { display: flex; height: 44px; border-radius: 10px; overflow: hidden; margin: 6px 0 14px; background: var(--beige); }
.stack span { display: block; height: 100%; transform-origin: left; }
.stack-key { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stack-key li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; font-size: 15px; }
.stack-key i { width: 14px; height: 14px; border-radius: 4px; align-self: center; }
.stack-key b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* employers */
.employers { background: var(--lightest-blue) !important; }
.employers .lede { font-size: 21px; color: var(--ink); max-width: 60ch; margin: 0 0 8px; }
.stats.six { grid-template-columns: repeat(3, 1fr); margin: 24px 0 32px; }
.cols.two { grid-template-columns: 1fr 1fr; }
/* section 09: what support changes, with a card for each kind of customer */
#support-body { margin-top: 28px; }
#support-body .stats { margin: 0 0 28px; }
.cols.three { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.audience { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 8px; border-top: 4px solid var(--c, var(--green)); }
.audience h3 { margin: 0 0 10px; }
.audience p { font-size: 16px; }
.callout { background: var(--beige); border-left: 4px solid var(--purple); padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 18px 0; color: var(--ink); }
.callout p { margin: 0; }

/* calculator */
.calc { background: var(--lightest-blue); border-radius: var(--radius); padding: 30px; border: 1px solid var(--light-blue); }
.calc label { display: block; font-size: 14px; margin: 16px 0 6px; color: var(--ink); }
.calc input, .calc select { width: 100%; font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--light-blue); background: #fff; color: var(--ink); }
.calc .out { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
.calc .out div { background: #fff; border-radius: 12px; padding: 16px 18px; display: flex; align-items: baseline; gap: 14px; }
.calc .out div b { flex: none; }
.calc .out b { display: block; font-size: 30px; line-height: 1.15; color: var(--purple); font-weight: 500; font-variant-numeric: tabular-nums; }
.calc .out span { font-size: 13px; line-height: 1.4; display: block; margin-top: 4px; }

/* enquiry form */
.contact { background: var(--beige) !important; }
.lead { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.lead label { display: block; font-size: 14px; margin: 14px 0 6px; color: var(--ink); }
.lead input:not([type=checkbox]), .lead select { width: 100%; font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.lead [aria-invalid=true] { border-color: var(--purple); outline: 2px solid rgba(158, 62, 102, .25); }
.lead label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 18px 0; }
.lead label.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green-ink); flex: none; }
.lead button { border: 0; font: inherit; font-weight: 500; cursor: pointer; }
.lead button:disabled { opacity: .6; cursor: wait; }
.form-msg { font-size: 14px; margin: 12px 0 0; min-height: 1.4em; }
.form-msg.ok { color: var(--green-ink); }
.form-msg.error { color: var(--purple); }

/* about panel */
.about { background: var(--beige); }
.panel { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.warning { font-size: 13px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.placeholder { background: #fbf6e1; padding: 0 4px; border-radius: 4px; }
.calc-cta { font-size: 15px; margin: 14px 0 0; }
.chart .chart-note { font-size: 14px; line-height: 1.5; margin: 12px 0 0; }

/* method */
.method details { border-top: 1px solid var(--line); padding: 16px 0; }
.method summary { cursor: pointer; color: var(--ink); }
.method ol, .method ul { padding-left: 20px; }
.method li { margin-bottom: 8px; font-size: 15px; }

/* footer: Grey background, so the mono inversed logo (brand guidelines) */
footer { background: var(--grey); color: #fff; padding: 40px 0 48px; font-size: 13px; }
footer::before { content: ""; display: block; height: 6px; background: var(--brand-bar); margin-top: -40px; margin-bottom: 34px; }
footer a { color: #fff; }
footer .logo { width: 180px; display: block; margin-bottom: 18px; }
footer p { margin: 0 0 8px; opacity: .92; }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; gap: 24px; }
  .aside { position: static !important; }
  .foot { column-count: 1 !important; }
  .stats, .stats.six { grid-template-columns: 1fr 1fr; }
  .cols.two { grid-template-columns: 1fr; }
  .cols.three { grid-template-columns: 1fr; }
  .cols > * { min-width: 0; }
  .prose .btn { white-space: normal; text-align: center; }
}
@media (max-width: 460px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  section.block { padding: 40px 0; }
  .stat { padding: 16px; }
  .stat b { font-size: 24px; }
  .calc { padding: 20px; }
  .calc .out b { font-size: 22px; }
  .topbar .wrap { gap: 10px; }
  .topbar .btn.small { padding: 8px 12px; font-size: 14px; }
  figure.chart { padding: 18px; }
}
@media (max-width: 359px) {
  .topbar .btn.small { display: none; }
}
.embed .hero { padding-top: 48px; }

/* source line under each chart; TSG's own data gets a tag */
.src { font-size: 13px; color: var(--grey); margin: 12px 0 0; }
.src p { margin: 0; }
.src ul { margin: 4px 0 0; padding-left: 18px; }
.src li { margin: 2px 0; line-height: 1.5; }
.tag { display: inline-block; background: var(--green-ink); color: #fff; font-weight: 600; font-size: 13px; line-height: 1.5; padding: 1px 10px; border-radius: 999px; }

/* glossary: term and definition side by side, stacked on narrow screens */
.glossary h3 { margin: 32px 0 8px; color: var(--ink); }
.glossary dl { display: grid; grid-template-columns: minmax(180px, 28%) 1fr; gap: 10px 28px; margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.glossary dt { font-weight: 500; color: var(--ink); }
.glossary dd { margin: 0; }
@media (max-width: 640px) { .glossary dl { grid-template-columns: 1fr; gap: 2px; } .glossary dd { margin-bottom: 12px; } }

/* women and men compared: one block per finding */
.gpairs .pair-head { margin-top: 20px; }
.gp { padding: 12px 0; border-bottom: 1px solid var(--line); }
.gp:last-child { border-bottom: 0; }
.gp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; color: var(--ink); font-weight: 500; line-height: 1.35; }
.gp-gap { flex: none; font-size: 13px; font-weight: 500; color: var(--green-ink); background: var(--lightest-blue); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.gp-row { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 10px; margin: 4px 0; font-size: 14px; }
.gp-track { background: var(--beige); border-radius: 6px; height: 16px; overflow: hidden; }
.gp-bar { display: block; height: 100%; border-radius: 6px; }
.gp-val { text-align: right; color: var(--ink); }
.chart.anim .gp-bar { transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 40ms); }
.chart.anim.in .gp-bar { transform: none; }
@media (max-width: 640px) { .gp-head { flex-direction: column; gap: 4px; } }

/* hero: the saving from structured support, second only to the headline */
.subhead { font-size: clamp(22px, 3vw, 32px); line-height: 1.25; font-weight: 500; color: var(--ink); margin: -6px 0 22px; max-width: 30ch; }
.subhead em { font-style: normal; color: var(--green-ink); }
.subhead a { font-size: 15px; font-weight: 400; white-space: nowrap; }
#save-calc { margin-top: 24px; }
#save-calc .out b { color: var(--green-ink); }
