/* ============================================================
   RESET & TOKENS  -  "Parecer" : dossiê fiscal boutique
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* paper & ink */
  --paper:       #f4f1ea;
  --surface:     #fffdf9;
  --surface-2:   #faf7f0;
  --ink:         #1b1a16;
  --ink-soft:    #403d36;
  --muted:       #756f64;
  --subtle:      #9c958a;
  --line:        #e6e0d4;
  --line-strong: #d6cfbf;

  /* deep emerald accent */
  --accent:      #14463b;
  --accent-2:    #1d5e4d;
  --accent-soft: #edf2ef;
  --accent-line: #c8d9d0;

  /* heraldic semantics: green / wine / gold */
  --pos:   #1d6b4f; --pos-bg: #eef4f0; --pos-line: #cfe0d6;
  --neg:   #8a2b2b; --neg-bg: #f6ebeb; --neg-line: #e2c8c8;
  --opp:   #9c7a2b; --opp-bg: #f7f0db; --opp-line: #e7d6a8;

  /* gold accent */
  --gold:      #a9842f;
  --gold-2:    #c2a14e;
  --gold-soft: #f4eeda;
  --gold-line: #e6d9b0;

  --radius:    6px;
  --radius-sm: 4px;
  --shadow:    0 1px 2px rgba(27,26,22,.04);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink-soft);
  min-height: 100vh;
  line-height: 1.6;
  border-top: 3px solid var(--gold);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ============================================================
   HERO  -  letterhead, light
   ============================================================ */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 3rem 1.5rem 2.25rem;
  margin-bottom: 2.5rem;
}

.hero-inner {
  max-width: 940px;
  margin: 0 auto;
}

.hero h1, .hero-text h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -.015em;
  line-height: 1.08;
  position: relative;
  padding-top: 1.15rem;
}
.hero h1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  width: 38px;
  height: 2px;
  background: var(--gold);
}

.hero .subtitle, .hero-text .subtitle {
  color: var(--muted);
  font-size: .95rem;
  margin-top: .6rem;
  max-width: 52ch;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  padding: 1.75rem;
}

.search-card h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1.15rem;
  letter-spacing: -.01em;
}

/* ============================================================
   FORM
   ============================================================ */
.form-row {
  display: flex;
  gap: .85rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.input-wrapper { flex: 1; min-width: 200px; }

.input-wrapper label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

input[type="text"] {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-family: var(--mono);
  color: var(--ink);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  letter-spacing: .04em;
}
input[type="text"]::placeholder { color: var(--subtle); }
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

#btn-analisar {
  padding: .82rem 1.7rem;
  background: var(--accent);
  color: #f4f1ea;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  transition: background .15s, transform .12s;
  letter-spacing: .01em;
}
#btn-analisar:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
#btn-analisar:active:not(:disabled) { transform: translateY(1px); }
#btn-analisar:disabled { opacity: .55; cursor: not-allowed; }

.error {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--neg);
  font-size: .85rem;
  margin-top: .75rem;
  padding: .6rem .9rem;
  background: var(--neg-bg);
  border: 1px solid var(--neg-line);
  border-radius: var(--radius-sm);
}
.error::before { content: '!'; font-weight: 700; flex-shrink: 0; }

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(244,241,234,.35);
  border-top-color: #f4f1ea;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-card { animation: slideDown .25s ease; }
.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .65rem;
}
.progress-stage {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
.progress-pct {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--ink-soft, #403d36);
  transition: width .4s ease;
}
.progress-hint {
  margin: .7rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

/* ============================================================
   TRIBUNAL FILTER  -  light & refined
   ============================================================ */
.filter-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.filter-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--ink);
  transition: background .12s;
  gap: 1rem;
}
.filter-toggle:hover { background: var(--surface-2); }

.filter-toggle-left {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
}
.filter-toggle-left svg { color: var(--accent); }

.filter-toggle-right {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.filter-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: .22rem .65rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  white-space: nowrap;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: all .15s;
}
.filter-badge.partial { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
.filter-badge.warn    { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-line); }

.filter-arrow {
  color: var(--subtle);
  display: flex;
  align-items: center;
  transition: transform .22s ease;
}

