/* Responsividade — todos os breakpoints centralizados */

@media (max-width: 1100px) {
  .site-header__inner--top {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.9rem 0 1rem;
  }

  .site-header__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .help-layout,
  .help-layout--article,
  .help-layout__offset-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-sidebar {
    position: static;
    top: auto;
    min-height: 0;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .help-sidebar__header {
    margin-bottom: 0.8rem;
  }

  .help-sidebar__toggle {
    display: none;
  }

  .help-sidebar__nav {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .help-sidebar__link {
    flex: 0 0 auto;
    min-height: 2.45rem;
    padding: 0.58rem 0.88rem;
    white-space: nowrap;
  }

  .help-sidebar__submenu {
    display: none !important;
  }

  .help-sidebar__item.is-open .help-sidebar__link--toggle::before {
    transform: none;
  }

  .help-layout.is-collapsed,
  .help-layout.is-collapsed .help-sidebar {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }

  .help-layout.is-collapsed .help-sidebar__eyebrow,
  .help-layout.is-collapsed .help-sidebar__link span {
    display: initial;
  }

  .help-layout.is-collapsed .help-sidebar__link {
    justify-content: flex-start;
    padding: 0.58rem 0.88rem;
  }

  .help-layout.is-collapsed .help-sidebar__link::before {
    margin: 0;
  }

  .doc-layout,
  .release-archive__layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .doc-toc,
  .release-archive__toc {
    position: static;
    top: auto;
    order: -1;
  }
}

@media (max-width: 980px) {
  html {
    font-size: 87.5%;
  }

  .site-header__inner,
  .site-main__inner,
  .site-footer__inner,
  .search-results-page,
  .resource-section,
  .home-popular,
  .blog-landing,
  .release-archive,
  .help-layout,
  .help-layout__offset-banner {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .site-header__support,
  .site-header__cta {
    display: none;
  }

  .site-header__inner--search {
    padding: 0 0 0.9rem;
  }

  .site-brand {
    min-width: 0;
  }

  .site-brand__content {
    min-width: 0;
  }

  .site-brand .site-title,
  .site-brand .site-description {
    white-space: nowrap;
  }

  .help-hero {
    margin-bottom: 1.5rem;
    padding-bottom: 3.2rem;
  }

  .help-hero__content {
    padding-top: 1.35rem;
  }

  .help-hero__title {
    font-size: clamp(2.45rem, 9vw, 3.5rem);
    text-wrap: balance;
  }

  .help-hero__description,
  .section-intro__description,
  .content-listing__description,
  .resource-card__description,
  .site-support-banner__text {
    max-width: none;
  }

  .home-popular {
    margin-top: -2rem;
  }

  .home-popular__card {
    padding: 1.4rem;
  }

  .home-popular__header,
  .blog-featured__header,
  .blog-latest__header,
  .resource-section__header,
  .release-summary-card__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .home-popular__tabs {
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.7rem;
    scrollbar-width: thin;
  }

  .home-popular__tabs span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .home-popular__columns,
  .blog-featured__layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .resource-grid,
  .docs-category-grid,
  .faq-section-grid {
    gap: 1rem;
  }

  .resource-card {
    grid-column: span 6;
    min-height: 0;
  }

  .faq-topic-card,
  .docs-topic-card,
  .content-card {
    grid-column: span 6;
  }

  .content-single__pagination {
    flex-direction: column;
  }

  .content-single__pagination > div,
  .content-single__pagination a {
    width: 100%;
  }

  .content-single__pagination-next {
    text-align: left;
  }

  .site-support-banner {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 1rem 1.05rem;
  }

  .site-support-banner__cta {
    width: 100%;
  }

  .site-footer {
    margin-top: 4rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
  }

  .site-footer__brand-column,
  .site-footer__newsletter,
  .site-footer__links {
    min-width: 0;
  }

  .site-footer__note {
    max-width: none;
  }

  .site-footer__newsletter-form {
    width: 100%;
    max-width: none;
  }

  .site-footer__newsletter-form button {
    min-width: 0;
    padding: 0 1rem;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-single {
    gap: 1rem;
  }

  .content-single__title,
  .section-intro__title,
  .section-card__title {
    text-wrap: balance;
  }

  .content-single__content {
    font-size: 1rem;
  }

  .content-single__content h2,
  .content-single__content h3,
  .content-single__content h4 {
    overflow-wrap: anywhere;
  }

  .content-single__content pre {
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
  }

  .content-single__content table,
  .content-single__content iframe {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --mobile-content-max: 34rem;
  }

  .site-header__inner--top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .site-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header__actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-content: flex-end;
    align-self: center;
  }

  .content-listing,
  .content-single,
  .section-intro,
  .resource-section__header,
  .blog-featured__header,
  .blog-latest__header,
  .home-popular__header,
  .content-single__header,
  .doc-layout,
  .site-support-banner,
  .help-layout__main,
  .docs-overview,
  .docs-section,
  .docs-category-grid {
    width: 100%;
    max-width: var(--mobile-content-max);
    margin-left: auto;
    margin-right: auto;
  }

  .content-card,
  .resource-card,
  .faq-topic-card,
  .docs-topic-card,
  .section-card,
  .blog-hero-card,
  .blog-stack-card,
  .release-summary-card {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .faq-topic-card,
  .docs-topic-card {
    grid-template-columns: auto 1fr;
  }

  .content-single__meta {
    justify-content: center;
  }

  .site-support-banner {
    justify-items: start;
    text-align: left;
  }

  .site-support-banner__cta {
    margin: 0;
  }

  .site-header__inner,
  .site-footer__inner {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .site-main__inner {
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  body.home .site-main__inner {
    padding-left: 0;
    padding-right: 0;
  }

  body.home .home-popular,
  body.home .resource-section,
  body.home .site-support-banner,
  body.home .blog-featured,
  body.home .blog-latest {
    width: calc(100% - 1.5rem);
  }

  .site-main {
    padding: 0 0 var(--space-2xl);
  }

  .site-footer__inner {
    padding-top: 0.85rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "resources"
      "company"
      "newsletter";
    gap: 1.35rem;
    padding: 1.1rem 0 1rem;
  }

  .site-footer__brand-column {
    grid-area: brand;
  }

  .site-footer__links--resources {
    grid-area: resources;
  }

  .site-footer__links--company {
    grid-area: company;
    padding-left: 1.6rem;
  }

  .site-footer__newsletter {
    grid-area: newsletter;
  }

  .site-footer__links ul {
    gap: 0.7rem;
  }

  .site-footer__newsletter-form {
    grid-template-columns: 1fr auto;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    overflow: hidden;
    gap: 0;
  }

  .site-footer__newsletter-form input {
    width: 100%;
    min-height: 2.95rem;
    border: 0;
    border-radius: 0;
  }

  .site-footer__newsletter-form button {
    width: auto;
    min-width: 6.25rem;
    border: 0;
    border-radius: 0;
    justify-content: center;
  }

  .site-footer__bottom {
    gap: 0.55rem;
    padding-bottom: 0.2rem;
  }

  .site-header__inner--top {
    gap: 0.72rem;
    padding: 0.8rem 0 0.9rem;
  }

  .site-brand {
    gap: 0.62rem;
  }

  .site-brand__mark {
    width: 1.8rem;
    height: 1.8rem;
  }

  .site-brand .site-title {
    font-size: 1.2rem;
  }

  .site-brand .site-description {
    font-size: 0.66rem;
  }

  .site-header__actions {
    gap: 0.45rem;
  }

  .site-header__chip {
    min-width: 1.75rem;
    min-height: 1.75rem;
  }

  .help-hero__content {
    padding: 2.5rem 0 var(--space-2xl);
  }

  .help-hero__title {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .help-hero__description {
    font-size: 0.98rem;
  }

  .help-search {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.45rem;
  }

  .help-search__icon {
    display: none;
  }

  .help-search__input,
  .help-search__button {
    min-height: 3rem;
    border-radius: 0.62rem;
  }

  .help-search__input {
    padding: 0 0.95rem;
    background: #fff;
  }

  .help-search__hint {
    display: none;
  }

  .help-search__button {
    width: 100%;
    min-width: 0;
  }

  .content-listing__items {
    gap: var(--space-md);
  }

  .resource-card,
  .faq-topic-card,
  .docs-topic-card,
  .content-card {
    grid-column: 1 / -1;
  }

  .home-popular__card,
  .section-card,
  .blog-hero-card__body,
  .blog-stack-card,
  .release-summary-card {
    padding: 1rem;
  }

  .content-single__content,
  .content-single__pagination {
    padding: 0;
  }

  .help-layout,
  .help-layout__main,
  .help-layout__offset-banner,
  .search-results-page,
  .resource-section,
  .home-popular,
  .blog-landing,
  .release-archive,
  .content-listing,
  .content-listing__items,
  .content-single,
  .section-intro,
  .docs-overview,
  .docs-section,
  .docs-category-grid,
  .resource-grid,
  .faq-section-grid,
  .doc-layout,
  .site-support-banner,
  .blog-featured,
  .blog-latest {
    width: 100%;
    max-width: var(--mobile-content-max);
    margin-left: auto;
    margin-right: auto;
  }

  .help-sidebar {
    padding-bottom: 0.8rem;
  }

  .help-sidebar__nav {
    gap: 0.45rem;
  }

  .help-sidebar__link {
    min-height: 2.3rem;
    padding: 0.52rem 0.78rem;
    font-size: 0.87rem;
  }

  .help-sidebar__submenu {
    display: none !important;
  }

  .help-sidebar__item.is-open .help-sidebar__link--toggle::before {
    transform: none;
  }

  .doc-toc {
    padding: 0.95rem 1rem;
  }

  .doc-toc__list {
    gap: 0.12rem;
  }

  .doc-toc__item a {
    padding: 0.34rem 0.7rem;
  }

  .help-search__suggestion {
    grid-template-columns: 1fr;
    grid-template-areas: "type" "title" "excerpt";
    gap: var(--space-2xs);
  }

  .content-single__meta {
    gap: 0.45rem 0.85rem;
    font-size: 0.9rem;
  }

  .content-single__thumbnail {
    border-radius: 0.75rem;
  }

  .content-single__content blockquote {
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 85%;
  }

  .site-header__inner,
  .site-footer__inner,
  .search-results-page,
  .resource-section,
  .home-popular,
  .blog-landing,
  .release-archive,
  .help-layout,
  .help-layout__offset-banner {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .site-main__inner {
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  body.home .site-main__inner {
    padding-left: 0;
    padding-right: 0;
  }

  body.home .home-popular,
  body.home .resource-section,
  body.home .site-support-banner,
  body.home .blog-featured,
  body.home .blog-latest {
    width: calc(100% - 1.5rem);
  }

  .help-layout,
  .help-layout__main,
  .docs-overview,
  .docs-section,
  .docs-category-grid,
  .content-listing,
  .content-listing__items,
  .resource-grid,
  .faq-section-grid,
  .content-single,
  .section-intro,
  .doc-layout,
  .resource-section,
  .home-popular,
  .blog-landing,
  .blog-featured,
  .blog-latest,
  .release-archive,
  .search-results-page,
  .site-support-banner,
  .content-card,
  .resource-card,
  .faq-topic-card,
  .docs-topic-card,
  .section-card,
  .blog-hero-card,
  .blog-stack-card,
  .release-summary-card {
    width: 100%;
    max-width: 100%;
  }

  .help-hero__content {
    padding: 2rem 0 2.4rem;
  }

  .help-hero__eyebrow {
    letter-spacing: 0.16em;
  }

  .help-hero__title {
    font-size: clamp(1.9rem, 11vw, 2.35rem);
  }

  .home-popular {
    margin-top: -0.5rem;
  }

  .home-popular__card {
    padding: 0.95rem;
  }

  .resource-section,
  .blog-latest {
    margin-top: 1.5rem;
  }

  .home-popular__title,
  .blog-featured__header h2,
  .blog-latest__header h2,
  .resource-section__title {
    font-size: 1.45rem;
  }

  .home-popular__list a {
    padding: 0.78rem 0.12rem;
    font-size: 0.93rem;
  }

  .site-footer {
    margin-top: 3rem;
  }

  .site-footer__brand-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.9rem;
  }

  .site-brand--footer {
    display: none;
  }

  .site-footer__inner {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .site-footer__note {
    display: none;
  }

  .site-footer__socials {
    flex-wrap: nowrap;
    justify-content: flex-start;
    justify-self: start;
    margin-top: 0;
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "newsletter"
      "social"
      "resources"
      "company";
    align-items: start;
    gap: 0.55rem;
    padding: 0.45rem 0 1rem;
  }

  .site-footer__brand-column,
  .site-footer__newsletter {
    grid-column: 1 / -1;
  }

  .site-footer__brand-column {
    grid-area: brand;
  }

  .site-footer__socials--brand {
    display: none;
  }

  .site-footer__socials--mobile {
    display: flex;
    grid-area: social;
    justify-self: start;
    margin-top: 0.12rem;
    margin-bottom: 0.7rem;
  }

  .site-footer__socials--mobile a {
    gap: 0.38rem;
    font-size: 0.92rem;
  }

  .site-footer__socials--mobile .ui-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .site-footer__links--resources {
    grid-area: resources;
    margin-left: 0;
  }

  .site-footer__links--company {
    grid-area: company;
  }

  .site-footer__links {
    width: 100%;
    min-width: 0;
    padding-left: 0;
  }

  .site-footer__inner {
    padding-bottom: 2rem;
  }

  .site-footer__newsletter {
    grid-area: newsletter;
    margin-bottom: 0.25rem;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    justify-self: start;
    text-align: left;
  }

  .site-footer__newsletter-form {
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .site-footer__heading--body,
  .site-footer__microcopy {
    text-align: left;
  }

  .site-footer__newsletter-form button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding-top: 1rem;
  }

  .site-footer__copy {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .help-search__input {
    min-height: 3.4rem;
  }

  .help-search__button {
    min-height: 3.1rem;
  }

  .resource-card,
  .faq-topic-card,
  .docs-topic-card,
  .section-card,
  .site-support-banner {
    border-radius: 0.8rem;
  }

  .content-single__title,
  .section-intro__title,
  .section-card__title {
    word-break: break-word;
  }

  .content-single__content {
    overflow-wrap: anywhere;
  }

  .heading-anchor {
    opacity: 1;
  }
}

:root[data-theme="dark"] .site-footer {
  background: var(--card);
}

:root[data-theme="dark"] .site-brand--footer .site-title,
:root[data-theme="dark"] .site-footer__links a,
:root[data-theme="dark"] .site-footer__heading--body {
  color: var(--foreground);
}

:root[data-theme="dark"] .site-footer__newsletter-form input {
  background: var(--card);
  color: var(--foreground);
}

:root[data-theme="dark"] .resource-card,
:root[data-theme="dark"] .faq-topic-card,
:root[data-theme="dark"] .docs-topic-card,
:root[data-theme="dark"] .blog-stack-card,
:root[data-theme="dark"] .release-summary-card,
:root[data-theme="dark"] .section-card,
:root[data-theme="dark"] .home-popular__card,
:root[data-theme="dark"] .blog-hero-card,
:root[data-theme="dark"] .content-listing__pagination .page-numbers,
:root[data-theme="dark"] .post-feedback__btn,
:root[data-theme="dark"] .help-search__suggestions {
  background: var(--card);
  color: var(--foreground);
  border-color: var(--border);
}

:root[data-theme="dark"] .site-support-banner {
  background: #0f213b;
  border-color: var(--border);
}

:root[data-theme="dark"] .site-support-banner__icon {
  background: var(--card);
  border-color: var(--border);
  color: #6f97ff;
}

:root[data-theme="dark"] .help-search-shell--header .help-search,
:root[data-theme="dark"] .help-search__input {
  background: var(--card);
}

:root[data-theme="dark"] .help-search__suggestion:hover,
:root[data-theme="dark"] .help-search__suggestion.is-active,
:root[data-theme="dark"] .help-search__suggestion:focus-visible,
:root[data-theme="dark"] .post-feedback__btn:hover:not(:disabled),
:root[data-theme="dark"] .post-feedback__btn:focus-visible {
  background: var(--color-accent-soft);
}

:root[data-theme="dark"] .help-search__suggestion-type,
:root[data-theme="dark"] .content-card__tag {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

:root[data-theme="dark"] .content-listing__pagination .page-numbers.current,
:root[data-theme="dark"] .content-listing__pagination .page-numbers:hover,
:root[data-theme="dark"]
  .content-listing__pagination
  .page-numbers:focus-visible,
:root[data-theme="dark"] .post-feedback__btn.is-selected {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
}

:root[data-theme="dark"] .site-header__chip,
:root[data-theme="dark"] .site-header__menu-toggle,
:root[data-theme="dark"] .site-header__cta {
  box-shadow: inset 0 0 0 1px rgba(151, 171, 200, 0.1);
}
