.profile-hero {
  padding: 1.5rem;
}

@media (min-width: 1024px) {
  .profile-hero {
    padding: 2rem;
  }
}

.profile-hero-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .profile-hero-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.profile-hero-main {
  flex: 1;
  min-width: 0;
}

.profile-role-line {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--directory-on-surface-variant);
}

.profile-role-label {
  margin-right: 0.35rem;
}

.profile-role-title {
  font-weight: 700;
  color: #001e4f;
}

.profile-company-link {
  color: var(--directory-secondary);
  font-weight: 700;
  text-decoration: none;
}

.profile-company-link:hover {
  text-decoration: underline;
}

.profile-company-name {
  font-weight: 700;
  color: #001e4f;
}

.profile-location-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--directory-on-surface-variant);
}

.profile-location-sep {
  color: var(--directory-outline-variant);
}

.profile-description {
  margin: 1rem 0 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--directory-on-surface-variant);
}

.profile-contact-card {
  width: 100%;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #b4c5ff;
  background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  position: relative;
}

.profile-contact-card:has(#profile-email-actions:not([hidden])) {
  padding-bottom: 0.7rem;
}

@media (min-width: 1024px) {
  .profile-contact-card {
    width: min(100%, 22rem);
    flex-shrink: 0;
  }
}

.profile-contact-kicker {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--directory-secondary);
}

.profile-contact-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.profile-email-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.profile-email-actions[hidden] {
  display: none;
  margin: 0;
}

.profile-email-action-btn {
  border: none;
  background: transparent;
  color: #00337c;
  cursor: pointer;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-email-action-btn[hidden] {
  display: none;
}

.profile-email-action-btn:hover {
  background: rgba(0, 51, 124, 0.08);
}

.profile-email-action-btn:focus-visible {
  outline: 2px solid rgba(0, 51, 124, 0.35);
  outline-offset: 2px;
}

.profile-email-action-btn__icon {
  width: 24px;
  height: 24px;
  display: block;
}

.profile-email-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: -28px;
  background: #111827;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 3;
}

.profile-email-action-btn:hover::after,
.profile-email-action-btn:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.profile-email-actions__hint {
  margin-left: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  color: #00337c;
}

.profile-email-actions__hint[hidden] {
  display: none;
}

.profile-list-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  z-index: 12;
  border: 1px solid #d0d7e6;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-list-popover__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-list-popover__title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  flex: 0 0 auto;
}

.profile-list-popover__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.profile-list-popover__link {
  border: none;
  background: transparent;
  color: #00337c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.profile-list-popover__link[hidden] {
  display: none;
}

.profile-list-popover__select,
.profile-list-popover__input {
  width: 100%;
  border: 1px solid #d0d7e6;
  border-radius: 8px;
  font-size: 12px;
  color: #0f172a;
  padding: 6px 8px;
  background: #fff;
}

.profile-list-popover__select[hidden] {
  display: none;
}

.profile-list-popover__create {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-list-popover__create[hidden] {
  display: none;
}

.profile-list-popover__add[hidden] {
  display: none;
}

.profile-list-popover__add {
  border: none;
  background: #00337c;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  align-self: flex-start;
}

.profile-list-popover__add:hover {
  background: #00285f;
}

.profile-list-popover__add:disabled {
  opacity: 0.6;
  cursor: default;
}

.profile-list-popover__status {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.profile-list-popover__status.is-error {
  color: #b45309;
}

.profile-contact-email {
  font-size: 13px;
}

.profile-reveal-btn {
  width: 100%;
}

.profile-reveal-status {
  margin: 0.75rem 0 0;
  font-size: 13px;
  color: var(--color-subtle, #64748b);
}

.profile-reveal-status-error {
  color: #b45309;
}

.profile-recaptcha-notice {
  margin: 0.5rem 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-subtle, #64748b);
}

.profile-recaptcha-notice a {
  color: inherit;
  text-decoration: underline;
}

.profile-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .profile-bento {
    grid-template-columns: 2fr 1fr;
  }
}

.profile-lower {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Side-by-side colleagues + sidebar on desktop (explicit grid; matches company-bento) */
.company-bento.profile-colleagues-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .company-bento.profile-colleagues-bento {
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  }
}

.profile-colleagues-bento .profile-colleagues {
  min-width: 0;
}

.profile-colleagues .company-masked-email {
  overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
  .profile-colleagues-bento .profile-colleagues .company-table-wrap {
    margin: 0 -1rem;
  }

  .profile-colleagues-bento .profile-colleagues .company-table th,
  .profile-colleagues-bento .profile-colleagues .company-table td {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .profile-colleagues-bento .profile-colleagues .company-masked-email {
    font-size: 11px;
  }
}

.profile-main-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-section-card {
  background: var(--directory-surface-container-lowest);
  border: 1px solid rgba(196, 198, 210, 0.45);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.profile-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--directory-secondary);
  margin-bottom: 1rem;
}

.profile-section-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--directory-on-surface-variant);
  white-space: pre-line;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-about-company {
  background: var(--directory-surface-container-lowest);
  border: 1px solid rgba(196, 198, 210, 0.45);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.profile-about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.profile-about-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--directory-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.profile-about-link:hover {
  text-decoration: underline;
}

.profile-about-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #001e4f;
}

.profile-about-size {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 198, 210, 0.35);
}

.profile-about-size-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--directory-on-surface-variant);
}

.profile-about-size-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #001e4f;
}

.profile-colleagues {
  margin-top: 0;
}

.profile-colleague-link {
  color: inherit;
  text-decoration: none;
}

.profile-colleague-link:hover {
  color: var(--directory-secondary);
  text-decoration: underline;
}

.directory-main:has(.profile-hero) {
  gap: 1.5rem;
}