/* Panel (light) */
.filter-panel {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 1.35rem 1.5rem 1.5rem;
  animation: slideDown .2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-global-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.chip-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  font-size: .73rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .13s;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
  letter-spacing: .02em;
}
.chip-action:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-action.ghost { color: var(--muted); }
.chip-action.ghost:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-soft); }

/* Grupo */
.filter-grupo {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.filter-grupo.last { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.filter-grupo-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

.grupo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.grupo-dot.tj  { background: #3f5c8a; }
.grupo-dot.trf { background: #3f6f5a; }
.grupo-dot.sup { background: #9a4a44; }
.grupo-dot.trt { background: #5f5080; }

.grupo-nome {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  flex: 1;
}
.grupo-nome em { font-style: normal; color: var(--subtle); }

.grupo-count {
  font-size: .68rem;
  font-weight: 500;
  color: var(--subtle);
  font-family: var(--mono);
}

.grupo-btn {
  font-size: .66rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: .14rem .5rem;
  cursor: pointer;
  transition: all .12s;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.grupo-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.grupo-btn.muted { color: var(--subtle); }
.grupo-btn.muted:hover { color: var(--ink-soft); border-color: var(--line-strong); }

/* Chip cluster */
.chip-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .32rem .64rem;
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all .14s ease;
  border: 1px dashed var(--line-strong);
  color: var(--subtle);
  background: transparent;
  letter-spacing: .03em;
}
.chip:hover { border-color: var(--muted); color: var(--ink-soft); }

/* Active = selected: white card + green check in the corner */
.chip.active {
  background: var(--surface);
  border-style: solid;
  border-color: var(--accent);
  color: var(--ink);
}
.chip.active:hover { border-color: var(--accent-2); }
.chip.active::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/8px 8px no-repeat;
  border: 1.5px solid var(--surface);
}

/* ============================================================
   RESULTS
   ============================================================ */
#resultado { animation: fadeUp .3s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.result-header h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.015em;
}

.cnpj-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: .18rem .55rem;
  border-radius: var(--radius-sm);
  margin-top: .5rem;
  letter-spacing: .04em;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.15rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .13s;
  white-space: nowrap;
}
.btn-pdf:hover:not(:disabled) { background: var(--accent); color: #f4f1ea; border-color: var(--accent); }
.btn-pdf:disabled { opacity: .55; cursor: not-allowed; }

/* Stats */
.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stat-box {
  flex: 1;
  min-width: 120px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  text-align: left;
}
.stat-box.green { border-top-color: var(--pos); }
.stat-box.red   { border-top-color: var(--neg); }
.stat-box.oportunidade { border-top-color: var(--opp); }

.stat-number {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-box.green .stat-number { color: var(--pos); }
.stat-box.red .stat-number   { color: var(--neg); }
.stat-box.oportunidade .stat-number { color: var(--opp); }

.stat-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: .55rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Tela de aceite — pesquisa gratuita */
.gratuito-card { max-width: 480px; margin: 2.5rem auto; text-align: center; }
.gratuito-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #eaf4ef;
  border: 1px solid #7fbfa0;
  color: #1a6040;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .28rem .75rem;
  border-radius: 99px;
  margin-bottom: 1.1rem;
}
.gratuito-badge svg { flex-shrink: 0; }
.gratuito-titulo { font-family: var(--serif); font-size: 1.75rem; margin: 0 0 .35rem; }
.gratuito-sub { color: var(--muted); font-size: .92rem; margin: 0 0 1.5rem; }
.gratuito-lista {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.gratuito-lista li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.5;
}
.gratuito-lista li::before {
  content: "✓";
  color: #2d8f63;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Banner — pesquisa gratuita */
.banner-gratuito {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.1rem 1.35rem;
  background: #eaf4ef;
  border: 1px solid #7fbfa0;
  border-left: 3px solid #2d8f63;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}
.banner-gratuito-body {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  color: #1a4030;
}
.banner-gratuito-body svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2d8f63;
}
.banner-gratuito-body strong {
  display: block;
  font-size: .95rem;
  margin-bottom: .2rem;
  color: #14372a;
}
.banner-gratuito-body p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.55;
  color: #2d5444;
}
.banner-gratuito .btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .banner-gratuito { flex-direction: column; align-items: flex-start; }
  .banner-gratuito .btn-primary { width: 100%; text-align: center; }
}

/* Banner */
.banner-aviso {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1rem 1.15rem;
  background: var(--opp-bg);
  border: 1px solid var(--opp-line);
  border-left: 2px solid var(--opp);
  border-radius: var(--radius-sm);
  margin-bottom: 1.35rem;
  font-size: .88rem;
  color: #6b541f;
  line-height: 1.55;
}
.banner-icon { color: var(--opp); flex-shrink: 0; display: flex; padding-top: 2px; }

/* Tables */
.table-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .8rem;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--surface); }

thead th {
  background: var(--surface-2);
  color: var(--muted);
  padding: .8rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}

tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--accent-soft); }

