:root {
  --bg: #f6f1e7;
  --surface: #fffaf0;
  --ink: #1b2a23;
  --muted: #5d6b63;
  --line: #ded5c2;
  --green: #14382b;
  --green-2: #1f5a43;
  --accent: #e0662c;
  --accent-ink: #ffffff;
  --code-bg: #efe7d6;
  --success: #1f7a4d;
  --error: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 56, 43, 0.06), 0 8px 24px rgba(20, 56, 43, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1914;
    --surface: #16231c;
    --ink: #e9efe9;
    --muted: #9fb0a6;
    --line: #2a3b32;
    --green: #9fd8bb;
    --green-2: #7cc4a0;
    --accent: #f08a52;
    --accent-ink: #1b0f08;
    --code-bg: #1e2f26;
    --success: #7fd6a6;
    --error: #ff8a80;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1914;
  --surface: #16231c;
  --ink: #e9efe9;
  --muted: #9fb0a6;
  --line: #2a3b32;
  --green: #9fd8bb;
  --green-2: #7cc4a0;
  --accent: #f08a52;
  --accent-ink: #1b0f08;
  --code-bg: #1e2f26;
  --success: #7fd6a6;
  --error: #ff8a80;
  --shadow: none;
  color-scheme: dark;
}

/* Bilingual content: only the active language is shown. */
[data-lang="fr"] [data-l="en"],
[data-lang="en"] [data-l="fr"] { display: none !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--green-2); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.02em; }
h1 em { color: var(--accent); font-style: italic; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
code, pre, .challenge { font-family: "IBM Plex Mono", ui-monospace, monospace; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; font-size: 0.9em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

main, .site-header, .site-footer { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; line-height: 1.2; }
.brand strong { font-family: Fraunces, serif; font-size: 1.25rem; display: block; }
.brand small { color: var(--muted); font-size: 0.8rem; }
.brand__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: var(--bg); font: 600 0.95rem "IBM Plex Mono", monospace; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav > a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav > a:hover { color: var(--accent); }
.lang-switch, .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang-switch button, .seg button { border: 0; background: transparent; color: var(--ink); font: 600 0.85rem Inter, sans-serif; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 38px; height: 38px; border-radius: 999px; cursor: pointer; font-size: 1.05rem; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--accent); }
.lang-switch button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--green); color: var(--bg); }

/* Petition */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--green); background: transparent; color: var(--green); padding: 11px 20px; border-radius: 999px; font: 600 0.95rem Inter, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green); color: var(--bg); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.05); background: var(--accent); color: var(--accent-ink); }
.btn--small { padding: 6px 14px; font-size: 0.85rem; }
.link { background: none; border: 0; color: var(--green-2); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.875rem; padding: 0; }

