/* MMA Performance Coatings
   Black = the logo's own background, so the chameleon sits in the page, not on it.
   --chroma is the one moving part: it follows the surface the visitor picks. */

@property --chroma {
  syntax: '<color>';
  inherits: true;
  initial-value: #a54cf5;
}

:root {
  --ink: #050507;
  --ink-2: #0d0d12;
  --ink-3: #17171f;
  --chrome: #e2e4ea;
  --chrome-2: #a3a6b0;
  --chrome-3: #5b5e69;
  --line: #262630;
  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --text: 'Archivo', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* anchors land below the sticky header */
[id] { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--chrome);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: --chroma 900ms ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--chroma); text-underline-offset: 0.2em; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--chrome); color: var(--ink); padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.2vw, 3.7rem); font-style: italic; font-stretch: 130%; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.35rem; font-stretch: 110%; }

p { margin: 0 0 1rem; max-width: 66ch; }
.lead { font-size: 1.2rem; color: var(--chrome-2); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 115%;
  font-size: 1rem;
  color: var(--ink);
  background: var(--chroma);
  border: 0;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: color-mix(in oklab, var(--chroma) 80%, white); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-big { padding: 1rem 2rem; font-size: 1.1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: rgba(5, 5, 7, 0.92);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { border-radius: 50%; filter: hue-rotate(var(--logo-rotate)); transition: filter 900ms ease; }
.brand span { font-family: var(--display); font-weight: 800; font-stretch: 130%; font-size: 1.15rem; }
.brand em { font-style: normal; font-weight: 500; font-stretch: 100%; color: var(--chrome-2); font-size: 0.9rem; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--chrome-2); font-size: 0.95rem; }
.site-nav a:not(.btn):hover { color: var(--chrome); }
.site-nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}
.logo-chameleon {
  /* fade the JPEG's edges into the page so no rectangle shows */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
  filter: hue-rotate(var(--logo-rotate)) saturate(1.05);
  transition: filter 900ms ease;
}
.hero-copy .lead { margin-bottom: 2rem; }
.pick { font-weight: 600; color: var(--chrome); margin-bottom: 0.75rem; }

/* The fan deck: a paint swatch fan, one chip per surface */
.fan {
  display: flex;
  gap: 0.35rem;
  padding: 1.5rem 1rem 0.5rem 0;
}
.chip {
  --lift: 0px;
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px 6px 3px 3px;
  padding: 0;
  color: var(--chrome-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transform-origin: 50% 220%;
  transform: rotate(calc((var(--i) - 2) * 2.5deg)) translateY(var(--lift));
  transition: transform 300ms ease, color 300ms ease, border-color 300ms ease;
}
.chip-swatch {
  display: block;
  height: 7.5rem;
  border-radius: 5px 5px 0 0;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%), var(--chip);
}
.chip-name {
  display: block;
  padding: 0.55rem 0.6rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  hyphens: auto;
}
.chip:hover { --lift: -6px; color: var(--chrome); }
.chip[aria-selected="true"] { --lift: -16px; color: var(--chrome); border-color: var(--chip); }

/* Surface panels */
.surface-panels { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 2px solid var(--chip);
}
.js .panel[data-inactive] { display: none; }
.panel .who { color: var(--chip); font-weight: 600; }
.panel-list { list-style: none; margin: 0; padding: 0; align-self: center; }
.panel-list li {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
}
.panel-list li::before {
  content: ''; flex: none;
  width: 1.4rem; height: 0.35rem; border-radius: 2px;
  background: var(--chip);
  transform: translateY(-0.2em);
}

