/* Sonariva TV 1.7 — final desktop/TV hierarchy for channels 01–08.
   Load after continuity-identity.css and headlines-dock.css. The continuity
   controller owns the channel attribute; rental channels do not receive it.
   Mobile composition, player layers and service-band heights remain independent. */
@media (min-width:701px) {
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) {
    --stv-polish-edge:1.7%;
    --stv-polish-gap:calc(.9 * var(--stv-cont-u));
    --stv-polish-radius:calc(1.15 * var(--stv-cont-u));
    --stv-polish-inset:calc(.85 * var(--stv-cont-u));
    --stv-polish-line:#dce2eb;
    --stv-polish-muted:#607086;
  }

  /* A larger editorial window shares its outer baseline with every service card. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-broadcast>.stv-content,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic>.stv-topic__layout {
    grid-template-columns:minmax(0,3.1fr) minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr)!important;
    gap:var(--stv-polish-gap)!important;
    padding:var(--stv-polish-gap) var(--stv-polish-edge)!important;
    align-items:stretch;
    min-height:0!important;
    min-width:0!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) header.stv-signal-header,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic>.stv-topic__footer,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-broadcast>.stv2-footer {
    padding-inline:var(--stv-polish-edge)!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lead,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__lead,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-program-visual {
    border:1px solid var(--stv-cont-accent)!important;
    border-radius:var(--stv-polish-radius)!important;
    box-shadow:0 calc(.35 * var(--stv-cont-u)) calc(1.1 * var(--stv-cont-u)) #263b5212!important;
    min-width:0;
    min-height:0;
  }

  /* Soft surfaces and a common heading rhythm make the rail a supporting element. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-info-dock,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__rail {
    min-width:0!important;
    min-height:0!important;
    gap:var(--stv-polish-gap)!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__rail {
    grid-template-rows:minmax(0,1fr) minmax(0,1.12fr) minmax(0,1fr)!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-dock,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__card {
    box-sizing:border-box;
    min-width:0;
    padding:var(--stv-polish-inset)!important;
    border:1px solid var(--stv-polish-line)!important;
    border-radius:var(--stv-polish-radius)!important;
    background:#ffffffc9!important;
    box-shadow:none!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-dock>header,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__card>header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-width:0;
    min-height:calc(1.45 * var(--stv-cont-u));
    gap:calc(.35 * var(--stv-cont-u));
    margin:0;
    padding:0 0 calc(.4 * var(--stv-cont-u))!important;
    border-bottom:1px solid var(--stv-polish-line)!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock>header>span,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-dock>header>span,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__card>header>span {
    min-width:0;
    color:var(--stv-cont-ink)!important;
    font-size:calc(.8 * var(--stv-cont-u))!important;
    font-weight:750!important;
    letter-spacing:.025em!important;
    line-height:1.2!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock>header>small,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-dock>header>small,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__card>header>small {
    flex:0 1 auto;
    max-width:43%;
    padding:calc(.15 * var(--stv-cont-u)) calc(.32 * var(--stv-cont-u));
    border-radius:calc(.35 * var(--stv-cont-u));
    color:var(--stv-polish-muted)!important;
    background:var(--stv-cont-soft)!important;
    font-size:calc(.55 * var(--stv-cont-u))!important;
    font-weight:650;
    letter-spacing:.015em!important;
    line-height:1.2!important;
    text-align:right;
  }

  /* Editorial rows share a source/title/detail alignment. The circulating news
     track keeps its measured stride, padding and transitions from headlines-dock. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock:not(.is-news) .stv-info-dock-row {
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    gap:calc(.2 * var(--stv-cont-u))!important;
    padding:calc(.55 * var(--stv-cont-u)) calc(.65 * var(--stv-cont-u))!important;
    background:var(--stv-cont-soft)!important;
    border-color:var(--stv-polish-line)!important;
    border-radius:calc(.7 * var(--stv-cont-u))!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock:not(.is-news) .stv-info-dock-row>span {
    grid-column:1!important;
    grid-row:1!important;
    text-align:left!important;
    color:var(--stv-cont-ink)!important;
    font-size:calc(.66 * var(--stv-cont-u))!important;
    font-weight:750!important;
    letter-spacing:.035em!important;
    line-height:1.15!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock:not(.is-news) .stv-info-dock-row>strong {
    grid-column:1!important;
    grid-row:2!important;
    align-self:center;
    min-height:0;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
    white-space:normal!important;
    overflow-wrap:break-word;
    color:#34475f!important;
    font-size:calc(1.03 * var(--stv-cont-u))!important;
    font-weight:750!important;
    letter-spacing:-.01em!important;
    line-height:1.2!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock:not(.is-news) .stv-info-dock-row>small {
    grid-column:1!important;
    grid-row:3!important;
    font-size:calc(.63 * var(--stv-cont-u))!important;
    color:var(--stv-polish-muted)!important;
    font-weight:600!important;
    line-height:1.2!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock.is-news .stv-headlines-track>.stv-info-dock-row::before {
    background:var(--stv-cont-soft)!important;
    border-color:var(--stv-polish-line)!important;
    border-radius:calc(.7 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvRotatingDock.is-news .stv-headlines-track>.stv-info-dock-row:nth-child(even)::before {
    background:#f4f2f8!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-card {
    padding:calc(.65 * var(--stv-cont-u))!important;
    border-color:var(--stv-polish-line)!important;
    border-radius:calc(.7 * var(--stv-cont-u))!important;
    background:var(--stv-cont-soft)!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-card.is-bonoloto {
    background:#f4f2f8!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-card-head {
    flex-wrap:wrap;
    gap:calc(.25 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-live-numbers {
    gap:calc(.3 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lottery-live-numbers b {
    flex:0 0 calc(2.7 * var(--stv-cont-u));
    width:calc(2.7 * var(--stv-cont-u))!important;
    height:calc(2.7 * var(--stv-cont-u))!important;
    font-size:calc(1.15 * var(--stv-cont-u))!important;
  }

  /* The three topic cards retain their content with equal inset and clear labels. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__weather-card>div {
    gap:calc(.55 * var(--stv-cont-u));
    margin:calc(.65 * var(--stv-cont-u)) 0 calc(.35 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__weather-card>div i {
    font-size:calc(2.05 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__weather-card>div strong {
    font-size:calc(1.22 * var(--stv-cont-u))!important;
    line-height:1.15!important;
    font-variant-numeric:tabular-nums;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__weather-card h2 {
    margin:calc(.25 * var(--stv-cont-u)) 0!important;
    font-size:calc(1.22 * var(--stv-cont-u))!important;
    line-height:1.15!important;
    letter-spacing:-.015em;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__weather-card>p {
    margin:calc(.3 * var(--stv-cont-u)) 0 0;
    font-size:calc(.76 * var(--stv-cont-u))!important;
    line-height:1.3!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__context-card #stvTopicContext {
    margin-top:calc(.55 * var(--stv-cont-u));
    gap:calc(.35 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__context-card #stvTopicContext p {
    padding:calc(.4 * var(--stv-cont-u)) calc(.55 * var(--stv-cont-u));
    border-radius:calc(.5 * var(--stv-cont-u));
    background:var(--stv-cont-soft)!important;
    line-height:1.25!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__radio-card.has-stv-continuity-data {
    grid-template-rows:auto minmax(0,1fr) minmax(0,1fr);
    row-gap:calc(.3 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__radio-card .stv-continuity-program strong,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__radio-card .stv-continuity-next>strong {
    -webkit-line-clamp:2;
    font-size:calc(.96 * var(--stv-cont-u))!important;
    line-height:1.15!important;
  }

  /* Only known marks are contained. Existing logo boxes and photographic crops
     are retained, with no scale animation or maximum size derived from content. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-signal-header__brand>img,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvCover,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvProgramArtImage,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-continuity-program__logo,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-program-promo__brand,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-program-promo__logo {
    object-fit:contain!important;
    object-position:center!important;
    max-width:100%;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    transform:none!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-continuity-program__logo {
    flex-grow:0;
    flex-shrink:0;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvLead.is-program-on-air,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stvTopicLead.is-program-on-air,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) #stv2ProgramVisual {
    background:linear-gradient(135deg,#fcfafc,var(--stv-cont-soft))!important;
  }

  /* Festival composition keeps its official white mark on a muted dark field. */
  html[data-stv-continuity-channel="7"]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-broadcast>.stv2-stage {
    padding:calc(1.7 * var(--stv-cont-u)) var(--stv-polish-edge)!important;
    gap:var(--stv-polish-gap) calc(3 * var(--stv-cont-u))!important;
  }
  html[data-stv-continuity-channel="7"]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-stage>.stv2-logo-wrap {
    max-width:100%;
    max-height:100%;
    background:linear-gradient(145deg,#41485f,#303b50)!important;
    border-color:#72798c!important;
    border-radius:calc(2 * var(--stv-cont-u))!important;
    box-shadow:none!important;
  }
  html[data-stv-continuity-channel="7"]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-stage>.stv2-premiere {
    background:#ffffffc9!important;
    border-color:var(--stv-polish-line)!important;
    border-radius:var(--stv-polish-radius)!important;
    padding:calc(1.15 * var(--stv-cont-u))!important;
    gap:calc(.5 * var(--stv-cont-u));
  }
  html[data-stv-continuity-channel="7"]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-stage>.stv2-premiere>small {
    color:var(--stv-cont-ink)!important;
    font-size:calc(.72 * var(--stv-cont-u));
    line-height:1.2;
    letter-spacing:.04em;
  }
  html[data-stv-continuity-channel="7"]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-stage .stv2-candidature-cta {
    background:var(--stv-cont-second)!important;
    border-color:#d3c5df!important;
    border-radius:calc(.65 * var(--stv-cont-u));
    box-shadow:none;
  }

  /* Motion has a single editorial focus. These are decorative elements only;
     live countdowns, measured headline scrolling, all ticker tracks, progress
     indicators, entrance/exit states and control feedback are not targeted. */
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__ambient i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-ambient i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-dots,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-rings i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-scan,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-continuity-orbit,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__intro-orbit,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-intro-orbit,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-welcome-wave i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__intro-wave i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-intro-wave i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-wave i,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-wave i {
    animation:none!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-welcome-screen>img,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__intro>img,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-program-promo__logo.is-ready {
    animation:none!important;
    transform:none!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-lead:not(.is-program-on-air) .stv-lead-bg,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__lead:not(.is-program-on-air)>#stvTopicImage {
    transform:none!important;
    transition:opacity .45s ease!important;
  }
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv-topic__ambient,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-dots,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-rings,
  html[data-stv-continuity-channel]:not(.stv-mobile-layout) body:not(.stv-mobile-layout) .stv2-scan {
    opacity:.07!important;
  }
}
