/* ============================================
   COMPANY PROFILE — slide-in overlay
   ============================================ */
.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15,27,45,.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
}

.profile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.profile-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(760px, 100%);
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(15,27,45,.25);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s ease;
}

.profile-overlay.open .profile-panel {
  transform: translateX(0);
}

.profile-hero {
  background: linear-gradient(135deg, #0f1b2d 0%, #0a4f7a 55%, var(--teal) 100%);
  color: #fff;
  padding: 26px 32px 30px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 90% 10%, rgba(15,184,168,.4), transparent 55%);
}

.profile-hero .inner {
  position: relative;
  z-index: 1;
}

.profile-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: background .15s;
}

.profile-close:hover {
  background: rgba(255,255,255,.28);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.profile-rankchip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.15;
}

.profile-tagline {
  font-size: 13px;
  opacity: .85;
  margin-top: 4px;
  font-weight: 500;
}

.profile-scorebar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.profile-score {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-score .num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.profile-score .num.nr {
  font-size: 16px;
}

.profile-score .meta {
  font-size: 11px;
  opacity: .85;
  line-height: 1.3;
}

.profile-body {
  padding: 26px 32px 40px;
}

.profile-section {
  margin-bottom: 26px;
}

.profile-section h4 {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 12px;
}

.profile-section p {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.75;
}

.profile-section p + p {
  margin-top: 12px;
}

.profile-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-facts .pf {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-facts .pf i {
  color: var(--accent);
  font-size: 20px;
  flex: none;
}

.profile-facts .pf .k {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.profile-facts .pf .v {
  font-size: 13px;
  font-weight: 700;
}

.profile-scores {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.profile-scores .srow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.profile-scores .srow:last-child {
  border-bottom: none;
}

.profile-scores .srow .sv {
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-scores .srow .bar {
  width: 120px;
  height: 6px;
  border-radius: 4px;
  background: #e3e9f0;
  overflow: hidden;
}

.profile-scores .srow .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.profile-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-services .chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.profile-services .chip i {
  color: var(--accent);
}

.profile-platform {
  background: var(--accent-light);
  border: 1px solid #cfe6fb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
}

.profile-platform.warn {
  background: var(--warn-bg);
  border-color: #f3c9c3;
  color: var(--warn);
}

.profile-platform .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--accent-dark);
  background: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.profile-platform.warn .tag {
  color: var(--warn);
}

.profile-sources {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-sources li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
  word-break: break-all;
}

.profile-sources li a:hover {
  text-decoration: underline;
}

.profile-sources li a i {
  flex: none;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-actions .pbtn {
  flex: 1;
  min-width: 180px;
  text-align: center;
  cursor: pointer;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-actions .pbtn.primary {
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
}

.profile-actions .pbtn.primary:hover {
  filter: brightness(.95);
}

.profile-actions .pbtn.ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.profile-actions .pbtn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.profile-locked {
  overflow: hidden;
}

@media (max-width: 640px) {
  .profile-hero {
    padding: 22px 20px 26px;
  }

  .profile-body {
    padding: 22px 20px 36px;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-name {
    font-size: 22px;
  }

  .profile-scores .srow .bar {
    display: none;
  }
}
