/* ==========================================================================
   Parliamentarian Office — website stylesheet
   --------------------------------------------------------------------------
   1. Tokens          5. Components
   2. Base            6. Page sections
   3. Layout          7. Utilities
   4. Header & footer
   All pages share this single file. HTML carries class names only —
   no inline styles. Icon masks live in icons.css (generated).
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Neutrals — clean white with a faint blue tint for lines and fills */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: oklch(0.975 0.01 262);
  --line: oklch(0.915 0.016 262);
  --line-2: oklch(0.84 0.02 262);
  --ink: oklch(0.19 0.01 260);
  --ink-2: oklch(0.27 0.012 260);
  --muted: oklch(0.48 0.01 260);
  --on-dark: oklch(0.97 0.004 85);
  --on-dark-muted: oklch(0.78 0.01 260);

  /* Parliament brand blues (top / bottom navigation) */
  --brand-blue: #1f4ebc;
  --brand-blue-hover: #2a5bcc;
  --brand-navy: #163887;
  --on-brand: #ffffff;
  --on-brand-muted: oklch(1 0 0 / 0.78);

  /* Brand — Ukrainian blue & yellow */
  --accent: oklch(0.46 0.17 257);
  --accent-strong: oklch(0.4 0.17 257);
  --accent-ink: oklch(0.99 0 0);
  --accent-soft: oklch(0.95 0.03 257);
  --yellow: oklch(0.89 0.18 95);
  --yellow-soft: oklch(0.97 0.06 98);
  --yellow-ink: oklch(0.22 0.03 90);

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px oklch(0.2 0.02 260 / 0.04);
  --shadow-hover: 0 12px 32px oklch(0.2 0.02 260 / 0.1);

  /* Default tone (overridden by .tone-* classes) */
  --tone-a: oklch(0.82 0.11 230);
  --tone-b: oklch(0.52 0.2 262);

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
}

/* 2. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, pre {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

h1 {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

input,
button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* 3. Layout
   ========================================================================== */

.main {
  min-height: 60vh;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: 1040px;
}

.container--text {
  max-width: 900px;
}

.section {
  padding-top: 56px;
  padding-bottom: 80px;
}

.section--first {
  padding-top: 64px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.stack--sm {
  gap: 20px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid--mini {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.grid--wide {
  /* auto-fill, but never more than three columns */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(320px, calc((100% - 32px) / 3))), 1fr));
  gap: 16px;
}

/* Four mission pillars in one row; 2 × 2 on tablets, stacked on phones */
.grid--pillars {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1100px) {
  .grid--pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .grid--pillars {
    grid-template-columns: 1fr;
  }
}

.grid--steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 4. Header & footer
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-blue);
  color: var(--on-brand);
}

.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(var(--accent) 50%, var(--yellow) 50%);
  box-shadow: 0 0 0 2px var(--on-brand);
}

.site-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav__link {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: var(--on-brand-muted);
  font-size: 14px;
  font-weight: 600;
}

.site-nav__link:hover {
  background: oklch(1 0 0 / 0.12);
  color: var(--on-brand);
  text-decoration: none;
}

.site-nav__link.is-active {
  background: var(--on-brand);
  color: var(--brand-blue);
}

.site-header .btn--primary {
  background: var(--on-brand);
  color: var(--brand-blue);
}

.site-header .btn--primary:hover {
  background: oklch(0.95 0.03 262);
}

.site-footer {
  background: var(--brand-navy);
  color: var(--on-brand-muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--on-brand-muted);
}

.site-footer a:hover {
  color: var(--on-brand);
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 56px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 340px;
}

.footer-brand .brand__mark {
  box-shadow: 0 0 0 2px var(--on-brand);
}

.footer-brand__text {
  line-height: 1.6;
}

.site-footer .btn--yellow {
  color: var(--yellow-ink);
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-brand);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col__ext {
  font-size: 12px;
  opacity: 0.7;
}

.site-footer__bottom {
  border-top: 1px solid oklch(1 0 0 / 0.14);
  background: oklch(0 0 0 / 0.14);
  font-size: 13px;
}

.site-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}

@media (max-width: 1100px) {
  .site-footer__main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 560px;
  }
}

@media (max-width: 600px) {
  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 20px;
    padding-top: 44px;
    padding-bottom: 40px;
  }
}

/* Language switch (EN · УКР) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 3px;
  border: 1px solid oklch(1 0 0 / 0.35);
  border-radius: var(--radius-pill);
  background: oklch(1 0 0 / 0.1);
  color: var(--on-brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.lang-switch span {
  display: grid;
  place-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
}

.lang-switch__on {
  background: var(--on-brand);
  color: var(--brand-blue);
}

.lang-switch:hover .lang-switch__off {
  background: oklch(1 0 0 / 0.18);
}

.lang-switch:focus-visible {
  outline: 2px solid var(--on-brand);
  outline-offset: 2px;
}

/* Site consultant (AI) */
.consultant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid oklch(1 0 0 / 0.35);
  border-radius: var(--radius-pill);
  background: oklch(1 0 0 / 0.1);
  color: var(--on-brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.consultant-toggle:hover {
  background: oklch(1 0 0 / 0.18);
}

.consultant-toggle[aria-pressed='true'] {
  border-color: var(--on-brand);
  background: var(--on-brand);
  color: var(--brand-blue);
}

.consultant {
  position: fixed;
  top: 68px;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: min(400px, 100vw);
  display: none;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -12px 0 32px oklch(0 0 0 / 0.08);
}

.consultant.is-open {
  display: flex;
}

/* Narrow desktops: icon-only toggle so all nav links fit */
@media (max-width: 1100px) {
  .consultant-toggle {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .consultant-toggle span {
    display: none;
  }
}

@media (min-width: 1200px) {
  body.has-consultant .main,
  body.has-consultant .site-footer {
    margin-right: 400px;
  }
}

.consultant__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.consultant__badge {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), oklch(0.52 0.22 290));
  color: var(--on-brand);
  font-size: 12px;
  font-weight: 700;
}

