/* Base Elements */
article img {
    max-width: 100%;
    height: auto;
    border-radius: 2rem;
  }

/* Images in talks content (but not profile images) */
.card-body img:not(.profile-image) {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    margin-bottom: 1rem;
}
  
  /* Typography */
  .day {
    line-height: 1;
  }

  .added-through-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    margin-left: 0.15em;
  }
  
  /* Interactive Elements */
  .form-check-input,
  .theme-btn,
  .expand-header {
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  .theme-btn,
  .expand-header {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--border-radius);
  }
  
  .theme-btn:hover,
  .expand-header:hover {
    background-color: var(--light-secondary);
  }
  
  /* Theme Toggle */
  .theme-toggle {
    position: relative;
  }
  
  .toggle-icon {
    width: 24px;
    height: 24px;
    stroke: var(--light);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }
  
  /* Timeline Component */
  .timeline {
    position: relative;
    padding-left: 30px;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: calc(100% - 10px);
    width: 2px;
    background-color: var(--primary);
  }
  
  .timeline-item {
    position: relative;
    margin-bottom: 30px;
  }
  
  .timeline-marker {
    position: absolute;
    left: -34px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background-color: var(--primary);
    transition: transform 0.3s ease;
  }
  
  .timeline-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 5px rgba(var(--primary), 0.2);
  }
  

  /* Layout Components */
  #expandable-header {
    transition: all 0.3s ease;
  }
  
  /* Media Queries */
  @media (max-width: 768px) {
    .toggle-icon {
      width: 20px;
      height: 20px;
    }
  }

  .disabled-card {
    opacity: 0.7;
    pointer-events: none;
  }

  .construction-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: var(--light);
    padding: 2rem 4rem;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-radius: var(--border-radius);
    white-space: nowrap;
  }

  .btn.disabled {
    pointer-events: none;
    opacity: 0.65;
  }
  .profile-image-wrapper {
    /* Mobile-first: larger circle, centered, no cropping */
    width: clamp(200px, 60vw, 400px); /* on small screens up to 60% viewport, min 200px */
    aspect-ratio: 1 / 1; /* ensures a perfect circle regardless of width */
    position: relative;
    background-color: var(--primary);
    border-radius: 50%;
    margin: 1rem auto; /* equal top and bottom spacing on mobile */
}

.profile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* prevent cropping while keeping full image visible */
    border-radius: 50%;
}

/* Tablet & up: fill most of its column and offset slightly */
@media (min-width: 768px) {
    .profile-image-wrapper {
        width: clamp(200px, 90%, 400px); /* up to 90% of its column */
        margin: 0; /* reset centering */
        transform: translate(-10%, -5%); /* proportional offset to overlap card edges */
    }
}

/* Sticky header behaviour */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1020; /* above content */
  transition: transform 0.3s ease-in-out;
}

#site-header.header-hidden {
  transform: translateY(-100%);
}

/* ---- Blog list styles (migrated from list.html) ---- */
.date-header {
    padding-bottom: 0.5rem;
    border-bottom: none; /* removed old underline */
    margin-top: 0.5rem;
    margin-bottom: 0.25rem !important; /* reduce gap to first time */
}

.day-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem;
}

/* The rule takes the leftover width next to the date instead of its own line. */
.day-divider .day-sep--bar {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
}

.day-divider .date-badge {
    flex: 0 0 auto;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

/* Sidebar stream headings ("Beiträge", "Lesezeichen", "Atmosphere") wear the
   same hairline as the feed's day dividers: label first, rule filling the rest
   of the row. Own class rather than .day-divider so the Bootstrap margin
   utilities on the heading keep deciding its vertical rhythm. */
.heading-rule {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.heading-rule .day-sep--bar {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
}

/* Tighter spacing for posts inside the list view */
.date-content .post {
    margin-top: 0.25rem !important; /* reduce gap between date and time */
    margin-bottom: 0.5rem !important; /* tighter gap before separator */
    padding-bottom: 0.5rem;
}

/* Reduce space between days by overriding Bootstrap mb-4 on the day container */
.day-card {
    margin-bottom: 0.5rem !important;
}

/* Hairline divider — a 1px rule in the CI orange, held back to ~40% so it reads
   as a tint rather than a bar. --primary is defined by every theme stylesheet,
   so this follows whichever one is active. Used for the blog day dividers, the
   footer, in-post <hr> and the dotted-separator shortcode. */
.day-sep,
.e-content hr {
    border: 0;
    height: 1px;
    width: 100%;
    background: var(--primary);
    opacity: 0.4;
    display: block;
    -webkit-mask: none;
            mask: none;
    margin: 1.5rem 0 1.25rem;
}

.date-badge {
    font-size: 1rem;
    font-weight: 500;
}

.expand-button {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.expand-button:hover {
    background-color: var(--promo);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.expand-button.active .expand-icon {
    transform: rotate(180deg);
}

/* Global toggle-all button */
#toggle-all-button {
    position: relative;
    display: inline-block;
    width: 64px; /* track width */
    height: 32px; /* track height */
    padding: 0;
    border: none;
    border-radius: 32px;
    background-color: var(--promo);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#toggle-all-button.active {
    background-color: var(--primary);
}

#toggle-all-button .switch-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    background: var(--light);
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: 2;
}

#toggle-all-button.active .switch-handle {
    transform: translateX(32px);
}

/* visually hide the legacy text node */
#toggle-all-button .expand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Icon positioning */
#toggle-all-button .toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke-width: 2;
    pointer-events: none;
}

#toggle-all-button .icon-read {
    right: 8px;
}

#toggle-all-button .icon-compact {
    left: 8px;
}

/* Icon color behaviour */
#toggle-all-button:not(.active) .icon-compact,
#toggle-all-button.active .icon-read {
    stroke: var(--light);
}

#toggle-all-button.active .icon-compact,
#toggle-all-button:not(.active) .icon-read {
    stroke: var(--dark);
    opacity: 0.6;
}

/* Post transition */
.post-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}

.date-content.expanded .post-content {
    max-height: 100000px;
    opacity: 1;
    margin-top: 1rem;
}

  /* Tiny circle separator between posts in list view */
  .date-content article.post + article.post::before {
      content: '• • •';
      display: block;
      text-align: center;
      color: var(--promo); /* keep existing accent color */
      font-size: 9px; /* tiny circles */
      letter-spacing: 0.35rem; /* a bit more space between them */
      line-height: 1;
      margin: 0.85rem 0 0.65rem; /* slight breathing room around separator */
      /* subtle strengthening without changing hue */
      opacity: 1;
  }

/* Post card spacing */
.post {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: none;
}

/* Day divider */
.date-content {
    padding-bottom: 1rem;
}

/* ---- Feed filter nav (Alles · Beiträge · Lesezeichen · Atmosphere) ------
   Sits above the first day-card on every feed view. Built on the site's own
   .badge pill so it reads as the same family as the tag row rather than a
   new control vocabulary; .is-active borrows the .badge:hover fill so the
   current view looks pressed, and pins that fill through hover so pointing
   at the view you are already on doesn't animate.

   Each view's RSS feed rides inside its own pill, split off by a divider
   rule: one control, two destinations (the page, its feed). The pill is
   therefore the wrapper .feed-filter-item and not an anchor — an <a> cannot
   nest another <a> — so .badge's padding moves off it onto the two anchors
   inside, which is also what lets the divider run the pill's full height
   instead of floating between two insets. */
