/* STAGE19 — focused refinements. All dialogs reuse the existing
   salvo/schedule site .pskgu-video-dialog rules from salutejazz-notices.css. */
/* Keep the original warning colors and dimensions; only adjust heading weight. */
html body.page-telemost:not(.page-salutejazz,.page-vkzvonki) .telemost-contingency h3 {
  font-weight:600!important;
}
/* /salutejazz/: scannable system requirements with distinct browser/app rules. */
html body.page-telemost.page-salutejazz .video-support-body h4 {
  font-size:.95rem;font-weight:600;margin:13px 0 6px!important;line-height:1.35!important;
}
html body.page-telemost.page-salutejazz .video-support-body h4:first-of-type {margin-top:8px!important;}
html body.page-telemost.page-salutejazz .video-support-body ul {padding-left:1.3rem;margin:3px 0 12px!important;}
html body.page-telemost.page-salutejazz .video-support-body li {margin:5px 0;line-height:1.55;}
html body.page-telemost.page-salutejazz .video-support-intro {margin-top:2px!important;}
html body.page-telemost.page-salutejazz .video-support-source {font-size:.90rem;}
/* /telemost/stud/: normal site button; modal comes from the shared stylesheet. */
html body.page-telemost-student .telemost-student-extra {display:flex;flex-wrap:wrap;gap:10px;margin:15px 0 0;}
html body.page-telemost-student .telemost-student-extra .btn {
  display:inline-flex;align-items:center;justify-content:center;min-height:40px;
  padding:8px 15px;font-family:inherit;font-size:.93rem;cursor:pointer;
}
@media(max-width:480px) {
  html body.page-telemost-student .telemost-student-extra .btn {width:100%;box-sizing:border-box;}
}

/* STAGE19: visible, accessible hover/focus changes for all three warning actions.
   The dark theme's normal background selector is more specific than the old
   bare :hover rule, so explicitly override background AND text here. */
html[data-theme="dark"] body.page-telemost .telemost-contingency .telemost-contingency__links :is(a, button):is(:hover, :focus-visible) {
  background-color:#71505a!important; color:#fff8f4!important;
  -webkit-text-fill-color:#fff8f4!important; border-color:#db9ba8!important;
  text-decoration:none!important;
}
html[data-theme="light"] body.page-telemost .telemost-contingency .telemost-contingency__links :is(a, button):is(:hover, :focus-visible) {
  background-color:#f8dada!important; color:#712832!important;
  -webkit-text-fill-color:#712832!important; border-color:#b96875!important;
  text-decoration:none!important;
}


/* STAGE20: all video-information cards follow the native site rhythm.
   Old gap:12 plus paragraph margins produced 24-30px vertical jumps and
   inherited min-height left blank space on desktop and mobile. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel {
  min-height:0!important;height:auto!important;gap:0!important;
  align-self:stretch!important;justify-content:flex-start!important;
  font-size:inherit!important;line-height:1.5!important;
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel h4,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel h4 {
  margin:0 0 11px!important;font-size:1rem!important;
  font-weight:700!important;line-height:1.35!important;
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel p,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel p {
  margin:0 0 12px!important;font:inherit!important;line-height:1.5!important;
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel p:last-child,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel p:last-child {margin-bottom:0!important;}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel ol {
  margin:0!important;padding-left:23px!important;line-height:1.5!important;
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel li {margin:0 0 8px!important;}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel li:last-child {margin-bottom:0!important;}

/* Do not stack margins on peer video buttons inside text panels. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel > a.btn,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel > a.btn {
  margin:0!important;font:inherit!important;font-weight:650!important;
}
@media (max-width:820px) {
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-info-grid > .telemost-panel,
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .telemost-overview > .telemost-panel {
    padding:14px!important;
  }
}

/* STAGE20: scroll comparison horizontally with its parameter names fixed.
   Keep a real scroll container: a swipe over the sticky column still scrolls
   the same ancestor (no pointer or touch handlers). */
