/* mathi.eu: site.css
   Scientific Pop, strict Data Stories rules. Light theme only.
   Spacing: tight inside a component, clearly more between components, most between sections (the three --ds-gap tokens).
   No Bootstrap, no Sass, no build step: this is the only stylesheet of the site. Every page has <body class="ds-nobs">;
   section 19 holds the page reset and the few layout helpers (container, fixed-top, visually-hidden, text-center, mb-0).
   Fonts: Inter and Space Grotesk, served from fonts/ (section 0), not from Google.

   Colour rules
   - Lime is a fill. Text on lime is always forest. Never lime text.
   - Coral is a fill or a large/bold accent. Small coral text uses --ds-coral-text.
   - Every page shows at least one lime element and one coral element
     (coral: the brand dot and the dotline on every page, plus the "now" dot on Welcome's career path, the dates of its latest publications, the dot of the story card in view;
     lime: the Email button of the contact card on every page, the pale lime box of the two ideas and the section being read in the list of Welcome's bar, the citations tile and the filter chips on Science and Data Stories).
   - Card surfaces: --ds-sand, and on Welcome one colour per block: pale mint (--ds-mint-soft) for the career path card,
     pale lime (--ds-lime-pale) for the two ideas, sand cards with a coral date for the latest publications. Mint cards for my favorite papers (Research page).
     Lime is the only highlight. Mint is also used for tags and for picture placeholders.
   - Type: five text sizes (--ds-fs-xs, -sm, body, -lg, -xl) and four heading sizes (--ds-fs-h1 to -h4). Use the tokens, add no new sizes.
   - Flat: no shadows, no gradients. Radius 8px controls, 12px cards. */

/* 0. Fonts ---------------------------------------------------------------- */
/* Inter 400 and 700, Space Grotesk 500 and 700 (SIL Open Font License, files from Fontsource). Two files per weight:
   latin, and latin-ext for the few names with letters outside it. The browser only downloads the ones a page uses. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* 1. Tokens -------------------------------------------------------------- */
:root {
  --ds-forest: #183F3B;
  --ds-cream: #F6F2E9;
  --ds-lime: #D9F36A;
  --ds-coral: #FF8065;
  --ds-mint: #A9D8CE;
  --ds-mint-soft: rgba(169, 216, 206, .45); /* pale mint: the career path card on Welcome */
  --ds-muted: #4C6460;       /* captions, meta: 5.7:1 on cream */
  --ds-grid: #E2DDCF;        /* borders, rules */
  --ds-mint-dark: #377A6C;   /* AA on cream */
  --ds-lime-pale: #E3F3A4;
  --ds-coral-deep: #B82E12;  /* small coral text on sand: 4.9:1 (the dates of the publication cards on Welcome) */
  --ds-coral-text: #CE3618;  /* AA on cream */
  --ds-head-bg: #DBE9E0;     /* sticky table headings */
  --ds-sand: rgba(226, 221, 207, .55); /* the one card surface: picks, ideas, cards */
  --ds-sand-solid: #EBE6DB;  /* sand as it looks on cream, as a solid colour: the bar of the story and paper pop-ups, which text scrolls under */

  --ds-font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ds-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ds-radius-ctrl: 8px;
  --ds-radius-card: 12px;
  --ds-focus: 0 0 0 3px rgba(255, 128, 101, .5);
  --ds-measure: 68ch;

  /* Rhythm. Inside a component spacing stays tight (set where the component is). Between things, three steps:
     item = between cards or rows of one list; block = between blocks inside a section; sec = around a section break. */
  /* Welcome: the one rule: thin light grey, under the top bar and under every section heading (each heading is a bar
     of its own, site.css section 17), running the full width of the screen. */
  --ds-rule: 1px solid var(--ds-grid);

  --ds-gap-item: .7rem;
  --ds-gap-block: 1.3rem;
  --ds-gap-sec: 2.1rem;

  /* Type scale. Text: xs labels, tags and chips; sm meta, captions and detail lines; body; lg card titles and menu;
     xl opening lines. Headings: h1 to h4. */
  --ds-fs-xs: .75rem;
  --ds-fs-sm: .875rem;
  --ds-fs-body: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --ds-fs-lg: 1.125rem;
  --ds-fs-xl: clamp(1.2rem, 1.05rem + .7vw, 1.45rem);
  --ds-fs-h1: clamp(2.2rem, 1.7rem + 2.4vw, 3.2rem);
  --ds-fs-h2: clamp(1.7rem, 1.4rem + 1.5vw, 2.3rem);
  --ds-fs-h3: clamp(1.3rem, 1.15rem + .75vw, 1.6rem);
  --ds-fs-h4: 1.25rem;
}

/* 2. Base ---------------------------------------------------------------- */
html { scroll-padding-top: 4rem; }
body {
  font-family: var(--ds-font-body);
  font-size: var(--ds-fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* phones: the page ends at the visible bottom, no extra scroll under the footer */
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--ds-font-head);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ds-forest);
  margin-bottom: .5rem;
}
h1, .h1 { font-size: var(--ds-fs-h1); }
h2, .h2 { font-size: var(--ds-fs-h2); }
h3, .h3 { font-size: var(--ds-fs-h3); }
h4, .h4 { font-size: var(--ds-fs-h4); }
h1, h2, h3, .h1, .h2, .h3 { letter-spacing: -0.035em; text-wrap: balance; }
h4, h5, h6, .h4, .h5, .h6 { letter-spacing: -0.02em; }

p, li { max-width: var(--ds-measure); }

a { color: var(--ds-forest); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ds-mint-dark); text-decoration-thickness: 2px; }

::selection { background: var(--ds-lime); color: var(--ds-forest); }
:focus-visible { outline: none; box-shadow: var(--ds-focus); border-radius: 4px; }

hr { color: var(--ds-grid); opacity: 1; }
mark, .mark { background: var(--ds-lime); color: var(--ds-forest); padding: .1em; }

/* 3. Text helpers -------------------------------------------------------- */
.lead { font-size: var(--ds-fs-lg); font-weight: 400; color: var(--ds-muted); max-width: 36rem; }
.ds-small, small, .small { font-size: var(--ds-fs-sm); color: var(--ds-muted); }

/* Signature: thin line ending in a coral dot (matches the logo). Under a page title (h1) js/site.js (initDotline)
   makes it as long as the title's text; 72px is the width without JavaScript. */
.dotline {
  position: relative;
  display: block;
  height: 1px;
  width: 72px;
  background: var(--ds-coral);
  margin: .75rem 0 1rem;
}
.dotline::after {
  content: "";
  position: absolute;
  right: -4px; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--ds-coral);
}

/* 4. Navbar -------------------------------------------------------------- */
.site-nav {
  background: var(--ds-cream);
  border-bottom: 1px solid var(--ds-grid);
  padding: .5rem 0;
}
.site-nav .navbar-brand, .ds-now__brand .navbar-brand {
  font-family: var(--ds-font-head);
  font-weight: 700;
  font-size: var(--ds-fs-h2); /* the size of the section headings: on Welcome a heading takes the brand's place in the bar */
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ds-forest);
  padding: 0;
}
.navbar-brand .brand-dot { color: var(--ds-coral); }
/* On Welcome the nav (site-nav--now) holds only the menu button. The brand sits in the opening (.ds-now__brand) and
   sticks in the top bar, like the section headings after it (site.css section 17). The name is that page's h1, in the opening. */
/* Menu, same on every page. Phones: one button top right opens a small dropdown (js/site.js initMenu), the current page
   marked with a coral bar. From tablet up (further down): no button, the links sit in the bar. */
.ds-menu { position: relative; align-self: center; margin-right: -.35rem; }
.ds-menu__btn { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; padding: 0; background: none; border: 0; border-radius: var(--ds-radius-ctrl); color: var(--ds-forest); cursor: pointer; }
.ds-menu__btn svg { width: 26px; height: 26px; }
.ds-menu__btn:hover, .ds-menu__btn[aria-expanded="true"] { background: var(--ds-lime); }
.ds-menu__list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 1040; min-width: 13rem; margin: 0; padding: .25rem 0; list-style: none; background: var(--ds-cream); border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-ctrl); }
.ds-menu__list li { max-width: none; }
.ds-menu__list a { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); letter-spacing: -0.01em; text-decoration: none; }
.ds-menu__list li + li a { border-top: 1px solid var(--ds-grid); }
.ds-menu__list a:hover { background: var(--ds-lime); color: var(--ds-forest); }
.ds-menu__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--ds-coral); }
/* A small icon before each page's name in the dropdown (not on the links in the bar from tablet up): house, database,
   bars, camera, envelope. The arrow of an outside link keeps its place right after the name. */
.ds-menu__ico { flex: none; width: 1.15rem; height: 1.15rem; }
.ds-menu__list .ds-ext { margin-left: -.3rem; }
/* Welcome: under the Welcome link the page's sections are sub-items (ul.ds-menu__sub inside its li): indented to the page names (past the icons), in the
   body font, no rules between them. The one being read is on lime (js/site.js initNow). */
