/* ============================================================================
   I_DEAL · DESIGN SYSTEM — COMPONENTS
   Biblioteca de componentes "Aurora sobre o Escuro" (BG §10).
   Depende de tokens.css, base.css, motion.css.
   ============================================================================ */

/* ==========================================================================
   1. GLASS — vidro translúcido (BG §10.4)
   Bordas assimétricas (top/left mais claras) = luz vinda do alto.
   ========================================================================== */
.glass {
  position: relative;
  /* overflow:hidden é OBRIGATÓRIO junto de backdrop-filter + border-radius:
     sem ele, o vidro fosco vaza num retângulo atrás dos cantos arredondados. */
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(165deg, var(--glass-bg-hi) 0%, var(--glass-bg) 46%, transparent 100%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-br);
  border-top-color: var(--glass-br-top);
  border-left-color: var(--glass-br-top);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), inset 0 0 40px rgba(244,232,210,.02);
}

/* ==========================================================================
   2. CARD — card de vidro com shimmer + lift no hover
   ========================================================================== */
.card {
  position: relative;
  padding: var(--sp-8);
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(165deg, var(--glass-bg-hi) 0%, var(--glass-bg) 46%, transparent 100%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-br);
  border-top-color: var(--glass-br-top);
  border-left-color: var(--glass-br-top);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-snappy),
              border-color var(--dur-base) var(--ease-snappy),
              box-shadow var(--dur-base) var(--ease-snappy),
              background var(--dur-base) var(--ease-snappy);
}
/* glow blob de canto — intensifica no hover */
.card::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,99,155,.30) 0%, transparent 70%);
  opacity: .6; transition: opacity var(--dur-base) var(--ease-soft);
  pointer-events: none;
}
/* shimmer — faixa de luz que varre no hover */
.card > .shimmer {
  content: ""; position: absolute; top: 0; left: 0; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(244,232,210,.10), transparent);
  transform: translateX(-120%) skewX(-12deg);
  pointer-events: none; z-index: 2;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-br-top);
  box-shadow: var(--shadow-card), var(--shadow-glow-primary);
}
.card:hover::after { opacity: 1; }
.card:hover > .shimmer { animation: shimmer .9s var(--ease-soft); }
.card.accent::after { background: radial-gradient(circle, rgba(242,162,61,.30) 0%, transparent 70%); }
.card.accent:hover { box-shadow: var(--shadow-card), var(--shadow-glow-accent); }

.card .card-lbl {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3);
}
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--text-body); font-weight: 300; position: relative; z-index: 1; }

/* card com inclinação 3D (tilt via JS aplica --rx/--ry) */
.card.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .18s var(--ease-soft), box-shadow var(--dur-base) var(--ease-snappy);
}

/* ==========================================================================
   3. ÍCONE-CONTAINER — tile de ícone (line-art I_DEAL)
   ========================================================================== */
.icon-tile {
  width: 52px; height: 52px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--glass-bg-hi), transparent);
  border: 1px solid var(--glass-br);
  color: var(--data);
  box-shadow: inset 0 0 20px rgba(244,232,210,.03);
  transition: transform var(--dur-base) var(--ease-snappy), color var(--dur-base) var(--ease-soft);
}
.icon-tile svg { width: 24px; height: 24px; }
.card:hover .icon-tile { transform: scale(1.08); }
.icon-tile.accent { color: var(--accent); }
.icon-tile.lg { width: 64px; height: 64px; border-radius: var(--r-lg); }
.icon-tile.lg svg { width: 30px; height: 30px; }

/* ícone solto: herda currentColor, stroke fino (BG §10.8) */
.icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 40px; height: 40px; }

/* ==========================================================================
   4. BOTÕES (BG §9.1)
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--f-body); font-weight: 600; font-size: 15px;
  padding: 14px 28px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: all var(--dur-fast) var(--ease-snappy);
  text-decoration: none; white-space: nowrap;
}
/* CTA primário = Ouro fill, texto Obsidiana; hover → Vermelho Aurora */
.btn-cta {
  background: var(--accent); color: var(--cta-text);
  box-shadow: var(--shadow-glow-accent);
}
.btn-cta:hover { background: var(--cta-hover); color: #fff; transform: translateY(-2px);
  box-shadow: 0 0 44px rgba(229,64,44,.35); }
/* primário institucional = Azul Aurora */
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow-primary); }
/* secundário = vidro */
.btn-ghost {
  background: var(--glass-bg); border-color: var(--glass-br); color: var(--text-strong);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--glass-bg-hi); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 17px 36px; font-size: 17px; }

