/* Nội dung: the catalogue pages (frontend/panel/content/). Sizes and
   colours are the values the behaviour ledgers read from the reference
   (output/reference/behaviours/content-catalogue.md, content-reading.md;
   cited per block); the rules are this port's own. The reference's "big
   screen" is a window wider than 900 px. */

/* The catalogue page (cat#28, read#20) ----------------------------------------- */

.ct {
  height: var(--page-h);
  background: var(--bg);
}

.ct-page {
  position: relative;
  display: flex;
  height: 100%;
}

.ct-filters {
  flex: 0 0 306px;
  width: 306px;
  height: 100%;
  overflow-y: auto;
  border-right: 3px solid color-mix(in srgb, var(--ink) 6.7%, transparent);
  background: var(--surface);
}

.ct-main {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
}

.ct-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
}

.ct-backdrop,
.ct-mobile-head,
.ct-drawer-close {
  display: none;
}

/* Small windows: the filters in a drawer opened from a header over the list (read#21; md:L46109–46236). */
@media (max-width: 900px) {
  .ct-filters {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1300;
    width: 306px;
    max-width: calc(100vw - 60px);
    border-right: 0;
    transform: translateX(-100%);
    transition: transform 0.225s ease;
  }

  .ct-page.is-drawer-open .ct-filters {
    transform: none;
  }

  .ct-page.is-drawer-open .ct-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1299;
    display: block;
    background: rgba(0, 0, 0, 0.5);
  }

  .ct-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 16px 16px 0 auto;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
    color: var(--text-label);
    cursor: pointer;
  }

  /* It reaches up behind the see-through app bar, solid there (cat#16, md:L46148–46160: top −ar, solid to ar). */
  .ct-mobile-head {
    position: absolute;
    top: calc(-1 * var(--appbar-h));
    right: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(90px + var(--appbar-h));
    padding: var(--appbar-h) 16px 0;
    background: linear-gradient(to bottom, var(--bg-deep) 0%, var(--bg-deep) var(--appbar-h), color-mix(in srgb, var(--bg-deep) 90%, transparent) calc(var(--appbar-h) + 20px), transparent 100%);
    pointer-events: none;
  }

  .ct-mobile-head > * {
    pointer-events: auto;
  }

  .ct-scroll {
    padding-top: 90px;
  }
}

.ct-mobile-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.ct-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(54vw, 220px);
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-strong);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}

.ct-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--wovia-blue);
  color: var(--on-accent);
  font-size: 11px;
}

/* The filter column's parts (read#28–#32; md:L42036–42091) ------------------------ */

.ct-panel {
  padding: 16px;
}

.ct-panel-level {
  padding-top: 22px;
}

.ct-panel-pages {
  padding-top: 16px;
}

.ct-caption {
  color: var(--text-label);
  font-size: 12px;
  line-height: 1.4;
}

.ct-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--ink) 23%, transparent);
  border-radius: 4px;
}

.ct-search:hover {
  border-color: var(--hover-line);
}

.ct-search:focus-within {
  border: 2px solid var(--accent-soft);
}

.ct-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font: 400 16px/1.4 var(--font);
  outline: none;
}

.ct-search-input::-webkit-search-cancel-button {
  display: none;
}

/* A placeholder of its own (the Netflix tab's) shows once the label has moved up, as MUI's outlined field shows it. */
.ct-search-input::placeholder {
  color: transparent;
}