.ds-menu__sub { list-style: none; margin: 0; padding: 0 0 .35rem; }
.ds-menu__list .ds-menu__sub a { padding: .4rem .9rem .4rem 2.65rem; border-top: 0; font-family: var(--ds-font-body); font-weight: 400; font-size: var(--ds-fs-body); letter-spacing: 0; }
.ds-menu__list a[aria-current="true"] { background: var(--ds-lime); }
/* From tablet up: the links sit in the bar, the current page underlined in coral. The list shows whatever its hidden
   attribute says (the button that toggles it is not shown). Not on Welcome (.site-nav--now): there the menu button stays at every width,
   since its menu also holds the sections of the page, under Welcome. */
@media (min-width: 768px) {
  .site-nav:not(.site-nav--now) .ds-menu { margin-right: 0; }
  .site-nav:not(.site-nav--now) .ds-menu__btn, .site-nav:not(.site-nav--now) .ds-menu__ico { display: none; }
  .site-nav:not(.site-nav--now) .ds-menu__list { position: static; display: flex !important; align-items: center; gap: 1.1rem; min-width: 0; padding: 0; background: none; border: 0; border-radius: 0; }
  .site-nav:not(.site-nav--now) .ds-menu__list .ds-ext { margin-left: .25em; }
  .site-nav:not(.site-nav--now) .ds-menu__list a { display: block; padding: .35rem 0; font-family: var(--ds-font-body); font-weight: 400; font-size: inherit; letter-spacing: 0; }
  .site-nav:not(.site-nav--now) .ds-menu__list li + li a { border-top: 0; }
  .site-nav:not(.site-nav--now) .ds-menu__list a:hover { background: none; text-decoration: underline; text-decoration-color: var(--ds-grid); text-underline-offset: .45em; }
  .site-nav:not(.site-nav--now) .ds-menu__list a[aria-current="page"] { box-shadow: none; text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; text-underline-offset: .45em; }
}

/* 5. Page header --------------------------------------------------------- */
.page-head { padding: calc(var(--nav-h, 4rem) + .5rem) 0 var(--ds-gap-block); }
.page-head h1 { margin: .5rem 0 0; }
.page-head .lead { margin-top: .5rem; }

/* Welcome opening text: one short summary in the body font and size. The photoblog link sits on lime. */
.ds-hero__text { margin: 0; }
.ds-hero__text a { padding: 0 .25em; background: var(--ds-lime); border-radius: 4px; color: var(--ds-forest); font-weight: 700; text-decoration: none; }
.ds-hero__text a:hover { background: var(--ds-coral); color: var(--ds-forest); }

/* 6. Buttons ------------------------------------------------------------- */
/* .ds-btn: the small outline button ("Show 20 more" under the list of the Research page). Pale lime on hover. */
.ds-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; font-family: inherit; font-size: var(--ds-fs-sm); font-weight: 700; line-height: 1.5; color: var(--ds-forest); background: transparent; border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-ctrl); cursor: pointer; }
.ds-btn:hover { background: var(--ds-lime-pale); }
.ds-btn:active { background: var(--ds-lime); }
.ds-btn:focus-visible { outline: none; box-shadow: var(--ds-focus); }

/* 7. Tags ---------------------------------------------------------------- */
.tag {
  display: inline-block;
  font-weight: 700;
  font-size: var(--ds-fs-xs);
  line-height: 1.2;
  padding: .35em .75em;
  border-radius: 999px;
  background: var(--ds-grid);
  color: var(--ds-forest);
  text-decoration: none;
}
.tag-mint { background: var(--ds-mint); }
.tag-lime { background: var(--ds-lime); }
button.tag { border: 1px solid transparent; cursor: pointer; }
button.tag[aria-pressed="true"] { background: var(--ds-forest); color: var(--ds-cream); }

/* 8. Publication list ---------------------------------------------------- */
.pub-list { list-style: none; padding: 0; margin: 0; }
/* The list reads like a database table: a sticky header row, a sand heading per year, then one light row per output:
   the title, then one line with the journal (and the type when it is not a journal article) and the theme tag at the right.
   Authors are in the paper pop-up (section 23). Thin rules between rows, pale lime on hover. Built by js/research.js:
   <ul class="pub-list"><li class="pub-yr"><span>2026</span><span>6 outputs</span></li>
     <li class="pub"><div class="pub-title"><a>..</a></div>
       <p class="pub-line"><span><i>journal</i> · type</span><span class="tag tag-mint">RSV</span></p>
       <p class="pub-also"><a class="pub-link">Became a paper</a></p></li></ul> */
/* overflow: clip keeps the rounded corners without breaking the sticky heading (older browsers fall back to hidden) */
.pub-table { border: 1px solid var(--ds-grid); border-radius: var(--ds-radius-card); overflow: hidden; overflow: clip; }
.pub-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .15rem .75rem;
  padding: .75rem .75rem .85rem;
  max-width: none;
}
/* Heading of the list: "33 outputs of 110", "Clear filters" and "Top". Sticky, as the second line of the page's sticky
   header: it stays right under the row of filter chips (section 14, .rf-stick), which itself stays under the nav bar.
   --stick-h is the height of the chips row, set by js/research.js (3.45rem until then). The heading overlaps the chips
   row by 1px, so no row can show between the two. Solid colour, so rows do not show through. */
.pub-head {
  position: sticky;
  top: calc(var(--nav-h, 3.3rem) + var(--stick-h, 3.45rem) - 1px);
  z-index: 2;
  padding-block: .4rem;
  background: var(--ds-head-bg);
  border-bottom: 1px solid var(--ds-forest);
  font-weight: 700;
  font-size: var(--ds-fs-sm);
  align-items: center;
}
.pub-head__actions { display: flex; align-items: center; gap: 1rem; }
.ds-up { width: .9em; height: .9em; margin-left: .25em; vertical-align: -.1em; }
.pub { max-width: none; padding: .5rem .75rem .55rem; border-top: 1px solid var(--ds-grid); }
.pub:first-child { border-top: 0; }
.pub:hover { background: var(--ds-lime-pale); }
.pub--empty { display: block; }
/* Year heading: the year at the left, how many outputs match in that year at the right */
.pub-yr { display: flex; align-items: baseline; justify-content: space-between; max-width: none; padding: .3rem .75rem; background: var(--ds-sand); border-top: 1px solid var(--ds-grid); font-family: var(--ds-font-head); font-weight: 700; font-variant-numeric: tabular-nums; }
.pub-yr:first-child { border-top: 0; }
.pub-yr span + span { font-family: var(--ds-font-body); font-size: var(--ds-fs-xs); color: var(--ds-muted); }
/* The line under the title: journal in italics (then the type), theme tag at the right */
.pub-line { display: flex; align-items: center; justify-content: space-between; gap: .6rem; max-width: none; margin: .25rem 0 0; font-size: var(--ds-fs-sm); line-height: 1.35; color: var(--ds-muted); }
.pub-line .tag { flex: none; }
.pub-also { max-width: none; margin: .25rem 0 0; line-height: 1.35; }
.pub-also .pub-link { margin-left: 0; }
/* The year of a row: only in the static list of research.html (section 14), which shows without JavaScript */
.pub-year { font-family: var(--ds-font-head); font-weight: 700; color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.pub-head > :last-child { justify-self: end; }
.pub-more { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border-top: 1px solid var(--ds-forest); background: var(--ds-head-bg); }
.pub-more[hidden] { display: none; }
.pub-title { font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-body); line-height: 1.25; letter-spacing: -0.01em; }
.pub-title a { text-decoration: none; }
/* No underline on hover: on phones the hover state sticks after a tap, so the title stayed underlined. The row's pale
   lime (.pub:hover) is the hover mark. Keyboard focus keeps the coral ring of every link. */
.pub-title a:hover { text-decoration: none; }
.pub-authors { font-size: var(--ds-fs-sm); color: var(--ds-muted); margin: .3rem 0 0; }
.pub-authors .me { color: var(--ds-forest); font-weight: 700; }
.pub-venue { font-size: var(--ds-fs-sm); font-style: italic; margin: .1rem 0 0; }

/* 10. Footer ------------------------------------------------------------- */
.site-footer {
  margin-top: var(--ds-gap-sec);
  padding: 1.25rem 0 1rem;
  background: var(--ds-cream);
  border-top: 1px solid var(--ds-grid);
  color: var(--ds-muted);
  font-size: inherit;
}
.site-footer a { color: var(--ds-forest); text-decoration: none; }
.site-footer .foot-copy { display: block; font-size: var(--ds-fs-sm); }
/* Contact footer (Welcome, Research, Data Stories): the footer's top edge is the one grey rule at the end of the page.
   It runs the full width of the screen and separates the page from the footer.
   <div class="foot-contact" id="contact"> holds the contact card (section 22), the first thing in the footer.
   "Views are my own" and the date line follow it, with no rule in between. */
