/*
 * ClassificaVagas + Meu Currículo
 * Camada visual canônica baseada no design system do gerador de currículo.
 * Este arquivo é carregado por último para manter a interface inteira coerente.
 */

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
}

button,
input,
select,
textarea { font-family: var(--font-sans); }

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* A home é sempre clara, assim como a entrada do projeto Meu Currículo. */
body.hub-active {
    --bg: #f2f2f3;
    --bg-elevated: #f5f5f8;
    --bg-sunk: #e9e9ea;
    --ink: #1d1f20;
    --ink-2: #5d5d60;
    --ink-3: #7a7a7d;
    --accent: #5980a6;
    --accent-soft: #eef6ff;
    --accent-ink: #416180;
    --rule: color-mix(in srgb, #1d1f20 16%, transparent);
    --rule-2: #e7e7ea;
    background: var(--bg);
    color: var(--ink);
}

/* A tela de vagas aparece imediatamente; o carregamento continua em segundo plano. */
#splash { display: none !important; }
.app { opacity: 1; }

/* Home / central de produtos */
.product-hub {
    width: 100%;
    max-width: 1180px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 12px 24px 32px;
    color: var(--ink);
    font-family: var(--font-sans);
}

.hub-nav {
    min-height: 36px;
    display: flex;
    align-items: center;
    border: 0;
}

.hub-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
}

.hub-brand > span {
    color: var(--accent);
}

.hub-brand small {
    color: color-mix(in srgb, var(--ink) 50%, transparent);
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hub-intro {
    max-width: 760px;
    padding: 20px 0 8px;
}

.hub-eyebrow {
    display: inline-flex;
    margin: 0 0 22px;
    padding: 8px 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    color: var(--accent-ink);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-transform: uppercase;
}

.hub-intro h1 {
    max-width: 15ch;
    margin: 0;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.04;
    text-transform: uppercase;
}

.hub-intro > p:last-child {
    max-width: 56ch;
    margin: 20px 0 0;
    color: color-mix(in srgb, var(--ink) 82%, transparent);
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.55;
}

.hub-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 34px 0 0;
}

.product-card,
.product-card-featured {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 30px;
    background: var(--bg-sunk);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
}

.blueprint-corner {
    position: absolute;
    z-index: 2;
    width: 5px;
    height: 5px;
    background: var(--bg);
    border: 1px solid var(--accent);
    pointer-events: none;
}

.blueprint-corner.tl { inset: -3px auto auto -3px; }
.blueprint-corner.tr { inset: -3px -3px auto auto; }
.blueprint-corner.bl { inset: auto auto -3px -3px; }
.blueprint-corner.br { inset: auto -3px -3px auto; }

.product-kicker {
    color: color-mix(in srgb, var(--ink) 55%, transparent);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.3;
    text-transform: uppercase;
}

.product-kicker-accent { color: var(--accent-ink); }

.product-card h2 {
    margin: 2px 0 0;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    text-transform: uppercase;
}

.product-card p {
    max-width: 48ch;
    margin: 0;
    color: color-mix(in srgb, var(--ink) 78%, transparent);
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.55;
}

.hub-button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 13px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.hub-button-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.hub-button-primary:hover {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: #fff;
}

.hub-button-secondary {
    background: transparent;
    border-color: var(--rule);
    color: var(--ink);
}

.hub-button-secondary:hover {
    background: var(--bg);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.hub-button-unavailable {
    cursor: not-allowed;
    color: color-mix(in srgb, var(--ink) 56%, transparent);
    opacity: 0.58;
    user-select: none;
}

.hub-button-unavailable:hover {
    color: color-mix(in srgb, var(--ink) 56%, transparent);
}

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

.hub-home-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px 28px;
    flex-wrap: wrap;
    margin: 24px 0 10px;
}

.hub-how { flex: none; }

.hub-how > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-ink);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
    list-style: none;
    user-select: none;
}

.hub-how > summary::-webkit-details-marker { display: none; }

.hub-how-badge {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.hub-how[open] {
    order: 0;
    flex-basis: 100%;
}

.hub-how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin-top: 18px;
    padding: 22px 0;
    border-top: 1px solid var(--rule);
}