.ct-search-input:focus::placeholder {
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.ct-search-label {
  position: absolute;
  top: 50%;
  left: 12px;
  padding: 0 3px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  font-size: 16px;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left top;
  transition: transform 0.2s, top 0.2s, color 0.2s;
}

.ct-search-input:focus + .ct-search-label,
.ct-search-input:not(:placeholder-shown) + .ct-search-label {
  top: 0;
  background: var(--surface);
  transform: translateY(-50%) scale(0.75);
}

.ct-search-input:focus + .ct-search-label {
  color: var(--accent-soft);
}

.ct-search-icon {
  margin-right: 10px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  pointer-events: none;
}

.ct-choices .ct-caption {
  margin-bottom: 6px;
}

.ct-choice-row {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 4px;
  overflow: hidden;
}

.ct-choice {
  flex: 1 1 auto;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-left: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  font: 500 13px/1.3 var(--font);
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
}

.ct-choice:first-child {
  border-left: 0;
}

.ct-choice:hover {
  background: var(--hover);
}

.ct-choice.is-on {
  background: color-mix(in srgb, var(--accent-soft) 16%, transparent);
  color: var(--accent-soft);
}

.ct-level-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ct-level-line {
  cursor: pointer;
}

.ct-level-line:hover {
  color: var(--selected-text);
}

/* The range slider (read#29; md:L41396–41441) */
.ct-range .ct-caption {
  margin-bottom: 4px;
}

.ct-slider {
  padding: 0 10px;
}

.ct-slider-rail {
  position: relative;
  display: block;
  height: 30px;
  touch-action: none;
  cursor: pointer;
}

.ct-slider-rail::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-soft);
  opacity: 0.38;
  transform: translateY(-50%);
}

.ct-slider-fill {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-soft);
  transform: translateY(-50%);
}

.ct-slider-mark {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 1px;
  background: var(--surface);
  transform: translate(-1px, -50%);
}

.ct-slider-thumb {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  transform: translate(-50%, -50%);
  outline: none;
}

.ct-slider-thumb:hover,
.ct-slider-thumb:focus-visible,
.ct-slider-thumb.is-active {
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-soft) 16%, transparent);
}

.ct-slider-value {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 2px 8px;
  border-radius: 4px;
  background: #757575;
  color: var(--on-accent);
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(-50%) scale(0);
  transition: transform 0.15s;
  pointer-events: none;
}

.ct-slider-thumb:hover .ct-slider-value,
.ct-slider-thumb:focus-visible .ct-slider-value,
.ct-slider-thumb.is-active .ct-slider-value {
  transform: translateX(-50%) scale(1);
}

.ct-slider-labels {
  position: relative;
  height: 22px;
}

.ct-slider-label {
  position: absolute;
  top: 0;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  font-size: 15px;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* The reference nudges the fourth mark's label 16 px left (md:L41433). */
.ct-pages-slider .ct-slider-label[data-index="3"] {
  margin-left: -16px;
}

/* The list, its states and cards (read#13–#19, #35; md:L42185–42823, L45633–45870) --- */

.ct-list-head:empty {
  display: none;
}

.ct-cards {
  padding-bottom: 0;
}

.ct-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.ct-waiting {
  visibility: hidden;
}

.ct-spinner {
  display: flex;
  justify-content: center;
  margin: 40px auto;
}

.ct-foot .ct-spinner {
  margin: 0;
}

.ct-page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0003;
  pointer-events: none;
}

.ct-page-loader-disk {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-raised) 73.3%, transparent);
}

.ct-page-loader-disk .spinner {
  opacity: 0.5;
}

.ct-state {
  width: 100%;
  padding-top: 170px;
  text-align: center;
}

/* What a tab offers under "nothing in this language" (tabs.js emptyLanguage). */
.ct-state-offer {
  width: min(560px, calc(100% - 32px));
  margin: 32px auto 0;
  text-align: left;
}

.ct-faded {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0.5;
}

.ct-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 10px;
}

.ct-clear {
  margin-top: 16px;
  opacity: 0.75;
}

.ct-retry {
  display: inline-block;
  padding: 4px 8px 8px;
  vertical-align: middle;
}

.ct-retry-text {
  display: inline-block;
  margin-right: 10px;
  padding: 5px 0;
}

.ct-outline-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 50%, transparent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent-soft);
  font: 500 13px/1 var(--font);
  text-transform: uppercase;
  cursor: pointer;
}