.feed-filter {
    display: flex;
    flex-wrap: wrap;
    /* Four labelled pills have to clear one line of a col-lg-4 column, so
       every horizontal em counts; wrap stays on only as a fallback for
       viewports narrower than the design targets. */
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.feed-filter-item {
    display: inline-flex;
    align-items: stretch;
    /* The children pad themselves and carry the pill's border (see below), so
       the span keeps only the fill and the rounded shape — overflow clips the
       anchors' square corners back to it. */
    padding: 0;
    border: 0;
    overflow: hidden;
    /* .badge ships `transition: all 0.3s ease` (style.css), which on a nav
       control you click through reads as lag — the fill was still arriving
       after the pointer had moved on. Fast enough to feel like feedback
       rather than animation, and named properties so nothing else is
       silently transitioned. */
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.feed-filter-item > a {
    display: inline-flex;
    align-items: center;
    /* Both halves ride the pill's colour so they invert together with it —
       and so the a:hover rule in style.css (which repaints every anchor
       --secondary !important) can't repaint one half of a filled pill. */
    color: inherit !important;
    text-decoration: none;
    cursor: pointer;
    /* The pill above owns the colour change; the global `a` rule's own
       0.3s colour transition would just lag behind it. */
    transition: none;
    /* .badge's 2px ring, moved off the span and onto the anchors. On the span
       it was a 2px band that lit up with the rest of the pill on hover but
       belonged to neither link — feedback with nothing behind it. Here the
       two anchors tile the pill exactly, so anything that highlights is
       clickable. Pinned to --secondary rather than currentColor so a filled
       pill reads solid, exactly as it did when .badge drew it. */
    border: 2px solid var(--secondary);
    /* Whatever radius the pill ends up with, inherited rather than restated,
       so the two halves can never round differently from the shape they tile. */
    border-radius: inherit;
}

/* Bootstrap's .badge padding, moved down a level — and rebalanced while it
   moved. At .badge's 0.75em type its 0.35em/0.65em came to roughly 4px by
   8px, so a pill's clickable area was the label and very little else. The
   growth is vertical, where the row has space to spare; horizontally these
   are slightly *tighter* than before, because the four pills have to clear a
   single line of a narrow column. .overline's 0.175em tracking is pulled in
   for the same reason — across 34 characters of label it was the widest
   single item in the row. */
.feed-filter-item.overline {
    letter-spacing: 0.1em;
}

/* Both of these drop the inner half of the ring set by `.feed-filter-item > a`
   above: the halves meet in the middle of the pill, and the divider there is
   drawn by .feed-filter-rss::before, not by either anchor's border. Written
   as child selectors purely for specificity — a bare .feed-filter-link loses
   to that two-class rule's `border` shorthand, which left both inner borders
   standing as a 4px bar (visible only on an unfilled pill, since on a filled
   one the border colour matches the fill).

   Each half also flattens the two corners that face the other half, keeping
   the pill's inherited radius on its outer pair. Leaving all four square and
   relying on the wrapper's overflow to clip them cut the border's outer edge
   to the curve while its inner edge stayed square, which read as a
   thickened, lumpy corner. */
.feed-filter-item > .feed-filter-link {
    flex: 1 1 auto;
    justify-content: center;
    white-space: nowrap;
    padding: 0.5em 0.6em;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.feed-filter-item > .feed-filter-rss {
    position: relative;
    padding: 0.5em 0.5em;
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* The divider, as a hairline inset from the pill's edges rather than a
   full-height rule at the outer border's 2px weight — at that weight it read
   as two buttons welded together instead of one control with two halves. The
   gaps top and bottom let the pill's own outline stay the only thing that
   closes the shape. currentColor so it inverts with the label and stays
   visible on a filled pill. */
.feed-filter-rss::before {
    content: "";
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background-color: currentColor;
    opacity: 0.45;
}

/* The label leads; the subscribe half rests a little back and comes up to
   full strength when pointed at, so four glyphs in a row don't compete with
   the four words next to them. Opacity sits on the glyph alone — fading the
   anchor would take the divider with it. */
.feed-filter-rss svg {
    width: 0.85em;
    height: 0.85em;
    display: block;
    opacity: 0.55;
    transition: opacity 0.12s ease;
}

.feed-filter-rss:hover svg,
.feed-filter-rss:focus-visible svg {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .feed-filter-rss svg { transition: none; }
}

.feed-filter-item.is-active,
.feed-filter-item.is-active:hover,
.feed-filter-item.is-active:focus {
    background-color: var(--secondary);
    color: var(--light) !important;
}

/* Compact mode strips the feed back to bare rows, but the filter is
   navigation, not a post — it stays. */
body.compact-mode .feed-filter {
    margin-bottom: 1rem;
}

/* Compact mode drops the seconds. Every row's time column is then exactly
   HH:MM — the same stamp blog/link.html and blog/atproto.html already
   render — so the title column starts at the same place on every row.
   (Each article.post is its own grid, so nothing aligns the columns for
   us; equal content width is what does it.) Expanded mode keeps the full
   HH:MM:SS. */
body.compact-mode .time-seconds {
    display: none;
}

/* ---- Teaser-card clock: expanded hides it, compact needs it -------------
   listLayout: "article" renders a teaser card that already carries its date
   in .post-date-inline just above, so a second stamp inside the card would
   compete with the headline — helper/post-time.html marks it
   .post-time-teaser and it is hidden here. Compact mode has no card, only a
   date | time | title row, so the clock must come back there; scoping the
   hide to body:not(.compact-mode) is what lets it. */
body:not(.compact-mode) .post-time-teaser {
    display: none !important;
}

/* When that hidden clock is the wrapper's only content, the wrapper goes
   too — otherwise an empty div still contributes its Bootstrap mb-2/me-3
   inside the teaser card. Compact mode keeps it: it is that row's grid
   column 2. */
body:not(.compact-mode) .post-time-compact-only {
    display: none !important;
}

/* ---- Compact mode: source mark before the row's title -------------------
   Same look as the homepage bento widget: the karakeep / bluesky / raindrop
   glyph leads the title, so a dense mixed list says what each row is.

   Two copies of the glyph live in the DOM (see blog/link.html,
   blog/atproto-body.html, blog/post-display.html) and exactly one is
   displayed per mode — expanded shows the one in the time column, compact
   shows this one. display:none hides the other from assistive tech as well,
   so nothing is announced twice, and .compact-mark is always the `plain`
   unlinked variant so compact mode never gains a stray tab stop.

   Both rules need !important to beat the blanket compact-mode hide on
   .added-through-mark / .added-through-link further up. */
.compact-mark {
    display: none !important;
}

body.compact-mode :where(.h-feed) article.post .added-through-mark.compact-mark,
body.compact-mode :where(.h-feed) article.post .added-through-icon.compact-mark {
    display: inline-block !important;
    margin-left: 0;
    margin-right: 0.35em;
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.09em;
}

/* ---- Source mark before a widget entry's title --------------------------
   The homepage bento widget mixes written posts, karakeep saves and Bluesky
   activity in one date-ordered list, where nothing else distinguishes them.
   The same glyphs the feed uses (helper/added-through.html) lead each title.

   The base marks were built to *trail* a timestamp, so the inherited
   margin-left has to be flipped to a margin-right here. An entry with no
   addedThrough renders no glyph at all and its title simply starts at the
   left edge — no reserved gutter, since a run of untagged posts shouldn't
   look indented for an icon that never comes. */
.blog-widget-mark {
    margin-left: 0;
    margin-right: 0.35em;
}

/* The title is 1rem against the timestamp's 0.65rem, so the em-sized marks
   come out noticeably bigger here than in the feed. Pin them to the title's
   optical weight instead of letting them scale with it. */
svg.blog-widget-mark {
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.09em;
}

img.blog-widget-mark {
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.12em;
}

/* ---- Sidebar "see all" link under each stream ---------------------------
   One per sidebar section, pointing at that section's filter view. The arrow
   is a separate span so it can slide on hover without dragging the label's
   letter-spacing with it. */
.blog-widget-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    font-size: 0.7rem;
    color: var(--secondary);
    transition: color 0.15s ease;
}

.blog-widget-more:hover,
.blog-widget-more:focus-visible {
    color: var(--primary);
}

.blog-widget-more-arrow {
    transition: transform 0.15s ease;
}

.blog-widget-more:hover .blog-widget-more-arrow,
.blog-widget-more:focus-visible .blog-widget-more-arrow {
    transform: translateX(0.2rem);
}

@media (prefers-reduced-motion: reduce) {
    .blog-widget-more,
    .blog-widget-more-arrow {
        transition: none;
    }

    .blog-widget-more:hover .blog-widget-more-arrow,
    .blog-widget-more:focus-visible .blog-widget-more-arrow {
        transform: none;
    }
}

/* ---- Compact mode: grid view of every post (date | time | title) ---- */
.post-date-inline { display: none; }

.compact-only { display: none; }
body.compact-mode .expanded-only { display: none; }
body.compact-mode .compact-only { display: block; }
body.compact-mode .pagination-nav { display: none !important; }

body.compact-mode .date-header,
body.compact-mode .day-sep,
body.compact-mode :where(.h-feed) article.post .post-content,
body.compact-mode :where(.h-feed) article.post blockquote,
body.compact-mode :where(.h-feed) article.post .quote-text,
body.compact-mode :where(.h-feed) article.post .post-tags,
body.compact-mode :where(.h-feed) article.post .via-attribution,
body.compact-mode :where(.h-feed) article.post .post-time-via,
body.compact-mode :where(.h-feed) article.post .added-through-icon,
body.compact-mode :where(.h-feed) article.post.article-post .article-description,
body.compact-mode :where(.h-feed) article.post.article-post .article-read-more {
    display: none !important;
}

body.compact-mode .date-content article.post + article.post::before {
    display: none;
}

/* Compact mode drops every .day-sep above, which would take the sidebar
   headings' hairline with it — but the sidebar keeps its normal layout in that
   mode, so its rules stay. */
body.compact-mode .heading-rule .day-sep {
    display: block !important;
}

body.compact-mode .day-card {
    margin-bottom: 0 !important;
}

body.compact-mode .date-content {
    padding-bottom: 0;
}

/* Every rule in this section is scoped through :where(.h-feed), because
   "compact" is a property of the feed listing, not of the site. The mode
   class lives on <body> and baseof.html restores it before first paint on
   EVERY page, so without this scope the grid below also caught the one
   article.post that is not a feed row — the single post in blog/full.html —
   and laid a permalink page out as a collapsed feed row: meta line and body
   side by side, the post's text on one unwrapped line running off the page,
   its tags and blockquotes hidden. :where() contributes no specificity, so
   this is purely a filter: nothing inside the feed changes weight. */
body.compact-mode :where(.h-feed) article.post {
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    column-gap: 1rem;
    align-items: baseline;
    margin: 0 !important;
    padding: 0.15rem 0 !important;
    border-bottom: none;
    cursor: pointer;
}

body.compact-mode :where(.h-feed) article.post:hover .post-date-inline a,
body.compact-mode :where(.h-feed) article.post:hover .col-auto.small.color-primary.font-mono a,
body.compact-mode :where(.h-feed) article.post:hover .post-title h2 a,
body.compact-mode :where(.h-feed) article.post:hover .article-title-link .article-title {
    color: var(--secondary) !important;
}

/* Make the whole row a single click target via overlay on the title link */
body.compact-mode :where(.h-feed) article.post {
    position: relative;
}

body.compact-mode :where(.h-feed) article.post .post-title h2 a::before,
body.compact-mode :where(.h-feed) article.post.article-post .article-title-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

body.compact-mode :where(.h-feed) article.post .post-date-inline,
body.compact-mode :where(.h-feed) article.post > .col-auto.small.color-primary.font-mono,
body.compact-mode :where(.h-feed) article.post.article-post .card-body > .col-auto.small.color-primary.font-mono {
    position: relative;
    z-index: 2;
}

body.compact-mode :where(.h-feed) article.post > .post-date-inline {
    display: inline-block;
    grid-column: 1;
    white-space: nowrap;
}

body.compact-mode :where(.h-feed) article.post > .col-auto.small.color-primary.font-mono {
    grid-column: 2;
    margin: 0 !important;
    white-space: nowrap;
}

body.compact-mode :where(.h-feed) article.post > .post-title-row {
    grid-column: 3;
    display: block !important;
    margin: 0 !important;
    min-width: 0;
}

/* ---- Keeping the title column in one place ------------------------------
   Every article.post is its OWN grid, so `max-content` on columns 1 and 2 is
   measured per row — nothing aligns the rows with each other, they only ever
   agreed because their content happened to be the same width. Three separate
   things broke that agreement:

   1. Posts with a viaURL kept an empty wrapper span (its .via-attribution
      hidden, its ms-2 margin not) in the time cell, adding 8px to that row's
      column 2. Fixed at the source — .post-time-via is hidden above.
   2. A plain post nests its title in Bootstrap's .col, whose 12px
      padding-left survives here: .post-title-row zeroes the .row's
      compensating -12px margin but nothing zeroed the .col's padding. Saved
      links, Bluesky rows and teaser cards have no .col, so they sat 12px to
      the left of every ordinary post. Zeroed below.
   3. Nothing stopped a fourth cause appearing later.

   So the two mono columns are now pinned rather than measured. ch is the
   advance of "0", and in a monospace face every digit, "-" and ":" shares
   it — 10ch is exactly "03-04-2026" and 5ch exactly "15:23". It has to be
   set on the cells, not on grid-template-columns: ch there would resolve
   against the article's proportional font instead of the cell's mono one.
   (.font-mono sets family only, no letter-spacing, so the advance is clean.) */
body.compact-mode :where(.h-feed) article.post > .post-date-inline {
    width: 10ch;
}

body.compact-mode :where(.h-feed) article.post > .col-auto.small.color-primary.font-mono,
body.compact-mode :where(.h-feed) article.post.article-post .card-body > .col-auto.small.color-primary.font-mono {
    width: 5ch;
}

/* Bootstrap .col padding — cause 2 above. The title starts at the column
   edge like every other row type; me-3's margin goes too, since nothing sits
   to its right. */
body.compact-mode :where(.h-feed) article.post > .post-title-row > .post-title {
    padding-left: 0;
    padding-right: 0;
    margin-right: 0 !important;
}

/* A post with showTitle:false still needs its title as the row's only
   content here; expanded mode is where it stays hidden. */
body:not(.compact-mode) .post-title-compact-only {
    display: none !important;
}

body.compact-mode :where(.h-feed) article.post .post-title h2,
body.compact-mode :where(.h-feed) article.post.article-post .article-title {
    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.3;
}

body.compact-mode :where(.h-feed) article.post .post-title h2 a {
    font-weight: 400 !important;
}

body.compact-mode :where(.h-feed) article.post.featured .post-title h2,
body.compact-mode :where(.h-feed) article.post.featured .post-title h2 a,
body.compact-mode :where(.h-feed) article.post.article-post.featured .article-title,
body.compact-mode :where(.h-feed) article.post.article-post.featured .article-title-link {
    font-weight: 600 !important;
}

/* Article-style cards collapse into the same grid row as regular posts */
body.compact-mode :where(.h-feed) article.post.article-post > .card,
body.compact-mode :where(.h-feed) article.post.article-post .card-body,
body.compact-mode :where(.h-feed) article.post.article-post .d-flex.justify-content-between {
    display: contents !important;
}

body.compact-mode :where(.h-feed) article.post.article-post .card-body > .col-auto.small.color-primary.font-mono {
    grid-column: 2;
    margin: 0 !important;
    white-space: nowrap;
}

body.compact-mode :where(.h-feed) article.post.article-post .article-title-link {
    grid-column: 3;
    min-width: 0;
}

/* No ↗ in compact mode, on any row type. The whole row is already a single
   click target aimed at the post's permalink (the ::before overlay above),
   so a second link inside it pointing somewhere else entirely reads as a
   mistake — and it is a stray tab stop between every title and the next.
   The arrow earns its place in the expanded feed, where the row is not a
   click target and the outbound destination is worth signalling.

   This used to be scoped to .article-title-link + a.link-out-arrow, so
   teaser cards dropped the arrow but every ordinary post kept it. */
body.compact-mode :where(.h-feed) article.post .link-out-arrow {
    display: none !important;
}

/* External-link arrow after a post title, replacing the old 🔗 emoji.
   Uses the same ↗ the rest of the site uses for outbound links (bento cards,
   talks, card buttons). Sized down against the title and nudged up so it reads
   as a marker rather than a character in the headline; on hover it travels
   along its own diagonal. */
.link-out-arrow {
    display: inline-block;
    margin-left: 0.35em;
    font-size: 0.8em;
    line-height: 1;
    vertical-align: 0.15em;
    transition: transform 160ms ease;
}

.link-out-arrow:hover,
.link-out-arrow:focus-visible {
    transform: translate(0.12em, -0.12em);
}

@media (prefers-reduced-motion: reduce) {
    .link-out-arrow { transition: none; }
    .link-out-arrow:hover,
    .link-out-arrow:focus-visible { transform: none; }
}

/* ---- Breadcrumbs on single post pages ----------------------------------
   Reads as a URL path (/blog / posts / Titel) so it matches the slash-style
   main nav. The section crumbs link back to the feed and to the entry's own
   filter view; the current post is the last crumb, muted and unlinked. A hairline closes the row off from
   the date badge below. */
.post-breadcrumbs .breadcrumb-list {
    display: flex;
    align-items: baseline;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    line-height: 1.4;
    min-width: 0;
}

.post-breadcrumbs .breadcrumb-crumb {
    white-space: nowrap;
}

/* Slash separator between crumbs, held back so the crumbs themselves lead. */
.post-breadcrumbs .breadcrumb-crumb + .breadcrumb-crumb::before {
    content: "/";
    margin: 0 0.4em;
    color: var(--primary);
    opacity: 0.45;
}

/* The title crumb takes the leftover width and ellipsises rather than
   wrapping, so the trail is always exactly one line tall. */
.post-breadcrumbs .breadcrumb-current {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--light-secondary);
}

/* Tighter than the .day-sep default, which is spaced for the feed. */
.post-breadcrumbs .breadcrumb-rule {
    margin: 0.5rem 0 0.6rem;
}

/* ---- Single post header -------------------------------------------------
   One merged meta stamp sitting tight under the breadcrumb rule, then the
   headline. The feed keeps its own split date-header/time-line layout — this
   only applies to blog/full.html, which single.html alone renders. */
.post .post-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
}

/* Middot between meta items, held back so the values lead. The spacing is on
   the separator rather than a flex `gap`, because one middot sits *inside* the
   <time> element (between date and time) where a gap would not reach it. */
.post .post-meta-line .meta-sep {
    margin: 0 0.4em;
    opacity: 0.45;
}

/* The article's own headline. Larger than the feed's fs-5 entries so the post
   page has a clear top, and set in the heading face rather than bold body. */
.post-single-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0.4rem 0 1.1rem;
}