/* Approach */
.approach {
  max-width: var(--max);
  margin: clamp(3rem, 7vw, 6rem) auto 0;
  padding: 0 var(--gutter);
}
.approach-intro h2 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 18ch; }
.outcomes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 0;
}
.outcomes div { border-top: 1px solid var(--chrome-3); padding-top: 1rem; }
.outcomes dt { font-family: var(--display); font-weight: 800; font-stretch: 120%; font-size: 1.3rem; color: var(--chroma); }
.outcomes dd { margin: 0.4rem 0 0; color: var(--chrome-2); }
.steps { margin-top: clamp(3rem, 5vw, 4rem); }
.steps ol {
  list-style: none; counter-reset: step; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem;
}
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.3rem; }
.steps li::before {
  content: counter(step);
  font-family: var(--display); font-weight: 900; font-stretch: 150%; font-style: italic;
  font-size: 3rem; line-height: 1; color: var(--chrome-3);
}
.steps strong { font-size: 1.1rem; }
.steps span { color: var(--chrome-2); }

/* Parts */
.parts {
  max-width: var(--max);
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  padding: 0 var(--gutter);
}
.table-wrap { overflow-x: auto; margin-top: 2rem; }
.parts table { width: 100%; border-collapse: collapse; min-width: 40rem; }
.parts th, .parts td { text-align: left; vertical-align: top; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); }
.parts thead th { font-family: var(--display); font-stretch: 120%; font-size: 1.2rem; }
.parts thead .col-cert { color: #f5c400; }
.parts tbody th { color: var(--chrome-2); font-weight: 600; width: 22%; }
.parts .note { margin-top: 1.5rem; color: var(--chrome-2); }

/* Request form */
.request {
  max-width: var(--max);
  margin: clamp(4rem, 8vw, 7rem) auto clamp(3rem, 6vw, 5rem);
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  background: var(--ink-2);
  border-top: 2px solid var(--chroma);
}
.request-intro h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.contact-line { font-weight: 600; margin-bottom: 0.3rem; }
.request-form { display: flex; flex-direction: column; gap: 1.4rem; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; margin-bottom: 0.6rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  --chip: var(--chroma);
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.choice input { accent-color: var(--chip); margin: 0; }
.choice:has(input:checked) { border-color: var(--chip); background: color-mix(in oklab, var(--chip) 14%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field span { font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea, input[type="file"] {
  width: 100%;
  font: inherit;
  color: var(--chrome);
  background: var(--ink);
  border: 1px solid var(--chrome-3);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--chroma); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
textarea::placeholder { color: var(--chrome-3); }
[aria-invalid="true"] { border-color: #ff6b5e; }
.field-error { color: #ff8a80; font-size: 0.9rem; margin: 0; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; color: var(--chrome-2); }
.consent input { margin-top: 0.3rem; accent-color: var(--chroma); }
.consent a { margin-left: 0.25rem; }
.form-status { padding: 1rem 1.25rem; border-radius: 6px; font-weight: 600; }
.form-status.ok { background: color-mix(in oklab, var(--chroma) 18%, var(--ink)); border: 1px solid var(--chroma); align-self: start; }
.form-status.err { background: #2a0f0d; border: 1px solid #ff6b5e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Privacy page */
.prose { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) var(--gutter); }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.prose h2 { font-size: 1.4rem; font-stretch: 110%; margin-top: 2rem; }

/* Footer: same width as the content, three columns (about / site map / contact), a bottom line */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) 2rem;
  color: var(--chrome-2);
  font-size: 0.95rem;
}
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
.footer-col { display: grid; gap: 0.5rem; align-content: start; }
.footer-h { font-family: var(--display); font-size: 0.9rem; font-stretch: 115%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--chrome); margin: 0 0 0.25rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-links a { color: var(--chrome-2); text-decoration: none; min-width: 44px; }
.footer-links a:hover { color: var(--chrome); text-decoration: underline; text-decoration-color: var(--chroma); }
.footer-addr { color: var(--chrome-2); }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); grid-template-columns: auto auto; justify-content: space-between; align-items: center; gap: 1rem; }
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .footer-bottom { grid-template-columns: minmax(0, 1fr); justify-content: start; }
}
.site-footer p { margin: 0; }
.site-footer a { margin-right: 1rem; }
.footer-brand { font-family: var(--display); font-weight: 800; font-stretch: 125%; color: var(--chrome); font-size: 1.1rem; }
.footer-brand span { font-weight: 500; font-stretch: 100%; color: var(--chrome-2); margin-left: 0.5rem; font-size: 0.95rem; }
.copy { color: var(--chrome-3); }

.fb-link { display: inline-flex; align-items: center; gap: 0.5rem; }
.fb-icon { flex: none; color: var(--chroma); }

/* Responsive */
@media (max-width: 960px) {
  /* Compact header: the nav folds behind a Menu button (JS); without JS it simply wraps. */
  .site-header { flex-wrap: wrap; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-height: 44px; padding: 0 1rem;
    font: 600 0.95rem var(--text); color: var(--chrome);
    background: none; border: 1px solid var(--line); border-radius: 999px;
    cursor: pointer;
  }
  .js .nav-toggle[aria-expanded="true"] { border-color: var(--chroma); }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.1rem; height: 2px; border-radius: 1px; background: currentColor;
    transition: transform 200ms ease, background-color 200ms ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bars::before { transform: translateY(-6px); }
  .nav-toggle-bars::after { transform: translateY(6px); }
  [aria-expanded="true"] > .nav-toggle-bars { background-color: transparent; }
  [aria-expanded="true"] > .nav-toggle-bars::before { transform: rotate(45deg); }
  [aria-expanded="true"] > .nav-toggle-bars::after { transform: rotate(-45deg); }
  .js .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.25rem var(--gutter) 1.25rem;
    background: var(--ink);
    border-bottom: 2px solid var(--chroma);
    visibility: hidden; opacity: 0; transform: translateY(-0.5rem);
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s 200ms;
  }
  .js .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity 200ms ease, transform 200ms ease; }
  .js .site-nav a:not(.btn) {
    display: flex; align-items: center; min-height: 3.25rem;
    font-size: 1.1rem; color: var(--chrome);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav .lang { border-width: 0 0 1px; border-radius: 0; padding: 0; color: var(--chrome-2); }
  .js .site-nav .btn { margin-top: 1.25rem; padding: 0.9rem 1.4rem; font-size: 1rem; text-align: center; }
  .fan { padding-left: 1rem; }
  .chip-name { font-size: 0.9rem; }

  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { max-width: 40rem; margin: 0 auto; }
  .panel, .request { grid-template-columns: minmax(0, 1fr); }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps ol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  html:not(.js) .site-nav a:not(.btn):not(.lang) { display: none; }
  .brand em { display: none; }
  .fan {
    overflow-x: auto; padding: 1.25rem 0.25rem 0.75rem; scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.25rem; overscroll-behavior-x: contain;
    scrollbar-width: thin; scrollbar-color: var(--chrome-3) transparent;
  }
  .chip { flex: 0 0 7.5rem; transform: translateY(var(--lift)); scroll-snap-align: start; }
  .chip-swatch { height: 5.5rem; }

  /* Parts table: one card per row, each answer labelled with its column */
  .table-wrap { overflow: visible; }
  .parts table, .parts tbody, .parts tr, .parts th, .parts td { display: block; }
  .parts table { min-width: 0; }
  .parts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .parts tbody tr {
    background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
    padding: 1rem 1.1rem; margin-bottom: 0.9rem;
  }
  .parts tbody th {
    width: auto; padding: 0 0 0.25rem; border: 0;
    font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.15rem; color: var(--chrome);
  }
  .parts tbody td { padding: 0.65rem 0 0; border: 0; }
  .parts tbody td + td { border-top: 1px solid var(--line); margin-top: 0.65rem; }
  .parts tbody td::before {
    content: attr(data-label);
    content: attr(data-label) / '';
    display: block;
    font-family: var(--display); font-weight: 700; font-stretch: 115%; font-size: 0.85rem; color: var(--chrome-2);
  }
  .parts tbody td.col-cert::before { color: #f5c400; }
  .btn-big { width: 100%; }
  /* consent: the privacy link flows inside the sentence instead of a third column */
  .consent { display: block; position: relative; padding-left: 2rem; }
  .consent input { position: absolute; left: 0; top: 0.15rem; margin: 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .outcomes { grid-template-columns: minmax(0, 1fr); }
  .site-header { padding-block: 0.5rem; }
  .site-nav { gap: 0.6rem; }
  .brand span { font-size: 1rem; }
  h1 { font-size: 2.1rem; font-stretch: 115%; }
}

/* Touch screens: 44px targets, bigger ticks */
@media (pointer: coarse) {
  .brand, .choice { min-height: 44px; }
  .choice input, .consent input { width: 1.25rem; height: 1.25rem; flex: none; }
  .consent input { margin-top: 0.15rem; }
  .site-footer a { display: inline-block; padding-block: 0.6rem; }
  /* Links alone on their line (email, phone) and the consent row get full-size targets */
  .contact-line a, .prose a[href^="mailto:"] { display: inline-block; padding-block: 0.75rem; }
  .consent { min-height: 44px; align-items: center; }
  .consent a { display: inline-block; padding-block: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .logo-chameleon, .brand img, .chip, .site-nav,
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none !important; }
}

/* Keep the Facebook icon beside its label even where touch rules make links inline-block */
.site-footer a.fb-link, .contact-line a.fb-link, .mma-footer a.fb-link { display: inline-flex; }

/* Phones: the five big chips all visible, 3 + 2, no sideways scrolling */
@media (max-width: 720px) {
  .fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; overflow: visible; padding: 1rem 0 0.5rem; scroll-snap-type: none; }
  .fan .chip { flex: none; width: auto; transform: translateY(var(--lift)); }
  .fan .chip-swatch { height: 3.5rem; }
}

/* Short EN/FR language links: keep a full-size tap target */
.site-footer a[hreflang], .site-nav a.lang, .mma-footer a[hreflang] { min-width: 44px; text-align: center; }
@media (pointer: coarse) { .site-footer a[hreflang] { display: inline-block; } }

/* The page is already dark: tell the browser, so "auto dark mode" (Samsung Internet,
   Chrome Android) doesn't re-darken it and turn the paint chips black */
:root { color-scheme: dark; }
.chip-swatch, .theme-chip span, .cat-section-swatch { forced-color-adjust: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* chameleon-spray: canvas laid over the hero logo while the animation plays */
/* overflow-x: clip keeps the oversized stage from widening the page on phones */
.hero-mark { position: relative; overflow-x: clip; }
.hero-mark { cursor: pointer; }
.cham-stage {
  position: absolute; pointer-events: none; z-index: 2;
  visibility: hidden;
}
.cham-stage.on { visibility: visible; }
.cham-stage canvas {
  display: block; width: 100%; height: 100%;
  filter: hue-rotate(var(--logo-rotate)) saturate(1.05);
}
.logo-chameleon.cham-hidden { visibility: hidden; }
/* paint on the glass: whole viewport, never catches clicks */
.cham-paint {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 50;
  pointer-events: none; display: none;
}
.cham-paint.on { display: block; }
@media (prefers-reduced-motion: reduce) {
  .cham-stage, .cham-paint { display: none !important; }
}

/* Content pages (page.php): sectors, our story, news */
.pg-main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem); }
.pg-crumbs { padding: 1.25rem 0 0; font-size: 0.9rem; color: var(--chrome-2); }
.pg-crumbs a { color: var(--chrome-2); }
.pg-hero { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(1.5rem, 4vw, 3rem); border-bottom: 2px solid var(--chroma); }
.pg-hero h1 { max-width: 20ch; }
.pg-hero .lead { max-width: 60ch; }
.pg-kicker { font-family: var(--display); font-weight: 700; font-stretch: 115%; color: var(--chroma); letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 0.75rem; }
.pg-block { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.pg-block h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 26ch; }
.pg-intro { color: var(--chrome-2); max-width: 66ch; }
.pg-note { color: var(--chrome-2); font-size: 0.95rem; margin-top: 1.25rem; }
ul.pg-cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.pg-cards li { background: var(--ink-2); border: 1px solid var(--line); border-top: 3px solid var(--chroma); border-radius: 8px; padding: 1.1rem 1.2rem 0.4rem; }
.pg-cards h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
ul.pg-cards p { color: var(--chrome-2); font-size: 1rem; }
.pg-list { --chip: var(--chroma); max-width: 46rem; margin-top: 1rem; }
ol.pg-steps { list-style: none; counter-reset: s; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.pg-steps li { counter-increment: s; border-top: 1px solid var(--chrome-3); padding-top: 0.9rem; color: var(--chrome-2); }
.pg-steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--display); font-weight: 800; font-stretch: 125%; color: var(--chroma); font-size: 1.4rem; }
.pg-steps strong { display: block; color: var(--chrome); }
.pg-table table { width: 100%; border-collapse: collapse; }
.pg-table th, .pg-table td { text-align: left; vertical-align: top; padding: 0.8rem 1.25rem 0.8rem 0; border-bottom: 1px solid var(--line); }
.pg-table thead th { font-family: var(--display); font-stretch: 115%; font-size: 1.05rem; color: var(--chrome); }
.pg-table tbody th { color: var(--chroma); font-weight: 700; white-space: nowrap; }
.pg-table td { color: var(--chrome-2); }
.pg-faq-list { margin-top: 1.25rem; max-width: 52rem; }
.pg-faq-list details { border-bottom: 1px solid var(--line); }
.pg-faq-list summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; position: relative; list-style: none; min-height: 44px; }
.pg-faq-list summary::-webkit-details-marker { display: none; }
.pg-faq-list summary::after { content: '+'; position: absolute; right: 0.25rem; top: 0.85rem; font-size: 1.4rem; line-height: 1; color: var(--chroma); }
.pg-faq-list details[open] summary::after { content: '–'; }
.pg-faq-list details p { color: var(--chrome-2); padding-bottom: 0.5rem; }
.pg-news-list { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 52rem; }
.pg-news-list > li { border-left: 3px solid var(--chroma); padding: 0.2rem 0 0.5rem 1.25rem; margin-bottom: 2rem; }
.pg-date { color: var(--chroma); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.35rem; }
.pg-news-list h3 { font-size: 1.3rem; }
.pg-news-list p { color: var(--chrome-2); }
.pg-cta { margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(1.75rem, 4vw, 3rem); background: var(--ink-2); border-top: 2px solid var(--chroma); border-radius: 0 0 8px 8px; }
.pg-cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
@media (max-width: 720px) {
  .pg-table table, .pg-table tbody, .pg-table tr, .pg-table th, .pg-table td { display: block; }
  .pg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pg-table tbody tr { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
  .pg-table tbody th, .pg-table td { padding: 0.25rem 0; border: 0; white-space: normal; }
  .pg-table td::before { content: attr(data-label) ' : '; content: attr(data-label) ' : ' / ''; font-weight: 600; color: var(--chrome); }
  .pg-cta .btn-big { width: 100%; text-align: center; }
}
@media (pointer: coarse) {
  .pg-crumbs a, .pg-news-list a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}

/* Home: the guide's first column takes the sector colour (the yellow stays for CAPA only) */
.parts table:not(.is-capa) thead .col-cert,
.parts table:not(.is-capa) td.col-cert::before { color: var(--chroma); }
.sector-block[hidden] { display: none; }

/* Guide carousel (home, section 3): one topic card at a time */
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.guide-head h2 { margin: 0; }
.guide-nav { display: flex; align-items: center; gap: 0.5rem; }
.guide-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2);
  color: var(--chrome); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.guide-nav button:hover { border-color: var(--chroma); color: var(--chroma); }
