/* Nội dung catalogue pages; sizes and colours from the reference, rules our own. Big screen = 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;
}

/* A tab's top over both columns (tabs.js pageTop): one scroll, the filter column beside the list under it. */
.ct-columns {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.ct-list-column {
  flex: 1 1 0%;
  min-width: 0;
}

@media (min-width: 901px) {
  .ct-page.has-page-top .ct-filters {
    position: sticky;
    top: 16px;
    flex: 0 0 272px;
    width: 272px;
    height: auto;
    overflow: visible;
    border-right: 0;
    background: transparent;
  }
}

/* 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: var(--scrim);
  }

  .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;
  }

  /* The bar over the list (owner, 2026-10-21, in place of the reference's big title over a see-through head, cat#16):
     the list's name, the order, the phone's search buttons, the filters; the list under it. */
  .ct-mobile-head {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    height: var(--ct-head-h);
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .ct-main {
    --ct-head-h: 60px;
  }

  .ct-scroll {
    top: var(--ct-head-h);
  }

  .ct-page.no-drawer .ct-scroll,
  .ct-page.has-page-top .ct-scroll {
    top: 0;
  }
}

.ct-list-button,
.ct-sort,
.ct-filter-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  height: 44px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text-strong);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}

.ct-list-button {
  flex-shrink: 1;
  min-width: 0;
  padding: 0 10px 0 14px;
}

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

.ct-sort {
  position: relative;
  padding: 0 8px 0 12px;
}

/* The order is the browser's own list of choices, drawn as the bar's button. */
.ct-sort-select {
  appearance: none;
  height: 100%;
  margin: 0;
  padding: 0 22px 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ct-sort-caret {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

.ct-head-space {
  flex: 1 1 auto;
}

.ct-head-icon {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
}

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

.ct-filter-button {
  position: relative;
  padding: 0 12px;
}

.ct-filter-button.is-icon {
  justify-content: center;
  width: 44px;
  padding: 0;
}

.ct-filter-button.is-icon .ct-filter-count {
  position: absolute;
  top: 4px;
  right: 4px;
}

/* The phone's search, opened from the bar: its "Hủy" closes it. */
.ct-find-cancel {
  display: none;
  flex-shrink: 0;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 600 15px/1 var(--font);
  cursor: pointer;
}

/* A phone: the bar's buttons as plain words and icons, the search and its link behind their icons. */
@media (max-width: 600px) {
  .ct-main {
    --ct-head-h: 52px;
  }

  .ct-mobile-head {
    gap: 0;
    padding: 0 4px 0 8px;
    background: var(--surface);
  }

  .ct-list-button,
  .ct-sort,
  .ct-filter-button {
    border: 0;
    background: transparent;
  }

  .ct-list-button {
    padding: 0 6px 0 8px;
    font-size: 15px;
    font-weight: 600;
  }

  .ct-sort {
    padding: 0 6px 0 8px;
    color: var(--text-label);
  }

  .ct-sort-caret {
    display: none;
  }

  .ct-sort-select {
    padding-right: 0;
  }

  .ct-head-icon.is-phone {
    display: inline-flex;
  }

  .ct-filter-button.is-icon {
    border-radius: 50%;
  }

  .ct-page:not(.is-searching) .ct-video-search:not(.has-text) {
    display: none;
  }

  .ct-find-cancel {
    display: inline-flex;
    align-items: center;
  }

  .ct-scroll:has(> .ct-cards.is-grid) > .ct-banner {
    padding: 12px 16px;
  }

  /* The box and "Hủy" share the line, a link's card the whole width under them. */
  .ct-find-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .ct-find-box {
    display: contents;
  }

  .ct-find {
    flex: 1 1 0;
    min-width: 0;
  }

  .ct-find-preview {
    flex: 0 0 100%;
    order: 1;
  }
}

.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: 12px;
}

/* 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;
}

/* A part's heading in the filter column (owner, 2026-10-21: small, semibold, quiet). */
.ct-caption {
  margin: 0;
  color: var(--text-label);
  font-size: 12px;
  font-weight: 600;
  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: 8px;
}

/* A row of exclusive choices as a segmented group (owner, 2026-10-21, in place of the reference's outlined toggle
   group; theme.css --seg-*): in a soft well, the chosen one raised; each as wide as its words, which never break,
   the choices wrapping whole when the column is too narrow. */
.ct-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--seg-gap);
  padding: var(--seg-padding);
  border-radius: var(--seg-radius);
  background: var(--seg-well);
}

.ct-choice {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-label);
  font: 700 13px/1.2 var(--font-display);
  white-space: nowrap;
  cursor: pointer;
}

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

.ct-choice.is-on {
  background: var(--seg-on);
  box-shadow: var(--seg-on-shadow);
  color: var(--chip-text);
  font-weight: 700;
}

.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);
  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: max(12px, 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;
}