@media (max-width: 575.98px) {
    .post-single-title {
        font-size: 1.5rem;
    }
}

/* Sticky sidebar and tag spacing */
@media (min-width: 992px) {
    #blog-sidebar {
        position: sticky;
        top: 4rem;
    }
}

.sidebar-tags a {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Post count inside a sidebar tag badge. currentColor rather than a fixed
   --secondary so it follows the badge through its hover inversion; the
   opacity keeps it subordinate to the tag name. */
.sidebar-tag-count {
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
}

/* Sidebar cards should size to their content rather than stretch */
#blog-sidebar .card {
    height: auto;
}

.sidebar-tags a {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Sidebar search adjustments */
#blog-sidebar #search {
    width: 100%;
}

#blog-sidebar #search-input {
    font-size: 18px;
    height: 38px;
}

/* Mobile controls styling */
.mobile-controls {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-controls #toggle-all-button {
    margin-bottom: 1rem;
}

/* Desktop controls styling */
.desktop-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* width: 100%; */
}

.desktop-controls #toggle-all-button-desktop {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* Adjust sidebar spacing for mobile */
@media (max-width: 991px) {
    #blog-sidebar {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid var(--promo);
    }
}

/* Search field and reading-mode switch share one row, side by side: the form
   takes the leftover width and the toggle keeps its 64px track next to it.
   The toggle used to sit absolutely inside the input, where it read as part
   of the search field rather than as a control over the list below it. */
