:root {
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Bitter", Georgia, serif;
  --surface: var(--cor-fundo);
  --surface-raised: var(--cor-card);
  --surface-muted: color-mix(in srgb, var(--cor-fundo) 78%, var(--cor-card));
  --surface-strong: var(--cor-primaria);
  --line-strong: var(--cor-line);
  --line-soft: color-mix(in srgb, var(--cor-line) 62%, transparent);
  --shadow-soft: 0 8px 24px rgba(20, 37, 31, 0.055);
  --shadow-lift: 0 14px 32px rgba(20, 37, 31, 0.1);
  --max-width: 1120px;
  --header-height: 72px;
  color-scheme: light;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --surface-strong: #153f35;
}

html[data-theme='dark'] .button-primary,
html[data-theme='dark'] .theme-toggle {
  border-color: #2c725e;
  background: #2c725e;
  color: #fff;
}

html[data-theme='dark'] .hero,
html[data-theme='dark'] .comparison-table thead th {
  background: #153f35;
  color: #fff;
}

html[data-theme='dark'] .hero .button-primary {
  border-color: var(--cor-secundaria);
  background: var(--cor-secundaria);
  color: #1b150f;
}

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  background:
    linear-gradient(90deg, transparent 0 49.9%, color-mix(in srgb, var(--cor-line) 11%, transparent) 50%, transparent 50.1%) 0 0 / 72px 72px,
    linear-gradient(0deg, transparent 0 49.9%, color-mix(in srgb, var(--cor-line) 9%, transparent) 50%, transparent 50.1%) 0 0 / 72px 72px,
    var(--surface);
  font-weight: 400;
  line-height: 1.55;
}

.page-noise {
  opacity: 0.45;
  background:
    radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--cor-secundaria) 12%, transparent), transparent 29rem),
    radial-gradient(ellipse at 88% 6%, color-mix(in srgb, var(--cor-primaria) 10%, transparent), transparent 34rem);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cor-secundaria) 72%, white);
  outline-offset: 3px;
}

