:root {
  color-scheme: light;
  --bg-page: #f3f1fa;
  --bg-page-2: #eef8f6;
  --bg-header: rgba(255, 255, 255, 0.88);
  --bg-card: #ffffff;
  --bg-card-top: #ffffff;
  --bg-card-bottom: #faf9ff;
  --bg-subtle: #f7f6fc;
  --bg-input: rgba(255, 255, 255, 0.95);
  --bg-hero: linear-gradient(135deg, #ffffff 0%, #f7f4ff 48%, #f0fdf9 100%);
  --bg-hero-edge: rgba(255, 255, 255, 0.8);
  --footer-bg: rgba(255, 255, 255, 0.65);
  --list-hover-start: #ffffff;
  --list-hover-end: #f8f7ff;
  --border: rgba(99, 102, 124, 0.14);
  --border-strong: rgba(99, 102, 124, 0.22);
  --text: #16151f;
  --text-secondary: #45425a;
  --text-muted: #6c6780;
  --text-soft: #8b87a0;
  --accent: #0d9488;
  --accent-2: #6366f1;
  --accent-hover: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --accent-soft-2: rgba(99, 102, 241, 0.1);
  --accent-heading: #0f766e;
  --icon-fg: #0f766e;
  --focus: #6366f1;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 3px rgba(22, 21, 31, 0.06);
  --shadow-md: 0 8px 30px rgba(22, 21, 31, 0.08);
  --shadow-lg: 0 20px 50px rgba(22, 21, 31, 0.1);
  --shadow-card-hover: 0 12px 40px rgba(99, 102, 241, 0.12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  /* Coluna principal: 80% da viewport, centrada */
  --page-width: 80%;
  --page-pad-x: 0.45rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #121118;
  --bg-page-2: #0f0e14;
  --bg-header: rgba(18, 17, 26, 0.92);
  --bg-card: #1a1924;
  --bg-card-top: #1f1e2a;
  --bg-card-bottom: #1a1924;
  --bg-subtle: #22212e;
  --bg-input: #252432;
  --bg-hero: linear-gradient(135deg, #1a1924 0%, #1e1d2e 48%, #152a26 100%);
  --bg-hero-edge: rgba(40, 38, 55, 0.5);
  --footer-bg: rgba(18, 17, 26, 0.88);
  --list-hover-start: #22212e;
  --list-hover-end: #2a2838;
  --border: rgba(180, 175, 210, 0.12);
  --border-strong: rgba(180, 175, 210, 0.22);
  --text: #f0eef8;
  --text-secondary: #c9c4dc;
  --text-muted: #9b96b0;
  --text-soft: #7a758c;
  --accent: #2dd4bf;
  --accent-2: #a5b4fc;
  --accent-hover: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-soft-2: rgba(165, 180, 252, 0.12);
  --accent-heading: #5eead4;
  --icon-fg: #5eead4;
  --focus: #818cf8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 12px 40px rgba(99, 102, 241, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Carregamento inicial: cobre a viewport até index + link_index + primeira rota + fontes */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-2) 100%);
  transition:
    opacity 0.4s var(--ease),
    visibility 0.4s var(--ease);
  visibility: visible;
  opacity: 1;
}

/* Author .app-loading { display: grid } ganha do [hidden] por defeito — forçar fecho */
.app-loading[hidden] {
  display: none !important;
}

.app-loading--exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
}

.app-loading__logo {
  display: block;
  width: min(140px, 58vw);
  height: auto;
  object-fit: contain;
}

.app-loading .loading-spinner {
  width: 2.85rem;
  height: 2.85rem;
  border-width: 3px;
  border-top-color: #2563eb;
}

[data-theme="dark"] .app-loading .loading-spinner {
  border-top-color: #60a5fa;
}

body.is-app-loading {
  overflow: hidden;
}

body.is-app-loading .skip-link:focus {
  z-index: 10001;
}

@media (prefers-reduced-motion: reduce) {
  .app-loading {
    transition-duration: 0.01ms;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: fixed radial-gradient(1200px 800px at 10% -10%, rgba(99, 102, 241, 0.07), transparent 55%),
    radial-gradient(900px 600px at 100% 20%, rgba(13, 148, 136, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-2) 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
  background: fixed radial-gradient(1200px 800px at 10% -10%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(900px 600px at 100% 20%, rgba(45, 212, 191, 0.07), transparent 50%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-2) 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(22, 21, 31, 0.04);
}

[data-theme="dark"] .site-header {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .card-cat:hover {
  border-color: rgba(165, 180, 252, 0.28);
}

[data-theme="dark"] .list-articles a:hover {
  border-color: rgba(165, 180, 252, 0.32);
}

.theme-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--accent-2);
  background: var(--bg-subtle);
}

.theme-toggle__icon {
  display: block;
}

.theme-toggle__icon--sun {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

/* Botão de tema imediatamente à esquerda da barra de pesquisa */
.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.header-inner {
  width: var(--page-width);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.9rem var(--page-pad-x);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
  color: var(--accent-heading);
}

.brand-mark {
  flex-shrink: 0;
  display: block;
  height: 40px;
  width: auto;
  max-width: min(280px, 58vw);
  object-fit: contain;
}

.search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  position: relative;
  display: block;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#q {
  width: 100%;
  padding: 0.78rem 1.1rem 0.78rem 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
#q::placeholder {
  color: var(--text-muted);
}
#q:hover {
  border-color: var(--border-strong);
}
#q:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft-2);
}

main {
  flex: 1;
  width: var(--page-width);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 2.25rem var(--page-pad-x) 4rem;
  box-sizing: border-box;
}

.hero {
  margin-bottom: 2.75rem;
}

.hero--home {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  padding: 2.25rem 1.75rem 2.5rem;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-hero);
  border: 1px solid var(--bg-hero-edge);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero--home__copy {
  min-width: 0;
}

.hero--home::before,
.hero--home::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero--home::before {
  width: 220px;
  height: 220px;
  background: rgba(99, 102, 241, 0.22);
  top: -80px;
  right: -40px;
}

.hero--home::after {
  width: 180px;
  height: 180px;
  background: rgba(13, 148, 136, 0.2);
  bottom: -60px;
  left: -30px;
}

.hero--home > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--text);
  max-width: 22rem;
}

