/* FABS ANARKI — Version 4 changes. Loaded AFTER the existing theme sheets.
 * Pure red replaces maroon in Chapters K and I. Other chapters retain the
 * approved palette. The compact hamburger shows exactly six letters.
 */
:root {
  --selected-red:#ff0000;
  --link-red:#ff0000;
  --link-pink:#c2185b;
}
/* Letter-only alternative navigation. Every letter is a semantic link,
 * with a full accessible name in aria-label but no extra visible text. */
.chapter-names:not([hidden]) {
  padding:.4rem;
  display:grid;
  grid-template-columns:repeat(3,minmax(2.8rem,1fr));
  gap:.22rem;
  min-width:12.4rem;
  background:#000;
}
.chapter-names a {
  min-height:3rem;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-display);
  font-size:1.45rem;
  font-weight:900;
  color:#fff;
  background:#000;
  text-decoration:none;
}
.chapter-names a:hover,
.chapter-names a:focus-visible {
  background:#ff0000;
  color:#fff;
}
/* Chapter K and I both inherit pure red for chapter lettering and rules.
 * Existing red elsewhere in the album remains untouched. */
#chapter-k,#chapter-i {--red:#ff0000}
/* Chapter K: monochrome black and pure red — no maroon/brown shades. */
#chapter-k .player-head p {color:#ff0000}
#chapter-k .track-scroll {scrollbar-color:#ff0000 #000}
#chapter-k .track-table th {background:#ff0000;color:#fff}
#chapter-k .track-table tr.current,
#chapter-k .track-table tr.current:hover {background:#ff0000;color:#fff}
#chapter-k .track-table tr:not(.current) {background:#000;color:#fff}
/* Preserve the unique solid-red playing row even while hovering other rows. */
#chapter-k .track-table tr:not(.current):hover,
#chapter-k .track-table tr:not(.current):focus-within {background:#000;color:#ff0000}
#chapter-k .track-table td {border-bottom:1px solid #ff0000}
#chapter-k .track-table .track-button:focus-visible {outline-color:#ff4081}
#chapter-k .player-credit a {text-decoration-color:#ff0000}
/* Chapter I: pure red links, pinkish hover/focus, including visited links. */
#chapter-i .history-links,
#chapter-i .history-links a,
#chapter-i .history-links a:visited {color:#ff0000}
#chapter-i .history-links a:hover,
#chapter-i .history-links a:visited:hover,
#chapter-i .history-links a:focus-visible {color:#c2185b;text-decoration-color:#c2185b}

/* -------------------------------------------------------------------------
   VERSION 4.3 — FIX CHAPTER N'S VISIBLE VIEWPORT GEOMETRY

   Earlier attempts only changed the triangle's angle while leaving Chapter N
   a full 100dvh tall. However, the fixed navigation occupies the top
   --nav-height of the display. Hence the chapter itself still extended ABOVE
   the user-visible area and the triangle's top corner could not be seen.

   Chapter N is now exactly the height of the unobscured viewport:
      100dvh - the fixed navigation height.
   scroll-margin-top makes navigation via the N anchor place the chapter's
   TOP edge immediately BELOW the fixed header. The bottom edge therefore
   lands at the screen bottom, without any hidden part of the flag.

   With both corners visible, a simple polygon defines the TRUE diagonal:
      upper left (0%,0%) --> bottom right (100%,100%).

   The override applies ONLY to N; the five remaining chapters, physics,
   navigation and music player retain their existing implementation.
------------------------------------------------------------------------- */
#chapter-n {
  height: calc(100vh - var(--nav-height));
  height: calc(100dvh - var(--nav-height));
  scroll-margin-top: var(--nav-height);
  background: #000;
  background-image: none;
}
#chapter-n::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ff0000;
  -webkit-clip-path: polygon(0 0, 0 100%, 100% 100%);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  pointer-events: none;
}
#chapter-n > .chapter-body {
  position: relative;
  z-index: 1;
  padding-top: clamp(.5rem, 2vh, 1.2rem);
}
#chapter-n > .chapter-letter {
  top: clamp(.65rem, 2.5vh, 1.8rem);
}
@media (max-width: 760px) {
  #chapter-n > .chapter-body {
    padding-top: clamp(.5rem, 2vh, 1.2rem);
  }
  #chapter-n > .chapter-letter {
    top: .55rem;
  }
}


/* -------------------------------------------------------------------------
   VERSION 4.4 — AUTHORITATIVE RED & PINK CONTROLS
   Overrides legacy theme rules for the three requested surfaces ONLY.
   No geometry/height/scroll changes to Chapter N (Version 4.3 flag fix).
   Pure red: #FF0000 | dark pink interaction: #C2185B.
------------------------------------------------------------------------- */
:root {
  --share-red: #ff0000;
  --selected-red: #ff0000;
  --link-red: #ff0000;
  --link-pink: #c2185b;
}
/* SHARE remains bright red in its resting state, not maroon. */
.site-header .header-actions #share-toggle {
  background-color: #ff0000;
  color: #fff;
  border-color: #ff0000;
  transition: background-color .16s ease, border-color .16s ease;
}
.site-header .header-actions #share-toggle:hover,
.site-header .header-actions #share-toggle:focus-visible,
.site-header .header-actions #share-toggle[aria-expanded="true"] {
  background-color: #c2185b;
  border-color: #c2185b;
  color: #fff;
}
/* Popup shares the same red/pink identity without brown-toned backgrounds. */
.site-header .share-menu:not([hidden]) { background: #000; border-color: #ff0000; }
.site-header .share-menu button {border-bottom-color: #ff0000; }
.site-header .share-menu button:hover,
.site-header .share-menu button:focus-visible { background: #c2185b; }
/* Chapter K: header, playing row, scrollbar, and dividers are pure red.
   Unselected rows remain black to preserve exactly ONE selected row. */
#chapter-k .track-table th,
#chapter-k .track-table thead tr { background: #ff0000; color: #fff; }
#chapter-k .track-table tbody tr.current,
#chapter-k .track-table tbody tr.current:hover,
#chapter-k .track-table tbody tr.current:focus-within { background: #ff0000; color: #fff; }
#chapter-k .track-table tbody tr:not(.current),
#chapter-k .track-table tbody tr:not(.current):hover,
#chapter-k .track-table tbody tr:not(.current):focus-within { background: #000; }
#chapter-k .track-table tbody tr:not(.current):hover,
#chapter-k .track-table tbody tr:not(.current):focus-within { color: #ff0000; }
#chapter-k .track-table td { border-bottom-color: #ff0000; }
#chapter-k .track-scroll { scrollbar-color: #ff0000 #000; }
/* Chapter I: normal/visited red, hovering/focusing dark pink. */
#chapter-i .history-links,
#chapter-i .history-links a,
#chapter-i .history-links a:visited {
  color: #ff0000;
  text-decoration-color: #ff0000;
}
#chapter-i .history-links a:hover,
#chapter-i .history-links a:visited:hover,
#chapter-i .history-links a:focus-visible {
  color: #c2185b;
  text-decoration-color: #c2185b;
}
