/* =========================================================
   Education Development Fund — public site
   Tokens: Nile navy + eagle gold (from the Fund's emblem),
   cool paper background, Egyptian flag red used only as a hairline.
   Logical properties throughout so RTL (ar) and LTR (en) share one sheet.
   ========================================================= */

@font-face { font-family: "Plex Arabic"; src: url(/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex"; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kufi"; src: url(/fonts/reem-kufi-arabic-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Kufi"; src: url(/fonts/reem-kufi-arabic-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Kufi"; src: url(/fonts/reem-kufi-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Kufi"; src: url(/fonts/reem-kufi-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Palette shared with the Egyptian Testing Center (etc.edf.edu.eg):
     warm ink, cream paper and the Fund's eagle gold. */
  --dark: #16130F;
  --dark-2: #2A251E;
  --dark-3: #3D3529;
  --gold: #C9962A;        /* decorative gold: rules, connectors, numerals on dark */
  --gold-2: #E7B742;      /* bright gold for button gradients */
  --gold-ink: #9A6D12;    /* gold that passes AA as text on cream */
  --paper: #FBF8F1;
  --tint: #F3ECDD;
  --line: #E4DAC4;
  --ink: #16130F;
  --muted: #6B6255;
  --white: #FFFFFF;
  --red: #C4202F;
  --ok: #2F7D4F;
  --err: #B3261E;
  --on-dark: #EFE7D6;     /* text on dark panels */
  --on-dark-2: #BDB19B;   /* secondary text on dark panels */

  --font-body: "Plex Arabic", "Plex", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Kufi", "Plex Arabic", "Plex", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}
.lang-en { --font-body: "Plex", system-ui, "Segoe UI", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  border-top: 4px solid transparent;
  border-image: linear-gradient(to bottom, var(--red) 0 33%, var(--white) 33% 66%, #000 66%) 1;
  overflow-x: hidden;
}
.lang-en body, body.lang-en { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; word-spacing: .12em; margin: 0 0 .6em; color: var(--dark); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--dark); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 1rem; }

/* ---------- Gov bar ---------- */
.govbar { background: var(--dark); color: var(--on-dark); font-size: var(--step--1); }
.govbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; }
.govbar a { color: inherit; text-decoration: none; }
.govbar__cab { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.govbar__cab img { width: 22px; height: auto; background: #fff; border-radius: 3px; padding: 2px; flex: none; }
.govbar__cab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.govbar__lang { border: 1px solid rgba(255,255,255,.35); padding: .15rem .8rem; border-radius: 999px; flex: none; }
.govbar__lang:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Header ---------- */
.site-header { background: rgba(251, 248, 241, .94); backdrop-filter: saturate(1.2) blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__in { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--dark); margin-inline-end: auto; }
.brand__logo { width: 60px; height: 60px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-family: var(--font-display); font-size: var(--step-1); }
.brand__text small { color: var(--gold-ink); font-size: var(--step--1); font-weight: 600; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { display: block; padding: .5rem .8rem; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: var(--radius); position: relative; }
.site-nav a:hover { background: var(--tint); color: var(--dark); }
.site-nav a[aria-current="page"] { color: var(--dark); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: .8rem; bottom: .15rem; height: 2px; background: var(--gold); }

.navtoggle { display: none; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; font: inherit; font-weight: 600; color: var(--dark); cursor: pointer; min-height: 44px; }
.navtoggle__bars, .navtoggle__bars::before, .navtoggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.navtoggle__bars::before, .navtoggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.navtoggle__bars::before { top: -6px; } .navtoggle__bars::after { top: 6px; }
.navtoggle[aria-expanded="true"] .navtoggle__bars { background: transparent; }
.navtoggle[aria-expanded="true"] .navtoggle__bars::before { transform: translateY(6px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .navtoggle { display: inline-flex; }
  .site-header__in { flex-wrap: wrap; min-height: 72px; gap: .75rem; }
  .brand__logo { width: 48px; height: 48px; }
  .site-nav { display: none; width: 100%; padding-bottom: 1rem; }
  .site-nav.is-open { display: block; }
  .no-js .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"]::after { inset-inline: auto; inset-inline-start: 0; top: .8rem; bottom: .8rem; width: 3px; height: auto; }
  .site-nav a[aria-current="page"] { padding-inline-start: 1rem; }
}
@media (max-width: 420px) {
  .brand__text strong { font-size: 1.05rem; }
  .navtoggle__label { display: none; }
}

/* ---------- Hero + project tree (the signature element) ---------- */
.hero { background: radial-gradient(ellipse 60% 80% at 15% 30%, rgba(231,183,66,.14), transparent 70%), var(--paper); }
.hero__intro { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero__title { font-size: var(--step-4); max-width: 18ch; margin-bottom: .4em; letter-spacing: 0; }
.lang-en .hero__title { max-width: 22ch; letter-spacing: -0.01em; }
.hero__text { max-width: 62ch; color: var(--muted); font-size: var(--step-1); line-height: 1.7; }
.hero__text p:last-child { margin-bottom: 0; }

.tree { background: var(--dark); color: #fff; padding-block: 2.5rem 3rem; position: relative; }
.tree__root { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding-bottom: 2rem; }
.tree__root img { width: 88px; height: 88px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 0 0 3px var(--gold); }
.tree__title { color: #fff; font-size: var(--step-2); margin: .8rem 0 .1rem; }
.tree__hint { color: var(--on-dark-2); margin: 0; font-size: var(--step--1); }
/* trunk */
.tree__root::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 2px; height: 2rem; background: var(--gold); transform: translateX(-50%); }

.tree__branches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 1rem; position: relative; padding-top: 1.75rem; }
/* horizontal limb spanning first to last branch centre */
.tree__branches::before { content: ""; position: absolute; top: 0; inset-inline: calc((100% - 5rem) / 12); height: 2px; background: var(--gold); }
.tree__branch { position: relative; display: flex; flex-direction: column; }
.tree__branch::before { content: ""; position: absolute; top: -1.75rem; left: 50%; width: 2px; height: 1.75rem; background: var(--gold); transform: translateX(-50%); }
.tree__node {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .7rem; text-align: center;
  background: var(--dark-2); border: 1px solid rgba(201,150,42,.45); border-radius: var(--radius);
  padding: 1rem .75rem 1.1rem; color: #fff; text-decoration: none; min-height: 10.5rem;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.tree__node:hover, .tree__node:focus-visible { background: var(--dark-3); border-color: var(--gold); color: #fff; transform: translateY(-2px); }
.tree__logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; padding: 6px; flex: none; }
.tree__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tree__name { font-weight: 700; font-size: .98rem; line-height: 1.5; }
.tree__leaves { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; position: relative; }
.tree__leaves::before { content: ""; position: absolute; top: -.8rem; inset-inline-start: 50%; width: 1px; height: .8rem; background: rgba(201,150,42,.6); }
.tree__leaves a { display: block; text-align: center; font-size: var(--step--1); line-height: 1.45; color: var(--on-dark); text-decoration: none; padding: .45rem .5rem; border: 1px dashed rgba(239,231,214,.35); border-radius: var(--radius); }
.tree__leaves a:hover { color: #fff; border-color: var(--gold); border-style: solid; }

@media (max-width: 1100px) {
  .tree__branches { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1rem; }
  .tree__branches::before { display: none; }
  .tree__branch::before { display: none; }
  .tree__root::after { display: none; }
  .tree__root { padding-bottom: 1.5rem; }
}
/* mobile: the tree becomes a vertical trunk on the inline-start side */
@media (max-width: 640px) {
  .tree { padding-block: 2rem 2.25rem; }
  .tree__root { flex-direction: row; text-align: start; gap: 1rem; padding-bottom: 1.25rem; align-items: center; }
  .tree__root img { width: 64px; height: 64px; }
  .tree__title { margin: 0; }
  .tree__branches { grid-template-columns: 1fr; gap: .9rem; padding-top: 0; padding-inline-start: 1.6rem; border-inline-start: 2px solid var(--gold); margin-inline-start: 31px; }
  .tree__branch::before { display: block; top: 1.9rem; left: auto; inset-inline-start: -1.6rem; width: 1.6rem; height: 2px; transform: none; }
  .tree__node { flex-direction: row; text-align: start; padding: .7rem .9rem; gap: .8rem; min-height: 0; }
  .tree__logo { width: 48px; height: 48px; }
  .tree__leaves { margin-top: .5rem; padding-inline-start: 1rem; }
  .tree__leaves::before { display: none; }
  .tree__leaves a { text-align: start; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section--tint { background: var(--tint); }
.section--navy { background: var(--dark); color: var(--on-dark); }
.section--navy h2 { color: #fff; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section__head .h-section { margin-bottom: 0; }
.h-section { font-size: var(--step-3); margin-bottom: .8rem; }
.h-sub { font-size: var(--step-1); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 60ch; }
.link-more, .link-back { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.link-more::after { content: "›"; font-size: 1.3em; line-height: 1; }
.link-back::before { content: "‹"; font-size: 1.3em; line-height: 1; }
[dir="rtl"] .link-more::after { content: "‹"; }
[dir="rtl"] .link-back::before { content: "›"; }
.link-back { margin-top: 2rem; }
.empty { color: var(--muted); padding: 2rem 0; }

/* ---------- Impact ledger ---------- */
.impact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; align-items: start; }
.impact__head { position: sticky; top: 120px; }
.ledger { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.ledger__row { display: flex; flex-direction: column; gap: .2rem; padding-block: 1.3rem; border-top: 1px solid var(--line); }
.ledger__value { font-family: "Kufi", var(--font-body); font-weight: 700; font-size: var(--step-3); color: var(--dark); line-height: 1.15; text-align: start; font-variant-numeric: tabular-nums; }
[dir="rtl"] .ledger__value { text-align: right; }
.ledger__label { margin: 0; font-weight: 600; line-height: 1.5; }
.ledger__note { display: block; font-weight: 400; color: var(--gold-ink); font-size: var(--step--1); margin-top: .2rem; }
@media (max-width: 860px) {
  .impact__grid { grid-template-columns: 1fr; gap: 1rem; }
  .impact__head { position: static; }
}
@media (max-width: 520px) { .ledger { grid-template-columns: 1fr; } }

/* ---------- About strip ---------- */
.about-strip__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.about-strip__fig { margin: 0; }
.about-strip__fig img { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); background: #fff; }
@media (max-width: 860px) { .about-strip__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.5em; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold-ink); }
.prose strong { color: var(--dark); }
.prose > :first-child { margin-top: 0; }
.prose--lead { font-size: var(--step-1); line-height: 1.8; }
.section--navy .prose strong { color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.4rem; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s, color .15s; }
.btn--navy { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--dark); border-color: var(--gold); }
.btn--navy:hover { background: linear-gradient(180deg, #F0C557, var(--gold-2)); color: var(--dark); }
.btn--gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--dark); }
.btn--gold:hover { background: var(--gold-2); color: var(--dark); }
.btn--ghost { border-color: var(--dark); color: var(--dark); margin-top: .5rem; }
.btn--ghost:hover { background: var(--dark); color: #fff; }
.btn--block { width: 100%; }

/* ---------- News ---------- */
.news-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; }
.news-card__link { display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; }
.news-card__media { aspect-ratio: 16 / 10; background: var(--white); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); margin-bottom: .9rem; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.news-card__media img.is-placeholder { width: 40%; height: auto; object-fit: contain; opacity: .7; }
.news-card__link:hover .news-card__media img { transform: scale(1.03); }
.news-card__date { color: var(--gold-ink); font-size: var(--step--1); font-weight: 600; }
.news-card__title { font-family: var(--font-body); font-weight: 700; font-size: var(--step-1); line-height: 1.45; margin: .25rem 0 .4rem; color: var(--dark); }
.news-card__link:hover .news-card__title { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.news-card__excerpt { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.pager a { font-weight: 700; text-decoration: none; padding: .5rem 0; }
.pager__info { color: var(--muted); }

/* ---------- Partners ---------- */
.partners { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.partner > a, .partner > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 150px; padding: 1.1rem 1rem; background: var(--white); text-align: center; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 600; line-height: 1.45; height: 100%; }
.partner > a:hover { background: var(--paper); }
.partner img { height: 72px; max-width: 150px; width: auto; object-fit: contain; }

/* ---------- CTA ---------- */
.cta { background: var(--dark); color: var(--on-dark); padding-block: 2.5rem; border-top: 3px solid var(--gold); }
.cta__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta__title { color: #fff; font-size: var(--step-2); margin-bottom: .3rem; }
.cta p { margin: 0; }

/* ---------- Page head ---------- */
.pagehead { background: var(--paper); border-bottom: 1px solid var(--line); padding-block: 2rem 2.5rem; }
.pagehead__title { font-size: var(--step-4); margin-bottom: .3em; max-width: 24ch; }
.pagehead--article .pagehead__title { font-size: var(--step-3); max-width: none; }
.pagehead__lead { font-size: var(--step-1); color: var(--muted); max-width: 64ch; margin: 0; }
.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; font-size: var(--step--1); color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: .4rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--gold-ink); font-weight: 600; font-size: var(--step--1); margin-bottom: .6rem; }
.article-meta a { color: var(--dark-3); }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about-est { border-inline-start: 3px solid var(--gold); padding-inline-start: 1.5rem; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 4rem; }
.vm__h { font-size: var(--step-2); padding-bottom: .5rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.vm .prose { font-size: var(--step-1); line-height: 1.8; }
.goals ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
.goals li { padding: 1rem 0; border-top: 1px solid var(--line); margin: 0; font-weight: 600; }
@media (max-width: 860px) {
  .about-layout, .vm { grid-template-columns: 1fr; gap: 2rem; }
  .goals ul { grid-template-columns: 1fr; }
}

/* ---------- Projects list ---------- */
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plist__item { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2.5rem; padding-block: 2.25rem; border-top: 1px solid var(--line); align-items: start; }
.plist__item:first-child { border-top: 0; padding-top: 0; }
.plist__media { display: block; aspect-ratio: 4 / 3; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plist__media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.plist__title { font-size: var(--step-2); }
.plist__title a { color: var(--dark); text-decoration: none; }
.plist__title a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.plist__summary { color: var(--muted); font-size: var(--step-1); max-width: 60ch; }
.plist__subh { font-weight: 700; font-size: var(--step--1); color: var(--gold-ink); margin-bottom: .5rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--line); background: var(--white); border-radius: 999px; text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--dark); }
.chips a:hover { border-color: var(--gold); }
@media (max-width: 760px) {
  .plist__item { grid-template-columns: 1fr; gap: 1.25rem; }
  .plist__media { max-width: 420px; aspect-ratio: 16 / 9; }
}

/* ---------- Project detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; align-items: start; }
.detail__fig { margin: 0 0 2rem; }
.detail__fig img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; max-height: 420px; width: auto; }
.detail__aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 1.25rem; }
.detail__logo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; place-items: center; }
.detail__logo img { max-height: 140px; width: auto; }
.detail__subh { margin-top: 2.5rem; }
.aside-box { border-top: 3px solid var(--gold); background: var(--white); padding: 1rem 1.2rem; border-radius: 0 0 var(--radius) var(--radius); }
.aside-box__h { font-size: var(--step--1); color: var(--muted); margin: 0; }
.aside-box__parent { font-weight: 700; display: block; margin-bottom: .6rem; text-decoration: none; }
.aside-box__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.aside-box__list a { display: block; padding: .5rem 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); font-size: .95rem; }
.aside-box__list a[aria-current="page"] { color: var(--dark); font-weight: 700; }
.subprojects { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.subprojects a { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.3rem; background: var(--white); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.subprojects a:hover { border-color: var(--dark-3); border-inline-start-color: var(--gold); }
.subprojects strong { font-family: var(--font-display); color: var(--dark); font-size: var(--step-1); }
.subprojects span { color: var(--muted); }
@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; gap: 2rem; }
  .detail__aside { position: static; }
  .detail__logo { max-width: 280px; }
}

/* ---------- Article ---------- */
.section--article { padding-top: 2rem; }
.article-fig { margin: 0 0 2rem; }
.article-fig img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; width: auto; max-height: 560px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { cursor: pointer; list-style: none; padding: 1.2rem 0; font-weight: 700; font-size: var(--step-1); color: var(--dark); display: flex; justify-content: space-between; gap: 1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--gold-ink); flex: none; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item .prose { padding-bottom: 1.2rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #CFC3A8; border-radius: var(--radius); padding: .7rem .9rem; min-height: 46px; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: 3px solid rgba(201,150,42,.5); border-color: var(--dark-3); }
.field.has-error input, .field.has-error textarea { border-color: var(--err); }
.field__err { color: var(--err); font-size: var(--step--1); margin: .35rem 0 0; font-weight: 600; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice { padding: .9rem 1.1rem; border-radius: var(--radius); font-weight: 600; margin-bottom: 1.5rem; border-inline-start: 4px solid; }
.notice--ok { background: #E5F2E8; color: var(--ok); border-color: var(--ok); }
.notice--err { background: #FBE3E0; color: var(--err); border-color: var(--err); }
.contact__info { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 1.5rem; }
.contact__info dl { margin: 0; display: grid; gap: 1rem; }
.contact__info dt { font-size: var(--step--1); color: var(--muted); }
.contact__info dd { margin: 0; font-weight: 600; }
.contact__map { width: 100%; aspect-ratio: 4 / 3; border: 0; margin-top: 1.5rem; border-radius: var(--radius); }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Error ---------- */
.errorpage { padding-block: 5rem; text-align: start; }
.errorpage__code { font-family: "Kufi", sans-serif; font-weight: 700; font-size: 4.5rem; line-height: 1; color: var(--gold); margin-bottom: .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--on-dark-2); font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1.1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.site-footer__logos { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.site-footer__logos img { background: #fff; border-radius: var(--radius); padding: 6px; height: 72px; width: auto; }
.site-footer__h { color: #fff; font-size: 1.05rem; margin-bottom: .9rem; font-family: var(--font-body); }
.site-footer__h--sm { margin-top: 1.5rem; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.site-footer__social a { display: inline-block; padding: .3rem .8rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: .88rem; }
.site-footer__base { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.1rem; font-size: var(--step--1); color: #8B806D; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .govbar, .site-header, .site-footer, .cta, .navtoggle { display: none !important; }
  body { background: #fff; border: 0; }
}
