/* PW-1 — Personal Profile Mission Brief.
   This layer is deliberately route- and role-scoped so the Personal landing,
   Mission Center, Requests, and Organizer/Admin profile owners stay unchanged. */

/* Shared Mission Brief foundation. PW-2 opts Personal Requests into the exact
   Header, token, and page-field language established by PW-1. */
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) {
  --pw-dark: #241d14;
  --pw-dark-ink: #fffdf8;
  --pw-dark-muted: #d9cdb6;
  --pw-dark-soft: #b7a98c;
  --pw-page: #fbf6ec;
  --pw-panel: #fffdf8;
  --pw-ink: #241d14;
  --pw-ink-2: #362b1d;
  --pw-ink-3: #4b4030;
  --pw-muted: #7a6e5c;
  --pw-line: #e7d5b2;
  --pw-line-soft: #efe1c5;
  --pw-orange: #ea580c;
  --pw-orange-dark: #c2410c;
  --pw-orange-soft: #fde7d2;
  --pw-orange-line: #f6c69b;
  --pw-green: #227a4b;
  background: var(--pw-page) !important;
  color: var(--pw-ink);
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar {
  height: 68px !important;
  min-height: 68px !important;
  background: var(--pw-dark) !important;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12) !important;
  color: var(--pw-dark-ink) !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar.is-scrolled {
  background: var(--pw-dark) !important;
  border-bottom-color: rgba(255, 253, 248, 0.18) !important;
  box-shadow: 0 1px 0 rgba(12, 8, 4, 0.24) !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .brand,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .brand strong,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar .shell-nav-item {
  color: var(--pw-dark-ink) !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar .shell-nav-item:hover,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar .shell-nav-item:focus-visible,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar .shell-nav-item.active {
  background: rgba(255, 253, 248, 0.1) !important;
  color: var(--pw-dark-ink) !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions [data-header-preference-control],
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #profileShortcut,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #loginShortcut,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #signupShortcut,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #logoutButton,
:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #feedbackTopbarButton {
  display: none !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions {
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 5px;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #notificationButton {
  order: 1;
  display: inline-flex !important;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  background: transparent !important;
  border: 0 !important;
  color: var(--pw-dark-ink) !important;
  box-shadow: none !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .topbar > .auth-actions #personalAccountTrigger {
  order: 2;
  display: inline-flex !important;
}

:is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context) > .page-shell {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 68px);
  margin: 0 !important;
  padding: 0 !important;
  background: var(--pw-page);
}

/* Authenticated discovery pages already sit below the shared Header. Keep one
   moderate route-head gap instead of stacking the legacy shell compensation
   with each discovery introduction's own top padding. */
@media (min-width: 760px) {
  body.app-shell-v2.app-shell-guest.personal-discovery-context[data-shell-role="personal"]:has(:is(#competitions, #teams, #members).active-view) > .page-shell {
    padding-top: 0 !important;
  }

  body.app-shell-v2.app-shell-guest.personal-discovery-context[data-shell-role="personal"] #competitions.competition-page-v2 .competition-discovery-intro,
  body.app-shell-v2.app-shell-guest.personal-discovery-context[data-shell-role="personal"] #teams.team-page-v2 .reference-page-head,
  body.app-shell-v2.app-shell-guest.personal-discovery-context[data-shell-role="personal"] #members.member-page-v2 .reference-page-head {
    padding-top: 18px !important;
  }
}

body.personal-profile-context > .page-shell > #profile.view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.personal-profile-context #profile > .section-title-row,
body.personal-profile-context #profile > .profile-bottom-actions {
  display: none !important;
}

body.personal-profile-context #profileContent {
  width: 100%;
  max-width: none;
}

.pw-profile-page {
  min-width: 0;
  background: var(--pw-page);
  color: var(--pw-ink);
  font-family: "DM Sans", "Bai Jamjuree", system-ui, sans-serif;
}

