/* Pay equity family: the shared type system, neutral base and accents of the HR reporting tools (Pay Gap Report,
 * Equality Action Plan, Menopause Adjustments, Pay Transparency Kit, Job Evaluation). The PDFs they write take the same
 * type and colours from /assets/pe-pdf.js. Scoped to
 * body.pe, so the shared header, footer and every other tool keep their own look. Load it after /assets/tools.css and
 * before the tool's own stylesheet, and give the body "pe" plus the tool's class (pe-pgr, pe-eap, pe-ma, pe-ptk, pe-je).
 *
 * The idea is a compliance binder: white report sheets on a grey filing desk, headings set wide and heavy like the
 * cover of a statutory report, tabular figures, and one coloured divider tab per tool. Data colours are the same in
 * every tool (women green, men grey), so a chart means the same thing wherever it appears.
 * Type: Archivo (Omnibus-Type, SIL Open Font License, /assets/fonts/OFL-archivo.txt), two cuts made from the variable
 * font: "Archivo Expanded" (width 118, weights 700 to 800) for h1 and h2, "Archivo" (width 100, 400 to 700) for the rest. */

@font-face { font-family: "Archivo Expanded"; src: url("/assets/fonts/archivo-expanded-latin.woff2") format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo Expanded"; src: url("/assets/fonts/archivo-expanded-latin-ext.woff2") format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Arial (bold for the expanded cut) scaled to Archivo's average width and line metrics, worked out from the font files,
   so text keeps roughly its line breaks while the web font arrives */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); size-adjust: 98.6%; ascent-override: 89%; descent-override: 21.3%; line-gap-override: 0%; }