.ct-outline-button:hover {
  border-color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 8%, transparent);
}

.ct-top {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  /* The page's ground cut out of the blue: black on the light blue in dark (the reference's), near white on the strong blue in light. */
  color: var(--bg);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

/* Not while the page slides to another tab (cat#26; md:L45733–45735; panel/tab-swipe.js SLIDING_CLASS). */
.is-tab-sliding .ct-top {
  display: none;
}

.ct-card-wrap {
  padding: 0 16px;
}

.ct-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  max-width: 1000px;
  padding: 10px 16px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.ct-card:hover {
  background: var(--hover);
}

.ct-card.is-even {
  background: color-mix(in srgb, var(--ink) 2.6%, transparent);
}

.ct-card.is-even:hover {
  background: var(--hover);
}

.ct-card-number {
  flex: 0 0 24px;
  margin: 3px 14px 0 0;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  text-align: right;
  user-select: none;
}

.ct-card-picture {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin: 3px 20px 0 0;
  transition: transform 0.2s ease;
}

.ct-card-picture.is-vertical {
  width: 120px;
  height: 160px;
}

.ct-card-picture:hover {
  transform: scale(1.03);
}

.ct-card-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.ct-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: rgba(76, 175, 80, 0.12);
  color: oklch(from #4caf50 min(l, var(--max-lightness, 1)) c h);
}

.ct-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ct-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0 0 7px;
  padding: 0 4px;
  border: 1px solid oklch(from #bbfa min(l, var(--max-lightness, 1)) c h / alpha);
  border-radius: 5px;
  color: oklch(from #bbfa min(l, var(--max-lightness, 1)) c h / alpha);
  font-size: 0.9em;
  font-weight: 500;
}

.ct-card-title {
  overflow: hidden;
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ct-card-author {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-card-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ct-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
}

.ct-chip {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 10.2%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.ct-chip.is-active {
  border-color: color-mix(in srgb, var(--wovia-blue) 66.7%, transparent);
  background: color-mix(in srgb, var(--wovia-blue) 8%, transparent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--wovia-blue) 20%, transparent);
  color: var(--accent-soft);
}

.ct-chip-level {
  cursor: default;
}

.ct-chip-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* The band colours (cat#110, md:L40180): easy #4ade80, challenging #fbbf24, hard #f87171. On the page no lighter than
   the look allows (theme.css --max-lightness: the reference's own in dark); in the tooltip, dark in both looks, as they are. */
.ct-chip-level.is-easy,
.ct-tip-band.is-easy {
  --band: #4ade80;
}

.ct-chip-level.is-challenging,
.ct-tip-band.is-challenging {
  --band: #fbbf24;
}

.ct-chip-level.is-hard,
.ct-tip-band.is-hard {
  --band: #f87171;
}

.ct-chip-level:is(.is-easy, .is-challenging, .is-hard) {
  --band-in-look: oklch(from var(--band) min(l, var(--max-lightness, 1)) c h);
  border-color: color-mix(in srgb, var(--band-in-look) 40%, transparent);
  background: color-mix(in srgb, var(--band) 7.8%, transparent);
}

.ct-chip-level .ct-chip-dot {
  color: var(--band-in-look);
}

.ct-chip-level.is-active {
  box-shadow: 0 0 6px color-mix(in srgb, var(--wovia-blue) 20%, transparent);
}

.ct-chip-level > span:last-child {
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.ct-level-tip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.ct-tip-band {
  color: var(--band);
  font-weight: 600;
}

.ct-tip-columns > div {
  opacity: 0.8;
}

.ct-tip-columns.is-after {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .ct-card-wrap {
    padding: 0 8px;
  }

  .ct-card {
    padding: 10px 4px;
  }

  .ct-card-number {
    flex-basis: 20px;
    margin-right: 16px;
  }

  .ct-card-picture {
    margin-right: 12px;
  }

  .ct-card-picture.is-vertical {
    width: 92px;
    height: 140px;
  }

  .ct-card-title {
    display: -webkit-box;
    font-size: 16px;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

.ct-doc,
.ct-doc-part,
.ct-doc-missing {
  height: 100%;
}

.ct-doc-missing {
  padding: 8px;
}

/* The list's top, the sort caption, the admin's detail (cat#31, #86, #116, #140) -------- */

.ct-list-top:empty {
  display: none;
}

.ct-mobile-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ct-sort-caption {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-label);
  font-size: 12px;
}

.ct-sort-caption:empty {
  display: none;
}

.ct-admin-detail {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 0 16px;
  color: var(--text-muted);
  font: 13px/1.5 var(--mono, monospace);
  text-align: center;
  overflow-wrap: anywhere;
  user-select: text;
}

.ct-outside {
  height: 100%;
  overflow-y: auto;
}

/* Drills have no filter column content and no drawer on small screens (courses#9). */
@media (max-width: 900px) {
  .ct-page.no-drawer .ct-filters {
    display: none;
  }

  .ct-page.no-drawer .ct-mobile-head {
    height: calc(64px + var(--appbar-h));
  }

  .ct-page.no-drawer .ct-scroll {
    padding-top: 64px;
  }
}

/* The card's title row, the line under it, tags (cat#91–#97, read#49, courses#10) ---- */

.ct-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ct-card-title-row .ct-card-title {
  min-width: 0;
}

.ct-card-subtext {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-card-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.ct-card-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
}

.ct-narrow {
  display: none;
  align-items: center;
  gap: 3px;
}

.ct-card-watch {
  display: inline-flex;
  flex-shrink: 0;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  cursor: pointer;
}

.ct-card-watch:hover,
.ct-card-open:hover {
  color: var(--selected-text);
}

.ct-card-open {
  display: inline-flex;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  cursor: pointer;
}

.ct-card-host {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-card-delete {
  align-self: center;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 33.3%, transparent);
  cursor: pointer;
}

.ct-card-delete:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--text-strong);
}

/* A kind without a picture: its 64 px tile, the site's icon on it (md:L42861–42993). */
.ct-card-picture.is-tile {
  position: relative;
  width: 64px;
  height: 64px;
}

.ct-card-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tile) 18%, transparent);
  color: var(--tile);
}

.ct-card-tile-letters {
  margin-top: -2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* A learning resource's tile: its letter alone, 32 px bold (read#69; md:L42892–42919). */
.ct-card-tile-letter {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 32px;
  font-weight: 700;
  user-select: none;
}

/* A resource's "Open Link": pale pink, white on hover (read#69; md:L44321–44337). */
.ct-card-open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: color-mix(in srgb, var(--accent-soft) 53.3%, transparent);
  cursor: pointer;
}

.ct-card-open-link:hover {
  color: var(--selected-text);
}

.ct-card-favicon {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface);
}

/* Video cards (YouTube, Bilibili): the 16:9 thumbnail, no number, no zebra; tags and chips on one line (cat#88, #90, #97). */
.ct-card-wrap.is-video {
  padding: 0 12px;
}

.ct-card-wrap.is-video .ct-card {
  padding: 10px 0;
}

.ct-card-thumb {
  flex-shrink: 0;
  width: 216px;
  height: 121px;
  margin-right: 20px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
}

.ct-card-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.ct-card:hover .ct-card-thumb-img {
  transform: scale(1.03);
}

/* "My videos" on a video card (card-my-video.js): "+ My videos" under its line, always there, filled with a tick once
   the video is kept. */
.ct-card-actions {
  margin-top: 8px;
}

.ct-card-mine {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 50%, transparent);
  border-radius: 14px;
  background: transparent;
  color: var(--accent-soft);
  font: 500 13px/1 var(--font);
  cursor: pointer;
}