.pw-profile-exit {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.pw-profile-logout {
  min-width: 150px;
}

.pw-profile-brief {
  position: sticky;
  top: 68px;
  z-index: 35;
  min-height: 118px;
  background: var(--pw-dark);
  color: var(--pw-dark-ink);
}

.pw-profile-brief-inner {
  width: min(calc(100% - 80px), 1200px);
  min-height: 118px;
  margin: 0 auto;
  padding: 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.pw-profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.pw-profile-avatar-actions {
  position: relative;
  width: 100px;
  height: 72px;
  flex: 0 0 100px;
  display: grid;
  place-items: center;
}

.pw-profile-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.24);
  border-radius: 50%;
  background: #4a3b28;
  color: var(--pw-dark-ink);
  font-family: "Bai Jamjuree", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.pw-profile-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pw-profile-avatar.has-image .pw-profile-avatar-fallback {
  visibility: hidden;
}

.pw-profile-photo-action {
  position: absolute;
  top: 71px;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pw-dark-soft);
  font: inherit;
  font-size: 10.5px;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: center;
}

.pw-profile-photo-action[data-remove-profile-avatar] { top: 86px; }

.pw-profile-photo-action:hover {
  color: var(--pw-dark-ink);
}

.pw-profile-identity-copy {
  min-width: 0;
}

.pw-profile-brief-label,
.pw-profile-kicker {
  margin: 0 0 5px;
  color: var(--pw-muted);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pw-profile-brief-label {
  color: var(--pw-dark-soft);
}

.pw-profile-identity-copy h1 {
  max-width: min(720px, 62vw);
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  color: var(--pw-dark-ink);
  font-family: "Bai Jamjuree", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pw-profile-identity-meta {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--pw-dark-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pw-profile-edit.button.primary {
  min-width: 132px;
  min-height: 40px;
  flex: 0 0 auto;
  border-color: var(--pw-orange) !important;
  background: var(--pw-orange) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.pw-profile-workspace {
  min-height: calc(100vh - 186px);
  background: var(--pw-page);
}

.pw-profile-workspace-inner,
.pw-profile-skeleton-grid {
  width: min(calc(100% - 80px), 1200px);
  margin: 0 auto;
  padding: 22px 0 56px;
}

.pw-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 1fr);
  grid-template-areas:
    "about completeness"
    "matching completeness"
    "matching team"
    "matching education";
  align-items: start;
  gap: 18px;
}

.pw-profile-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--pw-line);
  border-radius: 12px;
  background: var(--pw-panel);
  box-shadow: none;
}

.pw-profile-about { grid-area: about; }
.pw-profile-completeness { grid-area: completeness; }
.pw-profile-matching { grid-area: matching; }
.pw-profile-team { grid-area: team; }
.pw-profile-education { grid-area: education; }

.pw-profile-panel h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--pw-ink-2);
  font-family: "Bai Jamjuree", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.pw-profile-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pw-profile-bio,
.pw-profile-empty-copy,
.pw-profile-panel-copy {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--pw-ink-3);
  font-family: "Bai Jamjuree", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.pw-profile-empty-copy,
.pw-profile-panel-copy,
.pw-profile-missing,
.pw-profile-disclosure {
  color: var(--pw-muted);
}

.pw-profile-score {
  display: flex;
  align-items: baseline;
  color: var(--pw-orange-dark);
  font-variant-numeric: tabular-nums;
}

.pw-profile-score strong {
  font-size: 30px;
  line-height: 1;
}

.pw-profile-score span {
  font-size: 13px;
  font-weight: 700;
}

.pw-profile-progress {
  height: 7px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--pw-line-soft);
}

.pw-profile-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pw-orange);
}

.pw-profile-score-status {
  margin: 7px 0 0;
  color: var(--pw-orange-dark);
  font-size: 12.5px;
  font-weight: 700;
}

.pw-profile-checklist {
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.pw-profile-checklist li {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid var(--pw-line-soft);
  color: var(--pw-ink-3);
  font-size: 13px;
  line-height: 1.4;
}

.pw-profile-checklist li > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pw-profile-checklist small {
  color: var(--pw-muted);
  font-size: 12px;
  line-height: 1.45;
}

.pw-profile-checklist .is-complete {
  color: var(--pw-green);
}

.pw-profile-check-symbol {
  width: 17px;
  flex: 0 0 17px;
  font-weight: 800;
  text-align: center;
}

.pw-profile-panel-action {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
}

.pw-profile-detail-list,
.pw-profile-team-facts {
  margin: 13px 0 0;
}

.pw-profile-detail-list > div,
.pw-profile-team-facts > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--pw-line-soft);
}