/* ==========================================================================
   5. BADGES / PILLS / CHIPS
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-xs);
  background: var(--glass-bg); border: 1px solid var(--glass-br); color: var(--text-mute);
}
.badge.accent { color: var(--accent); border-color: rgba(242,162,61,.30); background: rgba(242,162,61,.10); }
.badge.primary { color: var(--data); border-color: rgba(46,99,155,.35); background: rgba(46,99,155,.12); }
.badge.solid { background: var(--accent); color: var(--cta-text); border-color: transparent; font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--f-mono); font-size: 12.5px;
  padding: 8px 15px; border-radius: var(--r-pill);
  background: var(--glass-bg); border: 1px solid var(--glass-br); color: var(--text-body);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-snappy);
}
.pill:hover { border-color: var(--accent); color: var(--text-strong); }
.pill.is-active { background: var(--glass-bg-hi); color: var(--text-strong); border-color: var(--glass-br-top);
  box-shadow: inset 0 1px 0 var(--glass-br-top); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); }

/* status dot pulsante */
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  background: var(--ideal-green-dark); box-shadow: 0 0 10px rgba(76,192,164,.8);
  animation: breathe 2.4s var(--ease-soft) infinite; }

/* ==========================================================================
   6. NAV / TABS
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--sp-8);
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hair);
}
.nav .mark { font-family: var(--f-mono); font-weight: 700; font-size: 17px;
  letter-spacing: .02em; color: var(--text-strong); }
.nav .mark b { color: var(--accent); }
.nav-links { display: flex; gap: var(--sp-2); align-items: center; }

.tabbar {
  display: inline-flex; gap: 4px; padding: 5px;
  background: var(--glass-bg); border: 1px solid var(--glass-br);
  border-radius: var(--r-pill); backdrop-filter: blur(12px);
}
.tab {
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em;
  padding: 8px 18px; border-radius: var(--r-pill); border: none; cursor: pointer;
  background: transparent; color: var(--text-mute);
  transition: all var(--dur-fast) var(--ease-snappy);
}
.tab:hover { color: var(--text-strong); background: var(--glass-bg); }
.tab.is-active { color: var(--text-strong); background: var(--glass-bg-hi);
  box-shadow: inset 0 1px 0 var(--glass-br-top); }

/* toggle de tema */
.toggle {
  font-family: var(--f-mono); font-size: 12.5px; cursor: pointer;
  background: var(--glass-bg); border: 1px solid var(--glass-br); color: var(--text-strong);
  padding: 8px 15px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: var(--sp-2);
  transition: all var(--dur-fast) var(--ease-snappy);
}
.toggle:hover { border-color: var(--accent); }

/* switch (pill toggle) */
.switch { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill);
  background: var(--glass-bg); border: 1px solid var(--glass-br); }
.switch button { border: none; background: transparent; cursor: pointer;
  font-family: var(--f-mono); font-size: 12px; padding: 7px 16px; border-radius: var(--r-pill);
  color: var(--text-mute); transition: all var(--dur-fast) var(--ease-snappy); }
.switch button.is-active { background: var(--accent); color: var(--cta-text); font-weight: 600; }

/* ==========================================================================
   7. INPUTS (floating label + search com glow)
   ========================================================================== */
.field { position: relative; margin-top: 10px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--glass-br); padding: 11px 2px;
  color: var(--text-strong); font-family: var(--f-body); font-size: 15px; outline: none;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.field label {
  position: absolute; left: 2px; top: 11px; color: var(--text-mute);
  pointer-events: none; font-size: 15px;
  transition: all var(--dur-fast) var(--ease-soft);
}
.field input:focus { border-bottom-color: var(--accent); }
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label {
  top: -13px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  font-family: var(--f-mono); color: var(--accent);
}
/* search com glow */
.search { position: relative; }
.search .glow {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: radial-gradient(circle at 18% 50%, rgba(242,162,61,.22), transparent 60%);
  filter: blur(14px); opacity: 0; transition: opacity var(--dur-base) var(--ease-soft);
  pointer-events: none;
}
.search:focus-within .glow { opacity: 1; }
.search .box {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  background: color-mix(in srgb, var(--bg-1) 50%, transparent);
  border: 1px solid var(--glass-br); border-radius: var(--r-pill);
  padding: 11px 16px; transition: border-color var(--dur-fast) var(--ease-soft);
}
.search:focus-within .box { border-color: var(--accent); }
.search input { flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-strong); font-family: var(--f-body); font-size: 14px; }
.search input::placeholder { color: var(--text-mute); }
.search .kbd { font-family: var(--f-mono); font-size: 11px; color: var(--text-mute);
  padding: 2px 7px; border-radius: var(--r-xs); border: 1px solid var(--glass-br); background: var(--glass-bg); }