td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-soft);
}
tbody tr:last-child td { border-bottom: none; }
.td-date { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.td-motivo { font-size: .82rem; color: var(--text-soft, #5a6472); line-height: 1.45; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .25rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 1px solid;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-yes { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-line); }
.badge-no  { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-line); }
.badge-oportunidade { background: var(--opp-bg); color: var(--opp); border-color: var(--opp-line); }

/* Detalhe da tese (explicação do cruzamento) */
.tese-detalhe {
  margin-top: .35rem;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--text-soft, #5a6472);
}
.proc-tese {
  margin-top: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent, #14463b);
}

/* Seção de processos incompatíveis (⚠️) */
.incompat-pill {
  display: inline-block;
  margin-left: .4rem;
  font-size: .78rem;
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: var(--opp-bg, #fdf6e3);
  color: var(--opp, #8a6d00);
  border: 1px solid var(--opp-line, #e6d59a);
}
.incompat-nota {
  margin: -.2rem 0 1rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text-soft, #5a6472);
}

/* Situação badge */
.situacao-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.situacao-badge.sit-andamento { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.situacao-badge.sit-aguard    { background: var(--opp-bg); color: var(--opp); border-color: var(--opp-line); }
.situacao-badge.sit-sentenca  { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-line); }

/* Document link */
.link-doc {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--accent);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  padding: .22rem .55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: transparent;
  transition: all .12s;
  white-space: nowrap;
}
.link-doc:hover { background: var(--accent); color: #f4f1ea; border-color: var(--accent); }

code {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink);
  background: var(--surface-2);
  padding: .12rem .4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .9rem;
  letter-spacing: -.01em;
}

/* Resumo neutro / notas de seção */
.resumo-nota {
  margin: -.4rem 0 0;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text-soft, #5a6472);
}
.card-nota {
  margin: -.2rem 0 1.1rem;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--text-soft, #5a6472);
}
.card-nota strong { color: var(--ink); font-weight: 600; }

/* Pílula de contagem (neutra) */
.count-pill {
  display: inline-block;
  margin-left: .45rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  vertical-align: middle;
}

/* Painéis-resumo expansíveis (em litígio / oportunidades / não relacionados) */
.painel-group {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.5rem;
}
.painel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.painel.is-aderente { border-left: 2px solid var(--accent); }
.painel-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background .12s;
}
.painel-head:hover { background: var(--accent-soft); }
.painel-titulo {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  flex-wrap: wrap;
}
.painel-num {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.painel-rotulo {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.painel-arrow { display: flex; color: var(--muted); transition: transform .15s; flex-shrink: 0; }
.painel-body {
  padding: 1.1rem 1.25rem 1.3rem;
  border-top: 1px solid var(--line);
}
.painel-vazio {
  font-size: .85rem;
  color: var(--muted);
  margin: .2rem 0 0;
}

/* Bloco: já em litígio */
.litigio-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: .75rem;
}
.litigio-item:last-child { margin-bottom: 0; }
.litigio-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.litigio-tese { font-weight: 600; color: var(--ink); font-size: .95rem; }
.familia-tag {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .15rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.litigio-detalhe {
  margin-top: .45rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--text-soft, #5a6472);
}
.litigio-procs { margin-top: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.litigio-proc { font-size: .82rem; color: var(--ink-soft); }
.link-doc-inline {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: .78rem;
}
.link-doc-inline:hover { text-decoration: underline; }

/* Oportunidades por família (accordions) */
.familia {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  overflow: hidden;
  background: var(--surface);
}
.familia:last-child { margin-bottom: 0; }
.familia.is-aderente { border-left: 2px solid var(--accent); }
.familia-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.1rem;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background .12s;
}
.familia-head:hover { background: var(--accent-soft); }
.familia-nome {
  font-weight: 600;
  color: var(--ink);
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.aderencia-selo {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: .12rem .45rem;
  border-radius: 999px;
}
.familia-meta { display: flex; align-items: center; gap: .7rem; }
.familia-count {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}
.familia-arrow { display: flex; color: var(--muted); transition: transform .15s; }
.familia-body { padding: .5rem 1.1rem 1rem; }
.familia-teses { list-style: none; margin: 0; padding: 0; }
.familia-teses li {
  padding: .5rem 0 .5rem 1.1rem;
  position: relative;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.familia-teses li:last-child { border-bottom: none; }
.familia-teses li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .95rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 2.25rem 1.25rem 1.75rem; }
  .hero h1, .hero-text h1 { font-size: 2rem; }
  .result-header { flex-direction: column; }
  .btn-pdf { width: 100%; justify-content: center; }
  .stat-box { min-width: 100px; padding: 1rem; }
  .stats-row { gap: .65rem; }
  .stat-number { font-size: 1.75rem; }
}

/* ── Link de demonstração ─────────────────────────────── */
.demo-link-wrap { margin: 12px 0 0; text-align: center; }
.demo-link-wrap a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-line);
  padding-bottom: 1px;
  transition: color .15s ease;
}
.demo-link-wrap a:hover { color: var(--accent); }

/* ===========================================================================
   Shell: navegação, flash, botões, e telas de funil/admin (go-live)
   =========================================================================== */

.topnav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 1.5rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--gold);
}
.topnav .brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.08rem;
  color: var(--accent); text-decoration: none; letter-spacing: .01em;
}
.topnav-links { display: flex; align-items: center; gap: 1.1rem; }
.topnav-links a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.topnav-links a:hover { color: var(--accent); }
.nav-user { color: var(--muted); font-size: .88rem; }
.nav-btn {
  background: var(--accent); color: #fff !important; padding: .42rem .9rem;
  border-radius: var(--radius-sm); font-size: .88rem;
}
.nav-btn:hover { background: var(--accent-2); }
.nav-btn-ghost {
  border: 1px solid var(--line-strong); padding: .4rem .85rem;
  border-radius: var(--radius-sm); font-size: .88rem; color: var(--ink-soft) !important;
}
.nav-btn-ghost:hover { border-color: var(--accent); color: var(--accent) !important; }