.ct-card-mine:hover {
  border-color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 8%, transparent);
}

.ct-card-mine[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

/* The video tabs' search over the list (video-search.js): the box, the channels whose name holds the words, a note. */
.ct-video-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1000px;
  margin: 0 0 16px;
  /* the cards' side margins (.ct-card-wrap), and room above for the box's label on its top edge */
  padding: 8px 16px 0;
}

.ct-video-search-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-video-search-channels:empty,
.ct-video-search-note:empty {
  display: none;
}

.ct-video-search-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 36px;
  padding: 0 10px 0 4px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 18px;
  background: transparent;
  color: var(--text-strong);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}

.ct-video-search-channel:hover {
  background: var(--hover);
}

.ct-video-search-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.ct-video-search-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-video-search-note {
  color: var(--text-muted);
  font-size: 14px;
}

.ct-card-wrap.is-video .ct-card-line {
  flex-wrap: nowrap;
}

@media (max-width: 900px) {
  .ct-card-wrap.is-video {
    padding: 0 16px;
  }

  /* A small screen with a landscape picture (the reference's `s`, md:L42204–42210, L42590–42680): the title alone on
     top, then the 160 × 90 picture with the lines beside it. */
  .ct-card-wrap.is-video .ct-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
  }

  .ct-card-wrap.is-video .ct-card-body {
    display: contents;
  }

  .ct-card-wrap.is-video .ct-card-title-row {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 10px;
  }

  .ct-card-wrap.is-video .ct-card-thumb {
    grid-column: 1;
    grid-row: 2 / span 3;
  }

  .ct-card-wrap.is-video .ct-card-body > :not(.ct-card-title-row) {
    grid-column: 2;
    margin-top: -2px;
  }

  .ct-card-thumb {
    width: 160px;
    height: 90px;
    margin: 3px 0 0;
  }

  .ct-card-wrap.is-video .ct-card-line {
    flex-wrap: wrap;
  }

  .ct-wide {
    display: none;
  }

  .ct-narrow {
    display: inline-flex;
  }

  .ct-card-watch {
    display: none;
  }
}