.site-footer--cta { margin-top: 0; padding-top: 0; padding-bottom: .75rem; }
.site-footer .foot-contact { padding: var(--ds-gap-sec) 0 var(--ds-gap-block); }
/* Date line under "Views are my own" */
.site-footer .foot-date { display: block; margin-top: .15rem; font-size: var(--ds-fs-sm); }
/* "Top" (back to top), a small bold grey link (--ds-muted, AA on cream) with an up arrow, forest on hover. It sits at the
   right and always above a grey rule, never in the footer. Welcome has none (its menu goes back to the top).
   Research and Data Stories: p.ds-top.ds-top--end, the last thing on the page, with a section's space between it and
   the footer's rule. */
.ds-top { max-width: none; margin: var(--ds-gap-item) 0 0; text-align: right; font-size: var(--ds-fs-sm); }
.ds-top--end { margin-bottom: var(--ds-gap-sec); }
.ds-top a { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .4rem; font-weight: 700; color: var(--ds-muted); text-decoration: underline; text-underline-offset: .18em; }
.ds-top a:hover { color: var(--ds-forest); text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; }
.ds-top svg { width: 1em; height: 1em; }

/* 11. Motion preference -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* 12. Career path (Welcome) ---------------------------------------------- */
/* <ol class="ds-path"><li><span class="ds-path__phase">...</span></li></ol>
   One continuous 2px mint line from the first dot to the last. Each step: a hollow forest ring on the line, the phase in bold.
   The line is drawn per step (li::after), from its dot down to the next dot, so it starts and ends on a dot with no overhang.
   --x is the line's centre from the left of a step, --y the dot's centre from its top (half the 1.3 line height).
   The current step gets .is-now: a coral dot with a pale coral ring (a border, not a shadow). */
.ds-path { --x: 6px; --y: .65em; list-style: none; padding: 0; margin: 0; }
.ds-path li { position: relative; max-width: none; padding: 0 0 .8rem 1.35rem; }
.ds-path li:last-child { padding-bottom: 0; }
.ds-path li::after { content: ""; position: absolute; left: calc(var(--x) - 1px); top: var(--y); bottom: calc(-1 * var(--y)); width: 2px; background: var(--ds-mint-dark); }
.ds-path li:last-child::after { content: none; }
.ds-path li::before { content: ""; position: absolute; z-index: 1; left: calc(var(--x) - 6px); top: calc(var(--y) - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--ds-cream); border: 2px solid var(--ds-forest); }
.ds-path__phase { display: block; font-weight: 700; line-height: 1.3; }

/* Group: a phase with sub-steps (Sanofi Vaccines). The sub-steps sit on the same line, with small solid mint dots and
   regular weight text, lined up with the phases above. The group's own segment runs from its dot to the first sub-step's
   dot: the phase line (1.3em) plus the gap above the sub-list (.4rem).
   <li class="ds-path__group"><span class="ds-path__phase">..</span><ol class="ds-path ds-path--sub">..</ol></li> */
.ds-path > li.ds-path__group { padding-bottom: 0; }
.ds-path > li.ds-path__group::after { content: ""; bottom: auto; height: calc(1.3em + .4rem); }
.ds-path .ds-path--sub { margin: .4rem 0 0 -1.35rem; padding: 0; }
.ds-path .ds-path--sub li { padding-bottom: .45rem; }
.ds-path .ds-path--sub li:last-child { padding-bottom: 0; }
.ds-path .ds-path--sub .ds-path__phase { font-weight: 400; }
.ds-path .ds-path--sub li::before { left: calc(var(--x) - 4px); top: calc(var(--y) - 4px); width: 8px; height: 8px; background: var(--ds-mint-dark); border: 0; }
.ds-path li.is-now::before { left: calc(var(--x) - 8px); top: calc(var(--y) - 8px); width: 16px; height: 16px; background: var(--ds-coral); background-clip: padding-box; border: 4px solid rgba(255, 128, 101, .3); }

/* About me: the opening line, then the path right under it on a pale mint card (.ds-path--card, --ds-mint-soft), the colour block of the section
   (the two ideas further down sit on pale lime). On the pale mint the line and the small sub-step dots are forest; the phase dots keep
   their cream fill, so they read as hollow rings. The current step (.is-now) is marked by its coral dot alone: its name is
   set like the other sub-steps, no bold and no highlight. */
.ds-about p { margin-bottom: .75rem; }
.ds-about > p:last-child { margin-bottom: 0; }
.ds-about + .ds-path { margin-top: var(--ds-gap-item); }
.ds-path.ds-path--card { padding: .7rem .75rem .75rem; background: var(--ds-mint-soft); border-radius: var(--ds-radius-ctrl); }
.ds-path--card li::after { background: var(--ds-forest); }
.ds-path--card .ds-path--sub li:not(.is-now)::before { background: var(--ds-forest); }
/* About me has no "How I lead" heading: the line that opens it (after the path) and the teaching line (after the two
   ideas) are set apart by space alone. */
.ds-path + .ds-sec__intro { margin-top: var(--ds-gap-block); }
.ds-themes + .ds-sec__intro { margin-top: var(--ds-gap-block); }
/* Headings inside Welcome's Science section, "My favorite papers" and "My last three publications" (h3 size) */
.ds-sub { margin: var(--ds-gap-sec) 0 var(--ds-gap-item); scroll-margin-top: calc(var(--nav-h, 3.1rem) + 3.55rem); }
/* Right under a section's intro line ("My favorite papers"), the heading keeps only the intro's own space above it */
.ds-sec__intro + .ds-sub { margin-top: 0; }

/* 13. Latest stories (Welcome) ------------------------------------------- */
/* <ul class="ds-swipe" id="latest-stories">, cards filled by js/site.js. Five cards, newest first:
   <li><a class="ds-card"><span class="ds-pic"><img></span><span class="ds-card__title">..</span>
     <time class="ds-post__meta">10 days ago</time></a></li>
   then <div class="ds-dots" id="latest-dots"><button aria-current="true"></button>..</div>
   A native sideways scroller with snap: one chart per card, large enough to read, the next card peeks in.
   The chart square is .ds-pic (section 15): the story's first chart, whole; a mint square with a chart icon without one.
   Phones: a card takes 82% of the width and the row runs to the screen edges. Tablet: two cards and a peek.
   From 768px: three cards and a peek, the row stays inside the column.
   Dots, like the career path: a hollow forest ring, coral for where the row stands. One per place the row can stop at
   (one per card on phones, fewer where several cards fit). A tap on a dot scrolls there.
   Loaded when the section comes near the screen. A tap on a card opens the story in the pop-up (below). */
/* position: relative: a card may hold text for screen readers only (.visually-hidden, which is position: absolute).
   Without it that text is placed against the page, not the row, and a card waiting off screen makes the whole page
   wider than the screen, so the page itself slides sideways. */
.ds-swipe { position: relative; display: flex; gap: .6rem; list-style: none; margin: 0 -.75rem; padding: 0 .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: .75rem; overscroll-behavior-x: contain; scrollbar-width: none; }
.ds-swipe::-webkit-scrollbar { display: none; }
.ds-swipe > li { flex: 0 0 82%; min-width: 0; max-width: none; scroll-snap-align: start; }
.ds-swipe > li.ds-small { flex-basis: 100%; }
/* The row is focusable so a keyboard can scroll it; no coral ring round the whole row (it showed after a pop-up closed) */
.ds-swipe:focus, .ds-swipe:focus-visible { outline: none; box-shadow: none; }
/* The card holds its chart, its title and, under the title, its age together on one sand surface (like the selected papers): a little
   padding all round, 12px corners, the chart inside with 8px corners. Cards of one row share the same height. */
.ds-card { display: block; height: 100%; padding: .5rem .5rem .65rem; background: var(--ds-sand); border-radius: var(--ds-radius-card); color: var(--ds-forest); text-decoration: none; }
/* No underline on hover: on phones the hover state sticks after a tap, so the title stayed underlined in coral */
.ds-card:hover { color: var(--ds-forest); }
.ds-card .ds-pic { display: block; margin-bottom: .5rem; border-radius: var(--ds-radius-ctrl); }
.ds-card .ds-pic img { background: var(--ds-cream); }
.ds-card .ds-post__meta { display: block; margin: .2rem 0 0; padding-inline: .15rem; }
.ds-card__title { display: block; padding-inline: .15rem; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); line-height: 1.25; letter-spacing: -0.01em; }
.ds-dots { display: flex; justify-content: center; margin-top: .35rem; }
.ds-dots button { display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; background: none; border: 0; cursor: pointer; }
.ds-dots button::before { content: ""; width: 9px; height: 9px; border: 1px solid var(--ds-forest); border-radius: 50%; }
.ds-dots button[aria-current="true"]::before { background: var(--ds-coral); border-color: var(--ds-coral); }
@media (min-width: 576px) { .ds-swipe > li { flex-basis: 46%; } }
@media (min-width: 768px) {
  .ds-swipe { margin: 0; padding: 0; scroll-padding-inline: 0; }
  .ds-swipe > li { flex-basis: 31%; }
}

