/* ==========================================================================
   bandter.css  --  bandter.org, a tree of blogs
   One hand-written stylesheet. No build step, no framework, no external
   requests. Markup contract: design/README.md. Textures: tools/make_crunch.py.

   THE IDEA: crisp + crunchy. Every piece of text is live HTML in an
   era-correct system font, sharp on any screen. Every *surface* underneath is
   a tiny real-JPEG-damaged PNG scaled up with `image-rendering: pixelated`,
   so the 8x8 DCT blocks are razor sharp too. 2005 blog-template bones,
   profile-page details tables, and a faint smell of parked domain.

   CONTENTS
     1.  Tokens (palette, fonts)
     2.  Base elements
     3.  Backdrop + per-site moods (site-main / -login / -admin / -bestof)
     4.  Navstrip (the thin bar on top of every page)
     5.  Wrap, banner, tabs / crumbs strip
     6.  Columns + page heads
     7.  Boxes, details table, contact grid, odometer
     8.  Entries (date head, ticket chip, post footer), setlist, banter
     9.  Clap-o-meter
     10. Comments
     11. Forms, buttons, Markdown editor
     12. Data tables, status pills, version diff
     13. Tree of blogs, Top 8, avatars
     14. Notices, pager, small bits (blinkie, marquee, mock notes)
     15. Footer (link farm, 88x31 badges)
     16. site-login   -- the redirect gateway
     17. site-admin   -- the grim control panel
     18. site-bestof  -- the tacky chart show
     19. Error pages
     20. Glitch keyframes
     21. Small screens
     22. Reduced motion, print
   ========================================================================== */


/* 1. TOKENS ============================================================== */

:root {
  /* the official logo's own colours (public/img/bandter-logo.svg) */
  --logo-purple: #6363ad;
  --logo-deep: #362d67;
  --logo-night: #241d4a;      /* a shade under --logo-deep, for dark chrome */
  --logo-blue: #609dc9;
  --logo-cream: #fbf6ef;

  /* paper + ink */
  --ink: #1b1424;
  --ink-soft: #5b5068;
  --paper: var(--logo-cream);
  --paper-dim: #efe8da;
  --rule: #b7ad95;
  --void: #0b0618;            /* what is behind everything */

  /* the loud ones */
  --orange: #ff6600;          /* blog-template orange */
  --hot: #ff00be;             /* chroma bleed, magenta side */
  --cyan: #00dcff;            /* chroma bleed, cyan side */
  --acid: #c6ff00;            /* hover highlighter */
  --gold: #ffcc00;

  /* links */
  --link: #0033cc;
  --link-visited: #6a1b9a;

  /* states */
  --ok: #18753a;
  --warn: #a85400;
  --err: #c4001a;

  /* per-band accent: set `style="--band-hue: N"` (0-359) on .wrap.
     The default is the logo's purple. */
  --band-hue: 244;
  /* per-site backdrop treatment, see section 3 */
  --backdrop-filter: none;

  --font-body: Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-head: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-loud: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --font-silly: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
}

/* Colours derived from --band-hue. They are declared here (not on :root) so
   they are recomputed wherever a new --band-hue is set. */
.wrap,
.avatar,
[style*="--band-hue"] {
  --band: hsl(var(--band-hue) 92% 44%);
  --band-mid: hsl(var(--band-hue) 88% 33%);    /* dark enough for white text at any hue */
  --band-dark: hsl(var(--band-hue) 80% 24%);
  --band-head: hsl(var(--band-hue) 100% 78%);
  --band-label: hsl(var(--band-hue) 75% 82%);
  --band-value: hsl(var(--band-hue) 75% 93%);
}


/* 2. BASE ================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--void);
  scrollbar-color: var(--hot) var(--void);   /* the IE5.5 coloured scrollbar lives */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 13px/1.6 var(--font-body);
  /* inherited: every raster on the site is meant to be blocky, never smoothed */
  image-rendering: pixelated;
}

::selection { background: var(--hot); color: #fff; }

a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover, a:focus-visible { background: var(--acid); color: #000; text-decoration: none; }
:focus-visible { outline: 2px dashed var(--hot); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 1.4em 0 .5em; }
p, ul, ol, table, blockquote, pre { margin: 0 0 1em; }
img { max-width: 100%; height: auto; border: 0; }
hr { border: 0; border-top: 1px dotted var(--rule); margin: 1.5em 0; }
small, .small { font-size: 11px; }
code, kbd, pre { font-family: var(--font-mono); font-size: 13px; }
table { border-collapse: collapse; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.skip-link { position: absolute; left: -999em; }
.skip-link:focus { left: 8px; top: 8px; z-index: 99; padding: 6px 10px; background: var(--acid); color: #000; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* A <button> that looks like a link: for POST actions that read as links
   (sign out, delete comment). */
.linkbtn {
  appearance: none; border: 0; padding: 0; margin: 0; background: none;
  font: inherit; color: var(--link); text-decoration: underline; cursor: pointer;
}
.linkbtn:hover, .linkbtn:focus-visible { background: var(--acid); color: #000; text-decoration: none; }
.linkbtn--danger { color: var(--err); }
.inline-form { display: inline; }


/* 3. BACKDROP + SITE MOODS =============================================== */

/* The backdrop is one 256px JPEG-murdered tile shown at 3x. It lives on a
   fixed pseudo-element so a per-site `filter` can recolour it without
   touching the content. Every ~11s it "drops a frame" (section 20). */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: var(--void) url(../img/crunch-bg.png) 0 0 / 768px 768px;
  filter: var(--backdrop-filter);
  animation: frame-drop 11s steps(1) infinite;
}

.site-main   { --backdrop-filter: none; }
.site-login  { --backdrop-filter: grayscale(.7) contrast(.3) brightness(1.75); }
.site-admin  { --backdrop-filter: grayscale(1) brightness(.75) contrast(.9); --band-hue: 216; }
.site-bestof { --backdrop-filter: hue-rotate(140deg) saturate(1.5) brightness(.85); --band-hue: 46; }


/* 4. NAVSTRIP ============================================================ */

/* Blog-host navbar: logo chip, three links, sign-in state on the right.
   The gradient is banding.png (a gradient re-saved 100 times) multiplied
   onto a flat colour. */
.navstrip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px;
  min-height: 42px; padding: 3px 10px;
  color: #fff; font-size: 12px;
  background: var(--logo-purple) url(../img/banding.png) 0 0 / 128px 100% repeat-x;
  background-blend-mode: multiply;
  border-bottom: 1px solid #000;
  box-shadow: 0 2px 0 var(--cyan), 0 4px 0 var(--hot);
}
.navstrip a, .navstrip .linkbtn { color: #fff; }
.navstrip a:hover, .navstrip a:focus-visible,
.navstrip .linkbtn:hover, .navstrip .linkbtn:focus-visible { color: #000; }
.navstrip ul { display: flex; flex-wrap: wrap; gap: 0 14px; list-style: none; margin: 0; padding: 0; }
/* The official logo, untouched; the glitch happens *around* it: a cyan and
   a magenta drop-shadow, like a print a hair out of register. */
.navstrip__logo { display: block; line-height: 0; padding: 2px; background: none !important; }
.navstrip__logo img {
  display: block; width: 128px; height: 32px;
  filter: drop-shadow(2px 0 0 var(--hot)) drop-shadow(-2px 0 0 var(--cyan));
}
.navstrip__logo:hover img, .navstrip__logo:focus-visible img { filter: drop-shadow(4px 0 0 var(--acid)) drop-shadow(-4px 0 0 var(--hot)); }
/* sub-site label next to the logo: "login", "admin", "best of" */
.navstrip__site {
  padding: 0 7px; font: bold 13px/1.5 var(--font-mono);
  background: var(--acid); color: #000; border: 1px solid #000; transform: rotate(-3deg);
}
.navstrip__user { margin-left: auto !important; }
.navstrip__user li + li::before { content: "|"; margin-right: 14px; opacity: .6; }


/* 5. WRAP, BANNER, STRIP ================================================= */

.wrap {
  position: relative;
  max-width: 1000px; margin: 26px auto 70px;
  background: var(--paper) url(../img/crunch-paper.png) 0 0 / 384px 384px;
  border: 1px solid #000;
  /* misregistered print: cyan plate left, magenta plate right, hard drop */
  box-shadow: -5px 0 0 var(--cyan), 5px 0 0 var(--hot), 10px 12px 0 rgba(0,0,0,.75);
}

/* --- banner ------------------------------------------------------------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 190px; padding: 22px 26px 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; background: #0b0618;
  border-bottom: 1px solid #000;
}
/* backdrop image on ::before so it can be hue-rotated without tinting text */
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url(../img/banner-main.png) 0 0 / 100% 100%;
}
/* scanlines + a dark foot so the title always has something to stand on */
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(8,3,20,.7), rgba(8,3,20,.1) 60%, rgba(8,3,20,0)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.2) 0 1px, transparent 1px 4px);
}
.banner--band::before {
  background-image: url(../img/banner-band.png);
  filter: hue-rotate(calc(var(--band-hue) * 1deg)) saturate(1.3);
}

.banner__kicker {
  align-self: flex-start; margin: 0 0 8px; padding: 1px 7px;
  font: bold 13px var(--font-mono);
  background: var(--acid); color: #000; border: 1px solid #000;
  transform: rotate(-1.2deg);
}
.banner__kicker a { color: inherit; text-decoration: none; }

.banner__title {
  margin: 0; font: 68px/.95 var(--font-loud); letter-spacing: .01em;
  text-transform: none; overflow-wrap: anywhere;
}
.banner__title a {
  position: relative; display: inline-block;
  color: #fff; text-decoration: none; background: none;
  text-shadow: 3px 0 0 var(--hot), -3px 0 0 var(--cyan), 0 4px 0 #000;
}
/* Two extra copies of the title (from data-text), each clipped to a thin
   horizontal slice and shoved sideways: misaligned scanline slices. Static
   by default; `slice-a/b` make them jump now and then. */
.banner__title a::before,
.banner__title a::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  text-shadow: none; pointer-events: none;
}
.banner__title a::before {
  color: var(--cyan); clip-path: inset(24% 0 66% 0); transform: translateX(-10px);
  animation: slice-a 7s steps(1) infinite;
}
.banner__title a::after {
  color: var(--hot); clip-path: inset(64% 0 27% 0); transform: translateX(12px);
  animation: slice-b 5s steps(1) infinite;
}