button,
.button,
a {
  touch-action: manipulation;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

.page-shell {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
}

.site-header {
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  border-bottom-color: var(--line-strong);
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.topbar {
  gap: 1.35rem;
  padding: 0.55rem 0;
}

.brand {
  gap: 0.68rem;
}

.brand img {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.brand strong {
  color: var(--cor-primaria);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
}

.brand span {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.main-nav {
  gap: 0.15rem;
}

.main-nav a,
.cart-link,
.theme-toggle,
.host-tag {
  border: 0;
  background: transparent;
}

.main-nav a {
  position: relative;
  padding: 0.72rem 0.85rem;
  font-weight: 700;
}

.main-nav a::after {
  content: '';
  position: absolute;
  right: 0.85rem;
  bottom: 0.42rem;
  left: 0.85rem;
  height: 2px;
  background: var(--cor-secundaria);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.main-nav a[aria-current='page'],
.main-nav a:hover,
.cart-link:hover,
.cart-link.is-active {
  background: transparent;
  color: var(--cor-botao);
}

.main-nav a[aria-current='page']::after,
.main-nav a:hover::after {
  transform: scaleX(1);
}

.host-tag {
  padding-inline: 0;
}

.cart-link {
  min-height: 42px;
  padding: 0.55rem 0.65rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  background: var(--cor-primaria);
  color: #f7fbf8;
}

.button {
  min-height: 44px;
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: none;
}

.button-primary {
  border-color: var(--cor-botao);
  background: var(--cor-botao);
  color: #fff;
}

.button:hover {
  border-color: var(--cor-botao);
  background: var(--cor-botao);
  color: #fff;
}

.eyebrow {
  margin-bottom: 0.48rem;
  color: color-mix(in srgb, var(--cor-secundaria) 55%, var(--text-strong));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero {
  position: relative;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cor-primaria) 76%, black);
  background: var(--cor-primaria);
  color: #f7fbf8;
}

.hero::before,
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 12% 120%, transparent 0 26px, rgba(255, 255, 255, 0.055) 27px 28px, transparent 29px 43px),
    linear-gradient(165deg, transparent 0 68%, color-mix(in srgb, var(--cor-secundaria) 42%, transparent) 68.2% 69%, transparent 69.2%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  padding: clamp(2rem, 6vw, 4.8rem);
}

.hero .eyebrow {
  padding-left: 0.5rem;
  border-left: 3px solid var(--cor-secundaria);
  color: #fff;
}

.hero-spotlight .eyebrow {
  border-left-color: var(--cor-secundaria);
  color: color-mix(in srgb, var(--cor-secundaria) 55%, var(--text-strong));
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.hero-copy p:not(.hero-lead),
.hero .hero-lead {
  color: rgba(247, 251, 248, 0.78);
}

.hero-tags span {
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

.hero .button:not(.button-primary) {
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
}

.hero .button-primary {
  border-color: var(--cor-secundaria);
  background: var(--cor-secundaria);
  color: #1b150f;
}

.hero-spotlight {
  position: relative;
  z-index: 1;
  align-self: stretch;
  margin: 1rem;
  padding: 1rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: color-mix(in srgb, var(--cor-card) 96%, transparent);
  color: var(--text-strong);
  box-shadow: none;
}

.hero-spotlight-frame {
  min-height: 190px;
  border: 0;
  background: #fff;
}

.hero-spotlight-frame img {
  max-height: 180px;
}

.hero-spotlight-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.section-block {
  margin-top: 2rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: none;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid:has(> .product-card:only-child) .product-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.product-grid:has(> .product-card:only-child) .product-thumb-link,
.product-grid:has(> .product-card:only-child) .product-card-media {
  height: 100%;
}

.product-grid:has(> .product-card:only-child) .product-card-media {
  aspect-ratio: auto;
  border-right: 1px solid var(--line-soft);
  border-bottom: 0;
}

.product-card,
.site-card-link,
.product-list-item,
.section-dual article {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: none;
}

.product-card-media {
  background: #fff;
}

.product-card:hover,
.site-card-link:hover,
.product-list-item:hover {
  border-color: color-mix(in srgb, var(--cor-botao) 58%, var(--line-strong));
  box-shadow: var(--shadow-lift);
}

.section-dual article {
  border-top: 3px solid var(--cor-secundaria);
}

.home-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line-strong);
}

.home-method-grid article {
  padding: 1.2rem;
  background: var(--surface-raised);
}

.home-method-grid article > span {
  display: block;
  margin-bottom: 1rem;
  color: color-mix(in srgb, var(--cor-secundaria) 55%, var(--text-strong));
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

.home-method-grid h3,
.home-trust-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.08;
}

.home-method-grid p,
.home-trust-panel p,
.home-faq-list p {
  color: var(--text-soft);
}

.home-method-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
}

.home-method-links a,
.article-editorial-meta a,
.article-affiliate-notice a {
  color: var(--cor-botao);
  font-weight: 800;
}

.home-trust-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1.5rem;
  border-left: 5px solid var(--cor-secundaria);
}

.home-trust-panel dl {
  margin: 0;
  border: 1px solid var(--line-strong);
}

.home-trust-panel dl div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.home-trust-panel dl div:last-child {
  border-bottom: 0;
}

.home-trust-panel dt {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-trust-panel dd {
  margin: 0;
  font-weight: 700;
}

.home-faq-list {
  border-top: 1px solid var(--line-strong);
}

.home-faq-list details {
  border-bottom: 1px solid var(--line-strong);
}

.home-faq-list summary {
  padding: 1rem 2.4rem 1rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.home-faq-list p {
  margin: 0;
  padding: 0 0 1rem;
}

.breadcrumbs {
  border: 0;
  background: transparent;
  padding-inline: 0;
}

.site-footer {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 3rem max(1rem, calc((100% - var(--max-width)) / 2));
  overflow: hidden;
  border: 0;
  border-top: 5px solid var(--cor-secundaria);
  background: #102d26;
  color: #f2f7f3;
  box-shadow: none;
}

.footer-grid,
.footer-note {
  position: relative;
  z-index: 1;
}

.footer-grid {
  grid-template-columns: 1.35fr 0.7fr 0.8fr 0.9fr;
}

.site-footer p,
.site-footer .eyebrow {
  color: rgba(242, 247, 243, 0.7);
}

.site-footer a:hover {
  color: #f3a16f;
}

/* Catálogo: filtros em faixa, nunca em barra lateral. */
.catalog-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.catalog-sidebar {
  position: static;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0;
  padding: 1rem 1.2rem;
}

.catalog-filter-head .eyebrow {
  margin: 0;
}

.catalog-filter-head h2 {
  font-size: 1.1rem;
}

.catalog-filter-group {
  flex: 1;
}

.catalog-filter-group h2 {
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}

.catalog-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.catalog-filter-option {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.catalog-results-head {
  margin-top: 0;
}

/* Artigo e Tier Lists. */
.article-list-page {
  gap: 0;
}

.article-list-hero {
  border: 0;
  border-left: 5px solid var(--cor-secundaria);
  background: var(--surface-raised);
  box-shadow: none;
}

.article-list-hero-copy {
  padding: clamp(1.5rem, 4vw, 2.7rem);
}

.article-list-hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1;
}

.article-list-brief {
  border-left-color: var(--line-strong);
  background: var(--surface-muted);
}

.article-list-brief strong {
  font-size: 1.25rem;
}

.article-tierlist-panel {
  gap: 0.75rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.article-tierlist-head p {
  margin-top: 0.25rem;
}

.article-tier-criteria {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding-bottom: 0.35rem;
}

.article-tier-criterion {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
}

.article-tier-criterion span {
  display: none;
}

.article-tier-criterion.is-active {
  border-color: var(--cor-secundaria);
  background: color-mix(in srgb, var(--cor-secundaria) 11%, var(--surface-raised));
  box-shadow: inset 0 -3px 0 var(--cor-secundaria);
}

.article-tier-feedback {
  min-height: 0;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
}

.article-editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.article-affiliate-notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--cor-secundaria) 58%, var(--line-strong));
  border-left: 5px solid var(--cor-secundaria);
  background: color-mix(in srgb, var(--cor-secundaria) 8%, var(--surface-raised));
  color: var(--text-soft);
  font-size: 0.9rem;
}

.article-affiliate-notice strong {
  color: var(--text-strong);
}

.article-tierlist-board {
  border-color: var(--line-strong);
}

.article-tier-row {
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 88px;
}

.article-tier-badge {
  padding: 0.55rem 0.3rem;
}

.article-tier-badge strong {
  font-size: 1.65rem;
}

.article-tier-content {
  padding: 0.35rem;
  overflow-x: auto;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--cor-line) 12%, transparent) 23px 24px),
    var(--surface);
}