.consultant__titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.consultant__context {
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.consultant__btn,
.consultant__close {
  height: 30px;
  border: 1px solid var(--line2, var(--line-2));
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
}

.consultant__btn {
  padding: 0 12px;
  font-size: 12px;
}

.consultant__close {
  width: 30px;
  font-size: 18px;
  line-height: 1;
}

.consultant__log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.consultant__intro,
.consultant__thinking {
  color: var(--muted);
}

.consultant__suggestion {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.consultant__suggestion:hover {
  border-color: var(--brand-blue);
}

.consultant__msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: var(--radius);
  line-height: 1.5;
  white-space: pre-wrap;
}

.consultant__msg--user {
  align-self: flex-end;
  background: var(--brand-blue);
  color: var(--on-brand);
}

.consultant__msg--assistant {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  white-space: normal;
  background: var(--surface-2);
}

.consultant__msg--assistant p,
.consultant__msg--assistant ul,
.consultant__msg--assistant ol {
  margin: 0;
}

.consultant__msg--assistant ul,
.consultant__msg--assistant ol {
  padding-left: 18px;
  list-style: revert;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.consultant__msg--assistant .md-h {
  margin-top: 4px;
  font-weight: 700;
  color: var(--brand-blue);
}

.consultant__msg--assistant .md-h:first-child {
  margin-top: 0;
}

.consultant__msg--assistant code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
}

.consultant__msg--assistant hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.consultant__form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.consultant__input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-pill);
  outline: none;
}

.consultant__input:focus {
  border-color: var(--brand-blue);
}

@media (max-width: 600px) {
  .consultant-toggle span {
    display: none;
  }

  .consultant {
    top: auto;
    height: 75vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* 5. Components
   ========================================================================== */

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn--lg {
  padding: 14px 24px;
  font-size: 16px;
}

.btn--start {
  align-self: flex-start;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-strong);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--ink);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.btn--yellow:hover {
  background: oklch(0.85 0.18 95);
}

.btn--outline-light {
  border-color: oklch(1 0 0 / 0.55);
  color: var(--accent-ink);
}

.btn--outline-light:hover {
  border-color: var(--accent-ink);
}

/* Text helpers ------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.tagline {
  max-width: 760px;
  font-size: 20px;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.subhead {
  font-size: 20px;
}

.inline-label {
  font-size: 13px;
  color: var(--muted);
}

.link-more {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.link-strong {
  font-weight: 600;
}

.page-intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Icons -------------------------------------------------------------------- */

.icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon-tile {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(145deg, var(--tone-a) 0%, var(--tone-b) 100%);
  color: oklch(1 0 0);
}

/* Glossy highlight across the top-left of every tile */
.icon-tile::before {
  content: '';
  position: absolute;
  inset: -40% 35% 45% -40%;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.35);
  filter: blur(6px);
}

.icon-tile .icon {
  position: relative;
}

.icon-tile--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.icon-tile--sm .icon {
  width: 17px;
  height: 17px;
}

.icon-tile--md {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.icon-tile--md .icon {
  width: 18px;
  height: 18px;
}

.icon-tile--lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.icon-tile--lg .icon {
  width: 28px;
  height: 28px;
}

/* Cards -------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

/* A leading icon sits in the card's top-right corner */
.card > .icon-tile:first-child {
  position: absolute;
  top: 20px;
  right: 20px;
}

.card > .icon-tile:first-child ~ .card__title {
  min-height: 38px;
  padding-right: 52px;
}

/* App cards: no icon — the platform as a label */

.app-card__platform {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--tone-a) 28%, var(--surface));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* Feature cards: a small glowing bulb instead of an icon */
.feature-bulb--lg {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--tone-a) 35%, transparent);
}

.detail-head .feature-bulb {
  background: var(--tone-a);
}

.detail-head .app-card__platform {
  background: oklch(1 0 0 / 0.14);
  color: var(--on-dark);
}

.feature-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-bulb {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--tone-b);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone-a) 35%, transparent);
}

/* Definition page */
:root {
  --pal-1: oklch(0.52 0.2 262);
  --pal-2: oklch(0.52 0.22 290);
  --pal-3: oklch(0.55 0.16 150);
  --pal-4: oklch(0.68 0.18 50);
  --pal-5: oklch(0.52 0.23 318);
  --pal-6: oklch(0.55 0.12 195);
  --pal-7: oklch(0.7 0.15 80);
}

/* One colour per group: goals in blue, objectives in green */
.feature-grid--numbered .feature h3::before { background: var(--pal-1); }
/* Objectives: plain coloured numbers, no circles */
.story--colourful .story__step::before {
  width: 32px;
  height: auto;
  display: block;
  border-radius: 0;
  background: none;
  color: var(--pal-3);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  transform: translateY(2px);
}