/* Flash messages */
.flash {
  margin: 1rem 0; padding: .8rem 1rem; border-radius: var(--radius);
  font-size: .92rem; border: 1px solid var(--line-strong); background: var(--surface-2);
}
.flash-erro { background: var(--neg-bg); border-color: var(--neg-line); color: var(--neg); }
.flash-sucesso { background: var(--pos-bg); border-color: var(--pos-line); color: var(--pos); }
.flash-info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: .7rem 1.3rem; border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: .95rem; font-weight: 600; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-primary.full { width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  border: 1px solid var(--line-strong); padding: .65rem 1.2rem;
  border-radius: var(--radius-sm); font-family: var(--sans);
  font-size: .92rem; font-weight: 500; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.small { padding: .38rem .8rem; font-size: .84rem; }

/* Generic text */
.muted-text { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.muted-text.small, .small { font-size: .82rem; }
.lead { font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); }
.text-center  { text-align: center; }
.text-justify { text-align: justify; }
/* Landing */
.hero-landing { text-align: center; padding: 3rem 1rem 1rem; }
.hero-landing h1 { font-family: var(--sans); font-size: 2.2rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; color: var(--accent); margin: .3rem 0 .8rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }
.hero-disclosure { font-size: .75rem; color: var(--muted); margin-top: 1.4rem; max-width: 520px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 2rem 0; }
.step { padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-bottom: .6rem;
}

/* Auth & forms */
.auth-card { max-width: 440px; margin: 2.5rem auto; }
.auth-card h2 { font-family: var(--serif); color: var(--accent); margin-bottom: 1.2rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-stack label { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; font-weight: 500; color: var(--ink-soft); }
.form-stack input, .form-stack select {
  padding: .65rem .8rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-family: var(--sans); font-size: .95rem;
  background: var(--surface); color: var(--ink);
}
.form-stack input:focus, .form-stack select:focus { outline: none; border-color: var(--accent); }
.auth-alt { text-align: center; margin-top: 1.1rem; font-size: .9rem; color: var(--muted); }
.auth-alt a { color: var(--accent); }

/* Comprar */
.buy-card { max-width: 480px; margin: 2.5rem auto; text-align: center; }
.price { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); margin: .4rem 0; }
.price-unit { color: var(--muted); font-size: .95rem; }
.buy-list { list-style: none; padding: 0; margin: 1.4rem 0; text-align: left; display: flex; flex-direction: column; gap: .6rem; }
.buy-list li { padding-left: 1.5rem; position: relative; color: var(--ink-soft); font-size: .92rem; }
.buy-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Confirmação de consulta */
.confirm-card { max-width: 520px; margin: 2.5rem auto; text-align: center; }
.confirm-card h2 { font-family: var(--serif); color: var(--accent); margin: 1rem 0 .6rem; }
.confirm-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.confirm-meta { display: flex; gap: 2rem; justify-content: center; margin: 1.4rem 0; }
.confirm-meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--subtle); }
.confirm-meta dd { font-size: .95rem; color: var(--ink); margin: .2rem 0 0; }