/* The website's install banner above the YouTube and Netflix lists (install-banner.js; the reference's C1 padding and
   S1, md:L45305–45390, L45611–45627): on a big screen a "filled" alert in the brand's blue (the reference's violet), on a small one a bordered box. */
.ct-banner {
  padding: 16px;
}

.ct-banner:has(.is-youtube) {
  padding: 0 12px 4px;
}

.ct-install-banner {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 5px 16px;
  border: 1px solid color-mix(in srgb, var(--wovia-blue) 30%, transparent);
  border-radius: 4px;
  background-color: color-mix(in srgb, var(--wovia-blue) 8%, transparent);
  box-shadow: 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12);
  font: 400 14px/1.43 var(--font);
}

.ct-install-banner.is-youtube {
  margin: 16px 0 4px;
}

.ct-install-hand {
  padding-right: 8px;
}

.ct-install-text {
  flex-grow: 1;
  padding-right: 8px;
  color: color-mix(in srgb, var(--ink) 66.7%, transparent);
}

.ct-install-button {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 13px/1.75 var(--font);
  letter-spacing: 0.02857em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.7;
}

.ct-install-banner.is-small {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--wovia-blue) 10%, transparent);
  box-shadow: none;
  color: color-mix(in srgb, var(--ink) 90%, transparent);
}

.ct-install-banner.is-small .ct-install-hand {
  margin-right: 12px;
  padding: 0;
  font-size: 16px;
}

.ct-install-banner.is-small .ct-install-text {
  padding-right: 12px;
  color: inherit;
  line-height: 1.4;
}

.ct-install-banner.is-small .ct-install-button {
  opacity: 1;
}

@media (width <= 900px) {
  .ct-banner {
    padding: 8px;
  }

  .ct-video-search {
    padding: 8px 8px 0;
  }

  .ct-banner:has(.is-youtube) {
    padding: 0 16px;
  }
}
