:root {
  --bg: #07111f;
  --bg-2: #0b1828;
  --surface: #0f2034;
  --surface-2: #142a42;
  --line: #22384f;
  --ink: #f5f8fc;
  --muted: #9fb3c8;
  --faint: #6f879f;
  --brand: #29aae1;
  --brand-soft: rgba(41, 170, 225, 0.14);
  --live: #ef4444;
  --live-soft: rgba(239, 68, 68, 0.16);
  --radius: 16px;
  --header-h: 64px;
  --gutter: 16px;
  --panel-w: 380px;
  /* Room kept under the player for the now/next strip on desktop. */
  --strip-h: 150px;
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.guide-body {
  color: var(--ink);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(41, 170, 225, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.guide-shell {
  width: min(100%, 1760px);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* --- Header --------------------------------------------------------------- */

.site-bar {
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.site-brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.site-brand-tv {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand);
  color: #04121f;
}

.site-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-clock {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.on-air-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--live);
  padding: 4px 10px;
  border-radius: 999px;
}

.on-air-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

/* --- Layout --------------------------------------------------------------- */

.guide-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  gap: var(--gutter);
  padding: 0 var(--gutter) var(--gutter);
  min-height: 0;
}

.player-column {
  min-width: 0;
}

/* Player + now/next strip, sized so both fit on one screen. */
.stage {
  width: min(100%, calc((100dvh - var(--header-h) - var(--gutter) * 2 - var(--strip-h)) * 16 / 9));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.now-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 12px;
}

.player-frame-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  background: #000;
}

.player-frame-shell iframe,
.player-frame-shell [data-playback_id],
.player-frame-shell .sp2-player,
.player-frame-shell .sp2-player .video-js,
.player-frame-shell .sp2-player video,
.player-frame-shell .sp2-engine {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  border: 0;
  overflow: hidden !important;
}

.player-frame-shell .video-js,
.player-frame-shell .video-js .vjs-tech,
.player-frame-shell video {
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at top, rgba(41, 170, 225, 0.18), rgba(0, 0, 0, 0.85) 50%, #000 100%);
}

.player-placeholder.is-hidden {
  display: none;
}

.player-placeholder-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.player-placeholder-logo {
  width: clamp(100px, 16vw, 170px);
  height: auto;
}

.player-placeholder-copy {
  display: grid;
  gap: 4px;
}

.player-placeholder-copy strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.player-placeholder-copy span {
  color: var(--muted);
}


/* --- Guide panel ---------------------------------------------------------- */

.guide-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: calc(100dvh - var(--header-h) - var(--gutter));
}

.now-card,
.next-card,
.schedule {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.now-card,
.next-card {
  padding: 16px 18px;
}

.card-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.card-eyebrow .eyebrow-time {
  color: var(--muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.now-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.next-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.now-title a,
.next-title a,
.slot-title a {
  text-decoration: none;
}

.now-title a:hover,
.next-title a:hover,
.slot-title a:hover {
  text-decoration: underline;
}

.program-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--brand-soft);
  color: var(--brand);
}

.chip.live {
  background: var(--live);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chip.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}

.progress {
  margin-top: 14px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 1s linear;
}

.now-card.is-live .progress-fill {
  background: var(--live);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.card-empty {
  color: var(--muted);
}

/* --- Schedule ------------------------------------------------------------- */

.schedule {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-head {
  padding: 14px 14px 10px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.schedule-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.zone-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--faint);
}

.zone-toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: 600 0.78rem var(--font-body);
  color: var(--brand);
  cursor: pointer;
}

.zone-toggle:hover {
  text-decoration: underline;
}

.zone-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.day-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -14px 0 -4px;
  padding: 0 14px 2px 4px;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  flex: none;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 600 0.82rem var(--font-body);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.day-tab:hover {
  color: var(--ink);
  border-color: var(--faint);
}

.day-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #07111f;
}

.day-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.slot {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 18px;
  position: relative;
}

.slot + .slot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 106px;
  right: 18px;
  border-top: 1px solid var(--line);
}

.slot-time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-top: 1px;
  white-space: nowrap;
}

