/* Alerta Contrato — shared styles
   Palette: paper neutrals do the work; one oxide-red accent carries warnings
   and the "deaths" data series. All colour flows through the tokens below. */

:root {
  --background: #faf8f5;
  --surface: #ffffff;
  --foreground: #1b1b1a;
  --muted: #5f5c57;
  --muted-bg: #f0ede8;
  --border: #dedad3;
  --accent: #a3271b;
  --accent-tint: #f6e4e0;
  --data-neutral: #77736c;

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 68ch;
  --page: 1040px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151514;
    --surface: #1e1e1c;
    --foreground: #eceae6;
    --muted: #a8a49d;
    --muted-bg: #262624;
    --border: #3a3935;
    --accent: #e58a7d;
    --accent-tint: #3a211d;
    --data-neutral: #8f8b84;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: var(--surface);
  padding: 8px 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 15px;
}

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

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 16px 0;
}

.site-nav a:hover {
  color: var(--foreground);
}

.lang {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
}

.lang a {
  padding: 4px 10px;
  text-decoration: none;
  color: var(--muted);
}

.lang a[aria-current="true"] {
  background: var(--foreground);
  color: var(--background);
}

@media (max-width: 720px) {
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 0 16px;
    padding-top: 8px;
  }

  .brand {
    flex: 1;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
  }

  .site-nav a {
    padding: 10px 0 12px;
  }

  html {
    scroll-padding-top: 104px;
  }
}

/* Type */

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  font-weight: 700;
  max-width: 20ch;
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

p,
ul,
ol {
  max-width: var(--measure);
  margin: 0 0 16px;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 20px;
}

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

/* Citation markers: [3] linking to the sources list */
.cite {
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
  font-weight: 600;
  white-space: nowrap;
}

.cite a {
  color: var(--accent);
  text-decoration: none;
  padding: 0 1px;
}

.cite a:hover {
  text-decoration: underline;
}

/* Sections */

.hero {
  padding-top: 56px;
  padding-bottom: 40px;
}

.keyfacts {
  overflow: hidden;
}

section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-intro {
  margin: 12px 0 32px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Key facts under the hero */

.keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin: 40px 0 0;
  padding: 0;
  max-width: none;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.keyfacts li {
  padding: 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -1px -1px 0;
}

.keyfacts strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

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

/* Notice: estimates disclaimer and similar */

.notice {
  background: var(--muted-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 15px;
  max-width: var(--measure);
  margin: 0 0 32px;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
}

.notice.warn {
  background: var(--accent-tint);
}

/* Bar chart: plain HTML so it works without JavaScript */

.chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 24px;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  background: var(--data-neutral);
}

.legend li.is-accent::before {
  background: var(--accent);
}

.bars {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

.bars li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 4px 16px;
  align-items: center;
}

.bars .label {
  font-weight: 600;
  font-size: 15px;
  grid-row: span 2;
}

.bars li.single .label {
  grid-row: auto;
}

.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar i {
  display: block;
  height: 14px;
  width: calc(var(--v) * 1%);
  max-width: calc(100% - 130px);
  min-width: 2px;
  background: var(--data-neutral);
  border-radius: 2px;
}

.bar.is-accent i {
  background: var(--accent);
}

.bar.is-unknown {
  color: var(--muted);
}

.bar.is-unknown i {
  display: none;
}

@media (max-width: 560px) {
  .chart {
    padding: 16px;
  }

  .bars li {
    grid-template-columns: 1fr;
  }

  .bars .label {
    grid-row: auto;
  }
}

/* Tables */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 24px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--muted-bg);
  white-space: nowrap;
}

td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Promise vs. reality pairs */

.pairs {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pair > div {
  padding: 20px;
}

.pair > div + div {
  background: var(--accent-tint);
}

.pair p {
  margin: 0;
  font-size: 16px;
}

.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.pair > div + div .tag {
  color: var(--accent);
}

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

/* Steps: a real sequence, so numbered */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 16px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--background);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.steps h3 {
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* Two-column prose blocks */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px 48px;
}

.cols h3 {
  margin-bottom: 8px;
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding: 0 0 12px 28px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--accent);
}

/* Help cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 16px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

/* FAQ */