.pw-profile-detail-list dt,
.pw-profile-team-facts dt {
  color: var(--pw-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.pw-profile-detail-list dd,
.pw-profile-team-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--pw-ink-3);
  font-size: 13.5px;
  line-height: 1.55;
}

.pw-profile-chip-list,
.pw-profile-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pw-profile-chip,
.pw-profile-skill {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--pw-line);
  border-radius: 8px;
  overflow-wrap: anywhere;
  background: #fff9ef;
  color: var(--pw-ink-3);
  font-size: 12.5px;
  line-height: 1.25;
}

.pw-profile-skill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.pw-profile-skill small {
  color: var(--pw-muted);
  font-size: 10.5px;
}

.pw-profile-role-badge {
  padding: 5px 8px;
  border: 1px solid var(--pw-orange-line);
  border-radius: 99px;
  background: var(--pw-orange-soft);
  color: var(--pw-orange-dark);
  font-size: 11.5px;
  font-weight: 700;
}

.pw-profile-panel-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pw-profile-panel-actions .button {
  min-height: 40px;
}

.pw-profile-text-action {
  min-height: 40px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pw-orange-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pw-profile-contact-row {
  min-height: 44px;
  margin-top: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--pw-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pw-muted);
  font-size: 12.5px;
}

.pw-profile-contact-row .profile-social-row {
  margin: 0;
}

.pw-profile-contact-actions,
.pw-profile-contact-icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pw-profile-contact-actions .profile-social-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
}

.pw-profile-contact-row .profile-social-edit,
.pw-profile-contact-row #addProfileSocialLinksButton {
  min-height: 36px;
}

.pw-profile-disclosure {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
}

.pw-profile-load-note {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid var(--pw-line);
  border-radius: 9px;
  background: var(--pw-panel);
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.5;
}

.pw-profile-load-note.is-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: var(--pw-orange-line);
  background: var(--pw-orange-soft);
  color: var(--pw-ink-3);
}

.pw-profile-load-note button {
  min-width: max-content;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--pw-orange-dark);
  border-radius: 8px;
  background: transparent;
  color: var(--pw-orange-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pw-profile-skeleton-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 1fr);
  gap: 18px;
}

.pw-profile-skeleton-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--pw-line);
  border-radius: 12px;
  background: var(--pw-panel);
}

.pw-profile-skeleton-card span {
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: 13px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f0e3ca 25%, #faf2e3 45%, #f0e3ca 65%);
  background-size: 220% 100%;
  animation: pw-profile-shimmer 1.2s linear infinite;
}

.pw-profile-skeleton-card span:first-child { width: 34%; }
.pw-profile-skeleton-card span:nth-child(3) { width: 78%; }
.pw-profile-skeleton-card-2 { grid-row: span 2; }

body.personal-profile-context :where(.pw-profile-page button, .pw-profile-page a, .pw-profile-page label[for]):focus-visible {
  outline: 2px solid var(--pw-orange);
  outline-offset: 2px;
}

body.personal-profile-context > .topbar :where(button, a):focus-visible {
  outline: 2px solid #f0a868;
  outline-offset: 2px;
}

