/* Southbridge Project Account Menu — shared structure, project-scoped theme tokens. */
.sb-account {
  --sb-account-panel: #22242d;
  --sb-account-trigger-bg: #252731;
  --sb-account-trigger-hover: #30323c;
  --sb-account-border: #4b4d58;
  --sb-account-border-strong: #646572;
  --sb-account-text: #fffaf1;
  --sb-account-muted: #c2b6a7;
  --sb-account-subtle: #b4aa9d;
  --sb-account-accent: #dbb35d;
  --sb-account-accent-soft: rgba(219,179,93,.14);
  --sb-account-line: rgba(219,179,93,.18);
  --sb-account-action: #eee3d4;
  --sb-account-action-hover: rgba(223,88,61,.12);
  --sb-account-action-border: rgba(223,88,61,.34);
  --sb-account-focus: #687be0;
  --sb-account-gradient: linear-gradient(90deg,#df583d 0%,#dbb35d 52%,#687be0 100%);
  position: relative;
  z-index: 35;
  flex: 0 0 auto;
  min-width: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
}
.sb-account[data-sb-account-theme="tools"] {
  --sb-account-panel: #172124;
  --sb-account-trigger-bg: #172124;
  --sb-account-trigger-hover: #1b292c;
  --sb-account-border: #2a393b;
  --sb-account-border-strong: #3b5152;
  --sb-account-text: #edf4f2;
  --sb-account-muted: #a4b3b0;
  --sb-account-subtle: #758682;
  --sb-account-accent: #78d8c4;
  --sb-account-accent-soft: rgba(120,216,196,.12);
  --sb-account-line: rgba(210,238,231,.12);
  --sb-account-action: #dce8e3;
  --sb-account-action-hover: rgba(120,216,196,.07);
  --sb-account-action-border: rgba(120,216,196,.20);
  --sb-account-focus: #9be9d8;
  --sb-account-gradient: linear-gradient(90deg,#78d8c4 0%,#9be9d8 52%,#53897e 100%);
}
.sb-account[data-sb-account-theme="markdown"] {
  --sb-account-panel: #22242d;
  --sb-account-trigger-bg: #252731;
  --sb-account-trigger-hover: #30323c;
  --sb-account-border: rgba(219,179,93,.30);
  --sb-account-border-strong: rgba(219,179,93,.62);
  --sb-account-text: #fffaf1;
  --sb-account-muted: #c2b6a7;
  --sb-account-subtle: #b4aa9d;
  --sb-account-accent: #dbb35d;
  --sb-account-accent-soft: rgba(219,179,93,.14);
  --sb-account-line: rgba(219,179,93,.18);
  --sb-account-action: #eee3d4;
  --sb-account-action-hover: rgba(223,88,61,.12);
  --sb-account-action-border: rgba(223,88,61,.34);
  --sb-account-focus: #687be0;
  --sb-account-gradient: linear-gradient(90deg,#df583d 0%,#dbb35d 52%,#687be0 100%);
}
.sb-account[data-sb-account-theme="accessibility"] {
  --sb-account-panel: #171326;
  --sb-account-trigger-bg: #171326;
  --sb-account-trigger-hover: #211a35;
  --sb-account-border: rgba(218,207,255,.18);
  --sb-account-border-strong: rgba(182,164,255,.55);
  --sb-account-text: #f3f0ff;
  --sb-account-muted: #a69bbe;
  --sb-account-subtle: #9d91bb;
  --sb-account-accent: #b6a4ff;
  --sb-account-accent-soft: rgba(182,164,255,.15);
  --sb-account-line: rgba(218,207,255,.16);
  --sb-account-action: #e8e1ff;
  --sb-account-action-hover: rgba(182,164,255,.12);
  --sb-account-action-border: rgba(182,164,255,.38);
  --sb-account-focus: #d8ccff;
  --sb-account-gradient: linear-gradient(90deg,#8e78df 0%,#b6a4ff 55%,#d8ccff 100%);
}
.sb-account[data-sb-account-theme="data"] {
  --sb-account-panel: #182235;
  --sb-account-trigger-bg: #182235;
  --sb-account-trigger-hover: #202f4c;
  --sb-account-border: #2b3850;
  --sb-account-border-strong: #526b99;
  --sb-account-text: #e7edf7;
  --sb-account-muted: #98a6bc;
  --sb-account-subtle: #75849c;
  --sb-account-accent: #84a2ff;
  --sb-account-accent-soft: rgba(132,162,255,.13);
  --sb-account-line: rgba(141,167,248,.17);
  --sb-account-action: #d0d8e6;
  --sb-account-action-hover: rgba(132,162,255,.10);
  --sb-account-action-border: rgba(132,162,255,.32);
  --sb-account-focus: #a3b7ff;
  --sb-account-gradient: linear-gradient(90deg,#84a2ff 0%,#a3b7ff 55%,#f1ad75 100%);
}
.sb-account[data-sb-account-theme="system"] {
  --sb-account-panel: #191f33;
  --sb-account-trigger-bg: #191f33;
  --sb-account-trigger-hover: #202840;
  --sb-account-border: #343c58;
  --sb-account-border-strong: #527a88;
  --sb-account-text: #edf1ff;
  --sb-account-muted: #9ca8c8;
  --sb-account-subtle: #7885a9;
  --sb-account-accent: #63dde6;
  --sb-account-accent-soft: rgba(99,221,230,.13);
  --sb-account-line: rgba(132,148,190,.20);
  --sb-account-action: #e1e8fc;
  --sb-account-action-hover: rgba(99,221,230,.10);
  --sb-account-action-border: rgba(99,221,230,.32);
  --sb-account-focus: #a3f1f4;
  --sb-account-gradient: linear-gradient(90deg,#63dde6 0%,#a3f1f4 54%,#ff9b79 100%);
}
.sb-account[data-sb-account-theme="color"] {
  --sb-account-panel: #181a1f;
  --sb-account-trigger-bg: #181a1f;
  --sb-account-trigger-hover: #22252c;
  --sb-account-border: #2b2e36;
  --sb-account-border-strong: rgba(157,145,255,.58);
  --sb-account-text: #f0f1f5;
  --sb-account-muted: #9296a3;
  --sb-account-subtle: #717582;
  --sb-account-accent: #9d91ff;
  --sb-account-accent-soft: rgba(157,145,255,.12);
  --sb-account-line: rgba(157,145,255,.18);
  --sb-account-action: #e5e3f7;
  --sb-account-action-hover: rgba(157,145,255,.11);
  --sb-account-action-border: rgba(157,145,255,.34);
  --sb-account-focus: #b6adff;
  --sb-account-gradient: linear-gradient(90deg,#9d91ff 0%,#b6adff 55%,#d88cae 100%);
}
.sb-account[data-sb-account-theme="image"] {
  --sb-account-panel: #15171c;
  --sb-account-trigger-bg: #1b1e24;
  --sb-account-trigger-hover: #22262e;
  --sb-account-border: #2a2e36;
  --sb-account-border-strong: rgba(157,150,255,.58);
  --sb-account-text: #f0f1f3;
  --sb-account-muted: #9298a4;
  --sb-account-subtle: #6f7682;
  --sb-account-accent: #9d96ff;
  --sb-account-accent-soft: rgba(157,150,255,.12);
  --sb-account-line: rgba(157,150,255,.18);
  --sb-account-action: #e4e5ee;
  --sb-account-action-hover: rgba(157,150,255,.11);
  --sb-account-action-border: rgba(157,150,255,.32);
  --sb-account-focus: #b8b2ff;
  --sb-account-gradient: linear-gradient(90deg,#7169d6 0%,#9d96ff 55%,#e9ad74 100%);
}
.sb-account[data-sb-account-theme="photo-card"] {
  --sb-account-panel: #131a24;
  --sb-account-trigger-bg: #131a24;
  --sb-account-trigger-hover: #202a36;
  --sb-account-border: rgba(189,207,222,.20);
  --sb-account-border-strong: rgba(124,224,211,.52);
  --sb-account-text: #edf3f6;
  --sb-account-muted: #b5c2cd;
  --sb-account-subtle: #7e8d9c;
  --sb-account-accent: #7ce0d3;
  --sb-account-accent-soft: rgba(124,224,211,.12);
  --sb-account-line: rgba(189,207,222,.14);
  --sb-account-action: #e0ecee;
  --sb-account-action-hover: rgba(124,224,211,.09);
  --sb-account-action-border: rgba(124,224,211,.30);
  --sb-account-focus: #a4f2e8;
  --sb-account-gradient: linear-gradient(90deg,#7ce0d3 0%,#3bc8b8 55%,#d8bd86 100%);
}
.sb-account .sb-account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 44px;
  max-width: min(240px, 36vw);
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--sb-account-border);
  border-radius: 11px;
  background: var(--sb-account-trigger-bg);
  color: var(--sb-account-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sb-account .sb-account-trigger:hover,
.sb-account .sb-account-trigger[aria-expanded="true"] {
  border-color: var(--sb-account-border-strong);
  background: var(--sb-account-trigger-hover);
  box-shadow: 0 0 0 3px var(--sb-account-accent-soft);
}
.sb-account .sb-account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--sb-account-border);
  border-radius: 9px;
  background: var(--sb-account-accent-soft);
  color: var(--sb-account-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .02em;
}
.sb-account .sb-account-trigger-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sb-account .sb-account-trigger-copy strong {
  display: block;
  max-width: 136px;
  overflow: hidden;
  color: var(--sb-account-text);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-account .sb-account-trigger-copy small {
  display: block;
  max-width: 136px;
  overflow: hidden;
  color: var(--sb-account-subtle);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-account .sb-account-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--sb-account-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.sb-account .sb-account-trigger[aria-expanded="true"] .sb-account-chevron { transform: rotate(180deg); }
.sb-account .sb-account-trigger:focus-visible,
.sb-account .sb-account-action:focus-visible { outline: 2px solid var(--sb-account-focus); outline-offset: 3px; }
.sb-account .sb-account-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  padding: 9px;
  overflow: visible;
  isolation: isolate;
  border: 1px solid var(--sb-account-border);
  border-radius: 14px;
  background: var(--sb-account-panel);
  color: var(--sb-account-text);
  box-shadow: 0 22px 60px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.035);
  text-align: left;
}
.sb-account .sb-account-menu::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--sb-account-gradient);
  content: "";
}
.sb-account .sb-account-menu[hidden] { display: none !important; }
.sb-account .sb-account-summary { padding: 12px 12px 14px; }
.sb-account .sb-account-summary strong {
  display: block;
  color: var(--sb-account-text);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.sb-account .sb-account-summary p {
  margin: 5px 0 0;
  color: var(--sb-account-muted);
  font-size: 11px;
  line-height: 1.65;
}
.sb-account .sb-account-actions {
  display: grid;
  gap: 4px;
  padding: 7px 0 2px;
  border-top: 1px solid var(--sb-account-line);
}
.sb-account .sb-account-action {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 41px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--sb-account-action);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.sb-account .sb-account-action:hover {
  border-color: var(--sb-account-action-border);
  background: var(--sb-account-action-hover);
  color: var(--sb-account-text);
}
.sb-account .sb-account-action span:last-child { color: var(--sb-account-accent); font-size: 15px; }
.sb-account .sb-account-action:disabled { opacity: .6; cursor: wait; }
.sb-account .sb-account-feedback { margin: 9px 5px 4px; color: var(--sb-account-muted); font-size: 11px; line-height: 1.6; }
.sb-account .sb-account-feedback[hidden] { display: none !important; }
@media (max-width: 1180px) {
  .sb-account[data-sb-account-compact] .sb-account-trigger { max-width: 44px; width: 44px; height: 44px; justify-content: center; padding: 5px; }
  .sb-account[data-sb-account-compact] .sb-account-trigger-copy,
  .sb-account[data-sb-account-compact] .sb-account-chevron { display: none; }
}
@media (max-width: 760px) {
  .sb-account[data-sb-account-compact] .sb-account-trigger { width: 42px; height: 42px; min-height: 42px; padding: 4px; }
  .sb-account[data-sb-account-compact] .sb-account-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .sb-account[data-sb-account-compact] .sb-account-menu { right: -2px; width: min(310px, calc(100vw - 20px)); }
  .site-header[data-sb-has-account] { grid-template-columns: minmax(0,1fr) auto auto; }
  .site-header[data-sb-has-account] > .sb-account { grid-column: 3; grid-row: 1; }
}
@media (max-width: 430px) {
  .sb-account[data-sb-account-compact] .sb-account-menu { right: -2px; width: min(300px, calc(100vw - 16px)); }
  .site-header[data-sb-has-account] { grid-template-columns: minmax(0,1fr) auto auto; }
  .site-header[data-sb-mobile-cta="accessibility"] > .nav-cta,
  .site-header[data-sb-mobile-cta="data"] > .header-cta { display: none; }
  .site-header[data-sb-mobile-cta="accessibility"] .mobile-account-home-cta { display: inline-flex !important; }
  .site-header[data-sb-mobile-cta="data"] .mobile-workspace-link { display: flex !important; }
}
.mobile-account-home-cta, .mobile-workspace-link { display: none !important; }
@media (max-width: 760px) {
  .mobile-workspace-link { display: flex !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-account .sb-account-trigger,
  .sb-account .sb-account-chevron,
  .sb-account .sb-account-action { transition: none; }
}