.guide-count { min-width: 4.5rem; text-align: center; color: var(--chrome-2); font-variant-numeric: tabular-nums; }
.guide-track {
  margin-top: 1.25rem; display: grid; align-items: start; transition: height 200ms ease; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.guide-track::-webkit-scrollbar { display: none; }
.guide-track:focus-visible { outline: 2px solid var(--chroma); outline-offset: 4px; }
.guide-slide {
  position: relative;   /* anchors the visually-hidden table header (position: absolute): else it widens the page */
  align-self: start;
  scroll-snap-align: start; min-width: 0; background: var(--ink-2); border: 1px solid var(--line);
  border-top: 3px solid var(--chroma); border-radius: 8px; padding: clamp(1.1rem, 3vw, 2rem);
}
.guide-slide h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 0.6rem; }
.guide-slide .table-wrap { margin-top: 1.25rem; }
.guide-slide .parts table, .guide-slide table { min-width: 0; }
.guide-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 1.25rem 0 0; }
.guide-points div { border-top: 1px solid var(--chrome-3); padding-top: 0.75rem; }
.guide-points dt { font-family: var(--display); font-weight: 800; font-stretch: 115%; color: var(--chroma); }
.guide-points dd { margin: 0.3rem 0 0; color: var(--chrome-2); }
.guide-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 1rem; }
.guide-dots button { width: 0.7rem; height: 0.7rem; padding: 0; border-radius: 50%; border: 0; background: var(--chrome-3); cursor: pointer; }
.guide-dots button[aria-current] { background: var(--chroma); width: 1.6rem; border-radius: 999px; }
@media (max-width: 999px) { .guide-dots { display: none; } }
@media (max-width: 720px) { .guide-points { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  /* Phones: comparison rows inside a topic card are separated by a line, not nested cards (shorter) */
  .guide-slide tbody tr { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 0.8rem 0 0.2rem; margin: 0; }
  .guide-slide tbody tr:first-child { border-top: 0; padding-top: 0.2rem; }
  .guide-slide tbody th { font-size: 1.05rem; }
  .guide-slide tbody td { padding-top: 0.45rem; }
  .guide-slide tbody td + td { margin-top: 0.45rem; padding-top: 0.45rem; }
  .guide-slide .table-wrap { margin-top: 0.75rem; }
}

/* Home hero: the action on the first screen of phones and tablets (the header's button is in the menu there) */
.lead-short { display: none; }
.hero-cta { display: none; }
@media (max-width: 960px) {
  .hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: -0.75rem 0 1.5rem; max-width: none; }
  .hero-cta .btn { text-align: center; white-space: nowrap; }
  .hero-alt { color: var(--chrome-2); }
}
@media (max-width: 720px) {
  /* smaller logo (still the signature), short intro, full-width button */
  .hero { padding-top: 0.5rem; gap: 0.5rem; }
  .hero-mark { max-width: min(16rem, 68vw); }
  .lead-long { display: none; }
  .lead-short { display: block; }
  .hero-copy .lead { font-size: 1.1rem; margin-bottom: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: stretch; margin-top: 0; }
  .hero-alt { align-self: center; }
}
@media (pointer: coarse) { .hero-alt { display: inline-block; padding-block: 0.65rem; } }