.sidebar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-search #search {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-search #toggle-all-button.sidebar-search-toggle {
    flex: 0 0 auto;
    margin: 0;
}

  /* ---- NOW page: link badges and arrow appearance ---- */
  /* Remove border and use solid primary styling on NOW badges */
  .badge-with-arrow {
      border: none !important;
      background-color: var(--primary) !important;
      color: var(--light) !important;
      border-radius: 9999px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .badge-with-arrow:hover {
      background-color: var(--dark) !important;
      color: var(--light) !important;
  }

  /* Arrow reveal animation for badges */
  .badge-with-arrow .badge-arrow {
      display: inline-block;
      width: 0;            /* no space by default */
      margin-right: 0;     /* no gap by default */
      opacity: 0;
      overflow: hidden;    /* hide glyph until expanded */
      transition: width 280ms ease, margin-right 280ms ease, opacity 280ms ease;
    }

  .badge-with-arrow:hover .badge-arrow {
      opacity: 1;
      width: 0.6em;       /* smaller reveal to limit growth */
      margin-right: 10px; /* adjusted spacing for badges */
  }

  /* Arrow reveal animation for large buttons */
  .btn-with-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;        /* keep label centered without hover */
      gap: 0;
      vertical-align: middle;
      white-space: nowrap;
  }

  .btn-with-arrow .btn-arrow {
      display: inline-block;
      width: 0;
      margin-right: 0;
      opacity: 0;
      overflow: hidden;
      transition: width 280ms ease, margin-right 280ms ease, opacity 280ms ease;
  }

  .btn-with-arrow:hover .btn-arrow {
      opacity: 1;
      width: 1.2em;        /* fit → and ↗ without clipping */
      margin-right: 0.6em;
  }

  /* Dark-mode logo panel: dark logos lose contrast on the dark card
     background, so wrap them in a light tile that the logo can sit on.
     Note: --light is redefined to a dark color in dark mode (see theme
     CSS files), so we hard-code a light color here. */
  [data-bs-theme="dark"] .logo-panel {
      background-color: #f5f5f5;
      padding: 10px 14px;
      border-radius: 12px;
  }

  /* Unsplash bento: small square thumbnails.
     Selector includes `img` to outrank `.card-body img:not(.profile-image)`. */
  .unsplash-thumbs img.unsplash-thumb {
      width: 96px;
      height: 96px;
      max-width: 96px;
      object-fit: cover;
      margin: 0;
      border-radius: 8px;
  }

  /* Tighter blockquote spacing across the site */
  blockquote {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    white-space: normal !important; /* avoid extra gaps from preserved newlines */
    font-family: 'PPNeueMontreal-Light', sans-serif;
    font-style: normal;
    font-size: 1.15rem;
    line-height: 1.5;
  }

  /* Extra-tight spacing for featured quotes in posts */
  article.post blockquote,
  blockquote.quote-text {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
  }

  /* Reduce paragraph margins inside blockquotes to prevent large gaps */
  blockquote p {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
  }

  /* Remove outer padding margins on first/last paragraphs within blockquotes */
  blockquote > p:first-child { margin-top: 0 !important; }
  blockquote > p:last-child { margin-bottom: 0 !important; }

/* ---- Rolodex component (migrated from bento/rolodex.html) ---- */
.rolodex-filters {
    display: flex;
    flex-wrap: wrap;
}

.rolodex-filters > .d-flex {
    gap: 8px;
}

.rolodex-filter {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    padding: 6px 14px;
    border: 2px solid var(--secondary);
    border-radius: 4px;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rolodex-filter:hover,
.rolodex-filter.active {
    background-color: var(--secondary);
    color: var(--light);
}

.rolodex-jump-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rolodex-jump-letter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--promo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.rolodex-jump-letter:hover,
.rolodex-jump-letter:focus {
    background: var(--promo);
    color: var(--dark);
}

.rolodex-letter-group {
    margin-bottom: 20px;
}

.rolodex-letter-group.hidden {
    display: none;
}

.rolodex-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rolodex-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--promo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    flex-shrink: 0;
    text-transform: uppercase;
}

.rolodex-divider-line {
    flex: 1;
    height: 2px;
    background: var(--promo);
}

.rolodex-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 767px) {
    .rolodex-grid {
        grid-template-columns: 1fr;
    }
}

.rolodex-card.hidden {
    display: none;
}

.rolodex-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--light);
    border-radius: 16px;
    text-decoration: none;
    color: var(--dark);
    position: relative;
    overflow: hidden;
}

a.rolodex-entry:hover .rolodex-arrow {
    opacity: 1;
    transform: translateX(0);
}

.rolodex-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-bold);
    font-weight: 600;
    font-size: 1rem;
    color: var(--light);
    text-transform: uppercase;
    background-color: var(--primary);
}

.rolodex-icon.rolodex-icon--favicon {
    background-color: transparent;
    border: none;
    padding: 0;
}

