/* 4detki.ru — portal homepage and managed ad slots 1.48.0 */
.home-web-v1 {
  display: none;
}

.home-ad--mobile {
  display: none;
}

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

.home-web-ad-row[hidden] {
  display: none !important;
}

.home-direction-art {
  display: block;
  background-image: url("/assets/images/home-portal-v1/directions-sprite.webp");
  background-repeat: no-repeat;
  background-size: 300% auto;
}

.home-direction-art--tasks { background-position: 0 14%; }
.home-direction-art--school { background-position: 50% 14%; }
.home-direction-art--poems { background-position: 100% 14%; }
.home-direction-art--riddles { background-position: 0 86%; }
.home-direction-art--drawing { background-position: 50% 86%; }
.home-direction-art--crafts { background-position: 100% 86%; }
.home-direction-art--songs {
  background-image: url("/assets/images/home-portal-v1/songs.webp");
  background-position: center 36%;
  background-size: cover;
}

.home-ad {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce8f4;
  border-radius: 22px;
  color: #0b173b;
  background: #fff;
  box-shadow: 0 14px 38px rgba(33, 80, 128, 0.08);
}

.home-ad__placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #31517c;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 178, 210, 0.3), transparent 28%),
    radial-gradient(circle at 86% 82%, rgba(126, 210, 255, 0.3), transparent 30%),
    linear-gradient(145deg, #fffafd, #f2f9ff);
  text-align: center;
}

.home-ad__placeholder > span,
.home-ad__creative-label {
  padding: 4px 9px;
  border-radius: 999px;
  color: #60738e;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.home-ad__placeholder-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 6px 0;
  border: 1px dashed #9ebddd;
  border-radius: 25px;
  color: #f40061;
  background: rgba(255, 255, 255, 0.75);
  font-size: 2.2rem;
}

.home-ad__placeholder strong {
  max-width: 25ch;
  color: #10204c;
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.home-ad__placeholder small {
  max-width: 36ch;
  color: #607695;
  font-size: 0.86rem;
  line-height: 1.4;
}

.home-ad__creative {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #244d78, #0d2448);
  text-decoration: none;
}

.home-ad__creative img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-ad__creative::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(5, 21, 49, 0.82), rgba(5, 21, 49, 0.12));
}

.home-ad__creative-copy {
  position: relative;
  z-index: 1;
  width: min(66%, 560px);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  padding: clamp(22px, 4vw, 48px);
}

