@font-face {
  font-family: FunnySans;
  src: url('../fonts/Roboto-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: FunnySans;
  src: url('../fonts/Roboto-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* Базовые цвета и типографика страницы */
.funny-page {
  --ink: #202e3c;
  --blue: #315e87;
  --gold: #ffd163;
  --line: #dce3e9;
  --muted: #677783;
  margin: 0;
  background: #f5f7f9;
  color: var(--ink);
  font: 16px/1.65 FunnySans,Arial,sans-serif;
}

.funny-page *,.funny-player * {
  box-sizing: border-box;
}

.funny-page h1,.funny-page h2,.funny-page h3,.funny-page p {
  margin: 0;
}

:where(.funny-page) a {
  color: inherit;
}

.funny-page button,.funny-player button,.funny-player input {
  font: inherit;
}

.funny-page button,.funny-player button {
  cursor: pointer;
}

.funny-page img {
  max-width: 100%;
}

.funny-page :focus-visible,.funny-player :focus-visible {
  outline: 3px solid #cf8d14;
  outline-offset: 4px;
}

.funny-page [hidden],.funny-player [hidden] {
  display: none!important;
}

html:has(.funny-page) {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

.funny-wrap {
  width: min(1220px,calc(100% - 64px));
  margin-inline: auto;
}

.funny-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 30;
  padding: 12px;
  background: #fff;
}

.funny-skip:focus {
  top: 10px;
}

/* Хлебные крошки и первый экран */
.funny-breadcrumbs {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 30px;
}

.funny-breadcrumbs a {
  text-decoration: none;
}

.funny-hero {
  position: relative;
  isolation: isolate;
  padding-block: 50px 48px;
  max-width: 980px;
}

.funny-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 20px!important;
}

.funny-eyebrow:before {
  content: '';
  width: 28px;
  height: 3px;
  background: #d99723;
}

.funny-hero h1 {
  font-size: clamp(36px,4.5vw,65px);
  line-height: 1.12;
  letter-spacing: -.035em;
  max-width: 900px;
}

.funny-hero .funny-lead {
  margin-top: 25px;
  max-width: 800px;
  font-size: 18px;
  line-height: 1.75;
  color: #60707e;
}

.funny-meta {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 360px);
  margin-inline: auto;
  gap: 24px;
  text-align: center;
  margin-top: 23px;
  font-size: 12px;
  color: var(--muted);
}

.funny-meta span {
  padding: 8px 0;
}

.funny-meta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 18px;
  background: #d99723;
  transform: translate(-50%, -50%);
}

/* Навигация по разделам подборки */
.funny-toc {
  padding: 25px 30px;
  border: 1px solid #c9dbe8;
  border-radius: 18px;
  background: linear-gradient(120deg, #e3eff8, #edf4f5 65%, #f5eee1);
  margin-bottom: 65px;
}

.funny-toc-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px!important;
}

.funny-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.funny-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffffb8;
  box-shadow: 0 2px 5px #315e8708;
  font-weight: 700;
  transition: background .2s, border-color .2s, box-shadow .2s;
}

.funny-toc a:hover,.funny-toc a[aria-current] {
  background: #315e87;
  border-color: #315e87;
  color: #fff;
  box-shadow: 0 3px 8px #315e8720;
}

/* Разделы подборки и сетка карточек */
.funny-section {
  padding-bottom: 65px;
  margin-bottom: 58px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 105px;
}

.funny-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 17px;
  margin-bottom: 30px;
}

.funny-section h2 {
  font-size: clamp(25px,2.7vw,36px);
  line-height: 1.22;
  letter-spacing: -.025em;
  max-width: 930px;
}

.funny-section-intro {
  max-width: 860px;
  color: var(--muted);
  font-size: 15px;
  margin-top: 17px!important;
}

.funny-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 25px 20px;
  align-items: start;
}

.funny-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px #293e5005;
  scroll-margin-top: 110px;
}

.funny-card-info {
  padding: 18px 19px 21px;
}

.funny-card h3 {
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -.015em;
  margin-bottom: 9px;
}

