/* The dhat panel and menu entry on youtube.com. YouTube's own colour
   variables, so the panel follows its light and dark themes. */

#youtube-index-panel {
  margin: 0 0 16px;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  background: var(--yt-spec-base-background, #fff);
  color: var(--yt-spec-text-primary, #0f0f0f);
  font: 400 14px/20px Roboto, Arial, sans-serif;
  overflow: hidden;
}

.youtube-index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px 16px;
}

.youtube-index-title {
  font-size: 16px;
  font-weight: 700;
}

/* Every icon (icons.ts): the size of the text around it, in its colour */
.youtube-index-icon {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -3px;
}

/* The top row: dhat (the open video), History */
.youtube-index-tops {
  display: flex;
  gap: 2px;
}

.youtube-index-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: none;
  color: var(--yt-spec-text-secondary, #606060);
  font: 500 15px/20px Roboto, Arial, sans-serif;
  cursor: pointer;
}

.youtube-index-top:hover {
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

.youtube-index-top[aria-pressed="true"] {
  color: var(--yt-spec-text-primary, #0f0f0f);
  font-weight: 700;
}

.youtube-index-close,
.youtube-index-redo,
.youtube-index-thumb,
.youtube-index-account,
.youtube-index-history-button {
  display: inline-flex;
  border: 0;
  background: none;
  color: var(--yt-spec-text-secondary, #606060);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
}

.youtube-index-head-buttons {
  display: flex;
  align-items: center;
}

.youtube-index-head-buttons .youtube-index-icon {
  width: 18px;
  height: 18px;
}

/* History, pressed while its list is open */
.youtube-index-history-button[aria-pressed="true"] {
  color: var(--yt-spec-text-primary, #0f0f0f);
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

.youtube-index-close:hover,
.youtube-index-redo:hover,
.youtube-index-thumb:hover,
.youtube-index-account:hover,
.youtube-index-history-button:hover {
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

/* Admin mode's row of models (models.ts, 0.20.0), between the top row and
   the video tabs: the models as one sliding switch, the picked one raised,
   each with a dot for how it stands; Run all at the right end. */
.youtube-index-models {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 12px 4px 16px;
}

.youtube-index-model-list {
  display: inline-flex;
  min-width: 0;
  padding: 2px;
  border-radius: 16px;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
  overflow-x: auto;
  scrollbar-width: none;
}

.youtube-index-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  border: 0;
  border-radius: 14px;
  padding: 3px 10px;
  background: none;
  color: var(--yt-spec-text-secondary, #606060);
  font: 500 12px/18px Roboto, Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.youtube-index-model:hover {
  color: var(--yt-spec-text-primary, #0f0f0f);
}

.youtube-index-model[aria-checked="true"] {
  background: var(--yt-spec-base-background, #fff);
  color: var(--yt-spec-text-primary, #0f0f0f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Done green, failed red, not run an empty ring, cannot run here a dashed one; running turns */
span.youtube-index-model-dot {
  width: 8px;
  height: 8px;
  flex: none;
  box-sizing: border-box;
  border-radius: 50%;
}

span.youtube-index-model-dot[data-dot="done"] {
  background: #199e70;
}

span.youtube-index-model-dot[data-dot="failed"] {
  background: #d93025;
}

span.youtube-index-model-dot[data-dot="none"] {
  border: 1.5px solid currentColor;
}

span.youtube-index-model-dot[data-dot="off"] {
  border: 1.5px dashed currentColor;
  opacity: 0.5;
}

svg.youtube-index-model-dot {
  width: 12px;
  height: 12px;
  margin: 0 -2px;
}

.youtube-index-run-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: auto;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  padding: 2px 10px;
  background: none;
  color: var(--yt-spec-call-to-action, #065fd4);
  font: 500 12px/18px Roboto, Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.youtube-index-run-all .youtube-index-icon {
  width: 12px;
  height: 12px;
}

.youtube-index-run-all:hover {
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

.youtube-index-run-all[aria-disabled="true"] {
  color: var(--yt-spec-text-secondary, #606060);
  opacity: 0.5;
  cursor: default;
}

.youtube-index-models-error {
  margin: 0;
  padding: 0 16px 4px;
  color: #d93025;
  font-size: 12px;
}

/* A model that has not read the video: its button, dressed like Try again */
.youtube-index-run-model {
  margin-top: 4px;
  border: 0;
  border-radius: 18px;
  padding: 8px 16px;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
  cursor: pointer;
}

.youtube-index-run-model[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}

/* The video tabs, then the thumbs and redo at the right end of the same row */
.youtube-index-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 4px 12px 8px 16px;
  border-bottom: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  container-type: inline-size;
}

/* Four tabs with their names, then the thumbs and redo, need about 480px.
   YouTube's column gives the row about 374px, and the thumbs stay on the
   tabs' line (Scott, 2026-09-28: "same line ... but right-aligned"). So
   there, a tab not picked shows its picture alone, and its name on hover
   (0.14.0, when Comments made four tabs). */
@container (max-width: 499px) {
  .youtube-index-tab[aria-selected="false"] .youtube-index-tab-name {
    display: none;
  }
}

.youtube-index-tab-list {
  display: flex;
  gap: 6px;
}

.youtube-index-tab-buttons {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.youtube-index-tab-buttons .youtube-index-thumb,
.youtube-index-tab-buttons .youtube-index-redo {
  padding: 5px;
}

.youtube-index-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
  color: var(--yt-spec-text-primary, #0f0f0f);
  cursor: pointer;
}

.youtube-index-tab[aria-selected="true"] {
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
}

.youtube-index-tab[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

/* A tab whose file is still being made: its own picture, then this small turning icon */
.youtube-index-turning {
  animation: youtube-index-turn 1s linear infinite;
}

.youtube-index-tab .youtube-index-turning {
  width: 14px;
  height: 14px;
  margin-left: -2px;
}

@keyframes youtube-index-turn {
  to {
    transform: rotate(360deg);
  }
}

.youtube-index-body {
  padding: 8px 16px 12px;
}

.youtube-index-status {
  margin: 4px 0 8px;
  font-weight: 500;
}

/* A finished video's status line folds away the speakers, source and check report */
.youtube-index-about {
  margin: 4px 0 8px;
}

.youtube-index-about > summary.youtube-index-status {
  margin: 0 0 4px;
  cursor: pointer;
}

.youtube-index-meta {
  margin: 0 0 4px;
  color: var(--yt-spec-text-secondary, #606060);
  font-size: 13px;
}

.youtube-index-report summary {
  cursor: pointer;
  color: var(--yt-spec-text-secondary, #606060);
  font-size: 13px;
}

.youtube-index-report pre {
  font: 12px/16px "Roboto Mono", monospace;
  white-space: pre-wrap;
  margin: 4px 0;
}

.youtube-index-list {
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 8px;
}

.youtube-index-span {
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--yt-spec-text-secondary, #606060);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.youtube-index-entry {
  padding: 4px 0;
}

/* A button beside YouTube's player; a link to YouTube on dhat's site (job C) */
.youtube-index-time {
  border: 0;
  padding: 0 6px 0 0;
  background: none;
  color: var(--yt-spec-call-to-action, #065fd4);
  font: 500 13px/20px Roboto, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.youtube-index-time:hover {
  text-decoration: underline;
}

.youtube-index-tag {
  display: inline-block;
  margin-right: 6px;
  font-size: 13px;
  cursor: default;
}

.youtube-index-speaker {
  margin-right: 6px;
  font-weight: 500;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-quote {
  display: block;
  margin: 2px 0 0 12px;
  font-style: italic;
  color: var(--yt-spec-text-secondary, #606060);
}

/* Summary tab */
/* The first paragraph, a little more open so it reads less dense (Scott,
   2026-09-28: "a little less intimidating") */
.youtube-index-gist {
  margin: 6px 0 14px;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.012em;
  word-spacing: 0.04em;
}

/* The summary's parts: headings that each open to their text, and stay open */
.youtube-index-part {
  border-top: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}

.youtube-index-heading {
  padding: 8px 0;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  cursor: pointer;
}

.youtube-index-part[open] > .youtube-index-heading {
  padding-bottom: 2px;
}

/* A part in one sentence, under its heading */
.youtube-index-part-line {
  margin: 2px 0 0;
  font: 400 13px/19px Roboto, Arial, sans-serif;
  color: var(--yt-spec-text-secondary, #606060);
}

/* An opened part's text: the one sentence's second paragraph, the same size
   and colour (Scott, 2026-09-26: "should read like the second paragraph") */
.youtube-index-part-text {
  margin: 6px 0 10px;
  font: 400 13px/19px Roboto, Arial, sans-serif;
  color: var(--yt-spec-text-secondary, #606060);
}

/* Short/Full and the orders sit above the list they change */
.youtube-index-parts {
  margin-top: 6px;
}

/* The Summary's cloud: the ideas the video keeps coming back to, in one
   colour, each opening a card of where it comes up (Scott, 2026-10-06) */
.youtube-index-concept.youtube-index-idea {
  color: var(--yt-spec-call-to-action, #065fd4);
}

/* An idea's card: each line that raises it, its time first */
.youtube-index-idea-line {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 6px;
  align-items: baseline;
  margin-top: 6px;
}

/* Reactions tab (0.14.0 as Comments): the paragraph, a bar of who agrees
   with the video by likes, a cloud of ideas, then each camp and each line
   pushed back on, closed until opened. One colour per side, the same in the
   bar, the cloud, the dots and the quotes' edges. */
.youtube-index-stance-agree {
  --yi-side: #3987e5;
}

.youtube-index-stance-pushback {
  --yi-side: #d95926;
}

.youtube-index-stance-both {
  --yi-side: #199e70;
}

.youtube-index-stance-side {
  --yi-side: #9aa0a6;
}

.youtube-index-stance-bar {
  display: flex;
  height: 12px;
  margin: 4px 0 6px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}

.youtube-index-stance {
  display: block;
  height: 100%;
  background: var(--yi-side);
}

.youtube-index-stance-key {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-stance-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--yi-side);
  vertical-align: 0;
}

.youtube-index-comments-read {
  margin-bottom: 2px;
}

.youtube-index-camp-counts {
  margin-left: 8px;
  font-weight: 400;
  font-size: 12px;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-camp-body {
  padding: 0 0 10px 15px;
}

.youtube-index-comment {
  margin: 6px 0;
  padding: 1px 0 1px 10px;
  border-left: 3px solid var(--yi-edge, #9aa0a6);
  font-size: 13px;
  line-height: 19px;
}

.youtube-index-edge-agree {
  --yi-edge: #3987e5;
}

.youtube-index-edge-pushback {
  --yi-edge: #d95926;
}

.youtube-index-edge-both {
  --yi-edge: #199e70;
}

.youtube-index-edge-side {
  --yi-edge: #9aa0a6;
}

.youtube-index-comment-facts {
  display: block;
  font-size: 12px;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-comment-label {
  margin: 10px 0 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--yt-spec-text-secondary, #606060);
}

/* An index line the comments argue with, as the Index shows a line: the
   heading of its row, in the line's own weight */
.youtube-index-pushback-line {
  display: inline;
  font-weight: 400;
}

/* The Reactions tab's three sections, Overall, Factions and Pushback on the
   video: each opens with a big heading over a thick rule, with room above
   (Scott, 2026-09-30: "each of those sections needs to be more clearly
   delineated"; he picked rules and big headings over boxes or tabs) */
.youtube-index-reaction + .youtube-index-reaction {
  margin-top: 24px;
}

.youtube-index-reaction-heading {
  display: flex;
  align-items: baseline;
  margin: 4px 0 6px;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--yt-spec-text-primary, #0f0f0f);
  font: 700 16px/22px Roboto, Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.youtube-index-reaction-heading .youtube-index-camp-counts {
  margin-left: auto;
  letter-spacing: normal;
  text-transform: none;
}

/* The first camp or line sits right under the thick rule, with no thin one */
.youtube-index-reaction-heading + .youtube-index-part {
  border-top: none;
}

/* What the room keeps bringing up: each idea sized by its weight (set in
   comments-tab.ts), in its side's colour, the biggest in the middle */
.youtube-index-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 2px 12px;
  margin: 2px 0 10px;
  padding: 6px 4px;
  line-height: 1.2;
}

/* Each idea is a button that opens a card of the comments that raise it
   (Scott, 2026-10-06: "hover links"), so it loses a button's own look */
.youtube-index-concept {
  padding: 0;
  border: 0;
  background: none;
  color: var(--yi-side);
  font-family: inherit;
  font-weight: 500;
  line-height: inherit;
  cursor: pointer;
}

.youtube-index-concept:hover,
.youtube-index-concept:focus-visible {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* An idea's card: its counts, then its comments, scrolling past a screenful */
#youtube-index-card .youtube-index-card-body > .youtube-index-comment {
  margin: 8px 0 0;
}

#youtube-index-card:has(.youtube-index-comment),
#youtube-index-card:has(.youtube-index-idea-line) {
  max-height: min(420px, calc(100vh - 32px));
  overflow-y: auto;
}

/* Side talk's grey is too faint for words */
.youtube-index-concept.youtube-index-stance-side {
  color: var(--yt-spec-text-secondary, #606060);
}

/* Transcript tab: line by line, or by speaker once who speaks when is known */
.youtube-index-line {
  padding: 2px 0;
}

.youtube-index-turn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}

.youtube-index-turn-body {
  min-width: 0;
}

.youtube-index-turn-name {
  font-weight: 500;
}

.youtube-index-turn-text {
  margin: 0;
}

.youtube-index-turn-text .youtube-index-time {
  padding: 0 4px 0 0;
  font-size: 12px;
}

/* A name that opens a card (card.ts), not a new page: blue, underlined with
   dots. Scott, 2026-09-28, tried plain heavier words for an hour, then: "should
   revert to links for now, they're not noticeable enough" */
.youtube-index-ref {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--yt-spec-call-to-action, #065fd4);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* "[?]": the captions were hard to make out there (dom.ts withUnsure) */
.youtube-index-unsure {
  margin-left: 1px;
  font-size: 0.75em;
  opacity: 0.55;
  cursor: help;
}

.youtube-index-tag .youtube-index-icon {
  width: 14px;
  height: 14px;
}

.youtube-index-card-link .youtube-index-icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  vertical-align: -1px;
}

/* The thumbs up and down in the head (thumbs.ts): icons only */
.youtube-index-thumb[aria-pressed="true"] {
  color: var(--yt-spec-call-to-action, #065fd4);
}

.youtube-index-thumb[aria-pressed="true"] .youtube-index-icon {
  fill: currentColor;
  fill-opacity: 0.15;
}

.youtube-index-thumb-failed {
  color: #c00;
}

.youtube-index-thumb:disabled {
  opacity: 0.5;
  cursor: default;
}

/* The popup a thumbs down opens, under it, on the page's body like the card */
#youtube-index-feedback {
  position: fixed;
  z-index: 10000;
  top: 96px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  padding: 12px;
  border-radius: 12px;
  background: var(--yt-spec-base-background, #fff);
  color: var(--yt-spec-text-primary, #0f0f0f);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  font: 400 14px/20px Roboto, Arial, sans-serif;
}

.youtube-index-popup-text {
  box-sizing: border-box;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  resize: vertical;
}

.youtube-index-popup-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.youtube-index-popup-button {
  border: 0;
  border-radius: 18px;
  padding: 6px 14px;
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
  font: 500 14px/20px Roboto, Arial, sans-serif;
  cursor: pointer;
}

/* The card itself, on the page's body so the list cannot cut it off. Its
   text wraps around the picture (Scott, 2026-09-28: no tall empty column) */
#youtube-index-card {
  position: fixed;
  z-index: 10000;
  display: flow-root;
  width: 320px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  border-radius: 12px;
  background: var(--yt-spec-menu-background, #fff);
  color: var(--yt-spec-text-primary, #0f0f0f);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  font: 400 13px/18px Roboto, Arial, sans-serif;
}

/* The summary a dhat mark opens (marks.ts), and a speaker's card: wider,
   since they are paragraphs */
#youtube-index-card.youtube-index-card-wide {
  width: 400px;
}

.youtube-index-card-gist {
  margin-top: 4px;
}

/* A video card on YouTube's own pages whose video has a dhat (marks.ts): on
   a newer card, on the thumbnail (below); on an older one (search), a small
   grey picture at the end of its views-and-date line */
.youtube-index-has-dhat {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  /* The line's own grey, in the light theme and the dark one alike */
  color: inherit;
  opacity: 0.7;
  vertical-align: middle;
  cursor: help;
}

.youtube-index-has-dhat .youtube-index-icon {
  width: 14px;
  height: 14px;
}

.youtube-index-has-dhat:hover {
  opacity: 1;
}

/* On the thumbnail's top-right corner (Scott, 2026-09-28: "top right of the
   video card next to the 'watched' clock icon"), dressed like YouTube's own
   round buttons there. YouTube's Watch later and Add to queue take the right
   36px on hover, 4px from the top; the mark sits just left of them, its
   middle level with Watch later's, so it never covers them. */
.youtube-index-has-dhat.youtube-index-on-thumbnail {
  position: absolute;
  top: 6px;
  right: 42px;
  z-index: 3;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  opacity: 1;
  cursor: pointer;
}

.youtube-index-has-dhat.youtube-index-on-thumbnail .youtube-index-icon {
  width: 16px;
  height: 16px;
  vertical-align: 0;
}

.youtube-index-has-dhat.youtube-index-on-thumbnail:hover {
  background: rgba(0, 0, 0, 0.8);
}

.youtube-index-card-picture {
  float: left;
  margin: 2px 12px 4px 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top;
}

.youtube-index-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 15px/20px Roboto, Arial, sans-serif;
}

.youtube-index-card-about {
  margin-top: 2px;
  color: var(--yt-spec-text-secondary, #606060);
}

/* The card's second paragraph: how the name fits into this video, in
   italics; Claude's gist of what is said, not a quote (Scott, 2026-09-28) */
.youtube-index-card-role {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--yt-spec-text-secondary, #606060);
}

/* A card's map takes its whole width, under the picture and the words */
#youtube-index-card .youtube-index-map {
  clear: both;
  max-width: none;
  margin: 10px 0 0;
}

/* A card's two maps (a country on the world and its continent, any other
   place on its continent and in its country) take its whole width too */
#youtube-index-card .youtube-index-maps {
  clear: both;
  max-width: none;
  margin: 10px 0 0;
}

#youtube-index-card .youtube-index-maps .youtube-index-map {
  flex-basis: 0;
  min-width: 0;
  width: auto;
  margin: 0;
}

/* The country a place close up is in, under its map */
.youtube-index-card-country {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-weight: 500;
}

.youtube-index-card-country .youtube-index-icon {
  width: 14px;
  height: 14px;
  color: #d93025;
}

/* A time's card in the Entities tab: the time, then what is said there */
.youtube-index-card-time {
  font: 500 13px/18px Roboto, Arial, sans-serif;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-card-said {
  margin: 2px 0 0;
  font-style: italic;
}

.youtube-index-card-said b {
  font-weight: 600;
}

.youtube-index-card-links {
  margin-top: 6px;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-card-link {
  color: var(--yt-spec-call-to-action, #065fd4);
  text-decoration: none;
}

.youtube-index-card-link:hover {
  text-decoration: underline;
}

/* The Index tab's filter: one line, scrolled sideways when it does not fit */
.youtube-index-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

/* A speaker's or a name's picture in its bubble */
.youtube-index-chip .youtube-index-avatar {
  width: 18px;
  height: 18px;
}

.youtube-index-chip .youtube-index-avatar-wide {
  width: auto;
  padding: 1px;
}

/* An index made with the first tags: a note and Redo at the top of the Index */
.youtube-index-obsolete {
  margin: 4px 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
  font-size: 13px;
  line-height: 18px;
}

.youtube-index-obsolete-redo {
  border: 0;
  border-radius: 14px;
  padding: 2px 12px;
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
  font: 500 12px/20px Roboto, Arial, sans-serif;
  cursor: pointer;
}

/* The Index's filter (Scott, 2026-09-28): All and the Entities and Kinds
   lists, then what is picked as small bubbles, wrapping onto more lines */
.youtube-index-filter-rows {
  margin: 10px 0 4px;
}

/* No sideways scroll here: it would cut off an open list */
.youtube-index-pickers {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* A list's button looks like a bubble, with an arrow */
.youtube-index-picker-button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  padding: 2px 6px 2px 10px;
  font: 500 12px/20px Roboto, Arial, sans-serif;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.youtube-index-picker-button::-webkit-details-marker {
  display: none;
}

.youtube-index-picker[open] > .youtube-index-picker-button {
  border-color: var(--yt-spec-text-primary, #0f0f0f);
}

/* The list drops down over the Index, under the first line: All and the
   lists' buttons always sit there, whatever the bubbles wrap onto */
.youtube-index-picker-menu {
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 5;
  width: min(280px, 100%);
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 10px;
  background: var(--yt-spec-base-background, #fff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* The panel cuts off what runs past its edge (its round corners), so it
   stops cutting while a list is open: the list may run over what is below */
#youtube-index-panel:has(.youtube-index-picker[open]) {
  overflow: visible;
}

/* One row of a list: a tick when picked, the picture, the full name */
.youtube-index-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  background: none;
  color: var(--yt-spec-text-primary, #0f0f0f);
  font: 400 13px/20px Roboto, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.youtube-index-pick:hover {
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

.youtube-index-pick-box,
.youtube-index-pick-face {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.youtube-index-pick-box .youtube-index-icon {
  width: 16px;
  height: 16px;
}

.youtube-index-pick-face .youtube-index-avatar {
  width: 20px;
  height: 20px;
}

.youtube-index-pick-face .youtube-index-avatar-wide {
  width: auto;
}

/* A kind's count of lines, at the row's right end (Scott, 2026-10-06) */
.youtube-index-pick-count {
  margin-left: auto;
  padding-left: 12px;
  color: var(--yt-spec-text-secondary, #606060);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* A picked bubble: the picture or initials alone, drawn light */
.youtube-index-pickers .youtube-index-chip.youtube-index-picked {
  padding: 1px 4px;
}

.youtube-index-initials {
  font: 500 11px/18px Roboto, Arial, sans-serif;
}

/* Between the entities' bubbles and the kinds' */
.youtube-index-bubble-gap {
  flex: none;
  align-self: stretch;
  width: 1px;
  margin: 3px 2px;
  background: var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}

/* Choices that change how a list is shown sit at its right end: the order,
   expand all (Scott, 2026-09-28: "they should be right aligned") */
.youtube-index-filters.youtube-index-choices {
  justify-content: flex-end;
}

.youtube-index-chip {
  flex: none;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  padding: 2px 10px;
  background: none;
  color: var(--yt-spec-text-primary, #0f0f0f);
  font: 500 12px/20px Roboto, Arial, sans-serif;
  cursor: pointer;
}

/* A bubble that is only a picture: its name shows on hover */
.youtube-index-chip[aria-label] {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
}

.youtube-index-chip[aria-pressed="true"] {
  border-color: var(--yt-spec-text-primary, #0f0f0f);
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
}

/* Entities tab */
.youtube-index-entity {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}

.youtube-index-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

/* A logo or wordmark (tabs.ts picture): shown whole, on white, not cut to a circle */
.youtube-index-avatar-wide {
  box-sizing: border-box;
  padding: 2px;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}

/* No picture: a plain person or thing shape */
.youtube-index-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-spec-text-secondary, #606060);
}

.youtube-index-avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 15px/1 Roboto, Arial, sans-serif;
  color: var(--yt-spec-text-secondary, #606060);
}

/* Two letters in a bubble's small circle */
.youtube-index-chip .youtube-index-avatar-letter,
.youtube-index-pick-face .youtube-index-avatar-letter {
  font-size: 9px;
}

.youtube-index-entity-body {
  flex: 1;
  min-width: 0;
}

/* The name, a country's flag beside it, and Show in Index at the end */
.youtube-index-entity-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.youtube-index-entity-title .youtube-index-show {
  margin-left: auto;
}

/* Who or what it is, in a few words, under the name: the row's main line after the name */
.youtube-index-definition {
  color: var(--yt-spec-text-secondary, #606060);
  font-size: 14px;
  line-height: 20px;
}

/* A country's flag (card.ts flagOf) */
.youtube-index-flag {
  height: 14px;
  width: auto;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 2px;
}

/* A small map (map.ts): the world, a continent or a country close up. Blue
   sea, pale land with borders, the country it is in shaded, a red dot: the
   same colours in YouTube's light and dark themes, like a picture (Scott,
   2026-09-28: the grey on grey was unreadable) */
.youtube-index-map {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 6px 0 2px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Two maps side by side at one height (map.ts sets each one's share): a
   country on the world and its continent (Scott, 2026-10-06). In an
   Entities row, the pair fits the narrow column beside the video */
.youtube-index-maps {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 320px;
  margin: 6px 0 2px;
}

.youtube-index-maps .youtube-index-map {
  flex-basis: 0;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
}

.youtube-index-map-sea {
  fill: #cfe3f5;
}

.youtube-index-map-land {
  fill: #f4f1ea;
  stroke: #a9a295;
  stroke-width: 0.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.youtube-index-map-home {
  fill: #f5c44e;
  stroke: #7d6320;
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* The whole world is small: thinner borders */
.youtube-index-map-world .youtube-index-map-land {
  stroke-width: 0.3;
}

.youtube-index-map-world .youtube-index-map-home {
  stroke-width: 0.6;
}

.youtube-index-map-dot {
  fill: #d93025;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.youtube-index-count {
  font-size: 13px;
  color: var(--yt-spec-text-secondary, #606060);
}

/* The Index, narrowed to this name or this speaker's lines: an icon, named on hover */
.youtube-index-show {
  display: inline-flex;
  border: 0;
  padding: 2px;
  border-radius: 4px;
  background: none;
  color: var(--yt-spec-text-secondary, #606060);
  cursor: pointer;
}

.youtube-index-show .youtube-index-icon {
  width: 14px;
  height: 14px;
}

.youtube-index-show:hover {
  color: var(--yt-spec-text-primary, #0f0f0f);
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

/* History tab: every video with a dhat; a row opens it on YouTube in a new tab */
.youtube-index-history {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  color: inherit;
  text-decoration: none;
}

.youtube-index-history:hover .youtube-index-history-title {
  text-decoration: underline;
}

.youtube-index-history-thumb {
  flex: none;
  width: 96px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

.youtube-index-history-body {
  min-width: 0;
}

.youtube-index-history-title {
  font: 500 14px/20px Roboto, Arial, sans-serif;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* The context, apart from the definition and smaller: what was said where a
   name first comes up, in italics, the name in bold, behind a thin rule like
   a quote; two lines at most (Scott, 2026-09-26) */
.youtube-index-context {
  margin: 8px 0 0;
  padding-left: 8px;
  border-left: 2px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  font-size: 12px;
  line-height: 17px;
  font-style: italic;
  color: var(--yt-spec-text-secondary, #606060);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.youtube-index-context b {
  font-weight: 600;
  color: var(--yt-spec-text-primary, #0f0f0f);
}

.youtube-index-retry {
  border: 0;
  border-radius: 18px;
  padding: 8px 16px;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  background: var(--yt-spec-text-primary, #0f0f0f);
  color: var(--yt-spec-base-background, #fff);
  cursor: pointer;
}

/* The entry in the ... menu under the player, dressed like its neighbours. */
.youtube-index-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  padding: 0 36px 0 16px;
  font: 400 14px/20px Roboto, Arial, sans-serif;
  color: var(--yt-spec-text-primary, #0f0f0f);
  cursor: pointer;
}

.youtube-index-menu-item:hover,
.youtube-index-menu-item:focus {
  background: var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  outline: none;
}

#youtube-index-toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9999;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #0f0f0f;
  color: #fff;
  font: 400 14px/20px Roboto, Arial, sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* An Entities row's times, and Show in Index after them */
.youtube-index-entity-times {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

/* The account card's buttons: the setup page, Change AI, and Compare models for developers (since 0.16.0) */
.youtube-index-card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.youtube-index-card-button {
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 16px;
  padding: 4px 12px;
  background: none;
  color: var(--yt-spec-call-to-action, #065fd4);
  font: 500 13px/18px Roboto, Arial, sans-serif;
  cursor: pointer;
}

.youtube-index-card-button:hover {
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

/* The account card's settings: admin mode's switch, for the server's developer (0.20.0) */
.youtube-index-card-settings {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}

.youtube-index-card-settings-title {
  margin-bottom: 4px;
  color: var(--yt-spec-text-secondary, #606060);
  font: 500 12px/16px Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.youtube-index-setting {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

.youtube-index-setting-switch {
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--yt-spec-call-to-action, #065fd4);
  cursor: pointer;
}

/* With nobody signed in to Claude or ChatGPT, the panel says so first (0.15.0) */
.youtube-index-setup-note {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
}

/* "Shared by Scott", beside dhat on a shared page (0.15.0) */
.youtube-index-shared-by {
  align-self: center;
  margin-left: 6px;
  color: var(--yt-spec-text-secondary, #606060);
  font-size: 13px;
}

/* Share's popup (0.15.0): the words, the link or the code, the buttons */
.youtube-index-share-words {
  margin: 8px 0;
}

.youtube-index-share-problem {
  margin: 8px 0;
  color: #c5221f;
}

.youtube-index-share-link,
.youtube-index-share-code {
  resize: none;
}

.youtube-index-share-code {
  letter-spacing: 4px;
  font-size: 18px;
}

.youtube-index-share-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  color: var(--yt-spec-call-to-action, #065fd4);
  text-decoration: none;
}

/* The payment wizard, in place of the tabs, for a new video with no credit (0.18.0, pay.ts) */
.youtube-index-pay {
  padding: 12px 16px 16px;
}

.youtube-index-pay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font: 500 16px/22px Roboto, Arial, sans-serif;
}

.youtube-index-pay-words {
  margin: 0 0 8px;
  line-height: 20px;
}

.youtube-index-pay-balance {
  margin: 0 0 12px;
  font-weight: 500;
}

.youtube-index-pay-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.youtube-index-pay-pack {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  background: var(--yt-spec-badge-chip-background, rgba(0, 0, 0, 0.05));
  color: var(--yt-spec-text-primary, #0f0f0f);
  font: 400 14px/20px Roboto, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.youtube-index-pay-pack:hover {
  border-color: var(--yt-spec-text-primary, #0f0f0f);
}

.youtube-index-pay-pack-price {
  font-weight: 500;
  font-size: 16px;
}

.youtube-index-pay-test {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef7e0;
  color: #5f4b00;
  font-size: 13px;
  line-height: 18px;
}

.youtube-index-pay-problem {
  margin: 0 0 10px;
  color: #c5221f;
}

.youtube-index-pay .youtube-index-popup-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.youtube-index-pay .youtube-index-popup-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* How to update this copy (docs/plans/queue-end-to-end.md, 4; the upgrade
   notice, round 4, job U): calm yellow when a newer dhat is out, red when
   this one must be updated. Its own colours, light or dark YouTube. */
.dhat-update-note {
  margin: 4px 12px 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fef7e0;
  color: #3c2f00;
  font: 400 12px/18px Roboto, Arial, sans-serif;
}

.dhat-update-note.dhat-update-must {
  background: #fce8e6;
  color: #5f2120;
}

.dhat-update-link {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  white-space: nowrap;
}

/* In the account card: the card's own padding is its margin. */
#youtube-index-card .dhat-update-note {
  margin: 8px 0 0;
}