/* Photos field: the real <input type="file"> stays (sent with the form, keyboard, screen readers),
   hidden under a translated button; without JS the native control shows as before */
.file-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; }
.js .file-pick {
  position: relative; cursor: pointer;
  padding: 0.6rem; border: 1px dashed var(--chrome-3); border-radius: 8px; background: var(--ink);
}
.js .file-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
  opacity: 0; overflow: hidden; clip-path: inset(50%);
}
html:not(.js) .file-btn, html:not(.js) .file-names { display: none; }
.field .file-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.55rem 1.1rem;
  font-family: var(--display); font-weight: 700; font-stretch: 115%; font-size: 0.95rem;
  color: var(--chrome); background: var(--ink-3); border: 1px solid var(--chroma); border-radius: 999px;
  white-space: nowrap;
}
.field .file-names { flex: 1 1 10rem; min-width: 0; font-weight: 400; font-size: 0.95rem; color: var(--chrome-2); overflow-wrap: anywhere; }
.file-pick.has-files .file-names { color: var(--chrome); }
.js .file-pick:hover { border-color: var(--chroma); }
.file-pick:has(.file-input:focus-visible) .file-btn { outline: 3px solid var(--chroma); outline-offset: 3px; }
.file-pick:has(.file-input[aria-invalid="true"]) { border-color: #ff6b5e; }

/* Buttons answer the press; hover effects only where there is a real hover */
.btn:active, .file-pick:active .file-btn { transform: scale(0.97); }
.btn, .file-btn { transition: transform 120ms ease-out, background-color 150ms ease-out; }
@media (hover: none) {
  .btn:hover { background: var(--chroma); }
  .chip:hover { --lift: 0px; color: var(--chrome-2); }
  .chip[aria-selected="true"]:hover { --lift: -16px; color: var(--chrome); }
}
@media (prefers-reduced-motion: reduce) { .btn, .file-btn { transition: none; } .btn:active, .file-pick:active .file-btn { transform: none; } }

/* Phones: lists become rows of cards you swipe sideways (the next card peeks out), instead of
   long vertical stacks. Same content; desktop unchanged. */
@media (max-width: 720px) {
  .panel-list, .outcomes, .steps ol, ul.pg-cards, ol.pg-steps {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-template-rows: none;
    grid-auto-columns: 78%; gap: 0.75rem;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scroll-padding-inline: 0; padding: 0.25rem 0 0.75rem; margin-inline: 0;
    scrollbar-width: thin; scrollbar-color: var(--chrome-3) transparent;
  }
  .panel-list > li, .outcomes > div, .steps ol > li, ul.pg-cards > li, ol.pg-steps > li { scroll-snap-align: start; }
  /* Sector items: small cards */
  .panel-list { grid-auto-columns: 62%; align-self: stretch; }
  .panel-list li {
    display: block; padding: 0.85rem 0.9rem; font-size: 1rem; line-height: 1.4;
    background: var(--ink-2); border: 1px solid var(--line); border-top: 3px solid var(--chip); border-radius: 8px;
  }
  .panel-list li::before { display: none; }
  /* Approach outcomes and steps */
  .outcomes > div, .steps ol > li { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; }
  .outcomes > div { border-top: 3px solid var(--chroma); }
  .steps li::before { font-size: 2.2rem; }
  .steps { margin-top: 2rem; }
  /* Sector pages */
  ul.pg-cards { grid-auto-columns: 84%; }
  ol.pg-steps > li { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; }
  /* Footer: site map and contact side by side */
  .footer-inner:not(.footer-bottom) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}
/* Long links (e-mail) may wrap; on the narrowest phones the footer goes back to one column */
.footer-links a, .footer-addr { overflow-wrap: anywhere; }
.footer-col { min-width: 0; }
@media (max-width: 400px) { .footer-inner:not(.footer-bottom) { grid-template-columns: minmax(0, 1fr); } }
/* Sector panel: the request button and the link to the sector page */
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; }
.panel-more { color: var(--chrome); font-weight: 600; text-underline-offset: 0.25em; }
.panel-more::after { content: ' →'; }
@media (pointer: coarse) { .panel-more { display: inline-flex; align-items: center; min-height: 44px; } }

/* Request form in two steps */
.form-step { display: flex; flex-direction: column; gap: 1.4rem; }
.form-step[hidden] { display: none; }
.form-step-h { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.15rem; color: var(--chrome); }
.form-step-n { display: block; font-family: var(--text); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--chroma); margin-bottom: 0.15rem; }
html:not(.js) .form-step-n, html:not(.js) .form-nav .form-next, html:not(.js) .form-prev { display: none; }
.form-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; }
.btn-link { background: none; border: 0; padding: 0.6rem 0; min-height: 44px; font: inherit; font-weight: 600; color: var(--chrome-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--chroma); text-underline-offset: 0.25em; }
.btn-link:hover { color: var(--chrome); }
@media (max-width: 720px) { .form-nav { flex-direction: column-reverse; align-items: stretch; } .form-nav .btn-link { align-self: center; } }
