.profile-featured-grid {
  --featured-card-height: clamp(250px, 26vw, 340px);
  display: flex;
  gap: .75rem;
  min-height: var(--featured-card-height);
  align-items: stretch;
}

.profile-featured-card {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  background: #142849;
  border: 1px solid rgba(20, 40, 73, .12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 40, 73, .12);
  transition: flex .32s ease, transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}

.profile-featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 40, 73, .08) 0%, rgba(20, 40, 73, .36) 44%, rgba(8, 16, 30, .86) 100%),
    linear-gradient(90deg, rgba(31, 95, 191, .34), rgba(212, 175, 55, .2));
  opacity: .94;
  transition: opacity .24s ease;
}

.profile-featured-card::after {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  z-index: 3;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5fbf, #d4af37);
  transform: scaleX(.32);
  transform-origin: left center;
  transition: transform .28s ease;
}

.profile-featured-card:hover,
.profile-featured-card:focus-visible {
  color: inherit;
  transform: translateY(-3px);
  border-color: rgba(31, 95, 191, .3);
  box-shadow: 0 20px 48px rgba(20, 40, 73, .2);
}

.profile-featured-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #dfe8f4;
}

.profile-featured-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .34s ease, filter .34s ease;
}

.profile-featured-card:hover img,
.profile-featured-card:focus-visible img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.07);
}

.profile-featured-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .42rem;
  min-width: 0;
  min-height: 55%;
  padding: 1rem 1rem 1.45rem;
}

.profile-featured-name {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .34);
}

.profile-featured-meta {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  line-height: 1.35;
}

.profile-featured-link {
  color: #f5d773;
  font-size: .86rem;
  font-weight: 800;
  opacity: .95;
}

.profile-featured-empty {
  margin: 0;
  color: #6b7d92;
  font-style: italic;
}

.profile-featured-mobile-dots {
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .profile-featured-grid:hover .profile-featured-card {
    flex: .82 1 0;
    filter: saturate(.9);
  }

  .profile-featured-grid .profile-featured-card:hover,
  .profile-featured-grid .profile-featured-card:focus-visible {
    flex: 1.55 1 0;
    filter: saturate(1.05);
  }

  .profile-featured-card:hover::before,
  .profile-featured-card:focus-visible::before {
    opacity: .78;
  }

  .profile-featured-card:hover::after,
  .profile-featured-card:focus-visible::after {
    transform: scaleX(1);
  }
}