.funny-card-info p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}




.funny-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Ссылки на тематические статьи */
.funny-related {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: #e9f0f7;
  border: 1px solid #d4e1ec;
  border-radius: 14px;
  padding: 24px 27px;
  margin-top: 27px;
}

.funny-related p {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 330px;
}

.funny-related-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.funny-related a {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
}

.funny-related a:hover {
  text-decoration: underline;
}

.funny-subheading {
  font-size: 23px!important;
  margin: 36px 0 22px!important;
}

.funny-bottom-text {
  max-width: 930px;
  padding-bottom: 60px;
}

.funny-bottom-text h2 {
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 22px;
}

.funny-bottom-text p {
  color: var(--muted);
  margin-bottom: 17px;
  line-height: 1.85;
}

/* Футер использует общие стили основного сайта */

/* Player styles are shared only by the new page and two explicitly linked articles. */
.funny-player {
  position: relative;
  isolation: isolate;
  background: #111923;
  aspect-ratio: 16/10;
  color: #fff;
  font: 14px/1.4 FunnySans,Arial,sans-serif;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  --player-accent: #ffd163;
}

.funny-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.funny-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: white;
  background: #111923;
  display: grid;
  place-items: center;
}

.funny-start img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.funny-start:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%,#0006);
}

.funny-play-disc {
  position: relative;
  z-index: 1;
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--player-accent);
  color: #152330;
  box-shadow: 0 0 0 8px #11192326;
  transition: transform .2s;
}

.funny-play-disc svg {
  width: 23px;
  height: 23px;
  margin-left: 3px;
  fill: currentColor;
}

.funny-start:hover .funny-play-disc {
  transform: scale(1.07);
}

.funny-duration {
  position: absolute;
  right: 13px;
  top: 13px;
  z-index: 2;
  background: #0b111bd9;
  border: 1px solid #ffffff25;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: white;
  font-variant-numeric: tabular-nums;
}

.funny-controls {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 30px 12px 10px;
  background: linear-gradient(transparent,#0c1420ed);
  transform: translateY(0);
  opacity: 1;
  transition: transform .28s ease, opacity .28s ease;
}

/* Во время просмотра панель уходит за нижний край плеера. */
.funny-player.controls-away .funny-controls {
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
}

.funny-control-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.funny-control {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  color: white;
  background: #ffffff0d;
}

.funny-control svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.funny-control:hover {
  background: #ffffff25;
}

.funny-control.play-toggle {
  background: var(--player-accent);
  color: #152330;
  border-color: var(--player-accent);
}

.funny-control.play-toggle svg {
  fill: currentColor;
  stroke: none;
}

.funny-time {
  font-size: 11px;
  white-space: nowrap;
  color: #e4eaf0;
  font-variant-numeric: tabular-nums;
}

.funny-control-spacer {
  flex: 1;
}

.funny-seek {
  width: 100%;
  margin: 0;
  min-width: 0;
  height: 20px;
  accent-color: var(--player-accent);
  cursor: pointer;
}

.funny-seek:disabled {
  opacity: .5;
}

.funny-seek-label {
  display: flex;
  width: 100%;
}

.funny-busy {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: #11192333;
}

.funny-busy:before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #ffffff40;
  border-top-color: var(--player-accent);
  border-radius: 50%;
  animation: funny-spin .8s linear infinite;
}

@keyframes funny-spin {
  to {
    transform: rotate(360deg);
  }

}

.funny-error {
  position: absolute;
  inset: 0;
  padding: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #111923ed;
  font-size: 14px;
  color: white;
}

.funny-error a {
  color: var(--player-accent);
  text-decoration: underline;
}

.funny-player:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.funny-inline-example {
  margin: 35px 0;
  border: 1px solid #d9e2e9;
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  max-width: 860px;
}

.funny-inline-example h2 {
  font-size: 25px;
  line-height: 1.3;
  margin: 0 0 15px;
}

.funny-inline-example>p {
  font-size: 15px;
  color: #61717e;
  line-height: 1.7;
}