.home-ad__creative-copy strong {
  font-size: clamp(1.25rem, 2.6vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.home-ad__creative-copy small {
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  line-height: 1.4;
}

.home-ad__creative-cta {
  margin-top: 7px;
  padding: 10px 15px;
  border-radius: 12px;
  color: #10204c;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 850;
}

.home-ad__frame {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  border: 0;
  background: transparent;
}

.home-ad--code {
  position: relative;
}

.home-ad--code::before {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 50%;
  padding: 2px 7px;
  border-radius: 999px;
  content: "Реклама";
  pointer-events: none;
  color: #536a88;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  transform: translateX(-50%);
}

@media (min-width: 721px) {
  body.home-page-v3 {
    --home-web-max: 1240px;
    --web-ink: #071438;
    --web-muted: #35517e;
    --web-pink: #f40061;
    --web-line: #dce8f4;
    --web-soft: #f4faff;
    --web-shadow: 0 12px 34px rgba(34, 77, 125, 0.08);
    color: var(--web-ink);
    background:
      radial-gradient(circle at 2% 15%, rgba(107, 203, 255, 0.15), transparent 30rem),
      linear-gradient(180deg, #f7fbff 0, #fff 44rem, #f3faff 100%);
  }

  body.home-page-v3 .container {
    width: min(var(--home-web-max), calc(100% - 40px));
  }

  body.home-page-v3 .site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    width: min(var(--home-web-max), calc(100% - 40px));
    margin: 12px auto 0;
    overflow: visible;
    border: 1px solid rgba(218, 231, 243, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 32px rgba(35, 74, 119, 0.08);
    backdrop-filter: blur(20px);
  }

  body.home-page-v3 .site-header__inner {
    min-height: 80px;
    gap: 24px;
    padding: 0 12px 0 16px;
  }

  body.home-page-v3 .site-header .brand {
    flex: 0 0 auto;
    gap: 12px;
    color: var(--web-ink);
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.065em;
  }

  body.home-page-v3 .site-header .brand__mark {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    border-radius: 15px;
    background: linear-gradient(145deg, #ff0870, #ea0058);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    font-size: 2.25rem;
    transform: none;
  }

  body.home-page-v3 .site-header .brand__dot {
    color: inherit;
  }

  body.home-page-v3 .main-nav {
    min-width: 0;
    flex: 1;
    justify-content: center;
    gap: clamp(0px, 1vw, 12px);
  }

  body.home-page-v3 .main-nav a {
    padding: 10px clamp(7px, 1vw, 15px);
    color: var(--web-ink);
    font-size: clamp(0.82rem, 1.15vw, 1rem);
    font-weight: 800;
    white-space: nowrap;
  }

  body.home-page-v3 .main-nav a:hover,
  body.home-page-v3 .main-nav a[aria-current="page"] {
    color: var(--web-pink);
    background: #fff0f6;
  }

  body.home-page-v3 .main-nav__search {
    display: none;
  }

  .home-web-header-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
  }

  .home-web-header-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid #e4edf6;
    border-radius: 14px;
    color: var(--web-ink);
    background: #f5f9fd;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
  }

  .home-web-header-button--search {
    width: 56px;
    padding: 0;
  }

  .home-web-header-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.2;
  }

  body.home-page-v3 .catalog-nav {
    border-top: 1px solid #e3edf6;
    border-radius: 0 0 19px 19px;
    background: rgba(246, 251, 255, 0.94);
  }

  body.home-page-v3 .catalog-nav__scroll {
    min-height: 45px;
    justify-content: center;
    gap: 0;
    padding-inline: 12px;
  }

  body.home-page-v3 .catalog-nav a {
    position: relative;
    padding: 8px clamp(10px, 1.2vw, 18px);
    color: #234575;
    font-size: clamp(0.74rem, 1vw, 0.9rem);
    font-weight: 650;
  }

  body.home-page-v3 .catalog-nav a + a::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 1px;
    content: "";
    background: #cfe0ee;
  }

  .home-web-menu {
    position: fixed;
    z-index: 110;
    inset: 0;
  }

  body.home-web-menu-open {
    overflow: hidden;
  }

  .home-web-menu__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(6, 20, 52, 0.3);
    backdrop-filter: blur(5px);
  }

  .home-web-menu__panel {
    position: absolute;
    top: 96px;
    right: max(20px, calc((100vw - var(--home-web-max)) / 2));
    width: min(430px, calc(100% - 32px));
    padding: 20px;
    border: 1px solid #dce8f4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(12, 38, 75, 0.22);
  }

  .home-web-menu__panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .home-web-menu__panel h2 {
    margin: 0;
    font-size: 1.6rem;
  }

  .home-web-menu__panel header button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    color: var(--web-ink);
    background: #f2f7fc;
    cursor: pointer;
    font-size: 1.7rem;
  }

  .home-web-menu__panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .home-web-menu__panel nav a {
    display: grid;
    gap: 2px;
    padding: 14px;
    border: 1px solid #e1eaf4;
    border-radius: 14px;
    color: var(--web-ink);
    background: #f8fbff;
    text-decoration: none;
  }

  .home-web-menu__panel nav a:hover {
    border-color: #ff9fc4;
    background: #fff5f9;
  }

  .home-web-menu__panel nav small,
  .home-web-menu__panel nav span {
    color: var(--web-muted);
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .home-web-v1 {
    display: block;
  }

  .home-web-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .home-web-v1 h1,
  .home-web-v1 h2,
  .home-web-v1 h3,
  .home-web-v1 strong {
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  }

  .home-web-hero {
    padding: 14px 0 22px;
  }

  .home-web-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.68fr) minmax(320px, 0.9fr);
    gap: 16px;
  }

  .home-web-hero__content {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: clamp(30px, 3.3vw, 46px);
    border: 1px solid #dce8f4;
    border-radius: 24px;
    background:
      linear-gradient(90deg, #f6fbff 0%, rgba(246, 251, 255, 0.99) 38%, rgba(246, 251, 255, 0.82) 49%, rgba(246, 251, 255, 0.08) 68%),
      url("/assets/images/home-portal-v1/hero-portal.webp") right center / auto 100% no-repeat,
      #edf8ff;
    box-shadow: var(--web-shadow);
  }

  .home-web-eyebrow {
    margin: 0 0 6px;
    color: var(--web-pink);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .home-web-hero h1 {
    max-width: 520px;
    margin: 0;
    color: var(--web-ink);
    font-size: clamp(2.55rem, 3.25vw, 3.15rem);
    font-weight: 950;
    letter-spacing: -0.068em;
    line-height: 0.98;
  }

  .home-web-hero__lead {
    max-width: 470px;
    margin: 14px 0 0;
    color: #244575;
    font-size: clamp(0.98rem, 1.25vw, 1.12rem);
    line-height: 1.48;
  }

  .home-web-search {
    position: relative;
    z-index: 2;
    width: min(430px, 100%);
    min-height: 62px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 7px 8px 7px 16px;
    border: 1px solid #d9e5f1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 35px rgba(33, 70, 116, 0.1);
  }

  .home-web-search > svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #365989;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .home-web-search input {
    min-width: 0;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--web-ink);
    background: transparent;
    font-size: 0.95rem;
  }

  .home-web-search input::placeholder {
    color: #6e87aa;
    opacity: 1;
  }

  .home-web-search button {
    min-width: 102px;
    min-height: 48px;
    padding: 0 17px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, #ff0870, #ec0059);
    box-shadow: 0 10px 22px rgba(244, 0, 97, 0.2);
    cursor: pointer;
    font-weight: 850;
  }

  .home-ad--hero {
    min-height: 430px;
  }

  [data-hero-ad-state="off"] .home-web-hero__grid {
    grid-template-columns: 1fr;
  }

  [data-hero-ad-state="off"] .home-web-hero__content {
    background-position: 55% center;
  }

  .home-web-actions {
    padding: 0 0 28px;
  }

  .home-web-actions__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .home-web-action {
    position: relative;
    min-width: 0;
    min-height: 116px;
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr) 18px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--web-line);
    border-radius: 19px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .home-web-action:hover {
    box-shadow: 0 18px 38px rgba(34, 77, 125, 0.14);
    transform: translateY(-3px);
  }

  .home-web-action img {
    width: 100%;
    height: 116px;
    object-fit: cover;
  }

  .home-web-action > span {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 14px 8px 14px 15px;
  }

  .home-web-action strong {
    overflow: hidden;
    font-size: clamp(0.92rem, 1.3vw, 1.18rem);
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.12;
  }

  .home-web-action small {
    color: var(--web-muted);
    font-size: clamp(0.7rem, 0.92vw, 0.86rem);
    line-height: 1.28;
  }

  .home-web-action > i,
  .home-web-direction > i,
  .home-web-situations i,
  .home-web-collections i,
  .home-web-parents__grid i,
  .home-web-favorites > i {
    color: var(--web-ink);
    font-family: system-ui, sans-serif;
    font-size: 2rem;
    font-style: normal;
    font-weight: 350;
    line-height: 1;
  }

  .home-web-directions {
    padding: 8px 0 36px;
  }

  .home-web-section-heading--intro {
    align-items: end;
  }

  .home-web-section-heading--intro p {
    margin: 7px 0 0;
    color: var(--web-muted);
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .home-web-directions__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }

  .home-web-direction {
    min-width: 0;
    min-height: 148px;
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) 17px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--web-line);
    border-radius: 19px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .home-web-direction:hover {
    box-shadow: 0 18px 38px rgba(34, 77, 125, 0.14);
    transform: translateY(-3px);
  }

  .home-web-direction .home-direction-art {
    width: 100%;
    height: 148px;
  }

  .home-web-direction > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 14px 7px 14px 15px;
  }

  .home-web-direction strong {
    font-size: clamp(0.9rem, 1.25vw, 1.12rem);
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.12;
  }

  .home-web-direction small {
    color: var(--web-muted);
    font-size: clamp(0.7rem, 0.88vw, 0.82rem);
    line-height: 1.3;
  }

  .home-web-direction > i {
    font-size: 1.75rem;
  }

  .home-web-direction--songs {
    grid-column: 1 / -1;
    grid-template-columns: 180px minmax(0, 1fr) 24px;
    border-color: #d8e4ff;
    background: linear-gradient(90deg, #ffffff 0%, #f7f3ff 62%, #eef8ff 100%);
  }

  .home-web-direction--songs .home-direction-art {
    height: 148px;
  }

  .home-web-direction--songs strong {
    font-size: 1.3rem;
  }

  .home-web-quick {
    padding: 24px 0;
    border-block: 1px solid #e4eef6;
    background: rgba(246, 251, 255, 0.82);
  }

  .home-web-lesson {
    padding: 26px 0 0;
  }

  .home-web-lesson__card {
    min-height: 148px;
    display: grid;
    grid-template-columns: 176px minmax(300px, 1fr) minmax(350px, 0.9fr);
    align-items: center;
    gap: 24px;
    overflow: hidden;
    padding-right: 24px;
    border: 1px solid #dce8f4;
    border-radius: 21px;
    background: linear-gradient(115deg, #fff5f9, #f6fbff 58%, #eef8ff);
    box-shadow: var(--web-shadow);
  }

  .home-web-lesson__card > img {
    width: 176px;
    height: 148px;
    object-fit: cover;
  }

  .home-web-lesson__copy {
    min-width: 0;
  }

  .home-web-lesson__copy p {
    margin: 0 0 4px;
    color: var(--web-pink);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .home-web-lesson__copy h2 {
    margin: 0;
    font-size: clamp(1.3rem, 1.9vw, 1.75rem);
    letter-spacing: -0.045em;
    line-height: 1.05;
  }

  .home-web-lesson__copy > span {
    display: block;
    margin-top: 7px;
    color: var(--web-muted);
    font-size: 0.82rem;
    line-height: 1.38;
  }

  .home-web-lesson nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-web-lesson nav a {
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 8px 11px;
    border: 1px solid #d7e5f2;
    border-radius: 13px;
    color: var(--web-ink);
    background: rgba(255, 255, 255, 0.94);
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
  }

  .home-web-lesson nav a:hover {
    border-color: var(--web-pink);
    color: var(--web-pink);
  }

  .home-web-quick__layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.78fr) minmax(620px, 1.5fr);
    align-items: end;
    gap: 34px;
  }

  .home-web-quick h2,
  .home-web-section-heading h2,
  .home-web-parents h2,
  .home-web-seo h2 {
    margin: 0;
    color: var(--web-ink);
    font-size: clamp(2rem, 2.8vw, 2.75rem);
    font-weight: 950;
    letter-spacing: -0.06em;
    line-height: 1.02;
  }

  .home-web-quick__ages nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 17px;
  }

  .home-web-quick__ages nav a {
    min-height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid #dce8f4;
    border-radius: 15px;
    color: var(--web-ink);
    background: #f0f7fd;
    font-size: 1.08rem;
    font-weight: 850;
    text-decoration: none;
  }

  .home-web-quick__ages nav a.is-active,
  .home-web-quick__ages nav a:hover {
    border-color: var(--web-pink);
    color: #fff;
    background: linear-gradient(145deg, #ff0870, #ed005a);
  }

  .home-web-situations {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
  }

  .home-web-situations a {
    min-width: 0;
    min-height: 112px;
    display: grid;
    grid-template-columns: 1fr 14px;
    grid-template-rows: 58px auto;
    align-items: center;
    padding: 10px 12px 12px 16px;
    border: 1px solid #dce8f4;
    border-radius: 18px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: 0 7px 22px rgba(34, 77, 125, 0.05);
    text-align: center;
    text-decoration: none;
  }

  .home-web-situation-icon {
    grid-column: 1 / 3;
    font-family: system-ui, sans-serif;
    font-size: 3.15rem;
    font-weight: 850;
    line-height: 1;
  }

  .home-web-situation-icon--sleep { color: #a368e2; }
  .home-web-situation-icon--road { color: #188fd3; text-shadow: 15px 0 0 #188fd3; }
  .home-web-situation-icon--time { color: var(--web-pink); }
  .home-web-situation-icon--useful { color: #36aa61; transform: rotate(-22deg); }

  .home-web-situations strong {
    overflow: hidden;
    font-size: clamp(0.78rem, 1vw, 0.94rem);
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
  }

  .home-web-situations i {
    font-size: 1.7rem;
  }

  .home-web-resume,
  .home-web-popular,
  .home-web-collections,
  .home-web-parents,
  .home-web-seo {
    padding: 36px 0;
  }

  .home-web-resume[hidden] {
    display: none;
  }

  .home-web-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
  }

  .home-web-section-heading > a {
    color: var(--web-pink);
    font-size: 0.98rem;
    font-weight: 850;
    text-decoration: none;
  }

  .home-web-resume__card {
    min-height: 116px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto 22px;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    border: 1px solid #dce8f4;
    border-radius: 19px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
  }

  .home-web-resume__card > img {
    width: 150px;
    height: 116px;
    object-fit: cover;
  }

  .home-web-resume__card > span:nth-child(2) {
    display: grid;
    gap: 5px;
  }

  .home-web-resume__card strong { font-size: 1.1rem; }
  .home-web-resume__card small { color: var(--web-muted); }
  .home-web-resume__card em { color: var(--web-pink); font-style: normal; font-weight: 850; }
  .home-web-resume__card span i { width: min(320px, 100%); height: 6px; overflow: hidden; border-radius: 999px; background: #e8eef5; }
  .home-web-resume__card span i b { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--web-pink); }

  .home-web-popular {
    background: linear-gradient(180deg, rgba(235, 248, 255, 0.8), rgba(247, 252, 255, 0.88));
  }

  .home-web-popular__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }

  .home-web-story {
    position: relative;
    min-width: 0;
    min-height: 154px;
    display: grid;
    grid-template-columns: 47% minmax(0, 1fr) 19px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dce8f4;
    border-radius: 19px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
  }

  .home-web-story > img {
    width: 100%;
    height: 154px;
    object-fit: cover;
  }

  .home-web-story > span {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 13px 7px 13px 15px;
  }

  .home-web-story strong {
    overflow: hidden;
    font-size: clamp(0.94rem, 1.35vw, 1.2rem);
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-web-story small {
    color: var(--web-muted);
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .home-web-story small i { margin-inline: 5px; font-style: normal; }

  .home-web-story em {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--web-pink);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 850;
  }

  .home-web-story em b {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 50%;
    color: #fff;
    background: var(--web-pink);
    font-size: 0.73rem;
  }

  .home-web-chevron {
    color: var(--web-ink);
    font-family: system-ui, sans-serif;
    font-size: 2rem;
    font-style: normal;
    font-weight: 350;
    line-height: 1;
  }

  .home-web-collections__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .home-web-collections__grid > a {
    min-width: 0;
    min-height: 155px;
    display: grid;
    grid-template-columns: 44% minmax(0, 1fr) 15px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dce8f4;
    border-radius: 19px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
  }

  .home-web-collections img {
    width: 100%;
    height: 155px;
    object-fit: cover;
  }

  .home-web-collections a > span {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 12px 7px 12px 14px;
  }

  .home-web-collections strong {
    font-size: clamp(0.82rem, 1.12vw, 1.02rem);
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }

  .home-web-collections small {
    color: var(--web-muted);
    font-size: clamp(0.68rem, 0.86vw, 0.82rem);
    line-height: 1.3;
  }

  .home-web-collections i { font-size: 1.7rem; }

  .home-web-ad-row {
    padding: 0 0 28px;
  }

  .home-ad--inline {
    min-height: 132px;
  }

  .home-ad--inline .home-ad__placeholder {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: 14px;
  }

  .home-ad--inline .home-ad__placeholder > span {
    grid-column: 1 / 3;
  }

  .home-ad--inline .home-ad__placeholder strong {
    justify-self: end;
  }

  .home-ad--inline .home-ad__placeholder small {
    justify-self: start;
  }

  .home-web-parents {
    margin-inline: auto;
    background: linear-gradient(135deg, #fff1f7, #fff8fb 55%, #eef9ff);
  }

  .home-web-parents h2 {
    margin-bottom: 18px;
  }

  .home-web-parents__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  .home-web-parents__grid > a {
    min-width: 0;
    min-height: 170px;
    display: grid;
    grid-template-columns: 48% minmax(0, 1fr) 20px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #eadce5;
    border-radius: 20px;
    color: var(--web-ink);
    background: #fff;
    box-shadow: 0 10px 28px rgba(80, 43, 68, 0.06);
    text-decoration: none;
  }

  .home-web-parents__grid img {
    width: 100%;
    height: 170px;
    object-fit: cover;
  }

  .home-web-parents__grid a > span {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 16px 10px 16px 24px;
  }

  .home-web-parents__grid strong {
    font-size: clamp(1rem, 1.55vw, 1.3rem);
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.12;
  }

  .home-web-parents__grid small {
    color: var(--web-muted);
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .home-web-favorites {
    min-height: 78px;
    display: grid;
    grid-template-columns: 52px auto 1fr 18px;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 10px 20px;
    border: 1px solid #f2dce7;
    border-radius: 18px;
    color: var(--web-ink);
    background: rgba(255, 255, 255, 0.92);
    text-decoration: none;
  }

  .home-web-favorites > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #ff1478, #ed005c);
    font-size: 2rem;
    line-height: 1;
  }

  .home-web-favorites strong { font-size: 1.05rem; }
  .home-web-favorites small { color: var(--web-muted); }

  .home-web-seo {
    background: linear-gradient(180deg, #f5fbff, #fff);
  }

  .home-web-seo__grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.25fr) minmax(480px, 1.15fr) minmax(250px, 0.6fr);
    gap: 30px;
    align-items: stretch;
    padding: 28px;
    border: 1px solid #dce8f4;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--web-shadow);
  }

  [data-seo-ad-state="off"] .home-web-seo__grid {
    grid-template-columns: minmax(300px, 1.1fr) minmax(520px, 1.35fr);
  }

  .home-web-seo__content p {
    max-width: 66ch;
    margin: 14px 0 0;
    color: var(--web-muted);
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .home-web-seo__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-left: 28px;
    border-left: 1px solid #dce8f4;
  }

  .home-web-seo__links > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .home-web-seo__links strong { margin-bottom: 4px; }

  .home-web-seo__links a {
    color: var(--web-pink);
    font-size: 0.88rem;
  }

  .home-ad--seo {
    min-height: 235px;
    border-radius: 17px;
    box-shadow: none;
  }

  .home-ad--seo .home-ad__placeholder {
    padding: 16px;
  }

  .home-ad--seo .home-ad__placeholder strong { font-size: 1.05rem; }
  .home-ad--seo .home-ad__placeholder small { font-size: 0.75rem; }

  body.home-page-v3 .site-footer {
    margin-top: 0;
    padding: 28px 0 20px;
    background: #0c2b53;
  }

  body.home-page-v3 .site-footer::before { display: none; }

  body.home-page-v3 .site-footer__inner {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  body.home-page-v3 .site-footer__inner > div {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  body.home-page-v3 .site-footer .brand { color: #fff; font-size: 1.25rem; }
  body.home-page-v3 .site-footer .brand__mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 11px; box-shadow: none; font-size: 1.7rem; transform: none; }
  body.home-page-v3 .site-footer p { margin: 0; color: #c7d8ec; font-size: 0.82rem; }
  body.home-page-v3 .footer-nav { gap: 8px 18px; }
  body.home-page-v3 .footer-nav a { color: #eaf2fb; font-size: 0.78rem; font-weight: 500; }
  body.home-page-v3 .footer-bottom { display: none; }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .home-web-hero__grid {
    grid-template-columns: 1fr;
  }

  .home-web-hero__content { min-height: 410px; }
  .home-ad--hero { min-height: 160px; }
  .home-ad--hero .home-ad__placeholder-icon { display: none; }

  .home-web-hero__content {
    background:
      linear-gradient(90deg, #f6fbff 0%, rgba(246, 251, 255, 0.99) 50%, rgba(246, 251, 255, 0.58) 67%, rgba(246, 251, 255, 0.06) 85%),
      url("/assets/images/home-portal-v1/hero-portal.webp") right center / auto 100% no-repeat,
      #edf8ff;
  }
  .home-web-hero h1 { max-width: 520px; font-size: clamp(2.4rem, 4.4vw, 3rem); }
  .home-web-hero__lead { max-width: 380px; }
  .home-web-search { width: min(380px, 100%); }
  .home-web-actions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-web-directions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-web-quick__layout { grid-template-columns: 1fr; align-items: stretch; }
  .home-web-lesson__card { grid-template-columns: 150px minmax(0, 1fr); }
  .home-web-lesson__card > img { width: 150px; }
  .home-web-lesson nav { grid-column: 1 / 3; padding: 0 0 18px 18px; }
  .home-web-popular__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-web-collections__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-web-seo__grid { grid-template-columns: 1fr 1.25fr; }
  .home-ad--seo { grid-column: 1 / 3; min-height: 130px; }
  body.home-page-v3 .catalog-nav a { padding-inline: 12px; }
}

@media (max-width: 900px) and (min-width: 721px) {
  body.home-page-v3 .site-header .brand { font-size: 1.45rem; }
  body.home-page-v3 .site-header .brand__mark { width: 48px; height: 48px; flex-basis: 48px; font-size: 1.9rem; }
  body.home-page-v3 .main-nav a { padding-inline: 5px; font-size: 0.74rem; }
  .home-web-header-button--menu { width: 52px; padding: 0; }
  .home-web-header-button--menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .home-web-hero__grid { grid-template-columns: 1fr; }
  .home-ad--hero { min-height: 160px; }
  .home-ad--hero .home-ad__placeholder-icon { display: none; }
  .home-web-popular__grid { grid-template-columns: 1fr; }
  .home-web-directions__grid { grid-template-columns: 1fr; }
  .home-web-parents__grid { grid-template-columns: 1fr; }
  .home-web-seo__grid { grid-template-columns: 1fr; }
  [data-seo-ad-state="off"] .home-web-seo__grid { grid-template-columns: 1fr; }
  .home-web-seo__links { padding: 22px 0 0; border-top: 1px solid #dce8f4; border-left: 0; }
  .home-ad--seo { grid-column: auto; }
}

@media (max-width: 1080px) and (min-width: 721px) {
  body.home-page-v3 .site-header__inner { justify-content: space-between; }
  body.home-page-v3 .main-nav { display: none; }
}

@media (max-width: 720px) {
  .home-web-header-actions,
  .home-web-menu {
    display: none !important;
  }

  .home-mobile-v3__title {
    margin: 0;
    color: var(--home-ink);
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: clamp(2.05rem, 9.2vw, 2.65rem);
    font-weight: 950;
    letter-spacing: -0.06em;
    line-height: 1.04;
  }

  .home-ad--mobile {
    min-height: 112px;
    display: block;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 7px 22px rgba(38, 78, 126, 0.06);
  }

  .home-ad--mobile-search {
    min-height: 144px;
    margin: 0 0 15px;
    border-color: #d9e8f5;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(31, 78, 126, 0.1);
  }

  .home-ad--mobile-search .home-ad__placeholder {
    min-height: 144px;
    padding: 18px;
    background:
      radial-gradient(circle at 12% 18%, rgba(255, 151, 198, 0.35), transparent 30%),
      radial-gradient(circle at 90% 82%, rgba(73, 183, 255, 0.32), transparent 34%),
      linear-gradient(145deg, #fff8fc, #eef8ff);
  }

  .home-ad--mobile-search .home-ad__placeholder strong {
    max-width: 24ch;
    font-size: 1.08rem;
  }

  .home-ad--mobile-search .home-ad__creative-copy {
    width: 78%;
    min-height: 144px;
  }

  .home-ad--mobile-search .home-ad__frame {
    min-height: 144px;
  }

  .home-ad--mobile .home-ad__placeholder {
    min-height: 112px;
    gap: 4px;
    padding: 14px 16px;
  }

  .home-ad--mobile .home-ad__placeholder > span {
    padding: 3px 7px;
    font-size: 0.58rem;
  }

  .home-ad--mobile .home-ad__placeholder strong {
    font-size: 1rem;
  }

  .home-ad--mobile .home-ad__placeholder small {
    font-size: 0.72rem;
  }

  .home-ad--mobile-inline,
  .home-ad--mobile-seo {
    margin-top: 26px;
  }

  .home-ad__creative-copy {
    width: 75%;
    gap: 5px;
    padding: 16px;
  }

  .home-ad__creative-copy strong { font-size: 1.1rem; }
  .home-ad__creative-copy small { font-size: 0.72rem; }
  .home-ad__creative-cta { padding: 7px 10px; font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-web-v1 *,
  .home-web-v1 *::before,
  .home-web-v1 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .home-ad,
  .home-web-header-actions,
  .home-web-menu {
    display: none !important;
  }
}