/* Story pop-up (Welcome and Data Stories): a native <dialog class="ds-story"> opened with showModal() by js/site.js
   or js/datastories.js.
   <dialog class="ds-story"><div class="ds-story__bar"><span class="ds-story__date">date</span><button class="ds-story__close">x</button></div>
     <div class="ds-story__body">header.ds-post__head (h2.ds-post__title), p.ds-post__lead, figure.ds-post__fig, div.ds-post__body, p.ds-post__go</div></dialog>
   The parts of the story are the .ds-post__ rules of section 15. Flat: cream box with a forest edge on a dimmed page,
   no shadow. Every pop-up (story, paper) is at most 85% of the screen height. It scrolls inside itself; the bar
   with the close button stays at its top. The page behind does not scroll. */
.ds-story { width: min(100% - 1rem, 40rem); max-width: none; max-height: 85vh; max-height: 85dvh; margin: auto; padding: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--ds-cream); color: var(--ds-forest); border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-card); }
.ds-story::backdrop { background: rgba(24, 63, 59, .55); }
html:has(.ds-story[open]) { overflow: hidden; }
.ds-story__bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: .3rem .3rem 0; background: var(--ds-cream); }
/* Close: only the cross is coral (--ds-coral-text, the AA coral for small marks), no box behind it. Forest on hover.
   The tap area stays 2.5rem square. */
.ds-story__close { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; background: none; border: 0; border-radius: var(--ds-radius-ctrl); color: var(--ds-coral-text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ds-story__close svg { width: 24px; height: 24px; }
.ds-story__close:focus, .ds-story__close:focus-visible, .ds-story__close:active { outline: none; box-shadow: none; }
@media (hover: hover) { .ds-story__close:hover { color: var(--ds-forest); } }
.ds-story__body { padding: 0 .9rem 1rem; }
.ds-story__body:focus { outline: none; }
/* A story or a paper (a pop-up that holds a title head, .ds-post__head): the bar is grey (solid sand, --ds-sand-solid), with the date
   and the source ("LinkedIn", "Interview"), or the paper's year, at its left in small coral capitals (--ds-coral-deep: 4.9:1 on it)
   and a forest close cross (coral on hover). That line stays in view while the pop-up scrolls.
   The title under it sits on cream (section 15). */
.ds-story:has(.ds-post__head) .ds-story__bar { align-items: center; justify-content: space-between; padding-left: .9rem; background: var(--ds-sand-solid); }
.ds-story__date { font-size: var(--ds-fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; color: var(--ds-coral-deep); }
.ds-story:has(.ds-post__head) .ds-story__close { color: var(--ds-forest); }
@media (hover: hover) { .ds-story:has(.ds-post__head) .ds-story__close:hover { color: var(--ds-coral-text); } }
/* No coral focus ring on the pop-up box or anything inside it that is not a link or button (a tap on a chart or the
   text could put one round the whole box). Links and buttons inside keep theirs for keyboard use. */
.ds-story:focus, .ds-story:focus-visible, .ds-story :not(a, button):focus, .ds-story :not(a, button):focus-visible { outline: none; box-shadow: none; }
/* Story and paper cards on Welcome: focus comes back to the card when its pop-up closes, so no ring round the card.
   Keyboard focus shows as a coral underline on the title (keyboard only; a tap or hover shows none). */
.ds-card:focus, .ds-card:focus-visible { outline: none; box-shadow: none; }
.ds-card:focus-visible .ds-card__title { text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; }

/* 14. Research page ------------------------------------------------------ */
/* One filterable list. Filters can be set from the URL: research.html?theme=RSV%20burden
   Welcome's Science section shows no filters, only the 5 latest publications as a carousel (below). */
/* Header: only the title and the dotline, so nothing extra under the line */
.page-head .dotline:last-child { margin-bottom: 0; }

/* Static list: research.html holds the whole list as plain HTML (tools/build.py), for search engines and for
   visitors without JavaScript, each row with its year, title, authors, journal and tags. While js/research.js loads
   (html.js), only its first 20 rows show, as title and journal, like the rows of the live list that replaces them.
   Without JavaScript the filters are hidden, since they cannot work. */
.js .pub-list--static > .pub:nth-child(n+21) { display: none; }
.js .pub-list--static .pub-year, .js .pub-list--static .pub-authors, .js .pub-list--static .pub-meta { display: none; }
.js .pub-list--static .pub-venue { margin-top: .25rem; color: var(--ds-muted); }
html:not(.js) .rf { display: none; }

/* Small text button: "Clear filters" */
.ds-more { background: none; border: 0; padding: 0; font-weight: 700; font-size: var(--ds-fs-sm); color: var(--ds-forest); text-decoration: underline; text-underline-offset: .18em; white-space: nowrap; }
.ds-more:hover { color: var(--ds-mint-dark); text-decoration-thickness: 2px; }

/* Filters: one line of chips ("All", then Selected, type, theme, topic, my part), then the years histogram with a two-handle slider.
   Labels sit on top on phones and to the left from tablet up. */
.rf { margin-bottom: var(--ds-gap-block); }
.rf-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; padding: .5rem 0; }
.rf-row[hidden] { display: none; }
.rf-label { font-weight: 700; font-size: var(--ds-fs-sm); }
@media (min-width: 576px) {
  .rf-row { grid-template-columns: 3.75rem minmax(0, 1fr); gap: .75rem; }
  .rf-label { padding-top: .5rem; }
}

/* Chips: "All" plus one per value. One chip is on at a time (js/research.js). Pressed = lime with a forest edge. */
.rf-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rf-chips button.tag { min-height: 2rem; padding-inline: .9em; font-size: var(--ds-fs-xs); border: 1px solid transparent; cursor: pointer; }
.rf-chips button.tag:hover { border-color: var(--ds-forest); }
/* Filter chips are buttons, so they share the 8px corners of the other buttons (the tags in the rows stay pills) */
.rf-chips button.tag { border-radius: var(--ds-radius-ctrl); }
/* Groups: type, theme, topic, my part. More space between groups, no divider line. "All" is set apart: an outline button
   (forest edge, no grey fill) that turns solid forest when it is the one pressed. */
.rf-chips { column-gap: .9rem; row-gap: .4rem; align-items: center; }
.rf-group { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
@media (max-width: 575.98px) {
  .rf-label--hide-sm { display: none; }
  .rf-chips { column-gap: .6rem; }
  .rf-group { gap: .25rem; }
  .rf-chips button.tag { padding-inline: .6em; }
}
.rf-chips button.tag[aria-pressed="true"] { background: var(--ds-lime); border-color: var(--ds-forest); color: var(--ds-forest); }
.rf-chips button.tag-all { background: transparent; border-color: var(--ds-forest); }
.rf-chips button.tag-all[aria-pressed="true"] { background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-cream); }
/* Science page: the chips sit on one line (.rf-chips--line, set by js/research.js). "All" stays at the left and does not
   move; the other chips are in .rf-scroll, which swipes sideways and runs to the right edge of the screen on phones.
   Each chip shows how many outputs it holds (.rf-n).
   <div class="rf-chips rf-chips--line"><button class="tag tag-all">All <span class="rf-n">110</span></button>
     <div class="rf-scroll"><span class="rf-group"><button class="tag">Selected <span class="rf-n">5</span></button></span>..</div></div>
   The 3px padding of .rf-scroll leaves room for the focus ring, which a scrolling box would cut off. */
.rf-chips--line { flex-wrap: nowrap; column-gap: .4rem; }
.rf-chips--line > button.tag { flex: none; }
.rf-scroll { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .6rem; margin-right: -.75rem; padding: 3px .75rem 3px 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.rf-scroll::-webkit-scrollbar { display: none; }
.rf-scroll .rf-group { flex: none; flex-wrap: nowrap; }
.rf-chips button.tag { white-space: nowrap; }
.rf-n { margin-left: .4em; font-weight: 400; }
@media (min-width: 576px) { .rf-scroll { gap: .9rem; margin-right: 0; padding-right: 3px; } }
/* Science page: the sticky header of the list has two lines: the chips, then the heading of the list ("110 outputs",
   section 8, .pub-head) right under them. The chips sit in a box of their own (div.rf.rf-stick) between the
   years histogram and the list, and stay right under the nav bar while the list scrolls: solid cream, so rows do not
   show through, with the grey line under it, both out to the edges of the column's padding (the screen edges on phones).
   The years box before it gives up its bottom space, so the two filters stay close.
   A tap on a chip while the list is scrolled brings the top of the list back under the chips (js/research.js).
   A row reached by a jump (#pub-id) stops below the chips and the list's heading, not under them. */
.rf-stick { position: sticky; top: var(--nav-h, 3.3rem); z-index: 3; margin: 0 -.75rem var(--ds-gap-item); padding: 0 .75rem; background: var(--ds-cream); border-bottom: 1px solid var(--ds-grid); }
.rf:has(+ .rf-stick) { margin-bottom: 0; }
.pub-list .pub { scroll-margin-top: 6rem; }
/* Welcome (My latest publications): the 5 newest publications as open cards in the sideways row of section 13
   (ul.ds-swipe.pub-cards, built by js/research.js). Each card is one link on sand (--ds-sand), no edge: the
   month and year as a small coral label in capitals (--ds-coral-deep, the one colour on the card), the title (four lines at most), the summary (five lines at most),
   then the journal in bold and "First author et al." under it in muted text. Cards of one row share the same height; the foot sits at the bottom.
   Phones: a card takes 88% of the width, the next one peeks in. Tablet: 60%. From 768px: two cards and a peek.
   Under the row (.ds-dots, section 13): the same dots as the story row, hollow rings, coral for where the row stands.
   A tap on a card opens the paper pop-up (section 23), which holds all authors, tags and Read the paper.
   <div id="db-list"><ul class="ds-swipe pub-cards"><li><a class="pub-card" data-pub="..">
       <time class="pub-card__date">Aug 2026</time><span class="pub-card__title">..</span><span class="pub-card__sum">..</span>
       <span class="pub-card__foot"><b>journal</b>Carter et al.</span></a></li></ul>
     <div class="ds-dots"><button aria-current="true"></button>..</div></div> */
.pub-cards > li { flex-basis: 88%; }
@media (min-width: 576px) { .pub-cards > li { flex-basis: 60%; } }
@media (min-width: 768px) { .pub-cards > li { flex-basis: 47%; } }
.pub-card { display: flex; flex-direction: column; height: 100%; padding: .7rem .8rem .75rem; background: var(--ds-sand); border-radius: var(--ds-radius-card); color: var(--ds-forest); text-decoration: none; }
/* Quiet: no underline, no colour change. A touch deeper sand on hover only where a mouse can hover (on phones it stuck after a tap).
   Keyboard focus shows as a coral underline on the title, no ring round the card. */
.pub-card:hover { color: var(--ds-forest); }
@media (hover: hover) { .pub-card:hover { background: var(--ds-grid); } }
.pub-card:focus, .pub-card:focus-visible { outline: none; box-shadow: none; }
.pub-card:focus-visible .pub-card__title { text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; }
.pub-card__date { display: block; margin-bottom: .35rem; font-size: var(--ds-fs-xs); font-weight: 700; line-height: 1.35; letter-spacing: .03em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--ds-coral-deep); }
.pub-card__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); line-height: 1.25; letter-spacing: -0.01em; }
.pub-card__sum { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; margin-top: .45rem; font-size: var(--ds-fs-sm); line-height: 1.45; }
.pub-card__foot { display: block; margin-top: auto; padding-top: .6rem; font-size: var(--ds-fs-sm); line-height: 1.35; color: var(--ds-muted); }
.pub-card__foot b { display: block; font-weight: 700; color: var(--ds-forest); }