.company-featured { margin-top:2rem; padding-top:1.25rem; border-top:1px solid var(--border-color,#dce2eb); }
.company-featured-head { margin-bottom:1rem; }
.company-featured-head h3 { font-size:1.25rem; font-weight:800; margin:0 0 .35rem; color:var(--text-main,#142849); }
.company-featured-head p { font-size:.9rem; color:var(--text-muted,#69768a); }
.company-featured .profile-featured-grid { --featured-card-height:clamp(280px,25vw,340px); }
.emp-heading.is-current svg { color:#39966b; }
.emp-heading.is-former svg { color:#c86767; }
.columns.company-metrics-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1rem; margin:0; align-items:stretch; }
.company-metrics-grid > .column { width:auto; padding:0; display:flex; min-width:0; }
.company-metrics-grid .stat-card { display:flex; flex-direction:column; justify-content:center; width:100%; min-width:0; min-height:132px; padding:1.15rem .9rem; border-radius:8px; background:#fff; border:1px solid #e4e8ef; }
.company-metrics-grid .stat-card .heading { display:flex; align-items:center; justify-content:center; min-height:2.8em; line-height:1.4; margin:0 0 .5rem; font-size:.75rem; color:#69768a; }
.company-metrics-grid .stat-card .title { font-size:1.75rem; font-weight:750; line-height:1.2; white-space:nowrap; overflow-wrap:normal; word-break:normal; font-variant-numeric:tabular-nums; color:var(--text-main,#26344a); margin:0; }
@media(max-width:1023px) and (min-width:641px) {
 .company-featured .profile-featured-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .company-featured .profile-featured-card { min-height:280px; }
}
@media(max-width:760px) { .columns.company-metrics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .company-metrics-grid > .column:last-child { grid-column:1/-1; } }
@media(max-width:640px) {
 .company-featured .profile-featured-grid { display:flex; gap:.75rem; min-height:0; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; padding:.2rem 0 .65rem; }
 .profile-featured-grid::-webkit-scrollbar { display:none; }
 .profile-featured-card { flex:0 0 min(80vw,300px); height:clamp(245px,70vw,300px); scroll-snap-align:start; }
 .profile-featured-body { min-height:50%; padding:.9rem .9rem 1.25rem; }
 .profile-featured-name { font-size:1rem; }
 .profile-featured-mobile-dots { display:flex; align-items:center; justify-content:center; gap:.38rem; margin:.1rem 0 .15rem; }
 .profile-featured-dot { width:6px; height:6px; border-radius:999px; background:rgba(20,40,73,.26); transition:width .2s ease,background-color .2s ease; }
 .profile-featured-dot.is-active { width:18px; background:#1f5fbf; }
 .profile-featured-mobile-dots[hidden] { display:none; }
}
html[data-theme="dark"] .profile-featured-card { background:#111827; border-color:rgba(141,177,247,.18); box-shadow:0 10px 28px rgba(0,0,0,.28); }
html[data-theme="dark"] .profile-featured-meta { color:#cadeff; }
html[data-theme="dark"] .profile-featured-name { color:#edf4ff; }
html[data-theme="dark"] .profile-featured-dot { background:rgba(202,222,255,.34); }
html[data-theme="dark"] .profile-featured-dot.is-active { background:#8bb7ff; }
@media(prefers-reduced-motion:reduce) { .profile-featured-card,.profile-featured-card img,.profile-featured-card::before,.profile-featured-card::after { transition:none; } .profile-featured-card:hover,.profile-featured-card:focus-visible { transform:none; } }
.company-metrics-grid .stat-card .heading { text-transform:uppercase; letter-spacing:.05em; }
html[data-theme="dark"] .company-featured { border-color:#344052; }
html[data-theme="dark"] .company-featured-head h3 { color:#edf4ff; }
html[data-theme="dark"] .company-featured-head p,
html[data-theme="dark"] .emp-table .emp-title { color:#a9b6ca; }
html[data-theme="dark"] .company-metrics-grid .stat-card { background:#fff; border-color:#e4e8ef; }
html[data-theme="dark"] .company-metrics-grid .stat-card .title { color:#26344a; }
html[data-theme="dark"] .company-metrics-grid .stat-card .heading { color:#69768a; }
html[data-theme="dark"] .emp-heading.is-current svg { color:#62b88a; }
html[data-theme="dark"] .emp-heading.is-former svg { color:#db8080; }
html[data-theme="dark"] .emp-table .emp-avatar-wrap { background:#263244; border-color:#3b495e; }
html[data-theme="dark"] .emp-table .emp-avatar-initials { color:#c4d0e2; }

/* Paid profile shell; Silver is the base, with Bronze and Gold overrides below. */
.company-profile-shell--paid { position:relative; isolation:isolate; border:1px solid #b4becb; border-radius:8px; background:radial-gradient(circle at 90% 0,rgba(156,172,194,.24),transparent 38%),linear-gradient(135deg,#fff 0%,#f1f4f8 55%,#dfe5ed 100%); box-shadow:0 20px 48px #23334d16; }
.company-profile-shell--paid::before { content:""; position:absolute; inset:0 0 auto; height:3px; border-radius:8px 8px 0 0; background:linear-gradient(90deg,#78889e,#f3f6fb 52%,#9aa9be); pointer-events:none; }
html[data-theme="dark"] .company-profile-shell--paid { border-color:#647287; background:radial-gradient(circle at 90% 0,rgba(190,204,224,.18),transparent 38%),linear-gradient(135deg,#101725,#192334 56%,#343f50); box-shadow:0 20px 48px #0005; }
.company-disqualified { display:block; margin:.3rem 0 0; padding:0; background:transparent; color:#b34e52; font-size:.65rem; font-weight:400; line-height:1.4; letter-spacing:0; vertical-align:middle; white-space:nowrap; }
html[data-theme="dark"] .company-disqualified { color:#df9094; }
.emp-sort-actions { display:flex; justify-content:flex-end; align-items:center; gap:.25rem; margin:-.25rem 0 .25rem; }
.emp-sort-icon { display:inline-grid; place-items:center; width:30px; height:30px; padding:5px; border:0; border-radius:5px; background:transparent; color:#7b8492; cursor:pointer; }
.emp-sort-icon svg { width:19px; height:19px; }
.emp-sort-icon:hover { color:#26344a; background:#edf1f6; }
.emp-sort-icon[aria-pressed="true"] { color:#26344a; background:#edf1f6; }
.emp-sort-icon:focus-visible { outline:2px solid #598be0; outline-offset:2px; }
html[data-theme="dark"] .emp-sort-icon { color:#a6b2c4; }
html[data-theme="dark"] .emp-sort-icon:hover,html[data-theme="dark"] .emp-sort-icon[aria-pressed="true"] { color:#edf4ff; background:#ffffff0a; }

/* Company identity starts at the left edge; sponsor logo balances the contact row. */
.company-profile-shell--paid .company-profile-contact-row { display:flex; justify-content:space-between; align-items:center; gap:2rem; margin-top:1.25rem; flex-wrap:wrap; }
.company-profile-shell--paid .company-profile-contact-row .kp-wrap { margin:0; flex:0 1 440px; }
.company-sponsor-logo { margin:0; flex:0 1 210px; max-width:210px; }
.company-sponsor-logo img { display:block; width:100%; max-height:90px; object-fit:contain; }
.company-sponsor-logo[hidden] { display:none; }
.company-profile-shell--paid.is-tier-bronze { border-color:#bd9b7b; background:radial-gradient(circle at 90% 0,rgba(179,124,76,.19),transparent 38%),linear-gradient(135deg,#fff,#f9f3ec 56%,#ead9c7); }
.company-profile-shell--paid.is-tier-bronze::before { background:linear-gradient(90deg,#92613e,#e4c5a5 52%,#ae7a4e); }
.company-profile-shell--paid.is-tier-gold { border-color:#c5ac6e; background:radial-gradient(circle at 90% 0,rgba(212,175,55,.2),transparent 38%),linear-gradient(135deg,#fff,#fbf7e9 56%,#eee0b5); }
.company-profile-shell--paid.is-tier-gold::before { background:linear-gradient(90deg,#9c7a29,#f1dfa3 52%,#c6a14a); }
html[data-theme="dark"] .company-profile-shell--paid.is-tier-bronze { border-color:#87684e; background:radial-gradient(circle at 90% 0,rgba(188,133,85,.16),transparent 38%),linear-gradient(135deg,#111722,#1d2531 56%,#453428); }
html[data-theme="dark"] .company-profile-shell--paid.is-tier-gold { border-color:#887444; background:radial-gradient(circle at 90% 0,rgba(212,175,55,.17),transparent 38%),linear-gradient(135deg,#101725,#192334 56%,#413923); }
@media(max-width:640px) { .company-profile-shell--paid .company-profile-contact-row { gap:1rem; } .company-sponsor-logo { flex-basis:150px; max-width:150px; } .company-sponsor-logo img { max-height:70px; } }

/* Separate the map from the metrics while keeping the same content width. */
#map.company-project-map { margin-top:1.75rem; }

.company-profile-shell--paid .company-name-row { display:flex; align-items:center; gap:1rem; flex-wrap:nowrap; margin-bottom:1.5rem; }
.company-profile-shell--paid .company-name-row .title { margin:0; min-width:0; overflow-wrap:anywhere; flex:0 1 auto; }
/* Explicit heading flow prevents Bulma subtitle margins from overlapping Free names. */
.company-profile-shell .company-name-row { margin:0 0 .4rem; }
.company-profile-shell .company-name-row .title { margin:0; line-height:1.2; overflow-wrap:anywhere; }
.company-profile-shell .company-name-row + .subtitle { margin:0 0 1.25rem; line-height:1.45; }
.company-profile-shell .company-sponsor-logo { display:flex; align-items:center; justify-content:flex-start; width:170px; height:58px; max-width:100%; margin:.75rem 0 2rem; }
.company-profile-shell .company-sponsor-logo[hidden] { display:none; }
.company-profile-shell .company-sponsor-logo a { display:flex; align-items:center; width:100%; height:100%; }
.company-profile-shell .company-sponsor-logo img { width:100%; height:100%; max-height:none; object-fit:contain; object-position:left center; }
@media(max-width:640px) { .company-profile-shell .company-sponsor-logo { width:140px; height:48px; } }
.company-name-row .premium-icon { width:1.1rem; height:1.1rem; vertical-align:super; margin-left:.25rem; fill:currentColor; }
.company-name-row .premium-icon.f { color:#d4af37; }
.company-name-row .premium-icon.l1 { color:#c0c0c0; }
.company-name-row .premium-icon.l2 { color:#804400; }

.company-profile-shell .company-description { margin:0 0 1rem; line-height:1.65; }