/* Site banner: the official logo, crisp, with two JPEG-crunched slices of
   itself (logo-crunch.png) knocked sideways across it. Same slice animation
   as the text titles. */
.banner__logo { margin: 0; line-height: 0; }
.banner__logo a { position: relative; display: inline-block; max-width: 100%; background: none; }
.banner__logo img {
  display: block; width: 440px; max-width: 100%; height: auto;
  filter: drop-shadow(5px 0 0 var(--hot)) drop-shadow(-5px 0 0 var(--cyan)) drop-shadow(0 6px 0 #000);
}
.banner__logo a::before,
.banner__logo a::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url(../img/logo-crunch.png) 0 0 / 100% 100%;
}
.banner__logo a::before { clip-path: inset(9% 0 81% 0); transform: translateX(-16px); animation: slice-logo 7s steps(1) infinite reverse; }
.banner__logo a::after {
  clip-path: inset(80% 0 10% 0); transform: translateX(20px);
  filter: hue-rotate(95deg) saturate(1.8);
  animation: slice-logo 5s steps(1) infinite;
}

.banner__tagline {
  margin: 10px 0 0; max-width: 46em;
  font: italic 15px/1.4 var(--font-serif); color: #fff;
  text-shadow: 0 1px 0 #000, 0 0 6px #000;
}
.banner__tagline b { font-style: normal; color: var(--acid); }

/* --- strip: tabs (site pages) or crumbs (band pages) --------------------- */
/* The drips hanging off the banner are a separate RGBA image painted on
   ::before, stretched to 4x like the banner so the columns line up. They
   sit behind the tab / crumb labels (z-index -1 inside the strip) and hang
   --drip below the strip. --drip must stay smaller than the top padding of
   .col-main / .col-side so the first heading always clears them. */
.strip {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 4px;
  --drip: 12px;
  min-height: 38px; padding: 8px 14px 0;
  background: var(--logo-night); color: #fff;
  border-bottom: 3px solid #000;
}
.strip::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 3px + var(--drip)); z-index: -1;
  background: url(../img/melt-main.png) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
.strip--band::before {
  background-image: url(../img/melt-band.png);
  filter: hue-rotate(calc(var(--band-hue) * 1deg)) saturate(1.3);
}
.strip ul { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; margin: 0; padding: 0; }

