/* ==========================================================================
   Variáveis de Tema (Claro por padrão, ótimo para leitura e projetor)
   ========================================================================== */
:root {
  --bg: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;

  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;

  --challenge-bg: #ecfdf5;
  --challenge-border: #a7f3d0;
  --challenge-text: #065f46;

  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  --checker-a: #e2e8f0;
  --checker-b: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, SFMono-Regular, monospace;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-muted: #111827;
  --surface: #1e293b;
  --surface-alt: #0f172a;
  --border: #334155;
  --border-strong: #475569;

  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;

  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --accent-border: rgba(96, 165, 250, 0.35);

  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(251, 191, 36, 0.35);
  --warn-text: #fcd34d;

  --challenge-bg: rgba(16, 185, 129, 0.12);
  --challenge-border: rgba(52, 211, 153, 0.35);
  --challenge-text: #6ee7b7;

  --code-bg: #020617;
  --code-text: #e2e8f0;

  --checker-a: #1e293b;
  --checker-b: #0f172a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px -8px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Reset e Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 0.1em 0.38em;
  border-radius: 5px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 600;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  padding: 0.1em 0.42em;
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Botões e Pills
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.pill-neutral {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-badge {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 7px;
  letter-spacing: 0.03em;
}

.brand-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.top-nav a:hover {
  color: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 2.25rem 0 1.5rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero-card h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  margin-bottom: 0.85rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 72ch;
}

.hero-author {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin: -0.25rem 0 1.15rem;
}

.hero-author strong {
  color: var(--text);
}

.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.94rem;
}

.notice-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

.hero-quick-links {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.quick-links-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.6rem;
}

.quick-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-chip span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
}

.quick-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Seções Gerais (Diretrizes e Avaliação)
   ========================================================================== */
.section {
  padding: 2.5rem 0;
}

.section-muted {
  background: var(--bg-muted);
  border-block: 1px solid var(--border);
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.section-header p {
  color: var(--text-muted);
  max-width: 68ch;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.pillar-step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}

.pillar-card h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.pillar-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.projection-guide {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.projection-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.projection-guide-header h3 {
  font-size: 1.05rem;
  margin: 0;
}

.projection-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.65rem 1.25rem;
  padding-left: 1.15rem;
}

.projection-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.projection-list li strong {
  color: var(--text);
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}

.rubric-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
}

.rubric-item h3 {
  font-size: 1rem;
  color: var(--accent);
}

.rubric-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Filtros e Lista dos 8 Temas
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.48rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

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

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  scroll-margin-top: 84px;
}

.topic-card[hidden] {
  display: none;
}

.topic-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.topic-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.topic-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.topic-title-group h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.prop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.prop-tags code {
  font-size: 0.76rem;
}

.topic-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topic-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.95fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

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

.topic-summary {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.15rem;
}

.scope-block h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.scope-block ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}

.scope-block li {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.scope-block li strong {
  color: var(--text);
}

.callout {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  border: 1px solid transparent;
}

.callout-warning {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.callout-challenge {
  background: var(--challenge-bg);
  border-color: var(--challenge-border);
  color: var(--challenge-text);
}

.squad-checklist {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.checklist-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
}

.squad-checklist label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.squad-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ==========================================================================
   Playgrounds Interativos
   ========================================================================== */
.playground {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-self: start;
  min-width: 0;
  max-width: 100%;
}

.playground-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.playground-hint {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.playground-stage {
  min-height: 175px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}

.stage-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
}

.playground-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.83rem;
}

.control-row label {
  color: var(--text-muted);
  font-weight: 500;
}

.control-row select,
.control-row input[type="range"] {
  accent-color: var(--accent);
  max-width: 100%;
  min-width: 0;
}

.control-row select {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.control-row input[type="range"] {
  width: 135px;
  cursor: pointer;
}

.code-snippet {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font-size: 0.78rem;
  overflow-x: auto;
  border: 1px solid var(--border);
}

.code-snippet code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* --- Demo 1 Transition --- */
.demo-transition-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #2563eb;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.demo-transition-btn:hover,
.demo-transition-btn.is-active {
  background-color: #0d9488;
  transform: translateY(-6px) scale(1.06);
}

/* --- Demo 2 Animations --- */
.demo-anim-box {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
}

.anim-pulse {
  animation: pulseDemo 1.4s ease-in-out infinite alternate;
}

.anim-float {
  animation: floatDemo 1.8s ease-in-out infinite alternate;
}

.anim-spin {
  animation: spinDemo 2.2s linear infinite;
}

.demo-anim-box.is-paused {
  animation-play-state: paused;
}

@keyframes pulseDemo {
  from {
    transform: scale(0.95);
    opacity: 0.75;
  }
  to {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes floatDemo {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(-12px);
  }
}

@keyframes spinDemo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- Demo 3 Rotate --- */
.demo-rotate-box {
  position: relative;
  width: 92px;
  height: 62px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transform: rotate(25deg);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.pivot-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* --- Demo 4 Scale --- */
.neighbor-box {
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.65rem 0.55rem;
  border-radius: 8px;
}

.demo-scale-box {
  background: #0d9488;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 0.95rem;
  border-radius: 8px;
  transform: scale(1.2);
  transition: transform 0.15s ease;
}

/* --- Demo 5 Translate --- */
.translate-ghost {
  width: 104px;
  height: 52px;
  border: 2px dashed var(--border-strong);
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.demo-translate-box {
  width: 100%;
  height: 100%;
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transform: translate(16px, -10px);
  transition: transform 0.12s ease;
}

/* --- Demo 6 Gradiente --- */
.demo-gradient-box {
  width: 100%;
  height: 108px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  background-image: linear-gradient(135deg, #2563eb, #06b6d4);
}

/* --- Demo 7 Opacity --- */
.opacity-stage {
  background-color: var(--checker-b);
  background-image:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.opacity-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}

.opacity-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
}

.mini-label {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.demo-opacity-card {
  width: 100%;
  padding: 0.9rem 0.5rem;
  border-radius: 8px;
  text-align: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

#demo-opacity-all {
  background-color: rgb(37, 99, 235);
  opacity: 0.45;
}

#demo-opacity-bg {
  background-color: rgb(37 99 235 / 0.45);
}

/* --- Demo 8 Border-radius --- */
.demo-radius-box {
  width: 168px;
  height: 84px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border-radius: 20px;
  transition: border-radius 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.demo-radius-box.is-square {
  width: 96px;
  height: 96px;
}

/* ==========================================================================
   Footer & Toast
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0;
  max-width: 68ch;
}

.footer .footer-author {
  color: var(--text);
  margin-top: 0.35rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--code-bg);
  color: #ffffff;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 860px) {
  .topic-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  .topic-card-header {
    padding: 1rem;
  }

  .topic-body {
    padding: 1rem;
  }

  .opacity-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Acessibilidade: Redução de Movimento
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .quick-chip,
  .filter-btn {
    transition: none;
  }
}

/* ==========================================================================
   Impressão / PDF
   ========================================================================== */
@media print {
  .topbar,
  .filter-bar,
  .filter-status,
  .topic-header-actions,
  .playground-controls,
  .hero-quick-links,
  .footer button,
  .toast {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .topic-card,
  .hero-card,
  .pillar-card,
  .projection-guide,
  .rubric-item {
    box-shadow: none;
    break-inside: avoid;
  }
}
