/* ==========================================================================
   CSR site stylesheet
   One file for the whole site. Component sections follow in order, each
   under its own numbered heading. Rules:
   - Logical properties only (margin-inline-start, padding-inline,
     inset-inline-end, text-align: start …) so one stylesheet serves Arabic
     (rtl) and English (ltr). No physical sides.
   - Colours only through the tokens below.
   - Interactive targets at least 44 px tall; focus always visible.
   ========================================================================== */

/* --- 1. Tokens ------------------------------------------------------------
   The colours of the congress site (emerald, gold, ivory), from the token
   table of docs/plans/csr-new-look-plan.md. The dark version follows the
   device setting only: the block after :root gives every colour its dark
   value. conferences/static/conferences/planner.css repeats both blocks.   */
:root {
  --ground: #f7f5ef;        /* page ground */
  --card: #fffdf8;          /* cards, header, inputs */
  --ink: #1b2a24;           /* headings and strong text */
  --body: #2b3c35;          /* running text */
  --muted: #56665f;         /* secondary text */
  --line: #e2dccd;          /* borders */
  --brand: #0f4234;         /* brand-coloured text, links, icons */
  --brand-2: #17594a;       /* links on tint, labels */
  --marker: #2d7a65;        /* lecture edge, markers */
  --tint: #e3ede8;          /* tinted blocks, table headings */
  --deep: #0f4234;          /* hero, footer, bands */
  --deep-dot: #255142;      /* the faint dots on --deep (gold at 10 %, mixed in advance) */
  --on-deep: #fffdf8;       /* text on --deep */
  --on-deep-muted: #e3ede8;
  --on-deep-gold: #e9dcc0;  /* small labels on --deep */
  --btn: #0f4234;           /* primary button ground */
  --on-btn: #fffdf8;        /* primary button text */
  --gold: #a07c3f;          /* rules, edges, markers; never text on light grounds */
  --gold-line: #b8955a;     /* thin gold lines */
  --gold-tint: #e9dcc0;     /* workshop and "next conference" labels */
  --on-gold-tint: #5f4718;  /* text on --gold-tint */
  --info: #2f5a6e;          /* "other specialty" and panel markers */
  --error: #a12b1f;         /* form errors */
  --shadow-card: 0 1px 2px rgb(15 66 52 / 0.06), 0 6px 18px rgb(15 66 52 / 0.06);

  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-latin: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-display: "Amiri", "Noto Naskh Arabic", serif;

  --radius-s: 6px;
  --radius: 12px;
  --radius-l: 20px;
  --pill: 999px;
  --container: 1120px;
  --gutter: 32px;
  --target: 44px;
  /* Reading width for running text: about 65-75 characters a line in
     English. Arabic letters are narrower, so its column is narrower. */
  --measure: 36em;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1a16;
    --card: #14231e;
    --ink: #e6efe9;
    --body: #cdd9d3;
    --muted: #9db1a8;
    --line: #28413a;
    --brand: #d6ece2;
    --brand-2: #6cc3a6;
    --marker: #4aa386;
    --tint: #1a352c;
    --deep: #123c30;
    --deep-dot: #284c3e;
    --on-deep: #f4f8f5;
    --on-deep-muted: #d6ece2;
    --on-deep-gold: #e9dcc0;
    --btn: #d6ece2;
    --on-btn: #0e1a16;
    --gold: #d8b36f;
    --gold-line: #c9a566;
    --gold-tint: #3b3322;
    --on-gold-tint: #e9dcc0;
    --info: #7fb0c8;
    --error: #f0a59b;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.25);
  }
}

html[lang="ar"] { --measure: 32em; }

@media (max-width: 759.98px) {
  :root { --gutter: 20px; }
}

/* --- 2. Fonts (self-hosted; files and licences in ../fonts/) -------------
   Each family is split into an Arabic and a Latin file; unicode-range lets
   the browser download only the file whose characters the page uses.     */
