/* Refinamentos responsivos da experiência pública. */
@media (max-width: 850px) {
  body.menu-open {
    overflow: hidden;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 89px 0 0;
    z-index: 49;
    background: rgba(16, 30, 46, .34);
    backdrop-filter: blur(2px);
  }

  .site-header {
    padding-inline: 20px;
    animation: none !important;
    transform: none !important;
  }

  .menu-toggle {
    position: relative;
    z-index: 52;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    background: var(--white);
    color: var(--wine);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(16, 47, 85, .07);
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible,
  .menu-toggle[aria-expanded="true"] {
    border-color: var(--wine);
    background: var(--rose);
  }

  .menu-toggle-icon,
  .menu-toggle-icon span {
    display: block;
  }

  .menu-toggle-icon {
    position: relative;
    width: 21px;
    height: 16px;
  }

  .menu-toggle-icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    transition: top .22s ease, transform .22s ease, opacity .18s ease;
  }

  .menu-toggle-icon span:nth-child(1) { top: 0; }
  .menu-toggle-icon span:nth-child(2) { top: 7px; }
  .menu-toggle-icon span:nth-child(3) { top: 14px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) { top: 7px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

  .site-header .main-nav {
    position: fixed;
    inset: 89px 14px auto;
    z-index: 51;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    max-height: calc(100dvh - 103px);
    padding: .8rem 12px max(1rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 24px 55px rgba(16, 30, 46, .22);
    overscroll-behavior: contain;
    opacity: 1;
  }

  .site-header .main-nav.open {
    display: flex;
    animation: mobile-menu-in .22s ease both;
  }

  .main-nav > a,
  .main-nav > a:not(.button) {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: .62rem .78rem;
    border-radius: 8px;
    color: var(--ink);
    font-size: .94rem;
  }

  .main-nav > a::after,
  .main-nav > a:hover::after {
    display: none !important;
  }

  .main-nav > a:hover,
  .main-nav > a.active {
    background: var(--rose);
    color: var(--wine);
  }

  .main-nav .editorial-access {
    justify-content: center;
    margin-top: .35rem;
    border: 1px solid #d9c2c7;
  }

  @keyframes mobile-menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 650px) {
  .site-header {
    height: 74px;
    padding-inline: 16px;
  }

  body.menu-open::before {
    inset: 74px 0 0;
  }

  .site-header .main-nav {
    inset: 74px 10px auto;
    max-height: calc(100dvh - 84px);
    padding-inline: 10px;
  }

  main .section,
  .paper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    min-height: 0;
    gap: 1.35rem;
    padding-top: 1.75rem;
    padding-bottom: 2.75rem;
  }

  .hero-art {
    margin-bottom: .35rem;
  }

  .hero-cover-link .cover-large {
    width: min(235px, 74vw);
  }

  .hero h1 {
    max-width: none;
    font-size: 3.15rem;
    line-height: 1.04;
  }

  .hero-copy > p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hero .actions {
    gap: .65rem 1rem;
    margin-top: 1.25rem;
  }

  .button,
  .text-link,
  button,
  input,
  select {
    min-height: 44px;
  }

  textarea {
    min-height: 130px;
  }

  .section.latest {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .section.latest h2,
  .section-head h2,
  main > .section > h2 {
    font-size: clamp(2.35rem, 10vw, 2.8rem);
  }

  .page-hero {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .page-hero h1 {
    font-size: clamp(2.5rem, 11vw, 3rem);
  }

  .article-grid,
  .edition-grid,
  .people-grid {
    gap: 1rem;
    margin-top: 1.8rem;
  }

  .article-card {
    min-height: 0;
    padding: 1.35rem;
  }

  .article-card footer {
    min-height: 44px;
    padding-top: .8rem;
  }

  .article-card footer a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
  }

  .category-grid {
    gap: .85rem;
    margin-top: 1.8rem;
  }

  .category-grid a {
    min-height: 128px;
    padding: 1rem;
  }

  .filters,
  .large-form {
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.8rem 1rem;
    padding: 2.6rem 20px 2.2rem;
  }

  .footer-about,
  .footer-support {
    grid-column: 1 / -1;
  }

  .footer-brand.brand-wordmark-link {
    width: min(100%, 250px);
    height: 76px;
  }

  .footer-about > p {
    margin: 1rem 0;
    line-height: 1.65;
  }

  .footer-column {
    gap: .3rem;
  }

  .footer-column h2 {
    margin-bottom: .35rem;
  }

  .footer-column > a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: .3rem 0;
  }

  .footer-support .footer-admin-link {
    align-self: flex-start;
  }

  .footer-bottom {
    gap: .5rem;
    padding: 1rem 4.25rem 1rem 20px;
    line-height: 1.55;
  }

  .site-footer .to-top {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 360px) {
  .site-header .brand-wordmark-link {
    width: 168px;
    min-width: 168px;
  }

  .hero .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero .actions .button,
  .hero .actions .text-link {
    justify-content: center;
  }

  .category-grid a {
    min-height: 118px;
    padding: .85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav.open {
    animation: none;
  }

  .menu-toggle-icon span {
    transition: none;
  }
}
