/* =========================================================================
   STYLE.CSS — design system da Coelho Perícia (direção "Laudo e bancada")
   -------------------------------------------------------------------------
   Conteúdo de leitura em fundo claro, sóbrio como um laudo; o Laboratório e
   o rodapé são uma "bancada" escura, como a tela de um instrumento. A troca
   de fundo sinaliza a troca de atividade: aqui se lê, ali se opera.
   A bancada é qualquer elemento com data-surface="bench": ele redefine os
   mesmos tokens com os valores escuros, e os componentes internos (cards,
   campos, botões) herdam sem precisar de regra própria. Ver ADR 0015.
   Nenhum componente usa cor literal fora deste bloco de tokens, exceto o
   desenho do ERB Lab e o monograma, que só existem sobre fundo escuro.
   ========================================================================= */
/* -------------------------------------------------------------------------
   FONTES — IBM Plex servida pelo próprio site (ADR 0017)
   -------------------------------------------------------------------------
   Nenhuma requisição a terceiros: o IP do visitante não vai ao Google.
   Arquivos da Fontsource 5.3 (cópia das do Google Fonts), licença OFL em
   assets/fonts/OFL.txt. Só os pesos usados no CSS. O subconjunto grego
   (α, β, γ) só é baixado se a página tiver esses caracteres; a Mono não
   tem grego, como no Google. Caminhos relativos a este arquivo.
   ------------------------------------------------------------------------- */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-greek-400-normal.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-greek-500-normal.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-sans-greek-600-normal.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Tipografia */
    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --fs-display: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
    --fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
    --fs-h3: 1.25rem;
    --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    --fs-small: 0.875rem;
    --fs-label: 0.8125rem;

    /* Forma */
    --radius-control: 6px;
    --radius-card: 10px;
    --section-space: clamp(3.5rem, 7vw, 6rem);

    /* Conteúdo (claro) */
    --surface: #FFFFFF;
    --surface-alt: #F4F6F8;
    --surface-raised: #FFFFFF;
    --surface-sunken: #F4F6F8;
    --line: #DDE2E8;
    --line-strong: #C5CCD6;
    --text: #0F1620;
    --text-muted: #56606F;
    --accent: #0A7383;
    --accent-hover: #085E6B;
    --accent-ink: #FFFFFF;
    --accent-soft: #E6F4F6;
    --authority: #8A6A2C;
    --ok: #1B7F4B;
    --ok-soft: #E9F6EF;
    --warn: #9A6200;
    --warn-soft: #FFF6E5;
    --danger: #B42336;
    --danger-soft: #FCEBEE;
    --shadow: 0 1px 2px rgba(15, 22, 32, 0.05), 0 6px 20px rgba(15, 22, 32, 0.06);
    --header-bg: #FFFFFF;
    color-scheme: light;
}

/* Bancada (escuro): Laboratório, demonstrações e rodapé */
[data-surface="bench"] {
    --surface: #0D1117;
    --surface-alt: #0D1117;
    --surface-raised: #141A22;
    --surface-sunken: #0A0D12;
    --line: #27303B;
    --line-strong: #3A4452;
    --text: #E6EDF3;
    --text-muted: #9AA6B6;
    --accent: #2DD4E6;
    --accent-hover: #6BE3F0;
    --accent-ink: #06222A;
    --accent-soft: rgba(45, 212, 230, 0.10);
    --authority: #C9A45C;
    --ok: #3DD68C;
    --ok-soft: rgba(61, 214, 140, 0.08);
    --warn: #F2B33D;
    --warn-soft: rgba(242, 179, 61, 0.08);
    --danger: #FF5C7A;
    --danger-soft: rgba(255, 92, 122, 0.08);
    --shadow: none;
    color-scheme: dark;
    background-color: var(--surface);
    color: var(--text);
}

/* =========================================================================
   BASE
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

[id] {
    scroll-margin-top: 85px;
}

body {
    background-color: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    text-wrap: balance;
}

a {
    color: var(--accent);
}

/* Foco visível para quem navega por teclado (links, botões, abas, campos) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.icon-svg {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--section-space) 20px;
}

/* Faixa de fundo de largura total sem wrapper extra: a sombra estende a cor
   até as bordas da janela e o clip-path corta o excesso vertical */