/* Years: bars (one per year, grey outside the chosen range) and the slider under them.
   --n is the number of years (set by js/research.js). The slider is inset by half a bar plus half a handle,
   so each handle sits on the centre of its year. */
.rf-plot { --n: 20; max-width: 40rem; }
.rf-bars { display: flex; align-items: flex-end; height: 3rem; border-bottom: 1px solid var(--ds-grid); }
.rf-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; padding-inline: 1px; }
.rf-bar__fill { display: block; width: 100%; background: var(--ds-forest); border-radius: 2px 2px 0 0; }
.rf-bar.is-out .rf-bar__fill { background: var(--ds-grid); }
.rf-range { position: relative; height: 24px; margin-inline: calc(50% / var(--n) - 9px); }
.rf-range__track { position: absolute; left: 9px; right: 9px; top: 50%; height: 3px; transform: translateY(-50%); border-radius: 2px; background: var(--ds-grid); }
.rf-range__fill { position: absolute; top: 0; bottom: 0; background: var(--ds-coral); border-radius: 2px; }
.rf-range input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: transparent; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.rf-range input[type="range"]:focus-visible { box-shadow: none; }
.rf-range input[type="range"]::-webkit-slider-runnable-track { height: 24px; background: transparent; border: 0; }
.rf-range input[type="range"]::-moz-range-track { height: 24px; background: transparent; border: 0; }
.rf-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; box-sizing: border-box; width: 18px; height: 18px; margin-top: 3px;
  border: 2px solid var(--ds-cream); border-radius: 50%; background: var(--ds-forest);
  pointer-events: auto; cursor: grab;
}
.rf-range input[type="range"]::-moz-range-thumb {
  box-sizing: border-box; width: 18px; height: 18px;
  border: 2px solid var(--ds-cream); border-radius: 50%; background: var(--ds-forest);
  pointer-events: auto; cursor: grab;
}
.rf-range input[type="range"]:hover::-webkit-slider-thumb { background: var(--ds-coral); }
.rf-range input[type="range"]:hover::-moz-range-thumb { background: var(--ds-coral); }
.rf-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--ds-focus); }
.rf-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: var(--ds-focus); }
.rf-yrs { display: flex; justify-content: space-between; font-size: var(--ds-fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Publication extras */
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.pub .pub-meta .tag { margin: 0; }
.pub-link { font-size: var(--ds-fs-xs); font-weight: 700; margin-left: .25rem; }
.pub:target, .pub:focus { outline: none; box-shadow: inset 3px 0 0 var(--ds-coral); }
/* Research page: each row opens the paper pop-up (section 23), as on Welcome. The title link is stretched over the row;
   the "Became a paper" link sits above it and keeps its own jump. */
.pub-list--pop .pub { position: relative; cursor: pointer; }
.pub-list--pop .pub-title a::after { content: ""; position: absolute; inset: 0; }
.pub-list--pop .pub-link { position: relative; z-index: 1; }

/* 15. Data Stories page -------------------------------------------------- */
/* Two parts in the reading column (.ds-narrow), built by js/datastories.js:
   1. Series shelves: for each series (SERIES in js/datastories.js), a heading with its number of stories, then a sideways
      row of chart cards, newest first (the cards and row of Welcome, section 13, a size smaller so more of a series shows).
      Articles and interviews have no shelf: they are in the list.
      <h2 class="ds-shelf__head">Weekly ECDC update <span>2 stories</span></h2>
      <ul class="ds-swipe ds-shelf"><li><a class="ds-card"><span class="ds-pic"><img></span><span class="ds-card__title">..</span>
        <span class="ds-post__meta">20 Nov 2026</span></a></li></ul>
   2. All stories: the heading, then the topic chips and one list, newest first:
      <h2 class="ds-shelf__head ds-all">All stories</h2>
      <div class="rf-chips ds-topics"><button class="tag tag-all">All</button><button class="tag">Influenza 7</button>..</div>
      <ul class="ds-rows"><li><a class="ds-row"><span class="ds-pic"><img></span>
        <span><span class="ds-post__meta">date, kind, topics</span><span class="ds-row__title">..</span></span></a></li></ul>
   The chips are the filter chips of the Science page (section 14): "All" stays at the left, the rest sit in .rf-scroll and
   swipe sideways, each with its count (.rf-n); the row sticks under the nav bar. A pressed topic chip is lime. No count line
   over the list. Rows and cards without a chart (articles, interviews) carry .ds-pic--text: a sand square with a page icon.
   A tap on a card or row opens the story pop-up (section 13); the parts inside it are the .ds-post__ rules below: the title
   in forest with a thin coral line under it, the summary as an opening line, the charts, the text, then an outline button
   to the original. */
.ds-shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: var(--ds-gap-block) 0 .5rem; font-size: var(--ds-fs-h4); line-height: 1.2; }
.ds-feed > .ds-shelf__head:first-child { margin-top: 0; }
.ds-shelf__head span { flex: none; font-family: var(--ds-font-body); font-size: var(--ds-fs-xs); font-weight: 700; letter-spacing: 0; color: var(--ds-muted); }
.ds-shelf > li { flex-basis: 44%; }
@media (min-width: 576px) { .ds-shelf > li { flex-basis: 30%; } }
@media (min-width: 768px) { .ds-shelf > li { flex-basis: 23%; } }
/* The date sits at the foot of each card, so the dates of one row line up whatever the length of the titles */
.ds-shelf .ds-card { display: flex; flex-direction: column; }
.ds-shelf .ds-card .ds-post__meta { margin-top: auto; padding-top: .2rem; }
.ds-shelf .ds-card__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; font-size: var(--ds-fs-sm); line-height: 1.3; }
.ds-shelf__head.ds-all { margin-top: var(--ds-gap-sec); scroll-margin-top: var(--nav-h, 3.3rem); }
.ds-topics { position: sticky; top: var(--nav-h, 3.3rem); z-index: 2; flex-wrap: nowrap; margin: 0 -.75rem; padding: .5rem .75rem; background: var(--ds-cream); border-bottom: 1px solid var(--ds-grid); }
.ds-topics button.tag { flex: none; white-space: nowrap; }
.ds-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ds-grid); }
.ds-topics + .ds-rows { border-top: 0; }
.ds-rows > li { max-width: none; border-bottom: 1px solid var(--ds-grid); }
.ds-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .6rem 0; color: var(--ds-forest); text-decoration: none; }
.ds-row:hover { color: var(--ds-forest); }
.ds-row .ds-pic { display: block; border-radius: var(--ds-radius-ctrl); background-size: 1.5rem; }
.ds-row .ds-pic img { background: var(--ds-cream); }
.ds-row .ds-pic--text, .ds-card .ds-pic--text { background-color: var(--ds-sand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C6460' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6zM9 12h7M9 16h7M9 8h3'/%3E%3C/svg%3E"); }
.ds-row .ds-post__meta { display: block; margin: 0 0 .1rem; }
.ds-row__title { display: block; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); line-height: 1.25; letter-spacing: -0.01em; }
.ds-row:hover .ds-row__title, .ds-row:focus-visible .ds-row__title { text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; }
.ds-row:focus, .ds-row:focus-visible { outline: none; box-shadow: none; }

.ds-post__meta { margin: 0 0 .25rem; font-size: var(--ds-fs-sm); line-height: 1.35; color: var(--ds-muted); }
.ds-post__title { margin: 0 0 .75rem; font-size: var(--ds-fs-h3); line-height: 1.15; }
/* Head of a story or paper in the pop-up: under the grey bar, only the title, in forest on cream, with a thin coral line under it */
.ds-post__head { margin: 0 0 .9rem; padding: .8rem 0 0; }
.ds-post__head .ds-post__title { margin: 0; }
.ds-post__head::after { content: ""; display: block; height: 1px; margin-top: .75rem; background: var(--ds-coral); }
/* The summary, as the opening line of the story */
.ds-post__lead { margin: 0 0 .9rem; font-family: var(--ds-font-head); font-weight: 500; font-size: var(--ds-fs-lg); line-height: 1.35; }
.ds-post__title a { text-decoration: none; }
.ds-post__title a:hover { color: var(--ds-forest); text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; text-underline-offset: .15em; }

/* Pictures: one square up to 30rem wide, or a 2-column grid when there are several.
   Each square is a mint placeholder with a chart icon and the file name; the image covers it once it loads. */
.ds-post__fig { display: grid; gap: .5rem; max-width: 30rem; margin: 0 0 1rem; }
.ds-post__fig--multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-pic { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--ds-grid); border-radius: var(--ds-radius-card); background: rgba(169, 216, 206, .4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23377A6C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 20V11M12 20V5M19 20v-7'/%3E%3C/svg%3E") center / 2.5rem no-repeat; }
.ds-post__fig--multi .ds-pic { background-size: 1.75rem; }
.ds-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }

.ds-post__body p { margin-bottom: .6rem; }
.ds-post__body > p:last-child { margin-bottom: 0; }
.ds-post__body a { overflow-wrap: anywhere; }
/* "Read on LinkedIn" / "Read the original" / "Read the paper": an outline button across the box (forest edge), lime on hover */
.ds-post__go { max-width: none; margin: var(--ds-gap-block) 0 0; }
.ds-post__go a { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .45rem 1rem; border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-ctrl); color: var(--ds-forest); font-weight: 700; text-decoration: none; }
.ds-post__go a:hover { background: var(--ds-lime); color: var(--ds-forest); }
.ds-post__go .ds-ext { margin-left: 0; opacity: 1; }
.ds-ext { width: .7em; height: .7em; margin-left: .25em; opacity: .6; vertical-align: .05em; }