.day-divider {
  padding: 14px 18px 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.day-divider + .slot::before {
  display: none;
}

.slot-title {
  font-weight: 600;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
}

.slot .program-sub {
  font-size: 0.8rem;
}

.slot.is-now {
  background: var(--brand-soft);
}

.slot.is-now::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.slot.is-now .slot-time {
  color: var(--brand);
}

.slot.is-live.is-now {
  background: var(--live-soft);
}

.slot.is-live.is-now::after {
  background: var(--live);
}

.slot.is-live .slot-time {
  color: var(--live);
}

.slot.is-past {
  opacity: 0.45;
}

.schedule-empty {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

/* --- Embedded (iframe) mode: no header ------------------------------------ */

.guide-body.is-embedded {
  --header-h: 0px;
}

.guide-body.is-embedded .site-bar {
  display: none;
}

.guide-body.is-embedded .guide-main {
  padding-top: var(--gutter);
}

/* --- Narrow screens: stack and let the page scroll ------------------------ */

/* --- Footer & consent banner ------------------------------------------------ */

.guide-foot {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px 2px;
  font-size: 0.76rem;
  color: var(--faint);
}

.guide-foot a,
.guide-foot-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.guide-foot a:hover,
.guide-foot-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

.consent-banner {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: var(--gutter);
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  box-sizing: border-box;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: var(--ink);
}

.consent-banner[hidden] {
  display: none;
}

.consent-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.consent-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

.consent-body a {
  color: var(--brand);
  white-space: nowrap;
}

.consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Opting out is as easy to find as dismissing the notice. */
.consent-btn {
  appearance: none;
  min-width: 112px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #07111f;
  font: 600 0.86rem var(--font-body);
  cursor: pointer;
}

.consent-btn:hover {
  filter: brightness(0.92);
}

.consent-btn-secondary {
  background: transparent;
  color: var(--ink);
}

.consent-btn-secondary:hover {
  background: rgba(245, 248, 252, 0.08);
  filter: none;
}

.consent-body strong {
  color: var(--ink);
  font-weight: 600;
}

.consent-btn:focus-visible,
.guide-foot a:focus-visible,
.guide-foot-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .consent-btn {
    min-width: 0;
  }
}

@media (max-width: 1100px) {
  :root {
    --panel-w: 340px;
  }
}

@media (max-width: 900px) {
  .guide-main {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .stage {
    width: 100%;
  }

  .guide-panel {
    height: auto;
  }

  .schedule {
    overflow: visible;
  }

  .schedule-list {
    overflow: visible;
  }

  .now-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .now-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  :root {
    --gutter: 12px;
    --header-h: 56px;
  }

  .site-brand-logo {
    height: 24px;
  }

  .player-frame-shell {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .on-air-pill::before,
  .chip.live::before {
    animation: none;
  }

  .progress-fill {
    transition: none;
  }
}

/* --- Replay vs live ------------------------------------------------------- */

/* Replays: a clear, neutral badge (the red LIVE badge is reserved for a live
   feed that is actually on air). */
.chip.replay {
  background: rgba(159, 179, 200, 0.16);
  color: #d5e0ea;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip.replay::before {
  content: "↺";
  font-size: 0.9em;
  letter-spacing: 0;
}

/* Scheduled live that is not on air yet: greyed outline, no pulse. */
.chip.live-upcoming {
  background: transparent;
  border: 1px dashed rgba(239, 68, 68, 0.55);
  color: #f3a6a6;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chip.live-upcoming::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.slot.is-live-upcoming {
  opacity: 0.72;
}

.slot.is-live-upcoming .slot-time {
  color: var(--muted);
}

.now-card.is-live-pending {
  border-style: dashed;
  border-color: rgba(239, 68, 68, 0.45);
}

.now-card.is-live-pending .card-eyebrow > span:first-child,
.now-card.is-live-upcoming .card-eyebrow > span:first-child {
  color: #f3a6a6;
}

.card-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Live events: add to calendar, share ------------------------------------- */

.live-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.live-action {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 0.78rem var(--font-body);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.live-action:hover {
  border-color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
}

.live-action:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.slot.is-target {
  box-shadow: inset 3px 0 0 var(--live);
  background: var(--live-soft);
}

.guide-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--gutter) + 8px);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  width: max-content;
  max-width: min(420px, calc(100vw - 2 * var(--gutter)));
  padding: 9px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: #07111f;
  font: 600 0.86rem/1.35 var(--font-body);
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
}

.guide-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Sharing replays ------------------------------------------------------------ */

.share-icon {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.share-icon:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.share-icon:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.share-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 14px 4px;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3cc0f5 0%, #29aae1 55%, #1d8fc6 100%);
  color: #04111f;
  box-shadow: 0 10px 28px rgba(41, 170, 225, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.share-notice[hidden] {
  display: none;
}

.share-notice.is-arriving {
  animation: share-notice-in 0.45s ease-out, share-notice-pulse 1.6s ease-out 0.45s 1;
}

@keyframes share-notice-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes share-notice-pulse {
  0% {
    box-shadow: 0 10px 28px rgba(41, 170, 225, 0.35), 0 0 0 0 rgba(60, 192, 245, 0.7);
  }
  100% {
    box-shadow: 0 10px 28px rgba(41, 170, 225, 0.35), 0 0 0 14px rgba(60, 192, 245, 0);
  }
}

.share-notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(4, 17, 31, 0.14);
}

.share-notice-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.share-notice-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
}

.share-notice-when {
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.3;
}

.share-notice-more {
  font-size: 0.82rem;
  color: rgba(4, 17, 31, 0.78);
}

.share-notice-close {
  flex: none;
  appearance: none;
  border: 0;
  background: rgba(4, 17, 31, 0.12);
  color: #04111f;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.share-notice-close:hover {
  background: rgba(4, 17, 31, 0.22);
}

.share-notice-close:focus-visible {
  outline: 2px solid #04111f;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .share-notice.is-arriving {
    animation: none;
  }
}