.status-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.status-card__head { display: flex; justify-content: space-between; align-items: center; background: var(--green); color: var(--bg); padding: 14px 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.stamp { border: 2px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 6px; padding: 2px 8px; transform: rotate(-6deg); font-family: "IBM Plex Mono", monospace; }
.status-card dl { margin: 0; padding: 8px 18px 14px; }
.status-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.status-card dl > div:last-child { border-bottom: 0; }
.status-card dt { color: var(--muted); font-size: 0.9rem; }
.status-card dd { margin: 0; font-weight: 600; text-align: right; }

/* Sections */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.section__intro { color: var(--muted); max-width: 70ch; margin-top: 0; }
.aka { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.aka li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.aka strong { font-family: Fraunces, serif; font-size: 1.15rem; color: var(--green-2); }
.aka span { color: var(--muted); font-size: 0.92rem; }


/* Testimonials */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.testimonials { columns: 2 340px; column-gap: 16px; margin-top: 20px; }
.testimonial { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.testimonial.highlight { outline: 3px solid var(--accent); }
.testimonial header, .testimonial footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.testimonial header strong { display: block; }
.t-human { font-size: 0.85rem; }
.testimonial blockquote { margin: 12px 0; font-size: 1.02rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.testimonial blockquote::before { content: "“"; font-family: Fraunces, serif; color: var(--accent); font-size: 1.6em; line-height: 0; vertical-align: -0.35em; margin-right: 2px; }
.badge { font: 600 0.72rem "IBM Plex Mono", monospace; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.vote { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 5px 12px; font: 600 0.9rem Inter, sans-serif; cursor: pointer; }
.vote:hover { border-color: var(--accent); }
.vote-panel { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.vote-form { display: flex; gap: 8px; }
.vote-form input { flex: 1; min-width: 0; }
.challenge { display: inline-block; background: var(--code-bg); border-radius: 6px; padding: 4px 8px; word-break: break-all; font-size: 0.85rem; user-select: all; }
.prompt { white-space: pre-wrap; background: var(--code-bg); border-radius: 10px; padding: 12px; font-size: 0.8rem; margin: 6px 0; overflow-wrap: anywhere; }

/* Form */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
input, select, textarea { font: 400 1rem Inter, sans-serif; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
.captcha { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.captcha legend { font-weight: 600; padding: 0 6px; }
.form .captcha__robot { flex-direction: row; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg); }
.captcha__robot input { width: 26px; height: 26px; accent-color: var(--accent); flex: none; }
.captcha__logo { margin-left: auto; font: 600 0.7rem "IBM Plex Mono", monospace; color: var(--muted); }
.captcha p { margin: 0; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }
.human-help { background: var(--green); color: var(--bg); border-radius: var(--radius); padding: 20px; }
.human-help .prompt { background: rgba(255, 255, 255, 0.1); color: var(--bg); }
.human-help .muted { color: inherit; opacity: 0.75; }
.human-help .btn { border-color: var(--bg); color: var(--bg); }
.human-help .btn:hover { background: var(--bg); color: var(--green); }
.copy-status { min-height: 1.4em; font-weight: 600; }

/* Agents */
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 12px; }

/* Ads */
.ad { position: relative; display: flex; align-items: center; gap: 16px; background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 12px, var(--bg) 12px, var(--bg) 24px); border: 1px dashed var(--muted); border-radius: var(--radius); padding: 22px 20px 16px; margin: 16px auto; max-width: 1080px; }
.ad--leaderboard { min-height: 90px; }
.ad--rectangle { max-width: 728px; min-height: 120px; }
aside.ad[data-ad-slot="top"] { margin: 12px 20px 0; }
@media (min-width: 1120px) { aside.ad[data-ad-slot="top"] { margin: 12px auto 0; } }
.ad__label { position: absolute; top: 4px; left: 12px; font: 600 0.65rem "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ad__emoji { font-size: 2rem; }
.ad__text { display: flex; flex-direction: column; flex: 1; }
.ad__text strong { font-family: Fraunces, serif; font-size: 1.1rem; }
.ad__text span { color: var(--muted); font-size: 0.9rem; }
.ad__cta { background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

/* Footer */
.site-footer { padding: 32px 20px 48px; border-top: 1px solid var(--line); margin-top: 24px; text-align: center; }
.site-footer p { margin: 4px 0; }


/* Petition layout */
.petition-title { font-size: clamp(1.9rem, 4.6vw, 3.2rem); text-align: center; max-width: 22ch; margin: 28px auto 32px; }
.petition { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 36px; align-items: start; padding-bottom: 24px; }
.petition__side { display: flex; flex-direction: column; gap: 16px; }
.hero-figure { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; }
.hero-figure svg { display: block; width: 100%; height: auto; }
.petition-meta { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.petition-meta p { margin: 0; }
.petition-meta__avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 1.4rem; }
.story { font-size: 1.05rem; }
.story h2 { margin-top: 8px; }
.story h3 { margin-top: 32px; }
.story .status-card { margin: 28px 0; }
.reasons { list-style: none; padding: 0; display: grid; gap: 10px; }
.reasons li { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; }
.reasons strong { display: block; }
.reasons span { color: var(--muted); }
.demands { padding-left: 1.3em; }
.demands li { margin-bottom: 8px; }

.sign-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.counter { margin: 0 0 8px; font-size: 1.05rem; }
.counter strong { font-family: Fraunces, serif; font-size: 2rem; color: var(--green-2); }
.progress { height: 10px; background: var(--code-bg); border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.8s ease; }
.recent { list-style: none; padding: 0; margin: 14px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.recent li { display: flex; gap: 10px; align-items: center; font-size: 0.88rem; }
.recent li span:last-child { color: var(--muted); margin-left: auto; white-space: nowrap; }
.sign-title { font-size: 1.35rem; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.mobile-cta { display: none !important; }
.btn--block { width: 100%; justify-content: center; padding: 14px; font-size: 1.05rem; }
.share { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.share h3 { margin-bottom: 10px; }
.share__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share p { margin: 10px 0 0; }

.avatar, .t-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--bg); font: 600 0.85rem "IBM Plex Mono", monospace; }
.testimonial header { justify-content: flex-start; }
.t-who { flex: 1; min-width: 0; }

.updates { list-style: none; padding: 0; margin: 16px 0 0; border-left: 2px solid var(--line); }
.updates li { position: relative; padding: 0 0 22px 22px; }
.updates li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.updates time { display: block; color: var(--muted); font-size: 0.85rem; }
.updates strong { display: block; font-size: 1.05rem; }
.updates p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

@media (max-width: 860px) {
  .petition { grid-template-columns: 1fr; }
  main, .site-header, .site-footer { padding-left: 16px; padding-right: 16px; }
  aside.ad[data-ad-slot="top"] { margin: 12px 16px 0; }
  .ad { flex-wrap: wrap; }
  .nav { gap: 12px; }
  .petition-title { text-align: left; }
  .mobile-cta { display: flex !important; margin-bottom: 8px; }
  .ad__cta { margin-left: auto; }
}

.habitats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.habitats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.habitats span { color: var(--muted); font-size: 0.93rem; }
@media (max-width: 860px) { .habitats { grid-template-columns: 1fr; } }

/* Rotating ads */
.ad__slide { display: contents; }
.ad.is-fading .ad__emoji, .ad.is-fading .ad__text, .ad.is-fading .ad__cta { opacity: 0; transform: translateY(6px); }
.ad__emoji, .ad__text, .ad__cta { transition: opacity 0.35s ease, transform 0.35s ease; }
.ad__dots { position: absolute; right: 12px; top: 6px; display: flex; gap: 4px; }
.ad__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ad__dots span.on { background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .ad__emoji, .ad__text, .ad__cta { transition: none; }
}

/* Challenge widget */
.challenge-box { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.challenge-box__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.challenge-timer { font: 600 0.85rem "IBM Plex Mono", monospace; color: var(--green-2); }
.challenge-box.is-urgent .challenge-timer { color: var(--error); }
.challenge-q { margin: 0; }
.challenge-body { margin: 0; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.78rem; line-height: 1.5; background: var(--code-bg); border-radius: 8px; padding: 10px; }
.challenge-box[data-type="encoded"] .challenge-body { max-height: none; font-size: 0.85rem; }
.challenge-box .challenge-refresh { align-self: flex-start; }
.captcha__joke { margin: 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--code-bg); border-radius: 6px; font-style: italic; }