/* 16. Ideas (Welcome: the two ideas in About me) -------------------------- */
/* <ul class="ds-themes"><li class="ds-theme"><h4 class="ds-theme__name">..</h4><p>..</p></li></ul>
   One pale lime box (--ds-lime-pale) holds both ideas: each has its title in bold and its text under it, with a little
   space between the two. No numbers. Pale lime sets it apart from the pale mint career path card above it. */
.ds-themes { display: grid; gap: .8rem; grid-template-columns: 1fr; list-style: none; margin: 0; padding: .65rem .75rem .7rem; background: var(--ds-lime-pale); border-radius: var(--ds-radius-ctrl); }
.ds-theme { max-width: none; }
.ds-theme__name { font-size: var(--ds-fs-lg); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .3rem; }
.ds-theme p { margin: 0; font-size: inherit; line-height: 1.5; }

/* 17. Welcome layout: opening, the top bar, sections ----------------------- */
/* One column at every width, one scrolling page. .ds-narrow keeps the column to a readable width on large screens.
   <body class="ds-nobs ds-onebar">
   <nav class="navbar site-nav site-nav--now"><div class="container ds-narrow"><div class="ds-menu">..</div></div></nav>
   <div class="ds-home">
     <section class="ds-hero"><div class="ds-now__brand"><a class="navbar-brand">mathi.eu</a></div>photo and name, role, short text</section>
     <section class="ds-sec" id="about"><h2 class="ds-sec__title">..</h2>..</section> (about, research, stories, photos)
   </div>
   The top bar is plain CSS: nothing is moved by script while the page scrolls.
   Every section starts with a bar of its own: the brand (.ds-now__brand) opens the page, each section's heading
   (h2.ds-sec__title) opens its section. A bar is a solid box as high as the top bar (3.5rem): cream, with the grey line
   (--ds-rule) on its bottom edge, both running the full width of the screen (drawn by ::before as a 100vw box centred
   on the bar; the page clips what sticks out). Bars are sticky: a bar stays at the top of the screen while its section
   is being read. A sticky bar cannot leave its section, and the next section starts right at its own bar, so when the
   next bar arrives it pushes the whole bar before it, line included, up and out, and takes its place.
   For that, a section's box ends exactly where the next bar starts: the space under its content is a block inside the
   section (::after), not padding, and a section has no space above its bar.
   The menu button (nav.site-nav--now) is sticky too and sits over the bars at the right. The nav lets taps through
   everywhere but on the menu. Under everything, a plain cream strip (body.ds-onebar::before) keeps the button on cream
   in the rare case no bar is at the top (the end of the page on a very low screen).
   The one menu of the page is the button at the right (section 4): it lists all the pages, with the sections of this page
   as sub-items under Welcome, the one being read on lime (js/site.js initNow marks it when the menu opens).
   The grey lines of this page are the lines under the bars. The last rule, between the page and the footer, is the
   footer's top edge (section 10). */
body:has(.ds-home) { overflow-x: clip; }
.container.ds-narrow { max-width: 48rem; }
.ds-home { --nav-h: 0px; --now-h: 3.5rem; position: relative; }
/* The opening ends where the bar of About me starts (its bottom space is a block inside it), so the brand's bar is pushed out there */
.ds-hero { scroll-margin-top: 5rem; } /* the brand and "Welcome" in the menu (#welcome) go to the very top */
.ds-hero::after { content: ""; display: block; height: 1.25rem; }
.ds-now__brand + .ds-hello { margin-top: .75rem; }
/* Welcome: a jump to a section lands with its bar at the top of the screen, so no page-wide scroll-padding here */
html:has(.ds-home) { scroll-behavior: smooth; scroll-padding-top: 0; }

/* The cream strip under the bars, and the menu button over them. The negative margins give their height back, so the
   page starts at the very top. */
.ds-onebar::before { content: ""; position: sticky; top: 0; z-index: 1020; flex: none; height: 3.5rem; margin-bottom: -3.5rem; background: var(--ds-cream); }
.site-nav--now { position: sticky; top: 0; z-index: 1040; height: 3.5rem; margin-bottom: -3.5rem; padding: 0; background: none; border: 0; pointer-events: none; }
.site-nav--now > .container { height: 100%; }
.site-nav--now .ds-menu { margin-left: auto; pointer-events: auto; }
/* The bars: the brand and the section headings */
.ds-now__brand, .ds-sec__title { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; height: var(--now-h); white-space: nowrap; }
.ds-now__brand::before, .ds-sec__title::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--ds-cream); border-bottom: var(--ds-rule); }
.ds-now__brand .navbar-brand { margin-right: 0; }

