.profile-trigger{overflow:hidden;padding:0}
.profile-trigger img,.profile-menu-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.profile-menu-heading{display:flex;align-items:center;gap:12px}
.profile-menu-heading>div{min-width:0;overflow-wrap:anywhere}
.profile-menu-heading .profile-menu-avatar{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);place-items:center;flex:none;width:38px;height:38px;margin:0;border-radius:50%;overflow:hidden;background:var(--green-pale);color:var(--green-dark);font-weight:700;font-size:14px}
.profile-menu>button[data-page]{color:var(--green-dark);font-weight:700}
.profile-page,.profile-form,.profile-fields{display:grid;gap:18px}
.profile-fields{margin:0;padding:0;border:0;min-width:0}
.profile-form-section{padding:24px;min-width:0}
.profile-section-heading{margin-bottom:22px}
.profile-section-heading h2,.profile-data-card h2{font:700 16px Manrope,sans-serif;margin:0 0 5px}
.profile-section-heading p,.profile-data-card p{color:var(--muted);font-size:12px;line-height:1.6;margin:0}
.profile-overview{display:flex;align-items:flex-start;gap:28px}
.profile-avatar-column{display:flex;flex-direction:column;align-items:center;gap:9px;flex:none;width:156px}
.profile-avatar{display:grid;place-items:center;width:88px;height:88px;border-radius:50%;overflow:hidden;background:var(--green-pale);color:var(--green-dark);font:700 29px Manrope,sans-serif}
.profile-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.profile-avatar-placeholder{display:grid;place-items:center;width:100%;height:100%;border-radius:inherit;overflow:hidden;background:linear-gradient(145deg,#f2f8f3,var(--green-pale));box-shadow:inset 0 0 0 1px #dcebdd;color:var(--green-dark)}
.profile-avatar-placeholder svg{width:55%;height:55%;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.profile-avatar-column .btn{min-height:36px;font-size:12px;padding:8px 12px}
.profile-avatar-column small{font-size:10px;color:var(--muted);text-align:center;line-height:1.5}
.profile-avatar-picker{position:relative;overflow:hidden}
.profile-avatar-picker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.profile-avatar-picker:focus-within{outline:3px solid #a9cbb3;outline-offset:2px}
.profile-remove-avatar{border:0;background:transparent;color:var(--muted);padding:3px 6px;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.profile-remove-avatar[hidden]{display:none}
.profile-remove-avatar:hover{color:var(--red)}
.profile-overview-copy{flex:1;min-width:0}
.profile-overview-copy .eyebrow{font-size:10px;margin:0 0 4px}
.profile-overview-copy h3{font:700 22px Manrope,sans-serif;line-height:1.35;margin:0 0 5px;overflow-wrap:anywhere}
.profile-overview-copy>p{color:var(--muted);font-size:13px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.profile-preview-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.profile-preview-meta:empty{display:none}
.profile-preview-meta span{background:var(--green-pale);color:var(--green-dark);padding:5px 8px;border-radius:6px;font-size:11px}
.profile-overview-copy .profile-field{margin-top:18px}
.profile-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.profile-field{display:grid;gap:8px;color:#48554c;font-size:12px;font-weight:700;min-width:0}
.profile-field input,.profile-field select{width:100%;min-width:0;min-height:44px;border:1px solid #dfe7e1;border-radius:8px;padding:10px 12px;background:white;color:var(--ink);font:400 13px 'DM Sans',sans-serif}
.profile-field input:focus,.profile-field select:focus{outline:3px solid #d9ecdf;border-color:#80b28f}
.profile-field input::placeholder{color:#89968d}
.profile-number-field{display:flex;align-items:center;gap:10px;min-width:0}
.profile-number-field input{max-width:145px}
.profile-number-field span{font-size:11px;color:var(--muted);font-weight:400;white-space:nowrap}
.profile-form-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--line);border-radius:11px;background:white;box-shadow:var(--shadow)}
.profile-form-actions p{font-size:12px;line-height:1.5;color:var(--muted);margin:0;max-width:460px}
.profile-form-actions p[data-state="saved"]{color:var(--green-dark);font-weight:700}
.profile-form-actions p[data-state="error"]{color:#a33d36}
.profile-action-buttons,.profile-data-actions{display:flex;gap:10px;flex:none;align-items:center}
.profile-data-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px}
.profile-page .btn:disabled{opacity:.48;cursor:default}
.profile-page button:focus-visible{outline:3px solid #a9cbb3;outline-offset:2px}
.profile-sync{display:inline-flex;gap:6px;align-items:center}
.profile-sync>span{font-size:16px;line-height:1}
.profile-fields:disabled{opacity:.72}
@media(max-width:1100px){.profile-form-actions,.profile-data-card{flex-wrap:wrap}.profile-action-buttons{margin-left:auto}}
@media(max-width:700px){
  .profile-page,.profile-form,.profile-fields{gap:14px}
  .profile-form-section{padding:18px}
  .profile-section-heading{margin-bottom:18px}
  .profile-section-heading h2,.profile-data-card h2{font-size:15px}
  .profile-overview{flex-direction:column;gap:18px}
  .profile-avatar-column{width:100%;display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px 14px;justify-items:start;align-items:center}
  .profile-avatar{width:72px;height:72px;font-size:24px;grid-row:1 / span 3}
  .profile-avatar-column small{grid-column:2;text-align:left}
  .profile-overview-copy{width:100%}
  .profile-overview-copy h3{font-size:20px}
  .profile-field-grid{grid-template-columns:1fr;gap:18px}
  .profile-form-actions{padding:16px;align-items:stretch;gap:12px}
  .profile-action-buttons{width:100%;margin:0;flex-wrap:wrap}
  .profile-action-buttons .btn{flex:1;min-height:44px;white-space:nowrap;padding:10px 12px}
  .profile-data-card{padding:18px;align-items:flex-start;gap:14px}
  .profile-data-actions{width:100%;flex-wrap:wrap}
  .profile-data-actions .btn{flex:1;min-height:44px;white-space:nowrap}
}

/* Center the profile control against the title; preserve a full touch target. */
.profile-trigger{padding:0;line-height:1;flex:none}
.profile-trigger .profile-avatar-placeholder svg{display:block;width:24px;height:24px}
@media(max-width:700px){
 .topbar{height:auto;min-height:96px;padding:18px 0;gap:12px;align-items:center}
 .topbar>div:first-child{min-width:0;flex:1}
 .profile-area{align-self:center;margin-top:0;display:flex;align-items:center}
 .profile-trigger{width:44px;height:44px}
 .profile-menu{top:calc(100% + 8px);max-width:calc(100vw - 32px)}
 .profile-field input,.profile-field select{font-size:16px}
}