.hero--home__copy h1 {
  max-width: min(36rem, 100%);
}

.hero-lead,
.hero p.hero-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 500;
}

.hero--home .hero-lead {
  margin-bottom: 0;
}

/* Home: só fluxo normal dentro de main — sem 100vw nem margens negativas */
.home-layout {
  display: block;
}

.home-top {
  margin-bottom: 2.75rem;
}

.home-hero-spotlight {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-sizing: border-box;
}

a.home-hero-spotlight {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.home-hero-spotlight:hover {
  border-color: var(--accent-2);
  box-shadow: var(--shadow-md);
}

a.home-hero-spotlight:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.home-hero-spotlight__eyebrow {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.3;
}

.home-hero-spotlight__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 0;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.home-hero-spotlight__body.is-spotlight-leaving {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

@keyframes home-spotlight-reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero-spotlight__body.is-spotlight-reveal {
  animation: home-spotlight-reveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-spotlight__body {
    transition: none;
  }
  .home-hero-spotlight__body.is-spotlight-leaving {
    opacity: 1;
    transform: none;
  }
  .home-hero-spotlight__body.is-spotlight-reveal {
    animation: none;
  }
}

.home-hero-spotlight__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Mobile: altura estável — o card não “pula” quando o título ocupa 1, 2 ou 3 linhas */
@media (max-width: 767px) {
  .home-hero-spotlight {
    flex: 0 0 auto;
  }

  .home-hero-spotlight__body {
    flex: 0 0 auto;
  }

  .home-hero-spotlight__title {
    -webkit-line-clamp: 3;
    min-height: calc(1.45em * 3);
  }

  .home-hero-spotlight--empty .home-hero-spotlight__empty {
    min-height: calc(1.45em * 3);
  }
}

a.home-hero-spotlight:hover .home-hero-spotlight__title {
  color: var(--accent);
}

.home-hero-spotlight__cat {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
  transition: color 0.15s ease;
}

a.home-hero-spotlight:hover .home-hero-spotlight__cat {
  color: var(--accent-2);
}

.home-hero-spotlight__empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (min-width: 768px) {
  .hero--home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    grid-template-rows: auto;
    align-items: stretch;
    gap: 1.5rem;
  }

  .hero--home__copy {
    grid-column: 1;
  }

  .hero--home .home-hero-spotlight {
    grid-column: 2;
    justify-self: stretch;
    align-self: stretch;
    height: 100%;
  }
}

.home-top .hero {
  margin-bottom: 0;
}

.home-top .hero--home {
  margin-left: 0;
  margin-right: 0;
}

.home-picks-dock {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 248px);
    grid-template-rows: auto auto;
    gap: 1.75rem 1.35rem;
    align-items: start;
  }

  /* Esquerda: hero em cima, “Todas as matérias” em baixo */
  .home-top {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    min-width: 0;
  }

  .home-catalog {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    padding-top: 2rem;
  }

  /* Direita: “PARA VOCÊ” ao lado dos dois blocos da esquerda */
  .home-picks-dock {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    margin: 0;
  }

  /*
   * Na home a coluna do catálogo é mais estreita: não forçar 4 colunas;
   * cards com largura mínima confortável e mais espaço entre eles.
   */
  .home-layout .home-catalog .home-catalog__grid-wrap {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.35rem 1.25rem;
  }

  .home-layout .home-catalog .section-head {
    margin-bottom: 1.65rem;
  }
}