.ds-sec { position: relative; }
.ds-sec::after { content: ""; display: block; height: var(--ds-gap-sec); }
.ds-sec__title { margin: 0 0 .75rem; }
.ds-sec__intro { margin: 0 0 var(--ds-gap-block); }
/* "All publications", "All stories", "All pictures": a centred outline button with an arrow at the end of the section, lime on hover */
.ds-sec__more { margin: 1.5rem 0 0; max-width: none; text-align: center; }
.ds-sec__more a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem 1rem; border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-ctrl); font-weight: 700; text-decoration: none; }
.ds-sec__more a:hover { background: var(--ds-lime); color: var(--ds-forest); }
.ds-sec__more svg { width: 1em; height: 1em; }

/* 18. Latest pictures (Welcome) ------------------------------------------ */
/* <ul class="ds-swipe ds-pics" aria-label="Latest pictures, scroll sideways"> the sideways row of section 13, one sand card per picture:
     <li><a class="ds-shot" href=".."><img src=".." alt=".."></a></li>, the photo cropped square inside the card, then <div class="ds-dots" id="pics-dots">.
   index.html carries the three chosen photos (img/pics/); js/site.js swaps in the photoblog's three newest when it can reach it
   and builds the dots (same dots as Data Stories). A tap on a card opens the photoblog's front page, in the same window. */
.ds-shot { display: block; height: 100%; padding: .5rem; background: var(--ds-sand); border-radius: var(--ds-radius-card); }
.ds-shot img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--ds-radius-ctrl); background: var(--ds-cream); }
.ds-shot:focus, .ds-shot:focus-visible { outline: none; box-shadow: none; }
.ds-shot:focus-visible img { outline: 2px solid var(--ds-coral); outline-offset: 2px; }

/* 19. Page reset and layout helpers -------------------------------------- */
/* Every page has <body class="ds-nobs"> (the site loads no Bootstrap). This is the page reset and the few helpers the
   pages use: container (with its widths per screen size), fixed-top, visually-hidden, text-center, mb-0, mb-2.
   Element rules sit in :where(), so they stay weak and every component rule above still wins. */