/* Amiri */
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/amiri-arabic-400-normal.b640f7cc5918.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/amiri-latin-400-normal.034ef8ba89c4.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: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/amiri-arabic-700-normal.bb99562a6788.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/amiri-latin-700-normal.3c577e3e4448.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: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/amiri-latin-ext-400-normal.9e49303c70a5.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/amiri-latin-ext-700-normal.4c0c89d4620a.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* IBM Plex Sans Arabic */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.4fa3d81d41ab.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.4767e1197706.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.106892212ea7.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.80ebc672c915.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.64891a810259.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.f417eeb0d15e.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.a4390abc98c2.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,U+1EE00-1EEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-700-normal.8d04403cf599.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;
}
/* Montserrat */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-latin-400-normal.e7198b2dcb57.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: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/montserrat-latin-500-normal.f96e8aab37e8.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: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-latin-600-normal.9e606da1cbeb.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: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin-700-normal.1c0792ac34ef.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;
}

/* --- 3. Base ------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light dark; accent-color: var(--brand); }
::selection { background: var(--gold-tint); color: var(--on-gold-tint); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-arabic);
  font-size: 18px;
  line-height: 1.8;
}

html[lang="en"] body {
  font-family: var(--font-latin);
  font-size: 17px;
  line-height: 1.7;
}

/* Text in the other language keeps its own font, e.g. the English name on
   an Arabic page. */
[lang="en"] { font-family: var(--font-latin); }
[lang="ar"] { font-family: var(--font-arabic); }

main { flex: 1 0 auto; }

/* Headings: Amiri in Arabic, Montserrat in English (and an English heading
   on an Arabic page, also inside an English block, :lang). Numbers marked .num (times, dates, counts) are set in
   Montserrat in both languages. */
h1, h2, h3, h4 {
  margin-block: 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
h1:lang(en),
h2:lang(en),
h3:lang(en),
h4:lang(en) { font-family: var(--font-latin); line-height: 1.25; }
h1[lang="ar"],
h2[lang="ar"],
h3[lang="ar"],
h4[lang="ar"] { font-family: var(--font-display); }
.num { font-family: var(--font-latin); font-variant-numeric: tabular-nums; }

p { margin-block: 0 1em; }

/* A long word with no break point (a pasted link, a long surname) wraps
   instead of pushing the page sideways on a phone. */
h1, h2, h3, h4, p, dd, .cal-event, .person__name, .person__position { overflow-wrap: anywhere; }
/* No lone last word (or year) under a heading or at the end of a paragraph. */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

img { max-inline-size: 100%; block-size: auto; }

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-2); }

/* One focus style everywhere: a gold ring edged with the page ground.
   Gold stands out on the light grounds (3.5:1 on --ground) and on every dark
   one; the ground-coloured edge carries it on --deep, where gold alone is
   under 3:1 in the light version. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ground);
}

.container {
  max-inline-size: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Vertical space for a plain block of page content. */
.section { padding-block: 56px; }
@media (max-width: 759.98px) {
  .section { padding-block: 40px; }
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--gutter);
  inset-block-start: -100px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--deep);
  color: var(--on-deep);
}
.skip-link:focus { inset-block-start: 8px; color: var(--on-deep); }

/* The lecture page's log-in line is a 44 px tall target: padding on the inline link grows the
   area that takes a tap, not the line or the look. (A card's title link needs none: its
   ::after already makes the whole card its target.) */
.lecture-note a { padding-block: 11px; }

/* --- 4. Buttons ----------------------------------------------------------
   Pills, from the congress site. .btn and .button are the same button
   (.button is the older name, still used by many pages).
   .btn, .button                   solid emerald (main action)
   .btn--secondary, .button--outline  outline (second action)
   .button--light                  gold-tint button for --deep bands       */
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--target);
  padding: 10px 24px;
  border: 1px solid var(--btn);
  border-radius: var(--pill);
  background: var(--btn);
  color: var(--on-btn);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
.button:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-btn); }

.btn--secondary,
.button--outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn--secondary:hover,
.button--outline:hover { background: var(--tint); border-color: var(--brand); color: var(--brand); }

.button--light { background: var(--on-deep-gold); border-color: var(--on-deep-gold); color: var(--deep); }
.button--light:hover { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }

/* A row of buttons that wraps with space between, on any screen. */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