.tabs a {
  display: block; padding: 6px 13px 5px;
  font: bold 13px var(--font-head); text-decoration: none;
  /* Label legibility comes first: a solid face, with the banding texture
     only as a soft-light sheen, and the glitch kept to the tab's edges
     (the misregistered cyan / magenta side shadows). */
  color: #fff; background: #4a4496 url(../img/banding.png) 0 0 / 128px 100% repeat-x;
  background-blend-mode: soft-light;
  text-shadow: 0 1px 0 #000, 0 0 2px #000;
  border: 1px solid #000; border-bottom: 0;
  border-radius: 9px 9px 0 0;
  box-shadow: -2px 0 0 var(--cyan), 2px 0 0 var(--hot);
}
.tabs a:hover, .tabs a:focus-visible { background-color: var(--acid); color: #000; text-shadow: none; }
.tabs a[aria-current="page"] {
  background: var(--paper); color: #000; text-shadow: none; position: relative; top: 3px; padding-bottom: 8px;
}
.tabs .tabs__cta a { background-color: #e04e00; }

.crumbs { align-items: center; padding-bottom: 8px; font: bold 13px var(--font-mono); }
.crumbs li + li::before { content: "\25B8"; margin-right: 4px; color: var(--acid); }
.crumbs a { color: #fff; padding: 1px 4px; background: rgba(0,0,0,.55); }
.crumbs a:hover, .crumbs a:focus-visible { background: var(--acid); color: #000; }
.crumbs [aria-current="page"] { padding: 1px 4px; background: var(--paper); color: #000; }


/* 6. COLUMNS + PAGE HEADS ================================================ */

.cols {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px;
}
.cols--full { grid-template-columns: minmax(0, 1fr); }
.col-main { padding: 22px 26px 30px; min-width: 0; }
.col-side {
  padding: 22px 16px 30px; min-width: 0;
  border-left: 1px dotted var(--rule);
  background: rgba(255,255,255,.45);
}

.pagehead {
  margin: 0 0 14px; padding-bottom: 5px;
  font: bold 26px/1.15 var(--font-head); color: #000;
  border-bottom: 4px double var(--band, var(--orange));
  text-shadow: 2px 0 0 rgba(0,220,255,.55), -2px 0 0 rgba(255,0,190,.45);
}
.pagehead small { font: normal 13px var(--font-body); color: var(--ink-soft); text-shadow: none; }
.subhead {
  margin: 26px 0 10px; padding: 3px 8px;
  font: bold 14px var(--font-head); color: #fff;
  background: var(--band-dark, var(--logo-deep)) url(../img/crunch-gray.png) 0 0 / 256px 256px;
  background-blend-mode: hard-light;
  border: 1px solid #000;
}
.lede { font: 16px/1.55 var(--font-serif); }


/* 7. BOXES, DETAILS TABLE, CONTACT GRID, ODOMETER ======================== */

/* Sidebar module. Head = profile-page header bar in the band's colour. */
.box {
  margin: 0 0 18px; background: #fff;
  border: 1px solid var(--band-dark);
  box-shadow: 3px 3px 0 rgba(0,0,0,.18);
}
.box__head {
  margin: 0; padding: 4px 8px;
  font: bold 13px var(--font-body); color: var(--band-dark);
  background: var(--band-head) url(../img/banding.png) 0 0 / 128px 100% repeat-x;
  background-blend-mode: soft-light;
  border-bottom: 1px solid var(--band-dark);
}
.box__body { padding: 9px 10px; overflow-wrap: anywhere; }
.box__body > :last-child { margin-bottom: 0; }
.box__body ul { padding-left: 18px; }
.box--admin { border: 2px dashed #000; background: #ffffcc; }
.box--admin .box__head { background-color: #000; color: var(--acid); background-blend-mode: normal; background-image: none; }
.box--cta { border: 3px double var(--hot); text-align: center; }
.box--cta .box__body { padding: 14px 10px; }

/* label cell / value cell, exactly like you remember */
.details { width: 100%; border-collapse: separate; border-spacing: 2px; margin: 0; }
.details th, .details td { padding: 4px 6px; text-align: left; vertical-align: top; font-size: 13px; }
.details th { width: 1%; white-space: nowrap; overflow-wrap: normal; background: var(--band-label); color: var(--band-dark); font-weight: bold; }
.details td { background: var(--band-value); overflow-wrap: anywhere; }

.extended {
  margin: 0 0 18px; padding: 8px 6px; text-align: center;
  font: bold 13px var(--font-body);
  border: 1px solid #000; background: #fff;
}

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; list-style: none; margin: 0; padding: 0 !important; }
.contact-grid a {
  display: block; padding: 5px 4px; text-align: center;
  font: bold 12px var(--font-body); text-decoration: none;
  color: var(--band-dark); background: var(--band-value);
  border: 1px solid var(--band-dark);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--band-label);
}
.contact-grid a:hover, .contact-grid a:focus-visible { background: var(--acid); color: #000; }

/* hit-counter digits; used for clap totals */
.odometer { display: inline-flex; gap: 1px; padding: 2px; background: #555; border: 1px solid #000; vertical-align: middle; }
.odometer i {
  display: block; min-width: 1.15em; padding: 1px 2px; text-align: center;
  font: bold 18px/1.2 var(--font-mono); font-style: normal; color: #fff;
  background: linear-gradient(#444, #000 48%, #2a2a2a 52%, #000);
}
.odometer i:last-child { color: var(--acid); }

.archive { list-style: none; padding: 0 !important; }
.archive li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--rule); padding: 2px 0; }
.archive [aria-current] { font-weight: bold; }


/* 8. ENTRIES, SETLIST, BANTER ============================================ */

/* template-era date header: small caps, letterspaced, dotted rule */
.datehead {
  margin: 26px 0 8px; padding-bottom: 2px;
  font: bold 11px var(--font-head); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1px dotted var(--rule);
}
.datehead:first-child { margin-top: 0; }

.entry { position: relative; margin: 0 0 8px; padding-left: 76px; min-height: 76px; }
.entry--full { padding-left: 0; }

/* ticket-stub date chip (decorative duplicate of the date head) */
.datechip {
  position: absolute; left: 0; top: 2px; width: 62px;
  text-align: center; color: #fff; background: var(--band-dark);
  border: 1px solid #000; box-shadow: 3px 3px 0 var(--hot), -2px -2px 0 var(--cyan);
  transform: rotate(-2deg);
}
.datechip__mon {
  display: block; padding: 1px 0; font: bold 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  background: var(--band-mid) url(../img/crunch-gray.png) 0 0 / 256px 256px; background-blend-mode: hard-light;
}
.datechip__day { display: block; font: 30px/1.05 var(--font-loud); background: #fff; color: #000; }
.datechip__year { display: block; font: bold 11px/1.5 var(--font-mono); }

.entry__title { margin: 0 0 2px; font: bold 22px/1.2 var(--font-serif); }
.entry__title a { color: var(--band-dark); text-decoration: none; border-bottom: 1px solid var(--band); }
.entry__title a:hover, .entry__title a:focus-visible { color: #000; }
.entry--full .entry__title { font-size: 30px; color: var(--band-dark); }
.entry__band { margin: 0 0 2px; font: bold 12px var(--font-body); }
.entry__where { margin: 0 0 8px; font: bold 12px var(--font-body); color: var(--ink-soft); }
.entry__where .venue::before { content: "@ "; color: var(--hot); }
.entry__where .city::before { content: "\2014\00a0"; }
.entry__excerpt { font-size: 13px; }
.entry__excerpt p { margin-bottom: .6em; }
.entry__foot {
  margin: 6px 0 0; padding-top: 4px;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
  border-top: 1px dotted var(--rule);
}
.entry__stats { float: right; }
.stat { margin-left: 10px; white-space: nowrap; }
.stat b { font: 15px var(--font-loud); letter-spacing: .03em; color: #000; }
.stat--claps b { background: var(--acid); padding: 0 3px; border: 1px solid #000; }
.entry__edited { margin: 0 0 14px; font-size: 12px; font-style: italic; color: var(--ink-soft); }

/* The setlist: a typewritten sheet gaffer-taped to the stage. */
.setlist-sheet {
  position: relative; margin: 22px 0 26px; padding: 22px 24px 16px;
  background: #fff; border: 1px solid #999;
  box-shadow: 5px 6px 0 rgba(0,0,0,.25);
  transform: rotate(-.5deg);
}
.setlist-sheet::before, .setlist-sheet::after {       /* the tape */
  content: ""; position: absolute; top: -9px; width: 84px; height: 20px;
  background: #1d1d1d url(../img/crunch-gray.png) 0 0 / 256px 256px; background-blend-mode: hard-light;
  opacity: .9;
}
.setlist-sheet::before { left: 18px; transform: rotate(-4deg); }
.setlist-sheet::after { right: 22px; transform: rotate(3deg); }
.setlist-sheet h2 {
  margin: 0 0 8px; font: bold 13px var(--font-mono); letter-spacing: .3em; text-transform: uppercase;
  border-bottom: 2px solid #000;
}
.setlist { margin: 0; padding: 0; list-style: none; counter-reset: song; font: bold 16px/1.55 var(--font-mono); }
.setlist li { counter-increment: song; padding-left: 2.6em; text-indent: -2.6em; }
.setlist li::before { content: counter(song, decimal-leading-zero) ". "; color: var(--hot); }
/* optional: a non-song line (e.g. an encore break). Not counted. */
.setlist .setlist__break {
  counter-increment: none; padding: 0; text-indent: 0; margin: 4px 0;
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft);
  border-top: 1px dashed #000;
}
.setlist .setlist__break::before { content: none; }

/* rendered Markdown */
.banter { font: 15px/1.7 var(--font-serif); overflow-wrap: anywhere; }
.banter h2, .banter h3, .banter h4 { font-family: var(--font-head); color: var(--band-dark); }
.banter h2 { font-size: 20px; } .banter h3 { font-size: 17px; } .banter h4 { font-size: 15px; }
.banter blockquote {
  position: relative; margin: 0 0 1em; padding: 8px 14px 8px 46px;
  background: var(--band-value); border-left: 5px solid var(--hot);
  font-style: italic;
}
.banter blockquote::before {
  content: "\201C"; position: absolute; left: 6px; top: -6px;
  font: 60px/1 var(--font-loud); font-style: normal; color: var(--band);
  text-shadow: 2px 0 0 var(--cyan);
}
.banter blockquote > :last-child { margin-bottom: 0; }
.banter ul, .banter ol { padding-left: 26px; }
.banter ul { list-style: square; }
.banter li { margin-bottom: .25em; }
.banter code { background: #eee; padding: 0 3px; }
.banter pre { padding: 8px 10px; background: #111; color: var(--acid); overflow-x: auto; }
.banter hr { border-top: 3px double var(--rule); }
.banter img { border: 4px solid #fff; outline: 1px solid #000; }
.sectionhead {
  margin: 24px 0 10px; font: 22px/1 var(--font-loud); letter-spacing: .04em; text-transform: uppercase;
  color: #000; text-shadow: 2px 0 0 var(--cyan), -2px 0 0 var(--hot);
}


/* 9. CLAP-O-METER ======================================================== */

/* An amp faceplate. 11 real radio inputs (name="claps", value 1-11), each
   wrapped in a <label class="clap">. The bar for N and every bar below it
   light up via :has(); without :has() only the chosen bar lights, and it is
   still a perfectly good radio group. */
.clapometer {
  position: relative; margin: 30px 0; padding: 14px 18px 16px;
  color: #eee;
  background: #17131d url(../img/crunch-gray.png) 0 0 / 384px 384px;
  background-blend-mode: hard-light;
  border: 2px solid #000; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #4a4456, 6px 6px 0 var(--hot), -4px -4px 0 var(--cyan);
}
.clapometer a { color: var(--acid); }
.clapometer a:hover, .clapometer a:focus-visible { color: #000; }
.clapometer__head {
  margin: 0 0 10px; font: 28px/1 var(--font-loud); letter-spacing: .06em; text-transform: uppercase;
  color: #fff; text-shadow: 2px 0 0 var(--hot), -2px 0 0 var(--cyan);
}
.clapometer__head small { font: bold 11px var(--font-mono); letter-spacing: .1em; color: var(--acid); text-shadow: none; }
.clapometer__readout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.clapometer__total { margin: 0; font: 13px var(--font-body); }
.clapometer__total strong { font: 20px var(--font-loud); color: var(--acid); letter-spacing: .04em; }
.clapometer legend { margin-bottom: 20px; font: bold 13px var(--font-body); color: #fff; }
.clapometer legend span { font-weight: normal; color: #bbb; }

.clapometer__scale {
  position: relative; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px;
  height: 132px; margin: 0 0 12px; padding: 0 2px;
  border-bottom: 2px solid #000;
}
/* optional crowd-average marker: style="--avg: 8.0" on the scale */
.clapometer__scale[style*="--avg"]::after {
  content: "avg \25BC"; position: absolute; top: -17px;
  left: calc((var(--avg) - .5) / 11 * 100%); transform: translateX(-50%);
  font: bold 10px var(--font-mono); color: var(--cyan); white-space: nowrap;
}
.clap { position: relative; display: block; height: 100%; cursor: pointer; }
.clap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.clap span {
  display: flex; flex-direction: column; justify-content: flex-end; height: 100%;
  text-align: center; font: bold 13px/20px var(--font-mono); color: #aaa;
}
.clap span::before {                                  /* the bar */
  content: ""; flex: 0 0 calc(12% + var(--n) * 6.4%);
  background: #2c2634; border: 1px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.08);
}
.clap:nth-child(1)  { --n: 1 }  .clap:nth-child(2)  { --n: 2 }  .clap:nth-child(3)  { --n: 3 }
.clap:nth-child(4)  { --n: 4 }  .clap:nth-child(5)  { --n: 5 }  .clap:nth-child(6)  { --n: 6 }
.clap:nth-child(7)  { --n: 7 }  .clap:nth-child(8)  { --n: 8 }  .clap:nth-child(9)  { --n: 9 }
.clap:nth-child(10) { --n: 10 } .clap:nth-child(11) { --n: 11 }
.clap { --seg: hsl(calc(132 - var(--n) * 12.5) 95% 48%); }   /* green -> amber -> red */
.clap:nth-child(11) { --seg: #fff; }

/* lit: fallback first, then the :has() version */
.clap input:checked + span::before { background: var(--seg); }
.clap:has(input:checked) span::before,
.clap:has(~ .clap input:checked) span::before {
  background: var(--seg) url(../img/crunch-gray.png) 0 0 / 192px 192px;
  background-blend-mode: hard-light;
  box-shadow: 0 0 10px var(--seg);
}
.clap:has(input:checked) span { color: #fff; }
/* hover preview */
.clapometer fieldset:not(:disabled) .clap:hover span::before,
.clapometer fieldset:not(:disabled) .clap:has(~ .clap:hover) span::before { background-color: var(--seg); opacity: .8; }
/* eleven is too much and it shows */
.clap:nth-child(11) span { color: var(--hot); }
.clap:nth-child(11):has(input:checked) span::before {
  background: #fff url(../img/crunch-bg.png) 0 0 / 96px 96px;
  background-blend-mode: difference;
  box-shadow: 4px 0 0 var(--hot), -4px 0 0 var(--cyan), 0 0 18px #fff;
  animation: eleven .4s steps(2) infinite;
}
.clap input:focus-visible + span { outline: 2px dashed var(--acid); outline-offset: 1px; }
.clapometer fieldset:disabled .clap { cursor: not-allowed; }
.clapometer fieldset:disabled .clap input { cursor: not-allowed; }
.clapometer fieldset:disabled .clapometer__scale { opacity: .65; }
.clapometer__you { margin: 0 0 10px; font-size: 13px; }
.clapometer__you output { font: 20px var(--font-loud); color: var(--acid); padding: 0 2px; }
.clapometer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }


/* 10. COMMENTS =========================================================== */

.comments__list { list-style: none; margin: 0 0 18px; padding: 0; }
.comment {
  display: grid; grid-template-columns: 172px minmax(0, 1fr);
  margin-bottom: 4px; border: 1px solid var(--band-dark); background: #fff;
}
.comment__who {
  padding: 8px 6px; text-align: center; font: bold 12px/1.4 Arial, Helvetica, sans-serif; overflow-wrap: break-word;
  background: var(--band-label);
}
.comment__who .avatar { display: block; margin: 0 auto 4px; }
.comment__body { padding: 8px 12px; min-width: 0; }
.comment__meta { margin: 0 0 4px; font-size: 11px; font-weight: bold; color: var(--ink-soft); }
.comment__meta form { display: inline; margin-left: 8px; }
.comment__text { margin: 0; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-form { padding: 12px; border: 1px solid var(--band-dark); background: var(--band-value); }
.comment-form textarea { width: 100%; }
.comment-form p:last-child { margin-bottom: 0; }


/* 11. FORMS, BUTTONS, EDITOR ============================================= */

.form { max-width: 720px; }
.form--wide { max-width: none; }
/* label column / input column, like a table-layout signup form */
.field { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2px 14px; margin-bottom: 12px; align-items: start; align-content: start; }
.field__label { padding-top: 5px; font-weight: bold; text-align: right; }
.field--required .field__label::after { content: " *"; color: var(--err); }
.field__hint { grid-column: 2; margin: 0; font-size: 12px; color: var(--ink-soft); }
.field__error { grid-column: 2; margin: 0; font-size: 12px; font-weight: bold; color: var(--err); }
.field--stack { grid-template-columns: minmax(0, 1fr); }
.field--stack .field__label { text-align: left; }
.field--stack .field__hint, .field--stack .field__error { grid-column: 1; }
.form__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 18px 0 0; padding: 12px 0 0 204px; border-top: 1px dotted var(--rule);
}
.form--wide .form__actions { padding-left: 0; }
.form__legend { margin: 0 0 14px; font-size: 12px; color: var(--ink-soft); }

input[type="text"], input[type="url"], input[type="email"], input[type="date"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; max-width: 100%; padding: 5px 6px;
  font: 13px/1.4 var(--font-body); color: #000; background: #fff;
  border: 2px inset #c9c2b1; border-radius: 0;
}
textarea { min-height: 7em; resize: vertical; }
textarea.mono { font: 14px/1.5 var(--font-mono); }
input[type="date"], input[type="number"], select { width: auto; justify-self: start; }
input[type="number"] { width: 6em; }
input:focus, select:focus, textarea:focus { background: #ffffcc; outline: 2px solid var(--hot); outline-offset: 0; }
input[readonly] { background: #e9e5d8; color: var(--ink-soft); }

/* bandter.org/[ slug ]/ */
.slugfield { display: flex; align-items: stretch; max-width: 100%; font: bold 14px var(--font-mono); }
.slugfield__pre, .slugfield__post { padding: 5px 6px; background: #000; color: var(--acid); white-space: nowrap; }
.slugfield input { flex: 1 1 8em; min-width: 5em; font: bold 14px var(--font-mono); }

/* Glossy bevelled button with a banding problem. */
.btn {
  display: inline-block; padding: 6px 14px; cursor: pointer;
  font: bold 13px/1.3 var(--font-body); text-decoration: none; text-align: center;
  color: #000; background: #e4e0d2 url(../img/banding.png) 0 0 / 128px 100% repeat-x;
  background-blend-mode: soft-light;
  border: 1px solid #000; border-radius: 3px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.85), inset -1px -1px 0 rgba(0,0,0,.25), 2px 2px 0 #000;
}
.btn:visited { color: #000; }
.btn:hover, .btn:focus-visible { background-color: var(--acid); color: #000; box-shadow: inset 1px 1px 0 #fff, 3px 3px 0 var(--hot), -2px -2px 0 var(--cyan); }
.btn:active { transform: translate(2px, 2px); box-shadow: inset 1px 1px 0 rgba(0,0,0,.3); }
.btn--primary { background-color: var(--orange); color: #fff; text-shadow: 0 1px 0 #000; }
.btn--primary:visited { color: #fff; }
.btn--danger { background-color: #e0002a; color: #fff; text-shadow: 0 1px 0 #000; }
.btn--danger:visited { color: #fff; }
.btn--ok { background-color: #2aa84f; color: #fff; text-shadow: 0 1px 0 #000; }
.btn--small { padding: 2px 8px; font-size: 11px; box-shadow: inset 1px 1px 0 rgba(255,255,255,.85), 1px 1px 0 #000; }
.btn--big { padding: 10px 22px; font-size: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* --- Markdown editor ------------------------------------------------------ */
.editor__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.editor__panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.editor__label { display: block; margin: 0 0 4px; font-weight: bold; }
.editor__pane { display: flex; flex-direction: column; min-width: 0; }
.editor__pane textarea { flex: 1 1 auto; min-height: 340px; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  background: #d4d0c8; border: 2px outset #fff; border-bottom: 0;
}
.toolbar button {
  min-width: 28px; padding: 2px 7px; cursor: pointer;
  font: bold 13px var(--font-serif); color: #000; background: #d4d0c8;
  border: 2px outset #fff; border-radius: 0;
}
.toolbar button:hover, .toolbar button:focus-visible { background: var(--acid); }
.toolbar button:active { border-style: inset; }
.toolbar__sep { width: 1px; margin: 2px 4px; background: #808080; box-shadow: 1px 0 0 #fff; }
.toolbar__help { margin-left: auto; align-self: center; padding-right: 4px; font-size: 11px; }
.preview {
  flex: 1 1 auto; min-height: 340px; padding: 12px 14px; overflow: auto;
  background: #fff; border: 1px dashed var(--band-dark);
}
.preview__label {
  margin: 0; padding: 5px 8px; font: bold 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase;
  background: var(--band-dark); color: #fff; min-height: 34px; display: flex; align-items: center;
}
.preview__empty { color: var(--ink-soft); font: italic 13px var(--font-body); }


/* 12. DATA TABLES, STATUS PILLS, DIFF ==================================== */

.tablewrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid #000; background: #fff; }
.datatable { width: 100%; margin: 0; font-size: 13px; }
.datatable caption { caption-side: top; padding: 4px 8px; text-align: left; font-weight: bold; }
.datatable th {
  padding: 5px 8px; text-align: left; white-space: nowrap;
  font: bold 12px var(--font-body); color: #fff;
  background: var(--band-mid, var(--logo-purple)) url(../img/banding.png) 0 0 / 128px 100% repeat-x;
  background-blend-mode: multiply;
  text-shadow: 0 1px 0 #000;
  border-bottom: 1px solid #000;
}
.datatable td { padding: 5px 8px; vertical-align: top; border-bottom: 1px dotted var(--rule); }
.datatable tbody tr:nth-child(even) td { background: rgba(0,0,0,.035); }
.datatable tbody tr:hover td { background: #ffffcc; }
.datatable .num { text-align: right; font-family: var(--font-mono); font-weight: bold; white-space: nowrap; }
.datatable .nowrap { white-space: nowrap; }
.datatable code { font-weight: bold; }

.status {
  display: inline-block; padding: 0 6px; font: bold 11px/1.6 var(--font-body);
  letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #666; border: 1px solid #000;
}
.status--approved { background: var(--ok); }
.status--pending { background: var(--gold); color: #000; }
.status--suspended { background: #000; color: var(--gold); }
.status--rejected { background: var(--err); }
.status--draft { background: #fff; color: #000; border-style: dashed; }

.versions { list-style: none; padding: 0; }
.versions li { padding: 4px 0; border-bottom: 1px dotted var(--rule); }
.compare { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 16px; padding: 8px 10px; background: var(--paper-dim); border: 1px solid var(--rule); }
.compare label { font-weight: bold; }

.diff { margin: 0 0 1.4em; border: 1px solid #000; background: #fff; font: 13px/1.55 var(--font-mono); overflow-x: auto; }
.diff__field { margin: 0; padding: 3px 8px; font: bold 12px var(--font-body); background: #000; color: #fff; }
.diff__line { display: block; padding: 0 8px 0 2.2em; text-indent: -1.4em; white-space: pre-wrap; text-decoration: none; overflow-wrap: anywhere; }
.diff__line::before { content: "\00a0\00a0"; font-weight: bold; }
ins.diff__line { background: #d7ffd9; color: #063; }
ins.diff__line::before { content: "+\00a0"; }
del.diff__line { background: #ffdbe0; color: #900; }
del.diff__line::before { content: "\2212\00a0"; }
.diff__skip { display: block; padding: 0 8px; background: #eee; color: #777; text-align: center; }


/* 13. TREE OF BLOGS, TOP 8, AVATARS ====================================== */

/* Nested <ul>s drawn as a file-manager tree: dotted trunk on li::before,
   dotted twig on li::after, trunk stops at the last child. */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { font: 13px/1.7 var(--font-mono); margin-bottom: 1.2em; }
.tree ul { margin-left: 9px; }
.tree li { position: relative; padding-left: 26px; }
.tree ul > li::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; border-left: 2px dotted #000; }
.tree ul > li::after { content: ""; position: absolute; left: 0; top: .85em; width: 20px; border-top: 2px dotted #000; }
.tree ul > li:last-child::before { height: .85em; }
.tree__root > a { font-weight: bold; font-size: 16px; background: #000; color: var(--acid); padding: 1px 6px; text-decoration: none; }
/* the root of the tree wears the favicon "b" (crunched copy: b-crunch.png) */
.tree__root { padding-left: 0 !important; }
.tree__root::before {
  content: ""; display: inline-block; width: 32px; height: 32px; margin-right: 6px; vertical-align: middle;
  background: url(../img/b-crunch.png) 0 0 / 100% 100%; border: 1px solid #000;
  box-shadow: 2px 0 0 var(--hot), -2px 0 0 var(--cyan);
}
.tree__root > ul { margin-left: 15px; }
.tree__band { font-weight: bold; font-size: 15px; padding: 0 3px; background: var(--band-value); border: 1px solid var(--band); }
.tree__name { font: bold 13px var(--font-body); }
.tree__meta { font: 11px var(--font-body); color: var(--ink-soft); }
.tree__leaf { font-family: var(--font-body); font-size: 13px; }
.tree__leaf time { font: bold 12px var(--font-mono); color: var(--ink-soft); }
.tree__claps { font: bold 11px var(--font-mono); background: var(--acid); border: 1px solid #000; padding: 0 3px; white-space: nowrap; }
.tree__more { font-style: italic; }

.figure { float: right; width: 240px; margin: 0 0 12px 18px; padding: 6px 6px 4px; background: #fff; border: 1px solid #000; box-shadow: 4px 4px 0 var(--hot), -3px -3px 0 var(--cyan); transform: rotate(1.5deg); }
.figure img { display: block; width: 100%; }
.figure figcaption { padding-top: 4px; font: 11px var(--font-body); text-align: center; }

/* Avatar: a crop of gigs.png chosen and tinted by --hue, plus an initial.
   No per-band image needed. */
.avatar {
  --hue: var(--band-hue, 24);
  position: relative; display: inline-block; width: 72px; height: 72px; overflow: hidden; isolation: isolate;
  font: 46px/72px var(--font-loud); text-align: center; text-transform: uppercase; text-decoration: none;
  color: #fff; text-shadow: 3px 0 0 var(--hot), -3px 0 0 var(--cyan), 0 2px 0 #000;
  border: 1px solid #000; background: #000;
}
.avatar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(../img/gigs.png) calc(var(--hue) * 7px) calc(var(--hue) * 3px) / 256px 256px;
  filter: hue-rotate(calc(var(--hue) * 1deg));
}
.avatar--sm { width: 40px; height: 40px; font-size: 26px; line-height: 40px; }
.avatar--sm::before { background-size: 192px 192px; }

.top8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; list-style: none; margin: 0 0 1em; padding: 0 !important; }
.top8 li { text-align: center; font: bold 11px/1.25 Arial, Helvetica, sans-serif; overflow-wrap: break-word; }
.top8 .avatar { display: block; width: 100%; height: auto; aspect-ratio: 1; margin: 0 0 3px; font-size: 34px; line-height: 1.5; }
.top8 a { text-decoration: none; background: none; }
.top8 a:hover .avatar, .top8 a:focus-visible .avatar { outline: 3px solid var(--acid); }
.top8--wide { grid-template-columns: repeat(8, minmax(0, 1fr)); }


/* 14. NOTICES, PAGER, SMALL BITS ========================================= */

.notice {
  margin: 0 0 18px; padding: 9px 12px 9px 44px; position: relative;
  background: #ffffcc; border: 1px solid #000; border-left: 8px solid var(--gold);
  font-size: 13px;
}
.notice::before { content: "!"; position: absolute; left: 10px; top: 4px; font: 26px var(--font-loud); }
.notice > :last-child { margin-bottom: 0; }
.notice--ok { background: #e2ffe6; border-left-color: var(--ok); }
.notice--ok::before { content: "\2713"; color: var(--ok); }
.notice--err { background: #ffe3e7; border-left-color: var(--err); }
.notice--err::before { content: "\00d7"; color: var(--err); }
.notice--pending { border-left-color: var(--hot); }
.notice--pending::before { content: "\2026"; color: var(--hot); }

.pager {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  margin: 26px 0 0; padding: 8px 0; border-top: 3px double var(--rule);
  font: bold 13px var(--font-head);
}
.pager__pages { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager__pages a, .pager__pages [aria-current] { display: block; min-width: 26px; padding: 2px 6px; text-align: center; border: 1px solid #000; background: #fff; text-decoration: none; }
.pager__pages [aria-current] { background: #000; color: var(--acid); }
.pager__off { color: #999; }

/* blinkie: a tiny badge with marching lights. Pure CSS. */
.blinkie {
  display: inline-block; padding: 0 6px; vertical-align: middle;
  font: bold 10px/14px var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--hot); border: 2px dotted var(--acid);
  animation: blink 1s steps(1) infinite;
}

/* marquee: the inner span scrolls; stops on hover and for reduced motion */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee > span { display: inline-block; padding-left: 100%; animation: marquee 26s linear -9s infinite; }
.marquee:hover > span { animation-play-state: paused; }

.muted { color: var(--ink-soft); }
.right { text-align: right; }
.plainlist { list-style: none; padding: 0; }
.plainlist li { padding: 5px 0; border-bottom: 1px dotted var(--rule); }

/* MOCKUP ONLY: labels the alternative states shown one after another in
   design/mockups. Never render this in production. */
.mock-note {
  margin: 28px 0 10px; padding: 2px 8px; display: inline-block;
  font: bold 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  background: repeating-linear-gradient(45deg, #000 0 8px, #333 8px 16px); color: var(--acid);
}


/* "with Band A, Band B": the other bands on a show's bill, under the title. */
.entry__bill { margin: 2px 0 8px; font: bold 13px/1.4 var(--font-head); }

/* Flier: the show's poster at the top of an entry. Any shape. The actions bar
   fades in on hover or keyboard focus; on touch screens it is always there.
   The full-size view is a :target, so it opens and closes with plain links. */
.flier { position: relative; width: fit-content; max-width: 100%; margin: 4px auto 22px; padding: 6px; background: #fff; border: 1px solid #000; box-shadow: 5px 5px 0 var(--hot), -4px -4px 0 var(--cyan); transform: rotate(-0.6deg); }
.flier__open { display: block; cursor: zoom-in; }
.flier__open:hover, .flier__open:focus-visible { background: none; }
.flier img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(72vh, 680px); image-rendering: auto; }
.flier__actions { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 8px; background: rgba(11, 6, 24, 0.84); opacity: 0; transition: opacity 0.1s steps(2); }
.flier:hover .flier__actions, .flier:focus-within .flier__actions { opacity: 1; }
.flier--doc .flier__actions { position: static; opacity: 1; background: none; padding: 8px 0 2px; }
.flier__doc { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 200px; height: 260px; background: var(--paper-dim) url("../img/crunch-gray.png") 0 0 / 256px; background-blend-mode: multiply; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.flier__doc b { font: 46px/1 var(--font-loud); letter-spacing: 1px; text-shadow: 2px 2px 0 var(--hot), -2px -2px 0 var(--cyan); }
.flier__doc span { font: 11px/1.6 var(--font-body); text-transform: uppercase; letter-spacing: 2px; }
@media (hover: none) {
  .flier__actions { position: static; opacity: 1; background: none; padding: 8px 0 2px; }
}

.lightbox { display: none; position: fixed; inset: 0; z-index: 100; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(11, 6, 24, 0.94); }
.lightbox:target { display: flex; }
.lightbox__backdrop { position: absolute; inset: 0; cursor: zoom-out; }
.lightbox__backdrop:hover, .lightbox__backdrop:focus-visible { background: none; }
.lightbox img { position: relative; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 96px); background: #fff; box-shadow: 6px 6px 0 var(--hot), -5px -5px 0 var(--cyan); image-rendering: auto; }
.lightbox__bar { position: relative; display: flex; gap: 8px; margin: 0; }

/* The flier as shown in the editor, next to its "remove" box. */
.flier-current { display: flex; align-items: center; gap: 14px; margin: 0 0 8px; }
.flier-current img { display: block; width: auto; max-width: 140px; height: auto; max-height: 140px; border: 1px solid #000; image-rendering: auto; }

/* Tooltip: an element with class "tip" and a data-tip attribute spells it out
   on hover or keyboard focus. Used by the TAFLOC? button. It opens to the left,
   level with the button, so the scrolling table wrapper can't clip it. */
.tip { position: relative; }
.tip:hover::after, .tip:focus-visible::after {
  content: attr(data-tip);
  position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); z-index: 30;
  width: max-content; max-width: min(260px, 70vw);
  padding: 6px 9px;
  background: var(--ink); color: var(--acid);
  border: 1px solid var(--acid); box-shadow: 3px 3px 0 var(--hot);
  font: 11px/1.4 Verdana, Geneva, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  pointer-events: none;
}

/* 15. FOOTER ============================================================= */

.footer {
  padding: 16px 26px 20px; text-align: center; font-size: 11px; color: #ddd;
  background: var(--logo-night) url(../img/crunch-gray.png) 0 0 / 384px 384px;
  background-blend-mode: hard-light;
  border-top: 3px solid #000;
}
.footer a { color: #9fd0ff; }
.footer a:visited { color: #d9b3ff; }
.footer a:hover, .footer a:focus-visible { color: #000; }
/* link farm: reads like sponsored results on a parked domain; every link is
   a real, useful destination */
.linkfarm { margin: 0 0 12px; font: 13px/1.9 Arial, Helvetica, sans-serif; }
.linkfarm b { font-weight: normal; color: #aaa; }
.linkfarm a { margin: 0 6px; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 12px; }
.badges img { display: block; width: 88px; height: 31px; }
.footer__legal { margin: 0; color: #aaa; }
.footer__legal::before {
  content: ""; display: block; width: 32px; height: 32px; margin: 0 auto 8px;
  background: url(../img/b-crunch.png) 0 0 / 100% 100%; border: 1px solid #000;
}


/* 16. SITE-LOGIN: THE REDIRECT GATEWAY =================================== */

/* login.bandter.org is a bare interstitial: default-browser fonts, a centred
   box, a progress bar that never quite finishes, a link farm. */
.site-login { font: 14px/1.5 Arial, Helvetica, sans-serif; }
.gateway { max-width: 560px; margin: 0 auto; padding: 8vh 16px 40px; text-align: center; }
.gateway__brand { position: relative; display: inline-block; margin: 0 0 6px; line-height: 0; }
.gateway__brand a { display: block; background: none; }
.gateway__brand img {
  display: block; width: 320px; max-width: 100%; height: auto;
  filter: drop-shadow(4px 0 0 rgba(255,0,190,.75)) drop-shadow(-4px 0 0 rgba(0,220,255,.85));
}
/* the sub-site label, stuck on like a price tag */
.gateway__site {
  position: absolute; right: -14px; top: 2px; padding: 0 7px;
  font: bold 13px/1.5 var(--font-mono); background: var(--acid); color: #000; border: 1px solid #000;
  transform: rotate(8deg);
}
.gateway__slogan { margin: 0 0 22px; font: italic 15px "Times New Roman", Times, serif; color: #111; }
.gateway__box {
  margin: 0 0 18px; padding: 22px 22px 18px; text-align: center;
  background: #fff url(../img/crunch-paper.png) 0 0 / 384px 384px;
  border: 1px solid var(--logo-purple); box-shadow: 0 0 0 4px #e4e2f3, 8px 10px 0 rgba(0,0,0,.25);
}
.gateway__box h1 { margin: 0 0 10px; font: bold 20px "Times New Roman", Times, serif; color: #000; }
.gateway__dest { display: inline-block; max-width: 100%; padding: 1px 6px; font: bold 14px var(--font-mono); background: #ffffcc; border: 1px dashed #000; overflow-wrap: anywhere; }
.gateway__small { margin: 12px 0 0; font-size: 12px; color: #444; }
.gateway .linkfarm { color: #222; }
.gateway .linkfarm b { color: #333; }
.gateway__legal { font-size: 12px; color: #222; }
.btn--google {
  padding: 10px 22px; font: bold 16px Arial, Helvetica, sans-serif;
  color: #fff; background-color: var(--logo-purple); text-shadow: 0 1px 0 #000;
}
.btn--google:visited { color: #fff; }
/* the progress bar: chunky blocks marching, stuck at 87% forever */
.progress {
  height: 20px; max-width: 340px; margin: 16px auto 0; padding: 2px;
  background: #fff; border: 2px inset #ccc; text-align: left;
}
.progress span {
  display: block; height: 100%; width: 87%;
  background: repeating-linear-gradient(90deg, var(--logo-blue) 0 10px, transparent 10px 13px);
  animation: progress 2.4s steps(12) infinite;
}


/* 17. SITE-ADMIN: THE GRIM CONTROL PANEL ================================= */

.site-admin { font: 13px/1.5 Tahoma, Verdana, Geneva, sans-serif; }
.site-admin .navstrip { background-color: #3b3b3b; box-shadow: none; }
.site-admin .wrap {
  max-width: 1180px; background: #d4d0c8; border: 2px outset #fff;
  box-shadow: 8px 10px 0 rgba(0,0,0,.6);
}
.titlebar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px;
  margin: 0; padding: 4px 8px; color: #fff;
  background: #0a246a url(../img/crunch-gray.png) 0 0 / 256px 256px; background-blend-mode: hard-light;
}
.titlebar h1 { margin: 0; font: bold 14px Tahoma, Verdana, sans-serif; }
.titlebar p { margin: 0; font-size: 11px; }
.site-admin .strip { background: #d4d0c8; color: #000; border-bottom: 2px groove #fff; min-height: 0; padding-top: 6px; }
.site-admin .strip::before { content: none; }
.site-admin .tabs a { border-radius: 3px 3px 0 0; background: #d4d0c8; color: #000; text-shadow: none; box-shadow: none; border: 2px outset #fff; border-bottom: 0; font: 13px Tahoma, Verdana, sans-serif; }
.site-admin .tabs a[aria-current="page"] { top: 2px; font-weight: bold; }
.site-admin .col-main { padding: 14px 16px 24px; }
.site-admin .pagehead { font: bold 16px Tahoma, Verdana, sans-serif; text-shadow: none; border-bottom: 2px groove #fff; }
.site-admin .subhead { margin-top: 30px; background-color: #0a246a; font: bold 13px Tahoma, Verdana, sans-serif; }
.site-admin .btn { border-radius: 0; background: #d4d0c8; border: 2px outset #fff; box-shadow: none; color: #000; text-shadow: none; }
.site-admin .btn:hover, .site-admin .btn:focus-visible { background: var(--acid); }
.site-admin .btn--danger { background: #d4d0c8; color: #b00020; }
.site-admin .btn--ok { background: #d4d0c8; color: #0a6a2a; }
.site-admin .datatable th { background: #404040; }
.site-admin .footer { background-color: #3b3b3b; color: #fff; }
.count { display: inline-block; min-width: 1.6em; padding: 0 5px; text-align: center; font: bold 12px var(--font-mono); background: var(--err); color: #fff; border: 1px solid #000; }

/* one pending registration */
.reqcard { margin: 0 0 16px; background: #fff; border: 2px inset #fff; }
.reqcard__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 4px 8px; font: bold 13px Tahoma, Verdana, sans-serif; background: #ece9d8; border-bottom: 1px solid #aca899; }
.reqcard__body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr); gap: 12px; padding: 10px; }
.reqcard .details th { background: #ece9d8; color: #000; }
.reqcard .details td { background: #f7f6f0; }
.reqcard__decide label { display: block; font-weight: bold; margin-bottom: 3px; }
.reqcard__decide textarea { min-height: 5em; margin-bottom: 8px; }
.reqcard__decide .btn { margin: 0 4px 4px 0; }
.empty { padding: 14px; text-align: center; font-style: italic; color: #555; background: #fff; border: 2px inset #fff; }


/* 18. SITE-BESTOF: THE TACKY CHART SHOW ================================== */

.site-bestof .wrap { background-color: #fffbe0; box-shadow: -5px 0 0 var(--gold), 5px 0 0 #b30000, 10px 12px 0 rgba(0,0,0,.75); }
.banner--bestof { align-items: center; text-align: center; min-height: 230px; background: #7a0000; }
/* starburst: a conic gradient, then the block-noise tile burnt into it */
.banner--bestof::before {
  background:
    url(../img/crunch-gray.png) 0 0 / 384px 384px,
    repeating-conic-gradient(from 0deg at 50% 62%, #ffcc00 0deg 7.5deg, #e03a00 7.5deg 15deg);
  background-blend-mode: hard-light;
}
.banner--bestof::after {
  background: radial-gradient(ellipse at 50% 62%, rgba(90,0,0,0) 0, rgba(60,0,0,.2) 45%, rgba(40,0,0,.85) 100%);
}
.banner--bestof .banner__logo img { width: 300px; }
.banner--bestof .banner__title { font-size: 84px; text-transform: uppercase; transform: rotate(-3deg); }
.banner--bestof .banner__title a { text-shadow: 4px 0 0 #b30000, -4px 0 0 var(--gold), 0 6px 0 #000; -webkit-text-stroke: 1px #000; }
.banner--bestof .banner__tagline { font: bold 15px var(--font-silly); color: #fff; }
.banner--bestof .banner__kicker { align-self: center; background: #000; color: var(--gold); border-color: var(--gold); }
.site-bestof .strip { background: #000; }
.site-bestof .strip::before { content: none; }
.ticker { padding: 4px 0; font: bold 13px var(--font-silly); color: #000; background: var(--gold); border-bottom: 3px solid #000; }

.chart { width: 100%; margin: 0; }
.chart th { padding: 6px 8px; text-align: left; font: bold 12px var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); background: #000; }
.chart td { padding: 8px; vertical-align: middle; border-bottom: 2px solid #000; background: #fff; }
.chart tbody tr:nth-child(even) td { background: #fff3b8; }
.chart .chart__rank { width: 1%; padding: 2px 12px; text-align: center; font: 40px/1 var(--font-loud); color: #000; background: var(--gold) !important; text-shadow: 2px 0 0 #fff; }
.chart .chart__claps { width: 1%; text-align: center; white-space: nowrap; font: 26px/1 var(--font-loud); color: #b30000; }
.chart .chart__claps small { display: block; font: bold 10px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #000; }
.chart .chart__title { font: bold 16px/1.3 var(--font-serif); }
.chart .chart__title small { display: block; font: 12px var(--font-body); font-weight: normal; }
.chart .chart__date { white-space: nowrap; font: bold 12px var(--font-mono); }
/* the podium */
.chart tbody tr:nth-child(1) .chart__rank { font-size: 64px; background: #000 !important; color: var(--gold); text-shadow: 3px 0 0 var(--hot), -3px 0 0 var(--cyan); }
.chart tbody tr:nth-child(2) .chart__rank,
.chart tbody tr:nth-child(3) .chart__rank { font-size: 52px; }
.chart tbody tr:nth-child(1) .chart__title { font-size: 21px; }
.seal {
  display: inline-block; padding: 2px 8px; transform: rotate(-4deg);
  font: bold 12px var(--font-silly); color: #fff; background: #b30000; border: 2px dashed var(--gold);
}


/* 19. ERROR PAGES ======================================================== */

.errorpage { padding: 30px 0 20px; text-align: center; }
.errorpage__code {
  position: relative; display: inline-block; margin: 0;
  font: 150px/.9 var(--font-loud); color: #000;
  text-shadow: 7px 0 0 var(--hot), -7px 0 0 var(--cyan);
}
/* same slice trick as the banner title, bigger and nastier */
.errorpage__code::before, .errorpage__code::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; text-shadow: none; pointer-events: none;
}
.errorpage__code::before { color: var(--cyan); clip-path: inset(30% 0 48% 0); transform: translateX(-26px); animation: slice-a 3s steps(1) infinite; }
.errorpage__code::after { color: var(--hot); clip-path: inset(62% 0 20% 0); transform: translateX(30px); animation: slice-b 2.3s steps(1) infinite; }
.errorpage__title { margin: 14px 0 8px; font: bold 22px var(--font-head); }
.errorpage__text { max-width: 34em; margin: 0 auto 14px; font: 15px/1.6 var(--font-serif); }
.errorpage__tech { display: inline-block; margin: 0 0 16px; padding: 2px 8px; font: 12px var(--font-mono); background: #000; color: var(--acid); }


/* 20. GLITCH KEYFRAMES =================================================== */

/* All step-timed: things snap, nothing eases. Mostly still, briefly wrong. */
@keyframes frame-drop {
  0%, 90%, 100% { background-position: 0 0; }
  91% { background-position: 48px 0; }
  93% { background-position: -24px 24px; }
  95% { background-position: 96px -48px; }
}
@keyframes slice-a {
  0%, 86%, 100% { clip-path: inset(24% 0 66% 0); transform: translateX(-10px); }
  88% { clip-path: inset(5% 0 80% 0); transform: translateX(22px); }
  91% { clip-path: inset(48% 0 38% 0); transform: translateX(-30px); }
  94% { clip-path: inset(80% 0 6% 0); transform: translateX(8px); }
}
@keyframes slice-b {
  0%, 80%, 100% { clip-path: inset(64% 0 27% 0); transform: translateX(12px); }
  83% { clip-path: inset(34% 0 56% 0); transform: translateX(-18px); }
  87% { clip-path: inset(86% 0 2% 0); transform: translateX(34px); }
  90% { clip-path: inset(12% 0 76% 0); transform: translateX(-6px); }
}
/* the logo's slices rest in its ascender / descender zones so the name stays
   readable, and only cut through the middle for an instant */
@keyframes slice-logo {
  0%, 84%, 100% { clip-path: inset(80% 0 10% 0); transform: translateX(20px); }
  86% { clip-path: inset(40% 0 48% 0); transform: translateX(-26px); }
  89% { clip-path: inset(9% 0 81% 0); transform: translateX(34px); }
  92% { clip-path: inset(58% 0 30% 0); transform: translateX(-8px); }
}
@keyframes eleven {
  0% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}
@keyframes blink {
  0%, 100% { border-color: var(--acid); }
  50% { border-color: transparent; background: #000; }
}
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes progress {
  0% { width: 8%; }
  100% { width: 87%; }
}
/* JS hook: glitch.js adds .is-glitching to [data-glitch] for a few frames */
.is-glitching { animation: tear .18s steps(2) 2; }
@keyframes tear {
  0% { transform: translateX(-4px) skewX(-4deg); filter: hue-rotate(90deg); }
  50% { transform: translateX(5px); filter: saturate(3); }
  100% { transform: none; filter: none; }
}


/* 21. SMALL SCREENS ====================================================== */

@media (max-width: 760px) {
  .wrap { margin: 12px 6px 40px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col-main { padding: 16px 14px 22px; }
  .col-side { padding: 16px 14px 22px; border-left: 0; border-top: 3px double var(--rule); }
  .banner { min-height: 150px; padding: 16px 14px 14px; }
  .banner::before { background-size: auto 100%; }       /* keep blocks square-ish: crop, don't squash */
  .banner__title { font-size: 44px; }
  .banner--bestof .banner__title { font-size: 54px; }
  .strip { --drip: 9px; padding: 8px 8px 0; }
  .strip::before { background-size: 960px 100%; }
  .tabs a { padding: 6px 9px 5px; }
  .field { grid-template-columns: minmax(0, 1fr); }
  .field__label { text-align: left; padding-top: 0; }
  .field__hint, .field__error { grid-column: 1; }
  .form__actions { padding-left: 0; }
  .editor__panes { grid-template-columns: minmax(0, 1fr); }
  .editor__pane textarea, .preview { min-height: 220px; }
  .comment { grid-template-columns: minmax(0, 1fr); }
  .comment__who { display: flex; align-items: center; gap: 8px; text-align: left; padding: 5px 8px; }
  .comment__who .avatar { margin: 0; }
  .figure { float: none; width: auto; max-width: 260px; margin: 0 auto 16px; }
  .top8--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reqcard__body { grid-template-columns: minmax(0, 1fr); }
  .entry__stats { float: none; display: block; margin-top: 2px; }
  .stat { margin: 0 10px 0 0; }
  .errorpage__code { font-size: 96px; }
  .navstrip__user { margin-left: 0 !important; }
  .chart .chart__date, .chart th.chart__date { display: none; }
  .chart .chart__rank { font-size: 28px; padding: 2px 6px; }
  .chart tbody tr:nth-child(1) .chart__rank { font-size: 40px; }
  .chart tbody tr:nth-child(2) .chart__rank, .chart tbody tr:nth-child(3) .chart__rank { font-size: 34px; }
  .clapometer { padding: 12px 10px 14px; }
  .clapometer__scale { gap: 2px; }
}
@media (max-width: 420px) {
  .entry { padding-left: 0; }
  .datechip { position: static; float: left; margin: 0 10px 4px 2px; width: 54px; }
  .datechip__day { font-size: 24px; }
  .entry__excerpt { clear: left; }
  .setlist { font-size: 14px; }
  .setlist-sheet { padding: 20px 14px 14px; }
}


/* 22. REDUCED MOTION, PRINT ============================================== */

/* Everything stays in its (still glitchy) resting pose. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { white-space: normal; }
  .marquee > span { padding-left: 0; }
  .progress span { width: 87%; }
}

@media print {
  body::before, .navstrip, .strip, .footer, .col-side, .clapometer__form, .comment-form, .mock-note { display: none !important; }
  .wrap { box-shadow: none; border: 0; background: #fff; max-width: none; margin: 0; }
  .banner { min-height: 0; color: #000; background: none; }
  .banner::before, .banner::after { display: none; }
  .banner__title a { color: #000; text-shadow: none; }
  .banner__title a::before, .banner__title a::after { content: none; }
  .cols { display: block; }
}
