header .mobile-account { display:none; }
.portal-signed-in header [data-portal-account] { display:inline-flex; align-items:center; gap:.55rem; min-width:0; }
.portal-signed-in header .mobile-account { display:none; }
header [data-portal-account] .portrait {
  display:inline-grid; place-items:center; flex:none; width:3.3rem; height:3.3rem; overflow:hidden;
  border:1px solid #47d9eb; border-radius:50%; color:#acf4fc; background:#10333f;
  font:700 .85rem/1 Arial,sans-serif;
}
header [data-portal-account] .portrait img { display:block; width:100%; height:100%; object-fit:cover; }
header .account-labels { display:grid; gap:.15rem; min-width:0; line-height:1.15; text-align:left; }
header .account-labels strong { font-weight:600; max-width:14rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
header .account-labels small { font-size:.7rem; color:#a6c9cc; }
@media(max-width:1100px) {
  .portal-signed-in header .mobile-account { display:inline-flex; margin-left:auto; }
  .portal-signed-in header .header-contact { margin-left:1rem; }
}
@media(max-width:640px) {
  .portal-signed-in header .header-contact { display:none; }
  .portal-signed-in header .menu-toggle { margin-left:.6rem; }
  header .mobile-account .account-labels strong { max-width:clamp(4rem,23vw,9rem); font-size:.82rem; }
  header .mobile-account .portrait { width:2.925rem; height:2.925rem; }
}

html { --ttc-header-height:96px; scroll-padding-top:calc(var(--ttc-header-height) + .75rem); }
body > header { position:sticky; top:0; z-index:50; background:#070d11; border-bottom:1px solid #40cfe3; }
@media(max-width:1100px) {
  body > header nav.open { top:100%; max-height:calc(100dvh - var(--ttc-header-height)); overflow-y:auto; overscroll-behavior:contain; }
}
@media(max-width:720px) { html { --ttc-header-height:86px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

@media (min-width:1101px) {
  body > header nav { --nav-gap:clamp(1.75rem,3.35vw,4.4rem); column-gap:var(--nav-gap); }
  body > header nav > a { white-space:nowrap; }
  body > header nav > .header-alpha { position:relative; border-left:0; padding-left:0; }
  body > header nav > .header-alpha::before {
    content:""; position:absolute; top:0; bottom:0; left:calc(var(--nav-gap) * -.5);
    width:1px; background:#29434e; pointer-events:none;
  }
}

/* Desktop, signed in: the links, Let's talk and the account sit together as one tidy group on the
   right, with even spacing, instead of spreading across the whole header. The logo stays on the left. */
@media (min-width:1101px) {
  .portal-signed-in body > header { justify-content:flex-start; padding-inline-end:clamp(1.25rem,2.2vw,2.75rem); }
  .portal-signed-in body > header nav { --nav-gap:2.1rem; margin-left:auto; }
  .portal-signed-in body > header nav > a:not(.header-alpha) { font-size:14px; font-weight:500; color:#cfe2e7; transition:color .15s; }
  .portal-signed-in body > header nav > a:not(.header-alpha):hover { color:#5ee3f2; }
  .portal-signed-in header nav [data-portal-account] { display:none; }
  .portal-signed-in header .header-contact {
    order:1; margin:0 0 0 2.1rem; display:inline-flex; align-items:center; gap:.55rem; height:2.5rem; padding:0 1.1rem;
    border:1px solid #2c5562; border-radius:999px; background:#0b1a20; color:#e9f8fb; font-size:13px; font-weight:600;
    transition:border-color .15s,background-color .15s;
  }
  .portal-signed-in header .header-contact:hover { border-color:#35d6ed; background:#0f2830; }
  .portal-signed-in header .header-contact span { margin:0; }
  .portal-signed-in header .mobile-account {
    display:inline-flex; order:2; margin-left:.75rem; height:3rem; padding:.25rem 1.05rem .25rem .25rem;
    border:1px solid #1f3a44; border-radius:999px; background:#0b161b; transition:border-color .15s;
  }
  .portal-signed-in header .mobile-account:hover { border-color:#35d6ed; }
  .portal-signed-in header .mobile-account .portrait { width:2.5rem; height:2.5rem; }
  .portal-signed-in header .mobile-account .account-labels strong { font-size:.9rem; max-width:11rem; }
  .portal-signed-in header .mobile-account .account-labels small { font-size:.68rem; }
  header .menu-toggle { order:3; }
}
/* Small phones: show only the photo so it doesn't crowd the TTC wordmark. */
@media (max-width:470px) {
  header .mobile-account .account-labels { display:none; }
}