.search .icon { color: var(--text-mute); }

/* ==========================================================================
   8. SISTEMA DE SCORES — 5 faixas (BG §6.10). Cor de score ≠ cor de marca.
   ========================================================================== */
.score-bar { display: flex; flex-direction: column; gap: 6px; }
.score-bar .head { display: flex; justify-content: space-between; align-items: baseline; }
.score-bar .name { font-size: 13px; color: var(--text-body); }
.score-bar .val { font-family: var(--f-mono); font-weight: 700; font-size: 16px; color: var(--text-strong);
  font-variant-numeric: tabular-nums; }
.score-bar .track { height: 10px; border-radius: var(--r-pill); background: var(--glass-bg);
  border: 1px solid var(--hair); overflow: hidden; position: relative; }
.score-bar .fill { height: 100%; border-radius: var(--r-pill);
  width: 0; transition: width 1.1s var(--ease-out-expo);
  box-shadow: 0 0 14px currentColor; }
/* faixas — aplicar a classe band-N no .fill (e .val) */
.band-0 { color: var(--score-0); background: var(--score-0); }
.band-1 { color: var(--score-1); background: var(--score-1); }
.band-2 { color: var(--score-2); background: var(--score-2); }
.band-3 { color: var(--score-3); background: var(--score-3); }
.band-4 { color: var(--score-4); background: var(--score-4); }
/* o .fill é background-color; o .val deve receber a cor via .txt-band-N */
.txt-band-0 { color: var(--score-0); }  .txt-band-1 { color: var(--score-1); }
.txt-band-2 { color: var(--score-2); }  .txt-band-3 { color: var(--score-3); }
.txt-band-4 { color: var(--score-4); }

/* gauge circular de score */
.gauge { position: relative; width: 132px; height: 132px; }
.gauge svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.gauge .bg { fill: none; stroke: var(--glass-br); stroke-width: 8; }
.gauge .arc { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease-out-expo); filter: drop-shadow(0 0 8px currentColor); }
.gauge .center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.gauge .center .n { font-family: var(--f-mono); font-weight: 700; font-size: 34px;
  color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1; }
.gauge .center .u { font-family: var(--f-mono); font-size: 12px; color: var(--text-mute); }

/* legenda semântica de faixas (obrigatória — BG §6.10) */
.score-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.score-legend .lg { display: flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-mute); }
.score-legend .sw { width: 14px; height: 14px; border-radius: 4px; }

/* ==========================================================================
   9. IDP — Índice de Desenvolvimento Pessoal (BG §6.11)
   ========================================================================== */
.idp { display: grid; gap: 4px; }
.idp .row { display: flex; align-items: center; gap: var(--sp-3); padding: 9px 0;
  border-bottom: 1px solid var(--hair); }
.idp .row:last-child { border-bottom: none; }
.idp .swatch { width: 16px; height: 16px; border-radius: 5px; flex-shrink: 0; }
.idp .label { font-family: var(--f-display); font-weight: 500; font-size: 16px; color: var(--text-strong); }
.idp .range { font-family: var(--f-mono); font-size: 11.5px; color: var(--text-mute); margin-left: auto; }

/* ==========================================================================
   10. STAT CARD — número grande de dado (JetBrains Mono)
   ========================================================================== */
.stat { position: relative; overflow: hidden; }
.stat .n { font-family: var(--f-mono); font-weight: 700; font-size: var(--t-score);
  color: var(--text-strong); letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums; transition: color var(--dur-base) var(--ease-soft); }
.stat .n small { font-size: .5em; color: var(--text-mute); margin-left: 4px; font-weight: 500; }
.stat:hover .n { color: var(--accent); }
.stat .cap { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

/* ==========================================================================
   11. AURORA PANEL — superfície com aurora líquida embutida (BG §10.2)
   ========================================================================== */
.aurora-panel { position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--glass-br); min-height: 200px; }
.aurora-panel .blob { position: absolute; border-radius: 50%; filter: blur(56px); opacity: .85; }
.aurora-panel .grain-layer { position: absolute; inset: 0; opacity: .07;
  mix-blend-mode: overlay; background-image: var(--grain-svg); pointer-events: none; }