/* Vision and mission cards */
.charter .charter__item:first-child {
  border-color: color-mix(in srgb, var(--pal-1) 25%, var(--surface));
  background: color-mix(in srgb, var(--pal-1) 8%, var(--surface));
}

.charter .charter__item:last-child {
  border-color: color-mix(in srgb, var(--pal-2) 25%, var(--surface));
  background: color-mix(in srgb, var(--pal-2) 8%, var(--surface));
}

.charter .charter__item:first-child .eyebrow { color: var(--pal-1); }
.charter .charter__item:last-child .eyebrow { color: var(--pal-2); }

/* Phases: one colour each */
.phase--1 { --phase: var(--pal-1); }
.phase--2 { --phase: var(--pal-3); }
.phase--3 { --phase: var(--pal-5); }
.phase--4 { --phase: var(--pal-4); }

.phase {
  background: color-mix(in srgb, var(--phase) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--phase) 22%, var(--surface));
}

.phase .phase__name {
  color: var(--phase);
}

.phase--current {
  border-color: var(--phase);
  background: color-mix(in srgb, var(--phase) 10%, var(--surface));
}

.charter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.charter__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.charter__statement {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.portfolio {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.portfolio__row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr) minmax(0, 2.4fr) 70px;
  gap: 16px;
  align-items: baseline;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.portfolio__row:last-child {
  border-bottom: 0;
}

a.portfolio__row:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.portfolio__row--head {
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.portfolio__name {
  font-weight: 700;
}

.mono {
  font-family: var(--font-mono);
}

/* Definition: phases */
.phases {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phase {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.phase--current {
  border: 2px solid var(--brand-blue);
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
}

.phase__name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.phase__name span {
  color: var(--muted);
}

.phase__title {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.phase__components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.phase__component {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.phase__component h4 {
  margin: 0;
  font-size: 16px;
}

.phase__component p {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .phase__components {
    grid-template-columns: 1fr;
  }
}

.definition-page ~ * .impact__cell:first-child .impact__list li::before {
  background: var(--pal-3);
}

/* Definition scope: in scope in green */
.definition-page ~ * .impact__cell:first-child .impact__title {
  color: var(--pal-3);
}

/* Definition scope: out of scope in red */
.definition-page ~ * .impact__cell--risks .impact__title {
  color: oklch(0.55 0.2 25);
}

.definition-page ~ * .impact__cell--risks .impact__list li::before {
  border-color: oklch(0.55 0.2 25);
  background: transparent;
}

/* Use-case story and exceptions */
.story {
  display: flex;
  flex-direction: column;
  counter-reset: story;
  border-top: 2px solid var(--ink);
}

.story__step {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  counter-increment: story;
}

.story__step::before {
  content: counter(story);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-blue);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(6px);
}

.exceptions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exception {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: var(--radius);
  background: var(--surface);
}

.exception__when {
  font-weight: 600;
}

.exception__arrow {
  color: var(--muted);
}

.exception__then {
  color: var(--muted);
}

@media (max-width: 720px) {
  .charter {
    grid-template-columns: 1fr;
  }

  .portfolio__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .portfolio__row--head {
    display: none;
  }

  .exception {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .exception__arrow {
    display: none;
  }
}

/* Feature pages: definition and impact */
.feature-def {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
}

.feature-def__text {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.feature-def__overview {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.impact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.impact__cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
}

.impact__title {
  font-size: 17px;
  font-weight: 700;
}

.impact__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.impact__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
}

.impact__list li::before {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  transform: translateY(-1px);
  background: var(--tone-b);
}

.impact__cell--problems .impact__list li::before,
.impact__cell--risks .impact__list li::before {
  border: 1.5px solid var(--tone-b);
  background: transparent;
}

.usecase__group {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

@media (max-width: 720px) {
  .impact {
    grid-template-columns: 1fr;
  }
}

/* Feature pages: before → after */
.shift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.shift__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.shift__side--before {
  background: var(--surface-2);
}

.shift__side--after {
  border-color: color-mix(in srgb, var(--tone-a) 60%, var(--surface));
  background: color-mix(in srgb, var(--tone-a) 18%, var(--surface));
}

.shift__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shift__side--after .shift__label {
  color: var(--tone-b);
}

.shift__text {
  font-size: 18px;
  line-height: 1.5;
}

.shift__arrow {
  align-self: center;
  font-size: 28px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .shift {
    grid-template-columns: 1fr;
  }

  .shift__arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* Visual language
   Modules → icons · Features → colour bulbs · Solutions → workflow path
   Stakeholders → numerals · Apps → platform label · Capabilities → scope label */

/* Solutions: workflow as a timeline — circles on one line, labels underneath, never wraps */
.step-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  counter-reset: path;
}

/* Connector line behind the circles, from the first to the last */
.step-path::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 11px;
  right: calc(25% - 8px);
  height: 1.5px;
  background: var(--line-2);
}

.step-path__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  counter-increment: path;
}

.step-path__item::before {
  content: counter(path);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--brand-blue);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 700;
}

/* Stakeholders: large numerals */
.stake-num {
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-blue);
}

/* Capabilities: scope label */
.scope-label {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.card--link {
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}

.card--link:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.card--compact {
  padding: 20px;
}

.card--roomy {
  gap: 14px;
  padding: 28px;
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__title--lg {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.card__text {
  color: var(--muted);
  font-size: 15px;
}

.card__meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}

.mini-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  text-decoration: none;
}

.mini-card--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.mini-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-card__title {
  font-weight: 500;
}

/* Mini cards use a soft tinted icon so it doesn't compete with the title */
.mini-card .icon-tile {
  background: color-mix(in srgb, var(--tone-a) 22%, var(--surface));
  color: var(--tone-b);
}

.mini-card .icon-tile::before {
  display: none;
}

.mini-card__text {
  font-size: 13px;
  color: var(--muted);
}

/* Feature grid ------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

/* Fill the last row so no empty cells show:
   3 columns by default; 4 items → 2 × 2; a short last row stretches. */
.feature-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid > :nth-child(3n + 1):last-child {
  grid-column: span 3;
}

.feature-grid > :nth-child(3n + 2):last-child {
  grid-column: span 2;
}

.feature-grid:has(> :nth-child(4):last-child) > :last-child {
  grid-column: auto;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid > :last-child:nth-child(n) {
    grid-column: auto;
  }

  .feature-grid > :nth-child(odd):last-child {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid > :nth-child(odd):last-child {
    grid-column: auto;
  }
}

.feature-grid.feature-grid--single {
  grid-template-columns: 1fr;
}

.feature-grid.feature-grid--single > * {
  grid-column: auto;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
}

.feature h3 {
  font-size: 17px;
  font-weight: 700;
}

.feature p {
  color: var(--muted);
  font-size: 15px;
}

/* Numbered features (e.g. portfolio goals) */
.feature-grid--numbered {
  counter-reset: goal;
}

.feature-grid--numbered .feature {
  counter-increment: goal;
}

.feature-grid--numbered .feature h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.feature-grid--numbered .feature h3::before {
  content: counter(goal);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-blue);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-2px);
}

a.feature:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* Chips & badges ----------------------------------------------------------- */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.chip--surface {
  background: var(--surface);
}

.chip--yellow {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 600;
}

.chip--accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

a.chip:hover {
  text-decoration: none;
  filter: brightness(0.96);
}

.badge {
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--available {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.badge--pilot {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--yellow-ink);
}

/* Used in (solutions & stakeholders that include a module) ---------------- */

.used-in {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px 32px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.used-in__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.used-in__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

a.chip--link {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

a.chip--link:hover {
  border-color: var(--ink);
  filter: none;
}

/* Related block ("More in …") -------------------------------------------- */

.related-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--tone-a) 14%, var(--surface));
}

.related-block__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Breadcrumbs & pager ------------------------------------------------------ */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.crumbs li + li::before {
  content: '/';
  margin-right: 8px;
  opacity: 0.5;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

/* CTA band ----------------------------------------------------------------- */

.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--ink);
}

.cta-band__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 640px;
}

.cta-band__title {
  font-size: clamp(22px, 2.4vw, 28px);
}

.cta-band p {
  color: var(--muted);
}

/* Buttons inside the light band: yellow CTA keeps its color, outline becomes a secondary button */
.cta-band .btn--outline-light {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

.cta-band .btn--outline-light:hover {
  border-color: var(--ink);
}

/* Note boxes --------------------------------------------------------------- */

.note-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.note-box--muted {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  background: var(--surface);
}

.note-box--dashed {
  border: 1.5px dashed var(--line-2);
  background: transparent;
}

.note-box__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.note-box__title {
  font-size: 18px;
}

.note-box__text p {
  color: var(--muted);
}

.note {
  font-size: 14px;
  color: var(--muted);
}

.office-card {
  border-color: var(--ink);
  box-shadow: inset 6px 0 0 var(--accent);
}

.office-card__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.office-card__name {
  font-size: 24px;
}

/* Lists -------------------------------------------------------------------- */

.list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.list-card__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.list-card__item:last-child {
  border-bottom: 0;
}

.list-card__item p {
  color: var(--muted);
  font-size: 15px;
}

.list-card__num {
  width: 24px;
  flex-shrink: 0;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.list-card__footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}

.bullet {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-soft);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.check-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.check-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-2px);
}