@media (hover: hover) {
  .pw-profile-edit:hover { background: #d94f08 !important; }
  .pw-profile-text-action:hover,
  .pw-profile-photo-action:hover { color: #fffdf8; }
  .pw-profile-panel .pw-profile-text-action:hover { color: var(--pw-orange); }
}

.pw-profile-page button:active,
.pw-profile-page label[for]:active {
  transform: translateY(1px);
}

@keyframes pw-profile-shimmer {
  to { background-position: -220% 0; }
}

@media (max-width: 900px) {
  .pw-profile-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "completeness" "about" "matching" "team" "education";
  }

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

  .pw-profile-skeleton-card-2 { grid-row: auto; }
}

@media (max-width: 1050px) {
  body.personal-profile-context > .topbar {
    position: fixed !important;
    inset: 0 0 auto !important;
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 16px !important;
    display: grid !important;
    grid-template-areas: "menu brand account";
    grid-template-columns: 44px minmax(0, 1fr) 88px !important;
    gap: 8px;
    max-width: none !important;
    box-sizing: border-box;
    justify-content: stretch !important;
  }

  body.personal-profile-context > .topbar > #mobileMenuButton {
    grid-area: menu !important;
    display: inline-flex !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    justify-self: start;
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--pw-dark-ink) !important;
  }

  body.personal-profile-context > .topbar > #mobileMenuButton .mobile-menu-button-icon-guest-open { display: block !important; }
  body.personal-profile-context > .topbar > #mobileMenuButton .mobile-menu-button-icon-auth-open { display: none !important; }

  body.personal-profile-context > .topbar > .brand {
    grid-area: brand;
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start;
    align-self: center;
    margin: 0 !important;
    min-width: 0;
  }

  body.personal-profile-context > .topbar > .auth-actions {
    grid-area: account;
    grid-column: 3 !important;
    grid-row: 1 !important;
    height: 56px;
    min-width: auto !important;
    width: max-content !important;
    padding: 0;
    position: static;
    align-self: center;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  html body[data-page="app"].app-shell-v2.app-shell-guest.personal-profile-context > .topbar > .auth-actions {
    width: 88px !important;
    min-width: 88px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  html body[data-page="app"].app-shell-v2.app-shell-guest.personal-profile-context > .topbar > .auth-actions > #notificationButton.notification-button {
    display: inline-grid !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--pw-dark-ink) !important;
    box-shadow: none !important;
  }

  html body[data-page="app"].app-shell-v2.app-shell-guest.personal-profile-context > .topbar > .auth-actions > #personalAccountTrigger.personal-account-trigger {
    display: inline-flex !important;
    align-self: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0 !important;
    padding: 2px;
  }

  body.personal-profile-context .personal-account-trigger-avatar {
    width: 36px;
    height: 36px;
  }

  body.personal-profile-context .personal-account-chevron { display: none; }

  body.personal-profile-context .personal-account-surface {
    top: 56px;
    max-height: calc(100dvh - 56px);
  }

  body.personal-profile-context .personal-account-scrim {
    top: 56px;
  }

  body.personal-profile-context > .page-shell {
    margin-top: 56px !important;
    min-height: calc(100vh - 56px);
  }

  .pw-profile-brief {
    top: 56px;
  }
}