@media(max-width:720px) {
  html body.page-telemost .video-comparison-scroll {
    overflow-x:auto!important;overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;
    overscroll-behavior-x:contain;
  }
  html body.page-telemost .video-comparison {
    border-collapse:separate!important;
    border-spacing:0!important;
    min-width:570px!important;
  }
  html body.page-telemost .video-comparison tr > :first-child {
    position:sticky!important;left:0!important;z-index:2!important;
    width:clamp(136px,37vw,184px)!important;
    min-width:clamp(136px,37vw,184px)!important;
    max-width:clamp(136px,37vw,184px)!important;
    box-sizing:border-box!important;
    white-space:normal!important;overflow-wrap:break-word!important;
    border-right:1px solid #ead6d4!important;
    background:#fff7f6!important;
    box-shadow:4px 0 7px -6px #7d4a4a66;
  }
  html body.page-telemost .video-comparison thead tr > :first-child {
    z-index:3!important;background:#f8ebe9!important;
  }
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison tbody tr > :first-child {
    background:#f6f9fd!important;border-right-color:#d8e2ed!important;
  }
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison thead tr > :first-child {
    background:#eef3fa!important;border-right-color:#d8e2ed!important;
  }
  html[data-theme="dark"] body.page-telemost .video-comparison tr > :first-child {
    background:#392a2f!important;border-right-color:#62474e!important;
    box-shadow:4px 0 7px -6px #090c11;
  }
  html[data-theme="dark"] body.page-telemost .video-comparison thead tr > :first-child {background:#493239!important;}
  html[data-theme="dark"] body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison tbody tr > :first-child {
    background:#152638!important;border-right-color:#334b63!important;
  }
  html[data-theme="dark"] body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison thead tr > :first-child {background:#20364d!important;}
}

/* STAGE20: student failure help is the same burgundy action as Telemost's
   contingency links, rather than an unrelated blue generic button. */
html body.page-telemost-student .telemost-student-extra .btn[data-video-student-help] {
  border:1px solid #d39b9f!important;border-radius:8px!important;
  background:#fffafa!important;color:#832e38!important;
  -webkit-text-fill-color:#832e38!important;
  font:inherit!important;font-size:.92rem!important;font-weight:650!important;
  line-height:1.3!important;margin:0!important;min-height:42px!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease!important;
}
html[data-theme="light"] body.page-telemost-student .telemost-student-extra .btn[data-video-student-help]:is(:hover,:focus-visible) {
  background:#f8dada!important;color:#712832!important;
  -webkit-text-fill-color:#712832!important;border-color:#b96875!important;
}
html[data-theme="dark"] body.page-telemost-student .telemost-student-extra .btn[data-video-student-help] {
  background:#473035!important;color:#ffe0da!important;
  -webkit-text-fill-color:#ffe0da!important;border-color:#89565c!important;
}
html[data-theme="dark"] body.page-telemost-student .telemost-student-extra .btn[data-video-student-help]:is(:hover,:focus-visible) {
  background:#71505a!important;color:#fff8f4!important;
  -webkit-text-fill-color:#fff8f4!important;border-color:#db9ba8!important;
}
html body.page-telemost-student .telemost-student-extra .btn[data-video-student-help]:focus-visible {
  outline:2px solid #b96875!important;outline-offset:3px!important;
}


/* STAGE20: optional official help added without shrinking the PDF download tile.
   Three even visual actions on wide screens, balanced wrap on tablet/mobile. */
@media (min-width:921px) {
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-actions.video-actions-pair {
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr)!important;
  }
}
@media (min-width:701px) and (max-width:920px) {
  html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-actions.video-actions-pair > .video-official-help {
    grid-column:1/-1;
  }
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
.telemost-actions.video-actions-pair > .video-official-help {
  justify-content:center!important;text-align:center!important;
  font-family:inherit!important;font-weight:650!important;
}


/* STAGE20: measured horizontal-scroll affordance for comparison tables.
   The visual overlays are siblings of the scrollable area, so they do not
   move with the table. pointer-events:none preserves touch swipes over every
   part of the table, including its sticky parameter column. */
html body.page-telemost .video-comparison-frame {
  position:relative;
  min-width:0;
  --video-frozen-width:0px;
}
html body.page-telemost .video-comparison-frame::before,
html body.page-telemost .video-comparison-frame::after {
  position:absolute;
  z-index:7;
  top:1px;
  bottom:1px;
  width:32px;
  display:flex;
  align-items:center;
  font:700 28px/1 Arial,sans-serif;
  box-sizing:border-box;
  opacity:0;
  visibility:hidden;
  pointer-events:none!important;
  transition:opacity .18s ease,visibility .18s ease;
  color:#8b3847;
}
html body.page-telemost .video-comparison-frame::before {
  content:'‹';
  left:var(--video-frozen-width);
  padding-left:2px;
  justify-content:flex-start;
  background:linear-gradient(to right,rgba(250,231,231,.98),rgba(250,231,231,0));
}
html body.page-telemost .video-comparison-frame::after {
  content:'›';
  right:1px;
  padding-right:3px;
  justify-content:flex-end;
  background:linear-gradient(to left,rgba(250,231,231,.98),rgba(250,231,231,0));
}
html body.page-telemost .video-comparison-frame[data-video-overflow-left="1"]::before,
html body.page-telemost .video-comparison-frame[data-video-overflow-right="1"]::after {
  visibility:visible;
  opacity:1;
}
/* Blue/neutral palette on the SaluteJazz and VK pages. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison-frame::before {
  color:#195385;
  background:linear-gradient(to right,rgba(228,238,250,.98),rgba(228,238,250,0));
}
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison-frame::after {
  color:#195385;
  background:linear-gradient(to left,rgba(228,238,250,.98),rgba(228,238,250,0));
}
html[data-theme="dark"] body.page-telemost .video-comparison-frame::before {
  color:#ffd4d6;
  background:linear-gradient(to right,rgba(96,53,66,.96),rgba(96,53,66,0));
}
html[data-theme="dark"] body.page-telemost .video-comparison-frame::after {
  color:#ffd4d6;
  background:linear-gradient(to left,rgba(96,53,66,.96),rgba(96,53,66,0));
}
html[data-theme="dark"] body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison-frame::before {
  color:#d5e8ff;
  background:linear-gradient(to right,rgba(36,66,91,.97),rgba(36,66,91,0));
}
html[data-theme="dark"] body.page-telemost:is(.page-salutejazz,.page-vkzvonki) .video-comparison-frame::after {
  color:#d5e8ff;
  background:linear-gradient(to left,rgba(36,66,91,.97),rgba(36,66,91,0));
}
@media (prefers-reduced-motion:reduce) {
  html body.page-telemost .video-comparison-frame::before,
  html body.page-telemost .video-comparison-frame::after {transition:none;}
}

/* A closed native details has no visible child layout; some engines keep
   bounding boxes for content-visibility:hidden. Keep hidden content out
   of measurement, rendering and keyboard navigation explicitly. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  details.video-compare-details:not([open]) > .video-compare-details__inner,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  details.video-support-details:not([open]) > .video-support-body,
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  details.video-requirements-details:not([open]) > .video-requirements-body {
  display:none!important;
}

/* STAGE20: related-service buttons use the same type rhythm as the body
   of other video information panels rather than the v428 0.94rem default. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-info-grid .video-related-links a.btn {
  font-family:inherit!important;
  font-size:inherit!important;
  line-height:1.5!important;
  font-weight:650!important;
}


/* STAGE20 refinement: consistent vertical rhythm across video pages.
   Cards are already grid children; extra margins on details formerly added
   to their grid row gaps (24/36px instead of 12/18px). */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-page > h2.news_title { margin-bottom:12px!important; }
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  :is(.telemost-overview,.telemost-info-grid) { gap:16px!important; }
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-info-grid { margin-bottom:16px!important; }
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-overview > details:is(.video-support-details,.video-compare-details,.video-requirements-details) {
  margin:0!important;
}
/* Place supplementary notes below the preceding list at the same 12px
   spacing as other paragraph-to-control transitions. */
html body.page-telemost:is(.page-salutejazz,.page-vkzvonki)
  .telemost-info-grid > .telemost-panel ol + p { margin-top:12px!important; }

/* VK: wrap only when two comfortable buttons physically cannot fit.
   Avoid a coarse viewport breakpoint (the old <=560px one-column rule).
   Flex-wrap uses the ACTUAL free width of the card at any viewport. */
html body.page-telemost.page-vkzvonki .video-related-links {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:9px!important;
  width:100%!important;
  max-width:100%!important;
  margin-top:0!important;
  box-sizing:border-box!important;
}
html body.page-telemost.page-vkzvonki .video-related-links > a.btn {
  display:inline-flex!important;
  flex:0 1 auto!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  align-items:center!important;
  justify-content:center!important;
  padding-left:9px!important;
  padding-right:9px!important;
  text-align:center!important;
  white-space:normal!important;
}

/* STAGE21 — reliable finger scrolling on the main Telemost comparison.
   Some Android/iOS browsers selected text instead of starting a nested
   horizontal scroll here. Reserve vertical panning for the browser; a small
   touch handler handles horizontal gestures without affecting other pages. */
@media (max-width:720px) {
  html body.page-telemost:not(.page-salutejazz):not(.page-vkzvonki)
  .telemost-contingency .video-comparison-scroll {
    touch-action:pan-y!important;
  }
}


/* STAGE32: semantic text hierarchy and tested cascade.
   Existing runtime CSS sets most video paragraphs to muted !important.
   Reuse the card's normal inherited foreground, in both themes.
   The contingency warning intentionally retains its separate burgundy palette. */
html body.page-telemost .telemost-overview-card > p,
html body.page-telemost .telemost-panel p,
html body.page-telemost .telemost-contact-card p,
html body.page-telemost-student .telemost-student-card p {
  color:inherit!important;
}
/* The dark student card has an equally specific legacy override. */
html[data-theme="dark"] body.page-telemost-student .telemost-student-card p {
  color:inherit!important;
}
/* True secondary information keeps a muted tone, without affecting instructions. */
html body.page-telemost-student .telemost-join-figure figcaption {
  color:#718198!important;
}
html[data-theme="dark"] body.page-telemost-student .telemost-join-figure figcaption {
  color:#91a6bc!important;
}