/* Steps -------------------------------------------------------------------- */

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.step p {
  color: var(--muted);
  font-size: 15px;
}

.step__num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 700;
}

/* Business intelligence tiles ----------------------------------------------
   Each indicator kind gets its own mini chart, colored by the module's tone. */

.bi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bi-card h3 {
  font-size: 15px;
  text-wrap: balance;
}

.bi-card__kind {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bi-card__visual {
  height: 56px;
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: flex-end;
}

/* Trend — sparkline with soft area */
.bi-trend {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bi-trend__area {
  fill: var(--tone-a);
  opacity: 0.35;
}

.bi-trend__line {
  fill: none;
  stroke: var(--tone-b);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Ranking — descending horizontal bars */
.bi-rank {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bi-rank__bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--tone-a);
  opacity: 0.55;
}

.bi-rank__bar.is-top {
  background: var(--tone-b);
  opacity: 1;
}

/* Pipeline — stages narrowing left to right */
.bi-pipe {
  width: 100%;
  height: 22px;
  display: flex;
  gap: 3px;
}

.bi-pipe__stage {
  border-radius: 4px;
  background: var(--tone-b);
}

.bi-pipe__stage:first-child { border-radius: 11px 4px 4px 11px; }
.bi-pipe__stage:last-child { border-radius: 4px 11px 11px 4px; }
.stage-2 { opacity: 0.75; }
.stage-3 { opacity: 0.5; }
.stage-4 { opacity: 0.3; }

.g-1 { flex: 1; }
.g-2 { flex: 2; }
.g-3 { flex: 3; }
.g-4 { flex: 4; }
.g-5 { flex: 5; }
.g-6 { flex: 6; }
.g-7 { flex: 7; }
.g-8 { flex: 8; }

/* Indicator — half gauge */
.bi-gauge {
  width: 96px;
  height: 52px;
}

.bi-gauge__track,
.bi-gauge__value {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.bi-gauge__track {
  stroke: color-mix(in srgb, var(--tone-a) 30%, var(--line));
}

.bi-indicator {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.bi-indicator__value {
  padding-bottom: 2px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--tone-b);
}

.bi-gauge__value {
  stroke: var(--tone-b);
}

/* Distribution — one bar split into shares */
.bi-split {
  width: 100%;
  height: 22px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border-radius: 11px;
}

.bi-split__part {
  background: var(--tone-b);
}

.bi-split__part:nth-child(2) { opacity: 0.7; }
.bi-split__part:nth-child(3) { opacity: 0.45; }
.bi-split__part:nth-child(4) { opacity: 0.25; }

/* Matrix — small heat map */
.bi-matrix {
  display: grid;
  grid-template-columns: repeat(5, 16px);
  grid-auto-rows: 12px;
  gap: 3px;
}

.bi-matrix__cell {
  border-radius: 3px;
  background: var(--tone-b);
}

.o-20 { opacity: 0.2; }
.o-40 { opacity: 0.4; }
.o-60 { opacity: 0.6; }
.o-80 { opacity: 0.8; }
.o-100 { opacity: 1; }

.w-10 { width: 10%; }
.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-100 { width: 100%; }

@media (max-width: 600px) {
  .bi-grid {
    grid-template-columns: 1fr;
  }
}

/* Code --------------------------------------------------------------------- */

.code-block {
  overflow: auto;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.code-block--compact {
  max-height: 280px;
}

/* Page tabs (Modules: Catalog · Journeys · Information flows) ------------- */

.page-tabs {
  display: flex;
  gap: 36px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs__tab {
  flex-shrink: 0;
  margin-bottom: -1px;
  padding: 14px 0 16px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.page-tabs__tab:hover {
  color: var(--ink);
  text-decoration: none;
}

.page-tabs__tab.is-active {
  border-bottom-color: var(--brand-blue);
  color: var(--ink);
}

/* Module chip (icon + name link) */
.module-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.module-chip:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.module-chip .icon-tile--sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone-a) 22%, var(--surface));
  color: var(--tone-b);
}

.module-chip .icon-tile::before {
  display: none;
}

.module-chip .icon-tile--sm .icon {
  width: 15px;
  height: 15px;
}

/* Journeys — tiles */
.journey-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.journey-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--tone-a) 60%, var(--surface));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--tone-a) 26%, var(--surface));
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.15s;
}

