/* Shared control language: quiet surfaces, outline icons and one clear selection. */
:root{
  --nm-control-primary:#6441A5;
  --nm-control-hover:#54348E;
  --nm-control-accent:#DAB75D;
  --nm-control-surface:var(--exp-surface);
  --nm-control-ink:var(--exp-ink);
  --nm-control-link:var(--exp-purple);
  --nm-control-line:var(--exp-line);
  --nm-control-soft:var(--exp-lilac);
  --nm-control-radius:12px;
}
:root[data-nm-theme=soft]{--nm-control-primary:#4B6F5C;--nm-control-hover:#3A5949;--nm-control-accent:#D2BE85}
:root .nm-control-icon{
  display:inline-block;flex:0 0 auto;width:20px;height:20px;
  max-width:none;vertical-align:middle;stroke-width:1.8;
  color:inherit;pointer-events:none;
}
:root .nm-control-label{font:inherit;line-height:inherit;min-width:0}
:root .exp-demo-restore{display:inline-flex;align-items:center;justify-content:center;gap:6px}
:root .exp-demo-restore .nm-control-icon{width:16px;height:16px}
:root :is(.exp-main-nav,.exp-bottom-nav) .nm-control-icon{width:22px;height:22px}
:root :is(.button,.icon-button,.connect-button,.pass-button,.exp-later-button,.send-button,
  .exp-main-nav button,.exp-bottom-nav button,.exp-sections button,.exp-tabs button,
  .nm-profile-editor-nav button,.nm-discovery-more>summary){border-radius:var(--nm-control-radius)!important}
:root :is(.exp-main-nav,.exp-bottom-nav,.exp-sections) button,
:root :is(.exp-toolbar,.nm-discovery-tools)>.button,
:root .nm-discovery-tool-links>.button,
:root :is(.exp-tabs,.exp-theme,.intent-switch) button,
:root .nm-profile-editor-nav button{
  background:var(--nm-control-surface)!important;color:var(--nm-control-ink)!important;
  border:1px solid var(--nm-control-line)!important;box-shadow:none!important;
}
:root :is(.exp-main-nav,.exp-bottom-nav,.exp-sections) button{gap:8px}
:root .exp-main-nav button{border-left-width:3px!important;border-left-color:var(--nm-control-line)!important}
:root .nm-app .exp-toolbar>button.button:nth-child(2){
  background:var(--nm-control-surface)!important;color:var(--nm-control-ink)!important;
  border-color:var(--nm-control-line)!important;
}
:root :is(.exp-toolbar,.nm-discovery-tool-links) .button,
:root .nm-discovery-tools>.button{gap:8px}
:root .nm-discovery-more>summary{gap:8px}
:root .nm-discovery-more>summary::after{content:none}
.nm-disclosure-icon{margin-left:auto;transition:transform .15s ease}
.nm-discovery-more[open]>summary>.nm-disclosure-icon{transform:rotate(180deg)}
:root .exp-theme{gap:4px;padding:4px;border-radius:16px;background:var(--nm-control-soft)}
:root .exp-theme button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px!important;border-radius:var(--nm-control-radius)!important}
:root .exp-appearance>summary{display:flex;align-items:center;gap:8px}

/* Selection is distinct from the quieter unselected controls in every view. */
:root :is(.exp-main-nav,.exp-bottom-nav,.exp-sections) button[aria-current=page],
:root .nm-profile-editor-nav button[aria-current=page],
:root :is(.exp-tabs,.intent-switch) button[aria-selected=true],
:root .intent-switch button.active,
:root .exp-theme button[aria-pressed=true]{
  background:var(--nm-control-primary)!important;color:#FFFFFF!important;
  border-color:var(--nm-control-primary)!important;
  font-weight:750;box-shadow:inset 0 -3px 0 var(--nm-control-accent)!important;
}
:root .exp-main-nav button[aria-current=page]{border-left-color:var(--nm-control-accent)!important;box-shadow:none!important}
:root :is(.exp-main-nav,.exp-bottom-nav) button[aria-current=page] .nm-control-icon{color:var(--nm-control-accent)}
:root :is(.button.primary,.login-button,.send-button){
  background:var(--nm-control-primary)!important;color:#FFFFFF!important;
  border:1px solid var(--nm-control-primary)!important;box-shadow:none!important;
}
:root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions button{
  border-radius:var(--nm-control-radius)!important;
  background:var(--nm-control-surface)!important;color:var(--nm-control-ink)!important;
  border:1px solid var(--nm-control-line)!important;box-shadow:none!important;
}
:root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions .connect-button,
:root .exp-profile.nm-profile-palette .exp-profile-actions .primary{
  background:var(--nm-control-primary)!important;color:#FFFFFF!important;
  border-color:var(--nm-control-primary)!important;
}
:root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions .nm-control-label{font:inherit;line-height:inherit}
:root .person-card.exp-discovery-card.nm-profile-palette .read-profile{color:var(--nm-control-link)!important}
:root .person-card.exp-discovery-card.nm-profile-palette .read-profile .nm-control-label{margin-left:auto}

/* Public profile tabs use the same selection grammar as the main navigation. */
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab{
  background:var(--nm-control-surface)!important;color:var(--nm-control-ink)!important;
  border:1px solid var(--nm-control-line)!important;border-radius:var(--nm-control-radius)!important;
  box-shadow:none!important;gap:6px;
}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab[aria-selected=true]{
  background:var(--nm-control-primary)!important;color:#FFFFFF!important;
  border-color:var(--nm-control-primary)!important;font-weight:750;
  box-shadow:inset 0 -3px 0 var(--nm-control-accent)!important;
}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab[aria-selected=true] .nm-control-icon{color:var(--nm-control-accent)}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab .nm-control-label{font:inherit;line-height:inherit}
:root :is(.exp-tabs,.intent-switch){gap:4px}

/* Reading and form surfaces are neutral; personal identity colors stay intact. */
:root :is(.form-section,.nm-topic-grid article,.nm-social-group-hero,.nm-social-demo,
  .nm-social-group-card,.nm-group-card){
  background:var(--exp-surface)!important;color:var(--exp-ink)!important;
  border:1px solid var(--exp-line)!important;border-radius:20px!important;
}
:root :is(.nm-app,.nm-modal) :is(button,summary,a):focus-visible{
  outline:3px solid var(--exp-purple)!important;outline-offset:3px;
}
@media(hover:hover){
  :root :is(.exp-main-nav,.exp-bottom-nav,.exp-sections) button:not([aria-current=page]):hover,
  :root :is(.exp-tabs,.intent-switch) button:not([aria-selected=true]):not(.active):hover,
  :root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab:not([aria-selected=true]):hover{
    background:var(--nm-control-soft)!important;color:var(--nm-control-ink)!important;
    border-color:var(--nm-control-primary)!important;
  }
  :root .button.primary:hover:not(:disabled),
  :root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions .connect-button:hover:not(:disabled){background:var(--nm-control-hover)!important}
}
@media(max-width:760px){
  :root .nm-discovery-tool-links>.button{justify-content:flex-start;text-align:left}
  :root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions .nm-control-icon{width:16px;height:16px}
}
@media(max-width:360px){
  :root .page-discover .exp-swipe-intro>div{font-size:var(--nm-readable-small,13px);line-height:1.5}
  :root .person-card.exp-discovery-card.nm-profile-palette>.person-card-actions .nm-control-icon{display:none}
}
@media(prefers-reduced-motion:reduce){.nm-disclosure-icon{transition:none}}
