/**
 * REDOR.BLOG PUBLIC EXPERIENCE DESIGN SYSTEM — V1
 * Coerente com a arquitetura visual do Redor.app.
 * Fundo branco, tipografia Manrope, cinzas neutros, vermelho institucional pontual.
 * Zero números fictícios, acessibilidade nativa, mobile-first e alta performance.
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-hover: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #090d16;
  --text-muted: #475569;
  --text-light: #64748b;
  --red-brand: #e43138;
  --red-soft: #fff1f2;
  --red-border: #fecdd3;
  --red-gradient: linear-gradient(115deg, #b80b25 0%, #e61b35 55%, #c70e2c 100%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 30px -4px rgba(9, 13, 22, 0.05);
  --shadow-hover: 0 14px 34px -4px rgba(9, 13, 22, 0.09);
  --max-w: 1180px;
  --reading-w: 740px;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--max-w));
  margin: 0 auto;
}

.reading-container {
  width: min(100%, var(--reading-w));
  margin: 0 auto;
}

/* ==========================================================================
   LUCIDE ICONS
   ========================================================================== */
.r-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.r-icon--sm {
  width: 16px;
  height: 16px;
}

.r-icon--md {
  width: 20px;
  height: 20px;
}

.r-icon--lg {
  width: 24px;
  height: 24px;
}

.r-icon--xl {
  width: 32px;
  height: 32px;
}

/* ==========================================================================
   EYEBROWS & BADGES
   ========================================================================== */
.monochrome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0 0 3px 0;
  border-bottom: 2px solid var(--red-brand);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.badge-neutral {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.badge-brand {
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: #b80b25;
}

.badge-illustrative {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}

/* ==========================================================================
   BUTTONS (NUNCA FUNDO PRETO, COM ELEVAÇÃO)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red-gradient);
  border: 1px solid #b80b25;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(199, 14, 44, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(199, 14, 44, 0.32);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 12.5px;
}

.btn-lg {
  min-height: 50px;
  padding: 14px 28px;
  font-size: 15px;
}

.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--red-brand);
  outline-offset: 3px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.brand-wrap img {
  width: 105px;
  height: auto;
  max-height: 32px;
  object-fit: contain;
}

.brand-mark {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.02em;
  margin-top: 5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red-brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-redor {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-header-redor:hover {
  border-color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  padding: 24px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  z-index: 99;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.mobile-nav-link {
  font-size: 16px;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs-bar {
  padding: 14px 0;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
  color: var(--text-light);
}

.breadcrumbs-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs-list a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.breadcrumbs-list a:hover {
  color: var(--red-brand);
  text-decoration: underline;
}

.breadcrumbs-list [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   HERO EDITORIAL (HOME)
   ========================================================================== */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 64px;
}

.hero-copy h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 18px 0 20px;
}

.hero-copy p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  transition: box-shadow 0.2s ease;
}

.hero-panel:hover {
  box-shadow: var(--shadow-hover);
}

.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-light);
  text-transform: uppercase;
}

.hero-panel-quote {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 24px 0;
}

.hero-panel-quote em {
  color: var(--red-brand);
  font-style: normal;
}

.hero-panel-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.panel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-brand);
}

/* ==========================================================================
   SECTIONS & SECTION HEADERS
   ========================================================================== */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section-subtle {
  background: var(--surface-subtle);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-header-centered {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-top: 10px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 540px;
  margin-top: 8px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--red-brand);
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   CATEGORY GRID & CARDS
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.category-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.category-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red-brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.category-card-content {
  flex: 1 1 auto;
}

.category-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Category Filter Bar (Directory & Archive) */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--text);
  color: var(--text);
}

.filter-chip.active {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

/* ==========================================================================
   ARTICLE CARDS & GRID
   ========================================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
}

.article-card-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-light);
}

.article-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red-brand);
  font-weight: 700;
  font-size: 12px;
}

.article-card-action::after {
  content: "→";
  transition: transform 0.15s ease;
}

.article-card:hover .article-card-action::after {
  transform: translateX(4px);
}

/* ==========================================================================
   TERRITORIAL PROFILE & CARDS
   ========================================================================== */
.territory-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.territory-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.territory-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 12px;
}