.journey-tile:hover {
  border-color: var(--tone-b);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.journey-tile__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--tone-b);
}

.journey-tile__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.journey-tile__actors {
  font-size: 14px;
  color: var(--muted);
}

.journey-tile__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
}

.journey-tile__dot + .journey-tile__dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 2px;
  margin-right: 4px;
  vertical-align: middle;
  background: color-mix(in srgb, var(--tone-b) 40%, transparent);
}

.journey-tile__dot {
  display: inline-flex;
  align-items: center;
}

.journey-tile__dot .icon-tile--sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--tone-b);
}

.journey-tile__dot .icon-tile::before {
  display: none;
}

.journey-tile__dot .icon-tile--sm .icon {
  width: 14px;
  height: 14px;
}

.journey-tile__meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--tone-b);
}

/* Compact selector above a focused journey */
.journey-tiles--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.journey-tile--compact {
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius);
  opacity: 0.7;
}

.journey-tile--compact .journey-tile__title {
  font-size: 14px;
  letter-spacing: -0.005em;
}

.journey-tile--compact:hover {
  opacity: 1;
  box-shadow: none;
}

.journey-tile--compact.is-active {
  opacity: 1;
  border-color: var(--tone-b);
  box-shadow: inset 0 -3px 0 var(--tone-b);
}

/* Journey in focus */
.journey {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border: 1px solid color-mix(in srgb, var(--tone-a) 60%, var(--surface));
  border-radius: var(--radius-lg);
  background: linear-gradient(color-mix(in srgb, var(--tone-a) 14%, var(--surface)), var(--surface) 200px);
}

.journey .eyebrow {
  color: var(--tone-b);
}

.journey__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journey__title {
  font-size: clamp(24px, 2.8vw, 32px);
}

.journey__steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 26px 16px;
  counter-reset: step;
}

.journey__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 26px;
  border-top: 2px solid color-mix(in srgb, var(--tone-a) 60%, var(--line));
  counter-increment: step;
}

.journey__step::before {
  content: counter(step);
  position: absolute;
  top: -13px;
  left: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tone-b);
  color: oklch(1 0 0);
  font-size: 12px;
  font-weight: 700;
}

.journey__step p {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .journey-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-tiles--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .journey-tiles {
    grid-template-columns: 1fr;
  }

  .journey-tiles--compact {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 160px;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 4px;
  }

  .journey {
    padding: 20px;
  }
}