@font-face { font-family: "Archivo Expanded Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); font-weight: 700 800; size-adjust: 121.7%; ascent-override: 72.2%; descent-override: 17.3%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
body.pe {
  /* the base every family tool shares */
  --pe-desk: #e6e9e4;          /* the grey filing desk the sheets lie on */
  --pe-desk-2: #d8ddd6;        /* a closed tab, a hovered row */
  --pe-sheet: #ffffff;         /* a report sheet */
  --pe-ink: #121a17;
  --pe-ink-2: #36423d;
  --pe-muted: #59665f;
  --pe-line: rgba(18, 26, 23, 0.13);
  --pe-line-2: rgba(18, 26, 23, 0.26);
  /* data: the same in every tool */
  --pe-women: #11995a;         /* fills, with ink text on them */
  --pe-women-ink: #0b7a45;     /* the same green as text on white */
  --pe-men: #c9cfd4;
  --pe-men-ink: #4f5b63;
  --pe-on-women: #0b130f;      /* text set on the fills */
  --pe-on-men: #0b130f;
  /* one divider tab per tool: a fill for large areas and an ink shade that carries white text and small text */
  --pe-tab-pgr: #11995a; --pe-tab-pgr-ink: #0b7a45;   /* Pay Gap Report: ledger green */
  --pe-tab-eap: #e0442a; --pe-tab-eap-ink: #c0321c;   /* Equality Action Plan: sign-off red */
  --pe-tab-ma: #9b5bb0; --pe-tab-ma-ink: #7d3c93;     /* Menopause Adjustments: heather */
  --pe-tab-ptk: #f0a800; --pe-tab-ptk-ink: #8a5b00;   /* Pay Transparency Kit: amber, with ink type on the fill */
  --pe-tab-je: #2f6fd6; --pe-tab-je-ink: #2257b8;     /* Job Evaluation: index blue */
  --pe-ok: #1d7a45; --pe-warn: #9a4a12;               /* status, kept apart from the tool colours */

  /* mapped onto the shared system so the components in /assets/tools.css follow */
  --paper: var(--pe-desk); --paper-2: var(--pe-desk-2); --card: var(--pe-sheet);
  --ink: var(--pe-ink); --ink-2: var(--pe-ink-2); --muted: var(--pe-muted); --line: var(--pe-line); --line-2: var(--pe-line-2);
  --accent: var(--pe-accent, var(--pe-tab-pgr-ink)); --accent-ink: #ffffff; --accent-text: var(--accent);
  --accent-fill: var(--pe-accent-fill, var(--pe-tab-pgr));
  --accent-soft: color-mix(in oklab, var(--accent-fill) 9%, var(--pe-sheet));
  --warn: var(--pe-warn); --ok: var(--pe-ok);
  --women: var(--pe-women); --men: var(--pe-men);
  --sans: "Archivo", "Archivo Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo Expanded", "Archivo Expanded Fallback", "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: var(--sans);
  --pe-r: 4px;                 /* sheets and controls */
  --pe-r-tab: 7px;             /* the top corners of a tab */
  background: var(--pe-desk); color: var(--pe-ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.55;
}
body.pe-pgr { --pe-accent: var(--pe-tab-pgr-ink); --pe-accent-fill: var(--pe-tab-pgr); }
body.pe-eap { --pe-accent: var(--pe-tab-eap-ink); --pe-accent-fill: var(--pe-tab-eap); }
body.pe-ma { --pe-accent: var(--pe-tab-ma-ink); --pe-accent-fill: var(--pe-tab-ma); }
body.pe-ptk { --pe-accent: var(--pe-tab-ptk-ink); --pe-accent-fill: var(--pe-tab-ptk); }
body.pe-je { --pe-accent: var(--pe-tab-je-ink); --pe-accent-fill: var(--pe-tab-je); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.pe {
    --pe-desk: #101512; --pe-desk-2: #1d2621; --pe-sheet: #171e1a; --pe-ink: #e7ece8; --pe-ink-2: #c4cdc7; --pe-muted: #9ba7a1;
    --pe-line: rgba(231, 236, 232, 0.12); --pe-line-2: rgba(231, 236, 232, 0.24);
    --pe-women: #2fb878; --pe-women-ink: #6fd8a3; --pe-men: #59646c; --pe-men-ink: #b4bec5; --pe-on-men: #ffffff;
    --pe-tab-pgr-ink: #6fd8a3; --pe-tab-eap-ink: #ff8c72; --pe-tab-ma-ink: #d9a8ea; --pe-tab-ptk-ink: #f2c35a; --pe-tab-je-ink: #9dbcff;
    --pe-ok: #7cc493; --pe-warn: #e3a36b; --accent-ink: #0b130f;
  }
}
:root[data-theme="dark"] body.pe {
  --pe-desk: #101512; --pe-desk-2: #1d2621; --pe-sheet: #171e1a; --pe-ink: #e7ece8; --pe-ink-2: #c4cdc7; --pe-muted: #9ba7a1;
  --pe-line: rgba(231, 236, 232, 0.12); --pe-line-2: rgba(231, 236, 232, 0.24);
  --pe-women: #2fb878; --pe-women-ink: #6fd8a3; --pe-men: #59646c; --pe-men-ink: #b4bec5; --pe-on-men: #ffffff;
  --pe-tab-pgr-ink: #6fd8a3; --pe-tab-eap-ink: #ff8c72; --pe-tab-ma-ink: #d9a8ea; --pe-tab-ptk-ink: #f2c35a; --pe-tab-je-ink: #9dbcff;
  --pe-ok: #7cc493; --pe-warn: #e3a36b; --accent-ink: #0b130f;
}

/* ---------- Type ---------- */
.pe h1, .pe h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.012em; line-height: 1.06; text-wrap: balance; overflow-wrap: break-word; }
.pe h1 { font-size: clamp(32px, 3.4vw, 48px); }
.pe h2 { font-size: clamp(23px, 2.2vw, 30px); line-height: 1.12; }
.pe h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; letter-spacing: -0.005em; line-height: 1.25; }
.pe h1 em, .pe h2 em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }
.pe .lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.pe a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pe a:hover { color: var(--accent-text); }
.pe :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.pe ::selection { background: var(--accent-fill); color: #fff; }
.pe .num, .pe td.num, .pe th.num, .pe table { font-variant-numeric: tabular-nums; }
.pe td.num, .pe th.num { font-family: var(--sans); }
.pe code, .pe kbd { font-family: var(--sans); font-stretch: normal; font-size: 0.92em; font-weight: 600; color: var(--ink-2); background: color-mix(in oklab, var(--pe-desk) 70%, var(--pe-sheet)); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.pe .crumbs { font-size: 14px; }
.pe .crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); }

/* Small labels: sentence case in the text face, never spaced capitals or a typewriter face */
.pe .eyebrow, .pe .group-title, .pe .pe-title, .pe .g-box h2 { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.pe .pro-tag { font-family: var(--sans); font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 2px 7px; border-radius: 3px; background: var(--ink); color: var(--card); vertical-align: 0.15em; }

/* ---------- Header and footer: the shared partials, on the family's desk ---------- */
.pe .site-head { background: var(--pe-desk); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line-2); }
.pe .head-nav a[aria-current="page"] { background: var(--card); box-shadow: inset 0 -2px 0 var(--accent-fill); border-radius: 4px 4px 0 0; }
.pe .site-foot { border-top: 1px solid var(--line-2); }