:where(.ds-nobs), :where(.ds-nobs) *, :where(.ds-nobs) *::before, :where(.ds-nobs) *::after { box-sizing: border-box; }
body.ds-nobs { margin: 0; font-weight: 400; line-height: 1.55; color: var(--ds-forest); background-color: var(--ds-cream); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
:where(.ds-nobs) :where(h1, h2, h3, h4, h5, h6, p) { margin-top: 0; }
:where(.ds-nobs) p { margin-bottom: 1rem; }
:where(.ds-nobs) :where(ol, ul) { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
:where(.ds-nobs) :where(ol ol, ul ul, ol ul, ul ol) { margin-bottom: 0; }
:where(.ds-nobs) button { margin: 0; border-radius: 0; font-family: inherit; font-size: inherit; line-height: inherit; text-transform: none; }
:where(.ds-nobs) :where(img, svg) { vertical-align: middle; }
:where(.ds-nobs) [hidden] { display: none !important; }
:where(.ds-nobs) .container { width: 100%; margin-inline: auto; padding-inline: .75rem; }
@media (min-width: 576px) { :where(.ds-nobs) .container { max-width: 540px; } }
@media (min-width: 768px) { :where(.ds-nobs) .container { max-width: 720px; } }
@media (min-width: 992px) { :where(.ds-nobs) .container { max-width: 960px; } }
@media (min-width: 1200px) { :where(.ds-nobs) .container { max-width: 1140px; } }
@media (min-width: 1400px) { :where(.ds-nobs) .container { max-width: 1320px; } }
:where(.ds-nobs) button:not(:disabled) { cursor: pointer; }
:where(.ds-nobs) figure { margin: 0 0 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
:where(.ds-nobs) .fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
:where(.ds-nobs) .navbar > .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
:where(.ds-nobs) .navbar-brand { margin-right: 1rem; text-decoration: none; white-space: nowrap; }
.ds-nobs .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.ds-nobs .text-center { text-align: center !important; }
.ds-nobs .mb-0 { margin-bottom: 0 !important; }
.ds-nobs .mb-2 { margin-bottom: .5rem !important; }

/* 20. Welcome opening: photo, name, role ----------------------------- */
/* <div class="ds-hello"><img class="ds-photo" src="img/mathieu.jpg" ..><div><h1 class="ds-hello__name">..</h1><span class="dotline"></span></div></div>
   <p class="ds-hello__role">..</p>
   The name leads the page at h1 size, with the dotline (the site's signature) under it. The photo is a rounded square
   (12px, like the cards). */
.ds-hello { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.ds-photo { flex: none; display: block; width: 6rem; height: 6rem; border-radius: var(--ds-radius-card); object-fit: cover; }
@media (min-width: 576px) { .ds-photo { width: 7.5rem; height: 7.5rem; } }
.ds-hello__name { margin: 0; font-size: var(--ds-fs-h1); line-height: 1; }
.ds-hello .dotline { margin: .6rem 0 0; }
.ds-hello__role { margin: 0 0 var(--ds-gap-block); font-size: var(--ds-fs-lg); line-height: 1.35; }


/* 21. Selected papers (Welcome) ----------------------------------- */
/* <li class="ds-pick"><span class="ds-pick__meta">venue, year</span><a class="ds-pick__why">the plain sentence</a></li>,
   built by js/research.js from rows with featured = yes.
   Mint cards (the Data Stories cards stay on sand, so the two swipe rows differ), one per paper, two parts only: the journal
   and year as a small label (forest, for contrast on mint), then the plain sentence in bold.
   The sentence is the link. No title on the card: it is in the paper pop-up (section 23). */
.ds-pick { max-width: none; padding: .5rem .7rem .55rem; background: var(--ds-mint); border-radius: var(--ds-radius-ctrl); font-size: var(--ds-fs-sm); line-height: 1.4; }
.ds-pick__meta { display: block; margin-bottom: .2rem; font-size: var(--ds-fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; color: var(--ds-forest); }
.ds-pick__why { display: block; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); line-height: 1.25; letter-spacing: -0.01em; color: var(--ds-forest); text-decoration: none; }
.ds-pick__why:hover { color: var(--ds-forest); }
/* The cards sit in the sideways row of section 13 (<ol class="ds-swipe" id="picks-row">, filled by js/research.js),
   with the same dots. The link is stretched over the whole card, so a tap anywhere opens the paper pop-up (section 23).
   Lime on hover. */
.ds-swipe > .ds-pick { position: relative; padding: .55rem .75rem .6rem; }
.ds-swipe > .ds-pick .ds-pick__why::after { content: ""; position: absolute; inset: 0; border-radius: var(--ds-radius-ctrl); }
@media (hover: hover) { .ds-swipe > .ds-pick:hover { background: var(--ds-lime); } }

/* 22. Contact card (footer of Welcome, Research, Data Stories) --------- */
/* <section class="foot-card"><h2 class="foot-card__title">Get in touch</h2><span class="dotline"></span>
     <p class="foot-card__text">..</p><div class="foot-card__btns"><a class="foot-btn foot-btn--fill">Email</a><a class="foot-btn">LinkedIn</a></div></section>
   The sand card surface, text at the left (the footer around it is centred). The heading at h3 size, the coral dotline
   under it (js/site.js initDotline makes it as long as the heading), one line in forest, then two buttons side by side: Email filled lime (coral on hover), LinkedIn as an outline
   (lime on hover). "Contact" in the menu scrolls to #contact. */
.foot-card { padding: .9rem .9rem 1rem; background: var(--ds-sand); border-radius: var(--ds-radius-card); color: var(--ds-forest); text-align: left; }
.foot-card__title { margin: 0; font-size: var(--ds-fs-h3); }
.foot-card .dotline { margin: .5rem 0 .75rem; }
.foot-card__text { margin: 0 0 var(--ds-gap-item); }
.foot-card__btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-width: 26rem; }
.site-footer .foot-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; border: 1px solid var(--ds-forest); border-radius: var(--ds-radius-ctrl); color: var(--ds-forest); font-weight: 700; text-decoration: none; }
.foot-btn svg { flex: none; width: 1.1em; height: 1.1em; }
.site-footer .foot-btn:hover { background: var(--ds-lime); color: var(--ds-forest); }
.site-footer .foot-btn--fill { background: var(--ds-lime); border-color: var(--ds-lime); }
.site-footer .foot-btn--fill:hover { background: var(--ds-coral); border-color: var(--ds-coral); }

/* 23. Paper pop-up (Welcome: selected papers and Research database; Research page: every row of the list) */
/* <dialog class="ds-story ds-paper" id="paper">: the story pop-up (section 13) with the same parts as a Data Story
   (the .ds-post__ rules of section 15), filled by js/research.js: the year alone in the bar
   (span.ds-story__date), header.ds-post__head with h2.ds-post__title (the title, with the coral line under it),
   p.ds-post__lead (the plain sentence, when there is one), div.ds-paper__sum (p.ds-paper__label "Summary" and the
   summary of the abstract, when there is one), p.pub-authors, p.pub-venue, p.ds-paper__tags,
   p.ds-post__go (Read the paper: the outline button across the box, lime on hover) and, on Welcome,
   p.ds-paper__row (See it in the full list: a small text link under the button).
   Same width as a story. Paper titles are long, so the title is one step smaller (h4) than a story's. */
.ds-paper .ds-post__title { font-size: var(--ds-fs-h4); line-height: 1.2; }
/* The bar of a paper: the same grey bar as a story (section 13). The year stands alone, so it is one size up from a story's date. */
.ds-paper .ds-story__date { font-size: var(--ds-fs-sm); }
/* Summary of the abstract: a sand box with a small uppercase label, between the plain sentence and the authors */
.ds-paper__sum { margin: 0 0 var(--ds-gap-item); padding: .5rem .7rem .55rem; background: var(--ds-sand); border-radius: var(--ds-radius-ctrl); }
.ds-paper__sum p { margin: 0; line-height: 1.5; }
.ds-paper__sum .ds-paper__label { margin-bottom: .15rem; font-size: var(--ds-fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; color: var(--ds-muted); }
.ds-paper .pub-authors { margin: 0; }
.ds-paper .pub-venue { margin: .15rem 0 0; }
.ds-paper__tags { display: flex; flex-wrap: wrap; gap: .25rem; margin: var(--ds-gap-item) 0 0; }

/* 24. Citation numbers (Research page) ------------------------------------ */
/* <div class="pub-metrics" id="metrics" hidden><ul class="pub-metrics__list">
     <li class="pub-metrics__lead"><b>6,479</b><span>Citations</span></li><li><b>38</b><span>h-index</span></li>
     <li><b>65</b><span>i10-index</span></li></ul>
     <p class="pub-metrics__src"><a>Google Scholar</a>, updated 30 November 2026</p></div>
   Three tiles side by side between the page title and the years histogram: a large number in the heading font, a small
   uppercase label under it. Citations sit on lime, the two indexes on sand. The row is at most 30rem wide, so the
   tiles do not stretch on large screens. Under them the source and its date, small.
   js/metrics.js fills it from data/metrics.json (rewritten weekly by tools/update_metrics.py) and only then shows it. */
.pub-metrics { margin: 0 0 var(--ds-gap-item); }
.pub-metrics__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; max-width: 30rem; list-style: none; margin: 0; padding: 0; }
.pub-metrics__list li { max-width: none; padding: .55rem .6rem .5rem; background: var(--ds-sand); border-radius: var(--ds-radius-ctrl); }
.pub-metrics__list li.pub-metrics__lead { background: var(--ds-lime); }
.pub-metrics__list b { display: block; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-h2); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pub-metrics__list span { display: block; margin-top: .3rem; font-size: var(--ds-fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
/* Very narrow phones: the number one step smaller and less padding, so "6,479" and "I10-INDEX" still fit their tiles */
@media (max-width: 359.98px) {
  .pub-metrics__list li { padding-inline: .4rem; }
  .pub-metrics__list b { font-size: var(--ds-fs-h3); }
  .pub-metrics__list span { letter-spacing: 0; }
}
.pub-metrics__src { max-width: none; margin: .5rem 0 0; font-size: var(--ds-fs-xs); line-height: 1.35; color: var(--ds-muted); }

/* 25. Computer and tablet, from 768px: one column width on every page, the same written-out top bar on Welcome as on the
   other pages (the hamburger stays on phones only), and on Welcome two sticky lines: the top bar, and under it the
   heading of the section being read. Phones are not touched by anything in this section. */
/* The brand in Welcome's nav: only shown from 768px, where it replaces the brand of the opening */
.ds-bar-brand { display: none; }
@media (min-width: 768px) {
  /* Every page: one column width (Welcome, Research, Data Stories, 404), and the brand at the same size in every bar */
  body.ds-nobs .container { max-width: 60rem; }
  .site-nav .navbar-brand { font-size: var(--ds-fs-h3); }
  /* Welcome: the sticky top bar of the other pages, 3.5rem high, brand at the left and the page links at the right.
     The brand of the opening and the menu button give way to it. The section sub-items of the menu are not shown. */
  body.ds-onebar::before, .ds-now__brand { display: none; }
  .site-nav--now { height: 3.5rem; margin-bottom: 0; padding: 0; background: var(--ds-cream); border-bottom: 1px solid var(--ds-grid); pointer-events: auto; }
  .site-nav--now .ds-bar-brand { display: block; }
  .site-nav--now .ds-menu { margin: 0; }
  .site-nav--now .ds-menu__btn, .site-nav--now .ds-menu__ico, .site-nav--now .ds-menu__sub { display: none; }
  .site-nav--now .ds-menu__list { position: static; display: flex !important; align-items: center; gap: 1.1rem; min-width: 0; padding: 0; background: none; border: 0; border-radius: 0; }
  .site-nav--now .ds-menu__list .ds-ext { margin-left: .25em; }
  .site-nav--now .ds-menu__list a { display: block; padding: .35rem 0; font-family: var(--ds-font-body); font-weight: 400; font-size: inherit; letter-spacing: 0; }
  .site-nav--now .ds-menu__list li + li a { border-top: 0; }
  .site-nav--now .ds-menu__list a:hover { background: none; text-decoration: underline; text-decoration-color: var(--ds-grid); text-underline-offset: .45em; }
  .site-nav--now .ds-menu__list a[aria-current="page"] { box-shadow: none; text-decoration: underline; text-decoration-color: var(--ds-coral); text-decoration-thickness: 2px; text-underline-offset: .45em; }
  /* The section bars of section 17 stay, but stick right under the top bar instead of at the very top, so the two
     lines stack: the top bar, then the heading of the section being read (pushed out by the next one). */
  .ds-sec__title { top: 3.5rem; z-index: 1030; }
  html:has(.ds-home) { scroll-padding-top: 3.5rem; }
  /* Opening: name, role and text at the left, a larger photo at the right */
  .ds-hero { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; grid-template-rows: auto auto 1fr; column-gap: 2.5rem; align-items: start; padding-top: 2.25rem; }
  .ds-hero::after { grid-column: 1 / -1; grid-row: 4; }
  .ds-hello { display: contents; }
  .ds-hello > div { grid-column: 1; grid-row: 1; padding-top: .5rem; }
  .ds-photo { grid-column: 2; grid-row: 1 / span 3; width: 12rem; height: 12rem; }
  .ds-hello__role { grid-column: 1; grid-row: 2; margin: 1rem 0 .5rem; }
  .ds-hero__text { grid-column: 1; grid-row: 3; }
}

/* Welcome from 992px: the sideways rows become rows of three cards, no dots. A mouse cannot swipe, so nothing hides off
   screen. Photos keep their own shape: one row, all the same height (js/site.js fitPics sets each card's share). */
@media (min-width: 992px) {
  .ds-home .ds-swipe:not(.ds-pics) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin: 0; padding: 0; overflow: visible; }
  .ds-home #latest-stories > li:nth-child(n+4), .ds-home .ds-dots { display: none; }
  .ds-home .ds-swipe.ds-pics { gap: .6rem; margin: 0; padding: 0; overflow: visible; }
  .ds-home .ds-swipe.ds-pics > li { flex: 1 1 0%; }
  .ds-home .ds-pics .ds-shot img { aspect-ratio: auto; height: auto; }
}

/* Story pop-up with a chart, from 992px (Welcome and Data Stories): wider, the chart at the left and stays in view, the
   text at the right. Papers (no chart) keep the narrow box. */
@media (min-width: 992px) {
  .ds-story:has(.ds-post__fig) { width: min(100% - 2rem, 62rem); }
  .ds-story:has(.ds-post__fig) .ds-story__body { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); column-gap: 1.75rem; align-items: start; padding-bottom: 1.25rem; }
  .ds-story:has(.ds-post__fig) .ds-story__body > * { grid-column: 2; }
  .ds-story:has(.ds-post__fig) .ds-post__fig { grid-column: 1; grid-row: 1 / span 6; position: sticky; top: 3.4rem; margin-top: .8rem; max-width: none; }
}

/* 26. Data Stories, the plain list ------------------------------------
   Written into datastories.html by tools/build.py: date, title and summary of every story, for search engines, AI
   tools and visitors without JavaScript. Hidden as soon as JavaScript runs (the page sets the js class in its head)
   and shown again if the data cannot load. Without JavaScript the "Loading stories" line is hidden. */
.js .ds-static { display: none; }
html:not(.js) .ds-loading { display: none; }
.ds-static > li { padding: .7rem 0; }
.ds-static h2 { margin: 0 0 .2rem; font-family: var(--ds-font-head); font-weight: 700; font-size: var(--ds-fs-lg); line-height: 1.25; letter-spacing: -0.01em; }
.ds-static p { margin: 0; }