.territory-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.sources-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 20px;
  font-size: 12px;
}

.sources-box-header {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sources-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sources-box li a {
  color: var(--red-brand);
  text-decoration: underline;
}

.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.neighborhood-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-subtle);
}

.neighborhood-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.neighborhood-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   UNIVERSAL ARTICLE VIEW & EDITORIAL TYPOGRAPHY
   ========================================================================== */
.article-header-wrap {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.article-header {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.article-header .monochrome-eyebrow {
  margin: 0 auto 16px;
}

.article-title {
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 18px;
}

.article-dek {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Article Layout: Body + Sidebar */
.article-main-layout {
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: flex-start;
}

.article-content {
  min-width: 0;
}

.prose {
  font-size: 16.5px;
  line-height: 1.8;
  color: #1e293b;
}

.prose p {
  margin-bottom: 24px;
}

.prose h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin: 48px 0 16px;
  padding-top: 16px;
  scroll-margin-top: 84px;
}

.prose h3 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
  margin: 32px 0 14px;
  scroll-margin-top: 84px;
}

.prose ul, .prose ol {
  margin: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose li {
  line-height: 1.7;
}

.prose strong {
  font-weight: 700;
  color: var(--text);
}

.prose a {
  color: var(--red-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  border-left: 3px solid var(--red-brand);
  background: var(--surface-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose tr:last-child td {
  border-bottom: none;
}

/* Table of Contents (TOC) */
.toc-card {
  position: sticky;
  top: 88px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-subtle);
}

.toc-title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.toc-list a {
  color: var(--text-muted);
  line-height: 1.4;
  transition: color 0.15s ease;
  display: block;
}

.toc-list a:hover {
  color: var(--red-brand);
}

.toc-level-3 {
  padding-left: 14px;
  font-size: 12px;
}

/* Step-by-Step Tutorial Component */
.tutorial-section {
  margin: 56px 0 40px;
  padding: 36px 32px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.tutorial-header {
  margin-bottom: 28px;
}

.tutorial-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
}

.tutorial-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tutorial-step-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  gap: 18px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red-brand);
  font-size: 15px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-body h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.step-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* FAQ Component */
.faq-section {
  margin: 48px 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.faq-summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  font-size: 18px;
  color: var(--text-light);
  font-weight: 400;
}

.faq-item[open] .faq-summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Sources & References Box */
.references-section {
  margin: 48px 0;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.references-section h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.references-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.references-list li {
  line-height: 1.5;
  color: var(--text-muted);
}

.references-list a {
  color: var(--red-brand);
  text-decoration: underline;
  font-weight: 600;
}

/* ==========================================================================
   SHOWCASE / VITRINE & CONVERSION CTAs
   ========================================================================== */
.showcase-block {
  margin: 48px 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.showcase-headline {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.showcase-subhead {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 680px;
  margin-bottom: 24px;
}

.contextual-cta-card {
  margin: 48px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-subtle);
}

.cta-card-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.cta-card-content p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 580px;
}

/* ==========================================================================
   DIRECTORY & SEARCH BAR
   ========================================================================== */
.search-form-wrap {
  margin-bottom: 28px;
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 640px;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}

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

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--red-brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(228, 49, 56, 0.15);
}

.search-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination-wrap {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s ease;
}

.pagination-item:hover {
  border-color: var(--text);
}

.pagination-item.active {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.pagination-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ==========================================================================
   EMPTY & ERROR STATES
   ========================================================================== */
.empty-state-box {
  padding: 64px 24px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  max-width: 640px;
  margin: 32px auto;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red-brand);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.empty-state-box h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.empty-state-box p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

/* ==========================================================================
   INSTITUTIONAL PAGES
   ========================================================================== */
.institutional-hero {
  padding: 56px 0 36px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}

.institutional-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 12px 0 16px;
}

.institutional-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
}

.institutional-body {
  padding: 56px 0 72px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-col p {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-links-list a:hover {
  color: var(--red-brand);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-light);
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVIDADE E MOBILE-FIRST)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-main-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .toc-card {
    position: static;
    margin-bottom: 32px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .contextual-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 48px 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form .btn {
    width: 100%;
  }

  .tutorial-step-card {
    flex-direction: column;
    gap: 12px;
  }
}

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