/* Information flows */
.flow-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flow-group .module-group__title {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.flow-list {
  display: flex;
  flex-direction: column;
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.flow__end:last-child {
  justify-self: end;
}

.flow__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.flow__payload {
  font-size: 14px;
  font-weight: 600;
}

.flow__arrow {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--line-2);
}

.flow__arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 8px solid var(--line-2);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.flow__trigger {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .flow__end:last-child {
    justify-self: start;
  }

  .flow__link {
    align-items: flex-start;
    text-align: left;
  }

  .flow__arrow {
    width: 60px;
  }

}

/* Semantic map (Information flows) ---------------------------------------- */

.semantic-map {
  position: relative;
  height: clamp(540px, 74vh, 880px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 50% 45%, oklch(0.32 0.09 262) 0%, transparent 65%),
    oklch(0.2 0.05 262);
  color: var(--on-brand);
}

.semantic-map__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.semantic-map__canvas:active {
  cursor: grabbing;
}

.semantic-map__canvas.is-pointing {
  cursor: pointer;
}

.semantic-map__canvas:focus-visible {
  outline-offset: -4px;
}

.semantic-map__toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.semantic-map__toolbar > * {
  pointer-events: auto;
}

/* Filters scroll on one line so the toolbar never wraps under the panel */
.map-filters {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.map-filters::-webkit-scrollbar {
  display: none;
}

.semantic-map.has-selection .semantic-map__hint {
  display: none;
}

.map-filter {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border: 1px solid oklch(1 0 0 / 0.25);
  border-radius: var(--radius-pill);
  background: oklch(1 0 0 / 0.08);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.map-filter:hover {
  background: oklch(1 0 0 / 0.16);
}

.map-filter[aria-pressed='true'] {
  border-color: var(--on-brand);
  background: var(--on-brand);
  color: var(--brand-navy);
}

.map-select {
  flex-shrink: 0;
  max-width: 220px;
  height: 34px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid oklch(1 0 0 / 0.25);
  border-radius: var(--radius-pill);
  background: oklch(0.24 0.05 262);
  color: var(--on-brand);
  font-size: 13px;
}

.semantic-map__panel {
  position: absolute;
  top: 64px;
  right: 16px;
  bottom: 16px;
  width: min(340px, calc(100% - 32px));
  overflow: auto;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 48px oklch(0 0 0 / 0.35);
}

.map-panel__head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 32px;
}

.map-panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone-b);
}

.map-panel__title {
  font-size: 22px;
}

.map-panel__close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 18px;
  cursor: pointer;
}

.map-panel__section {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-panel__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-panel__link {
  width: 100%;
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.map-panel__link:hover {
  border-color: var(--tone-b);
}

.map-panel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tone-b);
}

.map-panel__name {
  font-size: 14px;
  font-weight: 600;
}

.map-panel__note {
  grid-column: 2;
  font-size: 12px;
  color: var(--muted);
}

.map-panel__empty {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.map-panel__open {
  margin-top: 20px;
}

.semantic-map__controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
}

.map-control {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid oklch(1 0 0 / 0.25);
  border-radius: var(--radius-sm);
  background: oklch(1 0 0 / 0.08);
  color: var(--on-brand);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.map-control--text {
  font-size: 13px;
}

.map-control:hover {
  background: oklch(1 0 0 / 0.16);
}

.map-control[aria-pressed='true'] {
  border-color: var(--yellow);
  color: var(--yellow);
}

.semantic-map__hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--on-brand-muted);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .semantic-map__hint {
    display: none;
  }

  .map-select {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .semantic-map {
    height: 78vh;
  }

  .map-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
  }

  .map-filter {
    flex-shrink: 0;
  }

  .semantic-map__panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 55%;
  }
}

/* Entities A–Z ------------------------------------------------------------- */

.letter-nav {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.letter-nav__item {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 700;
}

a.letter-nav__item:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.letter-nav__item.is-empty {
  color: var(--line-2);
}

.entity-letter {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  scroll-margin-top: 140px;
}

.entity-letter__title {
  font-size: 44px;
  line-height: 1;
  color: var(--brand-blue);
}

.entity-list {
  margin: 0;
  border-top: 2px solid var(--ink);
}

.entity-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.entity-row__name {
  font-weight: 700;
}

.entity-row__uses {
  margin: 0;
}

.entity-row__uses ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entity-use {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.entity-use__text {
  color: var(--muted);
  font-size: 15px;
}

.entity-use .module-chip {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .entity-letter {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entity-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entity-use {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .letter-nav {
    top: 96px;
  }
}

/* Use cases ---------------------------------------------------------------- */

.usecase-nav {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 10px 0;
  overflow-x: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.usecase-nav__item {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.usecase-nav__item span {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.usecase-nav__item:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.usecase-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 140px;
}

.usecase-group__head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.usecase-group__head h2 a {
  color: var(--ink);
}

.usecase-group__head .muted {
  margin-top: 4px;
  font-size: 14px;
}

.usecase-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.usecase {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
}

.usecase:nth-child(odd) {
  margin-right: 16px;
}

.usecase:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

/* An odd last item spans the full row so no half-empty cell remains */
.usecase:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  margin-right: 0;
}

.usecase__text {
  font-size: 15px;
}

a.usecase__text {
  color: var(--ink);
  font-weight: 500;
}

a.usecase__text:hover {
  color: var(--brand-blue);
}

.usecase-list--compact {
  border-top: 0;
}

.detail-title--sentence {
  max-width: 900px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  text-wrap: balance;
}

.usecase-module {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--tone-a) 55%, var(--surface));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--tone-a) 14%, var(--surface));
}

.usecase-module .eyebrow {
  color: var(--tone-b);
}

.usecase-module .module-chip {
  font-size: 18px;
  padding: 8px 18px 8px 8px;
}

.usecase .module-chip {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .usecase-list {
    grid-template-columns: 1fr;
  }

  .usecase:nth-child(odd) {
    margin-right: 0;
  }

  .usecase:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .usecase {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .usecase-nav {
    top: 96px;
  }
}

/* Module filter ------------------------------------------------------------ */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-input {
  flex: 1 1 240px;
  max-width: 340px;
  height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-pill);
  background: var(--surface);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Category tiles (module catalogue filter)
   Treemap rows: tile width follows the number of modules; every row is full. */
.cat-tiles {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-row {
  display: flex;
  gap: 6px;
}

.cat-row .cat-tile {
  min-width: 0;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--tone-a) 55%, var(--surface));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tone-a) 24%, var(--surface));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.cat-tile:hover {
  border-color: var(--tone-b);
  transform: translateY(-1px);
}