.band {
    background-color: var(--surface-alt);
    box-shadow: 0 0 0 100vmax var(--surface-alt);
    clip-path: inset(0 -100vmax);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header {
    max-width: 46rem;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: var(--fs-h2);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: var(--fs-lead);
    line-height: 1.55;
}

.section-header p + p {
    margin-top: 0.85rem;
}

.section-header .eyebrow {
    font-size: var(--fs-label);
    line-height: 1.6;
    color: var(--accent);
}

.grid-3,
.grid-2 {
    display: grid;
    gap: 1.5rem;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 1.75rem;
}

/* =========================================================================
   CABEÇALHO
   ========================================================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    /* alinha logo e CTA às bordas do conteúdo (.container: 1200px com 20px de respiro) */
    padding: 1.1rem max(20px, calc(50% - 580px));
    /* sem backdrop-filter: ele tornaria o cabeçalho o bloco de contenção do
       painel fixo do menu, que passaria a vazar para a direita da página */
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    /* acima do painel do menu (120) e do fundo escurecido (110): com o menu
       aberto, o botão de fechar e o CTA precisam continuar clicáveis */
    z-index: 130;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

/* O monograma V6 foi desenhado para fundo escuro (ADR 0011): em qualquer
   superfície ele fica sobre uma placa grafite própria */
.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D1117;
    border: 1px solid #27303B;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    transition: border-color 0.25s ease;
}

.logo:hover .logo-mark {
    border-color: #2DD4E6;
}

.logo-svg {
    width: 42px;
    height: 27px;
    display: block;
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.12em;
    font-size: 1.05rem;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

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

.nav-link.active {
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* O e-mail só aparece dentro do painel do menu (celular e tablet) */
.nav-link-mail {
    display: none;
}

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

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-control);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.header-cta:hover {
    background: var(--accent-hover);
}

.header-cta svg {
    flex-shrink: 0;
}

.header-mail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.header-mail:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* -------------------------------------------------------------------------
   MENU RECOLHIDO (hambúrguer)
   O botão só existe até 1200px; acima disso o menu é horizontal. O cabeçalho
   fica sempre em uma linha: logo à esquerda, CTA e botão do menu à direita.
   ------------------------------------------------------------------------- */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: border-color 0.2s;
}

.nav-toggle:hover {
    border-color: var(--accent);
}

.nav-toggle-bars {
    position: relative;
    display: block;
    width: 20px;
    height: 14px;
}

.nav-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s, background 0.25s;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }

/* Vira um X quando aberto */
.nav-toggle.aberto .nav-toggle-bars span { background: var(--accent); }
.nav-toggle.aberto .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.aberto .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle.aberto .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-backdrop {
    display: none;
}

@media (max-width: 1200px) {
    .header .header-actions {
        order: 2;
        margin-left: auto;
        position: relative;
        z-index: 140;
    }

    .nav-toggle {
        display: inline-flex;
        order: 3;
        /* o painel .nav é irmão deste botão dentro do cabeçalho: sem z-index
           próprio, ele cobriria o botão e impediria o fechamento pelo X */
        position: relative;
        z-index: 140;
    }

    /* Painel deslizante a partir da direita */
    .nav {
        position: fixed;
        /* --header-h é medido em JS, para o painel não cobrir o CTA */
        top: var(--header-h, 72px);
        right: 0;
        bottom: 0;
        width: min(78vw, 320px);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 1.75rem 2rem;
        background: var(--surface);
        border-left: 1px solid var(--line);
        transform: translateX(100%);
        transition: transform 0.28s ease;
        z-index: 120;
        overflow-y: auto;
    }

    .nav.aberto {
        transform: translateX(0);
        /* sombra só com o painel aberto: fechado, ela vazaria na borda da tela */
        box-shadow: -18px 0 45px rgba(15, 22, 32, 0.12);
    }

    .nav .nav-link {
        width: 100%;
        padding: 1rem 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--line);
    }

    .nav .nav-link:last-child {
        border-bottom: none;
    }

    .nav .nav-link.active {
        box-shadow: none;
        color: var(--accent);
    }

    .nav .nav-link-mail {
        display: block;
        color: var(--accent);
        word-break: break-all;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: var(--header-h, 72px) 0 0 0;
        background: rgba(15, 22, 32, 0.35);
        z-index: 110;
    }

    .nav-backdrop[hidden] {
        display: none;
    }

    body.menu-aberto {
        overflow: hidden;
    }
}