/* ---------- Controls ---------- */
.pe .btn { border-radius: var(--pe-r); font-weight: 600; font-size: 15px; }
.pe .btn-sm { font-size: 14px; }
.pe .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pe .btn-primary:hover { background: color-mix(in oklab, var(--accent) 84%, #000); border-color: transparent; color: var(--accent-ink); }
.pe .btn-ink { background: var(--ink); border-color: var(--ink); color: var(--card); }
.pe .btn-ink:hover { background: var(--ink-2); color: var(--card); }
.pe .input, .pe .select { border-radius: var(--pe-r); background: var(--card); font-size: 15.5px; }
.pe .input:focus, .pe .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-fill) 22%, transparent); }
.pe .input-unit .input { font-family: var(--sans); font-size: 15px; }
.pe .input-unit i { font-family: var(--sans); font-size: 13px; }
.pe .seg { border-radius: var(--pe-r); background: var(--card); }
.pe .seg button { border-radius: 2px; font-weight: 600; }
.pe .seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.pe .drop { border-radius: var(--pe-r); }
.pe .hint { color: var(--muted); }

/* ---------- Sheets, tables, notes ---------- */
.pe .table-wrap { border-radius: var(--pe-r); background: var(--card); }
.pe th { background: color-mix(in oklab, var(--pe-desk) 55%, var(--card)); font-size: 13.5px; color: var(--ink-2); }
.pe .callout { border-left-color: var(--accent-fill); border-radius: 0 var(--pe-r) var(--pe-r) 0; }
.pe .source { color: var(--muted); }
.pe .prose p, .pe .prose li { color: var(--ink-2); }

/* Questions: a drawn plus that turns into a minus */
.pe .faq { border-top: 2px solid var(--ink); }
.pe .faq summary { font-weight: 600; font-size: 17px; }
.pe .faq summary::after { content: ""; position: absolute; right: 6px; top: 26px; width: 12px; height: 2px; background: var(--ink); transform: none; font: inherit; }
.pe .faq summary::before { content: ""; position: absolute; right: 11px; top: 21px; width: 2px; height: 12px; background: var(--ink); transition: transform .2s var(--ease); }
.pe .faq details[open] summary::after { transform: none; }
.pe .faq details[open] summary::before { transform: scaleY(0); }

/* Related pages: a ruled index */
.pe .related { border-top: 2px solid var(--ink); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 28px; }
.pe .related a { padding: 14px 0; }
.pe .related a strong { font-weight: 700; }
.pe .related a:hover strong { color: var(--accent-text); }