.cat-tile__count {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--tone-b);
}

.cat-tile__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.cat-tile[aria-pressed='true'] {
  border-color: var(--tone-b);
  background: var(--tone-b);
  color: oklch(1 0 0);
}

.cat-tile[aria-pressed='true'] .cat-tile__count {
  color: oklch(1 0 0);
}

/* "All" is a plain white tile; selected = bold text and a dark outline, never a dark fill */
.cat-tile--all {
  justify-content: center;
  border-color: var(--line-2);
  background: var(--surface);
}

.cat-tile--all .cat-tile__name {
  font-size: 15px;
}

.cat-tile--all:hover {
  border-color: var(--ink);
}

.cat-tile--all[aria-pressed='true'] {
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.cat-tile--all[aria-pressed='true'] .cat-tile__name {
  font-weight: 800;
}

@media (max-width: 600px) {
  .cat-row {
    flex-wrap: wrap;
  }

  .cat-row .cat-tile {
    flex: 1 1 calc(50% - 3px);
  }
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

/* 6. Page sections
   ========================================================================== */

/* Tones — one soft gradient per category --------------------------------- */

.tone-documents { --tone-a: oklch(0.88 0.08 95); --tone-b: oklch(0.55 0.13 80); }
.tone-projects { --tone-a: oklch(0.86 0.1 60); --tone-b: oklch(0.55 0.15 50); }
.tone-experts { --tone-a: oklch(0.86 0.08 230); --tone-b: oklch(0.5 0.13 235); }
.tone-development { --tone-a: oklch(0.88 0.1 120); --tone-b: oklch(0.52 0.14 135); }
.tone-ideas-and-innovation { --tone-a: oklch(0.87 0.12 30); --tone-b: oklch(0.6 0.19 20); }
.tone-settings { --tone-a: oklch(0.86 0.03 250); --tone-b: oklch(0.45 0.05 255); }
.tone-ai-management { --tone-a: oklch(0.86 0.12 175); --tone-b: oklch(0.5 0.14 190); }
.tone-analysis { --tone-a: oklch(0.87 0.09 260); --tone-b: oklch(0.48 0.17 265); }
.tone-core           { --tone-a: oklch(0.83 0.11 225); --tone-b: oklch(0.52 0.2 262); }
.tone-management     { --tone-a: oklch(0.84 0.1 300);  --tone-b: oklch(0.52 0.22 290); }
.tone-legislation    { --tone-a: oklch(0.88 0.1 205);  --tone-b: oklch(0.6 0.15 232); }
.tone-legal          { --tone-a: oklch(0.82 0.08 275); --tone-b: oklch(0.42 0.16 272); }
.tone-committees     { --tone-a: oklch(0.9 0.15 135);  --tone-b: oklch(0.55 0.16 150); }
.tone-constituents   { --tone-a: oklch(0.88 0.11 70);  --tone-b: oklch(0.7 0.18 50); }
.tone-relationship-management { --tone-a: oklch(0.88 0.09 350); --tone-b: oklch(0.55 0.19 355); }
.tone-oversight      { --tone-a: oklch(0.84 0.13 330); --tone-b: oklch(0.52 0.23 318); }
.tone-party-group    { --tone-a: oklch(0.86 0.1 15);   --tone-b: oklch(0.52 0.19 15); }
.tone-advocacy       { --tone-a: oklch(0.92 0.15 120); --tone-b: oklch(0.56 0.15 130); }
.tone-office         { --tone-a: oklch(0.88 0.09 180); --tone-b: oklch(0.55 0.12 195); }
.tone-communications { --tone-a: oklch(0.93 0.12 100); --tone-b: oklch(0.72 0.15 80); }
.tone-meta           { --tone-a: oklch(0.72 0.03 262); --tone-b: oklch(0.36 0.04 262); }

/* Hero --------------------------------------------------------------------- */

.hero__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 48px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 64px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero__eyebrow {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero__title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 540px;
  font-size: 19px;
  color: var(--muted);
}

.hero__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1;
  justify-self: center;
}

.globe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

/* Stakeholder strip -------------------------------------------------------- */

/* Explore strip: white, separated from the hero and the navy footer by thin lines */
.audiences {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.audiences__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}

.audiences__grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 32px;
}

.audience__count {
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-blue);
}

.audience {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 40px 0 44px;
  color: var(--ink);
}

