/*!
 * Metro CSS 1.0 — a small design system for Time to Learn English
 * No build step, no dependencies. Works with metro.js (optional).
 *
 * Contents
 *   1. Fonts            9. Tags and buttons
 *   2. Tokens          10. Route (the line schedule)
 *   3. Base            11. Linemap (the week)
 *   4. Layout          12. Entries (lists of clubs, people)
 *   5. Top bar         13. Week (mini line)
 *   6. Intro           14. Filters and chips
 *   7. Prose           15. Fold, clamp, empty state
 *   8. Cards, panels   16. Footer and utilities
 *                      17. Colour classes (.line-red, .line-orange …)
 *
 * Customise the whole look with the tokens in section 2:
 * --line is the main line colour, --alt is the second line (online).
 * Thirteen more colours come from the Moscow metro lines: add .line-red, .line-orange, .line-violet …
 * to any element to recolour it.
 */

@layer metro.reset, metro.tokens, metro.base, metro.layout, metro.components, metro.utilities;

/* ------------------------------------------------------------------ 1. Fonts */
@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded.woff") format("woff");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text.woff") format("woff");
  font-weight: 400 900;
  font-display: swap;
}

/* ------------------------------------------------------------------ 2. Tokens */
@layer metro.tokens {
  :root {
    color-scheme: light dark;

    /* colour */
    --paper:   light-dark(#f3f4f6, #121418);   /* page background */
    --surface: light-dark(#ffffff, #1b1e24);   /* cards and panels */
    --ink:     light-dark(#16181d, #eceef2);   /* text */
    --muted:   light-dark(#5d6470, #9aa1ad);   /* secondary text */
    --rule:    light-dark(#dfe2e7, #2b2f37);   /* hairlines */
    --line:    light-dark(#00712b, #4cc764);   /* the main line: links, accents, buttons */
    --on-line: light-dark(#ffffff, #0e1a12);   /* text on --line */
    --alt:     light-dark(#0063ad, #4aa8ff);   /* the second line: online */
    --on-alt:  light-dark(#ffffff, #0b1724);
    --gold:    light-dark(#a05c00, #f5b73b);   /* editor's pick, top */
    --gold-bg: light-dark(#fbefd6, #3a2c10);

    /* Moscow metro palette — one colour per line.
       --name       text-safe colour (links, labels): 4.5:1 on the page in both themes
       --name-fill  the line's own colour, for tracks, stations, buttons and badges
       --name-on    text on top of --name-fill
       Use them through the .line-* classes below, or directly. */
    --red: light-dark(#c50000, #fe4c38);       --red-fill: #e42313; --red-on: #ffffff;   /* Sokolnicheskaya */
    --green: light-dark(#217627, #4baf4f);     --green-fill: #4baf4f; --green-on: #16181d;   /* Zamoskvoretskaya */
    --blue: light-dark(#0065ac, #4195db);      --blue-fill: #0072ba; --blue-on: #ffffff;   /* Arbatsko-Pokrovskaya */
    --sky: light-dark(#007096, #1ebcef);       --sky-fill: #1ebcef; --sky-on: #16181d;   /* Filyovskaya */
    --brown: light-dark(#915133, #bd8064);     --brown-fill: #915133; --brown-on: #ffffff;   /* Koltsevaya */
    --orange: light-dark(#a64c00, #f07e24);    --orange-fill: #f07e24; --orange-on: #16181d;   /* Kaluzhsko-Rizhskaya */
    --violet: light-dark(#943e90, #c171bc);    --violet-fill: #943e90; --violet-on: #ffffff;   /* Tagansko-Krasnopresnenskaya */
    --yellow: light-dark(#886700, #ffcd1c);    --yellow-fill: #ffcd1c; --yellow-on: #16181d;   /* Kalininskaya */
    --grey: light-dark(#696868, #adacac);      --grey-fill: #adacac; --grey-on: #16181d;   /* Serpukhovsko-Timiryazevskaya */
    --lime: light-dark(#667100, #bed12c);      --lime-fill: #bed12c; --lime-on: #16181d;   /* Lyublinsko-Dmitrovskaya */
    --teal: light-dark(#457172, #82c0c0);      --teal-fill: #82c0c0; --teal-on: #16181d;   /* Bolshaya Koltsevaya */
    --lavender: light-dark(#5d6a82, #a1b3d4);  --lavender-fill: #a1b3d4; --lavender-on: #16181d;   /* Butovskaya */
    --pink: light-dark(#a73f75, #e46aa7);      --pink-fill: #de64a1; --pink-on: #16181d;   /* Nekrasovskaya */

    /* meaning */
    --success: var(--green);
    --warning: var(--orange);
    --danger:  var(--red);
    --info:    var(--blue);

    /* type */
    --display: "Unbounded", "Arial Black", sans-serif;
    --text:    "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
    --step--1: 0.875rem;
    --step-0:  1.0625rem;
    --step-1:  1.25rem;
    --step-2:  clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
    --step-3:  clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem);

    /* space and shape */
    --gutter: clamp(1rem, 3vw, 2rem);
    --max:    76rem;
    --radius: 14px;
    --radius-sm: 6px;

    /* route geometry */
    --stop: 14px;          /* station size */
    --track: 4px;          /* line width */
    --time-col: 4.4rem;    /* where the line runs */
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"]  { color-scheme: dark; }
}

/* ------------------------------------------------------------------ 3. Base */
@layer metro.reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  img, svg, video { display: block; max-width: 100%; height: auto; }
  input, button, select, textarea { font: inherit; color: inherit; }
}

@layer metro.base {
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  }
  body {
    background: var(--paper); color: var(--ink);
    font: 400 var(--step-0)/1.6 var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;   /* the footer sits at the bottom of short pages */
  }
  body > main { flex: 1 0 auto; }
  a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.18em; }
  a:hover { color: var(--line); text-decoration-color: currentColor; }
  :focus-visible { outline: 2px solid var(--line); outline-offset: 3px; border-radius: 4px; }
  h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
  h5, h6 { font: 600 1rem/1.3 var(--text); }
  p { text-wrap: pretty; }
  hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2rem; }
  ::selection { background: color-mix(in srgb, var(--line) 25%, transparent); }
}

/* ------------------------------------------------------------------ 4. Layout */
@layer metro.layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

  /* main column + aside.  Children: .layout__main, .layout__aside, optional .layout__top
     .layout__top sits above the list on phones and at the top of the aside on desktop */
  .layout {
    display: grid; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 4rem;
    grid-template-areas: "top" "main" "aside";
  }
  .layout__top   { grid-area: top; }
  .layout__main  { grid-area: main; min-width: 0; }
  .layout__aside { grid-area: aside; display: grid; gap: 1rem; align-content: start; }
  @media (min-width: 60rem) {
    .layout { grid-template-columns: minmax(0, 1fr) 21rem; grid-template-areas: "main top" "main aside"; grid-template-rows: auto 1fr; row-gap: 1rem; }
    .layout:not(:has(> .layout__top)) { grid-template-areas: "main aside"; grid-template-rows: auto; }
  }
  .layout__aside > .sticky { display: grid; gap: 1rem; align-content: start; }
  @media (min-width: 60rem) { .sticky { position: sticky; top: 5rem; } }

  .showcase { display: grid; gap: 1rem; margin-block: 1.5rem clamp(2.5rem, 6vw, 4rem); }
  @media (min-width: 60rem) {
    .showcase { grid-template-columns: 1.4fr 1fr; }
    .showcase > .feature { grid-row: span 2; }
    .showcase:not(:has(> .feature)) { grid-template-columns: 1fr 1fr; }   /* two cards without a photo feature (archives) */
  }

  .stack > * + * { margin-top: var(--stack, 1rem); }
  .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 0.5rem); }
  .grid { display: grid; gap: var(--gap, 1rem); grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 16rem), 100%), 1fr)); }
}

@layer metro.components {

/* ------------------------------------------------------------------ 5. Top bar */
  .topbar {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
  }
  .topbar > .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
  .brand {
    display: flex; align-items: center; gap: 0.6rem;
    font: 700 1rem/1 var(--display); text-decoration: none; white-space: nowrap;
  }
  /* the station clock logo, one file per theme. A background image, not a mask:
     browsers block mask images on pages opened from disk (file://), background images are fine */
  .brand::before {
    content: ""; flex: none; width: calc(4px / 0.12); height: calc(4px / 0.12);   /* ring line = 4px, as the old station ring */
    background: url("../img/logo/station-clock-light.svg") center / contain no-repeat;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand::before { background-image: url("../img/logo/station-clock-dark.svg"); }
  }
  :root[data-theme="dark"] .brand::before { background-image: url("../img/logo/station-clock-dark.svg"); }
  .topbar nav { display: flex; gap: 0.25rem; margin-left: auto; }
  .topbar nav a { padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
  .topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
  .topbar nav + * { margin-left: 0.5rem; }
  .topbar > .wrap > .btn { padding: 0.55rem 1rem; font-size: var(--step-0); line-height: 1.5; }   /* Subscribe: body-size text */
  @media (max-width: 53rem) {   /* the one-line header (full name + menu + Subscribe) needs ~838px */
    .topbar > .wrap { flex-wrap: wrap; gap: 0; padding-top: 0.75rem; }
    .topbar nav { order: 3; width: 100%; margin-left: 0; padding-block: 0.5rem; flex-wrap: wrap; justify-content: space-between; gap: 0; }   /* every item visible, none cut at the edge */
    .topbar nav a { padding-inline: 0.4rem; }
    .topbar nav a:first-child { padding-left: 0; }
    .topbar nav a:last-child { padding-right: 0; }
    .topbar nav + * { margin-left: auto; }
    .topbar nav a[aria-current="page"] { background: none; }
    .brand { white-space: normal; line-height: 1.15; flex: 1 1 0; min-width: 0; margin-right: 0.75rem; }   /* the name wraps instead of pushing Subscribe down */
    .brand::before { flex: none; }
    .topbar > .wrap > .btn { flex: none; }
  }

/* ------------------------------------------------------------------ 6. Intro */
  .intro { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
  .intro h1 { font-size: var(--step-3); max-width: 18ch; }
  /* inner pages (a club, a teacher): get to the content quickly */
  .intro--compact { padding-block: 1.25rem 1.5rem; }
  .intro--compact h1 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.5rem); max-width: 28ch; margin-top: 0.15rem; }
  .lede { margin-top: 1rem; max-width: 52ch; color: var(--muted); font-size: var(--step-1); }

/* ------------------------------------------------------------------ 7. Prose (posts) */
  .prose { overflow-wrap: break-word; }   /* long links and addresses wrap on phones */
  .prose + .prose { margin-top: 4rem; }
  .prose > h2 { font-size: var(--step-2); }
  .prose > h2:not(:first-child) { margin-top: 3rem; font-size: var(--step-1); }
  .prose > h3 { margin-top: 2rem; font-size: var(--step-1); }
  .prose > h4 { margin-top: 1.75rem; }
  .prose > p, .prose > ul, .prose > ol, .prose > dl { margin-top: 1rem; max-width: 66ch; }
  .prose > ul, .prose > ol { padding-left: 1.2rem; }
  .prose > ul > li + li, .prose > ol > li + li { margin-top: 0.5rem; }
  .prose dt { font-weight: 600; margin-top: 1rem; }
  .prose dd { margin-left: 0; color: var(--muted); }
  .meta { margin-top: 0.4rem; color: var(--muted); font-size: var(--step--1); }
  .prose > .meta + * { margin-top: 1.5rem; }

/* ------------------------------------------------------------------ 8. Cards and panels */
  /* photo card with text on a dark fade */
  .feature {
    position: relative; overflow: hidden;
    border-radius: var(--radius); min-height: 22rem;
    display: flex; align-items: flex-end;
    color: #fff; background: #222 center / cover no-repeat;
  }
  .feature::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.15) 70%); }
  .feature > div { position: relative; padding: clamp(1.25rem, 3vw, 2rem); max-width: 40rem; }
  .feature h2 { font-size: var(--step-2); }
  .feature p { margin-top: 0.6rem; color: rgb(255 255 255 / 0.85); }
  .feature a { color: #fff; font-weight: 600; }
  .feature a:last-child::after { content: ""; position: absolute; inset: 0; }

  .card {
    position: relative; padding: 1.25rem;
    border-radius: var(--radius); background: var(--surface);
  }
  .card h3 { font-size: var(--step-1); margin-top: 0.2rem; }
  .card p { margin-top: 0.6rem; font-size: 0.95rem; }
  .card h3 a { text-decoration: none; }
  .card h3 a::after { content: ""; position: absolute; inset: 0; }
  .card:has(h3 a:hover) h3 { color: var(--line); }
  .card--media { --card-img: 7rem; display: grid; grid-template-columns: 1fr var(--card-img); gap: 1rem; align-items: start; }
  @media (min-width: 60rem) { .card--media { --card-img: 9.5rem; } }   /* the photo keeps 4:5 and is sized to match the text height */
  @media (min-width: 80rem) { .card--media { --card-img: 9rem; } }
  .card--media > img { width: var(--card-img); height: auto; aspect-ratio: 4 / 5; align-self: center; object-fit: cover; border-radius: 8px; }   /* any leftover space is split above and below */
  /* phones: a thumbnail next to the title, the description below at full width */
  @media (max-width: 40rem) {
    .card--media { grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 0.9rem; row-gap: 0; align-items: center; }
    .card--media > div { display: contents; }
    .card--media > img { grid-column: 1; grid-row: 1 / span 3; width: 4.5rem; aspect-ratio: 1; align-self: center; }
    .card--media > div > * { grid-column: 2; }
    .card--media > div > p { grid-column: 1 / -1; margin-top: 0.9rem; }
  }
  .kicker { font-size: var(--step--1); color: var(--line); font-weight: 600; }
  .kicker.is-alt { color: var(--alt); }
  .when { font-size: var(--step--1); color: var(--muted); margin-top: 0.2rem; }

  .panel { position: relative; padding: 1.25rem; border-radius: var(--radius); background: var(--surface); }
  .panel h4 { font-size: 1rem; }
  .panel p { margin-top: 0.6rem; font-size: 0.95rem; }
  .panel--quiet { background: none; padding-block: 0.5rem; }
  .panel--quiet ol, .panel--quiet ul { list-style: none; padding: 0; margin-top: 0.5rem; }
  .panel--quiet li + li { margin-top: 0.25rem; }
  .panel .media { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; margin-top: 0.9rem; align-items: start; }
  .panel .media img { border-radius: var(--radius-sm); width: 5.5rem; }
  .panel .media p { margin-top: 0.3rem; color: var(--muted); font-size: var(--step--1); }
  .note { color: var(--muted); font-size: var(--step--1); }
  .label { font-size: var(--step--1); color: var(--muted); }

  /* make a whole card clickable: put <a class="cover"> as its last child */
  .cover { position: absolute; inset: 0; border-radius: inherit; }
  .cover:focus-visible { outline-offset: -2px; }
  :has(> .cover) a:not(.cover) { position: relative; z-index: 1; }   /* other links in the card stay clickable */
  :has(> .cover:hover) > h4 { color: var(--line); }

/* ------------------------------------------------------------------ 9. Tags and buttons */
  .tag {
    display: inline-block; vertical-align: 0.1em; white-space: nowrap;
    font: 600 0.75rem/1 var(--text);
    padding: 0.25rem 0.45rem; border-radius: 4px;
    color: var(--line); background: color-mix(in srgb, var(--line-fill, var(--line)) 14%, transparent);
  }
  .tag--alt  { color: var(--alt); background: color-mix(in srgb, var(--alt) 14%, transparent); }
  .tag--gold { color: var(--gold); background: var(--gold-bg); }
  .tag--plain { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 2.5rem; padding: 0 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
    font: 500 0.95rem var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease, filter 120ms ease;
  }
  .btn:hover { border-color: var(--line); color: var(--line); }
  .btn--primary { background: var(--line-fill, var(--line)); border-color: var(--line-fill, var(--line)); color: var(--on-line); font-weight: 600; }
  .btn--primary:hover { color: var(--on-line); filter: brightness(1.08); }
  .btn--alt { background: var(--alt); border-color: var(--alt); color: var(--on-alt); font-weight: 600; }
  .btn--alt:hover { color: var(--on-alt); filter: brightness(1.08); }
  .btn.is-done { border-color: var(--line); color: var(--line); }
  .btn--block { display: flex; width: 100%; }

  .link-btn {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: 600 0.95rem var(--text); color: var(--line);
  }
  .link-btn--quiet { font-weight: 400; font-size: var(--step--1); color: var(--muted); text-decoration: underline; text-underline-offset: 0.18em; }
  .link-btn--quiet:hover { color: var(--ink); }
  .more { display: inline-block; margin-top: 0.75rem; font-weight: 600; text-decoration: none; color: var(--line); }

/* ------------------------------------------------------------------ 10. Route: the line schedule
   <ul class="route">
     <li><time>19:00</time> <a href="…">Club</a> <span class="where">Venue</span> <b class="tag">New</b></li>
   </ul>
   .route--alt paints it in the second colour (online). */
  .day { margin-top: 2.75rem; }
  .day > h3 { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; font-size: var(--step-1); }
  .day > h3 small { font: 400 var(--step--1) var(--text); color: var(--muted); }
  .day.is-today > h3::after {
    content: "Today"; font: 600 0.8rem/1 var(--text);
    padding: 0.3rem 0.55rem; border-radius: 99px; background: var(--line-fill, var(--line)); color: var(--on-line);
  }

  .route { list-style: none; padding: 0; margin-top: 0.75rem; }
  .route > li {
    --y: 1.15rem;
    position: relative;
    padding: 0.55rem 0 0.55rem calc(var(--time-col) + 1.6rem);
  }
  .route > li::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc(var(--time-col) - var(--track) / 2); width: var(--track); background: var(--line-fill, var(--line));
  }
  .route > li:first-child::before { top: var(--y); }
  .route > li:last-child::before  { bottom: calc(100% - var(--y)); }
  .route > li:only-child::before  { top: calc(var(--y) - 1rem); bottom: auto; height: 2rem; border-radius: 2px; }
  .route > li::after {
    content: ""; position: absolute; z-index: 1;
    left: calc(var(--time-col) - var(--stop) / 2); top: calc(var(--y) - var(--stop) / 2);
    width: var(--stop); height: var(--stop); border-radius: 50%;
    background: var(--paper); border: 3px solid var(--line-fill, var(--line));
  }
  .route > li.is-now::after { background: var(--line-fill, var(--line)); }   /* the meetup on right now (metro.js) */
  .route time { position: absolute; left: 0; top: 0.55rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .route a { font-weight: 600; text-decoration: none; margin-right: 0.6rem; transition: color 120ms ease; }
  .route a:hover { color: var(--line); }
  .route .where { color: var(--muted); font-size: 0.95rem; margin-right: 0.6rem; }
  .route-label { margin-top: 1.25rem; padding-left: calc(var(--time-col) + 1.6rem); font-size: var(--step--1); color: var(--muted); }
  .route-label + .route { margin-top: 0.25rem; }

  .legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-size: var(--step--1); color: var(--muted); }
  .legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
  .legend i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--line-fill, var(--line)); }
  .legend i.is-alt { border-color: var(--alt); }

  @media (max-width: 30rem) {
    :root { --time-col: 3.9rem; }
    .route > li { padding-left: calc(var(--time-col) + 1.2rem); }
    .route .where { display: block; }
    .route-label { padding-left: calc(var(--time-col) + 1.2rem); }
  }

/* ------------------------------------------------------------------ 11. Linemap: the week as stations
   <nav class="linemap"><ol>
     <li><a href="#mon" data-date="2026-09-28"><span class="dot">28</span><span class="name">Mon</span><span class="count">9 meetups</span></a></li>
   </ol></nav>   — metro.js marks today's station. */
  .linemap { margin-top: clamp(2rem, 5vw, 3.25rem); }
  .linemap ol { list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
  .linemap ol::before {
    content: ""; position: absolute; left: calc(100% / var(--n, 7) / 2); right: calc(100% / var(--n, 7) / 2);
    top: calc(1.4rem - 3px); height: 6px; border-radius: 3px; background: var(--line-fill, var(--line));
  }
  .linemap a { position: relative; display: grid; justify-items: center; gap: 0.35rem; text-decoration: none; padding-bottom: 0.25rem; }
  .linemap .dot {
    width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--paper); border: 5px solid var(--line-fill, var(--line));
    font: 600 0.95rem/1 var(--display); transition: transform 160ms ease;
  }
  .linemap .name { font-weight: 600; }
  .linemap .count { font-size: var(--step--1); color: var(--muted); padding: 0; border: 0; }   /* not the list counter below */
  .linemap a:hover { color: var(--ink); }
  .linemap a:hover .dot { transform: scale(1.08); }
  .linemap [aria-current="date"] .dot { background: var(--line-fill, var(--line)); color: var(--on-line); }
  .linemap [aria-current="date"] .name::after { content: ", today"; color: var(--line); }
  @media (max-width: 40rem) {
    .linemap .dot { width: 2.3rem; height: 2.3rem; border-width: 4px; font-size: 0.8rem; }
    .linemap ol::before { top: calc(1.15rem - 3px); }
    .linemap .count { display: none; }
    .linemap [aria-current="date"] .name::after { content: ""; }
  }

/* ------------------------------------------------------------------ 12. Entries: lists of clubs, people, places
   <ul class="entries">
     <li class="entry">
       <img class="entry__media" src="…" alt="">           (or .entry__avatar)
       <div class="entry__head">kicker, h2, .entry__sub, .week …</div>
       <p class="entry__text">…</p>
       <div class="entry__actions">…</div>
     </li>
   </ul>      .entry--alt switches accents to the second colour. */
  .count { color: var(--muted); font-size: var(--step--1); padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
  .entries { list-style: none; padding: 0; }
  .entry {
    --media: 9.5rem;
    position: relative;
    display: grid; grid-template-columns: var(--media) minmax(0, 1fr); column-gap: 1.5rem;
    grid-template-rows: auto auto auto 1fr; align-content: start;
    padding-block: 1.75rem; border-bottom: 1px solid var(--rule);
  }
  .entry > :not(.entry__media, .entry__avatar) { grid-column: 2; }
  .entry:not(:has(> .entry__media, > .entry__avatar)) { grid-template-columns: minmax(0, 1fr); }
  .entry:not(:has(> .entry__media, > .entry__avatar)) > * { grid-column: 1; }
  .entry__media { grid-row: 1 / span 4; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--surface); }
  .entry__avatar {
    grid-row: 1 / span 4; width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
    display: grid; place-items: center; align-self: start;
    background: var(--surface); color: var(--muted); font: 600 1.1rem/1 var(--display);
  }
  .entry:has(.entry__avatar) { --media: 4.5rem; column-gap: 1.25rem; grid-template-rows: auto; }
  /* square photo with rounded corners, as on the teacher cards: the radius is 30% of the side,
     and the side matches the height of the head next to it (name, role, tags), so the photo reads as a column.
     Phones keep the round portrait: there the blocks stack in one column */
  @media (min-width: 40rem) {
    .entry__avatar.entry__avatar--square { border-radius: 30%; }
    .entry:has(.entry__avatar--square) { --media: 5rem; }
    .entry:has(> .entry__avatar--square) > .entry__avatar { align-self: center; }   /* name, role and tags stay centred beside the photo */
  }
  /* people: only the head sits next to the portrait, the text and buttons use the full width */
  .entry:has(> .entry__avatar) > .entry__avatar { grid-row: 1 / span 3; }
  .entry:has(> .entry__avatar):not(:has(.entry__sub)) > .entry__avatar { grid-row: 1 / span 2; }
  .entry:has(> .entry__avatar) > :not(.entry__avatar, .entry__head) { grid-column: 1 / -1; }
  .entry:has(> .entry__avatar) > .entry__head { display: contents; }   /* name, role and tags beside the portrait */
  .entry:has(> .entry__avatar) > .entry__head > * { grid-column: 2; }
  .entry:has(> .entry__avatar) > .entry__head > .facts { grid-column: 1 / -1; }   /* facts start at the left edge */
  .entry:has(> .entry__avatar) > .entry__text { margin-top: 1rem; max-width: none; }   /* text uses the full card width */
  /* on desktop the tags sit in their own column: they hug the role, keep a small gap under them (the photo's bottom
     edge runs below), and the facts row and the text share one even gap. Phones keep tags and facts as one meta block */
  @media (min-width: 40rem) {
    .entry:has(> .entry__avatar--square) > .entry__head > .tags { margin-top: 0.35rem; margin-bottom: 0.35rem; }
    .entry:has(> .entry__avatar--square) > .entry__head > .facts { margin-top: 0.75rem; }
    .entry:has(> .entry__avatar--square) > .entry__text { margin-top: 0.75rem; }
  }
  .entry h2 { font-size: var(--step-1); margin-top: 0.2rem; }
  .entry__sub { margin-top: 0.3rem; color: var(--muted); font-size: 0.95rem; }
  .entry__sub--line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line: the card never grows; full text in title */
  .entry__text { margin-top: 0.75rem; max-width: 64ch; }
  .entry__text > * + * { margin-top: 0.6rem; }
  .entry__text ul { list-style: none; padding: 0; }
  .entry__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
  .entry .tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
  .entry .facts { list-style: none; padding: 0; margin-top: 0.6rem; display: flex; flex-wrap: wrap; column-gap: 1.25rem; row-gap: 0.2rem; font-size: 0.95rem; color: var(--muted); }
  .entry .more { justify-self: start; }
  .entry .more:only-of-type::after { content: ""; position: absolute; inset: 0; }   /* whole row clickable when it has one link */
  .entry:has(.more:hover) h2 { color: var(--line); }
  .flag { display: inline-block; width: 1.3em; height: 0.9em; object-fit: cover; border-radius: 2px; vertical-align: -0.1em; box-shadow: 0 0 0 1px var(--rule); margin-right: 0.25em; }   /* a little air before the text */
  .flag + .flag { margin-left: 0.05em; }   /* flags in a row: 0.3em apart in total */
  .st { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; background: var(--line); -webkit-mask: var(--st) center / contain no-repeat; mask: var(--st) center / contain no-repeat; }   /* brand sticker instead of emoji, painted in the line colour of its card */
  li.has-st { list-style: none; }   /* the sticker is the bullet */
  /* stickers 01–71 from the brandbook, inlined as data URIs so they also show when a page is opened from disk */
  .st-online { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='11' rx='1.5'/%3E%3Cpath d='M2 19.5H22'/%3E%3C/svg%3E"); }
  .st-place { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
  .st-time { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 3.5'/%3E%3C/svg%3E"); }
  .st-schedule { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Ccircle cx='12' cy='15' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-price { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10 17V7h3.5a3 3 0 0 1 0 6H8.5M8.5 15.2H14'/%3E%3C/svg%3E"); }
  .st-gift { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='1.5'/%3E%3Crect x='3' y='7.5' width='18' height='3.5' rx='1'/%3E%3Cpath d='M12 7.5V20M12 7.5C10.5 3.5 6.5 4 8.5 7.5M12 7.5c1.5-4 5.5-3.5 3.5 0'/%3E%3C/svg%3E"); }
  .st-education { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5 12 4.5l10 5-10 5z'/%3E%3Cpath d='M6 11.5V16s2.5 2.5 6 2.5 6-2.5 6-2.5v-4.5M22 9.5V15'/%3E%3C/svg%3E"); }
  .st-level { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 20v-5M12 20v-9M18 20V5'/%3E%3C/svg%3E"); }
  .st-talk { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8l-5 4v-4H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
  .st-group { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 19c0-3.5 3-5 6-5s6 1.5 6 5'/%3E%3Ccircle cx='16.5' cy='9' r='2.5'/%3E%3Cpath d='M15.8 14.1c2.8-.1 5.2 1.4 5.2 4.4'/%3E%3C/svg%3E"); }
  .st-age { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='6.5' r='2.5'/%3E%3Cpath d='M4 20v-5c0-2.5 2-3.5 4-3.5s4 1 4 3.5v5'/%3E%3Ccircle cx='17' cy='11.5' r='2'/%3E%3Cpath d='M14 20v-2.5c0-1.5 1.5-2.3 3-2.3s3 .8 3 2.3V20'/%3E%3C/svg%3E"); }
  .st-books { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 5 7 4.5 3 5v13.5c4-.5 7 0 9 1.5 2-1.5 5-2 9-1.5V5c-4-.5-7 0-9 1.5zM12 6.5V20'/%3E%3C/svg%3E"); }
  .st-games { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='4'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.3' fill='black' stroke='none'/%3E%3Ccircle cx='12' cy='12' r='1.3' fill='black' stroke='none'/%3E%3Ccircle cx='15.5' cy='15.5' r='1.3' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-film { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='M10 9v6l5-3z'/%3E%3C/svg%3E"); }
  .st-stage { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M8.5 21h7'/%3E%3C/svg%3E"); }
  .st-photo { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7l1.5-2.5h5L16 7'/%3E%3Ccircle cx='12' cy='13.5' r='3.5'/%3E%3C/svg%3E"); }
  .st-world { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c-3 3-3 15 0 18M12 3c3 3 3 15 0 18'/%3E%3C/svg%3E"); }
  .st-business { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7.5' width='18' height='12.5' rx='2'/%3E%3Cpath d='M9 7.5v-2A1.5 1.5 0 0 1 10.5 4h3A1.5 1.5 0 0 1 15 5.5v2M3 13h18'/%3E%3C/svg%3E"); }
  .st-link { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E"); }
  .st-star { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' fill-rule='evenodd'%3E%3Cpath d='M12 3.5l2.6 5.3 5.8.8-4.2 4.1 1 5.8L12 16.8l-5.2 2.7 1-5.8-4.2-4.1 5.8-.8zM12 6.9l1.56 3.18 3.48.48-2.52 2.46.6 3.48L12 14.88l-3.12 1.62.6-3.48-2.52-2.46 3.48-.48z'/%3E%3C/svg%3E"); }
  .st-star-fill { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 3.5l2.6 5.3 5.8.8-4.2 4.1 1 5.8L12 16.8l-5.2 2.7 1-5.8-4.2-4.1 5.8-.8z'/%3E%3C/svg%3E"); }
  .st-coffee { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9h11v5a5 5 0 0 1-5 5h-1a5 5 0 0 1-5-5zM16 10.5h1.5a2.5 2.5 0 0 1 0 5H16M9 3.5c-1 1.5 1 2 0 3.5M12.5 3.5c-1 1.5 1 2 0 3.5'/%3E%3C/svg%3E"); }
  .st-bar { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h10l-.5 5a4.5 4.5 0 0 1-9 0zM12 12.5V20M8.5 20h7'/%3E%3C/svg%3E"); }
  .st-party { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4.5-11.5 7 7z'/%3E%3Cpath d='M14 6l1-2.5M18 10l2.5-1M17.5 6.5 19.5 4.5'/%3E%3Ccircle cx='11' cy='4.5' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='20' cy='13.5' r='1' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-outdoor { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21v-7M12 3c-3.5 0-5.5 3-5 5.5-2 1-2 5 1 5.5h8c3-.5 3-4.5 1-5.5.5-2.5-1.5-5.5-5-5.5z'/%3E%3C/svg%3E"); }
  .st-meet { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='8' r='3.5'/%3E%3Cpath d='M3.5 20c0-4 3-6 6.5-6 1.5 0 2.8.4 4 1M18 13v6M15 16h6'/%3E%3C/svg%3E"); }
  .st-sparkle { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3c.5 5 2 6.5 7 7-5 .5-6.5 2-7 7-.5-5-2-6.5-7-7 5-.5 6.5-2 7-7z'/%3E%3Cpath d='M18.5 15v5M16 17.5h5'/%3E%3C/svg%3E"); }
  .st-heart { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-8.5-5.5-8.5-11A4.5 4.5 0 0 1 12 6.5 4.5 4.5 0 0 1 20.5 9C20.5 14.5 12 20 12 20z'/%3E%3C/svg%3E"); }
  .st-smile { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 14c1 1.5 2.5 2 4 2s3-.5 4-2'/%3E%3Ccircle cx='9' cy='10' r='1.1' fill='black' stroke='none'/%3E%3Ccircle cx='15' cy='10' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-ticket { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5A1.5 1.5 0 0 1 4.5 6h15A1.5 1.5 0 0 1 21 7.5v2.25a2.25 2.25 0 0 0 0 4.5v2.25A1.5 1.5 0 0 1 19.5 18h-15A1.5 1.5 0 0 1 3 16.5v-2.25a2.25 2.25 0 0 0 0-4.5z'/%3E%3Cpath d='M15 6v1.5M15 11.25v1.5M15 16.5V18'/%3E%3C/svg%3E"); }
  .st-music { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3Cpath d='M9 9.5l11-2'/%3E%3C/svg%3E"); }
  .st-billiard { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='10.5' r='4'/%3E%3Ccircle cx='12' cy='9.2' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='12' cy='11.9' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-channel { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10v4a1 1 0 0 0 1 1H7l11 5V4L7 9H4.5a1 1 0 0 0-1 1z'/%3E%3Cpath d='M7.5 15.2 9 20h2.5l-1.2-3.9M21 10.5v3'/%3E%3C/svg%3E"); }
  .st-cards { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='3' width='11' height='15' rx='2'/%3E%3Cpath d='M8.5 6.6 5 7.7a1.5 1.5 0 0 0-1 1.9l3.3 10.3a1.5 1.5 0 0 0 1.9 1l5.6-1.9'/%3E%3C/svg%3E"); }
  .st-mafia { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 17.5c3.2 1.8 15.8 1.8 19 0'/%3E%3Cpath d='M5.8 17.3 7.3 6.3c.3-1.7 1.7-2.4 3.3-1.7l1.4.6 1.4-.6c1.6-.7 3 0 3.3 1.7l1.5 11'/%3E%3Cpath d='M6.4 13c3.7 1.1 7.5 1.1 11.2 0'/%3E%3C/svg%3E"); }
  .st-puzzle { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8.5h3.5a2 2 0 1 1 4 0H16V12a2 2 0 1 1 0 4v3.5h-3.5a2 2 0 1 0-4 0H5z'/%3E%3C/svg%3E"); }
  .st-crown { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8 7.8 11.5 12 5l4.2 6.5L20.5 8 19 18H5z'/%3E%3Cpath d='M5.5 21h13'/%3E%3C/svg%3E"); }
  .st-trophy { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M7 6H4v1a3.5 3.5 0 0 0 3.5 3.5M17 6h3v1a3.5 3.5 0 0 1-3.5 3.5M12 14v6M8.5 20h7'/%3E%3C/svg%3E"); }
  .st-idea { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0-3.5 10.9c.4.3.5.7.5 1.1v2.5h6V15c0-.4.1-.8.5-1.1A6 6 0 0 0 12 3z'/%3E%3Cpath d='M10 20.5h4'/%3E%3C/svg%3E"); }
  .st-fire { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21c-4 0-6.5-2.6-6.5-6.2 0-3.6 2.8-5.4 3.5-9.3 2.2 1.3 3.2 3.5 3.3 5.5 1-.8 1.7-2 1.8-3.3 2.4 1.8 4.4 4.3 4.4 7.1 0 3.6-2.5 6.2-6.5 6.2z'/%3E%3C/svg%3E"); }
  .st-rocket { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5c3 2.2 4.5 5.5 4.5 9.5v4.5h-9V12c0-4 1.5-7.3 4.5-9.5z'/%3E%3Ccircle cx='12' cy='9.5' r='1.8'/%3E%3Cpath d='M7.5 13 4.5 16v3l3-1.5M16.5 13l3 3v3l-3-1.5M10 19.5l2 2 2-2'/%3E%3C/svg%3E"); }
  .st-lightning { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2.5 4.5 13.5H12l-1 8 8.5-11H12z'/%3E%3C/svg%3E"); }
  .st-clover { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9.2' cy='8.2' r='2.7'/%3E%3Ccircle cx='14.8' cy='8.2' r='2.7'/%3E%3Ccircle cx='9.2' cy='13.8' r='2.7'/%3E%3Ccircle cx='14.8' cy='13.8' r='2.7'/%3E%3Cpath d='M14.2 16.5c.8 2 2.3 3.6 4.8 4.7'/%3E%3C/svg%3E"); }
  .st-theatre { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5c5.3 1.5 10.7 1.5 16 0v6.5a8 8 0 0 1-16 0z'/%3E%3Cpath d='M7.5 10.5c.8-.8 2.2-.8 3 0M13.5 10.5c.8-.8 2.2-.8 3 0M9 15c1.8 1.5 4.2 1.5 6 0'/%3E%3C/svg%3E"); }
  .st-sun { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4'/%3E%3C/svg%3E"); }
  .st-picnic { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.5h17l-1.8 8.2a1.5 1.5 0 0 1-1.5 1.3H6.8a1.5 1.5 0 0 1-1.5-1.3z'/%3E%3Cpath d='M7 10.5a5 5 0 0 1 10 0M9.5 13.5V17M14.5 13.5V17'/%3E%3C/svg%3E"); }
  .st-train { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='14' rx='3'/%3E%3Cpath d='M5 10h14M8.5 21l2-4M15.5 21l-2-4'/%3E%3Ccircle cx='9' cy='13.5' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='15' cy='13.5' r='1' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-walk { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13' cy='4.5' r='2'/%3E%3Cpath d='M12.5 8 11.5 14M11.5 14 9 21M11.5 14l2.5 2.5.5 4.5M12.3 9.2 9 10.5l-1 3M12.3 9.2l2.2 2.8 2.5.5'/%3E%3C/svg%3E"); }
  .st-ball { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5l3.5 2.5-1.3 4H9.8L8.5 10z'/%3E%3Cpath d='M12 7.5V3M15.5 10 20 8.5M14.2 14l2.8 4.5M9.8 14 7 18.5M8.5 10 4 8.5'/%3E%3C/svg%3E"); }
  .st-city { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V10h5v11M10 21V4h7v17M17 21v-8h3v8'/%3E%3Cpath d='M13 7.5h1M13 11h1M13 14.5h1M7 13.5h1'/%3E%3C/svg%3E"); }
  .st-home { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5 12 4l8 6.5V19a1 1 0 0 1-1 1h-4.5v-5.5h-5V20H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
  .st-phone { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3.5h3.5l1.8 4.5L8 9.5a11 11 0 0 0 6.5 6.5l1.5-2.3 4.5 1.8v3.5a1.5 1.5 0 0 1-1.5 1.5C10.5 20.5 3.5 13.5 3.5 5A1.5 1.5 0 0 1 5 3.5z'/%3E%3C/svg%3E"); }
  .st-mail { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2'/%3E%3Cpath d='M3.5 7 12 13l8.5-6'/%3E%3C/svg%3E"); }
  .st-bot { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='8' width='15' height='11' rx='3'/%3E%3Cpath d='M12 8V5M2.5 12.5V15M21.5 12.5V15M9.5 16h5'/%3E%3Ccircle cx='12' cy='3.8' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='9' cy='12.5' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='15' cy='12.5' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-key { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M11 12l8.5-8.5M16.5 6.5 19 9M14 9l2 2'/%3E%3C/svg%3E"); }
  .st-poll { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7 6 8.5 9 5.5M4.5 15 6 16.5 9 13.5M12.5 7.5H19M12.5 15.5H19'/%3E%3C/svg%3E"); }
  .st-plane { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5c1 0 1.5 1 1.5 2.5v4.5l7 4.5v2l-7-2.2V18l2.5 2v1.5L12 20.5l-4 1V20l2.5-2v-4.2l-7 2.2v-2l7-4.5V5c0-1.5.5-2.5 1.5-2.5z'/%3E%3C/svg%3E"); }
  .st-food { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3v5.5a2.5 2.5 0 0 0 5 0V3M9 11v10M9 3v4.5'/%3E%3Cpath d='M17.5 21V3c-2 1.5-3 4-3 7v3.5h3'/%3E%3C/svg%3E"); }
  .st-headphones { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15v-3a8 8 0 0 1 16 0v3'/%3E%3Crect x='3' y='14' width='4.5' height='6.5' rx='1.5'/%3E%3Crect x='16.5' y='14' width='4.5' height='6.5' rx='1.5'/%3E%3C/svg%3E"); }
  .st-yoga { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Cpath d='M12 8.5v6M5 12.5c2.5 0 4.5-1.5 7-4 2.5 2.5 4.5 4 7 4M4 19.5c2.5-2.5 5-3.5 8-3.5s5.5 1 8 3.5'/%3E%3C/svg%3E"); }
  .st-no { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M5.6 5.6l12.8 12.8'/%3E%3C/svg%3E"); }
  .st-target { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1.3' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  .st-repeat { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11V9.5A3.5 3.5 0 0 1 7.5 6H19M16 3l3 3-3 3M20 13v1.5a3.5 3.5 0 0 1-3.5 3.5H5M8 21l-3-3 3-3'/%3E%3C/svg%3E"); }
  .st-pencil { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.5 4.5l4 4L8.5 19.5l-5 1 1-5z'/%3E%3Cpath d='M13 7l4 4'/%3E%3C/svg%3E"); }
  .st-search { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5.5 5.5'/%3E%3C/svg%3E"); }
  .st-check { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.8 2.8 5.7-5.8'/%3E%3C/svg%3E"); }
  .st-hand { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 13V5.5a1.5 1.5 0 0 1 3 0V11M11 10.5v-6a1.5 1.5 0 0 1 3 0v6M14 10.5V6a1.5 1.5 0 0 1 3 0v7c0 4.5-2.5 8-6.5 8-2.5 0-4-1.3-5.3-3.3l-1.7-3.2a1.5 1.5 0 0 1 2.5-1.7L8 15'/%3E%3C/svg%3E"); }
  .st-math { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4l16 16z'/%3E%3Cpath d='M8 16v-3.5l3.5 3.5zM4 8h2M4 12h2'/%3E%3C/svg%3E"); }
  .st-medical { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 4h5v5.5H20v5h-5.5V20h-5v-5.5H4v-5h5.5z'/%3E%3C/svg%3E"); }
  .st-mountain { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 19.5 9 8.5l4 6.5 2.5-3.5 6 8z'/%3E%3Cpath d='M7.3 11.3 9 12.5l1.5-1'/%3E%3C/svg%3E"); }
  .st-pin { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3.5h6M10 3.5V9l-3.5 4h11L14 9V3.5M12 13v7.5'/%3E%3C/svg%3E"); }
  .st-news { --st: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h13v13.5a1.5 1.5 0 0 0 1.5 1.5H5.5A1.5 1.5 0 0 1 4 18.5z'/%3E%3Cpath d='M17 9h3v9.5a1.5 1.5 0 0 1-3 0M7 9h7M7 12.5h7M7 16h4'/%3E%3C/svg%3E"); }
  @media (max-width: 40rem) {
    .entry { --media: 5.5rem; column-gap: 1rem; grid-template-rows: auto; }
    .entry:has(.entry__avatar) { --media: 3.5rem; column-gap: 1rem; }
    .entry__media, .entry__avatar { grid-row: 1; }
    .entry > :not(.entry__media, .entry__avatar, .entry__head) { grid-column: 1 / -1; }
    /* people on phones: name and role next to the portrait, tags and facts below at full width */
    .entry:has(> .entry__avatar) > .entry__head { display: contents; }
    .entry:has(> .entry__avatar) > .entry__head > * { grid-column: 2; }
    .entry:has(> .entry__avatar) > .entry__head > :is(.tags, .facts, .week) { grid-column: 1 / -1; }
    .entry:has(> .entry__avatar) > .entry__avatar { grid-row: 1 / span 2; align-self: center; }
    .entry:has(> .entry__avatar) h2 { margin-top: 0; }
    .entry:has(> .entry__avatar) .tags { margin-top: 0.9rem; }
  }

/* ------------------------------------------------------------------ 13. Week: seven small stations, .on = meets that day
   <ol class="week"><li class="on">Mo</li><li>Tu</li>…</ol> */
  .week {
    --col: 2.1rem;
    --dot: 12px;          /* station size */
    --day: 0.72rem;       /* day label size */
    --link: 4px;          /* thickness of the line between days */
    list-style: none; padding: 0; margin-top: 0.9rem;
    display: grid; grid-template-columns: repeat(7, var(--col));
    position: relative; width: max-content;
  }
  .week::before {
    content: ""; position: absolute; top: calc(var(--dot) / 2 - 1px); left: calc(100% / 14); right: calc(100% / 14);
    height: 2px; background: var(--rule);
  }
  /* the route: consecutive meeting days are joined by the line, a gap breaks it;
     a lone day gets a short piece of track, like a single stop in the schedule */
  .week li.on:has(+ li.on)::after {
    content: ""; position: absolute; z-index: -1; top: calc(var(--dot) / 2 - var(--link) / 2); height: var(--link);
    left: 50%; width: 100%;
    background: var(--line-fill, var(--line));
  }
  /* a lone day: no meeting the day before (or it is Monday) and none the day after.
     Written without a complex :not() — WebKit (every iPhone browser) treated Sunday as lone and drew a tail */
  .week li:not(.on) + li.on:not(:has(+ li.on))::after,
  .week li.on:first-child:not(:has(+ li.on))::after {
    content: ""; position: absolute; z-index: -1; top: calc(var(--dot) / 2 - var(--link) / 2); height: var(--link); border-radius: 2px;
    left: calc(50% - var(--dot) * 1.25); width: calc(var(--dot) * 2.5);
    background: var(--line-fill, var(--line));
  }
  /* a lone Monday has nothing to its left, a lone Sunday nothing to its right: keep only the inner half */
  .week li.on:first-child:not(:has(+ li.on))::after { left: 50%; width: calc(var(--dot) * 1.25); }
  .week li:not(.on) + li.on:last-child:not(:has(+ li.on))::after { left: calc(50% - var(--dot) * 1.25); width: calc(var(--dot) * 1.25); }
  .week li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 0.25rem; font-size: var(--day); color: var(--muted); }
  .week li::before {
    content: ""; width: var(--dot); height: var(--dot); border-radius: 50%; box-sizing: border-box;
    background: var(--paper); border: 2px solid color-mix(in srgb, var(--muted) 45%, var(--paper));
  }
  .week li.on { color: var(--ink); font-weight: 600; }
  .week li.on::before { border-color: var(--line-fill, var(--line)); border-width: max(3px, calc(var(--dot) / 4)); }   /* meeting days are bold rings on the line */

/* ------------------------------------------------------------------ 14. Filters and chips
   <details class="filters panel" open data-collapse-below="60rem">
     <summary>Filters</summary>
     <fieldset><legend>Type</legend>
       <div class="chips"><label class="chip"><input type="checkbox" checked><span>Board games</span></label></div>
     </fieldset>
   </details> */
  .filters > summary { display: none; }
  .filters fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
  .filters legend { font-weight: 600; font-size: var(--step--1); color: var(--muted); padding: 0; margin-bottom: 0.5rem; }
  @media (max-width: 59.99rem) {
    .filters { padding-block: 0.9rem; }
    .filters > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-weight: 600; }
    .filters > summary::-webkit-details-marker { display: none; }
    .filters > summary::after { content: "+"; color: var(--line); font-size: 1.25rem; line-height: 1; }
    .filters[open] > summary::after { content: "–"; }
    .filters[open] > summary { margin-bottom: 1rem; }
  }

  .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .chip { position: relative; }
  .chip > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .chip > span {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem; border-radius: 99px;
    border: 1px solid var(--rule); background: var(--surface);
    font-size: 0.95rem; color: var(--muted);
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  }
  .chip:hover > span { border-color: color-mix(in srgb, var(--line-fill, var(--line)) 50%, var(--rule)); }
  .chip > input:checked + span {
    background: color-mix(in srgb, var(--line-fill, var(--line)) 13%, var(--surface));
    border-color: color-mix(in srgb, var(--line-fill, var(--line)) 55%, transparent);
    color: var(--ink);
  }
  .chip > input:checked + span::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line-fill, var(--line)); }
  .chip > input:focus-visible + span { outline: 2px solid var(--line); outline-offset: 2px; }
  .chip .n { color: var(--muted); font-size: 0.85em; }
  .chip--plain { --line: var(--muted); --line-fill: var(--muted); }
  /* neutral accents: dark buttons, grey links — for things that have no colour of their own */
  .is-neutral { --line: var(--muted); --line-fill: var(--ink); --on-line: var(--paper); }

/* ------------------------------------------------------------------ 15. Fold, clamp, empty state */
  /* accordion built on <details class="fold"> */
  .fold { border-top: 1px solid var(--rule); }
  .fold:last-of-type { border-bottom: 1px solid var(--rule); }
  .fold > summary {
    cursor: pointer; padding: 1.1rem 0; list-style: none;
    display: flex; justify-content: space-between; gap: 1rem;
    font: 600 var(--step-1)/1.3 var(--display);
  }
  .fold > summary::-webkit-details-marker { display: none; }
  .fold > summary::after { content: "+"; color: var(--line); }
  .fold[open] > summary::after { content: "–"; }
  .fold > :not(summary) { padding-bottom: 2rem; }

  /* long text that folds to a few lines: add data-clamp, metro.js adds the button */
  [data-clamp].is-clamped { max-height: calc(var(--lines, 4) * 1.6em + 0.8em); overflow: hidden; mask-image: linear-gradient(to bottom, #000 55%, transparent); }
  .clamp-toggle { display: block; width: fit-content; justify-self: start; margin-top: 0.4rem; text-align: left; }

  .empty { padding: 2.5rem 0; list-style: none; }
  .empty h2 { font-size: var(--step-1); }
  .empty p { margin-top: 0.5rem; color: var(--muted); }
  .empty .btn { margin-top: 1rem; }

/* ------------------------------------------------------------------ 15b. Station mark: a line sign like on the metro map
   <span class="mark line-red">1</span>  <span class="mark mark--sm line-sky">4</span> */
  .mark {
    display: inline-grid; place-items: center; flex: none;
    min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem; border-radius: 99px;
    background: var(--line-fill, var(--line)); color: var(--on-line);
    font: 700 0.8rem/1 var(--display); vertical-align: -0.2em;
  }
  .mark--sm { min-width: 1.25rem; height: 1.25rem; font-size: 0.68rem; padding: 0 0.25rem; }
  .mark--ring { background: var(--paper); color: var(--ink); border: 3px solid var(--line-fill, var(--line)); }

/* ------------------------------------------------------------------ 15c. Notice: a message in one of the colours
   <div class="notice line-orange"><strong>Heads up.</strong> The club moved to Saturday.</div> */
  .notice {
    padding: 0.9rem 1.1rem; border-radius: 10px;
    border-left: 4px solid var(--line-fill, var(--line));
    border-radius: 0 10px 10px 0;
    background: color-mix(in srgb, var(--line-fill, var(--line)) 10%, var(--surface));
  }
  .notice strong { color: var(--line); }
  .notice--success { --line: var(--success); --line-fill: var(--green-fill); }
  .notice--warning { --line: var(--warning); --line-fill: var(--orange-fill); }
  .notice--danger  { --line: var(--danger);  --line-fill: var(--red-fill); }
  .notice--info    { --line: var(--info);    --line-fill: var(--blue-fill); }

/* ------------------------------------------------------------------ 15d. Gallery: photos you swipe or scroll
   <div class="gallery" data-gallery>
     <div class="gallery__track"><img src="…" alt="…"><img src="…" alt="…"></div>
   </div>     metro.js adds the arrows and the counter; without JS it still scrolls. */
  .gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
  .gallery__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  }
  .gallery__track::-webkit-scrollbar { display: none; }
  .gallery__track > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; scroll-snap-align: start; }
  .gallery__nav {
    position: absolute; top: 50%; translate: 0 -50%;
    width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center;
    background: rgb(255 255 255 / 0.9); color: #16181d; box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
    transition: opacity 150ms ease;
  }
  .gallery__nav svg { width: 1.1rem; height: 1.1rem; }
  .gallery__nav--prev { left: 0.75rem; }
  .gallery__nav--next { right: 0.75rem; }
  .gallery__nav:disabled { opacity: 0; pointer-events: none; }
  .gallery__count {
    position: absolute; right: 0.75rem; bottom: 0.75rem;
    padding: 0.2rem 0.55rem; border-radius: 99px;
    background: rgb(0 0 0 / 0.6); color: #fff; font: 600 0.8rem/1.4 var(--text); font-variant-numeric: tabular-nums;
  }
  @media (hover: none) { .gallery__nav { display: none; } }

/* ------------------------------------------------------------------ 15e. Facts: a short list of label → value
   <dl class="facts-list"><div><dt>When</dt><dd>Tue 19:00</dd></div></dl> */
  .facts-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.9rem 1rem; margin-top: 1rem; }
  .facts-list > div:has(.week), .facts-list > div:first-child { grid-column: 1 / -1; }
  .facts-list dt { font-size: var(--step--1); color: var(--muted); }
  .facts-list dd { margin: 0.1rem 0 0; font-weight: 500; }
  .facts-list .week { --dot: 16px; --day: 0.85rem; --link: 5px; margin-top: 0.5rem; width: 100%; grid-template-columns: repeat(7, 1fr); }
  .panel .week li::before { background: var(--surface); }
  /* only a meeting day that is today gets filled (metro.js adds .is-today by the Moscow weekday) */
  .week li.on.is-today::before { background: var(--line-fill, var(--line)); }
  @media (max-width: 40rem) { .facts-list .week { --dot: 18px; --day: 0.9rem; --link: 5px; } }
  .back { display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 0.6rem; font-size: var(--step--1); color: var(--muted); text-decoration: none; }
  .back::before { content: "←"; }
  .back:hover { color: var(--line); }

/* ------------------------------------------------------------------ 15f. Rich article content: tables, quotes, photos, people
   Used inside .prose */
  .table-wrap { overflow-x: auto; margin-top: 1rem; border-radius: var(--radius); background: var(--surface); }
  .prose table, .table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
  .prose th { text-align: left; font-weight: 600; font-size: var(--step--1); color: var(--muted); padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); }
  .prose td { padding: 0.75rem 1rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
  .prose tr:last-child td { border-bottom: 0; }
  .prose > blockquote, .prose blockquote {
    margin: 1rem 0 0; padding: 0.9rem 1.1rem; max-width: 66ch;
    border-left: 4px solid var(--line-fill, var(--line)); border-radius: 0 10px 10px 0;
    background: var(--surface);
  }
  .prose blockquote footer, .prose blockquote cite { display: block; margin-top: 0.5rem; color: var(--muted); font-size: var(--step--1); font-style: normal; }

  /* reviews: editorial pull-quote with filled rating stars (#reviewsContainer) */
  #reviewsContainer blockquote {
    position: relative; margin: 0; max-width: none;
    padding: 1.6rem 0 1.6rem 2.7rem;
    background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0;
  }
  #reviewsContainer blockquote:first-child { border-top: 0; padding-top: 0; }
  #reviewsContainer blockquote::before {
    content: "\201C"; position: absolute; left: 0; top: 1rem;
    color: var(--line-fill, var(--line)); font: 700 3.1rem/1 var(--display);
  }
  #reviewsContainer blockquote:first-child::before { top: -0.35rem; }
  #reviewsContainer blockquote p { max-width: 58ch; font-size: 1.05rem; line-height: 1.55; }
  #reviewsContainer blockquote p:first-of-type { font-size: 1.16rem; line-height: 1.5; }
  #reviewsContainer blockquote p + p,
  #reviewsContainer blockquote p + ul,
  #reviewsContainer blockquote ul + p,
  #reviewsContainer blockquote ul + ul { margin-top: 0.6rem; }
  #reviewsContainer blockquote ul { padding-left: 1.1rem; }
  #reviewsContainer blockquote li + li { margin-top: 0.35rem; }
  #reviewsContainer blockquote footer {
    margin-top: 1rem; color: var(--muted); font-size: 0.72rem;
    letter-spacing: 0.09em; text-transform: uppercase;
  }
  #reviewsContainer footer .st-star,
  #reviewsContainer footer .st-star-fill { background: var(--line-fill, var(--line)); }
  @media (max-width: 40rem) {
    #reviewsContainer blockquote { padding-left: 2rem; }
    #reviewsContainer blockquote::before { font-size: 2.4rem; }
  }
  .prose > .photo, .prose .photo { width: 100%; margin-top: 1.5rem; border-radius: var(--radius); object-fit: cover; }
  .prose > .grid, .prose > .panel, .prose > .gallery, .prose > .table-wrap, .prose > figure { margin-top: 1.25rem; }
  .prose figure figcaption { margin-top: 0.5rem; color: var(--muted); font-size: var(--step--1); }
  .prose .panel > * + *, .prose .card > * + * { margin-top: 0.5rem; }
  .prose .panel h4, .prose .card h4, .prose .card h5 { font-size: 1rem; }
  .prose .panel ul, .prose .card ul { padding-left: 1.1rem; }
  .prose hr { margin-block: 2.5rem; }
  .prose > h3 + *, .prose > h4 + * { margin-top: 0.75rem; }
  .avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex: none; }
  .prose .grid > div > .photo:only-child, .prose .grid > div > .photo:first-child { margin-top: 0; aspect-ratio: 4 / 3; }
  .prose .grid > .panel > .photo { margin-top: 0; }
  /* a person: portrait, name, role, links */
  .person { display: grid; gap: 0.2rem; align-content: start; justify-items: start; }
  .person .avatar { width: 5.5rem; height: 5.5rem; margin-bottom: 0.5rem; }
  .person h4, .person h5, .person h6 { font: 600 1rem/1.3 var(--text); }
  .person .role { color: var(--muted); font-size: var(--step--1); margin-bottom: 0.3rem; }
  .person a { font-size: 0.95rem; }

  .media-row { display: flex; gap: 1rem; align-items: flex-start; }
  .media-row > div { min-width: 0; }

/* ------------------------------------------------------------------ 16. Footer */
  .footer { border-top: 1px solid var(--rule); padding-block: 2rem; color: var(--muted); font-size: var(--step--1); }
  .footer > .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

  /* one thing in the middle of the page: the QR code
     <main class="qr wrap"><img src="img/qr-code.svg" alt="QR Code"><a class="brand" href="index.html">…</a></main> */
  .qr { display: grid; justify-items: center; align-content: center; gap: 1.5rem; padding-block: clamp(2rem, 8vw, 4.5rem); text-align: center; }
  .qr > img { width: min(100%, 300px); border-radius: var(--radius); }
  .qr .brand { flex: none; }
}

/* ------------------------------------------------------------------ 17. Colour classes
   Put .line-* on anything — a tag, a button, a route, an entry, a whole page (<html class="line-orange">) —
   and every accent inside it takes that line's colour. */
@layer metro.utilities {
  .line-red { --line: var(--red); --line-fill: var(--red-fill); --on-line: var(--red-on); }
  .line-green { --line: var(--green); --line-fill: var(--green-fill); --on-line: var(--green-on); }
  .line-blue { --line: var(--blue); --line-fill: var(--blue-fill); --on-line: var(--blue-on); }
  .line-sky { --line: var(--sky); --line-fill: var(--sky-fill); --on-line: var(--sky-on); }
  .line-brown { --line: var(--brown); --line-fill: var(--brown-fill); --on-line: var(--brown-on); }
  .line-orange { --line: var(--orange); --line-fill: var(--orange-fill); --on-line: var(--orange-on); }
  .line-violet { --line: var(--violet); --line-fill: var(--violet-fill); --on-line: var(--violet-on); }
  .line-yellow { --line: var(--yellow); --line-fill: var(--yellow-fill); --on-line: var(--yellow-on); }
  .line-grey { --line: var(--grey); --line-fill: var(--grey-fill); --on-line: var(--grey-on); }
  .line-lime { --line: var(--lime); --line-fill: var(--lime-fill); --on-line: var(--lime-on); }
  .line-teal { --line: var(--teal); --line-fill: var(--teal-fill); --on-line: var(--teal-on); }
  .line-lavender { --line: var(--lavender); --line-fill: var(--lavender-fill); --on-line: var(--lavender-on); }
  .line-pink { --line: var(--pink); --line-fill: var(--pink-fill); --on-line: var(--pink-on); }
  .route--alt, .entry--alt, .chip--alt, .is-alt { --line: var(--alt); --line-fill: var(--alt); --on-line: var(--on-alt); }
}

/* ------------------------------------------------------------------ 16. Utilities */
@layer metro.utilities {
  .muted { color: var(--muted); }
  .small { font-size: var(--step--1); }
  .gap-top { margin-top: 4rem; }
  .gap-top-sm { margin-top: 2rem; }
  [hidden]:first-child + .gap-top { margin-top: 0; }   /* the first block is hidden: the next one takes its place */
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  [hidden] { display: none !important; }
}