/* --- Cards, labels, the gold rule, the deep band ------------------------- */
.card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* A small pill label (not a link): "Weekly lecture", "Workshop", … */
.label {
  display: inline-flex;
  align-items: center;
  padding: 1px 12px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.label--ok { background: var(--tint); color: var(--brand-2); }
.label--gold { background: var(--gold-tint); color: var(--on-gold-tint); }
.label--plain { background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.label--info { background: var(--card); border: 1px solid var(--info); color: var(--info); }

/* The gold line with a small diamond in the middle, under a section heading:
   <span class="rule-gold" aria-hidden="true"><span class="rule-gold__mark"></span></span> */
.rule-gold {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 160px;
  max-inline-size: 100%;
}
.rule-gold::before,
.rule-gold::after {
  content: "";
  flex: 1;
  block-size: 1px;
  background: var(--gold-line);
}
.rule-gold__mark {
  inline-size: 7px;
  block-size: 7px;
  border: 1px solid var(--gold-line);
  transform: rotate(45deg);
}

/* The deep emerald band with a faint dot pattern (hero, join band). */
.band {
  background-color: var(--deep);
  background-image: radial-gradient(var(--deep-dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--on-deep);
}
.band h1,
.band h2,
.band h3 { color: var(--on-deep); }
.band a:not(.button):not(.btn) { color: var(--on-deep); }

/* A line icon drawn in the colour of the text around it (core/partials/icon.html). */
.icon { flex: none; vertical-align: middle; }

/* .tiles: a row of number tiles that wraps on phones (a <ul> of .tile). */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* .tile: one count, a number in Montserrat (.tile__number) over its label (.tile__label). */
.tile {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tile__number {
  color: var(--brand);
  font-family: var(--font-latin);
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tile__label { color: var(--muted); font-size: 15px; }

/* .row-card: a time column (.row-card__time, start in bold, .row-card__end beneath) beside a card. */
.row-card {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.row-card__time {
  justify-self: start; /* the page's start edge, also for a dir="ltr" time */
  margin: 0;
  padding-block-start: 18px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.row-card__end { display: block; color: var(--muted); font-size: 15px; font-weight: 400; }
/* Times and dates are numbers: Montserrat on Arabic pages too (the Arabic words of a lecture's
   date fall through to Plex); the times line up in their column. */
.row-card__time,
.lecture-time,
.next-lecture__date,
.news-card__date { font-family: "Montserrat", var(--font-arabic); }
.row-card__time { font-variant-numeric: tabular-nums; }
@media (max-width: 479.98px) {
  .row-card { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .row-card__time { padding-block-start: 0; }
}

/* .avatar: a speaker's round picture, initials on a tint in a thin gold ring (.avatar--photo: an <img>). */
.avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  inline-size: 44px; block-size: 44px; border: 1px solid var(--gold-line); border-radius: 50%;
  background: var(--tint); color: var(--brand-2); font-size: 15px; font-weight: 700; line-height: 1;
}
.avatar--photo { padding: 2px; object-fit: cover; background: var(--card); }

/* .person: one speaker (lectures/_speaker_card.html), the picture beside the name and position;
   the short résumé beneath, open or behind the name (<details>, no script). */
.person { display: flex; flex-direction: column; gap: 8px; }
.person__head { display: flex; align-items: center; gap: 12px; min-block-size: var(--target); }
.person__text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.45; }
.person__name { color: var(--ink); font-weight: 600; }
a.person__name { display: inline-flex; align-items: center; min-block-size: var(--target); color: var(--brand); }
.person__position { color: var(--muted); font-size: 15px; }
.person__resume { margin: 0; color: var(--ink); font-size: 15px; }
.person__more {
  display: inline-flex; align-items: center; align-self: flex-start; min-block-size: var(--target);
  color: var(--brand-2); font-size: 15px; font-weight: 600;
}
summary.person__head { cursor: pointer; list-style: none; }
summary.person__head::-webkit-details-marker { display: none; }
.person--details .person__name { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
/* The résumé's chevron, one drawing on every page: down, up when open, at the row's end. */
summary.person__head::after {
  content: "";
  flex: none;
  inline-size: 7px;
  block-size: 7px;
  margin-inline-start: auto;
  border-block-end: 2px solid var(--muted);
  border-inline-end: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
html[dir="rtl"] summary.person__head::after { transform: translateY(-2px) rotate(-45deg); }
details[open] > summary.person__head::after { transform: translateY(2px) rotate(225deg); }
html[dir="rtl"] details[open] > summary.person__head::after { transform: translateY(2px) rotate(-225deg); }
.person__resume-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px 4px;
  border-inline-start: 2px solid var(--gold-line); border-radius: var(--radius); background: var(--tint);
}

/* --- 5. Header ----------------------------------------------------------- */
.site-header {
  background: var(--card);
  border-block-end: 1px solid var(--line);
}

.site-header__inner {
  position: relative; /* anchors the narrow-screen menu panel */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: var(--target);
  min-inline-size: 0;
  color: var(--brand);
  text-decoration: none;
}
.brand:hover { color: var(--brand); }

.brand__picture { display: contents; }
.brand__mark { flex: 0 0 auto; inline-size: 48px; block-size: 48px; object-fit: contain; }

/* align-items: flex-start keeps the other-language name at the page's
   start edge even though it has its own dir attribute. */
.brand__names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}
html[lang="en"] .brand__name { font-family: var(--font-latin); font-size: 18px; }

.brand__other-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.brand__other-name[lang="en"] { letter-spacing: 0.04em; }
.brand__other-name[lang="ar"] { font-size: 14px; }

/* The menu: a row of links followed by the member button and the language link. */
.site-menu-wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.main-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-weight: 500;
}
html[lang="en"] .main-nav__list { font-size: 15px; gap: 4px 16px; }

.main-nav a,
.account-link,
.language-link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
}

.main-nav a {
  position: relative;
  border-block: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
}
/* A short word («الأخبار», 36 px) still takes a 44 px wide tap: the target reaches 4 px into
   the gap on each side, without moving the menu. */
.main-nav a::before { content: ""; position: absolute; inset-block: 0; inset-inline: -4px; }
.main-nav a:hover { color: var(--brand); border-block-end-color: var(--line); }
.main-nav a[aria-current="page"] {
  color: var(--brand);
  border-block-end: 2px solid var(--gold);
}

/* The member button (log in, or my account) is a small primary pill. */
.account-link { padding-block: 6px; padding-inline: 18px; font-size: 15px; }
html[lang="en"] .account-link { font-size: 14px; }
.account-link[aria-current="page"] { background: var(--brand-2); border-color: var(--brand-2); }

.language-link {
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.language-link[lang="ar"] { font-size: 16px; }
.language-link:hover { border-color: var(--brand); color: var(--brand); }

/* Narrow-screen menu: hidden on wide screens. */
.site-menu-narrow { display: none; }

/* Up to 64em (tablets too) the menu folds behind the button, so the header is one row. */
@media (max-width: 63.99em) {
  .site-header__inner { padding-block: 10px; gap: 12px; flex-wrap: nowrap; }

  .brand { gap: 10px; }
  .brand__mark { inline-size: 44px; block-size: 44px; }
  .brand__name { font-size: 18px; }
  html[lang="en"] .brand__name { font-size: 16px; }
  .brand__other-name { display: none; }

  .site-menu-wide { display: none; }
  .site-menu-narrow { display: block; flex: 0 0 auto; }

  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 48px;
    block-size: 48px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--card);
    color: var(--brand);
    cursor: pointer;
    list-style: none; /* removes the disclosure triangle */
  }
  .menu-button::-webkit-details-marker { display: none; }
  .site-menu-narrow[open] .menu-button { background: var(--tint); border-color: var(--brand); }

  /* The open menu drops down below the header, full width. */
  .site-menu-narrow__panel {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px var(--gutter) 16px;
    background: var(--card);
    border-block: 1px solid var(--line);
    box-shadow: var(--shadow-card);
  }
  .site-menu-narrow__panel .main-nav { align-self: stretch; }
  .site-menu-narrow__panel .main-nav__list { flex-direction: column; gap: 0; }
  .site-menu-narrow__panel .main-nav a { inline-size: 100%; }
}
/* On a 320 px phone the English name takes two lines, not three. */
@media (max-width: 379.98px) {
  html[lang="en"] .brand__name { font-size: 15px; }
}

/* --- 6. Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--deep);
  color: var(--on-deep-muted);
  font-size: 16px;
}

.site-footer a { color: var(--on-deep-muted); }
.site-footer a:hover { color: var(--on-deep); }
.site-footer a[aria-current="page"] { color: var(--on-deep); }
.site-footer .language-link { border-color: var(--gold-line); color: var(--on-deep-muted); }
.site-footer .language-link:hover { border-color: var(--on-deep); color: var(--on-deep); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 64px;
  padding-block: 44px 20px;
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-inline-size: 30em;
}
.site-footer__about p { margin: 0; }
.site-footer__about img { margin-block-end: 8px; }

.site-footer__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--on-deep);
}
html[lang="en"] .site-footer__name { font-family: var(--font-latin); font-size: 18px; }

.site-footer__other-name { font-size: 13px; font-weight: 600; color: var(--on-deep-gold); }

.site-footer__line { margin-block-start: 8px; }

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
}

.footer-contact__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--on-deep-gold);
}
html[lang="en"] .footer-contact__title { font-family: var(--font-latin); font-size: 17px; }
.footer-contact__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-contact__list a,
.footer-contact__plain {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-block-size: var(--target);
}
.footer-contact__value { color: var(--on-deep); }

.site-footer__legal {
  padding-block: 12px 28px;
  font-size: 14px;
}
.site-footer__legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 28px;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--gold-line);
}
.site-footer__legal p { margin: 0; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
}

@media (max-width: 759.98px) {
  .site-footer { font-size: 15px; }
  .site-footer__inner { flex-direction: column; gap: 18px; padding-block: 36px 16px; }
  .footer-nav__list { gap: 0 20px; }
}

/* --- 6. Inner pages: the parts lecture and conference pages share ---------
   Page title, back link, running text, people's cards. What belongs to the
   content pages alone (about, projects, news, get involved, account) is in
   pages.css, which those pages load as their second stylesheet.           */
.page__title {
  max-inline-size: 18em;
  margin-block-end: 32px;
  color: var(--brand);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.3;
}
/* A short gold line under every page title. */
.page__title::after {
  content: "";
  display: block;
  inline-size: 64px;
  block-size: 2px;
  margin-block-start: 14px;
  background: var(--gold-line);
}
html[lang="en"] .page__title { line-height: 1.2; }

/* The error pages (404, 403, 500): the message and its buttons in one card. */
.error-card { max-inline-size: 40em; }
.error-card > :last-child { margin-block-end: 0; }

.page__back { margin-block-end: 8px; }
.page__back a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
}

.prose {
  max-inline-size: var(--measure);
  color: var(--body);
  font-size: 19px;
}
.prose h2,
.prose h3 { color: var(--ink); margin-block: 1.6em 0.5em; }
.prose h2 { font-size: 30px; font-weight: 600; }
.prose h3 { font-size: 24px; }
.prose ul,
.prose ol { padding-inline-start: 1.4em; margin-block: 0 1em; }
.prose blockquote {
  margin-inline: 0;
  padding-inline-start: 20px;
  border-inline-start: 3px solid var(--marker);
  color: var(--muted);
}
.prose img { border-radius: var(--radius-s); }



.board-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.board-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
/* Board members (with consent) and public speakers: a round photo in a thin gold ring. */
.board-card__photo {
  display: block;
  inline-size: 128px;
  block-size: 128px;
  padding: 3px;
  object-fit: cover;
  margin-block-end: 16px;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: var(--card);
}
.board-card__name { margin-block-end: 2px; font-size: 24px; }
.board-card__role { margin-block-end: 4px; font-weight: 600; color: var(--brand); }
.board-card__meta { margin-block-end: 2px; font-size: 16px; color: var(--muted); }
.board-card__bio { margin-block: 12px 0; font-size: 16px; color: var(--body); }
.board-card__bio > :last-child { margin-block-end: 0; }


@media (max-width: 759.98px) {
  .page__title { font-size: 36px; margin-block-end: 24px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 26px; }
}

/* --- News: list, cards, pagination, detail --------------------------------- */
.news-card {
  position: relative; /* anchors the title link's full-card target */
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.news-card__image {
  display: block;
  inline-size: 240px;
  max-inline-size: 100%;
  block-size: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-s);
}
.news-card__text { flex: 1 1 280px; min-inline-size: 0; }
.news-card__date { margin-block: 0 4px; font-size: 15px; font-weight: 600; color: var(--muted); }
.news-card__title { margin-block: 0 8px; font-size: 26px; }
.news-card__title a {
  color: var(--brand);
  text-decoration: none;
}
/* The whole card is the title link's target. */
.news-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.news-card__title a:hover { color: var(--brand-2); text-decoration: underline; }
.news-card__summary { max-inline-size: var(--measure); margin-block: 0; font-size: 17px; color: var(--body); }
.news-empty { font-size: 18px; color: var(--body); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-block-start: 32px;
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--target);
  min-inline-size: var(--target);
  padding-inline: 20px;
  border: 1px solid var(--brand);
  border-radius: var(--pill);
  font-weight: 600;
  text-decoration: none;
}
.pagination__link:hover { background: var(--btn); color: var(--on-btn); }
.pagination__status { color: var(--muted); }


@media (max-width: 759.98px) {
  .news-card__image { inline-size: 100%; }
  .news-card__title { font-size: 22px; }
}

/* --- Forms: Get involved hub, contact, volunteer, donate --------------------
   Labels sit above fields. Controls are at least 44 px tall. The error
   colour (--error) is about 7:1 on --card, light and dark. A form is a card;
   the Get involved cards and the donate headings are in pages.css.        */
.form-intro { max-inline-size: var(--measure); color: var(--body); font-size: 19px; }


.form {
  max-inline-size: 40em;
  margin-block-start: 24px;
  padding: clamp(20px, 15.6px + 1.12vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.field { margin-block-end: 20px; }
.field > label:not(.choice),
.field--group > legend {
  display: block;
  margin-block-end: 6px;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
}
.field__optional { color: var(--muted); font-weight: 400; }
.field__hint { margin: 0 0 8px; color: var(--body); font-size: 16px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  display: block;
  inline-size: 100%;
  min-block-size: var(--target);
  padding: 10px 12px;
  border: 1px solid var(--muted);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.field textarea { min-block-size: 140px; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--brand); }

.field--group { padding: 0; border: 0; margin-inline: 0; min-inline-size: 0; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: var(--target);
  color: var(--body);
  font-weight: 400;
}
.choice input {
  inline-size: 22px;
  block-size: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--brand);
}

.field--error input[type="text"],
.field--error input[type="email"],
.field--error input[type="password"],
.field--error input[type="tel"],
.field--error input[type="date"],
.field--error input[type="file"],
.field--error select,
.field--error textarea { border: 2px solid var(--error); }
.field__error { margin: 6px 0 0; color: var(--error); font-weight: 600; }
.form__alert {
  margin-block: 0 24px;
  padding: 12px 16px;
  border: 2px solid var(--error);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--error);
  font-weight: 600;
}

/* Spam trap: out of sight for everyone, but not display:none. */
.form__trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__privacy,
.form__links { margin-block: 16px 0; }
.form__privacy a,
.form__links a { display: inline-flex; align-items: center; min-block-size: var(--target); }

/* --- Account ------------------------------------------------------------------
   The member's own pages: a wrapping sub-navigation (links at least 44 px high,
   the current page marked with aria-current="page"), a definition-list overview,
   and the short notice shown after an action.                                 */
.account-nav { margin-block: 0 24px; }
.account-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.account-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--card);
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.account-nav a:hover { border-color: var(--brand); color: var(--brand); }
.account-nav a[aria-current="page"] { background: var(--tint); border-color: var(--brand-2); color: var(--brand); }


