/* Shared by every page except Privacy, loaded after the landing page stylesheet (styles-*.css).
   1. Buttons and header (also used on the landing page)   2. Highlight colours   3. Inner-page hero and body */

/* ---------- 1. Buttons: one style everywhere, sized and rounded per UX4G (radius-md 8px; M 40px, L 48px) ---------- */
.button, .nav-cta { gap: 8px !important; min-height: 48px; border-radius: 8px !important; padding: 0 20px !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.25 !important; white-space: nowrap; box-shadow: none; }
.button i { width: 16px; height: 16px; }
.nav-cta { min-height: 40px; padding: 0 16px !important; font-size: 14px !important; }
.hero .text-link, .menu-toggle { border-radius: 8px; }
.contact-layout .button.primary { min-height: 48px; border-radius: 8px !important; padding: 0 22px !important; }
.text-link, .site-header nav a { white-space: nowrap; }

/* Landing "Time is precious" chat panel: the landing stylesheet rounds only its top-right corner much more (64px); match all four */
.citizen-stage { border-radius: 24px; }
@media (width <= 480px) { .citizen-stage { border-radius: 16px; } }

/* ---------- Header: same box before and after scrolling, never wraps ---------- */
.site-header .nav, .site-header.is-solid .nav { width: min(1158px, calc(100% - 48px)); height: 74px; margin: 10px auto 4px; padding-inline: 22px; }
.site-header nav > a[aria-current] { color: var(--orange) !important; }
.site-header .brand img { mix-blend-mode: multiply; } /* the logo's white tile would show on the tinted landing hero */
.nav-menu-cta { display: none; }
@media (width <= 1100px) {
  /* Menu button instead of inline links, so nothing has to wrap */
  .site-header .menu-toggle { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid #cbd7e3; background: #ffffffb8; }
  .site-header .menu-toggle i { width: 20px; height: 20px; }
  .site-header .nav-cta { margin-left: auto; }
  .site-header #navigation { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid #dce4e8; border-radius: 16px; background: #fffffff5 !important; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 12px 30px #122f461f; }
  .site-header #navigation.open { display: flex; }
  .site-header #navigation a { width: 100%; min-height: 48px; display: flex; align-items: center; padding: 0 16px; border-radius: 8px; color: var(--ink) !important; font-size: 15px; }
  .site-header #navigation a:hover { background: #f1f5f6; }
}
@media (width <= 800px) {
  .site-header .nav, .site-header.is-solid .nav { height: 66px; margin: 8px auto 0; padding-inline: 15px; }
  /* On phones the demo button moves into the menu */
  .site-header .nav-cta { display: none !important; }
  .site-header .menu-toggle { margin-left: auto; }
  .site-header #navigation a.nav-menu-cta, .pg-page .site-header:not(.is-solid) #navigation a.nav-menu-cta { display: flex; justify-content: center; margin-top: 6px; background: var(--ink) !important; color: #fff !important; font-weight: 650; }
}
@media (width <= 480px) {
  .site-header .nav, .site-header.is-solid .nav { width: calc(100% - 24px); padding-inline: 12px; }
}

/* Inner pages open on a dark hero, so the header reads light until it turns into the glass box */
.pg-page .site-header .brand img { mix-blend-mode: normal; border-radius: 8px; }
.pg-page .site-header:not(.is-solid) .brand, .pg-page .site-header:not(.is-solid) nav > a { color: #fff !important; }
.pg-page .site-header:not(.is-solid) nav > a:hover { color: var(--accent-light) !important; }
.pg-page .site-header:not(.is-solid) nav > a[aria-current] { color: var(--accent-light) !important; }
.pg-page .site-header:not(.is-solid) .nav-cta { background: #fff !important; color: var(--ink) !important; }
.pg-page .site-header:not(.is-solid) .menu-toggle { color: #fff; background: #ffffff1f; border-color: #ffffff4d; }
@media (width <= 1100px) {
  .pg-page .site-header:not(.is-solid) #navigation a { color: var(--ink) !important; }
}

/* ---------- 2. Highlight colour of the accented words, by kind of page ---------- */
.theme-violet { --accent: #5b3f9a; --accent-light: #cbb8ff; }
.theme-teal   { --accent: #1d6252; --accent-light: #7fdcc3; }
.theme-amber  { --accent: #96590a; --accent-light: #ffcf70; }
.theme-blue   { --accent: #1f5f9f; --accent-light: #94c6f7; }
.theme-rose   { --accent: #b0295f; --accent-light: #ffa3c6; }
.theme-orange { --accent: #ac4a24; --accent-light: #f6ad7f; }
.pg-band h2 span { color: var(--accent); }

/* Focus ring as in UX4G: 2px outline, 2px offset */
.pg-page :focus-visible { outline: 2px solid #bd592f; outline-offset: 2px; }
.pg-page .pg-hero :focus-visible, .pg-page .contact-section :focus-visible { outline-color: #fff; }

/* ---------- 3. Page hero: Parliament at night, from the landing page artwork ---------- */
.pg-hero { position: relative; min-height: 630px; /* floors = tallest hero (transformer blueprint) per breakpoint; re-measure if a page gets a longer intro */ display: flex; align-items: center; padding-block: 132px 72px; background-color: #061b38; background-image: linear-gradient(90deg, #031227f5 0%, #031227e0 36%, #0312278c 62%, #03122726 100%), url(/assets/hero-parliament-wide-D39mMpA8.png); background-size: cover; background-position: 70% 62%; }
.pg-hero > .container { width: 100%; }
.pg-hero h1 { max-width: 24ch; color: #fff; font-size: clamp(36px, 3.6vw, 54px); text-wrap: balance; text-shadow: 0 2px 30px #03122780; }
.pg-hero h1 span { color: var(--accent-light); }
.pg-crumbs { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; color: #b9c8d8; font-size: 14px; font-weight: 500; }
.pg-crumbs a:hover { color: #fff; }
.pg-crumbs li + li::before { content: "/"; padding-inline: 6px 10px; color: #7f93a8; }
.pg-eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 12px; border: 1px solid #ffffff38; border-radius: 99px; background: #ffffff14; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pg-lead { margin: 20px 0 0; max-width: 72ch; color: #d3deea; font-size: 19px; line-height: 1.75; text-wrap: pretty; }
.pg-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 34px; }
.pg-actions a:not(.button) { color: #fff; font-size: 13px; font-weight: 600; }
.pg-hero .button.primary { min-height: 48px; background: #fff !important; color: var(--ink) !important; }
.pg-hero .button.primary:hover { background: #eef3f7 !important; }

/* ---------- Bands: white, mint, blue-grey and cream, as on the landing page ---------- */
.pg-band { padding-block: 64px; }
.pg-band-1 { background: #edf3ef; }
.pg-band-2 { background: #edf3f6; }
.pg-band-3 { background: #f4eee3; }
.pg-band h2 { font-size: clamp(28px, 2.7vw, 38px); text-wrap: balance; }
.pg-split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px 48px; align-items: start; }
.pg-copy p { margin: 0 0 16px; max-width: 66ch; text-wrap: pretty; }
.pg-copy > :last-child { margin-bottom: 0; }
.pg-copy p:first-child { color: var(--ink); font-size: 19px; line-height: 1.7; }
.pg-copy .check-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pg-copy .check-list li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 18px; border: 1px solid #dde5e3; border-radius: 8px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.55; max-width: 66ch; }
.pg-copy .check-list i { width: 22px; height: 22px; margin-top: 2px; color: var(--teal); }
.pg-copy .check-list svg { stroke-width: 2.4; }
.pg-copy a, .pg-sources a, .pg-table a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.pg-copy a:hover, .pg-sources a:hover, .pg-table a:hover { color: var(--orange); }
.pg-split + .pg-grid, .pg-split + .pg-links, .pg-split + .pg-table, .pg-copy + .pg-grid { margin-top: 40px; }

/* Cards: the grid fits as many 280px columns as it can (4, 3, 2 or 1). The colours follow the column count
   (container queries on the grid's own width, at the exact widths where a column is added), so each column keeps one colour. */
.pg-grid { container-type: inline-size; counter-reset: card; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.pg-card { counter-increment: card; display: flex; flex-direction: column; padding: 28px 24px 24px; border: 1px solid #0000000d; border-radius: 12px; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.pg-card::before { content: counter(card, decimal-leading-zero); margin-bottom: 22px; color: var(--num); font: 700 40px/1 Manrope, sans-serif; letter-spacing: -.04em; }
/* 1 column (under 580px): the four colours in reading order, one per row */
.pg-card:nth-child(4n+1) { --num: #5b3f9a; background: #ece4fc; }
.pg-card:nth-child(4n+2) { --num: #1d6252; background: #d5efe8; }
.pg-card:nth-child(4n+3) { --num: #7a5410; background: #ffecb8; }
.pg-card:nth-child(4n+4) { --num: #9b2c55; background: #fddbe9; }
@container (min-width: 580px) { /* 2 columns: 2 × 280 + 20 */
  .pg-card:nth-child(odd) { --num: #5b3f9a; background: #ece4fc; }
  .pg-card:nth-child(even) { --num: #1d6252; background: #d5efe8; }
}
@container (min-width: 880px) { /* 3 columns: 3 × 280 + 2 × 20 */
  .pg-card:nth-child(3n+1) { --num: #5b3f9a; background: #ece4fc; }
  .pg-card:nth-child(3n+2) { --num: #1d6252; background: #d5efe8; }
  .pg-card:nth-child(3n+3) { --num: #7a5410; background: #ffecb8; }
}
@container (min-width: 1180px) { /* 4 columns: 4 × 280 + 3 × 20 */
  .pg-card:nth-child(4n+1) { --num: #5b3f9a; background: #ece4fc; }
  .pg-card:nth-child(4n+2) { --num: #1d6252; background: #d5efe8; }
  .pg-card:nth-child(4n+3) { --num: #7a5410; background: #ffecb8; }
  .pg-card:nth-child(4n+4) { --num: #9b2c55; background: #fddbe9; }
}
.pg-card h2, .pg-card h3 { margin: 0; font-size: 21px; max-width: none; text-wrap: balance; }
.pg-card p { margin: 12px 0 22px; color: #3d5261; font-size: 15px; line-height: 1.6; }
.pg-more { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.pg-more i { width: 16px; height: 16px; transition: transform .2s; }
.pg-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px #00000029, 0 4px 8px #00000014; } /* UX4G shadow-l3 */
.pg-card:hover .pg-more i { transform: translateX(4px); }

/* Related pages and sources as pill links */
.pg-links { margin-top: 36px; padding-top: 26px; border-top: 1px solid #00000014; }
.pg-split + .pg-links { margin-top: 40px; }
.pg-band h2.pg-label { max-width: none; margin: 0 0 18px; color: var(--muted); font: 700 12px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.pg-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.pg-links li a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 18px; border: 1px solid #cfd9db; border-radius: 99px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.pg-links li a i { flex-shrink: 0; width: 15px; height: 15px; }
.pg-links li a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.pg-sources li a { text-decoration: none; }

/* Table */
.pg-table { margin-top: 28px; overflow: auto; border: 1px solid #d4dde0; border-radius: 12px; background: #fff; }
.pg-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-table th, .pg-table td { padding: 16px 18px; text-align: left; vertical-align: top; min-width: 10rem; border-bottom: 1px solid #e4eaec; }
.pg-table thead th { background: var(--ink); color: #fff; font-weight: 600; }
.pg-table tbody th { color: var(--ink); font-weight: 650; }
.pg-table td { color: var(--muted); }
.pg-table tr:last-child > * { border-bottom: 0; }
.pg-band h2#project-map { margin: 56px 0 20px; font-size: clamp(24px, 2.2vw, 30px); }

/* Leadership photos, as on the landing page */
.pg-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 8px; max-width: 560px; }
.pg-people figure { margin: 0; }
.pg-people img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 20%; border-radius: 12px; background: #e4e9e6; }
.pg-people figcaption { display: grid; gap: 2px; margin-top: 14px; padding-bottom: 14px; border-bottom: 1px solid #00000022; }
.pg-people strong { color: var(--ink); font: 650 17px/1.3 Manrope, sans-serif; }
.pg-people span { color: var(--muted); font-size: 14px; }

/* Privacy page: room for the shared header, which overlays the top of the page */
/* Full-bleed hero so its gradient reaches the right edge; text stays in the 1160px column */
.privacy-page .privacy-hero { max-width: none; margin: 0; padding-top: 140px; padding-inline: max(40px, calc((100% - 1160px) / 2)); }
@media (width <= 650px) { .privacy-page .privacy-hero { padding-inline: 20px; } }
.privacy-page .privacy-toc { top: 104px; max-height: calc(100dvh - 124px); }
.privacy-page .privacy-content > section { scroll-margin-top: 110px; }
@media (width <= 650px) { .privacy-page .privacy-hero { padding-top: 112px; } }

/* 404: one full-screen hero with ways back into the site */
.pg-hero.pg-hero-404 { min-height: 100svh; }
.pg-hero .button.pg-ghost { min-height: 48px; border: 1px solid #ffffff59; background: #ffffff14; color: #fff; backdrop-filter: blur(6px); }
.pg-hero .button.pg-ghost:hover { background: #ffffff29; }
.pg-404-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin: 14px 0 0; padding: 26px 0 0; border-top: 1px solid #ffffff26; }
.pg-actions .pg-404-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid #ffffff33; border-radius: 8px; background: #03122759; color: #fff; font-size: 14px; white-space: nowrap; }
.pg-actions .pg-404-links a:hover { border-color: #ffffff80; background: #ffffff1f; }
.pg-actions > nav { flex-basis: 100%; }

/* Footer links row */
.pg-footer-links { list-style: none; margin: 0; padding: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 12px; }
.pg-footer-links a:hover { color: var(--orange); }

@media (width <= 1100px) {
  .pg-hero { min-height: 625px; }
}
@media (width <= 900px) {
  .pg-split { grid-template-columns: 1fr; gap: 18px; }
  .pg-band { padding-block: 48px; }
}
@media (width <= 800px) {
  .pg-hero { min-height: 610px; padding-block: 112px 56px; background-image: linear-gradient(180deg, #031227e6 0%, #031227cc 55%, #031227a6 100%), url(/assets/hero-parliament-wide-D39mMpA8.png); background-position: 72% 60%; }
  .pg-lead { font-size: 18px; }
}
/* Small phones: the tallest intro needs 670-870px here, so a shared floor would leave most heroes half empty */
@media (width <= 480px) { .pg-hero { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .pg-card, .pg-more i, .pg-links li a { transition: none; } }