/* A Chinese video's HSK level (owner, 2026-10-21): the brand's blue, a chip a learner reads first. */
.ct-chip-hsk {
  border-color: color-mix(in srgb, var(--wovia-blue) 35%, transparent);
  background: color-mix(in srgb, var(--wovia-blue) 8%, transparent);
  color: var(--accent-soft);
  font-weight: 600;
  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, and the owner's fourth band
   (2026-10-21) between easy and challenging, moderate #a3e635. 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-moderate,
.ct-tip-band.is-moderate {
  --band: #a3e635;
}

.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-moderate, .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;
  }
  /* What big screens alone show (a learning resource's tile, read#69). */
  .ct-wide {
    display: none;
  }
}

.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-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), so no bar over the list either. */
@media (max-width: 900px) {
  .ct-page.no-drawer .ct-filters {
    display: none;
  }
}

/* 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-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: 12px;
  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 as grid tiles: columns of at least 288 px, a row each on a phone; no number, no zebra. */
.ct-cards.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 24px 20px;
  padding: 4px 24px 8px;
}

.ct-card-wrap.is-video {
  position: relative;
  min-width: 0;
  padding: 0;
}

.ct-card-wrap.is-video .ct-card {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: none;
  padding: 0;
  border-radius: 12px;
}

.ct-card-wrap.is-video .ct-card:hover {
  background: none;
}

.ct-card-wrap.is-video .ct-card:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.ct-card-thumb {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.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);
}

/* The marks on the picture, light on dark or dark on light whatever the picture and the look. */
.ct-thumb-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.ct-thumb-badge.is-duration,
.ct-thumb-badge.is-none {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.74);
  color: var(--on-media);
}

.ct-thumb-badge.is-duration {
  right: 8px;
  bottom: 8px;
}

/* No subtitles anywhere yet (S730): the duration's dark mark, where the AI mark would sit. */
.ct-thumb-badge.is-none {
  top: 8px;
  left: 8px;
  max-width: calc(100% - 64px);
}

/* The brand's blue while a duration filter is on, as the reference's duration chip glows (md:L42424). */
.ct-thumb-badge.is-duration.is-active {
  background: var(--wovia-blue);
}

.ct-thumb-badge.is-ai,
.ct-thumb-badge.is-subs {
  top: 8px;
  left: 8px;
  max-width: calc(100% - 64px);
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-media) 94%, transparent);
  color: var(--wovia-blue-strong);
  font-size: 12px;
}

.ct-card-wrap.is-video .ct-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.ct-card-wrap.is-video .ct-card-title-row {
  align-items: flex-start;
}

.ct-card-wrap.is-video .ct-card-title {
  display: -webkit-box;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.38;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ct-card-wrap.is-video :is(.ct-card-subtext, .ct-card-tags) {
  font-size: 13px;
}

/* The date and views on one line, cut with an ellipsis where the tile is narrow. */
.ct-card-wrap.is-video .ct-card-tags {
  display: block;
  text-overflow: ellipsis;
}

.ct-card-wrap.is-video .ct-card-dot {
  margin: 0 5px;
}

.ct-card-wrap.is-video .ct-card-line {
  gap: 4px 10px;
}

/* "My videos" (card-my-video.js): a round button on the picture's corner, always there, filled once the video is kept. */
.ct-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}

.ct-card-mine {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--on-media);
  cursor: pointer;
  transition: background-color 0.15s;
}

.ct-card-mine:hover {
  background: rgba(0, 0, 0, 0.8);
}

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

@media (max-width: 900px) {
  .ct-cards.is-grid {
    gap: 22px 16px;
    padding: 4px 20px 8px;
  }
}

/* A phone: a row each, the 140 px picture beside the lines, "My videos" at the end of the last one. */
@media (max-width: 600px) {
  .ct-cards.is-grid {
    display: block;
    padding: 0 0 8px;
  }

  .ct-card-wrap.is-video .ct-card {
    flex-direction: row;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 0;
  }

  .ct-card-wrap.is-video .ct-card:active {
    background: var(--hover);
  }

  .ct-card-thumb {
    width: 140px;
    border-radius: 10px;
  }

  .ct-card-wrap.is-video .ct-card-body {
    flex: 1 1 auto;
    gap: 3px;
    padding: 0;
  }

  .ct-card-wrap.is-video .ct-card-title {
    font-size: 14px;
    line-height: 1.36;
  }

  .ct-card-wrap.is-video :is(.ct-card-subtext, .ct-card-tags) {
    font-size: 12.5px;
  }

  .ct-card-wrap.is-video .ct-card-line {
    padding-right: 28px;
  }

  .ct-thumb-badge {
    font-size: 12px;
    line-height: 16px;
  }

  .ct-thumb-badge.is-duration,
  .ct-thumb-badge.is-none {
    padding: 0 5px;
    border-radius: 5px;
  }

  .ct-thumb-badge.is-duration {
    right: 5px;
    bottom: 5px;
  }

  .ct-thumb-badge.is-none {
    top: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
  }

  .ct-thumb-badge.is-ai,
  .ct-thumb-badge.is-subs {
    top: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
    padding: 1px 6px 1px 4px;
    font-size: 12px;
  }

  .ct-card-actions {
    top: auto;
    right: 6px;
    bottom: 2px;
  }

  .ct-card-mine {
    width: 34px;
    height: 34px;
    background: transparent;
    color: var(--text-label);
  }

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

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

/* The video tabs' search over the list (video-search.js): the box, which takes words or a pasted link (owner,
   2026-10-21), the list shown beside it, the channels whose name holds the words, a note. The grid's side margins. */
.ct-video-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 16px 24px 0;
}