/* --- Tables ------------------------------------------------------------------
   A plain table with tinted headings (.table); the member's list of fee
   payments (.payments) is one.                                             */
.table,
.payments { inline-size: 100%; border-spacing: 0; }
.payments { max-inline-size: 40em; }
.table th,
.table td,
.payments th,
.payments td {
  padding: 12px;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: baseline;
}
.table th,
.payments th { background: var(--tint); color: var(--ink); font-weight: 600; }
.table thead th:first-child,
.payments thead th:first-child { border-start-start-radius: var(--radius-s); }
.table thead th:last-child,
.payments thead th:last-child { border-start-end-radius: var(--radius-s); }

.form__notice {
  max-inline-size: 40em;
  margin-block: 0 24px;
  padding: 12px 16px;
  border: 2px solid var(--brand);
  border-radius: var(--radius-s);
  color: var(--ink);
  font-weight: 600;
}

/* --- Reduced motion ---------------------------------------------------------
   For visitors who ask their system for less movement.                     */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print ------------------------------------------------------------------
   Every page prints its content only, in the light colours.                */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .error-card picture,
  main > picture { display: none; } /* the error pages' and the PDF-unavailable page's logo */
  /* The deep bands (home hero, join band, conference head) print black on
     white, with or without background graphics: their tokens turn light. */
  .band {
    --deep: var(--card);
    --deep-dot: var(--card);
    --on-deep: var(--ink);
    --on-deep-muted: var(--ink);
    --on-deep-gold: var(--ink);
  }
  .btn,
  .button { background: var(--card); border-color: var(--ink); color: var(--ink); }
}
