/* Athar public site. RTL, green + gold identity. One stylesheet for every public page. */
/* Tajawal, self-hosted (SIL OFL 1.1, see fonts/tajawal/OFL.txt). No external font requests. */
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/tajawal/tajawal-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/tajawal/tajawal-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/tajawal/tajawal-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/tajawal/tajawal-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/tajawal/tajawal-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/tajawal/tajawal-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/tajawal/tajawal-arabic-800-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/tajawal/tajawal-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --green-950: #043c35;
  --green-900: #064f43;
  --green-800: #086456;
  --green-100: #e7f0eb;
  --gold-600: #b78a32;   /* decorative fills, borders */
  --gold-500: #c99d43;
  --gold-300: #dec382;
  --gold-text: #8a6420; /* gold for text on light backgrounds: 5.4:1 on white (AA) */
  --focus-ring: #8a6420;
  --ink: #153530;
  --muted: #5f716d;
  --cream: #f7f5ee;
  --paper: #fffefa;
  --line: #dfe6e1;
  --shadow: 0 2px 5px 0 rgba(0, 0, 0, .35); /* card/widget shadow, as on the reference layout */
  --radius: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; } /* focused/anchored elements stay clear of the sticky header (WCAG 2.4.11) */
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 1.7; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--green-950); line-height: 1.35; }
p { margin: 0; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.container--narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 12px; right: 12px; transform: translateY(-200%); padding: 10px 16px; color: #fff; background: var(--green-950); border-radius: 8px; }
.skip-link:focus { transform: none; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }
.on-dark, .skip-link { --focus-ring: var(--gold-300); }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* Header + navigation */
/* Two rows on a green gradient: logo (right) and the library search (left) on the first row, the navigation on the second.
   Top-level items are white on green; on desktop the open dropdown's panel is dark green with white links, while the
   mobile menu panel stays white with dark text (colours and focus ring reset below). */
.site-header { position: sticky; top: 0; z-index: 50; --focus-ring: var(--gold-300); background: linear-gradient(180deg, var(--green-800) 0%, var(--green-950) 100%); border-bottom: 3px solid var(--gold-500); box-shadow: 0 4px 14px rgba(4, 40, 34, .18); }
.site-header .brand-mark { padding: 3px 4px; background: var(--paper); border-radius: 5px; }
.site-header .brand-copy strong { color: #fff; }
.site-header .brand-copy small { color: rgba(255, 255, 255, .78); }
/* «أثر» in the logo's orange hue, brightened slightly so it reads on the green (3.9:1 header, 5:1 footer; large bold text). */
.brand-accent { color: #d69a2d; }
.site-header .menu-toggle { border-color: rgba(255, 255, 255, .35); }
.site-header .menu-toggle__bars span { background: #fff; }
.nav-group__menu { --focus-ring: #8a6420; }
.main-nav { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; width: min(1220px, calc(100% - 24px)); }
.brand { order: 1; display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.brand-mark { display: block; flex: 0 0 56px; width: 56px; height: 40px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { color: var(--green-950); font-size: 1rem; font-weight: 800; }
.brand-copy small { color: var(--muted); font-size: .78rem; }
.site-search { order: 3; position: relative; flex: none; width: 190px; margin-inline-start: auto; }
.site-search input { width: 100%; height: 28px; padding: 0 10px; padding-inline-end: 34px; color: #fff; background: rgba(255, 255, 255, .25); border: 0; border-radius: 5px; }
.site-search input::placeholder { color: rgba(255, 255, 255, .85); }
.site-search input:focus { background: rgba(255, 255, 255, .4); }
.site-search button { position: absolute; top: 0; inset-inline-end: 0; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #fff; background: var(--gold-600); border: 0; border-radius: 5px; cursor: pointer; }
.site-search button:hover { background: var(--gold-500); }
.nav-links { order: 2; flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 8px; color: #294942; font-size: 13.5px; font-weight: 700; text-decoration: none; border-radius: 5px; }
.nav-links a:hover { color: var(--green-900); background: var(--green-100); }
.nav-links a[aria-current="page"] { color: var(--green-900); box-shadow: inset 0 -3px 0 var(--green-900); } /* green underline: >=3:1 against the header */
.menu-toggle { order: 2; display: none; place-items: center; width: 48px; height: 48px; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.menu-toggle__bars { display: grid; gap: 5px; width: 22px; }
.menu-toggle__bars span { display: block; height: 2px; background: var(--green-950); border-radius: 2px; }
/* Nav dropdowns («عن المركز», «البرامج»): disclosure buttons toggled by script.js */
.nav-group { position: relative; }
.nav-group__toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 8px; color: #294942; font: inherit; font-size: 13.5px; font-weight: 700; background: none; border: 0; border-radius: 5px; cursor: pointer; }
.nav-group__toggle:hover, .nav-group__toggle[aria-expanded="true"] { color: var(--green-900); background: var(--green-100); }
.nav-group__toggle.is-current { color: var(--green-900); box-shadow: inset 0 -3px 0 var(--green-900); }
.nav-group__caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.nav-group__toggle[aria-expanded="true"] .nav-group__caret { transform: translateY(1px) rotate(-135deg); }
.nav-group__menu { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 60; display: none; min-width: 220px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.nav-group__toggle[aria-expanded="true"] + .nav-group__menu { display: block; }
.nav-group__menu a { display: flex; width: 100%; }
.section-siblings ul { padding-inline-start: 1.2em; }
.section-siblings a[aria-current="page"] { color: var(--green-950); text-decoration: none; font-weight: 800; }
/* Inline (desktop) navigation: 1181px+, and from 768px on screens taller than a phone in landscape; script.js `desktop` uses the same query. */
@media (min-width: 1181px), (min-width: 768px) and (min-height: 501px) {
  .site-header .nav-links > a, .site-header .nav-group__toggle { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
  .site-header .nav-links > a:hover, .site-header .nav-group__toggle:hover { color: #fff; background: var(--green-950); }
  .site-header .nav-group__toggle[aria-expanded="true"] { color: #fff; background: var(--green-950); border-radius: 5px 5px 0 0; }
  .site-header .nav-links > a[aria-current="page"], .site-header .nav-group__toggle.is-current { color: #fff; box-shadow: inset 0 -3px 0 var(--gold-300); }
  .nav-group__menu { --focus-ring: var(--gold-300); top: 100%; padding: 6px; background: var(--green-950); border: 0; border-radius: 0 0 5px 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
  .nav-group__menu a { color: #fff; border-radius: 4px; }
  .nav-group__menu a:hover { color: #fff; background: var(--green-800); }
  .nav-group__menu a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--gold-300); }
}
@media (max-width: 1180px) { .site-header .nav-links { --focus-ring: #8a6420; } }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: 5px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: #fff; background: var(--green-900); }
.button--primary:hover { background: var(--green-800); }
.button--gold { color: #183a34; background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); }
.button--ghost { color: var(--green-900); background: #fff; border-color: rgba(6, 79, 67, .3); }
.button--light { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .6); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; color: var(--green-900); font-weight: 800; text-decoration: underline; text-decoration-color: var(--gold-500); text-underline-offset: 6px; }
.text-link::after { content: "←"; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--white { background: #fff; }
.section--cream { background: var(--cream); }
.section-kicker, .eyebrow { margin-bottom: 8px; color: var(--gold-text); font-size: .9rem; font-weight: 800; }
.section h2, .cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.section-more { margin-top: 24px; }
.section-more--center { text-align: center; }
/* Section title as on the reference: a gradient pill centred over a thin grey rule. */
.section-title { position: relative; margin-bottom: 30px; text-align: center; }
.section-title::before { content: ""; position: absolute; top: 50%; inset-inline: 0; height: 2px; margin-top: -1px; background: #ccc; }
.section .section-title h2 { position: relative; z-index: 1; display: inline-block; min-width: min(300px, 100%); height: 48px; padding: 0 24px; color: #fff; font-size: 1.6875em; font-weight: 700; line-height: 48px; background: linear-gradient(to bottom, var(--green-800) 0%, var(--green-950) 100%); border-radius: 5px; box-shadow: var(--shadow); }
.lead { color: var(--green-900); font-size: 1.15rem; font-weight: 500; line-height: 1.9; }
.prose { color: var(--ink); white-space: pre-line; }
.lead + .prose, .card__lead + .prose { margin-top: 14px; }
.subheading { margin-bottom: 14px; font-size: 1.2rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.split h2 { margin-bottom: 18px; }
.split--wide { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.empty-state { padding: 22px 24px; color: var(--muted); background: #fff; border: 1px dashed #c9d6cf; border-radius: 14px; text-align: center; }
.section--white .empty-state { background: var(--cream); }

/* Showcase (homepage) */
/* Three columns in the container on a cream band with a faint gold dot pattern: the «الإعلانات» card (right), the
   slideshow (middle, one image at a time: each cell is the full slider width, so script.js's centring just slides the
   track by whole cells; white frame, rounded, round arrows at the edges, crystal dots over the image's foot) and the
   «بطاقة الإدارة» card (left). Cards reuse the widget box and share the slider's height; up to 1180px the slider spans
   the row above the two cards, which stack at phone width. Without slides the cards share the row. */
.showcase { --showcase-h: clamp(220px, 34vw, 420px); padding-block: 18px 10px; background: radial-gradient(circle at 1px 1px, rgba(201, 157, 67, .16) 1px, transparent 1.6px) 0 0 / 28px 28px, var(--cream); }
.showcase__grid { display: flex; gap: 20px; }
.slider { position: relative; flex: 1 1 0; min-width: 0; height: var(--showcase-h); overflow: hidden; }
.slider__viewport { position: relative; display: flex; height: 100%; transition: transform .6s ease; }
.slider__slide { flex: 0 0 100%; height: 100%; margin: 0; opacity: .5; transition: opacity .6s ease; }
.slider__slide.is-active { opacity: 1; }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; border: 5px solid #fff; border-radius: 10px; box-shadow: var(--shadow); }
.home-card { flex: 0 0 280px; height: var(--showcase-h); min-width: 0; }
.showcase__grid:not(:has(.slider)) .home-card { flex: 1 1 0; }
.home-card .widget__content { min-height: 0; overflow-y: auto; }
.home-card .widget__item:last-child { border-bottom: 0; }
.home-card__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
/* Board card: members stacked in one grid cell, the active one faded in; photo fills the space above name and role. */
.board__members { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); padding: 12px 15px 0; }
.board__member { grid-area: 1 / 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; text-align: center; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.board__member.is-active { opacity: 1; visibility: visible; }
.board__member img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.board__member figcaption { padding: 8px 0 4px; line-height: 1.5; }
.board__name { display: block; color: var(--green-900); font-weight: 700; }
.board__role { display: block; color: var(--muted); font-size: .9em; }
.board__dots { display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 4px; }
.board__dots[hidden] { display: none; }
.board__dot { display: grid; place-items: center; width: 24px; height: 28px; padding: 0; background: none; border: 0; cursor: pointer; }
.board__dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #c9d6cf; transition: transform .25s ease, background-color .25s ease; }
.board__dot[aria-current="true"]::before { background: var(--green-800); transform: scale(1.3); }
@media (max-width: 1180px) {
  .showcase__grid { flex-wrap: wrap; }
  .showcase__grid > .slider { flex-basis: 100%; order: -1; }
  .home-card { flex: 1 1 0; height: 340px; }
}
@media (max-width: 560px) {
  .home-card { flex-basis: 100%; }
}
.slider__controls { position: absolute; inset: 0; pointer-events: none; }
.slider__controls[hidden] { display: none; }
.slider__arrow { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; padding: 0; color: var(--green-900); font-size: 30px; line-height: 1; background: #fff; border: 0; border-radius: 50%; box-shadow: var(--shadow); cursor: pointer; pointer-events: auto; }
.slider__arrow:hover { color: var(--gold-text); }
.slider__arrow--prev { inset-inline-start: 12px; }
.slider__arrow--next { inset-inline-end: 12px; }
/* Crystal dots: translucent glass beads with a highlight, floating over the image (no bar behind them). */
.slider__dots { position: absolute; inset-block-end: 12px; inset-inline: 0; display: flex; flex-wrap: wrap; justify-content: center; pointer-events: auto; }
.slider__dot { display: grid; place-items: center; width: 26px; height: 32px; padding: 0; background: none; border: 0; cursor: pointer; }
.slider__dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 18%, rgba(255, 255, 255, .35) 45%, rgba(255, 255, 255, .12) 100%); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 2px 6px rgba(0, 0, 0, .28), inset 0 -1px 2px rgba(255, 255, 255, .35); backdrop-filter: blur(4px); transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease; }
.slider__dot:hover::before { transform: scale(1.15); }
.slider__dot[aria-current="true"]::before { transform: scale(1.3); background: radial-gradient(circle at 32% 28%, #fff 0 22%, rgba(255, 255, 255, .85) 60%, rgba(220, 236, 230, .8) 100%); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 0 12px rgba(255, 255, 255, .7), 0 2px 6px rgba(0, 0, 0, .3); }
.slider__dot:focus-visible { outline: 3px solid #fff; outline-offset: 0; border-radius: 8px; }

/* Widget columns under the slideshow: gradient title bar, white body, items as day/month/year block + category badge + title. */
.home-widgets { padding-block: 10px 26px; background: var(--cream); }
.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.widget { display: flex; flex-direction: column; background: #fff; border-radius: 5px; box-shadow: var(--shadow); }
.widget__title { height: 45px; padding: 10px 20px; color: #fff; background: linear-gradient(to bottom, var(--green-800) 0%, var(--green-950) 100%); border-radius: 5px 5px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget__title h2 { margin: 0; color: #fff; font-size: 1.25em; font-weight: 700; line-height: 25px; }
.widget__content { flex: 1; min-height: 290px; padding: 12px 15px 4px; }
.widget__item { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; min-height: 80px; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.widget__item--plain { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.widget__date { color: #666; text-align: center; line-height: 1.2; }
.widget__date span { display: block; }
.widget__date .day { font-size: 1.625em; font-weight: 700; }
.widget__date .year { font-size: 1.125em; }
.widget__category { display: inline-block; margin-bottom: 2px; padding: 1px 6px; color: #fff; font-size: .9375em; font-weight: 700; background: var(--green-800); }
.widget__item-title { font-size: 1em; font-weight: 700; line-height: 1.5; }
.widget__item-title a { color: var(--ink); text-decoration: none; }
.widget__item-title a:hover { color: var(--green-900); text-decoration: underline; }
.widget__summary { color: var(--muted); font-size: .9em; }
.widget__more { padding: 4px 0 6px; text-align: end; }
.widget__more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-text); font-weight: 700; text-decoration: none; }
.widget__more a:hover { text-decoration: underline; }
.widget .empty-state { padding: 16px; }

/* Image row (latest publications): framed cover, bold underlined title, gold date, as the reference's events row. */
.events-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px 24px; margin: 0; padding: 0 clamp(0px, 4vw, 70px); list-style: none; text-align: center; }
.event__link { display: block; color: var(--ink); text-decoration: none; }
.event__image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 12px; background: #fff; border: 4px solid #fff; border-radius: 5px; box-shadow: var(--shadow); }
.event__image--empty { background: #fff url("/assets/athar-logo.webp") center / 96px auto no-repeat; }
.event__title { display: block; margin-bottom: 6px; font-size: 1.125em; font-weight: 700; line-height: 1.5; text-decoration: underline; transition: color .15s ease-out; }
.event__link:hover .event__title { color: var(--green-900); }
.event__date { color: var(--gold-text); font-size: .8125em; }

/* Intro: title, lead, two calls to action and the three «البرامج» boxes (icon medallion floating over the box's top). */
.intro-band { background: #fff; }
.intro { padding-block: clamp(32px, 5vw, 56px); text-align: center; }
.intro__kicker { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 12px; color: var(--gold-text); font-size: .95rem; font-weight: 800; }
.intro__kicker::before, .intro__kicker::after { content: ""; width: 44px; height: 1px; background: var(--gold-500); }
.intro__title { max-width: 18ch; margin: 0 auto 14px; color: var(--green-900); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.3; }
.intro__lead { max-width: 640px; margin: 0 auto; color: #3f5a54; font-size: 1.05rem; line-height: 1.9; }
.intro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.intro-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 60px 24px; margin: 70px 0 0; padding: 0; list-style: none; }
.intro-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 54px 20px 22px; background: linear-gradient(to bottom, #f1f1f1 0%, #fff 50%, #efefef 51%, #f8f8f8 100%); border-radius: 5px; box-shadow: inset 0 0 10px 5px #fff, var(--shadow); text-align: center; transition: box-shadow .15s ease-out; }
.intro-card__icon { position: absolute; top: -40px; inset-inline-start: 50%; display: grid; place-items: center; width: 80px; height: 80px; margin-inline-start: -40px; color: var(--gold-600); background: #fff; border: 3px solid var(--gold-500); border-radius: 50%; box-shadow: var(--shadow); transition: top .15s ease-out; }
.intro-card__title { margin: 0; color: var(--green-900); font-size: 1.125em; }
.intro-card__title .card__link { color: inherit; text-decoration: none; }
.intro-card__title .card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.intro-card:has(.card__link:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.intro-card:hover { box-shadow: inset 0 0 20px 0 var(--green-800), var(--shadow); }
.intro-card:hover .intro-card__icon { top: -46px; }
.intro-card p { margin: 0; color: var(--muted); font-size: .95em; }
@media (max-width: 560px) {
  .intro__actions .button { flex: 1 1 100%; }
  .intro__kicker::before, .intro__kicker::after { width: 24px; }
  .slider__arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 24px; }
  .slider__dots { inset-block-end: 6px; flex-wrap: nowrap; }
  .slider__dot { width: 20px; }
}

/* Cards and grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: #fff; border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
.section--white .card:not(.card--feature):not(.card--accent) { background: var(--paper); }
.card__title, .section .card__title { font-size: 1.2rem; } /* one rule for every card title: beats ".section h2" on inner pages */
.card__link { text-decoration: none; }
.card__link::after { position: absolute; inset: 0; content: ""; border-radius: inherit; } /* whole card clickable, one link name */
.card:has(.card__link):hover { border-color: var(--gold-500); box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.card__meta { color: var(--gold-text) !important; font-size: .9rem; font-weight: 700; }
.card__image { width: calc(100% + 36px); max-width: none; margin: -18px -18px 8px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.card__image--empty { display: block; background: #fff url("/assets/athar-logo.webp") center / 96px auto no-repeat; border-bottom: 1px solid var(--line); } /* placeholder cover when other cards in the list have one */
.card .button { align-self: flex-start; margin-top: 8px; }
.card-grid--sections { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); } /* short fixed lists: no empty trailing column */
.prose + .card-grid { margin-top: 32px; }
.about-method { margin-top: 48px; }
.about-method .subheading { margin-bottom: 10px; }
.card--feature { color: #fff; background: var(--green-950); border: 0; border-top: 4px solid var(--gold-500); padding: 30px; }
.card--feature h3 { color: #fff; font-size: 1.35rem; }
.card--feature p, .card--feature .prose { color: rgba(255, 255, 255, .85); }
.card__lead { color: var(--gold-300) !important; font-weight: 700; }
.card--accent { gap: 12px; background: var(--green-100); border-color: transparent; border-top: 4px solid var(--gold-500); }
.card--accent h3 { font-size: 1.3rem; }
.card--accent p { color: #4f605c; } /* --muted is 4.4:1 on green-100; this is 5.7:1 */
.card--row { flex-direction: row; align-items: center; gap: 16px; }
.event-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.date-badge { display: flex; flex: 0 0 72px; flex-direction: column; align-items: center; justify-content: center; height: 76px; color: #fff; background: var(--green-900); border-radius: 14px; line-height: 1.2; }
.date-badge strong { font-size: 1.5rem; }
.date-badge span { color: var(--gold-300); font-size: .85rem; }

/* Dialogue -> impact steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 26px 22px 22px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--green-900); border-radius: var(--radius); counter-increment: step; }
.steps li::before { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; content: counter(step); color: var(--green-950); background: var(--gold-300); border-radius: 50%; font-weight: 800; }
.steps h3 { margin-bottom: 6px; font-size: 1.2rem; }
.steps p { color: var(--muted); }

/* Call to action */
.cta { padding-block: clamp(56px, 7vw, 84px); color: #fff; background: linear-gradient(115deg, var(--green-950), var(--green-800)); }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.cta h2 { margin-bottom: 10px; color: #fff; }
.cta p { max-width: 640px; color: rgba(255, 255, 255, .85); }
.cta .section-kicker { color: var(--gold-300); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Inner page header */
.page-header { padding-block: clamp(36px, 6vw, 64px); background: var(--cream); border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.page-header .lead { max-width: 760px; margin-top: 12px; }
.page-header__meta { margin-top: 10px; color: var(--muted); font-weight: 500; }
.breadcrumb { margin-bottom: 8px; font-weight: 700; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green-900); }
.breadcrumb a::before { margin-inline-end: 6px; content: "→"; }
.detail-image { width: 100%; margin-bottom: 24px; border-radius: var(--radius); }

/* Forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input, .form textarea { width: 100%; min-height: 48px; padding: 12px 14px; color: var(--ink); background: #fff; border: 1px solid #b9cbc1; border-radius: 10px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .button { justify-self: start; }
.form [aria-invalid="true"] { border-color: #b42318; box-shadow: 0 0 0 1px #b42318; }
.field-error { margin-top: -10px; color: #8a1f1f; font-size: .95rem; font-weight: 700; }
.field-error.field-validation-valid { display: none; }
.form-note { color: var(--muted); font-size: .95rem; }
.form-note a { color: var(--green-900); font-weight: 700; }
.alert { padding: 14px 18px; border-radius: 12px; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert--success { color: #195c35; background: #e6f5eb; }
.alert--error { color: #8a1f1f; background: #fbeaea; }

/* Footer */
.site-footer { color: rgba(255, 255, 255, .8); background: #032e29; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-block: 56px; }
.brand--footer .brand-mark { background: var(--paper); border-radius: 8px; }
.brand--footer .brand-copy strong { color: #fff; }
.brand--footer .brand-copy small { color: rgba(255, 255, 255, .75); }
.footer-brand p { max-width: 380px; margin-top: 14px; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer-links h2 { margin-bottom: 8px; color: var(--gold-300); font-size: 1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; }

@media (max-width: 1180px) {
  .main-nav { flex-wrap: wrap; gap: 6px 12px; padding-block: 6px; }
  .menu-toggle { display: grid; margin-inline-start: auto; }
  .site-search { order: 4; flex-basis: 100%; width: 100%; margin: 0; }
  .nav-links { position: absolute; top: calc(100% + 8px); inset-inline: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; flex-wrap: nowrap; } /* one scrolling column: a long menu must not wrap into a second column */
  .nav-links a { min-height: 48px; padding: 10px 14px; }
  .nav-links { max-height: calc(100vh - 100px); overflow-y: auto; }
  .nav-group__toggle { width: 100%; min-height: 48px; padding: 10px 14px; justify-content: space-between; }
  .nav-group__menu { position: static; min-width: 0; padding: 0 0 4px; padding-inline-start: 12px; border: 0; border-inline-start: 2px solid var(--line); border-radius: 0; box-shadow: none; margin-inline-start: 14px; }
}

@media (max-width: 900px) {
  .split, .split--wide { grid-template-columns: 1fr; }
  .steps, .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  html { scroll-padding-top: 64px; }
  .brand-mark { flex-basis: 58px; width: 58px; height: 42px; }
  .steps, .widgets, .footer-grid { grid-template-columns: 1fr; }
  .cta__actions .button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .button:hover { transform: none; }
}

/* === Committees & impact (Phases 4 and 6) === */
.module-detail > * + * { margin-top: 40px; }
.module-detail .card__title a { display: inline-flex; align-items: center; min-height: 44px; }
.member-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.status-badge { align-self: flex-start; padding: 2px 12px; color: var(--green-900); background: var(--green-100); border-radius: 999px; font-size: .9rem; font-weight: 700; }
.status-badge--pending { color: #6b4a00; background: #fbf1d9; }
.filter-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.filter-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; color: var(--green-900); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; text-decoration: none; }
.filter-links a[aria-current="page"] { color: #fff; background: var(--green-900); border-color: var(--green-900); }
.timeline { margin: 0; padding: 0; list-style: none; border-inline-start: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 24px 24px; }
.timeline li::before { position: absolute; inset-inline-start: -10px; top: 8px; width: 17px; height: 17px; content: ""; background: #fff; border: 3px solid var(--green-900); border-radius: 50%; }
.timeline li.is-done::before { background: var(--green-900); }
.timeline h3 { font-size: 1.15rem; }
.timeline p { color: var(--muted); }
.section .module-detail h2.subheading { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.module-links { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.table-scroll { overflow-x: auto; }
.data-table th[scope="row"] { min-width: 10em; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
/* ===== Phase 5: digital library (/library) ===== */
.form select { width: 100%; min-height: 48px; padding: 10px 14px; color: var(--ink); background: #fff; border: 1px solid #b9cbc1; border-radius: 10px; }
.library-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: end; margin-bottom: 28px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.library-filters__search { grid-column: 1 / -1; }
.library-filters__actions { display: flex; flex-wrap: wrap; gap: 10px; grid-column: 1 / -1; }
.library-count { margin-bottom: 16px; color: var(--muted); font-weight: 500; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager [aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; text-decoration: none; }
.pager a { color: var(--green-900); background: #fff; }
.pager a:hover { border-color: var(--green-800); }
.pager [aria-current] { color: #fff; background: var(--green-900); border-color: var(--green-900); }
.library-cover { max-width: 320px; }
.library-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 28px 0; padding: 0; }
.library-meta div { padding: 12px 16px; background: var(--cream); border-radius: 12px; }
.library-meta dt { color: var(--muted); font-size: .9rem; }
.library-meta dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ===== Phase 8: proposals form (/proposals) ===== */
.form-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.form .form-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.form .form-check input { flex: none; width: 24px; min-height: 24px; height: 24px; margin-top: 4px; accent-color: var(--green-900); }
.form .form-check a { color: var(--green-900); font-weight: 700; }
.form input[type="file"] { padding: 10px; }
/* ===== Events registration & surveys (Phases 7 + 9) ===== */
.card-grid + .subheading { margin-top: 40px; }
.registration-state { display: inline-block; align-self: flex-start; justify-self: start; width: fit-content; margin-top: 10px; padding: 4px 12px; color: var(--green-900); background: var(--green-100); border-radius: 999px; font-size: .9rem; font-weight: 700; }
.registration-state--closed, .registration-state--full { color: var(--muted); background: var(--cream); }
.event-facts { display: grid; gap: 10px; margin: 20px 0; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.event-facts div { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.event-facts dt { min-width: 130px; color: var(--muted); font-weight: 700; }
.event-facts dd { margin: 0; overflow-wrap: anywhere; }
.event-registration { margin-top: 32px; }
.event-registration h2 { margin-bottom: 14px; }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.form .check, .form .choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-weight: 500; }
.form .check input, .form .choice input { flex: 0 0 auto; width: 22px; min-height: 22px; height: 22px; margin-top: 3px; padding: 0; accent-color: var(--green-900); }
.form fieldset { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.form legend { padding: 0 6px; font-weight: 700; }
.form .hint { color: var(--muted); font-size: .9rem; font-weight: 500; }
.results-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.results-list > li { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.results-list h2 { margin-bottom: 10px; font-size: 1.1rem; }
.result-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin-top: 10px; }
.result-bar meter { grid-column: 1 / -1; width: 100%; height: 12px; }
/* ===== end events & surveys ===== */

/* ===== Phase 11: homepage research identity ===== */
.impact-cases-title { margin-top: 40px; }
.card--row > div { min-width: 0; }
.survey-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--green-900); font-weight: 700; }

/* ===== Tablets and laptops (561px+ wide and 501px+ tall; phones never match) ===== */
/* Overrides only: the phone layout (<=560px, or <=500px tall) keeps the rules above unchanged. */
@media (min-width: 561px) and (min-height: 501px) {
  .site-search input { height: 40px; }
  .site-search button { width: 40px; height: 40px; }
  .site-search input { padding-inline-end: 46px; }
}
/* 561-767: hamburger stays, but logo, search and menu button share one row. */
@media (min-width: 561px) and (max-width: 767px) and (min-height: 501px) {
  .main-nav { flex-wrap: nowrap; }
  .site-search { order: 2; flex: 0 1 260px; width: auto; margin-inline-start: auto; }
  .menu-toggle { order: 3; margin-inline-start: 0; }
}
/* 768-1180: the full navigation inline as on desktop (links wrap beside the logo if needed, dropdowns float);
   undoes the menu-panel rules of the max-width: 1180px block. */
@media (min-width: 768px) and (max-width: 1180px) and (min-height: 501px) {
  .main-nav { flex-wrap: nowrap; gap: 12px; padding-block: 6px; }
  .menu-toggle { display: none; }
  .site-search { order: 3; flex: 0 0 160px; width: 160px; margin-inline-start: 0; }
  .site-header .nav-links { --focus-ring: var(--gold-300); position: static; display: flex; flex-direction: row; align-items: center; gap: 2px 0; max-height: none; overflow: visible; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .nav-links a, .nav-group__toggle { width: auto; min-height: 40px; padding: 4px 8px; justify-content: flex-start; }
  .nav-group__menu { position: absolute; min-width: 220px; margin-inline-start: 0; padding: 6px; border-inline-start: 0; border-radius: 0 0 5px 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
}
/* Homepage: widgets in two columns up to 1100px (four columns leave ~110px for a title at 901px), the 290px widget
   body only where four columns sit side by side; the programme boxes in three equal columns. */
@media (min-width: 561px) and (max-width: 1100px) and (min-height: 501px) {
  .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget__content { min-height: 0; }
}
@media (min-width: 700px) and (min-height: 501px) {
  .intro-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px 16px; }
}
