/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Keireki: a professional network, sober and human. The identity of the logo (docs/brand.md) carries through: a
   brush-painted K in navy and gold. Navy for what one acts on, gold for marks only (the current page, verified
   organizations); in dark mode the gold takes over the actions, as in the logo's dark variant. One humanist family,
   self-hosted. Logical properties only (right-to-left languages are supported). Sizes in rem, so that the reader's
   own text size is respected. Nothing is loaded from elsewhere. */

/* --- Type: Alegreya Sans (SIL Open Font License 1.1), served by Keireki itself: a humanist sans with calligraphic
   roots, echoing the brush of the logo. Latin, Greek and Cyrillic for the languages of the European Union; other
   scripts fall back to the system's font. The browser loads only the subsets a page uses. --- */
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-latin.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: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-latin.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: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-latin.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: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-latin.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: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400i-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/alegreya-sans-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/alegreya-sans-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/alegreya-sans-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
/* Scripts Alegreya Sans lacks: Noto (SIL Open Font License 1.1), variable, one file per script, loaded only when a
   page contains that script. Korean, Chinese and Japanese use the system's fonts (a web font would weigh megabytes). */
@font-face { font-family: "Noto Sans Hebrew"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/noto-sans-hebrew.woff2") format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/noto-sans-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/noto-sans-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: "Noto Sans Georgian"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/noto-sans-georgian.woff2") format("woff2"); unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31; }

/* --- Colors: light and dark pairs. Media query rather than light-dark(), not yet in every recent browser.
       Text colors keep at least 4.5:1 on their background, borders of controls at least 3:1. --- */
:root {
  color-scheme: light dark;
  --paper: #f5f5f2;
  --surface: #ffffff;
  --raised: #f8f8f5;
  --ink: #18202e;
  --brand-ink: #14284b;
  --muted: #586174;
  --line: #e2e3e7;
  --control: #747c8c;
  --accent: #14284b;
  --accent-strong: #0b1830;
  --on-accent: #ffffff;
  --accent-soft: #eaeef5;
  --gold: #c9a24a;
  --seal: #8a6a1f;
  --brush: url("/static/brand/brush-line.svg");
  --error: #b42318;
  --error-soft: #fef3f2;
  --success: #067647;
  --success-soft: #ecfdf3;
  --notice: #f3e3b3;
  --on-notice: #3b2a05;
  --shadow: 0 1px 2px rgb(20 40 75 / 0.05);
  --radius: 0.75rem;
  accent-color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1424;
    --surface: #141e33;
    --raised: #1a2640;
    --ink: #e8ecf3;
    --brand-ink: #eef1f6;
    --muted: #a3adbf;
    --line: #26324b;
    --control: #7f8aa1;
    --accent: #d9b25a;
    --accent-strong: #e8c97f;
    --on-accent: #10182a;
    --accent-soft: #262a2a;
    --gold: #d9b25a;
    --seal: #e2c277;
    --brush: url("/static/brand/brush-line-dark.svg");
    --error: #fda29b;
    --error-soft: #3b1714;
    --success: #75e0a7;
    --success-soft: #0f2a1c;
    --notice: #4a3d14;
    --on-notice: #fbf3d0;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.35);
  }
}

/* --- Base --- */
*, ::before, ::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Alegreya Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Georgian",
    var(--cjk-fonts, system-ui),
    system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  text-align: start;
  overflow-wrap: break-word;
}
/* Korean: its own system fonts (so that Han characters take Korean shapes), and line breaks between words. */
:lang(ko) { --cjk-fonts: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR"; }
/* Chinese and Japanese: their own system fonts, so that shared Han characters take each language's shapes. */
:lang(zh) { --cjk-fonts: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC"; }
:lang(ja) { --cjk-fonts: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP"; }
:lang(ja) { line-break: strict; }
:lang(zh) body, :lang(ja) body { line-height: 1.7; }
:lang(ko) { word-break: keep-all; }
/* Devanagari and Arabic need room above and below the line. */
:lang(hi) body, :lang(ar) body { line-height: 1.7; }
/* Paragraphs written by people (posts, descriptions) take the direction of their own script, paragraph by paragraph,
   whatever the interface's language: a French post reads left to right on an Arabic interface, and the reverse.
   Short lines (names, titles) keep the page's alignment; the bidirectional algorithm orders their letters. */
.highlight-text, .description, .event-description { unicode-bidi: plaintext; }
/* Scale of 1.25 from the 17 px body (17, 21, 26.5, 33). */
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin-block: 0 0.5em; }
h1 { font-size: clamp(1.66rem, 1.4rem + 1vw, 2.07rem); font-weight: 700; letter-spacing: -0.005em; }
h2 { font-size: 1.33rem; font-weight: 700; margin-block-start: 2rem; }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin-block: 0 1em; }
/* Links are underlined: color alone does not tell them apart from the text around them (WCAG 1.4.1). Only interface
   components (menu, buttons, tabs, link lists, cards, links standing alone in a heading) drop the underline, each
   explicitly, with another cue (shape, border, background). */
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.12em; }
.icon-link, .tabs a, .agenda h2 a { text-decoration: none; }
.agenda h2 a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* Keyboard focus: one visible ring everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}
main:focus { outline: none; }

.visually-hidden {
  position: absolute; clip-path: inset(50%); overflow: hidden; inline-size: 1px; block-size: 1px;
  margin: -1px; padding: 0; border: 0; white-space: nowrap;
}
.skip {
  position: absolute; inset-block-start: 0.5rem; inset-inline-start: 0.5rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--surface); border: 2px solid var(--accent); border-radius: 0.5rem;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* --- Page frame --- */