.funny-inline-example .funny-player {
  aspect-ratio: 16/9;
  border-radius: 10px;
  margin: 20px 0;
}

.funny-inline-example>a {
  font-size: 15px;
  color: #315e87;
}

@media(min-width:701px) {
  .funny-player.is-started[data-orientation=portrait] {
    aspect-ratio: 3/4;
  }

}

@media(max-width:1000px) {
  .funny-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

}

@media(max-width:700px) {
  html:has(.funny-page) {
    scroll-padding-top: 95px;
  }

  .funny-wrap {
    width: calc(100% - 32px);
  }

  .funny-breadcrumbs {
    padding-top: 23px;
    font-size: 11px;
  }

  .funny-hero {
    padding-block: 33px 30px;
  }

  .funny-hero h1 {
    font-size: 36px;
    letter-spacing: -.03em;
  }

  .funny-hero .funny-lead {
    font-size: 16px;
    margin-top: 20px;
  }

  .funny-meta {
    gap: 24px;
    font-size: 11px;
    margin-top: 19px;
  }

  .funny-toc {
    padding: 21px 17px;
    margin-bottom: 42px;
    border-radius: 14px;
  }

  .funny-toc ol {
    gap: 8px;
  }

  .funny-toc a {
    font-size: 12px;
    padding: 8px 11px;
  }

  .funny-section {
    padding-bottom: 38px;
    margin-bottom: 37px;
  }

  .funny-section-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

  .funny-section h2 {
    font-size: 26px;
  }

  .funny-section-intro {
    font-size: 14px;
    margin-top: 13px!important;
  }

  .funny-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 24px;
    /* Видео занимают всю ширину телефона, текст сохраняет отступы. */
    margin-inline: -16px;
  }

  .funny-grid .funny-card {
    border-inline: 0;
    border-radius: 0;
  }

  .funny-grid .funny-player {
    border-radius: 0;
  }

  .funny-card-info {
    padding: 17px 18px 20px;
  }

  .funny-player {
    aspect-ratio: 16/10;
  }

  .funny-player[data-orientation=portrait] {
    aspect-ratio: 9/16;
  }

  .funny-player[data-orientation=square] {
    aspect-ratio: 1;
  }

  .funny-player:fullscreen {
    aspect-ratio: auto;
  }

  .funny-play-disc {
    width: 70px;
    height: 70px;
  }

  .funny-controls {
    padding-inline: 13px;
  }

  .funny-control {
    width: 40px;
    height: 40px;
  }

  .funny-related {
    align-items: start;
    flex-direction: column;
    padding: 22px;
    gap: 17px;
  }

  .funny-related a {
    font-size: 13px;
  }

  .funny-bottom-text h2 {
    font-size: 27px;
  }

  .funny-bottom-text p {
    font-size: 15px;
  }

  .funny-inline-example {
    padding: 20px 16px;
  }

  .funny-inline-example h2 {
    font-size: 23px;
  }

}

/* Полупрозрачная ссылка возвращает к началу содержимого. */
.funny-page .funny-back-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #315e8799;
  border: 1px solid #ffffff60;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px #20334418;
}

.funny-back-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.funny-page .funny-back-top:hover {
  background: #315e87d9;
}

.funny-section {
  scroll-margin-top: 0;
}

@media(prefers-reduced-motion:reduce) {
  html:has(.funny-page) {
    scroll-behavior: auto;
  }

  .funny-page *,.funny-player * {
    animation: none!important;
    transition: none!important;
  }

}

/* Общий хедер наследует размеры и шрифт главной, контент начинается под ним. */
.funny-page .header {
  font: 14px/20px Roboto,Arial,sans-serif;
}

.funny-page > main {
  padding-top: 70px;
}

.funny-page main h1,.funny-page main h2,.funny-page main h3 {
  text-align: left;
}

.funny-card h3 {
  margin-bottom: 0;
}


/* Типографика футера совпадает с главной страницей. */
.funny-page .footer {
  font: 14px/20px Roboto, Arial, sans-serif;
  color: #000000;
}

@media (max-width: 991px) {
  .funny-page .footer {
    font-size: 12px;
  }
}