/* Page head & listas */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.4rem 0; }
.page-head h2 { font-family: var(--serif); color: var(--accent); margin: 0; }
.back-link { font-size: .85rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.empty-state { text-align: center; color: var(--muted); }
.empty-state p { margin-bottom: 1rem; }

.consulta-list { display: flex; flex-direction: column; gap: .8rem; }
.consulta-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consulta-main { display: flex; flex-direction: column; gap: .25rem; }
.consulta-id { font-weight: 600; color: var(--ink); }
.consulta-cnpj { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.consulta-status-wrap { display: flex; align-items: center; gap: .7rem; }

/* Tags de status */
.tag {
  display: inline-block; padding: .28rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-soft);
}
.tag-ok { background: var(--pos-bg); border-color: var(--pos-line); color: var(--pos); }
.tag-warn { background: var(--opp-bg); border-color: var(--opp-line); color: var(--opp); }
.tag-gratuito { background: #eaf4ef; border-color: #7fbfa0; color: #1a6040; }
.tag-progress { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; font-size: .84rem; table-layout: auto; min-width: 820px; }
.admin-table th {
  text-align: left; padding: .5rem .55rem; font-size: .69rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--subtle); border-bottom: 1px solid var(--line-strong);
  white-space: normal; word-break: break-word;
}
.admin-table td { padding: .55rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .col-id     { min-width: 36px;  width: 36px; }
.admin-table .col-cliente { min-width: 160px; }
.admin-table .col-cnpj   { min-width: 130px; white-space: nowrap; }
.admin-table .col-razao  { min-width: 140px; }
.admin-table .col-pag    { min-width: 90px; }
.admin-table .col-data   { min-width: 75px; }
.admin-table .col-status { min-width: 100px; }
.admin-table .col-custo  { min-width: 70px; }
.admin-table .col-acao   { min-width: 150px; white-space: nowrap; }
.admin-email { display: block; font-size: .76rem; color: var(--muted); }

/* Admin order meta */
.admin-order-meta .meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem;
}
.meta-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--subtle); margin-bottom: .25rem; }
.meta-value { font-size: .95rem; color: var(--ink); }

.form-row-admin { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1rem; }
.result-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* Modal de confirmação */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(27,26,22,.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 1.5rem 1rem; overflow-y: auto;
}
.modal-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.8rem;
  max-width: 480px; width: 100%; border-top: 3px solid var(--gold);
  box-shadow: 0 10px 40px rgba(27,26,22,.18);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-card h3 { font-family: var(--serif); color: var(--accent); margin: 0 0 .8rem; }