.faq {
  max-width: var(--measure);
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > *:not(summary) {
  margin-top: 0;
}

/* Sources */

.sources {
  font-size: 15px;
  padding-left: 28px;
  max-width: 80ch;
}

.sources li {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.sources li:target {
  background: var(--accent-tint);
  outline: 6px solid var(--accent-tint);
  border-radius: 2px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  font-size: 14px;
  color: var(--muted);
}

/* Language chooser (root page) */

.chooser {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.chooser a {
  display: block;
  padding: 14px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

@media print {
  .site-header {
    position: static;
  }

  .faq details > * {
    display: block;
  }
}

/* ---------------------------------------------------------------------------
   Plain-language layer: bigger type, colour by meaning, icons and pictograms.
   Red = danger / what really happens. Amber = warning signs. Teal = what to do.
   --------------------------------------------------------------------------- */

:root {
  --ink: #1b1b1a;
  --on-ink: #faf8f5;
  --danger: #b3261e;
  --on-danger: #ffffff;
  --danger-tint: #f9dfdb;
  --warn: #8a4b00;
  --warn-solid: #f2b33d;
  --warn-tint: #fdf0d2;
  --safe: #0d6b5c;
  --on-safe: #ffffff;
  --safe-tint: #dcf1ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0c0c0b;
    --on-ink: #eceae6;
    --danger: #ef8f83;
    --on-danger: #1b0907;
    --danger-tint: #3d1f1b;
    --warn: #f2c56b;
    --warn-solid: #f2b33d;
    --warn-tint: #3a2c10;
    --safe: #6fcdb9;
    --on-safe: #06231d;
    --safe-tint: #12352e;
  }
}

body {
  font-size: 18px;
}

.icon {
  width: 1.4em;
  height: 1.4em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero band */

.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding: 56px 0 48px;
}

.hero h1 {
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--warn-solid);
}

.hero .lede {
  color: inherit;
  opacity: 0.85;
  max-width: 34ch;
  font-size: 1.3rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  background: var(--danger);
  color: var(--on-danger);
}

.btn:hover {
  color: var(--on-danger);
  filter: brightness(1.08);
}

.btn.is-safe {
  background: var(--safe);
  color: var(--on-safe);
}

.hero :focus-visible {
  outline-color: var(--warn-solid);
}

/* Section tone bands */

section.tone-warn {
  background: var(--warn-tint);
  border-top-color: transparent;
}

section.tone-safe {
  background: var(--safe-tint);
  border-top-color: transparent;
}

section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  background: var(--danger);
  color: var(--on-danger);
}

.chip.is-warn {
  background: var(--warn-solid);
  color: #1b1b1a;
}

.chip.is-safe {
  background: var(--safe);
  color: var(--on-safe);
}

.section-intro {
  font-size: 1.15rem;
  color: var(--foreground);
}

/* Pictogram: 1 in 5 */

.picto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 16px;
}

.picto-people {
  display: flex;
  gap: 6px;
  color: var(--data-neutral);
}

.picto-people svg {
  width: 44px;
  height: 66px;
  fill: currentColor;
}

.picto-people svg.is-lost {
  color: var(--danger);
}

.picto p {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 22ch;
}

.picto p strong {
  color: var(--danger);
}

.picto p span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

/* Solid stat tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  max-width: none;
}

.tiles li {
  background: var(--danger);
  color: var(--on-danger);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.tiles strong {
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.tiles .cite a {
  color: inherit;
  text-decoration: underline;
}

/* Promise vs. reality, simplified */

.pair > div {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pair > div + div {
  background: var(--danger-tint);
}

.pair p {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.pair p small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

.pair .icon {
  margin-top: 2px;
  color: var(--muted);
}

.pair > div + div .icon,
.pair > div + div .tag {
  color: var(--danger);
}

.bar.is-accent i {
  background: var(--danger);
}

.legend li.is-accent::before {
  background: var(--danger);
}

.cite a {
  color: var(--danger);
}

/* Steps with icons */

.steps li {
  position: relative;
  font-size: 1.05rem;
}

.steps li::before {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  background: var(--muted-bg);
  color: var(--muted);
}

.steps .chip {
  margin-bottom: 14px;
}

.steps li:last-child {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}

.steps li:last-child p {
  color: inherit;
}

.steps li:last-child .chip {
  background: var(--on-danger);
  color: var(--danger);
}

.steps li:last-child .cite a {
  color: inherit;
  text-decoration: underline;
}

.steps p {
  color: var(--foreground);
}

/* Warning signs */

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.alert-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.alert-list .icon {
  color: var(--warn);
}

/* Help cards */

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3 .icon {
  color: var(--safe);
}

.tone-safe .card {
  border-color: transparent;
}

.notice.warn {
  background: var(--danger-tint);
}

/* "See details" disclosure */

details.more {
  margin: 0 0 24px;
}

details.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  font-size: 16px;
}

details.more > summary::-webkit-details-marker {
  display: none;
}

details.more > summary::after {
  content: "+";
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

details.more[open] > summary::after {
  content: "\2212";
}

details.more[open] > summary {
  margin-bottom: 20px;
}

.faq summary {
  font-size: 1.1rem;
}

@media (max-width: 560px) {
  .picto-people svg {
    width: 34px;
    height: 51px;
  }

  .tiles strong {
    font-size: 2.2rem;
  }
}

.chooser h1 {
  font-size: 2rem;
  max-width: none;
  margin-bottom: 12px;
}

.chooser a {
  font-size: 1.2rem;
}

.chooser a span {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