.aurora-panel .content { position: relative; z-index: 3; padding: var(--sp-8); }

/* ==========================================================================
   12. CÓDIGO / TERMINAL — superfície técnica (não é vidro)
   ========================================================================== */
.terminal { background: #0B0D14; border: 1px solid var(--glass-br); border-radius: var(--r-lg);
  padding: var(--sp-6); position: relative; overflow: hidden; }
.terminal .dots { display: flex; gap: 7px; margin-bottom: var(--sp-4); }
.terminal .dots i { width: 11px; height: 11px; border-radius: 50%; }
.terminal .dots i:nth-child(1){ background: rgba(229,64,44,.6); }
.terminal .dots i:nth-child(2){ background: rgba(242,162,61,.6); }
.terminal .dots i:nth-child(3){ background: rgba(76,192,164,.6); }
.terminal pre { font-family: var(--f-mono); font-size: 12.5px; color: var(--text-body);
  line-height: 1.7; white-space: pre-wrap; }
.terminal .k { color: var(--data); }     /* keyword/azul   */
.terminal .a { color: var(--accent); }    /* âmbar          */
.terminal .g { color: var(--ideal-green-dark); } /* verde    */
.terminal .m { color: var(--text-mute); } /* comentário     */
.terminal .glow { position: absolute; bottom: -40px; right: -40px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(46,99,155,.2), transparent 70%); pointer-events: none; }

/* ==========================================================================
   13. ARQUÉTIPO CARD — 12 do Cluster A, display names B2C (BG §6.12)
   ========================================================================== */
.arch { position: relative; padding: var(--sp-5); border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-bg); border: 1px solid var(--glass-br);
  transition: transform var(--dur-base) var(--ease-snappy), border-color var(--dur-base) var(--ease-snappy); }
.arch:hover { transform: translateY(-4px); border-color: var(--energy, var(--accent)); }
.arch .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--energy, var(--accent)); }
.arch .code { font-family: var(--f-mono); font-size: 11px; color: var(--text-mute); }
.arch .nm { font-family: var(--f-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .03em; font-size: 19px; color: var(--text-strong); margin: 4px 0 6px; }
.arch .fam { font-family: var(--f-mono); font-size: 11px; color: var(--energy, var(--accent)); letter-spacing: .06em; }
/* famílias de energia (BG §6.12) */
.energy-vision { --energy: var(--ideal-red); }       /* Visão & Criação      */
.energy-lead   { --energy: var(--ideal-amber); }     /* Liderança & Resultado*/
.energy-analise{ --energy: var(--ideal-cobalt-500); }/* Análise & Domínio    */
.energy-relacao{ --energy: var(--ideal-cobalt-300); }/* Relação & Cuidado    */

/* ==========================================================================
   14. AVATAR, PROGRESS, TOOLTIP, DIVIDER, TABLE
   ========================================================================== */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-family: var(--f-mono); font-weight: 700;
  color: var(--cta-text); background: var(--grad-calor); border: 1px solid var(--glass-br-top); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -12px; border: 2px solid var(--bg-0); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.progress { height: 6px; border-radius: var(--r-pill); background: var(--glass-bg);
  border: 1px solid var(--hair); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--grad-calor); transition: width 1.1s var(--ease-out-expo); }

.tooltip { position: relative; display: inline-flex; cursor: help; }
.tooltip .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg-2); color: var(--text-strong); border: 1px solid var(--glass-br);
  border-radius: var(--r-sm); padding: 8px 12px; font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: all var(--dur-fast) var(--ease-soft);
  box-shadow: var(--shadow-card); z-index: 50; }
.tooltip:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

.divider { height: 1px; background: var(--hair); border: none; margin: var(--sp-8) 0; }
.divider.dashed { background: none; }
.divider.dashed::after { content: ""; display: block; height: 1px;
  background-image: linear-gradient(90deg, var(--line) 0 5px, transparent 5px 12px); background-size: 12px 1px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mute); text-align: left; padding: 10px 14px; font-weight: 500; }
.table td { padding: 12px 14px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--text-body); }
.table tr:hover td { background: var(--glass-bg); }

/* ==========================================================================
   15. DS SHOWCASE — utilitários da página de documentação
   ========================================================================== */
.spec-row { display: flex; align-items: center; gap: var(--sp-6); padding: 22px 0;
  border-bottom: 1px solid var(--hair); }
