:root {
  font-family: Inter,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #20252b;
  background: #fff;
  font-synthesis: none;
  --ink: #20252b;
  --muted: #606971;
  --blue: #164466;
  --blue-hover: #103650;
  --blue-soft: #f2f6f9;
  --line: #e4e7eb;
  --card-line: #e6ebf1;
  --sidebar: #f8f8f8;
  --sidebar-line: #e5e7eb;
  --radius: 8px;
  --panel: #f7f8fa;
  --surface: #fff;
}
.earnings-cohort { display:block; margin-top:6px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,input,select,textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background .15s,border-color .15s;
}
button:hover {
  background: #f3f5f7;
  border-color: #bfcbd3;
}
button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid #2b849e;
  outline-offset: 3px;
}
input,select,textarea {
  border: 1px solid #cdd3d9;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  min-width: 0;
}
input::placeholder,textarea::placeholder {
  color: #737d86;
}
input[type=checkbox] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
button.primary,.primary-button {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.primary:hover,.primary-button:hover {
  background: var(--blue-hover);
}
.soft,.secondary-button {
  background: #f6f8f9;
}
.text-button {
  border-color: transparent;
  background: none;
  color: var(--muted);
  padding: 6px;
}
.text-button:hover {
  background: #f1f4f6;
  border-color: transparent;
}
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.icon-button {
  padding: 7px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: transparent;
  border-color: transparent;
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
[hidden] {
  display: none!important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-line);
  z-index: 40;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.6px;
  padding: 0 10px 24px;
}
.brand img {
  width: 30px;
  height: 30px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 20px;
  margin-bottom: 10px;
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5edf0;
  color: #33576b;
  font-size: 11px;
  font-weight: 700;
}
.workspace>div:last-child {
  min-width: 0;
}
.workspace strong {
  display: block;
  max-width: 160px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.nav-button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 450;
  gap: 11px;
  min-height: 40px;
  margin: 2px 0;
}
.nav-button .icon {
  color: #59646d;
}
.nav-button.active {
  background: #e8ecef;
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  color: #727b83;
  font-size: 12px;
}
.nav-heading {
  font-size: 11px;
  letter-spacing: .65px;
  text-transform: uppercase;
  color: #727b83;
  margin: 26px 12px 8px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.sidebar-bottom .nav-button {
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-top: 16px;
}
.sidebar-source {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.main-shell {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 42px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.breadcrumb strong {
  font-weight: 500;
  color: #434c55;
}
.breadcrumb .separator {
  color: #aeb7be;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.topbar-right button {
  width: 28px;
  height: 28px;
  padding: 5px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4e8265;
  border-radius: 50%;
  flex-shrink: 0;
}
.mobile-menu {
  display: none;
}
.content {
  max-width: 1536px;
  margin: 0 auto;
  padding: 40px 40px 70px;
  min-width: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  min-height: 32px;
}
.page-heading h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.65px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.heading-actions button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}
.heading-actions .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.source-selector {
  position: relative;
}
.source-selector summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  font-size: 12px;
  list-style: none;
  color: #45626b;
  border-radius: 6px;
}
.source-selector summary::-webkit-details-marker {
  display: none;
}
.source-selector .source-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  padding: 7px;
  width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px #192f421a;
  border-radius: 8px;
  z-index: 25;
}
.source-menu button {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
}
.source-menu button.active {
  background: #edf4f6;
  color: #23586c;
}
.source-menu p {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 7px;
  margin: 4px 0;
}
.auto-control {
  border-color: transparent;
  color: #42614f;
  background: #f1f7f3;
}
.auto-control[aria-pressed=false] {
  color: #616970;
  background: #f4f5f6;
}
.auto-control[aria-pressed=false] .status-dot {
  background: #828b93;
}
.discovery-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 2px;
  border-radius: 7px;
  background: #f7f8fa;
  gap: 2px;
}
.discovery-tabs button {
  font-size: 12px;
  padding: 4px 9px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.discovery-tabs button.active {
  color: #244c61;
  background: #fff;
  box-shadow: 0 1px 3px #162c4214;
}
.research-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.toolbar>button {
  height: 42px;
  font-size: 13px;
  padding: 10px 16px;
  white-space: nowrap;
  gap: 8px;
  border-color: #dce1e6;
}
.toolbar>button .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.toolbar>button.has-filter {
  border-color: #7093a2;
  color: #31566a;
  background: #fcfefe;
}
.video-search-form {
  flex: 1;
  min-width: 310px;
  margin: 0;
  position: relative;
}
.search-box {
  height: 42px;
  display: flex;
  align-items: stretch;
  border: 1px solid #dce1e6;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  min-width: 0;
}
.search-box:focus-within {
  border-color: #7093a2;
  box-shadow: 0 0 0 2px #16446616;
}
.search-box select {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  font-size: 13px;
  width: 112px;
  padding: 0 10px;
  flex-shrink: 0;
}
.search-box input {
  flex: 1;
  min-width: 60px;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  padding: 0 10px;
  background: transparent;
}
.search-box input:focus-visible,.search-box select:focus-visible {
  outline-offset: -3px;
}
.search-box .search-submit {
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #576772;
  padding: 0 12px;
  min-width: 42px;
}
.search-box .search-submit:hover {
  background: #edf4f6;
  color: var(--blue);
}
.search-submit span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.provider-options {
  position: relative;
  flex-shrink: 0;
}
.provider-options>summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
}
.provider-options>summary::-webkit-details-marker {
  display: none;
}
.provider-options[open]>summary {
  background: #edf4f6;
}
.live-search-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 14px;
  width: 290px;
  background: white;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 25px #192f421a;
  z-index: 25;
}
.live-search-options label {
  font-size: 12px;
  font-weight: 500;
  display: grid;
  gap: 5px;
}
.live-search-options select {
  width: 100%;
  font-size: 13px;
  padding: 9px;
}
.live-search-options>span {
  font-size: 12px;
  color: var(--muted);
}
.chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chips:empty {
  display: none;
}
.chip {
  padding: 6px 10px;
  border-radius: 20px;
  background: #eef3f5;
  color: #3f5a6c;
  border-color: #d4dde2;
  font-size: 12px;
  gap: 7px;
  max-width: 100%;
  text-align: left;
}
.chip .icon {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
}
.chip.reference {
  max-width: 600px;
}
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  min-height: 32px;
}
/* Earnings stays secondary to the reference's search and thumbnail hierarchy. */
.earnings-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  margin: 12px 0 6px;
  padding: 10px 0;
  border-top: 1px solid var(--card-line);
  color: var(--muted);
  font-size: 12px;
}
.earnings-toolbar>strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.earnings-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.earnings-toolbar select,.earnings-toolbar input,.earnings-toolbar button {
  min-height: 32px;
  max-width: 100%;
  padding: 5px 8px;
  font-size: 12px;
}
.earnings-toolbar select {
  max-width: 170px;
  background: #fff;
}
.earnings-toolbar input {
  width: 90px;
}
.earnings-toolbar .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.earnings-toolbar .earnings-caption {
  flex: 1 1 180px;
}
.results-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex-wrap: wrap;
}
.results-summary strong {
  font-weight: 600;
  color: #444e57;
}
.results-summary>span {
  color: #727b83;
  min-width: 0;
}
.results-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.results-options select {
  font-size: 12px;
  border-color: transparent;
  padding: 5px 24px 5px 7px;
  max-width: 170px;
}
.results-options .save-view-button {
  font-size: 12px;
  padding: 5px 7px;
  background: none;
  border-color: transparent;
  color: var(--muted);
}
.results-options .save-view-button .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.view-toggle {
  display: flex;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.view-toggle button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: #7c8790;
  width: 27px;
  height: 27px;
}
.view-toggle button.active {
  color: #31566c;
  background: #edf2f5;
}
.view-toggle .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.search-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff6f0;
  border: 1px solid #edd9c9;
  border-radius: 8px;
  color: #794c32;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
}
.search-error p {
  margin: 3px 0;
}
.search-error small {
  font-size: 12px;
}
.inline-note {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.quick-niches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.quick-niches button {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 16px;
  color: #526674;
  background: #fafcfd;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  align-items: start;
}
.video-card {
  position: relative;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
  transition: border-color .15s,box-shadow .15s;
}
.video-card:hover {
  border-color: #becbd4;
  box-shadow: 0 3px 10px #263f4e0a;
}
.video-card.selected {
  border-color: #4c869b;
  box-shadow: 0 0 0 1px #4c869b;
}
.thumbnail {
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 16/9;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #e8edf1;
  overflow: hidden;
}
.thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 15%,#071420d9);
}
.thumb-label {
  position: absolute;
  left: 16px;
  top: 14px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.thumb-headline {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 28px;
  color: #fff;
  text-align: left;
  font-weight: 750;
  line-height: 1.04;
  font-size: 28px;
  letter-spacing: -.7px;
  text-transform: uppercase;
  text-shadow: 0 1px 10px #05162588;
}
.duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-radius: 3px;
  background: #141a21e6;
  padding: 1px 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}