.home-picks-dock__title {
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.35;
  flex-shrink: 0;
}

.home-catalog {
  margin: 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--border);
}

.home-main-picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-main-pick {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  text-align: left;
}

.home-main-pick__subject {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.3;
}

.home-main-pick__subject a {
  color: inherit;
  text-decoration: none;
}
.home-main-pick__subject a:hover {
  text-decoration: underline;
}

.home-main-pick__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-main-pick__title:hover {
  color: var(--accent);
}

.home-main-pick__more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 0.15rem;
}
.home-main-pick__more:hover {
  color: var(--accent-2);
}

.home-main-picks-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}

.hero p:not(.hero-lead):not(.hero-eyebrow) {
  margin: 0;
  max-width: 38rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.section-head {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-head p {
  margin: 0.5rem 0 0;
  max-width: 40rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.5;
}

/* Grelha de matérias na home (barra Exercícios + cards) */
.home-catalog__grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.15rem;
  container-type: inline-size;
  container-name: catgrid;
}

.card-cat {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--bg-card-top) 0%, var(--bg-card-bottom) 100%);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  overflow: hidden;
}

.card-cat__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent-soft-2));
  color: var(--icon-fg);
}

.card-cat__icon svg {
  width: 26px;
  height: 26px;
}

.card-cat__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  text-align: left;
}

.card-cat::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-cat:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
  color: var(--text);
}

.card-cat:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft-2);
}

/* Exercícios: barra horizontal (largura ~3 cards da grelha), acima dos outros */
.card-cat.card-cat--exercicios-bar {
  grid-column: 1 / -1;
  padding: 1.15rem 1.4rem;
  border-radius: var(--radius-lg);
  min-height: 4.25rem;
  background: linear-gradient(
    118deg,
    rgba(13, 148, 136, 0.2) 0%,
    var(--bg-card-top) 38%,
    rgba(99, 102, 241, 0.12) 100%
  );
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: var(--shadow-md);
}

