    :root {
      --bg: #0d1117;
      --card-bg: #161b22;
      --border: #30363d;
      --text: #c9d1d9;
      --text-muted: #8b949e;
      --text-bright: #f0f6fc;
      --accent: #58a6ff;
      --green: #3fb950;
      --amber: #d29922;
      --purple: #bc8cff;
      --code-bg: #0a0c10;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html {
      overflow-y: auto;
      scrollbar-gutter: stable;
    }
    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
      font-size: 13px;
      line-height: 1.5;
      padding: 16px;
    }

    html.table-tab-active,
    body.table-tab-active {
      height: 100%;
      overflow: hidden;
    }
    body.table-tab-active { padding-bottom: 0; }

    /* Scrollbar discreta integrada ao tema escuro */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    ::-webkit-scrollbar-track {
      background: var(--bg);
    }
    ::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }



    a { color: var(--accent); text-decoration: none; }
    a:hover { text-decoration: underline; }

    .container { max-width: 1100px; margin: 0 auto; }

    header {
      border-bottom: 1px solid var(--border);
      padding-bottom: 14px;
      margin-bottom: 18px;
    }

    .title-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    h1 { font-size: 16px; font-weight: 700; color: var(--text-bright); }
    .badge {
      display: inline-block;
      padding: 2px 6px;
      font-size: 11px;
      border: 1px solid var(--border);
      border-radius: 4px;
      background: var(--card-bg);
    }
    .badge-green { color: var(--green); border-color: rgba(63, 185, 80, 0.4); }
    .badge-accent { color: var(--accent); border-color: rgba(88, 166, 255, 0.4); }

    .job-title {
      background: none;
      border: 0;
      color: var(--text-bright);
      font: inherit;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
      overflow-wrap: anywhere;
      min-width: 0;
    }
    .job-title:hover { color: var(--accent); }
    .job-title:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
    .job-company { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
    .job-link-col { width: 45px; text-align: center; }
    .job-direct-link { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; font-size: 14px; }
    html:has(#job-details:modal), body:has(#job-details:modal) { overflow: hidden; }
    .job-details {
      position: fixed;
      margin: 0;
      width: min(430px, calc(100% - 24px));
      max-height: calc(100dvh - 24px);
      overflow: auto;
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--card-bg);
      color: var(--text);
      font: inherit;
      font-size: 12px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
      z-index: 30;
    }
    .job-details:modal { inset: 0; margin: auto; }
    .job-details::backdrop { background: rgba(0, 0, 0, 0.6); }
    .job-details-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .job-details-close { padding: 0 6px; font-size: 20px; line-height: 1.2; }
    .job-details:not(:modal) .job-details-close { display: none; }
    .job-details h2 { font-size: 14px; color: var(--text-bright); margin: 8px 0 4px; overflow-wrap: anywhere; }
    #job-details-company { color: var(--text-muted); overflow-wrap: anywhere; }
    #job-details-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
    #job-details-fields > div { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
    #job-details-fields dt { color: var(--text-muted); }
    #job-details-fields dd { text-align: right; overflow-wrap: anywhere; }
    .job-details-skills { margin-top: 12px; }
    .job-details h3 { font-size: 12px; font-weight: 600; margin-bottom: 7px; }
    #job-details-skills { display: flex; flex-wrap: wrap; gap: 5px; max-height: 110px; overflow: auto; }
    .job-details-note { font-size: 11px; color: var(--text-muted); }
    p.job-details-note { margin: 14px 0 12px; }
    #job-details-link { display: flex; justify-content: flex-end; }
    .nav-btn.job-details-source { display: inline-block; color: var(--accent); border-color: var(--accent); }
    .nav-btn.job-details-source:hover { color: var(--accent); text-decoration: none; }

    .nav-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 16px 0;
      border-bottom: 1px solid var(--border);
      padding-bottom: 10px;
    }

    .nav-btn {
      background: var(--card-bg);
      border: 1px solid var(--border);
      color: var(--text-muted);
      padding: 6px 12px;
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
      border-radius: 4px;
      transition: 0.1s;
    }
    .nav-btn:hover { color: var(--text-bright); border-color: var(--text-muted); }
    .nav-btn.active {
      background: var(--accent);
      color: #000;
      font-weight: 700;
      border-color: var(--accent);
    }

    .grid-kpi {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px;
      margin-bottom: 20px;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 16px;
    }

    .about-copy { width: 100%; }
    .about-copy p { margin-top: 12px; line-height: 1.8; }
    .about-copy p:first-child {
      margin-top: 0;
      color: var(--text-bright);
      font-size: 14px;
    }
    .about-source { margin-top: 16px; font-size: 11px; }

    .card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 14px;
    }

    .card-title { font-size: 11px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
    .card-value { font-size: 20px; font-weight: 700; color: var(--text-bright); }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
      font-size: 12px;
    }

    th, td {
      padding: 6px 10px;
      text-align: left;
      border-bottom: 1px solid var(--border);
    }

    th { color: var(--text-muted); font-weight: 600; background: rgba(255,255,255,0.02); }
    tr:hover td { background: rgba(255,255,255,0.02); }

    .bar-wrap { width: 100%; background: #21262d; height: 10px; border-radius: 2px; overflow: hidden; display: flex; }
    .bar-wrap.half { width: 50%; }
    .bar-fill { background: var(--accent); height: 100%; }

    /* As duas tabelas de habilidades dimensionam as colunas pelo conteudo. */
    .skills-table { table-layout: auto; }
    .skills-table .rank-col {
      width: 1%;
      padding-right: 6px;
      white-space: nowrap;
    }
    .skills-table .technology-col { padding-left: 0; }
    .skills-table .proportion-col { width: 20%; }

    .search-input {
      background: var(--code-bg);
      border: 1px solid var(--border);
      color: var(--text-bright);
      padding: 6px 10px;
      font-family: inherit;
      font-size: 12px;
      border-radius: 4px;
      width: 100%;
      max-width: 320px;
      margin-bottom: 12px;
    }
    .search-input:focus { outline: none; border-color: var(--accent); }

    pre code {
      display: block;
      background: var(--code-bg);
      border: 1px solid var(--border);
      padding: 10px;
      border-radius: 4px;
      font-size: 11px;
      color: var(--text-bright);
      overflow-x: auto;
    }

    .pill {
      display: inline-block;
      padding: 2px 6px;
      margin: 2px;
      font-size: 11px;
      border-radius: 3px;
      background: #21262d;
      border: 1px solid var(--border);
      cursor: pointer;
    }
    .pill.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

    .job-place, .job-mode { display: block; }
    .job-mode { margin-top: 2px; color: var(--text-muted); }

    .tab-section { display: none; }
    .tab-section.active { display: block; }

    /* Listas longas rolam dentro do card, sem esticar a pagina */
    .scroll-table {
      max-height: calc(100vh - 330px);
      overflow-y: auto;
      scrollbar-gutter: stable;
      border: 1px solid var(--border);
      border-radius: 6px;
      margin-top: 10px;
    }
    .scroll-table table { margin-top: 0; }
    .scroll-table thead th {
      position: sticky;
      top: 0;
      z-index: 2;
      background: var(--card-bg);
    }

    footer {
      border-top: 1px solid var(--border);
      padding-top: 14px;
      margin-top: 28px;
      color: var(--text-muted);
      font-size: 11px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
    }

    .footer-links {
      display: flex;
      align-items: center;
      gap: 14px;
    }
    .footer-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-muted);
    }
    .footer-link:hover,
    .footer-link:focus-visible {
      color: var(--accent);
      text-decoration: none;
    }
    .footer-icon {
      display: block;
      width: 15px;
      height: 15px;
      flex: 0 0 auto;
      overflow: visible;
    }
    .footer-stale { color: var(--amber); }
    .footer-privacy { border: 0; background: none; font: inherit; cursor: pointer; }
    .privacy-icon { width: 16px; height: 16px; flex: 0 0 auto; }
    .analytics-consent {
      position: fixed;
      inset: auto 16px 58px auto;
      margin: 0;
      width: min(430px, calc(100% - 24px));
      max-height: calc(100dvh - 90px);
      overflow: auto;
      padding: 16px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--card-bg);
      color: var(--text);
      font: inherit;
      font-size: 12px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
      z-index: 40;
    }
    .analytics-consent:modal { inset: 0; margin: auto; }
    .analytics-consent::backdrop { background: rgba(0, 0, 0, 0.6); }
    .analytics-consent h2 { color: var(--text-bright); font-size: 13px; margin-bottom: 8px; }
    .analytics-consent details { margin-top: 10px; color: var(--text-muted); }
    .analytics-consent summary { cursor: pointer; }
    .analytics-consent details p { margin: 8px 0; }
    #analytics-local-note { margin-top: 10px; color: var(--text-muted); }
    .analytics-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
    .analytics-actions .nav-btn { color: var(--text); }
    .analytics-actions .nav-btn:hover,
    .analytics-actions .nav-btn:focus-visible { color: var(--accent); border-color: var(--accent); }

    @media (min-width: 769px) {
      body { padding-bottom: 46px; }
      #tab-resumo .summary-grid th,
      #tab-resumo .summary-grid td { padding-top: 5px; padding-bottom: 5px; }
      footer {
        position: fixed;
        bottom: 0;
        left: 50%;
        z-index: 20;
        width: min(calc(100% - 32px), 1100px);
        margin: 0;
        padding: 10px 0 12px;
        transform: translateX(-50%);
        background: var(--bg);
        box-shadow: 0 -8px 18px rgba(13, 17, 23, 0.9);
      }
    }

    @media (min-width: 769px) and (max-height: 820px) {
      #tab-resumo .grid-kpi { margin-bottom: 10px; }
      #tab-resumo .summary-grid > .card { padding: 10px; }
      #tab-resumo .summary-grid th,
      #tab-resumo .summary-grid td { padding: 0 8px; }
    }

    .show-mobile { display: none; }

    /* RESPONSIVIDADE MOBILE ROOTS (ENCAIXA SEM ROLAGEM) */
    @media (max-width: 768px) {
      body {
        padding: 10px 10px calc(54px + env(safe-area-inset-bottom));
        font-size: 12px;
      }
      header { padding-bottom: 8px; margin-bottom: 12px; }
      h1 { font-size: 14px; }
      .title-row p { max-width: 350px; }

      .nav-tabs {
        flex-wrap: nowrap;
        gap: 6px;
        margin: 12px 0 4px;
        padding-bottom: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
      }
      .nav-tabs::-webkit-scrollbar { display: none; }
      .nav-btn {
        flex: 0 0 auto;
        width: auto;
        padding: 6px 10px;
        white-space: nowrap;
        scroll-snap-align: start;
      }

      .grid-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
      }
      .summary-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
      .about-copy p:first-child { font-size: 13px; }
      .card { min-width: 0; padding: 10px; }
      .card-value { font-size: 17px; }
      table { font-size: 11px; }
      th, td { padding: 5px 6px; }
      .search-input { max-width: 100%; }

      #area-pills-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: none;
      }
      #area-pills-container::-webkit-scrollbar { display: none; }
      #area-pills-container .pill {
        flex: 0 0 auto;
        margin: 0;
        white-space: nowrap;
      }

      #filter-modalidade { width: 100% !important; }

      .skills-table th:nth-child(4),
      .skills-table td:nth-child(4) {
        width: 52px;
        padding-left: 4px;
        padding-right: 4px;
        white-space: nowrap;
      }
      .skills-table th:nth-child(5),
      .skills-table td:nth-child(5) {
        width: 68px;
        padding-left: 4px;
        padding-right: 4px;
        white-space: nowrap;
      }

      #table-areas-summary,
      #table-regioes-summary,
      #table-modalidades-summary { table-layout: fixed; }
      #table-areas-summary th:first-child,
      #table-regioes-summary th:first-child,
      #table-modalidades-summary th:first-child { width: 64%; }
      #table-areas-summary th:nth-child(2),
      #table-regioes-summary th:nth-child(2),
      #table-modalidades-summary th:nth-child(2) { width: 20%; }
      #table-areas-summary th:nth-child(3),
      #table-regioes-summary th:nth-child(3),
      #table-modalidades-summary th:nth-child(3) { width: 16%; }
      #table-areas-summary tbody tr:nth-child(n + 11) { display: none; }

      #table-vagas { table-layout: fixed; }
      #table-vagas th:first-child, #table-vagas td:first-child { width: 60%; }
      #table-vagas th, #table-vagas td { vertical-align: top; }
      #table-vagas .job-link-col { width: 32px; padding-left: 2px; padding-right: 2px; vertical-align: middle; }
      footer {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20;
        align-items: center;
        flex-wrap: nowrap;
        margin: 0;
        padding: 9px max(10px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        background: var(--bg);
        box-shadow: 0 -8px 18px rgba(13, 17, 23, 0.9);
      }
      footer > div { white-space: nowrap; }
      .footer-links { gap: 10px; }
      .footer-link {
        padding: 3px;
        color: var(--text-muted);
      }
      .footer-icon {
        width: 18px;
        height: 18px;
      }
      .footer-link-label { display: none; }

      /* Oculta colunas secundárias para caber 100% na largura do celular */
      .hide-mobile { display: none !important; }
      .show-mobile { display: block !important; }

    }


    @media (max-width: 420px) {
      body { padding: 8px 8px calc(52px + env(safe-area-inset-bottom)); }
      .grid-kpi { gap: 6px; }
      .card { padding: 9px; }
      .card-title { font-size: 10px; }
    }