.card-bookmark {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #ffffffeb;
  border: 1px solid #ffffffbd;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  padding: 6px;
  z-index: 2;
  color: #384651;
  opacity: 0;
}
.card-bookmark .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.video-card:hover .card-bookmark,.video-card:focus-within .card-bookmark,.card-bookmark.saved {
  opacity: 1;
}
.card-bookmark.saved {
  background: #e8f4ee;
  color: #236246;
  border-color: #c8dfd2;
}
.card-body {
  padding: 12px;
}
.card-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -.1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  margin: 0 0 5px;
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
  border-radius: 2px;
  width: 100%;
}
.card-title:hover {
  background: none;
  color: #205b74;
}
a.thumbnail,a.card-title {
  color: var(--ink);
  text-decoration: none;
}
a.card-title:hover {
  color: var(--blue);
}
.channel-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 25px;
  margin-bottom: 4px;
}
.channel-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 52%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
}
.channel-name:hover {
  background: none;
  color: var(--blue);
  text-decoration: underline;
}
.channel-line>span {
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
}
.follow-button {
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 1px 6px;
  font-size: 12px;
  line-height: 1.4;
  min-height: 22px;
  margin-left: auto;
  flex-shrink: 0;
  font-weight: 400;
  color: #65717b;
}
.follow-button[aria-pressed=true] {
  background: #edf5f1;
  color: #3b7054;
  border-color: #d8e6df;
}
.hide-button {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.hide-button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
.hide-button .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
.metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-height: 26px;
}
.metrics>span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.score {
  padding: 1px 5px;
  border: 0;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  color: #336d43;
  background: #e7f4e7;
  white-space: nowrap;
  flex-shrink: 0;
}
.score.banger {
  background: #e8f1fa;
  color: #315e8d;
}
.score.mega {
  background: #f0e8f8;
  color: #754597;
}
.score.above {
  background: #fff4d4;
  color: #836512;
}
.score.good {
  background: #fff0df;
  color: #94591f;
}
.score.unknown {
  background: #f0f2f4;
  color: #68757f;
}
.metrics .menu-button {
  margin-left: auto;
  border: 0;
  padding: 3px;
  background: none;
  width: 24px;
  min-height: 24px;
  color: #727e87;
  flex-shrink: 0;
}
.metrics .menu-button .icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 5px;
  min-height: 28px;
}
.tag {
  white-space: nowrap;
  border: 0;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.4;
  padding: 3px 5px;
  font-weight: 400;
  background: #edf3f7;
  color: #4a6374;
}
.tag.trigger-emotion {
  background: #fbeded;
  color: #925352;
}
.tag.trigger-positive {
  background: #edf5e8;
  color: #50783d;
}
.tag.trigger-structure {
  background: #f1edf7;
  color: #715c89;
}
.more-tags {
  font-size: 12px;
  background: transparent;
  padding: 3px 4px;
  border: 0;
  color: #6a7580;
}
.unlabelled {
  font-size: 12px;
  color: #7b838a;
}
.video-grid[aria-busy=true] {
  opacity: .65;
}
.earnings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 9px;
  padding: 9px 2px 1px;
  border: 0;
  border-top: 1px solid var(--card-line);
  border-radius: 0;
  background: transparent;
  text-align: left;
  font-weight: 400;
}
.earnings-row>span {
  min-width: 0;
}
.earnings-row:hover {
  background: var(--blue-soft);
  border-color: #cddae4;
}
.earnings-row:focus-visible {
  outline-offset: 2px;
  border-radius: 4px;
}
.earnings-value {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.earnings-caption {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.earnings-row>.earnings-caption {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  max-width: 42%;
  text-align: right;
}
.earnings-row .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.earnings-unavailable .earnings-value {
  color: #606971;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.list-layout {
  display: flex;
  flex-direction: column;
}
.list-layout .video-card {
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
}
.list-layout .thumbnail {
  height: 100%;
  min-height: 146px;
}
.list-layout .card-body {
  padding: 16px 18px;
  max-width: 900px;
}
.list-layout .card-title {
  min-height: 0;
  margin-bottom: 9px;
  font-size: 16px;
}
.list-layout .card-bookmark {
  right: auto;
  left: 222px;
}
.list-layout .follow-button {
  margin-left: 6px;
}
.list-layout .metrics .menu-button {
  margin-left: 10px;
}
.load-more {
  text-align: center;
  margin: 28px auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.feed-status > span { display: block; }
.load-more button {
  margin-bottom: 8px;
  min-height: 38px;
}
.feed-note {
  font-size: 12px;
  color: var(--muted);
  max-width: 650px;
  margin: 12px auto 0;
}
.provenance-disclosure {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.provenance-disclosure summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  color: #647480;
}
.provenance-disclosure p {
  max-width: 800px;
  line-height: 1.7;
  margin: 12px 0;
}
.provenance-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.7;
}
.empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed #d9e0e5;
  border-radius: 9px;
  background: #fcfdfe;
}
.empty .empty-icon {
  display: grid;
  place-items: center;
  background: #f0f4f6;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 16px;
  color: #617d8e;
}
.empty h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.35px;
  margin: 0;
}
.empty p {
  font-size: 14px;
  color: var(--muted);
  max-width: 440px;
  margin: 10px auto 20px;
  line-height: 1.65;
}
.empty button {
  min-height: 40px;
}
.compare-bar {
  position: fixed;
  bottom: 22px;
  left: calc(50% + 130px);
  transform: translateX(-50%);
  z-index: 45;
  background: #223d4c;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 8px 30px #10253533;
  border-radius: 10px;
  padding: 10px 12px 10px 16px;
  font-size: 13px;
  max-width: calc(100vw - 30px);
}
.compare-bar button {
  background: #fff;
  color: #244b60;
  border: 0;
  white-space: nowrap;
}
.compare-bar .dismiss {
  background: transparent;
  color: #d4e0e6;
  padding: 5px;
}
.compare-bar strong {
  font-weight: 500;
  white-space: nowrap;
}
.skeleton-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.skeleton-thumb {
  aspect-ratio: 16/9;
  background: #edf0f3;
}
.skeleton-lines {
  padding: 14px;
}
.skeleton-lines span {
  display: block;
  height: 12px;
  background: #eff2f4;
  border-radius: 3px;
  margin-bottom: 10px;
}
.skeleton-lines span:nth-child(2) {
  width: 75%;
}
.skeleton-lines span:last-child {
  width: 45%;
}
dialog {
  border: 1px solid #dbe2e8;
  border-radius: 12px;
  box-shadow: 0 25px 90px #122e4033;
  padding: 0;
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: 90dvh;
  color: var(--ink);
  background: #fff;
  overflow: hidden;
}
dialog::backdrop {
  background: #172a3e61;
  backdrop-filter: blur(2px);
}
dialog.wide {
  width: 1020px;
}
dialog.medium {
  width: 720px;
}
.modal-head,.filter-dialog-header {
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2,.filter-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.4px;
}
.modal-head p,.filter-dialog-header p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 0;
}
.modal-body {
  padding: 22px 24px;
  max-height: calc(90dvh - 164px);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal-footer,.filter-dialog-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fff;
}
.filter-dialog-body {
  padding: 4px 24px 20px;
  max-height: calc(90dvh - 182px);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.earnings-drawer {
  inset: 0 0 0 auto;
  margin: 0 0 0 auto;
  width: 520px;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--card-line);
  border-radius: 0;
  box-shadow: -12px 0 60px #122e4026;
}
dialog.earnings-drawer[open] {
  display: flex;
  flex-direction: column;
}
.earnings-drawer .modal-head,.earnings-drawer .modal-footer {
  flex: 0 0 auto;
}
.earnings-drawer .modal-head {
  padding-top: max(24px,env(safe-area-inset-top));
}
.earnings-drawer .modal-head h2 {
  font-size: 20px;
}
.earnings-drawer .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding-top: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.earnings-drawer .modal-body>h3 {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.earnings-drawer .modal-footer {
  flex-wrap: wrap;
  padding-bottom: max(16px,env(safe-area-inset-bottom));
}
.earnings-drawer .metric-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin: 20px 0;
}
.earnings-drawer .metric-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background: #fafbfc;
}
.earnings-drawer .metric-box:nth-child(2) {
  border-color: #c7d7e2;
  background: var(--blue-soft);
}
.earnings-drawer .metric-box strong {
  color: var(--blue);
  font-size: 20px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.earnings-drawer .metric-box small {
  font-size: 12px;
  line-height: 1.5;
}
.earnings-drawer .info-panel {
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.earnings-periods {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}
.earnings-periods button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}
.earnings-periods button[aria-pressed=true],.earnings-periods button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}
.earnings-assumptions {
  min-width: 0;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--card-line);
}
.earnings-assumptions h3,.earnings-assumptions h4,.earnings-assumptions legend {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.earnings-assumptions .form-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}
.earnings-assumptions .earnings-date-fields {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.earnings-drawer .earnings-assumptions {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.earnings-assumptions>h3 {
  margin-top: 24px;
}
.earnings-assumptions .buttons {
  padding: 8px 0 4px;
}
.earnings-drawer .earnings-assumptions .buttons {
  position: sticky;
  bottom: -22px;
  z-index: 1;
  margin-top: 20px;
  padding: 12px 0 22px;
  border-top: 1px solid var(--card-line);
  background: var(--surface);
}
.earnings-calculation {
  margin: 5px 0;
  font-variant-numeric: tabular-nums;
}
.earnings-assumptions .form-field {
  min-width: 0;
  font-size: 12px;
}
.earnings-assumptions input,.earnings-assumptions select {
  width: 100%;
  min-height: 40px;
  font-variant-numeric: tabular-nums;
}
.earnings-drawer details {
  margin-top: 20px;
  border-top: 1px solid var(--card-line);
  padding-top: 10px;
}
.earnings-drawer details>summary {
  min-height: 40px;
  padding: 10px 0;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}
.earnings-drawer .detail-dl {
  grid-template-columns: minmax(90px,120px) minmax(0,1fr);
}
.earnings-drawer .detail-dl dd {
  overflow-wrap: anywhere;
}
.filter-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.filter-section:last-child {
  border-bottom: 0;
}
.taxonomy-expansion>summary {
  width: fit-content;
  min-height: 36px;
  padding: 8px 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.taxonomy-expansion:not([open]) .taxonomy-less,
.taxonomy-expansion[open] .taxonomy-more {
  display: none;
}
.range-control {
  margin: 12px 0;
  padding: 12px 14px 6px;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background: #fafbfc;
}
.range-value-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.range-sliders,.filter-range-controls {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.range-slider-label {
  display: block;
  min-width: 0;
}
.filter-range-slider,.filter-range-controls input[type=range] {
  display: block;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  accent-color: var(--blue);
  cursor: pointer;
}
.filter-section-heading {
  margin: 0 0 12px;
}
.filter-section-heading h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
}
.filter-section-heading p,.filter-description {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 12px;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.filter-option {
  font-size: 13px;
  padding: 9px 10px;
  min-height: 40px;
}
.filter-option.selected {
  background: #eaf3f6;
  border-color: #86a8b6;
  color: #24576d;
}
.score-option-label {
  font-weight: 600;
}
.score-interval {
  font-size: 12px;
  color: #607583;
}
.score-check {
  margin-left: auto;
}
.score-options {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.score-option {
  justify-content: flex-start;
  gap: 7px;
}
.score-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d8df;
}
.score-green {
  background: #6f9e77;
}
.score-purple {
  background: #a080bb;
}
.score-blue {
  background: #789dbb;
}
.score-yellow {
  background: #c8ab4f;
}
.score-orange {
  background: #cd9660;
}
.taxonomy-search {
  width: 100%;
  padding: 9px 11px;
  font-size: 13px;
  margin: 0 0 12px;
}
.taxonomy-search-label {
  margin-bottom: 6px;
}
.taxonomy-list {
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}
.taxonomy-list.taxonomy-preview,.taxonomy-list.taxonomy-remainder {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.taxonomy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid #f0f2f4;
}
.taxonomy-row:last-child {
  border: 0;
}
.taxonomy-label {
  line-height: 1.5;
  min-width: 0;
}
.taxonomy-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.choice-button {
  padding: 6px 9px;
  min-height: 32px;
  font-size: 12px;
  gap: 5px;
}
.choice-button.selected.include-choice {
  background: #eaf4ed;
  border-color: #97b6a0;
  color: #356546;
}
.choice-button.selected.exclude-choice {
  background: #f9eeee;
  border-color: #cba7a4;
  color: #914d47;
}
.choice-button.selected:not(.include-choice):not(.exclude-choice) {
  background: #eaf3f6;
  border-color: #86a8b6;
  color: #24576d;
}
.choice-mark {
  min-width: 9px;
  text-align: center;
}
.number-range {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.range-separator {
  align-self: center;
  padding-top: 22px;
  color: var(--muted);
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  flex: 1;
}
.field-label input {
  width: 100%;
  font-size: 14px;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.hidden-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 7px 0;
}
.filter-dialog-footer button {
  font-size: 13px;
}
.filter-dialog-footer button:last-child {
  margin-left: auto;
}
.filter-empty,.filter-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 17px;
}
.form-field input,.form-field textarea,.form-field select {
  width: 100%;
  font-weight: 400;
}
.form-field textarea {
  min-height: 110px;
  resize: vertical;
}
.info-panel {
  background: #f3f7f9;
  border: 1px solid #e1e8ec;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #526977;
  line-height: 1.75;
  margin: 14px 0;
}
.info-panel strong {
  color: #2d5368;
}
.info-panel.warn {
  background: #fcf8ed;
  border-color: #ece3c9;
  color: #7d6939;
}
.detail-thumb {
  aspect-ratio: 16/9;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #eef2f5;
}
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-thumb .thumb-headline {
  font-size: 32px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin: 18px 0;
}
.metric-box {
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
}
.metric-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
  line-height: 1.5;
}
.metric-box strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.4px;
}
.detail-dl {
  font-size: 13px;
  line-height: 1.7;
  display: grid;
  grid-template-columns: 140px minmax(0,1fr);
  gap: 10px;
}
.detail-dl dt {
  color: var(--muted);
}
.detail-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.action-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.action-list button {
  justify-content: flex-start;
  border-color: transparent;
  padding: 11px 12px;
  background: #f7f9fa;
  min-height: 42px;
}
.action-list button:hover {
  background: #edf3f6;
}
.action-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.project-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  margin-bottom: 9px;
  font-size: 14px;
}
.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.inline-form input {
  flex: 1;
  width: 0;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}
.project-tile {
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  border-radius: 9px;
  min-height: 170px;
}
.project-tile>.icon {
  color: #6c8a9a;
  margin-bottom: 24px;
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}
.project-tile strong {
  font-size: 16px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.project-tile span {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.project-tile span .icon {
  margin-left: auto;
  width: 16px;
  height: 16px;
}
.comparison {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  font-size: 13px;
}
.comparison th,.comparison td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.comparison th:first-child {
  width: 130px;
  color: var(--muted);
  font-weight: 500;
}
.comparison thead th {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.comparison img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 8px;
}
.settings-panel {
  max-width: 860px;
}
.settings-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 20px;
}
.settings-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -.25px;
}
.settings-section p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 18px;
}
.buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-section .info-panel {
  margin-bottom: 0;
}
.title-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 7px;
  font-size: 14px;
  margin: 9px 0;
  line-height: 1.6;
}
.title-item span {
  flex: 1;
}
.brief-editor {
  width: 100%;
  min-height: 320px;
  border: 1px solid #ccd5dc;
  line-height: 1.8;
  font-size: 14px;
  resize: vertical;
}
.section-empty {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  padding: 18px;
  border: 1px dashed #dce3e8;
  border-radius: 7px;
}
.page-intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  max-width: 650px;
  line-height: 1.7;
}
.setting-status {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #48725b;
  margin-bottom: 14px;
}
.baseline-evidence {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  font-size: 13px;
  overflow: hidden;
}
.baseline-evidence summary {
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 600;
  color: #285a71;
  background: #f8fafb;
}
.baseline-evidence p {
  margin: 12px 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.baseline-table-wrap {
  overflow-x: auto;
  padding: 0 15px 12px;
}
.baseline-evidence table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.baseline-evidence th,.baseline-evidence td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}
.baseline-evidence th {
  font-weight: 500;
  color: var(--muted);
}
.baseline-evidence th:last-child,.baseline-evidence td:last-child {
  text-align: right;
}
.baseline-evidence td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.storage-error {
  background: #fff4e4;
  color: #7b5420;
  padding: 10px 24px;
  font-size: 13px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  max-width: 440px;
  background: #223e4e;
  color: #fff;
  box-shadow: 0 6px 30px #0002;
  border-radius: 8px;
  padding: 13px 17px;
  font-size: 13px;
  line-height: 1.65;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#toast.visible {
  opacity: 1;
}
#toast button {
  margin-left: 10px;
  background: #ffffff1a;
  color: #fff;
  border-color: #ffffff55;
  font-size: 12px;
  padding: 4px 8px;
}
.editorial-labels {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.niche-label {
  font-size: 12px;
  padding: 4px 7px;
  background: #eef5f1;
  border: 0;
  color: #4b7057;
}
.format-label,.auto-label {
  font-size: 12px;
  color: var(--muted);
}
.formula-label {
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  padding: 5px 0;
  border: 0;
  background: none;
  color: #635b82;
  overflow-wrap: anywhere;
}
.missing-references {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed #d8e0e6;
  border-radius: 8px;
}
.missing-reference {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
@media(max-width:1599px) {
  .video-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .content {
    padding: 32px;
  }
  .toolbar>button {
    padding: 9px 10px;
    gap: 6px;
  }
  .research-toolbar {
    gap: 7px;
  }
  .video-search-form {
    min-width: 260px;
  }
  .search-box select {
    width: 94px;
  }
}
@media(max-width:1199px) {
  .video-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .content {
    padding: 28px;
  }
  .research-toolbar {
    gap: 9px;
  }
  .toolbar {
    flex: 1;
    justify-content: space-between;
  }
  .toolbar>button {
    flex: 1;
  }
  .video-search-form {
    flex-basis: calc(100% - 48px);
  }
  .project-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .heading-actions {
    gap: 4px;
  }
  .heading-actions .refresh-button span {
    display: none;
  }
  .results-summary>span {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .list-layout .video-card {
    grid-template-columns: 220px minmax(0,1fr);
  }
  .list-layout .card-bookmark {
    left: 182px;
  }
}
@media(max-width:900px) {
  .app-shell {
    grid-template-columns: 220px minmax(0,1fr);
  }
  .sidebar {
    width: 220px;
    padding: 20px 12px 14px;
  }
  .workspace strong {
    max-width: 135px;
  }
  .content {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .topbar-right>span,.heading-actions .source-selector {
    display: none;
  }
  .page-heading {
    gap: 10px;
  }
  .heading-actions button {
    font-size: 12px;
  }
  .toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .toolbar>button {
    flex: none;
    font-size: 12px;
    height: 38px;
  }
  .video-search-form {
    flex-basis: calc(100% - 45px);
  }
  .results-options .save-view-button {
    display: none;
  }
  .results-options {
    gap: 3px;
  }
  .results-summary>span {
    max-width: 170px;
  }
  .results-options select {
    max-width: 135px;
  }
  .card-body {
    padding: 10px;
  }
  .channel-line {
    flex-wrap: wrap;
    gap: 2px 4px;
  }
  .channel-name {
    max-width: 70%;
  }
  .channel-line .follow-button {
    margin-left: 0;
  }
  .list-layout .video-card {
    grid-template-columns: 180px minmax(0,1fr);
  }
  .list-layout .card-body {
    padding: 12px;
  }
  .list-layout .card-bookmark {
    left: 142px;
  }
  .list-layout .card-title {
    font-size: 14px;
  }
  .discovery-tabs button {
    padding: 4px 6px;
  }
}
@media(max-width:760px) {
  .app-shell,.main-shell {
    display: block;
  }
  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform .18s;
    box-shadow: 8px 0 40px #1a33432b;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar .workspace strong {
    max-width: 170px;
  }
  .mobile-menu {
    display: inline-flex;
    width: 32px;
    height: 32px;
  }
  .topbar {
    padding: 0 14px;
    height: 48px;
  }
  .content {
    padding: 24px 18px 70px;
  }
  .page-heading {
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .heading-actions .source-selector {
    display: block;
  }
  .heading-actions .refresh-button {
    min-height: 34px;
    min-width: 34px;
  }
  .heading-actions .auto-control {
    min-height: 34px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar>button {
    height: 40px;
    font-size: 13px;
    flex: 1;
    padding: 8px;
  }
  .research-toolbar {
    gap: 10px;
  }
  .search-box {
    height: 44px;
  }
  .search-box select {
    width: 112px;
  }
  .provider-options>summary {
    height: 44px;
    width: 36px;
  }
  .results-toolbar {
    margin-top: 12px;
    gap: 6px;
  }
  .results-summary>span {
    display: none;
  }
  .results-options select {
    max-width: 150px;
  }
  .view-toggle {
    padding-left: 4px;
  }
  .video-grid {
    gap: 14px;
  }
  .card-bookmark {
    opacity: 1;
    width: 32px;
    height: 32px;
  }
  .channel-line {
    flex-wrap: nowrap;
  }
  .channel-name {
    max-width: 55%;
  }
  .channel-line .follow-button {
    margin-left: auto;
  }
  .compare-bar {
    left: 50%;
    width: max-content;
    gap: 10px;
    font-size: 12px;
  }
  .project-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .settings-section {
    padding: 20px;
  }
  .modal-head,.filter-dialog-header {
    padding: 18px 20px 15px;
  }
  .modal-body,.filter-dialog-body {
    padding-left: 20px;
    padding-right: 20px;
  }
  .modal-footer,.filter-dialog-footer {
    padding: 12px 20px;
  }
  .metric-grid {
    gap: 8px;
  }
  .metric-box {
    padding: 11px;
  }
  .metric-box strong {
    font-size: 20px;
  }
  .detail-dl {
    grid-template-columns: 110px minmax(0,1fr);
  }
  .comparison th:first-child {
    width: 100px;
  }
  .comparison th,.comparison td {
    padding: 10px 8px;
    font-size: 12px;
  }
  .list-layout .video-card {
    grid-template-columns: 220px minmax(0,1fr);
  }
  .list-layout .card-bookmark {
    left: 182px;
  }
  .list-layout .channel-line {
    flex-wrap: wrap;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
@media(max-width:620px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .earnings-toolbar {
    gap: 8px;
    padding: 10px 0;
  }
  .earnings-toolbar>strong {
    flex-basis: 100%;
  }
  .earnings-toolbar label {
    flex: 1 1 135px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .earnings-toolbar select,.earnings-toolbar input {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  .earnings-toolbar button {
    min-height: 44px;
    font-size: 13px;
  }
  .earnings-row {
    min-height: 56px;
    padding: 10px 0 2px;
  }
  .hide-button {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .earnings-value {
    font-size: 15px;
  }
  dialog.earnings-drawer {
    width: 100vw;
    border-left: 0;
  }
  .earnings-drawer .metric-box {
    padding: 10px 8px;
  }
  .earnings-drawer .metric-box:last-child {
    grid-column: auto;
  }
  .earnings-drawer .metric-box strong {
    font-size: 18px;
  }
  .earnings-drawer .modal-head .icon-button,
  .earnings-drawer .modal-footer button,
  .earnings-periods button {
    min-width: 44px;
    min-height: 44px;
  }
  .earnings-assumptions .form-grid {
    gap: 8px;
  }
  .earnings-assumptions input,.earnings-assumptions select {
    padding: 10px 8px;
    min-height: 44px;
    font-size: 16px;
  }
  .taxonomy-expansion>summary {
    min-height: 44px;
    padding-top: 12px;
  }
  .filter-range-slider,.filter-range-controls input[type=range] {
    height: 44px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    padding-top: 4px;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100% - 106px);
    gap: 5px;
  }
  .heading-actions .source-selector {
    display: none;
  }
  .discovery-tabs button {
    padding: 5px 8px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    width: 100%;
    gap: 6px;
  }
  .toolbar>button {
    height: 40px;
    min-width: 0;
  }
  .video-search-form {
    min-width: 0;
  }
  .search-box input {
    font-size: 14px;
  }
  .search-box select {
    font-size: 13px;
    width: 110px;
  }
  .chip {
    font-size: 12px;
    padding: 7px 9px;
  }
  .results-toolbar {
    margin-bottom: 14px;
  }
  .results-options select {
    max-width: 145px;
  }
  .results-options .view-toggle {
    display: none;
  }
  .card-body {
    padding: 12px 14px 14px;
  }
  .card-title {
    font-size: 15px;
    min-height: 0;
    line-height: 1.5;
    margin-bottom: 6px;
  }
  .channel-line {
    min-height: 27px;
    margin-bottom: 5px;
    gap: 5px;
  }
  .channel-name {
    max-width: 60%;
  }
  .follow-button {
    padding: 3px 8px;
    min-height: 26px;
  }
  .metrics {
    min-height: 28px;
    gap: 8px;
    font-size: 13px;
  }
  .metrics>span {
    font-size: 13px;
  }
  .score {
    font-size: 13px;
    padding: 2px 6px;
  }
  .metrics .menu-button {
    min-height: 30px;
    width: 30px;
  }
  .tag {
    font-size: 12px;
    padding: 5px 7px;
  }
  .tags {
    gap: 5px;
    padding-top: 7px;
  }
  .card-bookmark {
    width: 36px;
    height: 36px;
  }
  .list-layout .video-card {
    display: block;
  }
  .list-layout .thumbnail {
    height: auto;
    min-height: 0;
  }
  .list-layout .card-bookmark {
    right: 8px;
    left: auto;
  }
  .list-layout .card-body {
    padding: 12px 14px 14px;
  }
  .project-grid,.form-grid {
    grid-template-columns: 1fr;
  }
  .settings-section {
    padding: 18px;
  }
  .settings-section .buttons button {
    min-height: 44px;
  }
  .form-field input,.form-field select {
    min-height: 44px;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form input {
    flex-basis: 100%;
    width: 100%;
  }
  .inline-form button {
    min-height: 42px;
  }
  .empty {
    padding: 42px 18px;
  }
  .empty button {
    min-height: 44px;
  }
  .compare-bar {
    max-width: calc(100vw - 24px);
    gap: 7px;
    padding: 9px;
  }
  .compare-bar strong {
    white-space: normal;
  }
  .modal-head,.filter-dialog-header {
    padding: 16px;
  }
  .modal-body,.filter-dialog-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-footer,.filter-dialog-footer {
    padding: 12px 16px;
    gap: 6px;
  }
  .modal-footer button,.filter-dialog-footer button {
    min-height: 40px;
    font-size: 12px;
    padding: 8px 9px;
  }
  .taxonomy-row {
    gap: 7px;
  }
  .taxonomy-actions {
    gap: 4px;
  }
  .taxonomy-actions .choice-button {
    font-size: 12px;
    padding: 7px 6px;
    min-height: 36px;
  }
  .taxonomy-actions .choice-mark {
    display: none;
  }
  .score-options {
    grid-template-columns: 1fr;
  }
  .score-option {
    min-height: 42px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-box:last-child {
    grid-column: 1 / -1;
  }
  .detail-dl {
    grid-template-columns: 100px minmax(0,1fr);
  }
  .modal-head h2,.filter-dialog-header h2 {
    font-size: 18px;
  }
  .comparison th:first-child {
    width: 85px;
  }
  .comparison th,.comparison td {
    padding: 8px 6px;
    font-size: 12px;
  }
  .action-list button {
    min-height: 44px;
  }
  .provenance-disclosure summary {
    min-height: 36px;
  }
  .results-toolbar .save-view-button {
    display: none;
  }
  .provider-options .live-search-options {
    width: min(290px,calc(100vw - 36px));
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior: auto!important;
    transition: none!important;
    animation: none!important;
  }
}
/* The inspector separates useful patterns from detailed provenance. */
.pattern-panel {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #dbe5eb;
  background: #f8fafc;
  border-radius: 9px;
}
.pattern-panel h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.pattern-panel .tags {
  padding-top: 0;
  margin-bottom: 12px;
}
.pattern-panel>.niche-label {
  margin-bottom: 8px;
}
.pattern-panel .pattern-text {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -.25px;
  line-height: 1.55;
  margin: 10px 0 16px;
  color: #334c5f;
}
.pattern-panel>p.small {
  margin: 14px 0 0;
  line-height: 1.7;
}
.pattern-panel .buttons {
  margin-top: 12px;
}
.evidence-disclosure {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
}
.evidence-disclosure>summary {
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #536b7b;
  padding: 8px 0;
  min-height: 38px;
}
.channel-search-panel {
  max-width: 860px;
}
.missing-reference {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 18px;
  margin: 14px 0;
  padding: 18px;
  border: 1px dashed #d4dde4;
  border-radius: 8px;
  background: #fafcfd;
}
.missing-reference strong {
  font-size: 14px;
  font-weight: 600;
}
.missing-reference p {
  grid-column: 1;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.missing-reference a {
  grid-column: 1;
  font-size: 13px;
}
.missing-reference button {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}
.missing-reference small {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.settings-section>details>summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.settings-section>details[open]>summary {
  margin-bottom: 16px;
}
@media(max-width:620px) {
  .pattern-panel {
    padding: 15px;
  }
  .pattern-panel .buttons button {
    min-height: 44px;
  }
  .pattern-panel .pattern-text {
    font-size: 17px;
  }
  .missing-reference {
    grid-template-columns: 1fr;
  }
  .missing-reference button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    min-height: 40px;
  }
  .channel-search-panel .inline-form input {
    font-size: 14px;
  }
}
/* Keep the keyboard skip link out of the document flow until it is needed. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 280px;
  z-index: 200;
  transform: translateY(-160%);
  background: #fff;
  color: #244e64;
  border: 1px solid #789aaa;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
}
.skip-link:focus {
  transform: translateY(0);
}
.sidebar-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 12px;
}
.results-summary>span,.nav-heading,.nav-count {
  color: #66717b;
}
.unlabelled {
  color: #67727c;
}
.collection-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.7;
}
.results-toolbar {
  margin-top: 6px;
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.results-options select {
  padding-top: 4px;
  padding-bottom: 4px;
}
.content {
  padding-top: 36px;
}
@media(max-width:1599px) {
  .content {
    padding-top: 28px;
  }
}
@media(max-width:1199px) {
  .content {
    padding-top: 24px;
  }
}
@media(max-width:760px) {
  .content {
    padding-top: 24px;
  }
  .sidebar {
    visibility: hidden;
  }
  .sidebar.open {
    visibility: visible;
  }
  .sidebar-close {
    display: inline-flex;
  }
  .skip-link {
    left: 14px;
  }
  .results-toolbar {
    margin-top: 12px;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }
}
@media(max-width:620px) {
  input,select,textarea,.search-box input,.search-box select,.channel-search-panel .inline-form input {
    font-size: 16px;
  }
  .content {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(48px + env(safe-area-inset-top));
  }
  .heading-actions .auto-control {
    min-height: 36px;
  }
  .card-bookmark {
    min-height: 40px;
    min-width: 40px;
  }
  .tag,.more-tags,.follow-button,.score {
    min-height: 28px;
  }
  .metrics .menu-button {
    min-height: 32px;
    min-width: 32px;
  }
}
/* A full-width filter group must not inherit flex-basis:0 from desktop. */
@media(max-width:1199px){.research-toolbar>.toolbar{flex:0 0 100%;width:100%;min-width:0}.research-toolbar>.video-search-form{flex:1 1 calc(100% - 46px);min-width:0}.research-toolbar>.provider-options{flex:0 0 36px}}
@media(max-width:620px){.research-toolbar>.toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.research-toolbar>.toolbar>button{width:100%;min-height:44px;height:44px;padding:8px 5px;font-size:12px;gap:5px}.research-toolbar>.toolbar>button .icon{width:13px;height:13px;flex-basis:13px}.research-toolbar>.video-search-form{flex:1 1 calc(100% - 46px)}.research-toolbar>.provider-options{flex-basis:36px}.search-box select{width:105px}.results-options select{font-size:13px}.heading-actions .refresh-button{width:34px;min-width:34px;padding:6px}.heading-actions .refresh-button .icon{width:15px;height:15px}}
/* Compact controls retain a 24px desktop target, and touch users can always save. */
@media(min-width:621px){.channel-name,.follow-button,.score,.tag,.more-tags{min-height:24px}}
@media(hover:none){.card-bookmark{opacity:1}}
@media(max-width:620px){.feed-status button{min-height:44px;min-width:44px}}
.account-sync-status{display:inline-flex;align-items:center;gap:7px;max-width:220px;border:0;background:transparent;color:var(--muted,#606971);font-size:12px;padding:6px;white-space:nowrap}
.account-sync-status span{overflow:hidden;text-overflow:ellipsis}
.account-sync-panel{margin-bottom:24px}
.account-sync-panel small{display:block;margin-top:12px;color:var(--muted,#606971)}
.account-sync-panel [data-account-message]{overflow-wrap:anywhere}
.query-evidence{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;padding:10px 0 12px;font-size:12px;color:var(--muted,#606971)}
.query-evidence>div:first-child{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;min-width:0;flex:1 1 300px}
.query-evidence strong{color:var(--ink,#20252b);font-weight:600}
.query-evidence-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.query-evidence-controls [role=group]{display:flex;border:1px solid var(--border,#e4e7eb);border-radius:6px;overflow:hidden}
.query-evidence-controls button{font-size:12px;min-height:30px;padding:5px 8px;white-space:normal}
.query-evidence-controls [role=group] button{border:0;border-radius:0}
.query-evidence-controls button[aria-pressed=true]{background:#eaf3f5;color:#124f64}
.query-evidence-controls details{position:relative}
.query-evidence-controls summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.query-evidence-controls details p{position:absolute;z-index:3;right:0;top:18px;width:min(360px,80vw);padding:14px;background:#fff;border:1px solid var(--border,#e4e7eb);border-radius:8px;box-shadow:0 8px 24px #20252b1a;line-height:1.6;color:#48535c}
.score-support{display:block;font-size:12px;color:#606971;line-height:1.4;margin:2px 0 5px}
.score-support.limited{color:#815800}
.match-evidence{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:12px;color:#606971;margin:3px 0 6px;min-width:0}
.match-evidence.joint{color:#205d46}
.match-evidence button{border:0;background:transparent;color:inherit;padding:2px 0;min-height:24px;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.query-evidence-detail{padding:12px 0;font-size:13px;line-height:1.6;border-bottom:1px solid var(--border,#e4e7eb)}
.query-evidence-detail h4{margin:0 0 6px;font-size:14px}
@media(max-width:620px){.query-evidence{align-items:flex-start;padding:8px 0 12px}.query-evidence-controls{width:100%;gap:10px}.query-evidence-controls button{min-height:44px}.query-evidence-controls details p{position:static;width:100%;max-width:100%;margin-bottom:0;box-sizing:border-box}.query-evidence-controls details[open]{width:100%}.match-evidence button{min-height:32px}}
@media(max-width:620px){.account-sync-status{max-width:145px;font-size:11px;min-height:36px}.topbar-right{min-width:0}}

.feed-loading-spinner{display:inline-block;width:17px;height:17px;border:2px solid #d9e0e6;border-top-color:#667587;border-radius:50%;vertical-align:middle;margin:0 8px 0 0;animation:outlier-feed-spin .8s linear infinite;flex:none}
@keyframes outlier-feed-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.feed-loading-spinner{animation:none;border-style:dashed}}
@media(max-width:620px){
  .results-toolbar:has([data-feed-order-label]:not([hidden])){flex-direction:column;align-items:stretch}
  .results-toolbar:has([data-feed-order-label]:not([hidden])) .results-summary{flex:0 0 auto;width:100%}
  .results-toolbar:has([data-feed-order-label]:not([hidden])) .results-options{width:100%;min-width:0;flex-wrap:wrap;justify-content:space-between}
  .results-toolbar:has([data-feed-order-label]:not([hidden])) .results-options select{flex:1 1 140px;min-width:0;max-width:none}
}