.hub-how-grid article > span {
    color: var(--accent-ink);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hub-how-grid h3 {
    margin: 5px 0 4px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-transform: uppercase;
}

.hub-how-grid p {
    margin: 0;
    color: color-mix(in srgb, var(--ink) 72%, transparent);
    font-size: 13.5px;
    line-height: 1.5;
}

.hub-privacy {
    flex: 1;
    min-width: 280px;
    margin: 0;
    color: color-mix(in srgb, var(--ink) 72%, transparent);
    font-size: 13.5px;
    line-height: 1.5;
    text-align: right;
}

.hub-privacy strong {
    margin-right: 6px;
    color: var(--accent-ink);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hub-privacy span { display: inline; }

.hub-home-footer:has(.hub-how[open]) .hub-privacy {
    order: 1;
    flex-basis: 100%;
    padding: 17px 22px;
    border: 1px solid var(--rule);
    text-align: left;
}

.hub-footer {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    color: var(--ink-3);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
}

.hub-footer nav { display: flex; gap: 8px; }
.hub-footer a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Interface de vagas: mesma moldura, tipografia e controles técnicos.
   masthead-inner/search-bar herdam o padding do elemento pai, então travam
   cheios em 920px; main-content e filter-chips-scroll aplicam o padding
   neles mesmos, então precisam do padding somado de volta para renderizar
   na mesma largura visual. */
.masthead-inner,
.search-bar,
.search-history-dropdown { max-width: 920px; }

.main-content,
.filter-chips-scroll { max-width: calc(920px + var(--shell-pad) * 2); }

/* Acima de ~1280px sobra tela: a largura passa a acompanhar a viewport
   (min(74vw, 1680px)) em vez de travar em 920px para sempre — a galeria
   ganha mais colunas em monitores largos até um teto elegante, sem virar
   uma faixa infinita de cards em ultrawide. O dropdown de buscas recentes
   acompanha exatamente a mesma largura da search-bar, sempre. */
@media (min-width: 1280px) {
    .masthead-inner,
    .search-bar,
    .search-history-dropdown { max-width: min(74vw, 1680px); }

    .main-content,
    .filter-chips-scroll { max-width: calc(min(74vw, 1680px) + var(--shell-pad) * 2); }
}

/* No desktop, o chrome acompanha a mesma largura da galeria de quatro cards. */
.legal-disclaimer,
.partial-data-banner {
    width: calc(100% - (var(--shell-pad) * 2));
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Abaixo de 720px o .partial-data-banner vira uma faixa full-bleed
   (ver styles.css); sem isso, a regra acima entra em conflito e o
   deixa encolhido e centralizado por engano no mobile. */
@media (max-width: 720px) {
    .partial-data-banner {
        width: auto;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* A faixa de rolagem ficava sobre o canto esquerdo do botão Filtros no mobile. */
.filter-chips-container::before,
.filter-chips-container::after {
    display: none;
}

.app-chrome {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.top-app-bar,
.app-chrome .top-app-bar {
    background: transparent;
    border-bottom: 0;
}

.masthead-inner {
    min-height: 48px;
    height: 48px;
    gap: 16px;
}

.masthead-brand { gap: 12px; }

.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    color: var(--ink);
    font-style: normal;
    text-transform: none;
}

.brand-product {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
}

.brand-product:hover,
.brand-hub-link:hover { color: var(--accent-ink); }

.brand-hub-link {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
}

.brand-by {
    color: color-mix(in srgb, var(--ink) 50%, transparent);
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.job-count,
.brand-update {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.icon-btn,
.search-bar,
.filter-chip,
.sort-dropdown,
.shortcuts-hint-popover,
.job-card,
.job-card-icon,
.job-tag,
.active-filter-chip,
.bottom-sheet,
.filled-button,
.text-button,
.filter-option-chip,
.legal-disclaimer,
.fab,
.fab-menu,
.fab-menu-item {
    border-radius: 0;
}

.search-bar {
    height: 40px;
    background: var(--bg-sunk);
    border: 1px solid var(--rule);
    box-shadow: none;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.search-bar input {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.4;
}

.filter-chip,
.filled-button,
.text-button,
.filter-option-chip,
.sort-option {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.filter-chip {
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1;
}

.filter-chip-main,
.filter-chip.selected,
.filter-chip[data-active="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

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

.filter-chip-main:hover,
.filter-chip.selected:hover,
.filter-chip[data-active="true"]:hover {
    border-color: var(--accent-ink);
    background: var(--accent-ink);
    color: #fff;
}

.main-content { padding-top: 8px; }

.jobs-grid {
    gap: 8px;
    /* A quantidade de colunas acompanha a largura disponível. Cada card
       mantém espaço mínimo para título, empresa, tags e metadados. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.jobs-grid .job-card {
    min-width: 0;
}

/* O piso de altura só faz sentido na grade de cards, onde ele evita que
   linhas com card mais curto que os vizinhos quebrem o ritmo do grid.
   Lista e modo compacto são fileiras de uma linha só. */
.jobs-grid:not(.list-view):not(.compact-view) .job-card {
    min-height: 188px;
}

/* --bg-elevated (não --bg-sunk): nos temas dark/black --bg-sunk é quase
   idêntico a --bg, deixando o card sem contraste com a página. */
.job-card {
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    box-shadow: none;
}

.job-card:hover {
    transform: none;
    background: var(--bg-elevated);
    border-color: var(--accent);
    box-shadow: none;
}

.job-card-icon {
    width: 38px;
    height: 38px;
}

.job-card-title h3,
.job-list-main h3,
.job-compact-title,
.bottom-sheet-title h2,
.empty-state h3 {
    color: var(--ink);
    font-family: var(--font-heading);
    font-style: normal;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-transform: uppercase;
}

.job-card-title p,
.job-list-company {
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
}

.job-card-body,
.job-card-footer,
.job-list-meta,
.job-compact-meta {
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.4;
}

.job-tag {
    min-height: 22px;
    padding: 2px 7px;
    background: var(--bg);
    border: 1px solid var(--rule-2);
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.job-card-footer { border-top-color: var(--rule); }

/* Os cards estreitos precisam de duas colunas reais no rodapé; sem isso as
   datas continuam em uma linha rígida e acabam invadindo a localização. */
.job-card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.job-card-footer .job-location,
.job-card-footer .job-dates {
    min-width: 0;
    max-width: none;
}

.job-card-footer .job-dates {
    align-items: flex-end;
}

.job-card-footer .job-date-line {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.privacy-notice {
    left: 50%;
    right: auto;
    width: calc(100% - (var(--shell-pad) * 2));
    max-width: 920px;
    transform: translateX(-50%);
}

.filled-button,
.text-button {
    min-height: 42px;
    padding: 8px 16px;
    font-size: 14px;
}

.filled-button {
    background: var(--accent);
    color: #fff;
}

.filled-button:hover { background: var(--accent-ink); opacity: 1; }

.legal-disclaimer {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.45;
}

.bottom-sheet-header { border-bottom: 1px solid var(--rule); }

@media (max-width: 768px) {
    .product-hub {
        min-height: 100dvh;
        padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
    }

    .hub-nav { min-height: 32px; }
    .hub-brand { gap: 7px; font-size: 18px; }
    .hub-brand small { font-size: 9.5px; letter-spacing: 0.09em; }

    .hub-intro {
        max-width: none;
        padding: 10px 0 0;
    }

    .hub-eyebrow {
        margin-bottom: 10px;
        padding: 6px 10px;
        font-size: 10.5px;
    }

    .hub-intro h1 {
        max-width: none;
        font-size: clamp(28px, 8vw, 40px);
        line-height: 1.04;
    }

    .hub-intro > p:last-child {
        max-width: none;
        margin-top: 10px;
        font-size: 13.5px;
        line-height: 1.5;
    }

    .hub-products {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 16px;
    }

    .product-card,
    .product-card-featured {
        min-height: 210px;
        gap: 5px;
        padding: 20px;
    }

    .product-kicker { font-size: 11px; }
    .product-card h2 { font-size: 22px; line-height: 1.05; }
    .product-card p { font-size: 14px; line-height: 1.45; }

    .hub-button {
        min-height: 44px;
        padding: 6px 8px;
        font-size: 14px;
    }


    .hub-home-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: auto 0 0;
        padding-top: 14px;
    }

    .hub-how { position: relative; }
    .hub-how > summary { font-size: 12.5px; }

    .hub-how[open] { flex-basis: auto; }
    .hub-how[open] > .hub-how-grid {
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(100% + 10px);
        z-index: 30;
        grid-template-columns: 1fr;
        gap: 10px;
        max-height: min(62dvh, 430px);
        overflow-y: auto;
        margin: 0;
        padding: 14px;
        border: 1px solid var(--rule);
        background: var(--bg);
        box-shadow: 0 10px 30px rgba(20, 30, 40, 0.14);
    }

    .hub-how-grid h3 { font-size: 15px; }
    .hub-how-grid p { font-size: 12.5px; }

    .hub-privacy,
    .hub-home-footer:has(.hub-how[open]) .hub-privacy {
        min-width: 0;
        padding: 0;
        border: 0;
        font-size: 11.5px;
        text-align: left;
    }

    .hub-footer {
        justify-content: flex-start;
        margin-top: 8px;
        font-size: 11px;
    }

    .masthead-inner {
        min-height: 48px;
        height: auto;
        padding: 7px 0;
    }

    .brand-product { font-size: 20px; }
    .brand-by { font-size: 9px; letter-spacing: 0.09em; }

    .brand-meta { gap: 2px; }
    .job-count { font-size: 11px; }
    .brand-update { font-size: 10px; }

    .search-bar { height: 44px; }
    .search-bar input { font-size: 16px; }

    /* 44px só no mobile: alvo de toque mínimo recomendado (Apple HIG /
       Material) para o controle mais tocado da tela (Filtros, Ordenar,
       Visualização, Visitadas). No desktop o mouse é preciso e o chip de
       36px (regra base acima) segue valendo. */
    .filter-chip {
        height: 44px;
        min-height: 44px;
        font-size: 13px;
    }

    .filter-chip-visited {
        width: 44px;
        min-width: 44px;
    }

    .jobs-grid { gap: 6px; }
    .job-card-title h3,
    .job-list-main h3,
    .job-compact-title { font-size: 15px; line-height: 1.2; }

    .job-card-title p,
    .job-list-company { font-size: 12.5px; }

    .bottom-sheet-title h2 { font-size: 20px; }
}

@media (max-width: 720px) {
    /* Duas linhas no cabeçalho: marca; depois quantidade + data. */
    .masthead-brand {
        align-items: baseline;
        flex-wrap: wrap;
        row-gap: 3px;
    }

    .masthead-brand .brand-heading {
        flex: 0 0 100%;
    }

    .masthead-brand .brand-meta {
        flex: 0 1 auto;
        width: auto;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .masthead-brand .brand-meta-line {
        width: auto;
        flex: 0 0 auto;
    }

    .masthead-brand .brand-meta-update {
        min-width: 0;
        flex: 1 1 auto;
    }

    .masthead-brand .brand-update {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Termos e privacidade compartilham a mesma linguagem visual da área de vagas. */
body.legal-page {
    background: var(--bg);
    color: var(--ink);
}

.legal-shell {
    width: min(1180px, 100%);
    padding: 20px 24px 60px;
}

/* O header acompanha a mesma largura da coluna de conteúdo, em qualquer
   viewport — sem isso, o masthead escala até 74vw/1680px (regra pensada
   para a galeria de vagas) e passa da largura fixa do .legal-shell. */
body.legal-page .masthead-inner {
    max-width: 1180px;
}

.legal-document-switcher {
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
}

.legal-document-switcher a,
.legal-back-link {
    border-radius: 0;
    font-family: var(--font-heading);
}

.legal-document-switcher a[aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.legal-card {
    padding: clamp(24px, 4vw, 36px);
    background: var(--bg-sunk);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
}

.legal-card h1 {
    color: var(--ink);
    font-family: var(--font-heading);
    font-style: normal;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.04;
    text-transform: uppercase;
}

.legal-updated,
.legal-section h2 {
    font-family: var(--font-heading);
}

.legal-lead,
.legal-section p,
.legal-section li {
    color: var(--ink-2);
    font-family: var(--font-sans);
}

.legal-section { border-top-color: var(--rule); }

.legal-footer a { font-family: var(--font-heading); }

@media (max-width: 350px) {
    .hub-products { grid-template-columns: 1fr; }
    .product-card,
    .product-card-featured { min-height: 184px; }
}