@media (max-width: 640px) {
  body.personal-profile-context > .topbar {
    padding: 0 16px !important;
  }

  body.personal-profile-context > .topbar .brand-mark {
    width: 30px;
    height: 30px;
  }

  body.personal-profile-context > .topbar .brand strong {
    font-size: 13px;
  }

  .pw-profile-brief {
    position: sticky;
    top: 56px;
    min-height: 130px;
  }

  .pw-profile-brief-inner {
    width: calc(100% - 32px);
    min-height: 130px;
    padding: 8px 0;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .pw-profile-identity {
    gap: 12px;
  }

  .pw-profile-avatar-actions {
    width: 64px;
    height: 56px;
    flex-basis: 64px;
  }

  .pw-profile-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 17px;
  }

  .pw-profile-photo-action {
    display: none;
  }

  .pw-profile-brief-label {
    display: none;
  }

  .pw-profile-identity-copy h1 {
    max-width: none;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 20px;
    line-height: 1.27;
  }

  .pw-profile-identity-meta {
    display: none;
  }

  .pw-profile-edit.button.primary {
    width: 100%;
    min-height: 48px;
  }

  .pw-profile-workspace-inner,
  .pw-profile-skeleton-grid {
    width: calc(100% - 32px);
    padding: 12px 0 36px;
  }

  .pw-profile-grid,
  .pw-profile-skeleton-grid {
    gap: 12px;
  }

  .pw-profile-panel {
    padding: 14px;
  }

  .pw-profile-panel h2 {
    font-size: 17px;
    line-height: 1.35;
  }

  .pw-profile-bio,
  .pw-profile-empty-copy,
  .pw-profile-panel-copy {
    font-size: 14px;
    line-height: 1.65;
  }

  .pw-profile-detail-list > div,
  .pw-profile-team-facts > div {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 0;
  }

  .pw-profile-panel-action,
  .pw-profile-panel-actions .button,
  .pw-profile-text-action,
  .pw-profile-contact-row .button,
  .pw-profile-load-note button,
  .pw-profile-logout {
    min-height: 48px;
  }

  .pw-profile-logout {
    width: 100%;
  }

  .pw-profile-contact-row .profile-social-edit {
    height: 48px !important;
    min-height: 48px !important;
  }

  .pw-profile-contact-actions .profile-social-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .pw-profile-load-note.is-error {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 389px) {
  body.personal-profile-context > .topbar {
    padding: 0 10px !important;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 4px;
  }

  body.personal-profile-context > .topbar > #mobileMenuButton,
  body.personal-profile-context > .topbar > .auth-actions #notificationButton {
    width: 40px !important;
    min-width: 40px !important;
  }

  body.personal-profile-context > .topbar > .auth-actions #personalAccountTrigger {
    padding-inline: 2px;
  }

  body.personal-profile-context .personal-account-trigger-avatar {
    width: 38px;
    height: 38px;
  }

  .pw-profile-brief-inner,
  .pw-profile-workspace-inner,
  .pw-profile-skeleton-grid {
    width: calc(100% - 28px);
  }

  .pw-profile-detail-list > div,
  .pw-profile-team-facts > div {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-profile-page *,
  .pw-profile-page *::before,
  .pw-profile-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Approved Light Color System rollout: shared Personal shell and Profile. */
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] {
  --pw-dark: #FFFFFF;
  --pw-dark-ink: #18181B;
  --pw-dark-muted: #71717A;
  --pw-dark-soft: #71717A;
  --pw-page: #FFFFFF;
  --pw-panel: #FFFFFF;
  --pw-ink: #18181B;
  --pw-ink-2: #18181B;
  --pw-ink-3: #3F3F46;
  --pw-muted: #71717A;
  --pw-line: #E5E7EB;
  --pw-line-soft: #F2F3F4;
  --pw-orange: #EA580C;
  --pw-orange-dark: #C2410C;
  --pw-orange-soft: #FFF4ED;
  --pw-orange-line: #FED7AA;
  --pw-green: #15803D;
  background: #FFFFFF !important;
  color: #18181B;
}

html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar,
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar.is-scrolled {
  border-bottom-color: #E5E7EB !important;
  background: #FFFFFF !important;
  color: #18181B !important;
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.06) !important;
}

html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar > .brand,
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar .shell-nav-item,
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar > .auth-actions #notificationButton,
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar > #mobileMenuButton {
  color: #3F3F46 !important;
}

html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar > .brand strong {
  color: #EA580C !important;
}

html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar .shell-nav-item:hover,
html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar .shell-nav-item:focus-visible {
  background: #F7F7F7 !important;
  color: #18181B !important;
}

html[data-theme="light"] :is(body.personal-profile-context, body.personal-requests-context, body.personal-mission-context, body.personal-discovery-context)[data-shell-role="personal"] > .topbar .shell-nav-item.active {
  border-color: #FED7AA !important;
  background: #FFF4ED !important;
  color: #C2410C !important;
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-brief {
  background: #F7F7F7;
  color: #18181B;
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-avatar {
  border-color: #E5E7EB;
  background: #F2F3F4;
  color: #3F3F46;
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-highlight {
  border-color: #E5E7EB;
  background: #FFFFFF;
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-skeleton span {
  background: linear-gradient(90deg, #F2F3F4 25%, #F7F7F7 45%, #F2F3F4 65%);
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-edit,
html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .button.primary {
  border-color: #C2410C !important;
  background: #C2410C !important;
  color: #FFFFFF !important;
}

html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .pw-profile-edit:hover,
html[data-theme="light"] body.personal-profile-context[data-shell-role="personal"] .button.primary:hover {
  border-color: #9A3412 !important;
  background: #9A3412 !important;
  color: #FFFFFF !important;
}
