  :root {
    --navy: #0C2D5A;
    --navy-mid: #185FA5;
    --navy-light: #E6F1FB;
    --navy-border: #B5D4F4;
    --green-bg: #EAF3DE;
    --green-text: #27500A;
    --green-dot: #3B6D11;
    --red-bg: #FCEBEB;
    --red-text: #A32D2D;
    --amber-bg: #FAEEDA;
    --amber-text: #633806;
    --amber-fill: #BA7517;
    --purple-bg: #EEEDFE;
    --purple-text: #3C3489;
    --surface: #ffffff;
    --bg: #F4F7FB;
    --border: rgba(0,0,0,0.09);
    --text: #1a1a2e;
    --muted: #64748b;
    --hint: #94a3b8;
    --link: #185FA5;
    --link-hover: #0C2D5A;
    --radius: 12px;
    --radius-sm: 8px;
  }

  /* Screen-reader only (Schema.org hidden meta) */
  .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }

  .astro-main-single {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
  }

  /* LAYOUT */
  .astro-main-single .page { max-width: 920px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

  /* ===============================================================
     HEADER CARD (.hcard)
     =============================================================== */
  .hcard {
    background: #0c2d5a;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    position: relative;
    margin-bottom: 1rem;
    border: 0.5px solid #B5D4F4;
  }

  .hcard::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
  }

  /* ROW 1: logo · entity · fav */
  .hcard__row1 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.1rem 1.25rem;
    padding-right: 56px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    height: 82px;
  }

  .hcard__logo {
    width: 60px;
    height: 60px;
    border-radius: 9px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .hcard__logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 4px;
  }

  .hcard__logo-initials {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    letter-spacing: .02em;
  }

  .hcard__entity {
    flex: 1;
    min-width: 0;
  }

  .hcard__entity-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .hcard__entity-loc {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fav button (absolute, no flow disruption) */
  .fav-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    border-radius: 7px;
    border: 0.5px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .25s;
    outline: none;
    flex-shrink: 0;
  }
  .fav-btn svg {
    width: 15px;
    height: 15px;
    /* stroke: rgba(255,255,255,0.65); */
    stroke: rgb(255 255 255);
    fill: none;
    transition: stroke .25s, fill .25s;
  }
  .fav-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
  }
  .fav-btn:active {
    transform: translateY(-50%) scale(0.9);
  }
  .fav-btn.saved {
    /* background: var(--astro-primary, #1a2e4a);
    border-color: var(--astro-primary, #1a2e4a); */
    background: #FFF3CD;
    border-color: #FAC775;
    animation: astro-fav-pop 0.4s ease;
  }
  .fav-btn.saved svg {
    /* stroke: #fff; */
    stroke: #856404;

    fill: rgba(255,255,255,0.15);
  }
  @keyframes astro-fav-pop {
    0%   { transform: translateY(-50%) scale(1); }
    40%  { transform: translateY(-50%) scale(1.3); }
    70%  { transform: translateY(-50%) scale(0.9); }
    100% { transform: translateY(-50%) scale(1); }
  }

  /* ROW 2: title + code */
  .hcard__row2 {
    padding: .9rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    /* background: white; */
  }

  .hcard__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    margin: 0;
  }

  .hcard__code {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.07);
    padding: 2px 8px;
    border-radius: 20px;
  }

  /* ROW 3: salary · deadline · status */
  .hcard__row3 {
    display: flex;
    align-items: center;
    padding: .85rem 1.25rem;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    /* background: #f5f8fd; */
  }

  .hcard__salary {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-right: auto;
  }
  .hcard__salary-symbol { font-size: 11px; color: rgba(255,255,255,0.5); }
  .hcard__salary-amount { font-size: 18px; font-weight: 700; color: #fff; }
  .hcard__salary-period { font-size: 11px; color: rgba(255,255,255,0.4); margin-left: 2px; }
  .hcard__salary-na {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-style: italic;
  }

  .hcard__cierre {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,209,102,0.1);
    border: 0.5px solid rgba(255,209,102,0.28);
    border-radius: 7px;
    padding: 5px 11px;
    flex-shrink: 0;
  }
  .hcard__cierre--urgent {
    background: rgba(252,165,165,0.12);
    border-color: rgba(252,165,165,0.35);
  }
  .hcard__cierre-label { font-size: 11px; color: rgba(255,255,255,0.5); }
  .hcard__cierre-date  { font-size: 12px; font-weight: 700; color: #FFD166; }
  .hcard__cierre--urgent .hcard__cierre-date { color: #fca5a5; }
  .hcard__cierre-days  { font-size: 10px; color: rgba(255,255,255,0.35); }

  .hcard__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    font-family: inherit;
  }
  .hcard__chip--vigente   { background: #1a472a; color: #86efac; }
  .hcard__chip--concluido { background: #4a1c1c; color: #fca5a5; }

  /* ===============================================================
     TABS
     =============================================================== */
  .tabs-bar {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs-bar::-webkit-scrollbar { display: none; }

  .tab-btn {
    flex: 1;
    min-width: 90px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .tab-btn:hover { background: var(--navy-light); color: var(--navy-mid); }
  .tab-btn.active { background: var(--navy); color: #fff; }

  /* TAB PANELS */
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  /* ===============================================================
     CONTENT CARDS
     =============================================================== */
  .card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  .sec-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 0.5px solid var(--border);
  }
  .sec-lbl svg { color: var(--navy-mid); }

  /* INFO ROWS (dl-based) */
  .info-list { margin: 0; padding: 0; }

  .irow {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 0.5px solid var(--border);
    font-size: 13px;
  }
  .irow:last-child { border-bottom: none; }

  .ilbl {
    color: var(--muted);
    min-width: 130px;
    flex-shrink: 0;
    margin: 0;
    font-weight: 400;
  }
  .ival {
    color: var(--text);
    font-weight: 500;
    flex: 1;
    margin: 0;
  }

  /* Fallback "not available" style */
  .field-na {
    color: var(--hint);
    font-style: italic;
    font-weight: 400;
  }
  .field-na-block {
    color: var(--hint);
    font-style: italic;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
  }

  /* BULLET LIST */
  .fn-list { list-style: none; margin: 0; padding: 0; }
  .fn-list li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 0.5px solid var(--border);
  }
  .fn-list li:last-child { border-bottom: none; }
  .fn-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--navy-mid);
    flex-shrink: 0;
    margin-top: 6px;
  }

  /* TAGS */
  .tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
  .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
  }
  .tag-kn { background: var(--navy-light); color: #0C447C; }
  .tag-sk { background: var(--purple-bg); color: var(--purple-text); }

  /* ===============================================================
     DOCUMENT LINKS
     =============================================================== */
  .links-list { display: flex; flex-direction: column; gap: 6px; }

  .doc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 0.5px solid var(--border);
    text-decoration: none;
    transition: color .15s;
    cursor: pointer;
  }
  .doc-link:last-child { border-bottom: none; padding-bottom: 0; }
  .doc-link:hover .doc-link-name { text-decoration: underline; }

  .doc-link--disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
  }

  .doc-link-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .doc-link-body { flex: 1; }
  .doc-link-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--link);
    display: block;
    line-height: 1.3;
  }
  .doc-link-meta { font-size: 11px; color: var(--muted); margin-top: 1px; display: block; }
  .doc-link-meta--pending { font-style: italic; }

  .doc-link-action {
    font-size: 11px;
    font-weight: 500;
    color: var(--navy-mid);
    background: var(--navy-light);
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ===============================================================
     BOTTOM ACTIONS
     =============================================================== */
  .bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0 1rem;
  }
  .source-note { font-size: 11px; color: var(--navy); margin: 0; }

  .postbtn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .15s;
    text-decoration: none;
  }
  .postbtn:hover { background: var(--navy-mid); color: #fff; }
  .postbtn--disabled {
    background: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
  }
  .postbtn--disabled:hover { background: var(--muted); }

  /* ===============================================================
     RESPONSIVE
     =============================================================== */
  @media (max-width: 600px) {
    .hcard__title { font-size: 14px; }
    .hcard__salary-amount { font-size: 16px; }
    .tab-btn { min-width: 80px; font-size: 12px; padding: 7px 10px; }
    .ilbl { min-width: 35%; }

    .hcard__row3 {
      flex-direction: column;
      align-items: flex-start;
      gap: 9px;
    }
    .hcard__salary { margin-right: 0; }
  }

  @media (max-width: 480px) {
    .hcard__row1 { padding-right: 52px; }
    .hcard__title { font-size: 13px; }

    .hcard__chip {
      position: absolute;
      right: 1.25rem;
      top: 54%;
    }
  }