/* ========
   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 (docs/plans/csr-new-look-plan.md). Dark follows the device: the
   next block gives each colour its dark value. planner.css and admin.css repeat both. */
: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) */
  --deep-2: #0a2e24;        /* the footer, a shade under --deep */
  --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;
    --deep-2: #0b2a21;
    --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: the @font-face rules are in fonts.css, loaded just before this sheet. */

/* --- 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 (also English inside an
   Arabic page, :lang). .num (times, dates, counts): Montserrat in both. */
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. */
.lecture-note a { padding-block: 11px; }

/* --- 4. Buttons: pills. .btn = .button (solid, main action); .btn--secondary =
   .button--outline (second action); .button--light (on --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 or initials 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, 8 px after the name. */
summary.person__head::after {
  content: "";
  flex: none;
  inline-size: 7px;
  block-size: 7px;
  margin-inline-start: 8px;
  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 20px;
  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; }
@media (min-width: 64em) { .brand { flex: none; } .brand__name { white-space: nowrap; } }
/* From 80em the header is one row (English: two, for the theme switch), a little wider than the
   page; below, the menu has its own row. */
@media (min-width: 80em) { .site-header__inner { max-inline-size: 1216px; column-gap: 12px; } .site-header__tools { flex-wrap: nowrap; } html[lang="en"] .site-menu-wide { order: 3; flex-basis: 100%; } }
@media (min-width: 64em) and (max-width: 79.99em) { .site-menu-wide { order: 3; flex-basis: 100%; } }

.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, then the member button and the language link (.site-header__tools). */
.site-menu-wide,
.site-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.site-menu-wide { margin-inline-start: auto; }
.site-header__tools form { margin-inline: -8px; }

.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 12px; }

.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);
}
/* A group: a <details> whose list drops below it (wide); nested links (narrow). */
.main-nav li ul { padding-inline-start: 20px; list-style: none; }
.main-nav details { position: relative; }
.main-nav summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: var(--target);
  border-block: 2px solid transparent;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.main-nav summary::-webkit-details-marker { display: none; }
.main-nav summary::after { content: ""; inline-size: 6px; block-size: 6px; border: solid; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.main-nav summary[aria-current] { color: var(--brand); border-block-end-color: var(--gold); }
.main-nav details ul {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: -16px;
  z-index: 5;
  min-inline-size: 11em;
  margin: 0;
  padding: 6px 16px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Sign-in or my account: a small pill; sign out: a quiet link. */
.account-link { padding-block: 6px; padding-inline: 16px; font-size: 15px; }
html[lang="en"] .account-link { font-size: 14px; }
.account-signout { min-block-size: var(--target); padding: 0 4px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 15px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.account-link[aria-current="page"] { background: var(--brand-2); border-color: var(--brand-2); }
/* Theme switch (core/theme.py), set off */
.theme-switch__button { min-block-size: var(--target); padding: 0 6px; margin-inline-start: 12px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }

.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; the name stays on one line above. */
@media (max-width: 63.99em) {
  .site-header__inner { padding-block: 10px; gap: 12px; }

  .brand { flex: 1 1 0; 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; }
  /* The member button and the language link: a row of their own under the name. */
  .site-header__tools { order: 3; flex: 1 0 100%; justify-content: space-between; padding-block-start: 8px; border-block-start: 1px solid var(--line); }
  .site-header__tools .language-link { margin-inline-start: 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-2);
  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: title, back link, running text, people's cards (shared by
   lecture and conference pages; content pages' own parts are in pages.css). */
.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); }
/* Text column (.page-main) and 300 px aside, first in the page; side by side from 64em. */
.page-grid { display: grid; gap: 32px; }
@media (min-width: 64em) {
  .page-grid { grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
  .page-aside { grid-column: 2; grid-row: 1; max-inline-size: 300px; }
}

.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, 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: labels above fields, 44 px controls, --error about 7:1 on --card.
   A form is a card; Get involved cards and 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;
}
/* The error summary at the top of a long form (core/partials/form_errors.html). */
.form-errors { max-inline-size: 40em; margin-block: 0 24px; padding: 16px 20px; background: var(--card); border: 2px solid var(--error); border-radius: var(--radius); }
.form-errors__title { margin: 0 0 8px; font-size: 20px; color: var(--ink); }
.form-errors ul { margin: 0; padding-inline-start: 1.2em; }
.form-errors a { display: inline-flex; align-items: center; min-block-size: var(--target); color: var(--error); }
.form :target { scroll-margin-block-start: 5em; } /* the link lands on the label */

/* 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 row of pages, one line of 44 px pills; it scrolls, not the page. */
.account-nav { margin-block: 0 24px; }
.account-nav__list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
  gap: 6px;
  margin: 0 -4px;
  padding: 4px;
  list-style: none;
}
.account-nav li { flex: none; }
.account-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  padding-inline: 12px;
  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); }
html[lang="en"] .account-nav a { font-size: 15px; }


/* --- Tables: tinted headings (.table), e.g. the member's payments. */
.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); }
}
