/**
 * The Rising Compass Transistor, fitted to this theme.
 *
 * The plugin ships a capsule that is complete on its own: it carries its own
 * spacing, type and colour, and it renders correctly on any theme without
 * this file. What it cannot know is how a particular theme lays out a post
 * body, and that is the whole content of this stylesheet.
 *
 * Two things live here, and both are about THIS theme rather than about
 * capsules:
 *
 *   The token map, so a capsule takes the site's spacing scale, typefaces and
 *   ink instead of the plugin's neutral defaults.
 *
 *   The cascade guards and the full-bleed escape, which are written against
 *   .entry-content, .ic-single__main and the contents rail. A different theme
 *   would need entirely different rules here, which is exactly why they are
 *   not in the plugin.
 *
 * @package illus-caden
 */

/* ------------------------------------------------------------
   TOKEN MAP - hand the plugin this theme's scale.
   ------------------------------------------------------------ */
:root {
  --rct-bg:              var(--ic-bg);
  --rct-surface:         var(--ic-surface);
  --rct-text:            var(--ic-text);
  --rct-text-muted:      var(--ic-text-muted);
  --rct-text-strong:     var(--ic-text-strong);
  --rct-rule:            var(--ic-rule);
  --rct-rule-soft:       var(--ic-rule-soft);

  --rct-font-display:    var(--ic-font-display);
  --rct-font-ui:         var(--ic-font-ui);
  --rct-font-mono:       var(--ic-font-mono);

  --rct-space-xs:        var(--ic-space-xs);
  --rct-space-sm:        var(--ic-space-sm);
  --rct-space-md:        var(--ic-space-md);
  --rct-space-lg:        var(--ic-space-lg);
  --rct-col-gap:         var(--ic-col-gap);

  --rct-h4:              var(--ic-h4);
  --rct-text-small:      var(--ic-text-small);
  --rct-text-meta:       var(--ic-text-meta);
  --rct-text-label:      var(--ic-text-label);
  --rct-tracking-label:  var(--ic-tracking-label);
  --rct-leading-snug:    var(--ic-leading-snug);
  --rct-leading-tight:   var(--ic-leading-tight);
  --rct-weight-body:     var(--ic-weight-body);
  --rct-weight-semibold: var(--ic-weight-semibold);
  --rct-radius-sm:       var(--ic-radius-sm);
}

/* ------------------------------------------------------------
   CASCADE GUARDS - hold the capsule's own layout inside a post body

   single.css styles the prose of a post through .entry-content, and
   those rules are all one class plus one element, so they outrank a
   capsule rule written as a single class and reach inside the block.
   Three were doing visible damage, each measured in the browser:

     .entry-content h3  put margin-top: 48px on every capsule heading,
                        which is the empty band at the top of each card
     .entry-content ol  put padding-left: 1.4em on the song list, so
                        every row sat indented from the card edge
     .entry-content li  put margin-bottom: 8px on every song row

   Restating them at .entry-content + class wins on specificity and
   keeps the capsule reading the same wherever it is placed. Anything
   added to the prose rules later has to be answered here too.
   ------------------------------------------------------------ */
.entry-content .rct-capsule__artist { margin: 0; }
.entry-content .rct-versus__label { margin: 0; }
.entry-content .rct-capsule__songs { margin: 0; padding: 0; list-style: none; }
.entry-content .rct-capsule__song { margin: 0; }
.entry-content .rct-capsule__medley {
  margin: var(--rct-space-xs) 0 0;
  padding: 0 0 0 var(--rct-space-md);
  list-style: none;
}
.entry-content .rct-capsule__part { margin: 0; }
.entry-content .rct-versus__acts { margin: 0; padding: 0; list-style: none; }
.entry-content .rct-versus__act { margin: 0; }
.entry-content .rct-capsule__legend { margin: 0; padding: 0 var(--ic-space-lg); list-style: none; }
.entry-content .rct-capsule__legend li { margin: 0; }

/* .entry-content a paints prose links in the accent blue, which is also the
   Elevated tier colour. Inside a capsule that would make a linked title read
   as a reading. The capsule's own treatment is restated here so it outranks
   the prose rule. */
.entry-content .rct-capsule__link {
  color: inherit;
  text-decoration-color: var(--rct-rule);
}
.entry-content .rct-capsule__link:hover {
  color: inherit;
  text-decoration-color: currentColor;
}

/* ------------------------------------------------------------
   CAPSULE SHELL - shared by both blocks
   ------------------------------------------------------------ */
/* Vertical rhythm matches the gap BETWEEN columns, so a stack of blocks is
   spaced the same going down as it is going across. Adjacent capsules and
   rows collapse to a single gap of this size. Keep in step with --ic-col-gap
   in layout-columns.css: the two are the same measure seen on two axes. */
.rct-capsule {
  margin-block: var(--ic-space-lg);
  font-family: var(--ic-font-ui);
  color: var(--ic-text);
}

.rct-capsule__head {
  padding: var(--ic-space-md) var(--ic-space-lg) var(--ic-space-sm);
}

.rct-capsule__artist {
  margin: 0;
  font-family: var(--ic-font-display);
  font-size: var(--ic-h4);
  font-weight: var(--ic-weight-body);
  line-height: var(--ic-leading-tight);
  color: var(--ic-text-strong);
}

.rct-capsule__where {
  margin: var(--ic-space-xs) 0 0;
  font-size: var(--ic-text-label);
  text-transform: uppercase;
  letter-spacing: var(--ic-tracking-label);
  color: var(--ic-text-muted);
}

/* The venue is reference rather than headline, so it drops to its own line
   and loses the uppercase tracking. */
.rct-capsule__venue {
  display: block;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--ic-text-meta);
}

/* ------------------------------------------------------------
   MEASURE - a capsule holds the reading column, like everything else

   Capsules used to break their container and run out to the site
   width, on the argument that a table of readings is not prose and
   720px squeezes it. What that actually produced was a capsule wider
   than the argument quoting it: on a versus block the two artist names
   sat outside the prose edge on both sides, with the figures stranded
   in the middle and a band of empty surface between them. A reader
   following a sentence into a comparison lost the line down the page.

   So a capsule takes the measure. It is quoted INTO writing, and a
   quotation that outruns the page it is set in stops reading as part
   of the piece. Nothing here needs a rule any more: `.ic-single__main
   > *` caps .entry-content at --ic-reading-width and a capsule is a
   block, so it fills that and stops.

   The capsule's own layout answers the narrower box on its own. It is
   a container query context (capsules.css), so its rows restack
   against the card rather than against the viewport, which is what
   makes a half-column capsule work at all.
   ------------------------------------------------------------ */