.rolodex-preview-refresh {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.rolodex-preview-refresh:hover,
.rolodex-preview-refresh:focus-visible {
    background-color: var(--secondary);
    color: var(--light);
    outline: none;
}

.rolodex-preview-refresh.is-spinning svg {
    animation: rolodex-refresh-spin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clockwise, matching the direction the arrowhead points. */
@keyframes rolodex-refresh-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .rolodex-preview-refresh.is-spinning svg {
        animation: none;
    }
}

.rolodex-favicon {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
    border-radius: 6px;
}

.rolodex-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.rolodex-name {
    font-family: var(--font-bold);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.rolodex-entry:hover .rolodex-name {
    color: var(--secondary);
}

.rolodex-domain {
    font-size: 0.75rem;
    color: var(--light-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rolodex-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.rolodex-badge {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 1px 6px;
    border: 1px solid var(--secondary);
    border-radius: 3px;
    color: var(--secondary);
    line-height: 1.4;
}

.rolodex-arrow {
    font-size: 1rem;
    color: var(--secondary);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.rolodex-count {
    font-size: 0.75rem;
    text-align: center;
}

/* ---- Scrollable gallery (migrated from partials/bento/gallery.html) ---- */
.scrollable-gallery {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.scrollable-gallery::-webkit-scrollbar {
    height: 8px;
}

.scrollable-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable-gallery::-webkit-scrollbar-thumb {
    background-color: var(--bs-primary);
    border-radius: 20px;
    border: 3px solid transparent;
}

.gallery-item {
    flex: 0 0 auto;
}

.gallery-image {
    height: 400px;
    width: auto;
    object-fit: contain;
}

.more-photos-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 10px;
}

/* ---- Blog view toggle (migrated from partials/helper/blog-view-toggle.html) ---- */
.minimal-toggle {
    max-width: 200px;
    margin-left: auto;
}

.toggle-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.toggle-option:hover, .toggle-option:focus {
    opacity: 0.7;
}

.minimal-toggle .toggle-icon {
    width: 24px;
    height: 24px;
    stroke: var(--body-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

@media (max-width: 768px) {
    .minimal-toggle {
        max-width: 180px;
    }
    .toggle-option {
        width: 28px;
        height: 28px;
    }
    .minimal-toggle .toggle-icon {
        width: 20px;
        height: 20px;
    }
}

/* ---- Sidebar profile image (migrated from partials/blog/sidebar.html) ---- */
.sidebar-about-text {
    padding-right: 130px;
}

.sidebar-profile-image {
    position: absolute;
    top: 50%;
    right: -50px;
    transform: translateY(-50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
}

.sidebar-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) and (max-width: 991px) {
    .sidebar-about-text {
        padding-right: 110px;
    }
    .sidebar-profile-image {
        right: -30px;
        width: 110px;
        height: 110px;
    }
}

/* ---- Phase 2: Inline style replacements ---- */

/* ---- Kontakt form (redesigned page) ---- */
.kontakt-form .form-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.kontakt-form .form-control {
    border-radius: 1rem;
    border: 2px solid var(--promo);
    padding: 0.85rem 1rem;
    background: var(--light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kontakt-form .form-control::placeholder {
    color: var(--light-secondary);
    opacity: 1;
}

.kontakt-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 18%, transparent);
    outline: none;
}

.kontakt-form textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

/* Custom tooltip for copy-email button */
#kontakt-copy-email {
    position: relative;
}

#kontakt-copy-email::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--dark);
    color: var(--light);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#kontakt-copy-email::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: var(--dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#kontakt-copy-email:hover::after,
#kontakt-copy-email:focus-visible::after,
#kontakt-copy-email:hover::before,
#kontakt-copy-email:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mirrored profile-image-wrapper: image hangs off the right edge */
.kontakt-image-wrapper {
    width: clamp(200px, 60vw, 400px);
    aspect-ratio: 1 / 1;
    position: relative;
    background-color: var(--primary);
    border-radius: 50%;
    margin: 1rem auto;
}

.kontakt-image-wrapper .profile-image {
    object-fit: cover;
    object-position: 60% 5%;
}

@media (min-width: 768px) {
    .kontakt-image-wrapper {
        width: clamp(240px, 150%, 540px);
        margin: 0;
        transform: translate(10%, -18%);
    }
}

/* Services intro */
.services-intro {
    max-width: 600px;
}

/* Talks date badges */
.talks-date-badge {
    width: 60px;
    height: 60px;
}

.talks-date-badge-sm {
    width: 50px;
    height: 50px;
}

.text-xxs {
    font-size: 0.65rem;
}

/* Blog teaser card */
.card-auto-height {
    height: auto !important;
}

/* Ongoing promo card: orange border, default card background */
.card.promo-outline {
    border: 2px solid var(--promo) !important;
}

/* Promo featured image */
.card-body img.promo-featured-img {
    max-height: 200px;
    width: auto;
    background: transparent;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Search input */
.search-input-lg {
    font-size: 24px;
    height: 50px;
    border-bottom: 2px solid var(--bs-primary);
}

/* References profile image (small) */
.profile-image-wrapper-sm {
    width: 50px;
    height: 50px;
}

/* Dot separators */
.dot-separator {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    border-radius: 50%;
    background-color: var(--primary);
    vertical-align: middle;
    margin: 0 0.3em;
}

.wave {
    display: inline-block;
    transform-origin: 70% 70%;
}

.btn:hover .wave {
    animation: wave 1.2s ease-in-out infinite;
}

@keyframes wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}

.dot-separator-sm {
    display: inline-block;
    width: 0.3em;
    height: 0.3em;
    border-radius: 50%;
    background-color: var(--primary);
    vertical-align: middle;
    margin: 0 0.15em;
}

/* External link preview card (OG-style, inspired by kottke.org) */
.link-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: var(--border-radius, 12px);
    border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    background: var(--card-bg, color-mix(in srgb, currentColor 4%, transparent));
    color: inherit;
    transition: border-color 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--primary) 60%, transparent);
    /* The card's surfaces are color-mixed from currentColor, and the global
       `a:hover` rule (style.css:64) repaints every anchor --secondary
       !important — which dragged the card's whole tint with it. Pinning the
       anchor's own colour holds currentColor still, so the backgrounds stay
       exactly as they are at rest and only the title below reacts. */
    color: inherit !important;
}

/* Hover affects the text, nothing else: orange and underlined. */
.link-card:hover .link-card-title,
.link-card:focus-visible .link-card-title {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.link-card-image {
    flex: 0 0 auto;
    width: clamp(96px, 22%, 160px);
    aspect-ratio: 1 / 1;
    background: #000;
    overflow: hidden;
}

.link-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.link-card-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 1rem;
    background: color-mix(in srgb, currentColor 5%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.link-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Source + publication date on their own line so a long (clamped) title
   can never push them out of the card. */
.link-card-meta {
    font-size: 0.75rem;
    font-family: var(--bs-font-monospace, monospace);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-card-sep {
    opacity: 0.6;
}

.link-card-desc {
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-card-url {
    word-break: break-all;
    font-family: var(--bs-font-monospace, monospace);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Stacked link-card: image full-bleed across the top, text below.

   Used in the feed (article.collapsed-post — blog/list.html, term.html,
   blog/old.html), on every saved-link row (article.link-save, which renders
   the same card since blog/link.html started calling render-remote.html) and
   in every Bluesky post (.atproto-body, both in the feed and on the post's
   own permalink page), plus a saved link's own permalink page
   (article.link-save-single — blog/full.html). The default side-by-side card
   crops its thumbnail to a square, which throws away most of a 1.91:1
   OpenGraph image; in a scrolling feed the picture is the thing that makes
   an entry scannable, so it gets the full column width at its own aspect
   ratio instead. A saved link's permalink page counts as the same case: the
   card is the whole post there, not an aside to it. Only a regular post's
   single page keeps the compact side-thumbnail card, where the card really
   is a footnote to the article.

   :not(.link-save-karakeep) carves out an exception for Karakeep saves
   (addedThrough: karakeep — see partials/blog/link.html and
   partials/blog/full.html): those keep the default side-by-side card
   instead, just with a smaller thumbnail — see the .link-save-karakeep
   rules further below.

   The 420px cap plus object-fit: cover mirrors .atproto-figure img: a very
   tall source (portrait screenshots, some og:image tags) is cropped rather
   than allowed to fill the viewport. */
article.post.collapsed-post .link-card,
article.post.link-save:not(.link-save-karakeep) .link-card,
article.post.link-save-single:not(.link-save-karakeep) .link-card,
.atproto-body .link-card {
    flex-direction: column;
}

article.post.collapsed-post .link-card-image,
article.post.link-save:not(.link-save-karakeep) .link-card-image,
article.post.link-save-single:not(.link-save-karakeep) .link-card-image,
.atproto-body .link-card-image {
    width: 100%;
    /* Height comes from the image itself, so the square ratio has to go —
       otherwise the full-width box just becomes a giant square. */
    aspect-ratio: auto;
}

article.post.collapsed-post .link-card-image img,
article.post.link-save:not(.link-save-karakeep) .link-card-image img,
article.post.link-save-single:not(.link-save-karakeep) .link-card-image img,
.atproto-body .link-card-image img {
    height: auto;
    max-height: 420px;
    object-fit: cover;
}

/* The vertical card is no longer centring text beside a fixed-height
   thumbnail, so the body starts at the top and only pads. */
article.post.collapsed-post .link-card-body,
article.post.link-save:not(.link-save-karakeep) .link-card-body,
article.post.link-save-single:not(.link-save-karakeep) .link-card-body,
.atproto-body .link-card-body {
    justify-content: flex-start;
}

/* Karakeep saves (addedThrough: karakeep) opt back into the default
   side-by-side .link-card instead of the stacked layout above, but with a
   much smaller thumbnail than that card's own 96-160px: Karakeep's own
   screenshot thumbnails are small and secondary, and the point of this
   feed is a scannable link log rather than an image-led card. Mobile-first:
   the compact row stays at every width — just a smaller thumbnail below
   576px — rather than switching to the stacked layout, since the whole
   point of this class is to stay dense. */
.link-save-karakeep .link-card-image {
    width: clamp(120px, 30%, 160px);
    aspect-ratio: 1 / 1;
    background: transparent;
}

.link-save-karakeep .link-card-image img {
    height: 100%;
    max-height: 100%;
    object-fit: cover;
}

@media (max-width: 575.98px) {
    .link-save-karakeep .link-card-image {
        width: 96px;
    }
}

/* Highlighter / Textmarker effect for **bold** inside blog post bodies.
   The wobbly band lives entirely inside an inline SVG used as a
   background-image, so the path itself defines the visible area and text
   on top is never clipped (a previous mask-image approach masked the
   glyphs too). preserveAspectRatio="none" stretches the path to any width
   and box-decoration-break: clone redraws a fresh stroke per wrapped line.
   The fill is baked to dieter's --promo (#FFE1C5); to track other themes,
   override this rule inside the respective theme stylesheet. */
.post .e-content strong {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'><defs><linearGradient id='i' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%23FFE1C5' stop-opacity='0.55'/><stop offset='0.06' stop-color='%23FFE1C5' stop-opacity='0.95'/><stop offset='0.92' stop-color='%23FFE1C5' stop-opacity='0.95'/><stop offset='1' stop-color='%23FFE1C5' stop-opacity='0.7'/></linearGradient></defs><path d='M2,18 Q25,16 50,18 T100,17 T150,18 T198,17 L198,37 Q175,38 150,36 T100,37 T50,36 T2,37 Z' fill='url(%23i)'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: 0 0;
    padding: 0.05em 0.2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Dark mode: keep the bright peach band but flip the text on it to dark,
   like a real highlighter — a dark band under near-white text just muddies
   it. Unlike the light-mode SVG, the band must span the FULL glyph height
   (wobbly top edge instead of starting at half height) and stay near-opaque:
   any part of the now-dark glyphs left over the black page would vanish. */
[data-bs-theme="dark"] .post .e-content strong {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'><defs><linearGradient id='i' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%23FFE1C5' stop-opacity='0.9'/><stop offset='0.06' stop-color='%23FFE1C5' stop-opacity='0.98'/><stop offset='0.92' stop-color='%23FFE1C5' stop-opacity='0.98'/><stop offset='1' stop-color='%23FFE1C5' stop-opacity='0.92'/></linearGradient></defs><path d='M2,4 Q25,2 50,4 T100,3 T150,4 T198,3 L198,37 Q175,38 150,36 T100,37 T50,36 T2,37 Z' fill='url(%23i)'/></svg>");
    color: var(--light); /* dieter dark mode: #2D2321 */
}

/* Strip the left accent border each theme stylesheet puts on blockquotes
   (style.css, barcelona.css, elegant.css, style-2.css). additional.css
   loads after all of them, so this single rule wins site-wide. The
   full-height rule is replaced by a short accent tick at the top left
   (below), so the quote reads as marked rather than fenced. */
blockquote {
    border-left: 0 !important;
    padding-left: 1.25rem;
    position: relative;
}

/* Short fat accent tick marking the start of a quote — roughly one line tall,
   sitting in the padding-left gutter. Rounded caps echo the site's --border-radius.
   Excluded on .twitter-tweet, which is embed markup, not a quote of ours. */
blockquote:not(.twitter-tweet)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 5px;
    height: 1.4rem;
    background: var(--primary);
    border-radius: 999px;
}
/* ---- Saved links (listLayout: "link") ------------------------------------
   A minimal one-entry-per-line feed item so a run of saves reads as a link
   log rather than a stack of posts. Expanded-mode rules are scoped under
   body:not(.compact-mode) — compact mode already lays every .post out on its
   own grid, and this entry's direct children mirror a normal post's so that
   grid needs no changes. */

body:not(.compact-mode) .date-content article.post.link-save {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 0.75rem;
    margin: 0;
    padding: 0.35rem 0;
}

/* The '• • •' separator between posts is a ::before on the *following*
   article — as a flex child it would sit in the middle of the row. Saves
   never show it; the tight rhythm is what groups them instead. */
.date-content article.post.link-save::before {
    content: none !important;
}

/* A little air where a run of saves starts or ends against a real post. */
body:not(.compact-mode) .date-content article.post:not(.link-save) + article.post.link-save {
    margin-top: 0.75rem;
}

body:not(.compact-mode) .date-content article.post.link-save + article.post:not(.link-save) {
    margin-top: 1.25rem;
}

body:not(.compact-mode) :where(.h-feed) article.post.link-save > .link-save-time {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

/* Block flow, not a flex row: the title is running text that wraps to as
   many lines as it needs. Nothing here clamps or ellipsises — saved titles
   are shown in full. */
body:not(.compact-mode) :where(.h-feed) article.post.link-save > .link-save-body {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    display: block;
}

.link-save-link {
    color: inherit;
}

.link-save-link:hover .link-save-title,
.link-save-link:focus-visible .link-save-title {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.link-save-title {
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Host picks up the same uppercase-mono overline treatment the tag badges
   use, so the entry reads in the site's own voice rather than as plain text.
   Base rule covers both modes; white-space/ellipsis keeps a very long
   hostname from blowing out the layout instead of pushing the column. */
.link-save-host {
    font-size: 0.62rem;
    line-height: 1;
    color: var(--secondary);
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Expanded view: the host sits under the title as a small overline. The
   title leads — it is what you are here to read; the host is the secondary
   "where does this go" detail. Either way it gets its own line, which is what
   stops it being orphaned by a wrapping title the way a trailing inline chip
   was. .link-save-link goes block so the two spans stack; an <a> is inline by
   default. The host's top margin is the only added height (~one small line),
   keeping the feed's dense rhythm intact. */
body:not(.compact-mode) .link-save-link {
    display: block;
}

body:not(.compact-mode) .link-save-host {
    display: block;
    margin: 0.15rem 0 0;
}

/* Compact mode: title only. The host used to trail the title inline here,
   but a minimized row is a scan list — the domain doubled the length of
   every save's line and pushed the eye past the title, which is the thing
   being scanned. The karakeep/bluesky mark before the title already says
   where a row came from, and the expanded view's card carries the real
   source line.

   The span stays in the markup: it sits inside the .u-bookmark-of anchor
   that carries this entry's microformats, and hiding it costs nothing. Note
   that this leaves .link-save-host with no mode that shows it — expanded
   hides the whole anchor behind the .link-card (see the rule below) — so the
   expanded-mode block/overline rules for it are currently unreachable. They
   are kept because they are what the anchor falls back to if the card is
   ever taken back out. */
body.compact-mode .link-save-host {
    display: none;
}

/* Expanded mode: swap the plain title/host anchor for the site's real
   .link-card (see helper/card/render-remote.html, called from
   blog/link.html). The anchor stays in the DOM — it carries p-name and
   u-bookmark-of, which the generated card markup has neither of — just
   hidden, so h-entry parsing still finds them. .u-bookmark-of scopes this to
   the linkURL branch only; the else branch's plain title anchor has no such
   class and is left alone. Compact mode is the mirror image: the card hides
   and the anchor's dense line comes back (rule above). */
body:not(.compact-mode) :where(.h-feed) article.post.link-save .link-save-link.u-bookmark-of {
    display: none;
}

/* The card's own mt-4 (tuned for a permalink page, where it follows a
   heading) is too much air here — the anchor above it is hidden, so the
   card is effectively the row's only visible content and needs no extra
   push away from the timestamp it lines up with. */
article.post.link-save .link-card {
    margin-top: 0;
}

/* ---- Saves that carry a card: block flow, full container width -----------
   The dense flex row above puts the time column *beside* the entry, which
   costs the body ~4.6rem of the feed column — fine when the body was one
   line of text, wrong once it is a card whose image and description want
   every pixel of that width. Rows carrying a card fall back to block flow:
   timestamp on its own line, card below it filling the container. That is
   also exactly how a normal post (.collapsed-post) and a Bluesky post
   (.atproto-post) already stack their meta line above their body, so a mixed
   feed now has one alignment instead of two.

   It also sidesteps the baseline problem the flex row had: a flex
   container's first baseline comes from its first flex item, and for a
   stacked card that is the image — so the card's baseline sat a whole
   thumbnail below its own top edge and dragged the time column down with it.

   :has() scopes all of this to rows that actually carry a card; a save
   without a linkURL keeps the dense one-line row it was designed for, and
   browsers without :has() keep that row too. */
body:not(.compact-mode) .date-content article.post.link-save:has(.link-card) {
    display: block;
}

/* YouTube embeds (render-remote.html renders a .youtube-embed instead of a
   .link-card) must get the same block-flow treatment as card rows — without
   this the 16:9 iframe sits beside the timestamp, squeezed into the flex
   row's remaining width. */
body:not(.compact-mode) .date-content article.post.link-save:has(.youtube-embed) {
    display: block;
}

body:not(.compact-mode) :where(.h-feed) article.post.link-save:has(.youtube-embed) > .link-save-time {
    display: block;
    margin-bottom: 0.35rem;
}

/* Rounded corners for the embeds, same treatment as .video-card on the
   homepage bento: radius comes from the theme, overflow:hidden clips the
   iframe itself (YouTube's player has square corners). */
.youtube-embed {
    border-radius: var(--border-radius);
    overflow: hidden;
}

body:not(.compact-mode) :where(.h-feed) article.post.link-save:has(.link-card) > .link-save-time {
    display: block;
    margin-bottom: 0.35rem;
}

/* No time column beside the body any more, so the tag row's matching indent
   goes with it — tags line up under the card's left edge. */
body:not(.compact-mode) :where(.h-feed) article.post.link-save:has(.link-card) > .post-tags {
    padding-left: 0;
}

/* A run of card saves needs real separation between entries; the tight
   no-margin rhythm above was tuned for one-line rows. */
body:not(.compact-mode) .date-content article.post.link-save + article.post.link-save:has(.link-card) {
    margin-top: 1.25rem;
}

body.compact-mode :where(.h-feed) article.post.link-save .link-card {
    display: none;
}

/* Inline bookmark glyph, sized in em so it tracks the time column's type
   and inherits --primary in both themes via stroke="currentColor". */
.added-through-mark {
    color: var(--primary);
    width: 0.95em;
    height: 0.95em;
    vertical-align: -0.13em;
}

/* Both project marks are solid filled glyphs, so at the 0.95em box above
   they read visibly heavier and larger than the type beside them. Scale
   them down to sit at the same optical size next to the timestamp.
   (This used to be bluesky-only, back when karakeep was a light stroked
   bookmark glyph rather than its own filled logo.) */
.added-through-mark-bluesky,
.added-through-mark-karakeep,
.added-through-mark-hermes {
    width: 0.8em;
    height: 0.8em;
    vertical-align: -0.08em;
}

/* The bluesky mark doubles as the permalink to the original post (see
   helper/added-through.html). It's a small mark in a metadata row, not a
   button, so the affordance stays subtle: a slight opacity lift on
   hover/focus, echoed by .link-save-link and .atproto-author a elsewhere on
   the page, plus a visible ring for keyboard users. */
.added-through-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.added-through-link-bluesky .added-through-mark {
    opacity: 0.75;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.added-through-link-bluesky:hover .added-through-mark,
.added-through-link-bluesky:focus-visible .added-through-mark {
    opacity: 1;
    color: color-mix(in srgb, var(--primary) 80%, var(--secondary));
}

.added-through-link-bluesky:focus-visible {
    outline: 1px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Reuse helper/post-tags.html so saves carry the site's real tag badges.
   Only the wrapper spacing changes — mt-4 is far too much air for a
   one-line entry, and Bootstrap sets it with !important. */
body:not(.compact-mode) :where(.h-feed) article.post.link-save > .post-tags {
    flex: 1 1 100%;
    margin-top: 0.2rem !important;
    margin-bottom: 0 !important;
    padding-left: 4.6rem;
}

body:not(.compact-mode) :where(.h-feed) article.post.link-save > .post-tags .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
}

/* Compact mode already hides .post-tags; the marker needs the same. The
   bluesky mark can be wrapped in .added-through-link — hide the wrapper
   too, not just the svg, so no invisible tab stop is left behind. */
body.compact-mode :where(.h-feed) article.post .added-through-mark,
body.compact-mode :where(.h-feed) article.post .added-through-link {
    display: none !important;
}

body.compact-mode :where(.h-feed) article.post.link-save .link-save-title {
    font-size: 0.95rem;
    font-weight: 400;
}

/* Narrow screens: the tag row loses its indent so it doesn't crush. */
@media (max-width: 480px) {
    body:not(.compact-mode) article.post.link-save > .post-tags {
        padding-left: 0;
    }
}

/* ---- Bookmarked Bluesky post (listLayout: "atproto") --------------------
   Reads as a post, not an embed: no outer box. Author line, text, media
   grid, an external link rendered as the site's own .link-card (see
   helper/card/render-remote.html), and a permalink out — the vertical gap
   alone keeps the parts from colliding, the way .link-save-* has no border
   or background either. */
article.post.atproto-post > .atproto-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.atproto-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.atproto-author a {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    min-width: 0;
    color: inherit;
}

/* Small and circular; a missing avatar simply leaves no <img> in the
   markup (see the `with` guard in the partial), so there is never a
   broken-image icon to degrade. */
.atproto-avatar {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.atproto-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.atproto-author a:hover .atproto-name,
.atproto-author a:focus-visible .atproto-name {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.atproto-handle {
    font-size: 0.72rem;
    opacity: 0.7;
}

.atproto-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.atproto-text:empty {
    display: none;
}

.atproto-text > p:last-child {
    margin-bottom: 0;
}

/* ---- The post a post quotes -------------------------------------------
   A quote post embeds another post; this is that inner one. It reads as
   nested rather than as a second entry: inset behind a rule on the left,
   its type a step down from the outer post's, its author line lighter than
   the one above it. No box or fill — the outer post has none either (see
   the section head above), and giving the quote one would make the quoted
   post the loudest thing in an entry that is not about it.

   The left rule rather than a full border because the quote is a
   continuation of the post's own thought, the same reason a blockquote is
   marked on one edge instead of framed. */
.atproto-quoted {
    border-left: 2px solid color-mix(in srgb, currentColor 18%, transparent);
    padding-left: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.atproto-quoted-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    /* A shade back from the outer author line: this is who is being
       quoted, not who is being published. */
    opacity: 0.8;
}

.atproto-quoted-author a {
    display: flex;
    align-items: baseline;
    gap: 0.3em;
    min-width: 0;
    color: inherit;
}

.atproto-quoted-author:hover .atproto-name,
.atproto-quoted-author:focus-within .atproto-name {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* Smaller than the outer avatar (28px), so the nesting is legible at a
   glance rather than only on reading. */
.atproto-quoted .atproto-avatar {
    width: 22px;
    height: 22px;
}

.atproto-quoted .atproto-name {
    font-size: 0.82rem;
}

.atproto-quoted-text {
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.9;
}

.atproto-quoted-text > p:last-child {
    margin-bottom: 0;
}

/* render-remote.html ships its card with a Bootstrap mt-4 for the general
   case (a card following flowing prose). Inside atproto-body the flex
   column's own gap already spaces it from the text/media above, so the
   extra margin only needs zeroing here. */
.atproto-body .link-card {
    margin-top: 0;
}

/* Bluesky posts: the external card sheds its own box. It becomes a plain
   full-width image with title/host/description flowing beneath it — the way
   bsky.app renders an external embed inside a post — instead of a card
   nested in a card now that .atproto-body itself is a card. Border, tinted
   background and hover-border go; the title keeps its orange hover.

   The image bleeds edge-to-edge across the card: negative margins cancel
   the card's own padding (1rem 1.25rem, rule above), so the picture touches
   the border like bsky.app's embeds do. Square corners — the card's rounding
   is what gives the embed its shape, the image needs none of its own. The
   flex-column gap above would add a visible seam between card padding and
   image on the top edge; margin-top: -0.6rem folds it away. */
.atproto-body .link-card {
    display: block;
    border: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.atproto-body .link-card:hover,
.atproto-body .link-card:focus-visible {
    border-color: transparent;
}

.atproto-body .link-card-image {
    width: calc(100% + 2.5rem);
    margin: -0.6rem -1.25rem 0;
    border-radius: 0;
    overflow: hidden;
    background: #000;
}

/* The text strip below the image mirrors bsky.app's embed: a subtly tinted
   band spanning the card's full width — negative margins cancel the card
   padding left/right/bottom, and the card's own border-radius shapes the
   band's bottom corners. Inner padding replaces the cancelled card padding. */
.atproto-body .link-card-body {
    width: calc(100% + 2.5rem);
    margin: 0 -1.25rem -1rem;
    padding: 0.5rem 1.25rem 0.75rem;
    background: color-mix(in srgb, currentColor 4%, transparent);
    border-radius: 0 0 var(--border-radius, 12px) var(--border-radius, 12px);
}

/* One image fills the width; two or more wrap into an even grid, capped so
   a big group never dominates the card. max-width keeps every image inside
   its cell regardless of the source's native dimensions. */
.atproto-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.4rem;
}

.atproto-figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: calc(var(--border-radius, 12px) - 4px);
    background: #000;
}

.atproto-figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    margin: 0;
}

/* Video poster is wrapped in a link out to the Bluesky post (see
   atproto-body.html) instead of being lightboxable. Block display + zero
   line-height keeps the anchor from introducing the usual inline-image gap
   under the poster, and it must carry no decoration of its own so the
   figure's look is unchanged from a plain <img>. position: relative anchors
   the play badge to the poster itself rather than to the figure. */
.atproto-video-poster-link {
    position: relative;
    display: block;
    line-height: 0;
    text-decoration: none;
}

/* A video contributes only its poster frame at sync time — no player ships
   with it, so the frame needs to say "video" on its own and send the click
   to the real post.

   This used to be a "Video · auf Bluesky ansehen" pill in the bottom-left
   corner, which the figure's border-radius + overflow: hidden sliced
   through whenever the poster was narrow enough for the pill to reach the
   rounded edge. A centred disc can't collide with a corner at any cell
   width, and a play triangle is the one video affordance that needs no
   words — the sentence itself now lives in the anchor's title/aria-label,
   so it is still announced and still appears on hover.

   pointer-events: none keeps the badge from swallowing clicks meant for
   the surrounding anchor. */
.atproto-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: color-mix(in srgb, #000 55%, transparent);
    border: 2px solid color-mix(in srgb, #fff 85%, transparent);
    color: #fff;
    pointer-events: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* The optical centre of a triangle sits left of its bounding box, so nudge
   it right to look centred inside the disc. */
.atproto-video-play svg {
    width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.12rem;
}

.atproto-video-poster-link:hover .atproto-video-play,
.atproto-video-poster-link:focus-visible .atproto-video-play {
    background: color-mix(in srgb, var(--primary) 80%, #000);
    transform: translate(-50%, -50%) scale(1.08);
}

/* Small cells (the 2+ image grid on a phone) get a smaller disc so the
   badge never dominates the poster it sits on. */
@media (max-width: 480px) {
    .atproto-video-play {
        width: 2.4rem;
        height: 2.4rem;
    }

    .atproto-video-play svg {
        width: 0.95rem;
        height: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atproto-video-play {
        transition: none;
    }

    .atproto-video-poster-link:hover .atproto-video-play,
    .atproto-video-poster-link:focus-visible .atproto-video-play {
        transform: translate(-50%, -50%);
    }
}

/* Compact mode: collapse to the same single grid row every other post type
   gets. Avatar, media grid and external card would overwhelm a one-line
   list, so only the author name survives as the row's text. */
body.compact-mode :where(.h-feed) article.post.atproto-post > .atproto-body {
    display: block;
    margin: 0;
}

body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-avatar,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-handle,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-text,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-media,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-quoted,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-body .link-card {
    display: none !important;
}

body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-author,
body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-author a {
    display: inline;
}

body.compact-mode :where(.h-feed) article.post.atproto-post .atproto-name {
    font-size: 0.95rem;
    font-weight: 400;
}

/* ---- Lists in post bodies ------------------------------------------------
   Markers only: the accent colours the bullet or the number, the text itself
   stays body colour. Done with ::marker rather than list-style: none plus a
   ::before, so the list stays a real list — wrapped lines still hang against
   the text edge and screen readers keep the semantics.
   Scoped to .e-content because half the chrome on this site (nav, bento
   cards, tag rows) is also a <ul> and must not pick this up. */
.post .e-content ul,
.post .e-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

/* The gap between an outside marker and the text is NOT settable directly —
   ::marker takes no margin, and trailing whitespace baked into a
   list-style-type string gets trimmed. Padding on the <li> is the lever that
   actually works: the marker box stays put against the list's padding edge
   while the text moves right. 0.5rem separates them clearly; past ~0.7rem the
   marker stops reading as attached to its item. */
.post .e-content li {
    padding-left: 0.5rem;
    margin-bottom: 0.4rem;
}

.post .e-content li:last-child {
    margin-bottom: 0;
}

/* Bullets: the native round disc, recoloured to --primary. Native rather than
   a list-style-type string, so there is no dependency on string marker support
   (older Safari) and no font-coverage risk for the glyph. font-size scales the
   disc itself; 1.25em gives it enough presence to read as deliberate rather
   than as a browser default that happens to be orange. */
.post .e-content ul {
    list-style-type: disc;
}

.post .e-content ul > li::marker {
    color: var(--primary);
    font-size: 1.25em;
}

/* Numbers get the same mono treatment as the date stamps and tag badges, so
   an ordered list reads in the site's voice. tabular-nums keeps 9. and 10.
   the same width down a long list. */
.post .e-content ol > li::marker {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

/* Nesting steps down to --secondary rather than indenting harder, so a
   sub-level is legible at a glance without eating horizontal space. */
.post .e-content ul ul,
.post .e-content ol ol,
.post .e-content ul ol,
.post .e-content ol ul {
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
}

.post .e-content ul ul > li::marker,
.post .e-content ol ol > li::marker,
.post .e-content ul ol > li::marker,
.post .e-content ol ul > li::marker {
    color: var(--secondary);
}

/* Talks bento widget: the title doubles as the event link, since the card has
   no room for the /talks page's "Mehr erfahren" button. */
.talks-widget-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

/* The global `a:hover` rule (style.css:64) repaints every anchor --secondary
   !important, so the accent colour has to be declared !important to land. */
.talks-widget-title-link:hover,
.talks-widget-title-link:focus-visible {
  color: var(--primary) !important;
  text-decoration: underline;
}

/* "jetzt kostenlos anmelden" marker on talks with open registration. Borrows
   the tag badge's shape (style.css:138) but in the accent colour; the base
   .badge hover paints itself --secondary, which this span must not do since
   it is a label, not a link. */
.talks-signup-badge,
.talks-signup-badge:hover,
.talks-signup-badge:focus {
  border-color: var(--primary);
  background-color: transparent;
  color: var(--primary) !important;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

/* Desktop-only filler card that pads out incomplete bento rows (index.html).
   Painted in the light-mode warm accent (--light-secondary, e.g. #BEA7A0 in
   the dieter theme) so it reads as an intentional tile, not an empty slot. */
.bento-filler {
  border: 0;
  box-shadow: none;
  background-color: var(--light-secondary);
}

/* ---- Bookmarked Bluesky posts: subtle card set-off ----------------------
   The atproto-post deliberately had no outer box; in a feed of otherwise
   unboxed entries it read like native blog content rather than the reposted
   posting it is. A quiet card frame — theme --light background, hairline
   border in --light-secondary, the theme's own border-radius — sets it off
   without restyling its internals (author line, text, media grid, quote
   block all keep their rules). Compact mode is untouched: the collapsed
   one-line row keeps its plain look. */
article.post.atproto-post .atproto-body {
    background-color: var(--light);
    border: 1px solid var(--light-secondary);
    border-radius: var(--border-radius, 12px);
    padding: 1rem 1.25rem;
    /* The external card's image/text band bleed out to this box's edges via
       negative margins (see .atproto-body .link-card-image/-body below) and
       rely on this clip to take the shape of border-radius instead of
       overflowing it with square corners. */
    overflow: hidden;
}

/* The whole card navigates to the original Bluesky post on click (see the
   inline script in blog/atproto.html) — scoped to expanded mode only, since
   compact mode already sets its own cursor on article.post generally. */
body:not(.compact-mode) article.post.atproto-post[data-href] {
    cursor: pointer;
}

/* ---- Radar list: two-column card (content | release/action aside) ----
   Feedback: everything hugged the left edge and the release block wrapped
   loose and flex-wrap-y under the body text. A fixed-width right column
   keeps the release value and the "Quelle" button anchored top-right,
   stacked and never reflowing into the text, while the content column
   stays naturally left-aligned. Below 576px the aside drops under the
   content and switches to left alignment. */
.radar-card-row {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 1.5rem;
    align-items: start;
}

/* ---- Radar visual: square thumb as its own grid zone --------------------
   Feedback: the thumb used to sit loose above the title inside the content
   column (image stacked over text stacked over release = "random", not a
   unit). Giving it a dedicated column — visual | content | release — reads
   as one card instead of three stacked fragments. Stays single-column
   (image on top, full width) below 768px, same width the card itself has
   there (no col-lg-7 cap), where a fixed 160px rail would otherwise crowd
   the text. Border/radius/background mirror .atproto-figure's hairline
   framing so photo content looks consistent across the theme. */
.radar-card-row.has-visual {
    grid-template-columns: 1fr;
}

.radar-visual {
    border: 1px solid var(--light-secondary);
    border-radius: 12px; /* dieter's --border-radius: 50px is pill-shaped at thumb size */
    background-color: var(--light);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

.radar-card-row .radar-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

@media (min-width: 768px) {
    .radar-card-row.has-visual {
        grid-template-columns: minmax(180px, 240px) 1fr 170px;
    }

    .radar-visual {
        width: 100%;
        aspect-ratio: 16 / 9;
        margin-bottom: 0;
    }
}

.radar-item-main {
    min-width: 0;
}

.radar-body {
    margin-top: 0.25rem;
}

.radar-body :last-child {
    margin-bottom: 0;
}

.radar-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.radar-release {
    text-align: right;
}

.radar-release-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--light-secondary);
}

.radar-release-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .radar-card-row {
        grid-template-columns: 1fr;
    }

    .radar-aside {
        align-items: flex-start;
        margin-top: 0.75rem;
    }

    .radar-release {
        text-align: left;
    }
}

/* "next" value (e.g. "Season 2", "Movie") shown bare, no label, as a quiet
   line above the title — Feedback: the "Als Nächstes:" label was noise. */
.radar-next {
    font-size: 0.8rem;
    color: var(--light-secondary);
}
