.ev, .ev-dialog {
  --ev-ink: var(--navy, #0b202c);
  --ev-surface: #16333f;
  --ev-mint: var(--mint, #a3e2ce);
  --ev-muted: #b7cecf;
  --ev-line: rgb(183 206 207 / 25%);
  --ev-gap: 16px;
  color: white;
  font-family: var(--font-ui);
  color-scheme: dark;
  text-align: start;
}
.ev, .ev *, .ev-dialog, .ev-dialog * { box-sizing: border-box; }
.ev [hidden], .ev-dialog [hidden] { display: none !important; }
.ev {
  background: radial-gradient(ellipse at 88% 0%, rgb(37 90 88 / 39%), transparent 58%), linear-gradient(125deg, var(--ev-ink) 28%, #102f37);
  padding-block: clamp(40px, 5vh, 56px);
  scroll-margin-top: var(--rp-nav-offset);
}
.ev-library-page { margin: 0; background: var(--navy); }
.ev-library-page .ev { min-height: 100vh; }
.ev-wrap { margin-inline: auto; max-width: var(--rp-max); }
.ev :is(h1,h2,h3,p), .ev-dialog :is(h2,p) { margin: 0; }
.ev :is(button,input,select), .ev-dialog button { font: inherit; color: inherit; }
.ev :is(a,button), .ev-dialog :is(a,button) { -webkit-tap-highlight-color: transparent; }
.ev button, .ev-dialog button { cursor: pointer; }
.ev svg, .ev-dialog svg { display: block; width: 18px; height: 18px; flex: none; }
.ev :focus-visible, .ev-dialog :focus-visible { outline: 3px solid var(--ev-mint); outline-offset: 3px; }
.ev-heading, .ev-title-line, .ev-arrows, .ev-tools, .ev-foot, .ev-position, .ev-dialog-top { display: flex; align-items: center; }
.ev-heading, .ev-foot, .ev-dialog-top { justify-content: space-between; gap: 16px; }
.ev .ev-eyebrow { color: var(--ev-mint); margin-block-end: 4px; }
.ev-title-line { gap: 12px; flex-wrap: wrap; }
.ev-title-line :is(h1,h2) { font-size: clamp(30px, 2.7vw, 40px); font-weight: 700; line-height: 1.25; }
.ev-total { border: 1px solid var(--ev-line); border-radius: 999px; padding: 2px 10px; color: var(--ev-mint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ev .ev-desc { color: var(--ev-muted); margin-block-start: 4px; font-size: 15px; line-height: 1.6; }
.ev-arrows { gap: 8px; }
.ev-arrows button, .ev-close { display: grid; place-items: center; width: 42px; height: 42px; background: transparent; border: 1px solid var(--ev-line); border-radius: 50%; }
.ev-arrows button:not(:disabled):hover, .ev-close:hover { background: var(--ev-mint); color: var(--ev-ink); }
.ev-arrows button:disabled { opacity: .35; cursor: default; }
.ev-tools { gap: 9px; flex-wrap: wrap; margin-block: 17px 15px; }
.ev-search, .ev-select { display: flex; align-items: center; position: relative; color: var(--ev-muted); }
.ev-search { width: clamp(180px, 21vw, 275px); }
.ev-search input, .ev-select select { width: 100%; padding: 6px 12px; border: 1px solid var(--ev-line); border-radius: 9px; background: #15313a; font-size: 13px; line-height: 1.5; min-height: 38px; }
.ev-search input { padding-inline-start: 36px; }
.ev-search input::placeholder { color: var(--ev-muted); opacity: 1; }
.ev-search svg { position: absolute; inset-inline-start: 11px; width: 16px; pointer-events: none; }
.ev-select select { appearance: none; padding-inline-end: 32px; cursor: pointer; }
.ev-select svg { position: absolute; inset-inline-end: 10px; width: 13px; pointer-events: none; }
.ev-text-button { background: none; border: 0; padding: 5px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.ev-results { margin-inline-start: auto; color: var(--ev-muted); font-size: 13px; }
.ev-list { display: grid; gap: var(--ev-gap); min-width: 0; }
.ev-track {
  --ev-width: calc((100% - 3 * var(--ev-gap)) / 4);
  grid-auto-flow: column; grid-auto-columns: var(--ev-width);
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.ev-track::-webkit-scrollbar { display: none; }
.ev-track.ev-dragging { scroll-snap-type: none; cursor: grabbing; }
.ev-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ev-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; isolation: isolate;
  background: var(--ev-surface); border: 1px solid var(--ev-line); border-radius: 18px; scroll-snap-align: start;
  transition: border-color .2s ease;
}
.ev-card:hover, .ev-card:focus-within { border-color: var(--ev-mint); }
.ev-card:has(:focus-visible) { outline: 3px solid var(--ev-mint); outline-offset: -4px; }
.ev-cover { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4 / 5; background: #173940; }
.ev-poster, .ev-cover::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-poster { object-fit: cover; object-position: center; transition: transform .35s ease; }
.ev-cover::after { content: ''; background: linear-gradient(180deg, rgb(7 22 29 / 44%), transparent 31%, transparent 73%, rgb(7 22 29 / 52%)); pointer-events: none; }
.ev-cover-fallback { background: repeating-radial-gradient(ellipse at 105% 90%, transparent 0 27px, #a3e2ce18 28px 29px, transparent 30px 51px), linear-gradient(145deg, #205650, #102935); }
.ev-fallback-text { display: none; }
.ev-cover-fallback .ev-fallback-text { display: block; position: absolute; z-index: 1; inset-block-start: calc(50% + 36px); width: 100%; text-align: center; color: var(--ev-muted); font-size: 12px; }
.ev-card-tags, .ev-source, .ev-play { position: absolute; z-index: 1; }
.ev-card-tags { inset: 11px 11px auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.ev-country, .ev-new, .ev-source { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; line-height: 1.45; }
.ev-country { color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; background: rgb(11 32 44 / 90%); }
.ev-flag { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }
.ev-new { padding: 4px 9px; background: var(--ev-mint); color: var(--ev-ink); font-size: 12px; font-weight: 700; }
.ev-play { inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 48px; height: 48px; background: rgb(8 31 37 / 72%); border: 1px solid rgb(255 255 255 / 76%); border-radius: 50%; color: white; transition: background .2s, transform .2s; }
.ev-play svg { width: 20px; height: 20px; }
.ev-source { inset-inline-end: 12px; inset-block-end: 12px; background: rgb(8 26 34 / 82%); color: white; padding: 6px; }
.ev-source svg { width: 13px; height: 13px; }
.ev-card-copy { padding: 10px 14px 11px; display: flex; flex: 1; flex-direction: column; align-items: start; }
.ev-meta, .ev-dialog-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--ev-muted); font-size: 12px; line-height: 1.5; }
.ev-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--ev-mint); }
.ev-card h3 { font-size: clamp(16px,1.25vw,18px); line-height: 1.48; font-weight: 600; margin-block: 5px 9px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ev-watch { display: inline-flex; align-items: center; gap: 7px; margin-block-start: auto; padding: 0; background: transparent; border: 0; line-height: 1.5; }
.ev .ev-watch { color: var(--ev-mint); font-size: 13px; font-weight: 600; }
.ev-watch::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.ev-watch svg { width: 14px; }
.ev-empty { display: grid; justify-items: center; gap: 10px; padding: 45px 20px; border: 1px dashed var(--ev-line); border-radius: 16px; }
.ev-foot { margin-block-start: 16px; flex-wrap: wrap; }
.ev-primary, .ev-original, .ev-back, .ev-dialog-source { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.ev .ev-primary { min-height: 40px; padding: 6px 16px; font-size: 14px; font-weight: 700; background: var(--ev-mint); color: var(--ev-ink); border: 1px solid transparent; border-radius: 999px; }
.ev-primary:hover { filter: brightness(1.08); }
.ev-badge-count { border-inline-start: 1px solid #0b202c40; padding-inline-start: 9px; }
.ev-position { gap: 10px; color: var(--ev-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ev-meter { width: 70px; height: 3px; border-radius: 3px; background: #38535a; }
.ev-meter i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--ev-mint); }
.ev-back { color: var(--ev-mint); font-size: 14px; margin-block-end: 24px; }
.ev-back:hover, .ev-original:hover { text-decoration: underline; }
.ev-library-page .ev-foot { justify-content: center; }
.ev-dialog {
  margin: auto; width: min(580px, calc(100% - 28px)); max-height: min(86vh, 880px); max-height: min(86dvh, 880px); overflow: auto;
  padding: clamp(16px, 3vw, 26px); background: var(--ev-ink); border: 1px solid var(--ev-line);
  border-radius: 20px; overscroll-behavior: contain;
}
.ev-dialog::backdrop { background: rgb(4 14 21 / 82%); }
.ev-modal-open { overflow: hidden; }
.ev-dialog-top { margin-bottom: 12px; }
.ev-dialog-source { font-size: 13px; color: var(--ev-muted); }
.ev-dialog h2 { font-size: clamp(20px, 3vw, 25px); line-height: 1.5; }
.ev-dialog-meta { gap: 10px; margin-block: 9px; }
.ev-dialog-meta .ev-country { background: var(--ev-surface); }
.ev-original { color: var(--ev-mint); font-weight: 600; margin-block: 0 12px; }
.ev-player { padding: 8px; border-radius: 12px; background: #102a35; }
.ev-player-status { padding: 20px; text-align: center; line-height: 1.7; color: var(--ev-muted); }
.ev-embed, .ev-embed > div { min-width: 0; }
@media (hover:hover) {
  .ev-card:hover .ev-poster { transform: scale(1.025); }
  .ev-card:hover .ev-play { background: #123b40; transform: translate(-50%,-50%) scale(1.06); }
}
@media (min-width:1051px) {
  .ev[data-evidence-view="carousel"] .ev-wrap { max-width: clamp(980px, calc(250vh - 940px), var(--rp-max)); }
}
@media (min-width:1051px) and (max-height:800px) {
  .ev[data-evidence-view="carousel"] .ev-heading { align-items: end; }
  .ev[data-evidence-view="carousel"] .ev-tools { margin-block: 10px; }
  .ev[data-evidence-view="carousel"] .ev-foot { margin-block-start: 10px; }
  .ev[data-evidence-view="carousel"] .ev-title-line h2 { font-size: 32px; }
}
@media (max-width:1050px) {
  .ev-track { --ev-width: calc((100% - 2 * var(--ev-gap)) / 3); }
  .ev-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:800px) {
  .ev-track { --ev-width: calc((100% - var(--ev-gap)) / 2); }
  .ev-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .ev { --ev-gap: 12px; padding-block: 32px; }
  .ev-heading { align-items: flex-end; gap: 8px; }
  .ev-title-line { gap: 5px 8px; }
  .ev-title-line :is(h1,h2) { font-size: 28px; }
  .ev-arrows { gap: 4px; flex: none; }
  .ev-arrows button { width: 34px; height: 34px; }
  .ev-tools { gap: 7px; margin-block: 15px 12px; }
  .ev-search { width: 100%; }
  .ev-select { flex: 1; min-width: 0; }
  .ev-select select { padding-inline-start: 9px; }
  .ev-track { --ev-width: 84%; }
  .ev-grid { grid-template-columns: minmax(0,1fr); }
  .ev-foot { gap: 10px; }
  .ev-position { gap: 5px; }
  .ev-meter { width: 35px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev *, .ev *::before, .ev *::after { scroll-behavior: auto !important; transition: none !important; }
  .ev-card:hover .ev-poster { transform: none; }
  .ev-card:hover .ev-play { transform: translate(-50%,-50%); }
}