.audience:hover {
  text-decoration: none;
}

.audience:hover .audience__title {
  color: var(--brand-blue);
}

.audience__num {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, var(--tone-a), var(--tone-b));
  color: oklch(1 0 0);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.audience__title {
  font-size: 24px;
  transition: color 0.15s;
}

.audience__text {
  color: var(--muted);
}

.audience .link-more {
  color: var(--brand-blue);
}

/* Detail page header (dark) ------------------------------------------------ */

.detail-head {
  background: var(--ink);
  color: var(--on-dark);
}

.detail-head__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 48px;
  padding-bottom: 56px;
}

.detail-head__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.detail-head__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
}

.detail-head__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-dark-muted);
}

.detail-head .crumbs,
.detail-head .crumbs a,
.detail-head .muted,
.detail-head .inline-label {
  color: var(--on-dark-muted);
}

.detail-head .eyebrow {
  color: var(--yellow);
}

.detail-head .btn--secondary {
  border-color: oklch(1 0 0 / 0.3);
  background: transparent;
  color: var(--on-dark);
}

.detail-head .btn--secondary:hover {
  border-color: var(--on-dark);
}

.detail-title {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Intro row ---------------------------------------------------------------- */

.intro-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  align-items: start;
}

.intro-row__text {
  grid-column: span 2;
  font-size: 20px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .intro-row__text {
    grid-column: auto;
  }
}

/* Module catalog groups ---------------------------------------------------- */

.module-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.module-group__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tone-b);
}

.module-group__title {
  font-size: 22px;
}

.module-group__desc {
  font-size: 15px;
  color: var(--muted);
}

/* 8. Responsive
   --------------------------------------------------------------------------
   Breakpoints:  ≤ 600 phone · ≤ 900 tablet · ≥ 1600 wide · ≥ 2200 extra-wide
   ========================================================================== */

/* Extra-wide screens: larger canvas and slightly larger type */
@media (min-width: 1600px) {
  :root {
    --container: 1380px;
    --gutter: 40px;
  }

  body {
    font-size: 17px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 104px;
  }

  .hero__inner {
    padding-top: 112px;
    padding-bottom: 96px;
  }

  .hero__visual {
    max-width: 640px;
  }

  .tagline,
  .intro-row__text {
    font-size: 22px;
  }
}

@media (min-width: 2200px) {
  :root {
    --container: 1600px;
    --gutter: 56px;
  }

  body {
    font-size: 18px;
  }

  .hero__title {
    font-size: 88px;
  }

  .hero__visual {
    max-width: 760px;
  }
}

/* Narrow desktop / tablet landscape: keep the nav on one line */
@media (max-width: 1100px) {
  .site-header__inner {
    gap: 16px;
    flex-wrap: nowrap;
  }

  .site-nav {
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav__link {
    flex-shrink: 0;
    padding: 7px 8px;
    font-size: 13px;
  }

  .brand__name {
    font-size: 14px;
    white-space: nowrap;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .audiences__grid,
  .audiences__grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header__inner {
    gap: 16px;
  }

  .split {
    gap: 40px;
  }
}

/* Phone */
@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .section {
    padding-top: 36px;
    padding-bottom: 56px;
  }

  .section--first {
    padding-top: 40px;
  }

  .stack {
    gap: 40px;
  }

  /* Header: brand + login on one row, nav scrolls horizontally below */
  .site-header__inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 10px;
    gap: 10px 12px;
    justify-content: space-between;
  }

  .brand__name {
    font-size: 15px;
  }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav__link {
    flex-shrink: 0;
    padding: 9px 14px;
  }

  /* Hero */
  .hero__inner {
    gap: 8px;
    padding-top: 36px;
    padding-bottom: 32px;
  }

  .hero__text {
    gap: 20px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero__visual {
    max-width: 340px;
  }

  .hero .actions .btn {
    flex: 1 1 auto;
  }

  /* Stakeholder strip */
  .audiences__grid {
    grid-template-columns: 1fr;
  }

  .audience {
    padding: 28px 0;
  }

  .audience + .audience {
    border-top: 1px solid var(--line);
  }

  /* Detail pages */
  .detail-head__inner {
    padding-top: 32px;
    padding-bottom: 36px;
  }

  .detail-title {
    font-size: 34px;
  }

  .tagline,
  .intro-row__text {
    font-size: 17px;
  }

  .detail-head__row > .actions,
  .detail-head__row > .btn {
    width: 100%;
  }

  .detail-head__row .btn {
    flex: 1 1 auto;
  }

  /* Cards & blocks */
  .card,
  .card--roomy {
    padding: 20px;
  }

  .feature,
  .step {
    padding: 18px;
  }

  .cta-band {
    padding: 24px;
  }

  .cta-band .actions,
  .cta-band .btn {
    width: 100%;
  }

  .note-box {
    padding: 20px;
  }

  .bi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-card__item {
    padding: 16px;
  }

  .pager {
    flex-direction: column;
  }

  .pager a:last-child {
    align-self: flex-end;
  }

  /* Module filter: full-width search, chips scroll */
  .search-input {
    flex-basis: 100%;
    max-width: none;
  }

}

/* 7. Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* nav: keep on one line */
.site-nav { min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav__link { white-space: nowrap; flex-shrink: 0; }
.site-header__inner > .lang-switch, .site-header__inner > .consultant-toggle, .site-header__inner > .btn { flex-shrink: 0; }