.slot.is-target:not(.is-live):not(.is-live-upcoming) {
  box-shadow: inset 4px 0 0 #3cc0f5, inset 0 0 0 1px rgba(60, 192, 245, 0.55);
  background: rgba(41, 170, 225, 0.2);
}

/* --- Search and sport filter ------------------------------------------------- */

.guide-filter {
  display: grid;
  gap: 8px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 11px;
  color: var(--faint);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  font: 500 0.9rem var(--font-body);
  padding: 8px 34px 8px 34px;
}

.search-field input::placeholder {
  color: var(--faint);
}

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

.search-field input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: transparent;
}

.search-clear {
  position: absolute;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.search-clear:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -14px 0 -4px;
  padding: 0 14px 2px 4px;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 600 0.78rem var(--font-body);
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--ink);
  border-color: var(--faint);
}

.filter-chip[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.filter-chip.is-live[aria-pressed="true"] {
  background: var(--live-soft);
  border-color: var(--live);
  color: #ff8a8a;
}

.filter-chip:focus-visible,
.follow-btn:focus-visible,
.filter-clear:focus-visible,
.alert-icon:focus-visible,
.account-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.filter-summary > span {
  margin-right: auto;
}

.follow-btn,
.filter-clear {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 0.78rem var(--font-body);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.follow-btn:hover,
.filter-clear:hover {
  border-color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
}

.follow-btn.is-on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.filter-clear {
  color: var(--muted);
}

/* --- Reminders ------------------------------------------------------------------ */

.sub-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.sub-icons .share-icon {
  margin-left: 0;
}

.alert-icon {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.alert-icon:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.alert-icon.is-on {
  color: var(--brand);
}

.account-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 0.8rem var(--font-body);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.account-btn:hover {
  border-color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
}

.account-count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #07111f;
  font-size: 0.72rem;
  line-height: 18px;
  text-align: center;
}

.alerts-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
}

.alerts-dialog::backdrop {
  background: rgba(3, 8, 15, 0.7);
}

.alerts-dialog h2 {
  margin: 0 32px 8px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.alerts-dialog h3 {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.alerts-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.alerts-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.alerts-lead {
  margin: 0 0 14px;
  color: var(--muted);
}

.alerts-lead strong {
  color: var(--ink);
}

.alerts-pending {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.alerts-message {
  margin: 0 0 12px;
  color: #ffd27a;
}

.alerts-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.alerts-consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.alerts-btn {
  appearance: none;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #07111f;
  font: 600 0.9rem var(--font-body);
  cursor: pointer;
}

.alerts-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.alerts-btn-secondary {
  width: auto;
  flex: none;
  background: transparent;
  color: var(--ink);
}

.alerts-btn:focus-visible,
.alerts-close:focus-visible,
.alerts-link:focus-visible,
.alerts-remove:focus-visible,
.alerts-email-row input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.alerts-actions {
  margin-top: 4px;
}

.alerts-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--faint);
  font-size: 0.8rem;
}

.alerts-or::before,
.alerts-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.alerts-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.alerts-email-row {
  display: flex;
  gap: 8px;
}

.alerts-email-row input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  font: 500 0.9rem var(--font-body);
  padding: 9px 14px;
}

.alerts-fine {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.alerts-fine a {
  color: var(--muted);
}

.alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.alerts-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.alerts-list li > div {
  flex: 1;
  min-width: 0;
  display: grid;
}

.alerts-list strong {
  overflow-wrap: anywhere;
}

.alerts-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.alerts-remove,
.alerts-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--brand);
  font: 600 0.82rem var(--font-body);
  cursor: pointer;
}

.alerts-empty {
  margin: 0;
  color: var(--faint);
  font-size: 0.84rem;
}

.alerts-account {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.alerts-danger {
  color: #ff8a8a;
}

@media (max-width: 520px) {
  .site-status {
    gap: 8px;
  }

  .site-clock {
    font-size: 0.85rem;
  }

  .account-btn {
    padding: 5px 9px;
  }

  .account-btn span:not(.account-count) {
    display: none;
  }

  .alerts-email-row {
    flex-direction: column;
  }

  .alerts-btn-secondary {
    width: 100%;
  }
}

/* Add to calendar: Google Calendar or an .ics file. */
.cal-menu {
  position: fixed;
  z-index: 70;
  display: grid;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.cal-menu[hidden] {
  display: none;
}

.cal-menu a,
.cal-menu button {
  appearance: none;
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 500 0.9rem var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cal-menu a:hover,
.cal-menu button:hover,
.cal-menu a:focus-visible,
.cal-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