/* ---------- The pay equity tools block: divider tabs, one per tool, in the tool's colour ---------- */
.pe .pe-block { margin: 40px 0 0; }
.pe .pe-title { margin: 0 0 14px; }
.pe .pe-list { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 8px; align-items: stretch; }
.pe .pe-list a { display: grid; grid-template-rows: auto 1fr; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; height: 100%; color: var(--ink); }
.pe .pe-list a strong { justify-self: start; max-width: 100%; padding: 8px 12px 7px; border-radius: var(--pe-r-tab) var(--pe-r-tab) 0 0; background: var(--tool, var(--accent)); color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.pe .pe-list a span { display: block; padding: 12px 13px 14px; border: 1px solid var(--line-2); border-top: 3px solid var(--tool, var(--accent)); border-radius: 0 var(--pe-r) var(--pe-r) var(--pe-r); background: var(--card); color: var(--muted); font-size: 14px; line-height: 1.45; }
.pe .pe-list a:hover strong { color: #fff; }
.pe .pe-list a:hover span { color: var(--ink-2); }
.pe .pe-list a[aria-current="page"] span { background: color-mix(in oklab, var(--tool, var(--accent)) 7%, var(--card)); color: var(--ink-2); }
.pe .pe-list a[aria-current="page"] strong::after { content: ", this tool"; font-weight: 500; }
/* the Pay Transparency Kit's tab is amber, so it carries ink type (white on amber would be 2.1:1); the card's --tool
   comes inline from tools.json as the darker amber, so the fill is set here */
.pe .pe-list a[href="/pay-transparency/"] strong, .pe .pe-list a[href="/pay-transparency/"]:hover strong { background: var(--pe-tab-ptk); color: #121a17; }
.pe .pe-list a[href="/pay-transparency/"] span { border-top-color: var(--pe-tab-ptk); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pe .pe-list a[href="/pay-transparency/"] strong { background: var(--pe-tab-ptk); color: #121a17; } }
:root[data-theme="dark"] .pe .pe-list a[href="/pay-transparency/"] strong { background: var(--pe-tab-ptk); color: #121a17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pe .pe-list a strong { color: #0b130f; background: color-mix(in oklab, var(--tool, var(--accent)) 45%, #ffffff); } }
:root[data-theme="dark"] .pe .pe-list a strong { color: #0b130f; background: color-mix(in oklab, var(--tool, var(--accent)) 45%, #ffffff); }

/* ---------- Hero: the heading and the tool's 3D figure ---------- */
.pe-hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(22px, 3.6vw, 56px); align-items: center; padding: clamp(14px, 2.4vw, 28px) 0 clamp(22px, 3vw, 36px); }
.pe-hero .lede { margin: 16px 0 0; }
.pe-hero-meta { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); max-width: 62ch; }
.pe-hero-meta strong { color: var(--ink); font-weight: 600; }
.pe-hero-fig { margin: 0; min-width: 0; }
.pe-hero-fig img { width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--pe-r); }
.pe-hero-fig figcaption { margin: 9px 0 0; font-size: 13.5px; color: var(--muted); max-width: 70ch; }
@media (max-width: 900px) { .pe-hero { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Pro: what it adds, and the price ---------- */
.pe .pro { border-radius: var(--pe-r); border-color: var(--ink); }
.pe .pro-right { background: var(--ink); color: var(--card); }
.pe .pro-right .price { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
.pe .pro-right .price small { font-family: var(--sans); }
.pe .pro-right .btn-primary { background: var(--card); border-color: var(--card); color: var(--ink); }
.pe .pro-right .btn-primary:hover { background: #fff; color: var(--pe-ink); }
.pe .pro-list li::before { border-radius: 1px; transform: none; width: 9px; height: 9px; margin-top: 8px; background: var(--accent-fill); border: 0; }
.pe .split { border-radius: var(--pe-r); }
.pe .split > div + div { background: var(--accent-soft); }
.pe .split > div + div li::before { background: var(--accent-fill); }
.pe .shot img { border-radius: var(--pe-r); }
.pe .shot figcaption strong { color: var(--ink); }

/* ---------- Guide pages ---------- */
.pe .g-box { border-radius: var(--pe-r); }
.pe .g-box h2 { margin: 0; }
.pe .g-cta { background: var(--ink); border-color: var(--ink); }
.pe .g-cta strong { color: var(--card); }
.pe .g-cta p { color: color-mix(in oklab, var(--card) 80%, transparent); }
.pe .g-cta .btn-primary { background: var(--card); border-color: var(--card); color: var(--ink); }
.pe .g-cta .btn-primary:hover { background: #fff; color: var(--pe-ink); }
.pe .g-main h2 { font-size: clamp(22px, 2vw, 28px); }
.pe .g-main .formula { font-family: var(--sans); font-weight: 600; font-size: 15px; border-radius: var(--pe-r); }
.pe .g-main .code-cell { font-family: var(--sans); font-size: 13.5px; font-weight: 600; }
.pe .g-main code { font-family: var(--sans); }
.pe .g-main blockquote { border-left-color: var(--accent-fill); border-radius: 0 var(--pe-r) var(--pe-r) 0; }
.pe .g-figure { border-radius: var(--pe-r); }
.pe .g-figure dt { font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.pe .g-figure dd { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; }
.pe-guide-meta { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }
/* Tables on a phone: every row becomes a block and every cell takes the full width of the sheet, with its column's
   name in front (data-h, set by /assets/pay-equity.js). Tables a tool lays out itself (the measures, the column
   matching) keep their own rules in the tool's stylesheet; these only make sure nothing stays a narrow column. */
@media (max-width: 640px) {
  .pe main table { min-width: 0 !important; }
  .pe main table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pe main table, .pe main table tbody, .pe main table tr, .pe main table td, .pe main table tbody th, .pe main table caption { display: block; width: 100% !important; max-width: none !important; }
  .pe main table caption { text-align: left; }
  .pe main table tr { padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .pe main table tbody tr:last-child { border-bottom: 0; }
  .pe main table td, .pe main table tbody th { border: 0; padding: 2px 0; text-align: left !important; white-space: normal !important; }
  .pe main table td[data-h]::before, .pe main table tbody th[data-h]::before { content: attr(data-h) ": "; color: var(--muted); font-weight: 400; font-size: 13.5px; }
  .pe main .table-wrap { overflow-x: visible; }
}

/* Below the first screen, skip layout until a section is near the viewport */
/* (not #guides: it sits right above the footer, and skipping its layout puts the footer in the wrong place for tools
   that read the page, such as contrast checkers) */
.pe #method, .pe #proof, .pe #pro, .pe #faq { content-visibility: auto; contain-intrinsic-size: auto 900px; }