#confirm-text { color: var(--ink-soft); line-height: 1.6; font-size: .95rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.5rem; }

/* ============================================================
   Rodapé de suporte (todas as telas)
   ============================================================ */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.footer-brand {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
}
.footer-contatos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.1rem;
  font-size: .85rem;
  color: var(--muted);
}
.footer-suporte {
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
}
.footer-contatos a { color: var(--muted); text-decoration: none; }
.footer-contatos a:hover { color: var(--accent); text-decoration: underline; }

/* dica de campo (ex.: regras de senha) */
.field-hint {
  margin: -.4rem 0 .2rem;
  font-size: .78rem;
  color: var(--muted);
}

/* ============================================================
   Modal de confirmação - tabela de capas selecionáveis (admin)
   ============================================================ */
.modal-card.modal-wide { max-width: 760px; width: 100%; }
#confirm-capas { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.capas-resumo { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.capas-tabela-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.capas-tabela { width: 100%; border-collapse: collapse; font-size: .85rem; }
.capas-tabela th, .capas-tabela td {
  padding: .55rem .65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.capas-tabela thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.capas-tabela tbody tr:last-child td { border-bottom: none; }
.capas-tabela td code { font-size: .8rem; color: var(--ink); }
.capas-tabela .col-check { width: 38px; text-align: center; }
.capas-tabela input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.capas-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; margin: .6rem 0; flex-wrap: wrap;
}
.capas-toolbar .link-acao {
  background: none; border: none; color: var(--accent);
  font: inherit; font-size: .82rem; cursor: pointer; padding: 0; text-decoration: underline;
}
.capas-contador { font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.capas-vazio { color: var(--muted); font-size: .9rem; padding: 1rem; text-align: center; }

/* ── Multi-seleção (regime / segmento) no form da consulta ─────────────── */
.opt-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem .9rem 1rem;
  margin: 0;
}
.opt-fieldset legend {
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0 .4rem;
}
.opt-hint {
  font-size: .76rem;
  color: var(--muted);
  margin: 0 0 .6rem;
}
.opt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.opt-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .36rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all .14s ease;
}
.opt-chip:hover { border-color: var(--muted); }
.opt-chip input { accent-color: var(--accent); margin: 0; cursor: pointer; }
.opt-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

/* ── Painel read-only de parâmetros travados (admin) ────────── */
.params-lock { border: 1px solid var(--line); }
.params-lock-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .25rem;
}
.params-lock-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}
.params-lock .lock-icon { display: inline-flex; color: var(--muted); }
.params-lock .lock-tag {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .5rem;
}
.params-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 1.2rem;
  margin-top: .7rem;
}
.params-grid .param-wide { grid-column: 1 / -1; }
.param-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--subtle); margin-bottom: .25rem; }
.param-value { font-size: .95rem; color: var(--ink); }
@media (max-width: 560px) { .params-grid { grid-template-columns: 1fr; } }

/* ── Grupos de tribunais no formulário do cliente ──────────── */
.trib-grupo { margin-bottom: .85rem; }
.trib-grupo:last-child { margin-bottom: 0; }
.trib-grupo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .45rem;
}
.trib-grupo-nome { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }

/* ── Consentimento (checkboxes de aceite) ─────────────────── */
.consent-group {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1.25rem 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--accent-soft, #f5f2eb);
  border: 1px solid var(--accent-line, #d6cfbf);
  border-radius: 8px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink-soft, #403d36);
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent, #14463b);
  cursor: pointer;
}
.consent-label a { color: var(--accent, #14463b); text-decoration: underline; }
.consent-label span { text-align: left; flex: 1; }
.consent-label--destaque { font-size: .88rem; }

/* ── Páginas legais (termos / privacidade) ────────────────── */
.legal-card { max-width: 720px; margin: 2rem auto; }

.legal-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.legal-header h1 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -.015em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.legal-empresa {
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-soft);
  margin-bottom: .3rem;
}
.legal-vigencia {
  font-size: .82rem;
  color: var(--muted);
}

.legal-body { margin-top: 1.25rem; }
.legal-body p, .legal-body ol { margin-bottom: 1rem; }
.legal-body ol { padding-left: 1.4rem; }
.legal-body li { margin-bottom: .4rem; line-height: 1.6; }

.legal-section { margin-bottom: 2rem; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .65rem;
  letter-spacing: -.01em;
}
.legal-section p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.legal-section p a { color: var(--accent); text-decoration: none; }
.legal-section p a:hover { text-decoration: underline; }

.legal-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
}
.legal-footer a { color: var(--accent); text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }

/* ── Rodapé - links legais ────────────────────────────────── */
.footer-legal {
  display: flex;
  gap: 1.2rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: .8rem;
  color: var(--muted, #888);
  text-decoration: none;
}
.footer-legal a:hover { text-decoration: underline; }

/* ── Consumo Judit ────────────────────────────────────────── */
.consumo-filtro { padding: 1rem 1.25rem; }
.consumo-form-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.consumo-form-row label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 500;
}
.consumo-form-row input[type="date"] {
  padding: .4rem .6rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  font-size: .9rem;
}
.consumo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.consumo-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.consumo-card-total {
  border-color: var(--accent, #14463b);
}
.consumo-card-label {
  font-size: .78rem;
  color: var(--muted, #888);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.consumo-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text, #111);
  line-height: 1.2;
}
.consumo-card-sub {
  font-size: .75rem;
  color: var(--muted, #888);
}
.consumo-nota {
  font-size: .8rem;
  color: var(--muted, #888);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.mono-sm { font-family: monospace; font-size: .82rem; }
.nowrap { white-space: nowrap; }
.custo-col { font-variant-numeric: tabular-nums; }


/* ── Banner de cookies ───────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  color: #e8e8e8;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
  font-size: .875rem;
  line-height: 1.5;
}
#cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}
#cookie-banner a {
  color: #a8d4c8;
  text-decoration: underline;
}
#cookie-banner-btn {
  background: #14463b;
  color: #fff;
  border: none;
  padding: .5rem 1.4rem;
  border-radius: 5px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
#cookie-banner-btn:hover {
  background: #1b5c4e;
}

/* ── Tela de resultado do cliente ────────────────────────── */
.resultado-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.resultado-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.resultado-titulo {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .2rem;
}
.resultado-subtitulo {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}
.resultado-card {
  margin-bottom: 1.25rem;
}
.resultado-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.resultado-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.resultado-dl dt {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .18rem;
}
.resultado-dl dd {
  font-size: .95rem;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}
.resultado-litigio-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.resultado-litigio-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem 1rem;
  background: var(--surface-2, #f9f9f7);
}
.resultado-litigio-tese {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  margin-bottom: .55rem;
}
.resultado-processo-row {
  margin-bottom: .45rem;
}
.resultado-cnj {
  font-family: monospace;
  font-size: .88rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.resultado-tribunal {
  font-size: .83rem;
}
.resultado-detalhe {
  font-size: .88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: .35rem 0 0 0;
  padding-left: .75rem;
  border-left: 2px solid var(--line-strong);
  line-height: 1.55;
}
.resultado-vazio {
  color: var(--muted);
  font-size: .95rem;
  text-align: center;
  padding: 1.5rem 0;
}
.resultado-footer {
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1.5rem;
}

/* ── Resultado v2: KPIs ─────────────────────────────────────────────── */
.resultado-kpis {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.resultado-kpi {
  flex: 1 1 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .9rem .5rem .7rem;
  background: var(--surface-2, #f9f9f7);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}
.kpi-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.kpi-lbl {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .3rem;
}
.kpi-fav .kpi-num { color: #14703a; }
.kpi-sub .kpi-num { color: #7a5c00; }
.kpi-desf .kpi-num { color: #8b3030; }

/* ── Resultado v2: sumário de seção ────────────────────────────────── */
.resultado-sec-note {
  font-size: .88rem;
  color: var(--muted);
  margin: -.3rem 0 1rem;
  line-height: 1.5;
}
.sec-count {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: .35rem;
}
.resultado-section-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .35rem;
  user-select: none;
}
.resultado-section-summary::-webkit-details-marker { display: none; }
.resultado-section-summary::before {
  content: "▸";
  font-size: .8rem;
  color: var(--muted);
  transition: transform .18s;
  flex-shrink: 0;
}
details[open] > .resultado-section-summary::before { transform: rotate(90deg); }

/* ── Resultado v2: cards de tese ────────────────────────────────────── */
.tese-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 5px rgba(0,0,0,.06);
}

/* Cabeçalho: nome (esq, negrito) + badge (dir) */
.tese-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem .9rem;
  background: var(--surface-2, #f4f2ec);
  border-left: 3.5px solid var(--accent);
}
.tese-em-litigio  .tese-header { background: #eef4f0; border-left-color: #1a6b45; }
.tese-favoravel   .tese-header { background: #eef4f0; border-left-color: #14703a; }
.tese-subjudice   .tese-header { background: #fdf8ed; border-left-color: #c8940c; }
.tese-desf        .tese-header { background: #fdf0f0; border-left-color: #b54040; }
.tese-situacional .tese-header { background: #f4f4ff; border-left-color: #5050b5; }

.tese-nome {
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent);
  flex: 1 1 auto;
  min-width: 0;
}

/* Linha de metadados: tributo + nicho */
.tese-meta-line {
  padding: .3rem .9rem .3rem 1rem;
  background: var(--surface-2, #faf9f5);
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}
.tese-meta-tributo {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tese-meta-sep { opacity: .5; }
.tese-meta-nicho { font-style: italic; }

/* Descrição em texto corrido */
.tese-desc {
  padding: .65rem .9rem;
  font-size: .88rem;
  color: var(--ink);
  line-height: 1.55;
  border-top: 1px solid var(--line);
}

/* Grid 2 colunas para campos-chave */
.tese-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.tese-kv-item {
  padding: .5rem .85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tese-kv-item:nth-child(even) { border-right: none; }
.tese-kv-item:last-child,
.tese-kv-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
/* Item de largura total (ex.: informação processual) */
.tese-kv-full {
  grid-column: 1 / -1;
  border-right: none;
}
.tese-kv-label {
  display: block;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .2rem;
}
.tese-kv-value {
  font-size: .87rem;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}
.tese-proc-trecho {
  font-size: .83rem;
  color: var(--muted);
  font-style: italic;
}

/* Badge de status */
.resultado-badge {
  display: inline-block;
  font-size: .73rem;
  font-weight: 700;
  border-radius: 4px;
  padding: .18rem .5rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.resultado-badge.fav  { background: #dff4e8; color: #14703a; }
.resultado-badge.sub  { background: #fdf4d0; color: #8a6100; }
.resultado-badge.desf { background: #fde8e8; color: #8b2222; }
.resultado-badge.sit  { background: #eeeefd; color: #4040a0; }

/* Cabeçalho de grupo por tributo (Seção 2 com múltiplos tributos) */
.tese-tributo-group {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: .9rem 0 .3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .5rem;
}

/* Sub-título interno (6a / 6b) */
.resultado-sub-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .25rem;
}

/* Legado: tese-tag, tese-body, tese-row — mantidos para compatibilidade */
.tese-tag {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.tese-body { padding: 0; }
.tese-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.5;
}
.tese-row:first-child { border-top: none; }
.tese-key {
  flex: 0 0 7.5rem;
  padding: .45rem .75rem;
  background: var(--surface-2, #faf9f5);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-right: 1px solid var(--line);
  word-break: break-word;
}
.tese-val {
  flex: 1 1 auto;
  padding: .45rem .85rem;
  color: var(--ink);
  min-width: 0;
  word-break: break-word;
}
.tese-row-proc .tese-val { font-family: inherit; }

/* ── Resultado v2: tabela de processos gerais ───────────────────────── */
.resultado-tabela-scroll {
  overflow-x: auto;
  margin-bottom: .75rem;
}
.resultado-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.resultado-tabela th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: .5rem .75rem;
  border-bottom: 2px solid var(--line);
}
.resultado-tabela td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink);
}
.resultado-tabela tbody tr:last-child td { border-bottom: none; }
.resultado-tabela tbody tr:nth-child(even) td { background: var(--surface-2, #faf9f5); }

.support-note {
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  background: var(--bg-alt, #f7f7f7);
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 6px;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.support-note p { margin: 0 0 .35rem; }
.support-email {
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}
.support-email:hover { text-decoration: underline; }