.banner {
  margin: 0; padding: 0.4rem 1rem; background: var(--notice); color: var(--on-notice);
  text-align: center; font-size: 0.9375rem;
}
.site-header {
  position: sticky; inset-block-start: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
}
.bar, .site-footer { max-inline-size: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
main { max-inline-size: 48rem; margin-inline: auto; padding-inline: 1.25rem; }
main.wide { max-inline-size: 72rem; }
.bar { display: flex; align-items: center; gap: 0.5rem 1.5rem; min-block-size: 3.75rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.75rem;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
/* The logo (docs/brand.md): the brush-painted K and the name, its last "i" dotted with the mark's gold dab. */
.brand picture { display: flex; }
.brand img { block-size: 2.1rem; inline-size: auto; }
.wordmark { font-weight: 500; letter-spacing: 0.01em; color: var(--brand-ink, var(--ink)); }
.last-i { position: relative; }
.last-i::after {
  content: ""; position: absolute; inset-inline-start: 50%; inset-block-start: 0.05em; inline-size: 0.26em; block-size: 0.26em;
  translate: -50% 0; background: url("/static/brand/dot.svg") center / contain no-repeat;
}
nav { display: flex; align-items: center; gap: 0.25rem; }
nav form { margin: 0; }
.primary { flex: 1; }
.primary a {
  display: inline-flex; align-items: center; min-block-size: 3.75rem; padding-inline: 0.75rem;
  color: var(--muted); font-weight: 500; text-decoration: none; border-block-end: 3px solid transparent;
}
.primary a:hover { color: var(--ink); text-decoration: none; }
/* Current page: weight and a bar, not color alone. */
/* Current page: weight, and the logo's gold brush stroke beneath (the one ornament of the interface). */
.primary a[aria-current="page"] {
  color: var(--ink); font-weight: 700;
  background: var(--brush) no-repeat center calc(50% + 0.85em) / calc(100% - 1.25rem) 0.5rem;
}
.tools { display: flex; align-items: center; gap: 0.5rem; margin-inline-start: auto; }
.icon-link {
  position: relative; display: inline-grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem;
  border-radius: 50%; color: var(--muted);
}
.icon-link:hover, .icon-link[aria-current="page"] { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.icon-link .count { position: absolute; inset-block-start: 0.2rem; inset-inline-end: 0.1rem; }
.account-button { padding: 0; min-block-size: 0; border: 0; background: none; border-radius: 50%; }
.account-button:hover { filter: none; }
/* The account menu: a native popover under its button (anchor positioning is not everywhere yet: fixed fallback). */
.account-menu {
  position: fixed; inset: auto; inset-block-start: 4rem; inset-inline-end: 1rem;
  min-inline-size: 15rem; margin: 0; padding: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px rgb(16 24 40 / 0.18);
}
.account-menu .account-name { margin: 0.25rem 0.75rem 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.account-menu ul { list-style: none; margin: 0; padding: 0; }
.account-menu a, .account-menu button {
  display: flex; inline-size: 100%; align-items: center; min-block-size: 2.5rem; padding-inline: 0.75rem;
  border: 0; border-radius: 0.5rem; background: none; color: var(--ink); font-weight: 500; text-decoration: none; justify-content: start;
}
.account-menu li > a { text-decoration: none; }
.account-menu a:hover, .account-menu button:hover { background: var(--accent-soft); text-decoration: none; filter: none; }
.account-menu form { margin: 0.25rem 0 0; padding-block-start: 0.25rem; border-block-start: 1px solid var(--line); }
/* Narrow screens: the main links get a row of their own, which scrolls sideways rather than wrapping. */
@media (max-width: 40rem) {
  .bar { flex-wrap: wrap; gap: 0 0.5rem; }
  .primary { order: 3; flex-basis: 100%; overflow-x: auto; margin-inline: -1.25rem; padding-inline: 0.5rem; }
  .primary a { min-block-size: 2.75rem; white-space: nowrap; }
}
main { padding-block: 2rem 3rem; min-block-size: 60vh; }
main > :last-child { margin-block-end: 0; }
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.25rem 2rem; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-decoration: underline; }

/* --- Text helpers --- */
.hint, .kind, .period, .empty { color: var(--muted); font-size: 1rem; }
.hint { max-inline-size: 38rem; }
.error, .notice {
  padding: 0.75rem 1rem; border-radius: 0.5rem; border-inline-start: 4px solid; max-inline-size: 38rem;
}
.error { background: var(--error-soft); color: var(--error); border-color: var(--error); }
.notice { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.badge {
  display: inline-block; padding: 0.05rem 0.5rem; border-radius: 1rem; font-size: 0.875rem;
  background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line);
}

/* --- Buttons --- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-block-size: 2.75rem; padding: 0.5rem 1.15rem;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: var(--on-accent); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 0.5rem;
}
button:hover, .button:hover { filter: brightness(1.12); }
.quiet { color: var(--ink); background: transparent; border-color: var(--control); font-weight: 500; }
.quiet:hover { background: var(--accent-soft); filter: none; }
.danger { color: var(--error); background: transparent; border-color: var(--error); }
.danger:hover { background: var(--error-soft); filter: none; }
.small { min-block-size: 2.25rem; padding: 0.3rem 0.8rem; font-size: 1rem; }

/* --- Forms: one column, labels above their field --- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem;
  padding: 1.5rem; margin-block: 1.5rem; max-inline-size: 38rem;
}
.panel > :first-child { margin-block-start: 0; }
.panel > :last-child { margin-block-end: 0; }
.aside { margin-block: 1.5rem; }
label { display: block; margin-block: 0 1.1rem; font-weight: 600; }
input[type="text"], input[type="url"], input[type="number"], input[type="date"], input[type="time"],
input[type="email"], input[type="search"], input[type="password"], select, textarea {
  display: block; inline-size: 100%; min-block-size: 2.75rem; margin-block-start: 0.35rem;
  padding: 0.55rem 0.7rem; font: inherit; font-size: max(1rem, 1em); font-weight: 400;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--control); border-radius: 0.5rem;
}
textarea { min-block-size: 7rem; resize: vertical; }
input[type="file"] { display: block; inline-size: 100%; margin-block-start: 0.35rem; font: inherit; font-weight: 400; }
.sample {
  max-inline-size: 38rem; overflow-x: auto; padding: 1rem; border-radius: 0.5rem; font-size: 0.9375rem;
  background: var(--surface); border: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;
}
input::placeholder { color: var(--muted); opacity: 1; }
label + .hint { margin-block-start: -0.7rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-inline-size: 0; }
legend { padding: 0; margin-block-end: 0.4rem; font-weight: 600; }
/* A date: month and year side by side. */
fieldset.inline { display: flex; flex-wrap: wrap; gap: 0.6rem; }
fieldset.inline legend { inline-size: 100%; }
fieldset.inline select, fieldset.inline input { margin: 0; flex: 1 1 9rem; inline-size: auto; }
fieldset.inline input[type="number"] { flex: 0 1 8rem; }
fieldset.inline input[type="time"] { flex: 0 1 9rem; }
/* Long forms: titled sections separated by a rule, two fields side by side when there is room. */
.form-section + .form-section { border-block-start: 1px solid var(--line); padding-block-start: 1.25rem; margin-block-start: 1.5rem; }
.form-section > h2 { font-size: 1.0625rem; margin-block: 0 1rem; }
fieldset.sub > legend { font-size: 1rem; font-weight: 600; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); column-gap: 0.9rem; }
.form-footer { border-block-start: 1px solid var(--line); padding-block-start: 1.25rem; margin-block-start: 1.5rem; display: flex; justify-content: flex-end; }
/* Choices (radio buttons, checkboxes): the whole row is the target. */
label:has(> input[type="radio"]), label:has(> input[type="checkbox"]) {
  display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.65rem 0.8rem; margin-block: 0 0.5rem;
  font-weight: 400; border: 1px solid var(--line); border-radius: 0.5rem; cursor: pointer;
}
label:has(> input:checked) { border-color: var(--accent); background: var(--accent-soft); }
input[type="radio"], input[type="checkbox"] { inline-size: 1.15rem; block-size: 1.15rem; margin: 0.2rem 0 0; flex: none; }
/* Invalid fields are marked only once the person has left them or tried to submit (the browser's own message
   explains the error). */
:is(input, select, textarea):user-invalid { border-color: var(--error); outline: 2px solid var(--error); outline-offset: 1px; }
.preview { padding: 0.9rem 1rem; border-radius: 0.5rem; background: var(--accent-soft); border-inline-start: 4px solid var(--accent); }
/* The legend sits inside the box, as its heading (a floated legend leaves the fieldset's border line). */
fieldset.preview legend { float: inline-start; inline-size: 100%; margin-block-end: 0.5rem; }
fieldset.preview legend + * { clear: both; }
.preview p { margin-block-end: 0.35rem; }
.preview p:last-child { margin-block-end: 0; }

/* --- Home --- */
.hero { padding-block: 1.5rem 1rem; }
.hero .eyebrow { margin-block-end: 0.75rem; color: var(--muted); font-size: 1.0625rem; letter-spacing: 0.04em; }
.hero h1 { font-size: clamp(1.875rem, 1.3rem + 2.6vw, 2.75rem); }
.lead { font-size: 1.125rem; max-inline-size: 36rem; color: var(--muted); }
.features { list-style: none; padding: 0; margin-block: 2.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1.25rem; }
.features h2 { font-size: 1.0625rem; margin-block: 0 0.4rem; }
.features p { margin: 0; color: var(--muted); font-size: 1rem; }

/* --- Profile --- */
.profile { display: flex; align-items: center; gap: 1.1rem; margin-block-end: 1rem; }
.profile h1 { margin-block-end: 0.15rem; }
.avatar {
  flex: none; display: grid; place-items: center; inline-size: 4.5rem; block-size: 4.5rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent);
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.03em;
}
.address { margin: 0; color: var(--muted); font-size: 1rem; }

/* --- Career path: one block per organization; a line joins the positions held in the same place --- */
.career-section { margin-block-start: 2rem; }
.career-section h2 { margin-block: 0 0.75rem; }
.career { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.7rem 1rem; }
/* A title and, at the end of its line, its period (below it when the line is too short). */
.row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.row > :first-child { flex: 1 1 14rem; min-inline-size: 0; }
.block h3 { margin: 0; font-size: 1.0625rem; }
.block h4 { margin: 0; font-size: 0.9875rem; font-weight: 600; line-height: 1.35; }
/* Titles lead to the page of the entry: underlined on approach only, to keep long lists readable. */
.block h3 a, .block h4 a { color: inherit; text-decoration: none; }
.block h3 a:hover, .block h4 a:hover, .block h3 a:focus-visible, .block h4 a:focus-visible { text-decoration: underline; }
.block p { margin: 0; }
.block .period { white-space: nowrap; font-size: 0.9375rem; }
.block .edit { font-size: 0.9375rem; }
.meta { color: var(--muted); font-size: 0.9375rem; }
.meta .badge { font-size: 0.8125rem; }
/* Marks of organizations and units: a monogram on a color that stays the same for the same name. White on these
   colors keeps a contrast of 5.8:1 at least. */
.mark {
  display: inline-grid; place-items: center; flex: none; min-inline-size: 2rem; block-size: 2rem; padding-inline: 0.3rem;
  border-radius: 0.4rem; color: #fff; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.mark.minor { min-inline-size: 1.5rem; block-size: 1.25rem; padding-inline: 0.3rem; border-radius: 0.3rem; font-size: 0.6875rem; }
/* Banners and monograms: the logo's navy in eight depths (white text keeps more than 7:1 on each). */
.tone-0 { background: #14284b; } .tone-1 { background: #1d3a63; } .tone-2 { background: #233b52; } .tone-3 { background: #2c4a6e; }
.tone-4 { background: #1b3348; } .tone-5 { background: #354766; } .tone-6 { background: #263552; } .tone-7 { background: #3a4f73; }
.block h3 { display: flex; align-items: center; gap: 0.55rem; }
/* The unit where a position was held: its mark and its name, above the title. */
.block .unit { display: flex; align-items: center; gap: 0.4rem; margin-block-end: 0.1rem; font-size: 0.9375rem; font-weight: 500; }
.block .unit a { color: inherit; }
.positions { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
/* Several positions in the same organization: a line, and one mark per position. */
.positions.thread { margin-block-start: 0.5rem; padding-inline-start: 1.1rem; border-inline-start: 2px solid var(--line); margin-inline-start: 0.3rem; gap: 0.4rem; }
.positions.thread li { position: relative; }
.positions.thread li::before {
  content: ""; position: absolute; inset-block-start: 0.45rem; inset-inline-start: calc(-1.1rem - 0.3rem - 1px);
  inline-size: 0.6rem; block-size: 0.6rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--accent);
}
/* In a list, a description is cut after two lines; the page of the entry gives it in full. */
.block .description {
  margin-block-start: 0.1rem !important; font-size: 0.9375rem; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.description {
  margin-block-start: 0.2rem !important; font-size: 1rem; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.description { white-space: pre-line; margin-block-start: 0.5rem !important; max-inline-size: 38rem; }

@media (pointer: coarse) {
  button, .button, input[type="text"], input[type="url"], input[type="number"], select { min-block-size: 3rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button, nav a, .skip { transition: background-color 120ms, filter 120ms, transform 120ms; }
}

/* A row of buttons. */
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Works: the DOI and the button that fills the form from it, side by side when there is room. */
.work-fields { border: 1px solid var(--line); border-radius: 0.5rem; padding: 1rem; }
.doi-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.doi-row label { flex: 1 1 14rem; margin: 0; }
.doi-row button { margin-block-end: 0; }
.work-meta { margin-block: 0.15rem 0; color: var(--muted); font-size: 1rem; }
.work-meta a { overflow-wrap: anywhere; }

/* Highlights: posts shown on a profile, each in its own box, text as written (line breaks kept). */
.highlight-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.highlight {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem 1.25rem;
}
.highlight > * { margin-block: 0.4rem; }
.highlight > :first-child { margin-block-start: 0; }
.highlight > :last-child { margin-block-end: 0; }
.highlight-text { white-space: pre-line; overflow-wrap: anywhere; }
.highlight summary { cursor: pointer; font-weight: 600; }

/* Link preview of a highlighted post: image on the side when there is room, above it on narrow screens. */
.quote { margin-block: 0.5rem 0; margin-inline: 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 0.75rem;
  background: var(--paper); min-inline-size: 0; }
.quote > * { margin-block: 0.4rem; }
.quote > :first-child { margin-block-start: 0; }
.quote > :last-child { margin-block-end: 0; }
.quote-avatar { inline-size: 1.5rem; block-size: 1.5rem; border-radius: 0.375rem; object-fit: cover; vertical-align: middle; }
.quote-name { color: var(--ink); font-weight: 600; }
.quote-missing { padding: 0.5rem 0.75rem; border: 1px dashed var(--line); border-radius: 0.6rem; }
.quote-bluesky { background: color-mix(in srgb, #1185fe 12%, var(--paper)); }
.link-card {
  display: grid; grid-template-columns: 9rem 1fr; min-block-size: 5rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: 0.6rem; color: inherit; text-decoration: none; background: var(--paper);
}
.highlight .link-card { margin-block: 0.625rem 0; }
.link-card:not(:has(.link-card-image)) { grid-template-columns: 1fr; }
.link-card:hover, .link-card:focus-visible { border-color: var(--accent); }
.link-card-image { inline-size: 100%; block-size: 100%; min-block-size: 5rem; max-block-size: 8rem; object-fit: cover; display: block; }
.link-card-text { display: grid; align-content: center; gap: 0.125rem; padding: 0.5rem 0.75rem; min-inline-size: 0; }
.link-card-site { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card-title {
  font-weight: 600; font-size: 1rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-card-description {
  font-size: 0.875rem; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 30rem) {
  .link-card { grid-template-columns: 1fr; }
  .link-card-image { max-block-size: 10rem; min-block-size: 0; aspect-ratio: 1.91 / 1; }
}

/* Domain proof: names and values to copy. */
.proof { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; margin-block: 0.5rem 1rem; }
.proof dt { font-weight: 600; }
.proof dd { margin: 0; overflow-wrap: anywhere; }
code { font-family: ui-monospace, monospace; font-size: 0.9em; background: var(--accent-soft); padding: 0.1em 0.3em; border-radius: 0.25rem; }

/* Administration: tables of accounts, registry evidence. */
.admin-table { inline-size: 100%; border-collapse: collapse; font-size: 1rem; }
.admin-table th, .admin-table td { text-align: start; padding: 0.7rem 1rem; border-block-end: 1px solid var(--line); }
.admin-table th { font-size: 0.875rem; font-weight: 600; color: var(--muted); background: var(--raised); }
.admin-table tbody tr:last-child td { border-block-end: 0; }
.evidence { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.evidence .hint { display: block; }
.badge.verified { background: var(--success-soft); color: var(--success); border-color: var(--success); }

/* Attestations: the fact on an entry, requests and decisions. */
.attested { margin-block: 0.2rem 0; font-size: 0.9375rem; font-weight: 600; color: var(--success); }
.attested::before { content: "✓ "; }
.attestations { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; margin-block: 0.4rem; }
.inline-form label { flex: 1 1 14rem; margin: 0; }

/* Notifications: a plain list; unread ones marked by a bar, the counter is a small figure. */
.notifications { list-style: none; padding: 0; margin-block: 0 1.5rem; max-inline-size: 38rem; }
.notifications.card { padding: 0.25rem 0; }
.notifications > li { padding: 0.8rem 1.25rem; border-inline-start: 4px solid transparent; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }
.notifications > li + li { border-block-start: 1px solid var(--line); }
.notifications > li.unread { border-inline-start-color: var(--accent); background: var(--accent-soft); }
.notifications a { font-weight: 500; }
.empty-state { max-inline-size: 38rem; text-align: center; padding-block: 2rem; margin-block-end: 1.5rem; }
.empty-state .empty { margin: 0; }
/* Settings: one row per item, its label on the start side and the control on the end side. */
.setting-rows { border: 1px solid var(--line); border-radius: 0.5rem; }
.setting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  margin: 0; padding: 0.6rem 0.9rem; font-weight: 500; }
.setting-row + .setting-row { border-block-start: 1px solid var(--line); }
.setting-row > span { flex: 1 1 14rem; }
.setting-row select { flex: 0 0 12rem; inline-size: 12rem; margin: 0; }
.count {
  display: inline-block; min-inline-size: 1.4em; padding: 0 0.35em; border-radius: 1em; text-align: center;
  font-size: 0.875rem; font-weight: 700; color: var(--on-accent); background: var(--accent);
}

/* Logo of a verified organization, in place of its monogram: same size, never stretched. */
.mark-logo { flex: none; inline-size: 2rem; block-size: 2rem; object-fit: contain; border-radius: 0.4rem; background: #fff; border: 1px solid var(--line); }
.mark-logo.minor { inline-size: 1.25rem; block-size: 1.25rem; border-radius: 0.3rem; }
.mark-logo.large { inline-size: 5rem; block-size: 5rem; }

/* A small form inside a line (removing a manager). */
form.inline { display: inline; }

/* Events: lists on profiles and organization pages, the event's description as written. */
.event-list { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.event-list .hint { display: block; }
.event-description { white-space: pre-line; }

/* Link to manage an organization's account, next to its name in the career editor. */
.claim-link { font-size: 0.875rem; font-weight: 500; margin-inline-start: 0.4rem; }
/* A unit shown with its organization's logo: a ring around it says it is a part of it. */
.mark-logo.inherited { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Administration: links to the sections of the dashboard. */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 0 1.5rem; }
.tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.85rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 500; font-size: 1rem; }
.tabs a:hover { border-color: var(--accent); text-decoration: none; }
.count-pill { min-inline-size: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: var(--raised); color: var(--muted);
  font-size: 0.8125rem; text-align: center; }
.admin-section { margin-block: 0 2.25rem; scroll-margin-block-start: 1rem; }
.admin-section > h2, .section-head h2 { font-size: 1.25rem; margin-block: 0 0.35rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.section-head form { margin: 0; }
.card.table-card { padding: 0; overflow-x: auto; }
.back { margin-block: 0 0.75rem; font-size: 1rem; }
.decision .actions, .decision button { margin-block-start: 0.25rem; }

/* Administration cards: a record, then its actions in one row (forms side by side). */
.admin-cards { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.admin-cards > li { padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.admin-cards p { margin-block: 0 0.5rem; }
.admin-cards .matches { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.admin-cards .matches > li { padding-block-start: 0.6rem; border-block-start: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.admin-cards .matches > li > div:first-child { flex: 1 1 24rem; }
.admin-cards .matches .actions { margin: 0; flex: 0 1 auto; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ===== Product layout (2026-11-15): cards, profile, two columns ===== */
.card, .panel, .career-section, .side-col .events, .highlights {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 1.25rem; }
.panel { padding: 1.25rem 1.5rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-block-end: 1.25rem; }
.page-head h1 { margin: 0; }

/* Profile: an identity card, the career path, and a side column on large screens. */
.profile-layout { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 60rem) { .profile-layout { grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.5rem; } }
.main-col, .side-col { display: grid; gap: 1rem; min-inline-size: 0; }
.profile-card { padding: 0; overflow: hidden; }
.profile-banner { block-size: 6.5rem; }
.profile-body { padding: 0 1.5rem 1.25rem; }
.profile-body h1 { margin-block: 0.5rem 0.15rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.headline { margin: 0 0 0.35rem; font-size: 1.0625rem; color: var(--ink); }
.profile-body .address { font-size: 0.9375rem; }
.profile-body .hint { margin-block: 0.5rem 0; font-size: 0.9375rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; }
.avatar { background: var(--accent); border-color: var(--accent); }
.avatar.large {
  inline-size: 6.5rem; block-size: 6.5rem; margin-block-start: -3.25rem; font-size: 2.1rem;
  border: 4px solid var(--surface); box-shadow: var(--shadow);
}
.avatar.small { inline-size: 2.25rem; block-size: 2.25rem; min-block-size: 0; padding: 0; font-size: 0.9375rem; letter-spacing: 0; border-width: 0; }

/* Career path: each part is a card; the organizations follow one another, separated by a line. */
.career-section { padding: 1.1rem 1.25rem 0.35rem; margin-block-start: 0; }
.career-section h2 { margin: 0 0 0.25rem; }
.career { gap: 0; }
.career .block { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0.9rem 0; border-block-start: 1px solid var(--line); }
.career .block:first-child { border-block-start: 0; }
.block h3 { font-size: 1rem; }
.mark, .mark-logo { inline-size: 2.5rem; block-size: 2.5rem; min-inline-size: 2.5rem; border-radius: 0.5rem; font-size: 0.875rem; }
.mark.minor, .mark-logo.minor { inline-size: auto; min-inline-size: 1.5rem; block-size: 1.25rem; font-size: 0.6875rem; border-radius: 0.3rem; }
.mark-logo.minor { inline-size: 1.25rem; }
.badge { padding: 0.05rem 0.45rem; border: 0; background: var(--raised); color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
.badge.verified { background: var(--success-soft); color: var(--success); }

/* Highlights: a card holding the highlighted posts. */
.highlights { padding: 1.1rem 1.25rem; }
.highlights h2 { margin-block: 0 0.75rem; }
.highlight { background: var(--raised); box-shadow: none; }

/* Side column: organizations, events to come. */
.side-card h2, .side-col .events h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.side-col .events { padding: 1.1rem 1.25rem; }
.org-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.org-list li { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; font-size: 1rem; }
.org-list .mark, .org-list .mark-logo { inline-size: 2rem; block-size: 2rem; min-inline-size: 2rem; }
.org-list a { color: var(--ink); }
.verified-dot { color: var(--success); font-size: 0.875rem; }

/* Agenda */
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.agenda h2 { margin: 0 0 0.25rem; font-size: 1.0625rem; }
.agenda .hint { margin: 0; }
.agenda-date { margin: 0 0 0.15rem; color: var(--seal); font-size: 1rem; font-weight: 600; }

/* Buttons: a little rounder and calmer. */
button, .button { border-radius: 0.6rem; }
.button:hover { text-decoration: none; }

/* Form in a modal dialog (adding an entry): over the page, scrolling inside, the page does not scroll behind. */
.form-dialog {
  inline-size: min(40rem, calc(100dvw - 2rem)); max-block-size: calc(100dvh - 2rem); padding: 1.25rem 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 50px rgb(16 24 40 / 0.25); overflow: auto;
}
.form-dialog::backdrop { background: rgb(15 23 42 / 0.45); }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: 0.75rem; }
.dialog-head h2 { margin: 0; }
/* Inside the dialog, the form needs no card of its own. */
.form-dialog .panel { border: 0; box-shadow: none; padding: 0; margin: 0; max-inline-size: none; }

/* Parts of a career path follow one another with some room. */
.career-section + .career-section { margin-block-start: 1rem; }
.career-section + .hint { margin-block-start: 1rem; }
/* Unsaved changes: the message and its two choices cover the top of the dialog (a sticky container of no height),
   so that nothing moves; "Keep editing" sits where "Close" was, so a second click there keeps the changes. */
.discard-wrap { position: sticky; inset-block-start: 0; block-size: 0; z-index: 2; }
.discard {
  position: absolute; inset-inline: -0.75rem; inset-block-start: -0.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; padding: 0.6rem 0.75rem;
  border-radius: 0.5rem; background: var(--error-soft); color: var(--error); box-shadow: var(--shadow);
}
.discard p { margin: 0; margin-inline-end: auto; font-weight: 600; }
.discard:not([data-shown]) { display: none; }

/* Organization page: its mark or logo, large, over the banner like a profile's initials. */
.org-mark .mark, .org-mark .mark-logo {
  inline-size: 5.5rem; block-size: 5.5rem; min-inline-size: 5.5rem; margin-block-start: -2.75rem; font-size: 1.5rem;
  border: 4px solid var(--surface); border-radius: 1rem; box-shadow: var(--shadow); background-clip: padding-box;
}
.org-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.4rem; }
.card-title { margin: 0 0 0.75rem; font-size: 1rem; }
.admin-tools summary { cursor: pointer; font-weight: 700; }
.admin-tools form { margin-block-start: 0.75rem; }

/* Event page: a date chip, the facts as labelled lines, the registration on the side. */
.event-head { display: flex; gap: 1rem; align-items: flex-start; }
.event-head h1 { margin: 0.1rem 0 0.25rem; }
.event-head .kind, .event-head .hint { margin: 0; }
.date-chip {
  flex: none; display: grid; place-items: center; inline-size: 4rem; padding-block: 0.4rem;
  border: 1px solid var(--line); border-radius: 0.75rem; background: var(--raised); text-align: center; line-height: 1.1;
}
.date-month { color: var(--seal); font-size: 0.9375rem; font-weight: 700; }
.date-day { font-size: 1.6rem; font-weight: 700; }
.event-facts { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 0.9rem; }
.event-facts li { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
.fact-label { color: var(--muted); font-size: 0.9375rem; font-weight: 600; }
.event-card .event-description { margin: 1.1rem 0 0; padding-block-start: 1rem; border-block-start: 1px solid var(--line); color: var(--ink); }
.register-form label { margin-block-end: 0.75rem; }
.side-card .actions { gap: 0.4rem; }

/* Settings: the other pages as a list of links in a card. */
.settings-more { margin-block-start: 1.5rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.link-list a { display: block; padding: 0.45rem 0.5rem; border-radius: 0.5rem; text-decoration: none; font-weight: 500; }
.link-list a:hover { background: var(--accent-soft); text-decoration: none; }

/* File fields: the browser's button styled like ours. */
input[type="file"] { font: inherit; color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-inline-end: 0.75rem; padding: 0.45rem 0.9rem; border: 1px solid var(--control); border-radius: 0.6rem;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--accent-soft); }

/* Copy button next to a Fediverse address: the icon alone (its name is in the label for screen readers and in the
   tooltip); once copied, a check mark for a moment. */
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.copy-button {
  display: inline-grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; min-block-size: 0; padding: 0;
  border: 0; border-radius: 0.4rem; background: none; color: var(--muted);
}
.copy-button:hover { background: var(--accent-soft); color: var(--ink); filter: none; }
.copy-button .icon-done, .copy-button[data-done] .icon-copy { display: none; }
.copy-button[data-done] .icon-done { display: block; }
.copy-button[data-done] { color: var(--success); }

/* --- Sign-in: one centred card --- */
.auth-card { max-inline-size: 28rem; margin: 3rem auto; padding: 2rem; text-align: start; }
.auth-card h1 { font-size: 1.5rem; margin-block: 0.75rem 0.5rem; }
.auth-mark { display: block; inline-size: 3rem; block-size: 3rem; background: url("/static/brand/icon.svg") center / contain no-repeat; }
.auth-card form { margin-block-start: 1.5rem; }
.auth-more { margin-block: 0 1.25rem; }
.auth-more summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-block-end: 0.75rem; }
.wide-button { inline-size: 100%; }

/* --- Agenda filters: the fields side by side when there is room --- */
.agenda-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0 0.9rem;
  align-items: end; margin-block-end: 1.5rem; padding-block-end: 0.35rem; }
.agenda-filters label { margin-block-end: 0.9rem; font-size: 1rem; }
.filter-actions { display: flex; align-items: center; gap: 1rem; margin-block-end: 0.9rem; }
/* Calendar addresses: long, broken anywhere, with their copy button. */
.feed-url { display: flex; align-items: flex-start; gap: 0.5rem; }
.feed-url code { overflow-wrap: anywhere; padding: 0.5rem 0.7rem; border-radius: 0.5rem; background: var(--raised); flex: 1; }
.event-ics { margin-block: 1rem 0; }

/* --- Speakers: the organizer's list, one row per speaker with its remove button --- */
.side-sub { margin: 1.25rem 0 0.5rem; padding-block-start: 1rem; border-block-start: 1px solid var(--line); font-size: 1rem; }
.speaker-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.speaker-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-block: 0.3rem; }
.speaker-list form { margin: 0; }
.speaker-form label { margin-block-end: 0.4rem; }
.speaker-form .hint { margin-block: 0 0.6rem; font-size: 0.875rem; }
input.short { max-inline-size: 8rem; }
.attended { margin: 0 0 0.5rem; padding: 0.65rem 0.8rem; border: 1px dashed var(--line); border-radius: 0.5rem; }

/* --- Reports --- */
.report { margin-block: 1rem 0; font-size: 1rem; }
.report summary { cursor: pointer; color: var(--muted); }
.report form { margin-block-start: 0.75rem; }
.report-reasons { margin: 0 0 0.75rem; padding-inline-start: 1.1rem; display: grid; gap: 0.5rem; }
.report-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; }
.remove-form { flex: 1 1 20rem; display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; }
.remove-form label { flex: 1 1 16rem; margin: 0; }
.report-actions > form:last-child { margin: 0; }

/* --- Home page by intent --- */
.intent-choice { max-inline-size: 46rem; margin: 2rem auto; text-align: center; }
.intent-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin-block-start: 1.5rem; }
.intent-card { display: grid; gap: 0.5rem; padding: 1.5rem; text-align: start; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 400; }
.intent-card strong { font-size: 1.125rem; }
.intent-card span { color: var(--muted); }
.intent-card:hover { border-color: var(--accent); filter: none; }
.home { display: grid; gap: 1rem; max-inline-size: 46rem; margin-inline: auto; }
.home-part h2 { margin-block: 0 0.75rem; font-size: 1.25rem; }
.home-part .actions { margin-block-start: 1rem; }
.side-sub.first { margin-block-start: 0; padding-block-start: 0; border: 0; }
.intent-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; justify-content: center; }
.intent-switch button[aria-pressed="true"] { opacity: 1; color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.todo-card { border-inline-start: 4px solid var(--accent); }
.todo-card h2 { margin: 0 0 0.5rem; font-size: 1.0625rem; }
.todo-card ul { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: 0.35rem; }
.org-home { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.org-home > li + li { border-block-start: 1px solid var(--line); padding-block-start: 1.25rem; }
.org-home h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; }
.org-figures { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.org-figures li { padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--raised); font-size: 0.9375rem; }
.org-figures li.waiting { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* --- Language selector (footer): a drop-down list, applied at once (a button without JavaScript). --- */
.languages { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.languages label { margin: 0; font-weight: 400; color: var(--muted); }
.languages select { inline-size: auto; min-block-size: 2.25rem; margin: 0; padding-block: 0.25rem; }

/* --- Forced colors (Windows contrast themes): the browser drops background images and colors, so whatever they
       carried gets a border or an underline in the system's colors. --- */
@media (forced-colors: active) {
  /* The gold brush of the current page becomes a plain underline. */
  .primary a[aria-current="page"] { background: none; text-decoration: underline 3px; text-underline-offset: 0.45em; }
  /* Items that wait for an action, unread notifications, the chosen intent: marked otherwise than by a tint. */
  .org-figures li, .count-pill, .badge { border: 1px solid CanvasText; }
  .org-figures li.waiting, .notifications > li.unread { border-inline-start: 4px solid Highlight; }
  .intent-switch button[aria-pressed="true"] { border: 2px solid Highlight; }
  label:has(> input:checked) { border: 2px solid Highlight; }
  /* Decorative marks drawn as background images keep a visible shape. */
  .auth-mark { forced-color-adjust: none; }
  .avatar, .mark { border: 1px solid CanvasText; }
}

/* --- Accessibility declaration: a readable document, sections spaced. --- */
.declaration { max-inline-size: 46rem; }
.declaration section + section { margin-block-start: 1.5rem; }
.declaration h2 { font-size: 1.2rem; margin-block: 0 0.5rem; }

/* --- My network: a plain chronological list. --- */
/* My network: the items as cards, like highlights; one column of reading width. */
.news { max-inline-size: 46rem; }
.news-title { font-weight: 500; }
.follow-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-block: 0 0.75rem; }
.post-text { white-space: pre-line; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.news .post details > summary { cursor: pointer; font-weight: 500; }
.account-list { list-style: none; margin: 0 0 1rem; padding: 0.25rem 0; max-inline-size: 46rem; }
.account-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 1.25rem; }
.account-list > li + li { border-block-start: 1px solid var(--line); }
.account-list > li > div { display: grid; gap: 0.15rem; }
.account-list form { margin: 0; }

/* --- Media of reproduced posts: a grid of four at most, an ALT badge where the image is described. --- */
.medias { display: grid; gap: 0.35rem; border-radius: 0.6rem; overflow: hidden; margin-block: 0.5rem; }
.medias-2, .medias-4 { grid-template-columns: 1fr 1fr; }
.medias-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.medias-3 > :first-child { grid-row: span 2; }
.media { position: relative; display: block; min-block-size: 0; background: var(--raised); }
.medias img, .medias video { display: block; inline-size: 100%; block-size: 100%; max-block-size: 28rem; object-fit: cover; }
.medias-1 img, .medias-1 video { object-fit: contain; block-size: auto; }
.media-audio { inline-size: 100%; }
.media-link { padding: 0.75rem; }
.badge-alt { position: absolute; inset-block-end: 0.4rem; inset-inline-start: 0.4rem; padding: 0.05rem 0.35rem; border-radius: 0.3rem;
  background: rgb(0 0 0 / 0.75); color: #fff; font-size: 0.75rem; font-weight: 700; }
.more-media { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / 0.5); color: #fff;
  font-size: 1.5rem; font-weight: 700; }
.media-description { font-size: 0.9375rem; }
.media-description summary, .sensitive > summary { cursor: pointer; color: var(--muted); }
.media-description p { white-space: pre-line; margin: 0.25rem 0 0; }

/* Carousel of a post's images (carousel.js). */
.carousel { inline-size: 100vw; block-size: 100dvh; max-inline-size: none; max-block-size: none; margin: 0; padding: 0; border: 0;
  background: rgb(8 10 18 / 97%); color: #fff; }
.carousel::backdrop { background: rgb(0 0 0 / 60%); }
.carousel[open] { display: grid; place-items: center; }
.carousel-scene { display: grid; justify-items: center; gap: 0.75rem; margin: 0; padding: 3.5rem 5rem 4.5rem;
  inline-size: 100%; block-size: 100%; align-content: center; }
.carousel-scene img { max-inline-size: 100%; max-block-size: calc(100dvh - 9rem); object-fit: contain; border-radius: 0.375rem;
  cursor: zoom-in; touch-action: manipulation; }
.carousel-scene img.loading { filter: blur(2px); opacity: 0.85; }
/* Zoom: the image enlarged (its width set by carousel.js), the scene scrolls both ways; flex and automatic margins
   centre it when smaller than the screen (a centred grid would cut its start). */
.carousel.zoom .carousel-scene { display: flex; overflow: auto; padding: 0; overscroll-behavior: contain; }
.carousel.zoom .carousel-scene img { flex: none; margin: auto; max-inline-size: none; max-block-size: none; block-size: auto; cursor: zoom-out; border-radius: 0; }
.carousel.zoom figcaption, .carousel.zoom .carousel-arrow { display: none; }
.carousel-scene figcaption { max-inline-size: 48rem; max-block-size: 6rem; overflow-y: auto; padding: 0 1rem; font-size: 0.875rem;
  line-height: 1.4; color: rgb(255 255 255 / 85%); text-align: center; }
.carousel-arrow, .carousel-close { position: fixed; z-index: 2; display: grid; place-items: center; padding: 0;
  border: 1px solid rgb(255 255 255 / 25%); border-radius: 999px; background: rgb(16 22 40 / 82%); color: #fff; cursor: pointer; font: inherit; line-height: 1; }
.carousel-arrow:hover, .carousel-close:hover { background: rgb(40 56 96 / 92%); }
.carousel-arrow { inset-block-start: 50%; inline-size: 3rem; block-size: 3rem; transform: translateY(-50%); font-size: 2rem; }
.carousel-previous { inset-inline-start: 1rem; }
.carousel-next { inset-inline-end: 1rem; }
.carousel-arrow[hidden] { display: none; }
[dir="rtl"] .carousel-arrow { scale: -1 1; }
.carousel-close { inset-block-start: calc(env(safe-area-inset-top, 0px) + 0.75rem); inset-inline-end: 0.75rem; inline-size: 2.75rem; block-size: 2.75rem; font-size: 1.75rem; }
.carousel-position { position: fixed; inset-block-start: calc(env(safe-area-inset-top, 0px) + 1.375rem); left: 50%; transform: translateX(-50%);
  font-size: 0.875rem; font-weight: 700; color: rgb(255 255 255 / 80%); }
@media (max-width: 40rem) {
  .carousel-arrow { inset-block-start: auto; inset-block-end: calc(env(safe-area-inset-bottom, 0px) + 1rem); transform: none; }
  .carousel-scene { padding-inline: 0.5rem; }
}

/* Explanation of a page or section: an "i" button beside its title, the text in a bubble (layout.ts, info()). */
.titled { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.titled:first-child > :is(h1, h2) { margin-block-start: 0; }
.info-button {
  flex: none; display: inline-grid; place-items: center; inline-size: 1.5rem; block-size: 1.5rem; min-inline-size: 0; min-block-size: 0; padding: 0;
  border: 1.5px solid var(--control); border-radius: 50%; background: transparent; color: var(--muted);
  font: italic 700 0.875rem/1 Georgia, "Times New Roman", serif; cursor: pointer; position: relative;
}
.info-button::before { content: ""; position: absolute; inset: -0.625rem; }   /* a 44 px target around the 24 px circle */
.info-button:hover, .info-button:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.info-popover {
  max-inline-size: min(28rem, calc(100vw - 2rem)); padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.6rem;
  background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px rgb(16 24 40 / 0.18); font-size: 0.9375rem; line-height: 1.5;
}
/* Beside its button where anchor positioning exists; elsewhere, the bubble is centred (the browser's default). */
@supports (position-area: block-end) {
  .info-popover { margin: 0.4rem 0; inset: auto; position-area: block-end span-inline-end; position-try-fallbacks: flip-inline, flip-block; }
}

/* An error with an action under it (attaching an organization account by signing in). */
div.error { margin-block-end: 1rem; }
div.error > p { margin: 0; }
div.error > form { margin-block-start: 0.75rem; }

/* Connections: the context written with a request (shown to the person asked, and to its author). */
.connection-context { margin: 0.5rem 0 0; padding-inline-start: 0.75rem; border-inline-start: 3px solid var(--line); white-space: pre-line; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.highlight .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.6rem; }
.highlight .actions form { margin: 0; }

/* Natural pretexts and peer confirmations (connections). */
.pretexts ul, .confirm-block ul { margin: 0.5rem 0; padding-inline-start: 1.1rem; display: grid; gap: 0.4rem; }
.confirm-block { flex-basis: 100%; }
.confirm-block summary { cursor: pointer; font-weight: 600; }
.confirm-block li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; justify-content: space-between; }
.peer-confirmed { margin: 0.25rem 0 0; }

/* The connections of a profile (names only, never a count). */
.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.side-card .person-list + .hint { margin-block-start: 0.75rem; }

/* A copy of a profile from another server (§ 17): another background, the server's icon in the corner. */
.profile-card { position: relative; }
.profile-remote { background: color-mix(in srgb, var(--surface) 88%, var(--gold)); }
.profile-remote .profile-banner { background: repeating-linear-gradient(135deg, #2c3a52 0 14px, #34445f 14px 28px); }
.remote-origin { position: absolute; inset-block-start: 0.75rem; inset-inline-end: 0.75rem; display: grid; place-items: center;
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: 0.6rem; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.remote-origin img { inline-size: 1.75rem; block-size: 1.75rem; border-radius: 0.35rem; object-fit: contain; }
.avatar.photo { object-fit: cover; padding: 0; }
.find-remote { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; margin-block: 0.75rem 1.25rem; }
.find-remote label { flex: 1 1 16rem; margin: 0; }
.find-remote .error { flex-basis: 100%; }