@media (max-width: 900px) {
    .header {
        gap: 0.6rem;
        padding: 0.75rem 16px;
    }

    .header-cta {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* No celular: e-mail vai para o menu e o nome da marca quebra em duas linhas */
@media (max-width: 600px) {
    .header-mail {
        display: none;
    }

    .logo {
        gap: 0.55rem;
    }

    .logo-mark {
        padding: 0.3rem 0.45rem;
    }

    .logo-svg {
        width: 36px;
        height: 23px;
    }

    .logo-text {
        font-size: 0.72rem;
        line-height: 1.15;
        white-space: normal;
        width: 5.6em;
    }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero-section {
    padding-top: clamp(3rem, 7vw, 5.5rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-content h1 {
    font-size: var(--fs-display);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero-lead {
    color: var(--text-muted);
    font-size: var(--fs-lead);
    line-height: 1.55;
    max-width: 38rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
}

.primary-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 0.95rem 1.6rem;
    border-radius: var(--radius-control);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.secondary-link {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    transition: border-color 0.2s, color 0.2s;
}

.secondary-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.hero-alt-channel {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.email-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    transition: border-color 0.2s;
    /* permite selecionar e copiar o endereço com o cursor */
    user-select: all;
    white-space: nowrap;
}

.email-link:hover {
    border-bottom-color: var(--accent);
}

.social-proof {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    border-top: 1px solid var(--line);
    padding-top: 1.1rem;
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.social-proof a {
    color: var(--authority);
    font-weight: 600;
    text-decoration: none;
}

.social-proof a:hover {
    text-decoration: underline;
}

/* Prévia do ERB Lab: uma peça da bancada dentro da página clara */
.hero-demo {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 1rem;
    text-decoration: none;
    transition: border-color 0.2s;
}

.hero-demo:hover {
    border-color: var(--accent);
}

.hero-demo figure {
    margin: 0;
}

.demo-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.demo-svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: var(--surface-sunken);
}

.demo-svg .grid line { stroke: #1A212B; stroke-width: 1; }
.demo-svg .sector { fill: #2DD4E6; fill-opacity: 0.12; stroke: #2DD4E6; stroke-width: 1.5; }
.demo-svg .ta { fill: none; stroke: #2DD4E6; stroke-width: 10; stroke-opacity: 0.35; }
.demo-svg .bld { fill: #2A3240; fill-opacity: 0.8; stroke: #8D98A8; stroke-width: 1; }
.demo-svg .tower { fill: #2DD4E6; }
.demo-svg .tower2 { fill: #8D98A8; }
.demo-svg .dev { fill: #E6EDF3; }
.demo-svg .link { stroke: #2DD4E6; stroke-width: 1.5; stroke-dasharray: 4 4; }
.demo-svg .near { stroke: #F2B33D; stroke-width: 1.5; stroke-dasharray: 2 4; }
.demo-svg text { font-family: var(--font-mono); font-size: 10.5px; fill: #8D98A8; }
.demo-svg text.hl { fill: #E6EDF3; }

.demo-cap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.demo-alert {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--warn);
    background: var(--warn-soft);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
}

.demo-alert strong {
    color: var(--warn);
}

.demo-cta {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   SEÇÕES DE CONTEÚDO
   ========================================================================= */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 1.1rem;
}

.icon .icon-svg {
    width: 1.4rem;
    height: 1.4rem;
}

.problem-card h3,
.service-card h3 {
    font-size: var(--fs-h3);
    margin-bottom: 0.6rem;
}

.problem-card p,
.service-card p,
.profile-card > p,
.method-item p {
    color: var(--text-muted);
}

.highlight-text {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    max-width: 46rem;
}

.card-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card--destaque {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.service-card--destaque .card-kicker {
    color: var(--accent);
}

.service-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.service-link span {
    display: inline-block;
    transition: transform 0.2s;
}

.service-link:hover span {
    transform: translateX(4px);
}

/* Quem somos */
.profile-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.profile-photo {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-alt);
    border: 2px solid var(--accent);
}

.profile-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fica visível enquanto a foto não existe (ou se ela falhar ao carregar) */
.profile-monogram {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
}

.profile-id h3 {
    font-size: var(--fs-h3);
    margin-bottom: 0.3rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .profile-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Metodologia */
.method-item {
    padding: 0.5rem 0;
}

.step-num {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 500;
    margin-bottom: 1rem;
}

.method-item h3 {
    font-size: var(--fs-h3);
    margin-bottom: 0.5rem;
}

/* =========================================================================
   LABORATÓRIO — a bancada
   ========================================================================= */
.lab-section {
    background-color: var(--surface);
    box-shadow: 0 0 0 100vmax var(--surface);
    clip-path: inset(0 -100vmax);
}

.privacy-seal {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    max-width: 46rem;
    margin-bottom: 2.5rem;
    padding: 1rem 1.25rem;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: var(--radius-control);
}

.privacy-seal .icon-svg {
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 1px;
    color: var(--accent);
}

.privacy-seal p {
    font-size: 0.93rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.privacy-seal strong {
    color: var(--text);
}

/* Abas das ferramentas */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.lab-aviso-curto {
    margin: -1.25rem 0 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lab-aviso-curto a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lab-aviso-curto a:hover { color: var(--accent); }

.tab-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-muted);
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-control);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tab-btn:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.tab-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.tool-section {
    display: none;
}

.tool-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-section > h3 {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    margin-bottom: 0.5rem;
}

.desc {
    color: var(--text-muted);
    max-width: 48rem;
    margin-bottom: 2rem;
}

.tool-section .card {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

textarea,
input {
    width: 100%;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 1rem;
    border-radius: var(--radius-control);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: border-color 0.2s;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

textarea:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
}

textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Seletor de modo da Calculadora de Hash */
.hash-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.mode-tab-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-muted);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-control);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.mode-tab-btn:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.mode-tab-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

/* Área de soltar arquivo (processamento local) */
.file-dropzone {
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius-card);
    padding: 2.25rem 1.5rem;
    text-align: center;
    background: var(--surface-sunken);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    margin-bottom: 1.25rem;
}

.file-dropzone:hover,
.file-dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* O input de arquivo é invisível sobre a área de soltar: o foco aparece na área */
.file-dropzone:focus-within {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.dropzone-icon .icon-svg {
    width: 2.25rem;
    height: 2.25rem;
}

.dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.dropzone-browse {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dropzone-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--radius-control);
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.privacy-notice strong {
    color: var(--text);
}

.privacy-icon {
    color: var(--accent);
    display: inline-flex;
}

/* Instruções para calcular o hash fora do navegador (arquivos grandes) */
.hash-local {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-sunken);
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.hash-local summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text);
}

.hash-local-corpo {
    padding: 0 1rem 1rem;
}

.hash-local-corpo p + dl,
.hash-local-corpo dl + p {
    margin-top: 0.75rem;
}

.hash-local-lista dt {
    color: var(--text);
    font-weight: 600;
    margin-top: 0.6rem;
}

.hash-local-lista dd {
    margin: 0.25rem 0 0;
}

.hash-local code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    overflow-wrap: anywhere;
}

.hash-local-lista code {
    display: block;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
}

/* Comando com botão de copiar ao lado; o caminho de exemplo fica apagado porque não é copiado */
.hash-local-comando {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hash-local-comando code {
    flex: 1;
    min-width: 0;
}

.hash-local-comando .copy-btn {
    flex-shrink: 0;
}

.comando-caminho {
    color: var(--text-muted);
    font-style: italic;
}

/* Cartão do arquivo: andamento do cálculo, alerta e metadados */
.file-details-card {
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s, background 0.2s;
}

.file-details-card.is-processando { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.file-details-card.is-concluido { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.file-details-card.is-alerta { border-color: var(--warn); background: var(--warn-soft); }

.andamento {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.andamento-topo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.andamento-titulo {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.is-concluido .andamento-titulo { color: var(--ok); }
.is-alerta .andamento-titulo { color: var(--warn); }

.andamento-tempo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    white-space: nowrap;
}

.andamento-detalhe {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

/* Barra em trechos, um por etapa. A faixa que passa no trecho da vez anda por
   transform, que o navegador mantém em movimento mesmo enquanto a Web Crypto
   segura a página; o preenchimento do MD5 acompanha a porcentagem. */
.andamento-passos {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.andamento-passos[hidden] { display: none; }

.andamento-trilha {
    display: block;
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
}

.andamento-preenchimento {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s;
}

.andamento-passo.is-atual .andamento-trilha::after,
.mini-dropzone.is-calculando .andamento-trilha::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 45%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 80%, transparent), transparent);
    will-change: transform;
    animation: varredura 1.1s linear infinite;
}

@keyframes varredura {
    from { transform: translateX(-100%); }
    to { transform: translateX(225%); }
}

.andamento-rotulo {
    display: block;
    margin-top: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.andamento-passo.is-feito .andamento-rotulo { color: var(--text); }
.andamento-passo.is-atual .andamento-rotulo { color: var(--accent); font-weight: 600; }

.andamento-acao {
    margin-top: 0.85rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
    border-radius: var(--radius-control);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
}

.andamento-acao:hover { border-color: var(--accent); }

/* Com movimento reduzido, a faixa para; o trecho da vez fica meio aceso */
@media (prefers-reduced-motion: reduce) {
    .andamento-passo.is-atual .andamento-trilha {
        background: color-mix(in srgb, var(--accent) 35%, var(--line));
    }
}

.file-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1.25rem;
}

.file-meta-item {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.meta-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.meta-value {
    color: var(--text);
    font-weight: 600;
    word-break: break-all;
}

/* Resultado da Calculadora: uma linha por algoritmo */
.result-box {
    background: var(--surface-sunken);
    padding: 1.5rem;
    border-radius: var(--radius-control);
    border-left: 3px solid var(--accent);
}

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

.result-title {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.calc-time {
    font-size: 0.75rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

.hash-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.hash-status.is-alerta {
    color: var(--warn);
}

/* Cálculo de arquivo em andamento: etapa em destaque e reticências piscando.
   A animação é só de opacidade porque essa o navegador mantém rodando mesmo
   quando a Web Crypto segura a página (app.js, esperarPintura). */
.hash-status.is-processando {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.hash-status.is-processando::after,
.hash-value.is-calculando::after {
    content: '...';
    display: inline-block;
    margin-left: 0.1em;
    will-change: opacity;
    animation: reticencias 1s ease-in-out infinite;
}

@keyframes reticencias {
    50% { opacity: 0.15; }
}

.hash-value.is-calculando,
.hash-value.is-fila {
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.hash-value.is-fila {
    color: var(--text-muted);
}

.hash-list {
    display: grid;
    gap: 1rem;
}

.hash-row + .hash-row {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.hash-row-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.4rem;
}

.hash-alg {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    min-width: 4.5rem;
}

.hash-bits {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hash-tag {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--warn);
    border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
    border-radius: 3px;
    padding: 0.1rem 0.45rem;
}

.hash-row-actions {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
}

.hash-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    word-break: break-all;
    line-height: 1.45;
}

.copy-btn,
.send-comp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.send-comp-btn {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.copy-btn:hover,
.send-comp-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.copy-btn:disabled,
.send-comp-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.hash-note {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Comparador (Auditor de Mesmidade): área pequena de arrastar ou clicar em cada polo */
.mini-dropzone {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
    margin-top: 0.6rem;
    padding: 0.7rem 0.9rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface-sunken);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.mini-dropzone:hover,
.mini-dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.mini-dropzone-icone {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--accent);
}

.mini-dropzone-texto {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mini-dropzone-titulo {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.mini-dropzone-detalhe {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.mini-dropzone .andamento-trilha { flex-basis: 100%; }
.mini-dropzone .andamento-trilha[hidden] { display: none; }

.mini-dropzone.is-calculando { border-style: solid; border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mini-dropzone.is-concluido { border-style: solid; border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.mini-dropzone.is-concluido .mini-dropzone-titulo { color: var(--ok); }
.mini-dropzone.is-alerta { border-style: solid; border-color: var(--warn); background: var(--warn-soft); }
.mini-dropzone.is-alerta .mini-dropzone-titulo { color: var(--warn); }

/* O seletor de arquivo fica invisível sobre a área; o contorno mostra o foco de teclado */
.file-dropzone:focus-within,
.mini-dropzone:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .compare-grid { grid-template-columns: 1fr; }
}

.compare-status {
    text-align: center;
    padding: 1.4rem;
    border-radius: var(--radius-control);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    border: 1px solid;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.compare-status small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
}

.neutral { background: var(--surface-sunken); border-color: var(--line); color: var(--text-muted); }
.match { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.algo-diff { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.mismatch { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.compare-hint {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* Botão de conversão ao fim de cada ferramenta */
.cta-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 1.1rem;
    text-align: center;
    border-radius: var(--radius-control);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cta-btn:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

/* ERB Lab (o desenho do mapa e o log são sempre escuros) */
.erb-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    height: 700px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .erb-layout { grid-template-columns: 1fr; height: auto; }
    .log-lines { min-height: 170px; }
}

.map-container {
    position: relative;
    background: #0D0F12;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    overflow: hidden;
    cursor: crosshair;
    min-height: 460px;
    touch-action: pan-y;
}

.map-container.grabbable { cursor: grab; }
.map-container.dragging { cursor: grabbing; }

#erb-canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

.instructions-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 10;
}

.log-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.log-panel h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
}

.log-lines {
    flex: 1 1 0;
    min-height: 0;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #4CAF50;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.log-line { margin-bottom: 4px; }
.log-line.error { color: var(--danger); }
.log-line.system { color: var(--accent); }
.log-line.warn { color: var(--warn); }

.status-panel,
.neighbor-panel {
    flex-shrink: 0;
    background: var(--surface-sunken);
    padding: 1rem;
    border-radius: 4px;
}

.neighbor-panel {
    margin-top: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.status-item .label { color: var(--text-muted); }
.status-item .value { font-weight: 500; font-family: var(--font-mono); text-align: right; }
.status-item .highlight { color: var(--accent); }

.neighbor-panel h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.neighbor-list {
    list-style: none;
    min-height: 7.6rem;   /* altura fixa: o mapa não pode mudar de tamanho quando a lista preenche */
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.neighbor-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 3px 6px;
    border-radius: 3px;
}

.neighbor-list li.serving {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

.neighbor-list li.empty {
    color: var(--text-muted);
    font-style: italic;
    justify-content: flex-start;
}

.neighbor-list .n-val { color: var(--text-muted); white-space: nowrap; }
.neighbor-list .n-val.weak { color: #7C8599; }
.neighbor-list li.serving .n-val { color: var(--text); }

/* Alerta: a ERB que atende não é a mais próxima */
.erb-anomaly {
    background: var(--warn-soft);
    border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent);
    border-left-width: 4px;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.erb-anomaly.hidden { display: none; }
.erb-anomaly strong { color: var(--warn); }

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

.erb-tip {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1 1 320px;
}

.erb-tip strong { color: var(--text); }

.ghost-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-muted);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-control);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

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

.erb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lg-item { display: flex; align-items: center; gap: 0.5rem; }

.lg-item i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.lg-item i.lg-build {
    background: #2D323E;
    border: 1px solid #5A6275;
}

.erb-notes {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    background: var(--surface-sunken);
}

.erb-notes summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.erb-notes ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.erb-notes li { margin-bottom: 0.6rem; }
.erb-notes strong { color: var(--text); }

/* Aviso jurídico — delimita o uso das ferramentas (ADR 0010) */
.legal-notice {
    margin-top: 2.5rem;
    padding: 1.4rem 1.6rem;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
}

.legal-notice h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.legal-notice p {
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.legal-notice p:last-child {
    margin-bottom: 0;
}

.legal-notice strong {
    color: var(--text);
}

@media (max-width: 600px) {
    .privacy-seal {
        flex-direction: column;
        gap: 0.6rem;
        padding: 1rem;
    }
}

/* =========================================================================
   RODAPÉ (bancada)
   ========================================================================= */
.footer {
    border-top: 1px solid var(--line);
    padding: 3.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-block: 0;
}

@media (max-width: 768px) {
    .footer-content { flex-direction: column; }
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-slogan {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-wa {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.footer-wa:hover { text-decoration: underline; }

.footer-contact .footer-ig {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact .footer-ig:hover { color: var(--accent); }

/* =========================================================================
   ARTIGOS E CURADORIA
   ========================================================================= */
.filtros {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.filtros-grupo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.filtros-titulo {
    flex-basis: 100%;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.filtro-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-muted);
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filtro-btn:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.filtro-btn.ativo {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.lista-conteudo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.conteudo-card {
    max-width: 52rem;
    scroll-margin-top: calc(var(--header-h, 72px) + 1rem);
    transition: border-color 0.2s;
}

.conteudo-card:hover {
    border-color: var(--line-strong);
}

.conteudo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.etiqueta {
    padding: 0.2rem 0.7rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid;
}

.etiqueta-citacao {
    color: var(--authority);
    background: color-mix(in srgb, var(--authority) 10%, transparent);
    border-color: color-mix(in srgb, var(--authority) 40%, transparent);
}

.etiqueta-jurisprudencia {
    color: var(--text);
    background: transparent;
    border-color: var(--text);
}

.etiqueta-contrario {
    color: var(--text);
    background: transparent;
    border-style: dashed;
    border-color: var(--text-muted);
}

/* Só aparece na prévia: item cuja citação ainda não foi conferida na fonte (ADR 0019) */
.etiqueta-pendente {
    color: var(--warn);
    background: var(--warn-soft);
    border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}

.etiqueta-comentario {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.etiqueta-artigo {
    color: var(--text);
    background: var(--surface-alt);
    border-color: var(--line-strong);
}

.conteudo-fonte::before {
    content: '·';
    margin-right: 0.75rem;
}

.conteudo-card h3 {
    font-size: 1.3rem;
    line-height: 1.35;
    margin-bottom: 1rem;
}

.conteudo-comentario,
.conteudo-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.conteudo-etapa {
    margin: -0.4rem 0 0.9rem;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    color: var(--text-muted);
}

.conteudo-trecho {
    margin: 1.25rem 0 0;
    padding: 0.9rem 1.2rem;
    border-left: 3px solid var(--line-strong);
    background: var(--surface-sunken);
    border-radius: 4px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text);
}

.conteudo-trecho cite {
    display: block;
    margin-top: 0.6rem;
    font-style: normal;
    font-size: var(--fs-label);
    color: var(--text-muted);
}

.conteudo-leitura {
    margin-top: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.conteudo-leitura span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.conteudo-referencia {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: var(--surface-sunken);
    border-left: 3px solid var(--authority);
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.conteudo-referencia span {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--authority);
}

.conteudo-referencia a {
    display: inline-block;
    margin-top: 0.6rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.conteudo-referencia a:hover { text-decoration: underline; }

.conteudo-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.conteudo-link span {
    display: inline-block;
    transition: transform 0.2s;
}

.conteudo-link:hover span { transform: translateX(4px); }

.lista-vazia {
    color: var(--text-muted);
    font-style: italic;
    padding: 3rem 0;
}

.artigos-section .cta-btn {
    max-width: 52rem;
}

/* =========================================================================
   MOVIMENTO REDUZIDO
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
