/* Les Jasmins de Carthage: a whitewashed site (Sidi Bou Said) with arched blue doors.
   Colours come from the logo (Tunisian red, Luxembourg blue) and match the petition app.
   No JavaScript: the contact form shows the questions for each ticked subject with :has(). */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap;
  src: url(/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --wall: #F5F8FB;        /* whitewashed page */
  --surface: #FFFFFF;
  --ink: #0F1E33;
  --muted: #55657C;
  --line: #DCE3EC;
  --line-strong: #B9C5D4;
  --logo-red: #E30613;
  --logo-blue: #139FDB;
  --action: #0A6AA8;      /* buttons and links: logo blue, deep enough for white text */
  --action-hover: #08578A;
  --action-soft: #E6F2FA;
  --door: #0B4F86;        /* Sidi Bou Said door */
  --on-door: #FFFFFF;
  --on-door-muted: rgba(255, 255, 255, .82);
  --success: #2E7D4F;
  --success-soft: #E5F3EA;
  --danger: #B42318;
  --danger-soft: #FDEDEB;
  --ring: rgba(19, 159, 219, .35);

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(15, 30, 51, .05), 0 12px 32px rgba(15, 30, 51, .07);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355657C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #0A1220;
    --surface: #101B2B;
    --ink: #E8EEF6;
    --muted: #9CAAC0;
    --line: #22324A;
    --line-strong: #3A4D69;
    --action: #2F80C9;
    --action-hover: #4A93D6;
    --action-soft: #142A44;
    --door: #12497C;
    --success: #5CBF85;
    --success-soft: #133325;
    --danger: #FF8A80;
    --danger-soft: #3A1715;
    --ring: rgba(19, 159, 219, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CAAC0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--wall); color: var(--ink);
  font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
html[lang=ar] body { font-family: var(--font-ar); font-size: 1.0625rem; line-height: 1.8; }
main { flex: 1; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; margin: 0; line-height: 1.25; }
html[lang=ar] :is(h1, h2, h3) { line-height: 1.45; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid var(--logo-blue); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: 16px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
.icon { flex: none; width: 1.25em; height: 1.25em; }
[dir=rtl] .icon-arrow { transform: scaleX(-1); }
.hint { color: var(--muted); font-size: .875rem; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); color: var(--muted); max-width: 62ch; }
.note { padding: 12px 16px; border-radius: var(--radius); background: var(--action-soft); font-weight: 600; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 10;
  padding: 10px 16px; border-radius: 8px; background: var(--action); color: #FFFFFF; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

/* Header: the red-and-blue rule echoes the two bars of the logo. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.site-header::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--logo-red) 0 50%, var(--logo-blue) 50% 100%);
}
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 24px; min-height: 76px; padding-block: 14px 10px; }
.brand { display: flex; align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; max-width: 52vw; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .9375rem;
  text-decoration: none; white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a[aria-current=page] { background: var(--action-soft); color: var(--action); }
.main-nav a.nav-cta { background: var(--action); color: #FFFFFF; margin-inline-start: 6px; }
.main-nav a.nav-cta:hover, .main-nav a.nav-cta[aria-current=page] { background: var(--action-hover); color: #FFFFFF; }
.lang-switch {
  flex: none; font-weight: 600; font-size: .9375rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 16px;
}
.lang-switch:hover { border-color: var(--action); color: var(--action); }
html[lang=fr] .lang-switch { font-family: var(--font-ar); }
html[lang=ar] .lang-switch { font-family: var(--font); }
@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; margin-inline: -8px; }
  .main-nav a { padding: 6px 10px; font-size: .875rem; }
  .main-nav a.nav-cta { margin-inline-start: 0; padding-inline: 14px; }
}

/* Flags */
.flags { display: inline-flex; gap: 6px; flex: none; }
.flag { display: block; width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 30, 51, .14); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 24px; border: 0; border-radius: var(--radius);
  background: var(--action); color: #FFFFFF; font: inherit; font-weight: 600; text-align: center;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.button:hover { background: var(--action-hover); color: #FFFFFF; }
.button:active { transform: translateY(1px); }
.button.secondary { background: transparent; color: var(--action); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--action); }
.button.light { background: #FFFFFF; color: #0B4F86; }
.button.light:hover { background: #E6F2FA; color: #08578A; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--action); text-decoration: none; }
.arrow-link:hover { text-decoration: underline; }
.arrow-link .icon { width: 18px; height: 18px; transition: translate .15s ease; }
.arrow-link:hover .icon, .involve-card:hover .arrow-link .icon { translate: 3px 0; }
[dir=rtl] .arrow-link:hover .icon, [dir=rtl] .involve-card:hover .arrow-link .icon { translate: -3px 0; }

/* Arched blue door with a white frame. */
.door {
  background: var(--door); color: var(--on-door); text-align: center;
  border-radius: 50% 50% 16px 16px / 110px 110px 16px 16px;
  box-shadow: 0 0 0 12px var(--surface), 0 0 0 13px var(--line), var(--shadow);
  margin: 13px;
}
/* The emblem on a white disc, like a seal (the emblem image has a white background). */
.medallion {
  display: grid; place-items: center; width: 104px; height: 104px; margin-inline: auto;
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 6px rgba(255, 255, 255, .16);
}
.medallion img { display: block; width: 76px; height: 76px; }

/* Banner pictures: a light "postcard" with a thin frame, in both themes. */
.cover-img, .aside-banner, .page-head-img {
  display: block; width: 100%; height: auto; border-radius: var(--radius-lg);
  background: #F2FAFC; box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
/* The home cover is cropped to a slim strip around the name and the landscape on wide screens. */
.cover-img { object-fit: cover; object-position: 50% 30%; }
@media (min-width: 640px) { .cover-img { aspect-ratio: 6 / 1; } }
.cover { padding-top: 20px; }
@media (min-width: 900px) { .cover { padding-top: 24px; } }

/* Home: hero */
.hero { padding-block: 32px 56px; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
.hero-text { display: grid; gap: 20px; justify-items: start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; padding-inline-start: 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 600;
}
.eyebrow .flag { width: 27px; height: 18px; }
.hero h1 { font-size: clamp(2.125rem, 1.3rem + 3.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.025em; }
html[lang=ar] .hero h1 { letter-spacing: 0; line-height: 1.35; }
.hero-door { padding: 44px 28px 20px; max-width: 380px; width: calc(100% - 26px); justify-self: center; }
.facts { margin: 20px 0 0; display: grid; }
.facts div { padding-block: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.facts dt { font-weight: 600; font-size: 1.25rem; }
.facts dd { margin: 2px 0 0; color: var(--on-door-muted); font-size: .9375rem; }
@media (min-width: 900px) {
  .hero { padding-block: 56px 88px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; }
}

/* Home: current campaign */
.campaign { background: var(--logo-red); color: #FFFFFF; }
.campaign-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 18px; }
.campaign-label { flex: none; padding: 4px 12px; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
html[lang=ar] .campaign-label { text-transform: none; letter-spacing: 0; font-size: .9375rem; }
.campaign-text { flex: 1 1 280px; font-weight: 600; }
.campaign .button.light { min-height: 44px; color: #B3050F; }

/* Sections */
.section { padding-block: 56px; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 62ch; }
.section-head h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.section-head h2::before, .page-head h1::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; margin-bottom: 14px;
  background: linear-gradient(90deg, var(--logo-red) 0 50%, var(--logo-blue) 50% 100%);
}
.section-head p { color: var(--muted); }
.section-link { margin-top: 24px; }

.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card-grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card-grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card-grid > li { display: grid; }
.area-card, .involve-card, .info-card, .action-card {
  display: grid; gap: 10px; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
}
.section.alt .involve-card { background: var(--wall); }
.area-card h3, .involve-card h3, .info-card h3 { font-size: 1.125rem; }
.area-card p, .involve-card p, .info-card p { color: var(--muted); }
.area-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--action-soft); color: var(--action);
}
.area-icon .icon { width: 24px; height: 24px; }
.involve-card { color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.involve-card:hover { color: var(--ink); border-color: var(--action); box-shadow: var(--shadow); transform: translateY(-2px); }
.involve-card .arrow-link { margin-top: 4px; }

.contact-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding: clamp(24px, 5vw, 40px); border-radius: var(--radius-lg); background: var(--door); color: var(--on-door);
}
.contact-band > div { display: grid; gap: 8px; max-width: 60ch; }
.contact-band h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
.contact-band p { color: var(--on-door-muted); }

/* Inner pages */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 44px 32px; }
.page-head-inner { display: grid; gap: 24px; align-items: center; }
.page-head-text { display: grid; gap: 14px; justify-items: start; }
.page-head-img { display: none; }
@media (min-width: 900px) {
  .page-head-inner:has(.page-head-img) { grid-template-columns: minmax(0, 1fr) 200px; gap: 56px; }
  .page-head-img { display: block; }
}
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -0.02em; }
html[lang=ar] .page-head h1 { letter-spacing: 0; }
.pill-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill-nav a {
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 600;
}
.pill-nav a:hover { border-color: var(--action); color: var(--action); }

.page-body { display: grid; gap: 40px; padding-block: 40px 80px; }
.block { display: grid; gap: 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.page-body > .block:first-child { padding-top: 0; border-top: 0; }
.block > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.block > h2 .icon { color: var(--action); width: 26px; height: 26px; }
.block-body { display: grid; gap: 16px; align-content: start; min-width: 0; max-width: 76ch; }
@media (min-width: 900px) {
  .block { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; }
  .block > h2 { align-self: start; }
}
.prose { display: grid; gap: 14px; max-width: 68ch; }
.legal h2 { font-size: 1.25rem; margin-top: 12px; }
.sub-title { font-size: 1.125rem; margin-top: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: .9375rem; font-weight: 600;
}
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.board li { display: grid; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.board span { color: var(--muted); font-size: .875rem; }
.doc-link {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; max-width: 560px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .15s ease;
}
.doc-link:hover { border-color: var(--action); color: var(--ink); }
.doc-link > .icon:first-child { width: 32px; height: 32px; color: var(--action); }
.doc-link span { display: grid; gap: 2px; flex: 1; }
.doc-link small { color: var(--muted); font-size: .875rem; }
.doc-link .icon-arrow { color: var(--action); }

/* Our actions */
.action-card h2 { font-size: 1.25rem; }
.action-card > p { color: var(--muted); }
.mini-title { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
html[lang=ar] .mini-title { text-transform: none; letter-spacing: 0; font-size: .9375rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { position: relative; padding-inline-start: 26px; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg);
}
.callout-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.callout {
  display: grid; gap: 12px; align-content: start; justify-items: start; padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.callout h2 { font-size: 1.375rem; }
.callout p { color: var(--muted); }
.door-callout { background: var(--door); border-color: transparent; color: var(--on-door); }
.door-callout p { color: var(--on-door-muted); }

/* Join us */
.steps-list { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps-list li { counter-increment: step; position: relative; padding-inline-start: 48px; padding-top: 4px; min-height: 34px; }
.steps-list li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--action-soft); color: var(--action); font-weight: 600;
}
.info-card .arrow-link { margin-top: 4px; }
.bank { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bank h3 { font-size: 1rem; }
.bank dl { margin: 0; display: grid; gap: 4px; }
.bank dl div { display: flex; gap: 12px; }
.bank dt { font-weight: 600; min-width: 48px; }
.bank dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Statutes */
.statutes-layout { display: grid; gap: 32px; padding-block: 40px 80px; }
.toc { display: grid; gap: 10px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.toc h2 { font-size: 1rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .875rem; line-height: 1.45; font-family: var(--font); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--action); text-decoration: underline; }
.statutes { display: grid; gap: 12px; max-width: 72ch; font-family: var(--font); font-size: 1rem; line-height: 1.65; }
.statutes h2 { font-size: 1.25rem; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.statutes h3 { font-size: 1.0625rem; margin-top: 12px; }
.statutes-intro { display: grid; gap: 4px; padding: 14px 18px; border-radius: var(--radius); background: var(--action-soft); font-size: .9375rem; }
.statutes-intro + h2 { margin-top: 8px; border-top: 0; padding-top: 0; }
.back-top { margin-top: 24px; font-family: inherit; }
html[lang=ar] .back-top { font-family: var(--font-ar); }
@media (min-width: 960px) {
  .statutes-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; }
}

/* Contact */
.contact-layout { display: grid; gap: 32px; align-items: start; padding-block: 32px 80px; }
@media (min-width: 980px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .contact-aside { position: sticky; top: 24px; }
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); display: grid; gap: 24px;
}
form { display: grid; gap: 24px; }
.contact-form .button[type=submit] { width: 100%; }

.subjects { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.subjects legend { padding: 0; margin-bottom: 4px; font-size: 1.125rem; font-weight: 600; }
.subject-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.subject-option { position: relative; display: grid; cursor: pointer; }
.subject-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.subject-box {
  position: relative; display: grid; align-content: start; gap: 2px;
  padding: 12px 14px; padding-inline-end: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); transition: border-color .15s ease, background-color .15s ease;
}
.subject-box strong { font-weight: 600; line-height: 1.35; }
.subject-box small { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.subject-box::after {
  content: ""; position: absolute; top: 12px; inset-inline-end: 12px; width: 20px; height: 20px;
  border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface) center / 14px no-repeat;
}
.subject-option:hover .subject-box { border-color: var(--muted); }
.subject-option input:checked + .subject-box { border-color: var(--action); background: var(--action-soft); box-shadow: inset 0 0 0 1px var(--action); }
.subject-option input:checked + .subject-box::after {
  border-color: var(--action); background-color: var(--action);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.subject-option input:focus-visible + .subject-box { outline: 3px solid var(--logo-blue); outline-offset: 2px; }
.subjects.has-error .subject-box { border-color: var(--danger); }

.form-section { display: grid; gap: 16px; min-width: 0; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.section-title .icon { color: var(--action); }

/* Questions specific to a subject. Without :has() support they are simply all shown. */
.extra { padding: 18px; border: 1px solid var(--line); border-inline-start: 4px solid var(--logo-blue); border-radius: var(--radius); background: var(--wall); }
@supports selector(:has(*)) {
  .extra { display: none; }
  .contact-form:has([name=subject][value=membership]:checked) .extra-membership,
  .contact-form:has([name=subject][value=volunteering]:checked) .extra-volunteering,
  .contact-form:has([name=subject][value=partnership]:checked) .extra-organisation,
  .contact-form:has([name=subject][value=press]:checked) .extra-organisation,
  .contact-form:has([name=subject][value=support]:checked) .extra-organisation,
  .contact-form:has([name=subject][value=support]:checked) .extra-support { display: grid; }
}

.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; }
.field label.choice-option, .field label.check { font-weight: 400; }
.optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.error { color: var(--danger); font-size: .875rem; font-weight: 600; }
.field input:not([type=checkbox], [type=radio]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 170px; resize: vertical; }
.field select { appearance: none; background-image: var(--chevron); background-repeat: no-repeat; background-size: 18px; background-position: right 14px center; padding-inline-end: 42px; }
[dir=rtl] .field select { background-position: left 14px center; }
.field :is(input:not([type=checkbox], [type=radio]), select, textarea):hover { border-color: var(--muted); }
.field :is(input:not([type=checkbox], [type=radio]), select, textarea):focus { outline: none; border-color: var(--logo-blue); box-shadow: 0 0 0 4px var(--ring); }
.field.has-error :is(input:not([type=checkbox], [type=radio]), select, textarea) { border-color: var(--danger); }
[dir=rtl] .field input[dir=ltr] { text-align: right; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

/* Membership category: radio cards */
.choice { border: 0; padding: 0; margin: 0; }
.choice legend { padding: 0; margin-bottom: 6px; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.choice-option { position: relative; display: grid; cursor: pointer; }
.choice-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-option span {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: start;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.choice-option span::before {
  content: ""; grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface);
}
.choice-option small { grid-column: 2; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.choice-option:hover span { border-color: var(--muted); }
.choice-option input:checked + span { border-color: var(--action); background: var(--action-soft); box-shadow: inset 0 0 0 1px var(--action); }
.choice-option input:checked + span::before { border: 5px solid var(--action); }
.choice-option input:focus-visible + span { outline: 3px solid var(--logo-blue); outline-offset: 2px; }
.choice.has-error .choice-option span { border-color: var(--danger); }

/* Checkbox lists (interests, type of support) */
.field:has(> .check-grid), fieldset.field { border: 0; padding: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.check-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: .9375rem; }
.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--action); }
.check:has(input:checked) { border-color: var(--action); }

.consent { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wall); }
.extra .consent { background: var(--surface); }
.consent label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--action); }
.consent.has-error { border-color: var(--danger); background: var(--danger-soft); }
.alert { padding: 12px 16px; border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); font-weight: 600; }

/* Honeypot: invisible to people and assistive technology, filled in by bots. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.contact-aside { display: grid; gap: 16px; }
.contact-aside h2 { font-size: 1.25rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { margin-top: 3px; color: var(--action); }
.contact-list div { display: grid; min-width: 0; overflow-wrap: anywhere; }
.contact-list .label { font-size: .8125rem; color: var(--muted); font-weight: 600; }

/* Narrow card pages (thank you, errors) */
.page-narrow { max-width: 640px; padding-block: 48px 96px; }
.card h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.card .button.secondary { justify-self: start; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.footer-grid { display: grid; gap: 28px; padding-block: 40px 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-org { display: grid; gap: 10px; }
.footer-name { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1rem; }
.footer-mark { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #FFFFFF; }
.footer-col h2 { margin-bottom: 10px; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
html[lang=ar] .footer-col h2 { text-transform: none; letter-spacing: 0; font-size: .9375rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--action); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 16px 28px; border-top: 1px solid var(--line); font-size: .875rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

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