.spec-name { font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-mute); width: 130px; flex-shrink: 0; }
.spec-sample { flex: 1; }
.spec-meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-mute);
  text-align: right; flex-shrink: 0; max-width: 240px; }
.section-tag {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--glass-bg); border: 1px solid var(--glass-br); margin-bottom: var(--sp-4);
}
.swatch { border-radius: var(--r-md); height: 84px; border: 1px solid var(--hair);
  position: relative; overflow: hidden; }
.swatch .grain-layer { position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: var(--grain-svg); }
.swatch-name { font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-body); margin-top: 8px; }
.swatch-hex { font-family: var(--f-mono); font-size: 12px; color: var(--text-mute); }
.swatch-use { font-family: var(--f-mono); font-size: 10px; color: var(--text-mute); margin-top: 2px; opacity: .8; }
.caption-mono { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-mute);
  letter-spacing: .04em; margin-top: 10px; }

/* esconde o conteúdo "live" usado só como amostra de motion replay */
.demo-stage { display: grid; place-items: center; min-height: 180px; }

/* ==========================================================================
   16. LOGOTIPO (BG §8)
   Versão clara (branco) sobre fundos escuros; versão escura (preto) sobre
   fundos claros. .logo-swap troca a arte conforme o tema da página.
   ========================================================================== */
.logo-art-light, .logo-art-dark { display: block; height: auto; max-width: 100%; }
.logo-swap .logo-art-dark { display: none; }                 /* default dark */
html[data-theme="light"] .logo-swap .logo-art-light { display: none; }
html[data-theme="light"] .logo-swap .logo-art-dark  { display: block; }

/* superfície de demonstração de regra — fundo FIXO (independe do tema) */
.logo-surface {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
  border-radius: var(--r-lg); border: 1px solid var(--glass-br);
  padding: 38px 28px; min-height: 172px; position: relative; overflow: hidden;
}
.logo-surface .grain-layer { position: absolute; inset: 0; opacity: .07;
  mix-blend-mode: overlay; background-image: var(--grain-svg); pointer-events: none; }
