/* ===========================================================================
   Content pages — the programme.

   The homepage is the tour poster. These are the booklet handed out with it:
   same ink, same paper, different job. The poster shouts one thing; a
   programme is an index you scan to pick one item out of many.

   One device carries all of them. Every row has a left gutter holding the
   item's own unit of measure — how you would ask for the thing out loud:

     a talk        a date            (.gig, in theme.css, since /talks/)
     an article    minutes to read
     a podcast     its episode number
     a broadcast   the community that hosted it
     a workshop    the tech it teaches
     a section     how many things are inside it

   So this is not a new pattern, it is .gig's logic applied to the rest of the
   site. The gutter is 5rem with a 1.3rem gap here too, which is what makes a
   row on /articles/ line up with a row on /talks/.

   Numerals get the large treatment (.feed__mark), words get a compact one
   (.feed__mark--word): a date can be read at a glance, "Kubernetes" cannot be
   set at 1.05rem in 5rem without hyphenating.
   =========================================================================== */

.md-typeset .feed {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  /* overrides the 68ch measure Material sets on top-level lists */
  max-width: none;
}

.md-typeset .feed__item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0 1.3rem;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.md-typeset .feed__item:last-child {
  border-bottom: 1px solid var(--rule);
}

/* --- The mark -------------------------------------------------------------
   Same treatment as .gig__date, deliberately: it is what makes six different
   kinds of row read as one family. */

.md-typeset .feed__mark {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-variation-settings: "wdth" 84;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
  white-space: nowrap;
}

/* The unit under the number: "min", "épisodes", or the show an episode belongs
   to. Mirrors .gig__year, but allowed to wrap — "Tranches de Tech" is a unit
   too and it does not fit the gutter on one line. */
.md-typeset .feed__unit {
  font-size: 0.58em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: normal;
  color: var(--ink-faint);
}

/* A word in the gutter instead of a number — a tech, a community. Smaller and
   allowed to wrap, so "Kubernetes" and "GitLab France" both fit the column. */
.md-typeset .feed__mark--word {
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: normal;
  overflow-wrap: break-word;
}

/* --- The body ------------------------------------------------------------ */

.md-typeset .feed__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

/* Two authoring routes land here. A generated page emits the class directly;
   a hand-written page keeps `## Title` inside the body div so the owner goes
   on writing Markdown, and md_in_html turns it into a real heading. Both must
   look the same, so the element selectors are listed alongside the class.

   These are real headings, so they have to outrank Material's h2/h3 sizes and
   margins — hence every property set rather than only the ones that differ. */
.md-typeset .feed__title,
.md-typeset .feed__body > h2,
.md-typeset .feed__body > h3 {
  margin: 0;
  font-variation-settings: "wdth" 102;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--md-default-fg-color);
}

.md-typeset .feed__title a,
.md-typeset .feed__body > h2 a,
.md-typeset .feed__body > h3 a {
  text-decoration: none;
  color: inherit;
}

.md-typeset .feed__title a:hover,
.md-typeset .feed__title a:focus-visible,
.md-typeset .feed__body > h2 a:hover,
.md-typeset .feed__body > h2 a:focus-visible,
.md-typeset .feed__body > h3 a:hover,
.md-typeset .feed__body > h3 a:focus-visible {
  color: var(--link);
  text-decoration: underline;
}

/* A generated row labels its blurb; a hand-written one just writes a Markdown
   paragraph, which arrives with no class at all. Both are the same thing, so
   the bare paragraph is matched too — via :not([class]), because a plain
   `> p` would also outrank .feed__action and flatten the row's call to
   action. */
.md-typeset .feed__blurb,
.md-typeset .feed__body > p:not([class]) {
  max-width: var(--measure);
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Spans with a flex gap, not glyph separators. */
.md-typeset .feed__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.1rem;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}

/* Each row names its own kind on the meta line rather than wearing a label
   above it, so a page reads as one column instead of n headings. */
.md-typeset .feed__kind {
  flex: 0 0 auto;
  font-variation-settings: "wdth" 88;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--signal);
}

/* The one thing a row wants you to do: start the lab, read the post. */
.md-typeset .feed__action {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 650;
}

/* --- Embeds ---------------------------------------------------------------
   Capped well under the column width on purpose: a page of replays should
   read as a list you scan, not a stack of billboards you scroll.

   mkdocs-video emits `height: 22.172vw` as an inline style — a height driven
   by the viewport, which is wrong inside a constrained column and gets worse
   the wider the screen. The container owns the ratio instead, and overriding
   an inline style is what !important is for. */

/* The plugin's own container is the target, so a hand-written page needs no
   wrapper markup around the embed — `![type:video](url)` on its own line is
   the whole authoring contract. */
.md-typeset .feed__body .video-container,
.md-typeset .feed__body .mkdocs-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 34rem;
  aspect-ratio: 16 / 9;
  margin: 0.25rem 0 0;
}

.md-typeset .feed__body .video-container iframe,
.md-typeset .feed__body .mkdocs-video-wrapper iframe {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* mkdocs-video emits the container inside a paragraph, which would add
   Material's paragraph margin under every embed. */
.md-typeset .feed__body p:has(> .video-container),
.md-typeset .feed__body p:has(> .mkdocs-video-wrapper) {
  margin: 0;
}

/* Wrapper for an embed that is pasted rather than generated by the plugin —
   a Spotify player. Plain HTML, so md_in_html passes it straight through. */
.md-typeset .feed__media {
  width: 100%;
  max-width: 34rem;
  margin: 0.25rem 0 0;
}

/* An audio episode has no 16:9 frame to fill — the player is a fixed band. */
.md-typeset .feed__audio {
  display: block;
  width: 100%;
  /* Spotify's compact player. The full 352px variant adds a track list a
     single episode has no use for. */
  height: 152px;
  margin: 0;
  border: 0;
  border-radius: 12px;
}

/* --- Page openings -------------------------------------------------------
   A content page says what it holds before the list starts: one line of prose
   and, where there is a number worth knowing, the count. */

.md-typeset .lede {
  max-width: var(--measure);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --- Narrow screens ------------------------------------------------------
   The gutter narrows rather than collapsing: a two-column row is still the
   most scannable shape on a phone, and the marks are short by design. Matches
   the breakpoint .gig uses so the two never disagree. */

@media screen and (max-width: 29.9375em) {
  .md-typeset .feed__item {
    grid-template-columns: 3.6rem 1fr;
    gap: 0 0.9rem;
  }

  .md-typeset .feed__mark {
    font-size: 0.92rem;
  }

  .md-typeset .feed__mark--word {
    font-size: 0.72rem;
  }
}