.article-tier-items {
  flex-wrap: nowrap;
}

.article-tier-item {
  grid-template-columns: 62px minmax(0, 1fr);
  width: 190px;
  min-width: 190px;
  min-height: 78px;
}

.article-tier-item-media {
  aspect-ratio: auto;
  border-right: 1px solid var(--line-soft);
  border-bottom: 0;
  background: #fff;
}

.article-tier-item-copy {
  align-content: center;
  padding: 0.45rem 0.55rem;
}

.article-tier-item-copy strong {
  font-size: 0.74rem;
  -webkit-line-clamp: 2;
}

.article-tier-item-rank {
  top: 0.2rem;
  left: 0.2rem;
}

/* Comparação contida, com os filtros antes da tabela. */
.comparison-panel {
  position: static;
  left: auto;
  width: auto;
  transform: none;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
}

.comparison-head {
  padding: 0;
}

.comparison-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  border: 0;
  background: transparent;
}

.comparison-filter-panel {
  position: static;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
}

.comparison-filter-panel > summary {
  position: static;
  padding: 0.75rem 0.9rem;
  background: transparent;
}

.comparison-filter-panel > summary::after {
  content: '+';
  margin-left: auto;
  color: var(--cor-secundaria);
  font-size: 1.25rem;
  line-height: 1;
}

.comparison-filter-panel[open] > summary::after {
  content: '−';
}

.comparison-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line-soft);
}

.comparison-search {
  grid-column: span 2;
}