.ct-find-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ct-find-box {
  position: relative;
  flex: 0 1 640px;
  min-width: 0;
}

.ct-find {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 5px 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text-muted);
}

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

.ct-find:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.ct-find-icon {
  flex-shrink: 0;
}

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

.ct-find-input::placeholder {
  color: var(--text-muted);
}

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

.ct-find-clear {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

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

.ct-find-paste {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--text-strong);
  font: 500 13px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
}

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

:is(.ct-find-clear, .ct-find-paste)[hidden] {
  display: none;
}

/* The list shown and how many videos the filters keep, at the row's end on a big screen. */
.ct-find-list {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.ct-find-list-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-find-list-count::before {
  content: "·";
  margin: 0 6px;
}

.ct-find-note {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.ct-find-note:empty {
  display: none;
}

/* A pasted link's card under the box: the video's picture or the site's mark, what the link is, what it does. */
.ct-find-preview {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.ct-find-preview[hidden] {
  display: none;
}

.ct-find-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--wovia-blue) 6%, transparent);
}

.ct-find-picture {
  flex: none;
  width: 176px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  object-fit: cover;
}

.ct-find-picture.is-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ct-find-what {
  flex: 1 1 auto;
  min-width: 0;
}

.ct-find-site {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.ct-find-title {
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 600;
}

.ct-find-address {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-find-actions {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ct-find-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 14px/1 var(--font-display);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--block-shadow);
}

.ct-find-go:hover {
  background: var(--accent-hover);
}

.ct-find-go:disabled {
  opacity: 0.6;
  cursor: default;
}

.ct-find-key {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.ct-find-key kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 12px;
}

/* Enter is a keyboard's: a touch screen does without the hint. */
@media (hover: none) {
  .ct-find-key {
    display: none;
  }
}

.ct-find-status {
  margin: 0;
  padding: 10px 14px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.ct-find-status:empty {
  display: none;
}

.ct-find-status.is-error {
  color: var(--danger);
}

.ct-find-hint {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.ct-find-status + .ct-find-hint {
  margin-top: 10px;
}

.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;
}

/* The website's install banner over the YouTube and Netflix lists, a slim brand-blue bar; over a grid it keeps its margins. */
.ct-banner {
  padding: 16px;
}

.ct-banner:has(.is-youtube),
.ct-scroll:has(> .ct-cards.is-grid) > .ct-banner {
  padding: 0 24px 12px;
}

.ct-install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 6px 6px 6px 14px;
  border: 1px solid color-mix(in srgb, var(--wovia-blue) 18%, transparent);
  border-radius: 10px;
  background-color: color-mix(in srgb, var(--wovia-blue) 7%, transparent);
  color: var(--text-strong);
  font: 400 13.5px/1.4 var(--font);
}

/* The extension's icon before the banner's words (owner, 2026-10-21: in place of the reference's 👉). */
.ct-install-hand {
  display: flex;
  flex-shrink: 0;
  color: var(--accent-soft);
}

.ct-install-text {
  flex: 1 1 auto;
  min-width: 0;
}

.ct-install-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 13px/1 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--block-shadow);
}

.ct-install-button:hover {
  background: var(--accent-hover);
}

.ct-install-hide {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

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

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

  .ct-banner:has(.is-youtube),
  .ct-scroll:has(> .ct-cards.is-grid) > .ct-banner {
    padding: 0 20px 12px;
  }

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

  /* The small screens' bar names the list (catalogue.js's head). */
  .ct-find-list {
    display: none;
  }

  .ct-find-box {
    flex-basis: 100%;
  }

}

/* A phone: the box a touch target, its words big enough that the browser does not zoom, "Dán link" its icon alone, a
   link's card in the page's flow, its picture over its words and its button the card's width. */
@media (max-width: 600px) {
  .ct-video-search {
    padding: 12px 16px 0;
  }

  .ct-find {
    height: 44px;
    border-radius: 12px;
  }

  .ct-find-input {
    font-size: 16px;
  }

  .ct-find-paste {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
  }

  .ct-find-paste-label {
    display: none;
  }

  .ct-find-preview {
    position: static;
    margin-top: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  }

  .ct-find-card {
    flex-direction: column;
    align-items: stretch;
  }

  .ct-find-picture {
    width: 100%;
  }

  .ct-find-actions {
    align-items: stretch;
  }

  .ct-find-go {
    height: 46px;
    border-radius: 12px;
    font-size: 15px;
  }
}