.logo-surface.bg-dark  { background: #0B1B40; }
.logo-surface.bg-light { background: #F4E8D2; }
.logo-surface.bg-obsidian { background: #0A0A12; }
/* gradiente Primeira Luz: dark no topo → claro embaixo. O logo BRANCO (§8.2)
   é ancorado na região ESCURA do topo, onde tem contraste — como numa capa
   de relatório. Centralizar cairia na faixa clara e perderia legibilidade. */
.logo-surface.bg-grad  { background: var(--grad-primeira-luz); align-items: flex-start; padding-top: 24px; }
.logo-surface.bg-grad img { height: 72px !important; }
.logo-surface .tag {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}
.logo-surface.bg-light .tag { color: rgba(11,27,64,.55); }
.logo-surface:not(.bg-light) .tag { color: rgba(244,232,210,.7); }

/* zona de proteção — clear-space = altura do "I" */
.logo-protect { position: relative; display: inline-flex; padding: 34px; }
.logo-protect::before { content: ""; position: absolute; inset: 6px;
  border: 1px dashed var(--line); border-radius: var(--r-sm); }
.logo-protect::after { content: "= altura do « I »"; position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%); font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em;
  color: var(--accent); background: var(--bg-1); padding: 0 8px; }

/* "nunca faça" */
.dont { position: relative; }
.dont .x { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(229,64,44,.14); border: 1px solid rgba(229,64,44,.5); color: var(--ideal-red); }
.dont .x svg { width: 15px; height: 15px; }
.dont .demo { display: flex; align-items: center; justify-content: center; min-height: 96px; opacity: .9; }

/* ==========================================================================
   17. CONSTELAÇÃO — "Aurora aplicada" (BG §10: aurora líquida + vidro + medição)
   O padrão-assinatura: nós de vidro (insights) flutuando sobre a aurora,
   costurados por linhas pontilhadas de medição que mostram RELAÇÕES.
   Posicionamento por âncoras nomeadas (sem números mágicos); as linhas são
   desenhadas dinamicamente por ds.js entre as bordas dos nós.
   ========================================================================== */
.constelacao {
  position: relative; border-radius: var(--r-2xl);
  /* overflow:hidden NÃO clipa filhos compositados (os blobs têm filter:blur,
     que os promove a camada de GPU e escapa do clip arredondado — "sobra"
     quadrada nos cantos). clip-path é um clip geométrico que clipa TUDO,
     inclusive camadas compositadas. Mantemos overflow:hidden como reforço. */
  overflow: hidden;
  clip-path: inset(0 round var(--r-2xl));
  border: 1px solid var(--glass-br); min-height: 480px; background: var(--ideal-night-950);
  /* a aurora é SEMPRE escura no fundo, mesmo em light mode (peça de marca) */
  color: var(--ideal-light-100);
}
/* aurora líquida — ordem narrativa fixa: Cobalto → Âmbar (foco) → Vermelho */
.const-aurora { position: absolute; inset: 0; }
.const-aurora .blob { position: absolute; border-radius: 50%; filter: blur(66px); }
.const-aurora .b-cobalt { width: 44%; aspect-ratio: 1; background: #2E639B; top: -16%; left: -8%;
  opacity: .85; animation: drift 18s var(--ease-soft) infinite alternate; }
.const-aurora .b-amber  { width: 26%; aspect-ratio: 1; background: #F2A23D; top: 34%; left: 40%;
  opacity: .80; animation: drift 24s var(--ease-soft) infinite alternate; animation-delay: -8s; }
.const-aurora .b-red    { width: 42%; aspect-ratio: 1; background: #E5402C; bottom: -18%; right: -6%;
  opacity: .70; animation: drift 28s var(--ease-soft) infinite alternate; animation-delay: -14s; }
.const-grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: var(--grain-svg); pointer-events: none; }

/* camada de conectores (atrás dos nós) — preenchida por ds.js */
.const-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.const-links line { stroke: rgba(244,232,210,.6); stroke-width: 1; stroke-dasharray: 2 5; stroke-linecap: round; }
.const-links .flow { animation: dashflow 1.6s linear infinite; }
.const-links circle { fill: rgba(244,232,210,.75); }
@keyframes dashflow { to { stroke-dashoffset: -14; } }

/* anel de medição decorativo (canto) */
.const-ring { position: absolute; z-index: 1; opacity: .45; pointer-events: none; }
.const-ring circle { fill: none; stroke: rgba(244,232,210,.55); stroke-width: 1; }
.const-ring .dot { stroke-dasharray: 1.5 7; stroke-linecap: round; }
.const-ring.tr { right: 7%; top: 12%; }
.const-ring.bl { left: 7%; bottom: 12%; }

/* nós (cards de insight de vidro) */
.const-node { position: absolute; z-index: 2; width: min(300px, 44%); }
.const-node.at-tl { left: 5%;  top: 12%; }
.const-node.at-tr { right: 5%; top: 12%; }
.const-node.at-bl { left: 5%;  bottom: 12%; }
.const-node.at-br { right: 5%; bottom: 12%; }
.const-node.at-l  { left: 5%;  top: 50%; transform: translateY(-50%); }
.const-node.at-r  { right: 5%; top: 50%; transform: translateY(-50%); }
.const-node.at-c  { left: 50%; top: 50%; transform: translate(-50%,-50%); }

/* card de insight — o conteúdo de um nó */
.insight { padding: 20px 22px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: rgba(244,232,210,.06); backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid rgba(244,232,210,.14); border-top-color: rgba(244,232,210,.22); border-left-color: rgba(244,232,210,.22);
  box-shadow: 0 18px 50px -16px rgba(0,0,0,.6); }
.insight .lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(244,232,210,.7); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.insight .ttl { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em;
  font-weight: 400; font-size: 23px; line-height: 1.08; color: #F4E8D2; }
.insight hr { border: none; height: 1px; background: rgba(244,232,210,.15); margin: 14px 0; }
.insight .data { font-family: var(--f-mono); font-size: 11.5px; color: rgba(244,232,210,.65); line-height: 1.7; }
.insight .data b { color: #F4E8D2; font-weight: 500; }
.insight .drow { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0; }
.insight .drow span { flex: 1; }
.insight .drow b { white-space: nowrap; }
.insight .big { font-family: var(--f-mono); font-weight: 700; font-size: 40px; color: #F4E8D2; line-height: 1;
  font-variant-numeric: tabular-nums; }
.insight .big small { font-size: .45em; color: rgba(244,232,210,.5); }
.insight .minibar { display: flex; height: 6px; border-radius: var(--r-pill); overflow: hidden; margin-top: 12px; }
.insight .minibar i { display: block; }
.const-cap { position: absolute; left: 5%; bottom: 5%; z-index: 2;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: rgba(244,232,210,.5); }

@media (max-width: 640px) {
  .constelacao { min-height: 560px; }
  .const-node { width: min(260px, 70%); }
}