.comparison-control input,
.comparison-control select,
.comparison-clear {
  min-height: 40px;
}

.comparison-results {
  border: 1px solid var(--line-strong);
}

.comparison-scroll-hint {
  display: block;
}

.comparison-table-shell {
  max-height: min(72vh, 720px);
  overscroll-behavior: contain;
}

.comparison-table {
  font-variant-numeric: tabular-nums;
}

.comparison-table th,
.comparison-table td {
  height: 62px;
}

.comparison-table thead th {
  background: var(--cor-primaria);
}

.comparison-image-cell,
.comparison-image-heading {
  width: 68px;
  min-width: 68px;
}

.comparison-product-image {
  border: 0;
}

.comparison-store-links a {
  border-color: color-mix(in srgb, var(--cor-botao) 42%, var(--line-strong));
  background: color-mix(in srgb, var(--cor-botao) 6%, var(--surface-raised));
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .host-tag {
    display: none;
  }

  .article-tier-criteria {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
  }

  .page-shell {
    width: min(var(--max-width), calc(100% - 1rem));
    padding-top: calc(var(--header-height) + 1.2rem);
  }

  .topbar {
    width: max-content;
    min-width: max-content;
    margin-inline: 0.5rem;
    gap: 0.35rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand {
    gap: 0.45rem;
  }

  .brand strong {
    font-size: 1.08rem;
  }

  .brand span,
  .cart-link span {
    display: none;
  }

  .main-nav {
    flex: 0 0 auto;
    overflow: visible;
  }

  .main-nav a {
    padding-inline: 0.42rem;
  }

  .header-tools {
    gap: 0.1rem;
  }

  .cart-link {
    min-height: 36px;
    padding-inline: 0.4rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    padding: 2rem 1.25rem;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .hero-spotlight {
    margin-top: 0;
  }

  .section-head,
  .catalog-results-head {
    align-items: start;
    flex-direction: column;
  }

  .product-grid,
  .section-dual,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-method-grid,
  .home-trust-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-grid:has(> .product-card:only-child) .product-card {
    display: flex;
  }

  .product-grid:has(> .product-card:only-child) .product-card-media {
    height: auto;
    aspect-ratio: 4 / 2.95;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .catalog-sidebar {
    align-items: start;
    flex-direction: column;
  }

  .product-list-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .product-list-side {
    grid-column: 1 / -1;
    justify-items: stretch;
    padding: 0.8rem 0 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .product-list-pricebox {
    display: none;
  }

  .article-list-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-list-brief {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .article-list-brief div {
    padding: 0.75rem;
    border-right: 1px solid var(--line-soft);
    border-bottom: 0;
  }

  .article-list-brief strong {
    font-size: 0.95rem;
  }

  .comparison-panel {
    padding: 0.8rem;
  }

  .comparison-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .comparison-search {
    grid-column: auto;
  }

  .comparison-table-shell {
    max-height: 68vh;
  }

  .comparison-product-heading,
  .comparison-product-cell {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 480px) {
  .hero-copy {
    padding: 1.45rem 1rem 1.15rem;
  }

  .hero-copy p:not(.hero-lead) {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .hero-actions a:last-child {
    grid-column: 1 / -1;
  }

  .article-list-actions {
    display: grid;
  }

  .article-list-actions .button {
    width: 100%;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-spotlight {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.75rem;
    margin: 0 0.55rem 0.55rem;
  }

  .hero-spotlight > .eyebrow,
  .hero-spotlight-footer {
    grid-column: 1 / -1;
  }

  .hero-spotlight-frame {
    min-height: 120px;
    padding: 0.5rem;
  }

  .hero-spotlight-frame img {
    max-width: 100%;
    max-height: 104px;
  }

  .hero-spotlight-copy {
    align-self: center;
  }

  .hero-spotlight-copy strong {
    font-size: 1.1rem;
  }

  .hero-spotlight-copy p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .hero-tags {
    display: none;
  }

  .article-list-brief div {
    padding: 0.6rem 0.45rem;
  }

  .article-tier-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .article-tier-badge span,
  .article-tier-badge small {
    display: none;
  }

  .section-block {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
