.home-video {
  --video-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --video-line: #dedfd4;
  --video-yellow: #fff1a8;
  color: #272b26;
  background: #f9faf5;
  border-block-end: 1px solid var(--video-line);
  letter-spacing: 0;
}

.home-video[hidden],
.home-video [hidden] { display: none !important; }

.home-video-inner {
  box-sizing: border-box;
  width: 100%;
  margin-inline: auto;
  padding-block: 14px 20px;
}
.home-video-controls {
  box-sizing: border-box;
  width: min(100% - 2 * var(--video-gutter), 1180px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-block-end: 12px;
}
.home-video-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.home-video-group + .home-video-group { margin-block-start: 28px; }
.home-video-controls h3 { margin: 0; font-size: 19px; line-height: 1.4; color: inherit; }
#policyVideo :is(.home-video-count, .home-video-button) { font-size: 14px !important; }
.home-video-navigation {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 56px minmax(60px, 1fr) 56px;
  align-items: center;
  gap: 16px;
  width: min(100% - 2 * var(--video-gutter), 380px);
  margin: 14px auto 0;
}
.home-video-count {
  min-inline-size: 53px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
}
.home-video-button,
.home-video-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--video-line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.home-video-button:disabled { opacity: .48; cursor: default; }
.home-video-navigation .home-video-button {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #c1a836;
  background: var(--video-yellow);
  color: #24291e;
}
.home-video-navigation .home-video-button svg { width: 26px; height: 26px; }
.home-video-navigation .home-video-button:not(:disabled):hover { background: #ffe77c; border-color: #827020; }
.home-video-navigation .home-video-button:disabled { background: #efefe9; border-color: #d6d8cf; color: #75796e; opacity: 1; }
.home-video-navigation .home-video-button:active:not(:disabled) { background: #f2d35c; }
.home-video :is(button, a):focus-visible { outline: 2px solid #375994; outline-offset: 2px; }

.home-video-grid {
  --columns: 1;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  align-items: start;
  gap: 12px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-video-grid[data-columns="2"] { --columns: 2; }
.home-video-grid[data-columns="3"] { --columns: 3; }
.home-video-grid[data-columns="5"] { --columns: 5; }
.home-video-grid[data-format="landscape"] { inline-size: 100%; }
.home-video-grid[data-format="landscape"] .home-video-media { border-radius: 0; }
.home-video-grid[data-format="landscape"] .home-video-card-info {
  width: min(100% - 2 * var(--video-gutter), 1180px);
  margin-inline: auto;
}
.home-video-grid[data-format="landscape"][data-compact="true"] {
  width: min(100% - 2 * var(--video-gutter), 1180px);
  margin-inline: auto;
}
.home-video-grid[data-format="landscape"][data-compact="true"] .home-video-media { border-radius: 6px; }
.home-video-grid[data-format="landscape"][data-compact="true"] .home-video-card-info { width: 100%; }
.home-video-grid[data-format="shorts"] {
  --short-width: 220px;
  width: min(100% - 2 * var(--video-gutter), 1180px);
  margin-inline: auto;
  grid-template-columns: repeat(var(--columns), minmax(0, var(--short-width)));
  justify-content: center;
}
.home-video-card { min-width: 0; }
.home-video-media {
  position: relative;
  inline-size: 100%;
  min-block-size: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #19221d;
}
.home-video-grid[data-format="shorts"] .home-video-media { aspect-ratio: 9 / 16; }
.home-video-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}
.home-video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-video-play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #ffffff94;
  border-radius: 50%;
  background: #15201adb;
}
.home-video-play-icon img { filter: brightness(0) invert(1); }
.home-video-card-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  padding-block: 4px;
}
.home-video-title { margin: 0; color: inherit; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.home-video-source { border-color: transparent; background: transparent; }

.home-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #131714;
}
.home-video-frame:not([open]) { display: none; }
.home-video-surface { position: relative; width: 100%; height: 100%; min-height: 0; }
.home-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.home-video-toolbar {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
}
.home-video-toolbar .home-video-size {
  background: #131714e8;
  border-color: #ffffff66;
  color: #fff;
}
.home-video-toolbar .home-video-size:focus-visible { outline-color: #fff1a8; outline-offset: -3px; }
.home-video-frame:modal {
  position: fixed;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border-radius: 0;
}
.home-video-frame:modal .home-video-toolbar { position: static; padding: 2px 4px; }
body:has(.home-video-frame:modal) { overflow: hidden; }

@media (max-width: 560px) {
  .home-video-controls { column-gap: 8px; }
  .home-video-grid[data-format="shorts"] { --short-width: 205px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .home-video-grid[data-format="shorts"] { --short-width: 176px; }
}
