/* All mobile-specific presentation is isolated here. */
@media (max-width: 782px) {
  :root { --space-7: 44px; }
  body { padding-bottom: 58px; font-size: 13px; }
  .site-shell { width: min(calc(100% - 24px), var(--shell)); }

  .breaking-bar { height: 36px; }
  .breaking-bar__inner { height: 36px; font-size: 9px; }
  .breaking-bar__label { flex: 0 0 auto; }
  .breaking-bar__actions { display: none; }

  .main-header { position: sticky; top: 0; height: 62px; box-shadow: 0 3px 12px rgba(0,0,0,.08); }
  .main-header__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; height: 62px; }
  .brand-mark { gap: 7px; }
  .brand-mark__symbol { width: 38px; height: 38px; font-size: 25px; }
  .brand-mark__type strong { font-size: 21px; }
  .brand-mark__type small { display: none; }
  .custom-logo { max-width: 145px; max-height: 44px; }
  .primary-navigation { display: none; }
  .header-actions { grid-column: 2; gap: 8px; }
  .header-count { display: none; }
  .icon-button { width: 39px; height: 39px; background: #f7f7f7; border-radius: 50%; }
  .menu-toggle { display: grid; }
  .header-search { position: absolute; top: 62px; padding: 9px 0; }
  .search-field { height: 42px; }
  .search-submit { min-height: 42px; padding-inline: 15px; }

  .mobile-navigation { position: absolute; top: 62px; right: 0; left: 0; padding: 9px 12px; background: #fff; border-top: 1px solid var(--color-line); box-shadow: 0 12px 18px rgba(0,0,0,.09); }
  .mobile-menu,
  .mobile-navigation > .menu { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 3px; margin: 0; list-style: none; scrollbar-width: none; scroll-snap-type: x proximity; }
  .mobile-menu::-webkit-scrollbar,
  .mobile-navigation > .menu::-webkit-scrollbar { display: none; }
  .mobile-menu li,
  .mobile-navigation > .menu li { flex: 0 0 auto; scroll-snap-align: start; }
  .mobile-menu a,
  .mobile-navigation > .menu a { display: flex; align-items: center; min-height: 39px; padding: 7px 14px; background: #f7f7f7; border: 1px solid #ececec; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
  .mobile-menu .current-menu-item > a { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
  .mobile-navigation .sub-menu { display: none; }

  .home-hero__lead { height: 510px; }
  .home-hero__lead::after { background: linear-gradient(0deg, rgba(4,8,16,.94), rgba(4,8,16,.52) 62%, rgba(4,8,16,.15)); }
  .home-hero__inner { align-items: end; padding-bottom: 35px; }
  .home-hero__content { width: 100%; }
  .hero-kicker { margin-bottom: 10px; }
  .home-hero__content h1 { margin-bottom: 17px; font-size: clamp(27px, 8vw, 36px); }
  .home-hero__content .post-meta__item:nth-child(3) { display: none; }
  .hero-side-widget { display: none; }
  .hero-rail-wrap { height: auto; }
  .hero-rail { position: static; display: flex; gap: 12px; width: auto; min-height: 0; margin: 0 -12px; padding: 14px 12px 5px; overflow-x: auto; background: #fff; box-shadow: none; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .hero-rail::-webkit-scrollbar { display: none; }
  .hero-rail__card { flex: 0 0 82vw; grid-template-columns: 96px minmax(0, 1fr); min-height: 96px; padding: 8px; background: #fff; border: 1px solid var(--color-line); border-radius: 7px; box-shadow: 0 5px 14px rgba(0,0,0,.06); scroll-snap-align: start; }
  .hero-rail__card + .hero-rail__card { border-inline-start: 1px solid var(--color-line); }
  .hero-rail__image { height: 78px; }
  .home-hero__empty { min-height: 410px; }
  .home-hero__empty h1 { font-size: 31px; }

  .home-section { padding: 40px 0; }
  .trending-section { padding-top: 34px; }
  .home-section__header { grid-template-columns: auto minmax(30px, 1fr); gap: 12px; margin-bottom: 20px; }
  .home-section__header h2 { font-size: 20px; }
  .home-section__header nav { grid-column: 1 / -1; gap: 7px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 3px; scrollbar-width: none; }
  .home-section__header nav::-webkit-scrollbar { display: none; }
  .home-section__header nav a { display: flex; align-items: center; flex: 0 0 auto; min-height: 34px; padding: 5px 12px; background: #f7f7f7; border-radius: 17px; font-size: 10px; }
  .home-section__header nav .is-active { background: var(--color-brand); color: #fff; }
  .home-section__header--compact { grid-template-columns: auto minmax(45px, 1fr) auto; }

  .trending-grid { display: block; height: auto; }
  .trending-lead { height: 390px; }
  .trending-lead .story-overlay__content h3 { font-size: 19px; }
  .trending-list { margin-top: 12px; }
  .mini-story { grid-template-columns: 105px minmax(0, 1fr); min-height: 112px; padding: 11px 0; }
  .mini-story__image { height: 84px; }
  .category-widget { margin-top: 25px; }
  .category-widget__list { display: flex; gap: 8px; height: auto; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .category-widget__list::-webkit-scrollbar { display: none; }
  .category-widget__list a { flex: 0 0 145px; min-height: 82px; border-radius: 5px; scroll-snap-align: start; }
  .category-widget__list a + a { border-top: 0; }

  .featured-grid { display: block; height: auto; }
  .featured-standard__image { height: 230px; }
  .featured-stack { display: flex; gap: 12px; overflow-x: auto; margin: 14px -12px 0; padding: 0 12px 5px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .featured-stack::-webkit-scrollbar { display: none; }
  .featured-overlay { flex: 0 0 82vw; height: 220px; scroll-snap-align: start; }
  .social-widget { margin-top: 24px; }
  .social-widget > h3 { align-self: flex-start; }
  .promo-card { min-height: 115px; }

  .categories-grid { display: flex; flex-direction: column; gap: 18px; }
  .category-column { display: contents; }
  .category-story { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; min-height: 118px; padding-bottom: 14px; border-bottom: 1px solid var(--color-line); }
  .category-story__image,
  .category-story--main .category-story__image { height: 104px; border-radius: 5px; }
  .category-story > div { padding-top: 0; }
  .category-story h3,
  .category-story--main h3 { margin-top: 6px; font-size: 13px; }
  .category-story--main { order: -1; display: block; min-height: 0; }
  .category-story--main .category-story__image { height: 340px; }
  .category-story--main > div { padding-top: 12px; }
  .category-story--main h3 { font-size: 18px; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); }
  .post-card__image { height: 100%; min-height: 145px; aspect-ratio: auto; }
  .post-card__body { padding: 13px; }
  .post-card__title { font-size: 15px; }
  .post-card__excerpt { display: none; }
  .single-article__header h1 { font-size: 30px; }
  .entry-content { font-size: 15px; }
  .site-footer__inner { display: grid; gap: 20px; }
  .footer-menu { flex-wrap: wrap; gap: 12px; }
  .alignwide,
  .alignfull { width: auto; max-width: none; margin-inline: -12px; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    height: 58px;
    background: rgba(255,255,255,.97);
    border-top: 1px solid #e7e7e7;
    box-shadow: 0 -4px 16px rgba(0,0,0,.07);
  }
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: 58px;
    color: #444;
    font-size: 9px;
    font-weight: 700;
  }
  .mobile-bottom-nav a:first-child { color: var(--color-brand); }
  .mobile-bottom-nav span { font-size: 18px; line-height: 1; }
  .mobile-bottom-nav a:active { background: #f7f7f7; }
}

@media (max-width: 420px) {
  .home-hero__lead { height: 460px; }
  .home-hero__content h1 { font-size: 27px; }
  .home-hero__content .post-meta { gap: 9px; }
  .hero-rail__card { flex-basis: 88vw; }
  .trending-lead { height: 340px; }
  .featured-overlay { flex-basis: 88vw; }
  .category-story--main .category-story__image { height: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