.card-cat.card-cat--exercicios-bar::before {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.card-cat.card-cat--exercicios-bar .card-cat__body {
  flex: 1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.card-cat.card-cat--exercicios-bar .name {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card-cat.card-cat--exercicios-bar .card-cat__hint {
  font-weight: 600;
  color: var(--accent-2);
}

.card-cat.card-cat--exercicios-bar:hover {
  transform: translateY(-2px);
}

@container catgrid (min-width: 720px) {
  .card-cat.card-cat--exercicios-bar {
    grid-column: span 3;
  }
}

/* Sem container queries: aproximar largura da barra em 3 colunas na home em grelha */
@supports not (container-type: inline-size) {
  @media (min-width: 900px) {
    .home-layout .card-cat--exercicios-bar {
      grid-column: span 3;
    }
  }
}

.card-cat .name {
  font-weight: 700;
  margin: 0;
  font-size: 1.06rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.card-cat__hint {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.card-cat .meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.list-articles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-articles li {
  margin: 0;
}

.list-articles__empty {
  list-style: none;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.list-articles__empty .empty-state {
  padding: 2rem 1rem;
}

.list-articles a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.96875rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.list-articles a .list-articles__title {
  flex: 1;
  min-width: 0;
}

.list-articles__sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.list-articles a::after {
  content: "";
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  opacity: 0.4;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

.list-articles a:hover {
  border-color: rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, var(--list-hover-start), var(--list-hover-end));
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
  text-decoration: none;
  color: var(--text);
}

.list-articles a:hover::after {
  opacity: 0.65;
}

.list-articles a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft-2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.toolbar-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.toolbar-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  text-align: right;
  flex: 1;
}

.toolbar-heading--compact {
  max-width: 70%;
}

.toolbar-eyebrow {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.toolbar-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

#app {
  width: 100%;
  max-width: 100%;
}

.page-intro {
  margin: -0.35rem 0 1.35rem;
  max-width: 100%;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.55;
}

.search-query-line {
  margin: -0.25rem 0 1.15rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
}

.search-query-line strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--bg-subtle);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  padding-left: 0.25rem;
}
.btn-ghost:hover {
  background: transparent;
  color: var(--accent-2);
  border-color: transparent;
}

/* Ocupa toda a coluna do main (já ~80% da viewport); antes 58rem cortava a leitura */
.article-view {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.article-view .crumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.article-view .crumbs .crumb-sep {
  margin: 0 0.35rem;
  opacity: 0.45;
}

.article-view .crumbs .crumb-part {
  color: var(--text-muted);
}

.article-view > h1 {
  margin: 0 0 1.35rem;
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.22;
  color: var(--text);
}

.article-host {
  padding: 1.65rem 1.65rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 1.03rem;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
}

.article-host .content-wrapper {
  max-width: 100%;
}

/* Autoria espelhada (Toda Matéria): não exibir nome, cargo nem fotos dos professores */
.article-host .article-header,
.article-host .author-article {
  display: none !important;
}

/* Partilhas sociais + «Como citar?» (Toda Matéria) — reforço se algo escapar ao JS */
.article-host .feedback-wrapper,
.article-host .box-social,
.article-host .sg-social,
.article-host .sg-social-hidden,
.article-host .cite-wrapper,
.article-host #cite-wrapper,
.article-host user-hits {
  display: none !important;
}

/* Widget «Ajudante IA» / corretor Toda Matéria */
.article-host .widget-tpc-corrector-wrapper,
.article-host #tpc-corrector-skeleton,
.article-host tm-tpc-corrector {
  display: none !important;
}

.article-host h2,
.article-host h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--accent-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.article-host h3 {
  font-size: 1.05rem;
}

.article-host p {
  margin: 0.75rem 0;
}

.article-host img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.article-host table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.article-host th,
.article-host td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
}

.hidden-content {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px dashed rgba(13, 148, 136, 0.35);
}

.hidden-content .answer-buttons {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hidden-content .answer-labels {
  display: inline-block;
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-heading);
  margin-bottom: 0.35rem;
}

.hidden-content .answer-contents {
  display: none;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(13, 148, 136, 0.2);
}

.hidden-content .answer-buttons:checked ~ .answer-contents {
  display: block;
}

/* Bootstrap utility ausente no espelho: gabarito de exercícios (multiple-choice) */
.article-host .d-none {
  display: none !important;
}

.article-host .multiple-choice-wrapper {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.article-host .multiple-choice {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.65rem 0;
}

.article-host [data-mc-option] {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.article-host [data-mc-option]:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: var(--shadow-sm);
}

.article-host [data-mc-option].mc-picked {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
}

.article-host [data-mc-option].mc-correct {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.12);
}

.article-host [data-mc-option].mc-wrong {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.article-host [data-mc-option] p {
  margin: 0;
}

.article-host .multiple-choice--validate {
  margin-top: 0.65rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s var(--ease), filter 0.15s var(--ease);
}

.article-host .multiple-choice--validate:hover:not(:disabled) {
  filter: brightness(1.05);
}

.article-host .multiple-choice--validate:disabled,
.article-host .multiple-choice--validate.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.article-host .answer-info {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(13, 148, 136, 0.35);
  background: var(--accent-soft);
  font-size: 0.98rem;
}

.article-host .answer-info.d-none.mc-revealed {
  display: block !important;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 0.96875rem;
  font-weight: 500;
  line-height: 1.55;
}

.loading-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.75rem 0;
  min-height: 5rem;
}

.loading-spinner {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin 0.75s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Rodapé Dicionário Informal (mesmo bloco que /dicionarioinformal) ── */
.site-footer {
  background: #1e1e22;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3rem;
  max-width: 100%;
  overflow-x: clip;
}

.footer-main {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr 1fr auto minmax(12rem, 1.35fr);
  gap: 2rem 2.5rem;
  min-width: 0;
}

.footer-col-spacer {
  height: 1em;
  margin-bottom: 0.85rem;
}

.footer-copyright-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.footer-copyright-line {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.45;
}

.footer-col--copyright .footer-by {
  display: block;
  text-align: right;
}

.footer-col--social {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-col-title--contact {
  width: 100%;
  text-align: center;
  margin: 0 0 0.85rem 0;
}

.footer-social-nav {
  display: grid;
  grid-template-columns: repeat(3, 2.1rem);
  grid-template-rows: repeat(3, 2.1rem);
  gap: 0.32rem 0.45rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin: 0 auto;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: rgba(255, 255, 255, 0.52);
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease;
}
.footer-social-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.footer-social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-di-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-di-logo-img {
  height: 40px;
  width: auto;
  max-width: 58px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.18s ease;
}

.footer-di-nome {
  height: 22px;
  width: auto;
  max-width: min(200px, 40vw);
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.18s ease;
}

.footer-di-brand:hover .footer-di-logo-img,
.footer-di-brand:hover .footer-di-nome {
  opacity: 0.85;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contact-link {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer-contact-link:hover {
  color: #fff;
}

.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 0.85rem 0;
}

.footer-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col-list a,
.footer-link-btn {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  transition: color 0.18s ease;
}
.footer-col-list a:hover,
.footer-link-btn:hover {
  color: #fff;
}
.footer-col-list a[aria-current="page"] {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.footer-by {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer-letters-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col-list.footer-letters-row {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.42rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 3px 4px;
  box-sizing: border-box;
}

.footer-col-list.footer-letters-row > li {
  flex-shrink: 0;
}

.footer-bottom-badges {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.footer-store-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.8;
  transition: opacity 0.18s ease;
}
.footer-store-link:hover {
  opacity: 1;
}

.footer-badge {
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 48px;
  display: block;
  object-fit: contain;
}

.footer-bottom-inner .footer-virtues-link {
  flex-shrink: 0;
}

.footer-virtues-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: opacity 0.18s ease;
}
.footer-virtues-link:hover {
  opacity: 0.85;
  color: #fff;
}

.footer-virtues-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.footer-virtues-text {
  font-family: var(--font);
  letter-spacing: 0.02em;
}

/* Modal Sugestão / Fale conosco (cores fixas, formulário claro) */
.fmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.fmodal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.fmodal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s;
}
.fmodal-overlay.open .fmodal {
  transform: translateY(0) scale(1);
}
.fmodal-header {
  padding: 1.1rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #e2e0d8;
}
.fmodal-tabs {
  display: flex;
  gap: 0;
}
.fmodal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #8a8780;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.fmodal-tab-icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
.fmodal-tab-icon svg {
  display: block;
}
.fmodal-tab.active {
  color: #2853c8;
  border-bottom-color: #2853c8;
}
.fmodal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #8a8780;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  transition: color 0.15s;
  font-family: inherit;
}
.fmodal-close:hover {
  color: #1a1916;
}
.fmodal-body {
  padding: 1.5rem;
}
.fform-group {
  margin-bottom: 1rem;
}
.fform-hint {
  font-size: 0.8rem;
  color: #8a8780;
  margin: 0 0 0.85rem;
  line-height: 1.35;
}
.fform-hint strong {
  color: #4a4840;
  font-weight: 700;
}
.fform-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a4840;
  margin-bottom: 0.4rem;
}
.fform-input,
.fform-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #e2e0d8;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1916;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: #fff;
}
.fform-input:focus,
.fform-textarea:focus {
  border-color: #2853c8;
}
.fform-textarea {
  resize: vertical;
  min-height: 88px;
}
.fform-submit {
  width: 100%;
  padding: 0.78rem;
  background: #2853c8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.25rem;
  font-family: inherit;
}
.fform-submit:hover {
  opacity: 0.88;
}
.fform-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.fmodal-msg {
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}
.fmodal-msg.error {
  background: #fff0f0;
  border: 1.5px solid #ffc5c5;
  color: #b00;
}
.fmodal-success-view {
  text-align: center;
  padding: 2rem 1.5rem;
}
.fmodal-success-icon {
  margin-bottom: 0.75rem;
  line-height: 0;
  color: #1a7a3f;
}
.fmodal-success-icon svg {
  display: block;
  margin: 0 auto;
}
.fmodal-success-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1a1916;
  margin-bottom: 0.4rem;
}
.fmodal-success-desc {
  font-size: 0.85rem;
  color: #8a8780;
}

body {
  display: flex;
  flex-direction: column;
}

@media (max-width: 720px) {
  :root {
    --page-pad-x: 0.65rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--page-pad-x);
    gap: 0.85rem;
  }

  .brand {
    justify-content: center;
    flex: none;
    min-width: 0;
  }

  .header-search {
    margin-left: 0;
    justify-content: stretch;
    width: 100%;
    max-width: none;
    flex: none;
    gap: 0.55rem;
  }

  .theme-toggle {
    flex-shrink: 0;
  }

  .search-wrap {
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  main {
    padding: 1.5rem var(--page-pad-x) 2.5rem;
  }

  .hero--home {
    padding: 1.75rem 1.35rem 2rem;
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--radius);
  }

  .toolbar-heading,
  .toolbar-heading--compact {
    text-align: left;
    width: 100%;
    max-width: none;
    flex: none;
  }

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

  .list-articles a {
    flex-wrap: wrap;
  }

  .list-articles a:hover {
    transform: none;
  }

  .list-articles a::after {
    order: 3;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 2rem 1rem 1.5rem;
    gap: 1.5rem 1rem;
  }
  .footer-brand-col,
  .footer-col--copyright {
    grid-column: 1 / -1;
  }
  .footer-main > .footer-col,
  .footer-main > .footer-brand-col {
    min-width: 0;
  }
  .footer-col--letters {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: left;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  .footer-col--letters .footer-col-title {
    text-align: left;
    width: 100%;
  }
  .footer-col--letters .footer-letters-grid {
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
  }
  .footer-col--letters .footer-col-list.footer-letters-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0.28rem;
    scrollbar-width: thin;
    padding-block: 2px 6px;
    padding-inline: 0 4px;
    box-sizing: border-box;
  }
  .footer-col--social {
    justify-self: end;
    align-items: flex-end;
  }
  .site-footer .footer-col--social .footer-col-title--contact {
    text-align: right;
  }
  .footer-col--social .footer-social-nav {
    margin-left: auto;
    margin-right: 0;
  }
  .footer-copyright-block,
  .footer-col--copyright .footer-by {
    text-align: center;
  }
  .footer-bottom-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }
  .footer-bottom-badges {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-bottom-inner .footer-virtues-link {
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem 0.75rem;
    padding: 1.5rem 1rem 1.75rem;
    align-items: start;
  }
  .footer-col--dic .footer-link-btn,
  .footer-col--dic a,
  .footer-col--legal a,
  .footer-contact-link {
    overflow-wrap: anywhere;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
    max-width: none;
  }
  .footer-col--copyright {
    grid-column: 1 / -1;
  }
  .footer-col--copyright .footer-copyright-block,
  .footer-col--copyright .footer-by {
    text-align: center;
  }
  .footer-bottom-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: 0.55rem 0.4rem;
    padding: 1rem 0.85rem 1.25rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .footer-bottom-badges {
    display: contents;
  }
  .footer-bottom-inner .footer-store-link {
    flex: none;
    min-width: 0;
    justify-content: center;
  }
  .footer-bottom-inner .footer-virtues-link {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    margin: 0;
  }
  .footer-badge {
    max-height: 42px;
    margin: 0 auto;
  }
  .fmodal {
    border-radius: 10px;
  }
  .fmodal-body {
    padding: 1rem;
  }
}
