/*  asciicast.css — black-on-white terminal theme for the embedded
 *  asciinema player, plus the container the init script mounts into.
 *
 *  The player ships eight themes and NONE is black on white: the only light
 *  one is solarized-light (fg #657b83 on bg #fdf6e3, grey-blue on cream).
 *  A custom theme is a CSS class named `asciinema-player-theme-<name>`
 *  supplying the terminal CSS variables; the init passes theme: "bw".
 *
 *  All 16 colours are defined on purpose.  When only 8 are given the player
 *  maps 8-15 onto 0-7, which would collapse bright-black into plain black —
 *  and bro leans on bright-black (ESC[90m) for the row filler and most of the
 *  chrome, so that distinction has to survive.
 *
 *  Only the 16-colour and default-fg/bg spans obey this theme.  Anything a
 *  view emits as 256-colour (ESC[38;5;N m) or truecolor (ESC[38;2;R;G;B m) is
 *  an absolute value and renders the same under every theme — see the button
 *  palette in be/view/theme.js, which is truecolor and already light-tuned.
 */

.asciinema-player-theme-bw {
  --term-color-foreground: #000000;
  --term-color-background: #ffffff;

  /*  normal                            bright  */
  --term-color-0:  #000000;   --term-color-8:  #6a6a6a;
  --term-color-1:  #c00000;   --term-color-9:  #e00000;
  --term-color-2:  #007f00;   --term-color-10: #00a000;
  --term-color-3:  #8f7000;   --term-color-11: #b08000;
  --term-color-4:  #0000c0;   --term-color-12: #0000e0;
  --term-color-5:  #a000a0;   --term-color-13: #c000c0;
  --term-color-6:  #007f7f;   --term-color-14: #009090;
  --term-color-7:  #c0c0c0;   --term-color-15: #ffffff;
}

/*  Green, cyan and yellow are darkened from the usual terminal values: at
 *  full saturation they are close to unreadable on white.  Bright-black is a
 *  mid grey (#6a6a6a) rather than the pale grey every stock light theme uses,
 *  which is what makes the dotted row filler legible on a light background.
 */

/*  figure.asciicast is the block transclusion; span.asciicast the mid-sentence
 *  one.  mark also copies the URL fragment onto the figure as layout classes
 *  (`todo.cast#right w40`), the same channel pictures use, so float/width come
 *  from style.css and are deliberately not restated here.
 */
figure.asciicast {
  margin: 1em 0;
}

span.asciicast {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

.asciicast .ap-player {
  border: 1px solid #ddd;
}

/*  The caption keeps the link text the page author wrote, so the embed still
 *  says what it is once the anchor itself is gone.
 */
.asciicast figcaption {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.3em;
}
