/* ═══════════════════════════════════════════════════════════════════════════
 * ArrParty.DesignSystem — shared visual vocabulary (single brand theme)
 * ═══════════════════════════════════════════════════════════════════════════
 * Plain-CSS component vocabulary. No Radzen, no Bootstrap dependence. Colours
 * resolve through the semantic action layer in brand-tokens.css:
 *   primary = indigo (--ac-primary) · accent = oxblood (--ac-accent, rationed)
 *   danger  = distinct bright red (--ac-danger) · success = green (--ac-success)
 * Most of the UI is monochrome; colour only appears where it earns meaning.
 * Class prefix `ac-`. Subtle-round corners via --aspire-border-radius-*.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────────────────────────────
 * border-box everywhere: width/height include padding + border. The whole system
 * is authored on this assumption (width:100% + padding is the norm), and it also
 * normalises the UA split where <select> is border-box but <input>/<textarea> are
 * content-box. Without it, width:100% + padding overflows its container. */
*, *::before, *::after { box-sizing: border-box; }

/* Blazor's <FocusOnNavigate Selector="h1"> adds tabindex="-1" to the page heading and focuses
   it after each navigation (good for screen readers). That heading is never keyboard-tabbable
   (tabindex=-1) and isn't interactive, so the browser's default focus ring on it is pure visual
   noise — a white box around the title on load. Drop it; there's no keyboard case to preserve. */
h1:focus { outline: none; }

/* ── Base elements ───────────────────────────────────────────────────────────
 * Anchors are STRUCTURAL by default in this UI (rows, tiles, nav links, cards):
 * they inherit the surrounding text colour so a child glyph never bleeds an
 * accent — this is what kept turning trailing chevrons oxblood. A genuine inline
 * text link opts in with .ac-link and gets the indigo action colour. (Safe across
 * the shared WebView document: the auth UI ships zero <a> elements.) */
a { color: inherit; text-decoration: none; }

.ac-link { color: var(--ac-primary); text-decoration: none; cursor: pointer; }
.ac-link:hover { color: var(--ac-primary-hover); text-decoration: underline; text-underline-offset: 2px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--aspire-spacing-2);
  min-height: 40px;
  padding: var(--aspire-spacing-3) var(--aspire-spacing-5);
  border-radius: var(--aspire-border-radius-md);
  border: 1px solid transparent;
  font-family: var(--aspire-font-family-sans);
  font-size: var(--aspire-font-size-sm);
  font-weight: var(--aspire-font-weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--aspire-transition-fast), border-color var(--aspire-transition-fast), color var(--aspire-transition-fast);
}
.ac-btn:focus-visible { outline: 2px solid var(--ac-focus); outline-offset: 2px; }
.ac-btn:disabled { opacity: .5; cursor: not-allowed; }
.ac-btn svg { width: 1.05rem; height: 1.05rem; }

/* Primary = the dedicated indigo action. */
.ac-btn--primary { background: var(--ac-primary); color: var(--ac-primary-fg); border-color: var(--ac-primary); }
.ac-btn--primary:hover:not(:disabled) { background: var(--ac-primary-hover); border-color: var(--ac-primary-hover); }

/* Tinted = a dark indigo-soft fill with indigo icon+label — the calm action treatment
   used for header CTAs (Edit / New contact). Canonical token pairing: soft fill + tint text. */
.ac-btn--tinted { background: var(--ac-primary-soft); color: var(--ac-primary-tint); border-color: var(--ac-primary-line); }
.ac-btn--tinted:hover:not(:disabled) { background: rgba(var(--ac-primary-rgb), 0.22); color: var(--ac-primary-hover); border-color: var(--ac-primary); }

.ac-btn--neutral { background: var(--brand-control); color: var(--brand-text); border-color: var(--brand-border-strong); }
.ac-btn--neutral:hover:not(:disabled) { background: var(--brand-control-hover); }

.ac-btn--ghost { background: transparent; color: var(--brand-text-idle); border-color: var(--brand-border-soft); }
.ac-btn--ghost:hover:not(:disabled) { background: var(--brand-surface-hover); color: var(--brand-text); border-color: var(--brand-border-strong); }

/* Danger = bright red, visually distinct from the oxblood accent. Outline by default. */
.ac-btn--danger { background: transparent; color: var(--ac-danger); border-color: var(--ac-danger-border); }
.ac-btn--danger:hover:not(:disabled) { background: var(--ac-danger-soft); color: var(--ac-danger-hover); }

/* Solid red reserved for the final destructive confirm. */
.ac-btn--danger-solid { background: var(--ac-danger); color: var(--ac-danger-fg); border-color: var(--ac-danger); }
.ac-btn--danger-solid:hover:not(:disabled) { background: var(--ac-danger-hover); border-color: var(--ac-danger-hover); }

.ac-btn--block { width: 100%; }
/* Compact = a tighter CTA (header actions): shorter, less padding, smaller label. */
.ac-btn--sm { min-height: 32px; padding: var(--aspire-spacing-2) var(--aspire-spacing-3); font-size: var(--aspire-font-size-xs); gap: var(--aspire-spacing-1); }
.ac-btn--sm svg { width: .95rem; height: .95rem; }

/* ── Icon buttons (flat — bare glyph, wash on hover only) ─────────────────── */
.ac-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: var(--aspire-border-radius-md);
  border: none;
  background: transparent; color: var(--brand-text-muted);
  cursor: pointer;
  transition: background-color var(--aspire-transition-fast), color var(--aspire-transition-fast);
}
.ac-icon-btn:hover:not(:disabled) { background: var(--brand-surface-hover); color: var(--brand-text); }
.ac-icon-btn:focus-visible { outline: 2px solid var(--ac-focus); outline-offset: 2px; }
.ac-icon-btn:disabled { opacity: .5; cursor: not-allowed; }
.ac-icon-btn svg { width: 1.25rem; height: 1.25rem; }
/* The [+ add] affordance — indigo action colour (never red, which reads as delete). */
.ac-icon-btn--primary { color: var(--ac-primary); }
.ac-icon-btn--primary:hover:not(:disabled) { background: var(--ac-primary-soft); color: var(--ac-primary-hover); }
.ac-icon-btn--accent { color: var(--ac-accent); }
.ac-icon-btn--accent:hover:not(:disabled) { background: var(--ac-accent-soft); color: var(--ac-accent-hover); }
.ac-icon-btn--danger { color: var(--brand-text-muted); }
.ac-icon-btn--danger:hover:not(:disabled) { background: var(--ac-danger-soft); color: var(--ac-danger); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.ac-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--brand-border-strong);
  border-top-color: var(--brand-text);
  border-radius: var(--aspire-border-radius-full);
  animation: ac-spin .6s linear infinite;
  flex: 0 0 auto;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ── Inputs & labels ─────────────────────────────────────────────────────── */
.ac-field { display: flex; flex-direction: column; }
.ac-label {
  font-family: var(--aspire-font-family-mono);
  font-size: var(--aspire-font-size-xs);
  font-weight: var(--aspire-font-weight-medium);
  /* Rev 2 base: field labels read in indigo-tint (the action colour), not gray. */
  color: var(--ac-primary-tint);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--aspire-spacing-2);
}
.ac-input, .ac-select, .ac-textarea {
  min-height: 40px;
  width: 100%;
  padding: var(--aspire-spacing-3);
  background: var(--brand-surface);
  color: var(--brand-text);
  border: 1px solid var(--brand-border-strong);
  border-radius: var(--aspire-border-radius-md);
  font-family: var(--aspire-font-family-sans);
  font-size: var(--aspire-font-size-base);
}
.ac-textarea { min-height: 5rem; resize: vertical; }
.ac-input::placeholder, .ac-textarea::placeholder { color: var(--brand-text-dim); }
.ac-input:focus-visible, .ac-select:focus-visible, .ac-textarea:focus-visible { outline: 2px solid var(--ac-focus); outline-offset: 1px; border-color: var(--ac-focus); }
.ac-input:disabled, .ac-select:disabled, .ac-textarea:disabled { background: var(--brand-surface-hover); color: var(--brand-text-dim); }
.ac-input--error, .ac-select--error, .ac-textarea--error { border-color: var(--ac-danger-border); }

/* Search field — softer rounding + room for a leading glyph. */
.ac-input--search { border-radius: var(--aspire-border-radius-search); padding-left: 2.4rem; }

.ac-input--code {
  font-family: var(--aspire-font-family-mono);
  font-size: var(--aspire-font-size-2xl);
  letter-spacing: .4em;
  text-align: center;
}

.ac-help { margin-top: var(--aspire-spacing-2); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); }
.ac-help--error { color: var(--ac-danger); }

/* Two-up form rows that collapse to one column when narrow. */
.ac-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--aspire-spacing-4); align-items: start; }
.ac-field__hint { min-height: 1.1rem; margin-top: var(--aspire-spacing-2); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); }
.ac-field__count { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-dim); text-align: right; margin-top: var(--aspire-spacing-2); }
/* Form-level hint sitting below a card (e.g. "what's needed to save"). */
.ac-form-hint { margin-top: var(--aspire-spacing-4); font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); }

/* Label + optional help "?" toggle. */
.ac-label-row { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); margin-bottom: var(--aspire-spacing-2); }
.ac-label-row .ac-label { margin-bottom: 0; }
.ac-helptip { position: relative; display: inline-flex; }
.ac-helptip__btn { background: transparent; border: none; padding: 0; color: var(--brand-text-dim); cursor: pointer; display: inline-flex; }
.ac-helptip__btn:hover { color: var(--brand-text-muted); }
.ac-helptip__pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--aspire-z-dropdown); width: max-content; max-width: 220px; padding: var(--aspire-spacing-2) var(--aspire-spacing-3); background: var(--brand-chrome); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-md); box-shadow: var(--aspire-shadow-md); font-family: var(--aspire-font-family-sans); font-size: var(--aspire-font-size-xs); color: var(--brand-text-idle); text-transform: none; letter-spacing: normal; line-height: 1.4; }

/* Identity / card-settings group — sets the handle + share level (app-logic, not contact
   data) apart from the fields below with a light touch: an electric-blue accent rail + a
   "Card settings" tag, no panel fill. */
.ac-form-discovery { border-left: 2px solid var(--ac-primary); padding-left: var(--aspire-spacing-4); }
.ac-form-discovery__eyebrow { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); margin-bottom: var(--aspire-spacing-4); font-family: var(--aspire-font-family-mono); font-size: 11px; font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: .12em; color: var(--ac-primary-tint); }

/* Checkbox row. */
.ac-check { display: flex; align-items: center; gap: var(--aspire-spacing-2); font-size: var(--aspire-font-size-sm); color: var(--brand-text-idle); cursor: pointer; }
.ac-check input { width: 16px; height: 16px; accent-color: var(--ac-primary); }
.ec-check-hint { margin: var(--aspire-spacing-1) 0 0 26px; font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); }

/* Profile sections (the contact-method editors). */
.ac-form-sectiontitle { font-size: var(--aspire-font-size-lg); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); margin: 0 0 var(--aspire-spacing-4); }
.ac-profilesec { background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-lg); padding: var(--aspire-spacing-4) var(--aspire-spacing-5); }
.ac-profilesec__head { display: flex; align-items: center; justify-content: space-between; gap: var(--aspire-spacing-3); }
.ac-profilesec__head .ac-detail__sectionlabel { margin-bottom: 0; }
.ac-profilesec__empty { font-size: var(--aspire-font-size-sm); color: var(--brand-text-dim); padding: var(--aspire-spacing-2) 0; }

/* Destructive section at the foot of an edit surface. */
.ac-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: var(--aspire-spacing-4); margin-top: var(--aspire-spacing-8); padding: var(--aspire-spacing-4); border: 1px solid var(--ac-danger-border); border-radius: var(--aspire-border-radius-lg); }
.ac-danger-zone__text { font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); }

/* ════════ Edit Card (Rev 2 data-entry form) ═══════════════════════════════
   The member's identity-card editor: a stack of floating panels — identity ("Card settings"
   accent-rail group, above), card content, contact groups (Split layout), bio. Field labels
   inherit the electric-blue-tint .ac-label; inputs run a touch taller on this surface. */
.ec-form .ac-input, .ec-form .ac-select, .ec-form .ac-textarea { min-height: 46px; }
.ec-form .ac-seg { min-height: 46px; padding: 4px; }
.ec-form .ac-seg__opt { flex: 1; justify-content: center; min-height: 36px; }

/* Card-content field group (names + advanced) — flush, no panel frame; separated from the
   handle/share group above by a margin. */
.ec-card { margin-top: var(--aspire-spacing-6); }

/* Handle field — @-prefixed mono input + a mono availability status line below it. */
.ac-handle { display: flex; align-items: center; gap: var(--aspire-spacing-2); padding-left: var(--aspire-spacing-3); background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-md); min-height: 46px; }
.ac-handle:focus-within { outline: 2px solid var(--ac-focus); outline-offset: 1px; border-color: var(--ac-primary); }
.ac-handle__at { font-family: var(--aspire-font-family-mono); color: var(--brand-text-dim); }
.ac-handle__input { flex: 1; min-width: 0; border: none; background: transparent; padding: 0; min-height: 44px; color: var(--brand-text); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-base); }
.ac-handle__input:focus-visible { outline: none; }
.ac-handle__input::placeholder { color: var(--brand-text-dim); }

/* Contact-method groups — Split layout: a mono type label in a left rail beside its entries. */
.ec-groups { display: flex; flex-direction: column; gap: var(--aspire-spacing-3); }
.ec-group { display: grid; grid-template-columns: 168px 1fr; background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-lg); box-shadow: var(--aspire-shadow-panel); overflow: hidden; }
.ec-group__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-4); border-right: 1px solid var(--brand-border-soft); }
.ec-group__title { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); font-family: var(--aspire-font-family-mono); font-size: 11px; font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: .1em; color: var(--ac-primary-tint); }
.ec-group__title svg { color: var(--ac-primary); }
.ec-group__entries { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 600px) {
  .ec-group { grid-template-columns: 1fr; }
  .ec-group__head { flex-direction: row; align-items: center; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--brand-border-soft); }
}

/* Entry rows. */
.ec-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-4); }
.ec-entry + .ec-entry { border-top: 1px solid var(--brand-border-soft); }
.ec-entry__main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ec-entry__qual { font-family: var(--aspire-font-family-mono); font-size: 11px; letter-spacing: .04em; color: var(--brand-text-dim); }
.ec-entry__value { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); font-size: var(--aspire-font-size-base); font-weight: var(--aspire-font-weight-medium); color: var(--brand-text); overflow-wrap: anywhere; }
.ec-entry__sub { font-size: var(--aspire-font-size-sm); color: var(--brand-text-dim); }
.ec-entry__actions { display: flex; align-items: center; gap: var(--aspire-spacing-1); flex: 0 0 auto; }

/* Add-row at the foot of each group → opens the editor pre-set to that type. */
.ec-addrow { display: flex; align-items: center; gap: var(--aspire-spacing-2); width: 100%; padding: 13px var(--aspire-spacing-4); border: none; border-top: 1px solid var(--brand-border-soft); background: transparent; color: var(--ac-primary-tint); font-family: var(--aspire-font-family-sans); font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); cursor: pointer; text-align: left; }
.ec-addrow:hover { background: var(--ac-primary-soft); }
.ec-addrow svg { color: var(--ac-primary); }

/* Global "add a contact method" — dashed indigo affordance; opens the type picker. */
.ec-addmethod { display: inline-flex; align-items: center; justify-content: center; gap: var(--aspire-spacing-2); width: 100%; margin-top: var(--aspire-spacing-3); padding: var(--aspire-spacing-3) var(--aspire-spacing-4); border: 1px dashed var(--ac-primary-line); border-radius: var(--aspire-border-radius-md); background: transparent; color: var(--ac-primary-tint); font-family: var(--aspire-font-family-sans); font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); cursor: pointer; }
.ec-addmethod:hover { background: var(--ac-primary-soft); border-color: var(--ac-primary); }
.ec-addmethod svg { color: var(--ac-primary); }

/* Capability chips (Preferred / Texts / Emergency). */
.ec-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aspire-spacing-2); margin-top: var(--aspire-spacing-2); }
.ec-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--aspire-border-radius-full); border: 1px solid transparent; font-family: var(--aspire-font-family-mono); font-size: 10px; font-weight: var(--aspire-font-weight-medium); letter-spacing: .08em; text-transform: uppercase; }
.ec-chip--preferred { background: var(--ac-primary-soft); border-color: var(--ac-primary-line); color: var(--ac-primary-tint); }  /* electric blue = preferred contact method; gold "pin" stays the Contacts favorite */
.ec-chip--texts { background: var(--brand-surface-hover); border-color: var(--brand-border-soft); color: var(--brand-text-idle); }
.ec-chip--texts svg { color: var(--brand-text-muted); }
.ec-chip--emergency { border-color: var(--ac-danger-border); color: var(--ac-danger); }
.ec-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-danger); }

/* Bio — flush field group at the foot of the form (no panel frame). */
.ec-bio { display: flex; flex-direction: column; }

/* Type picker — the seven contact-method types (glyph + label + chevron). */
.ec-picker { display: flex; flex-direction: column; gap: var(--aspire-spacing-1); }
.ec-picker__opt { display: flex; align-items: center; gap: var(--aspire-spacing-3); width: 100%; text-align: left; padding: var(--aspire-spacing-3); border: 1px solid transparent; border-radius: var(--aspire-border-radius-md); background: transparent; color: var(--brand-text); cursor: pointer; }
.ec-picker__opt:hover { background: var(--brand-surface-hover); border-color: var(--brand-border-soft); }
.ec-picker__opt > svg:last-child { margin-left: auto; color: var(--brand-text-dim); }
.ec-picker__glyph { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--aspire-border-radius-md); background: var(--brand-surface-hover); color: var(--brand-text-muted); flex: 0 0 auto; }
.ec-picker__label { font-size: var(--aspire-font-size-base); font-weight: var(--aspire-font-weight-medium); }

/* Modal title glyph chip (profile-editor head). */
.ac-modal__glyph { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--aspire-border-radius-md); background: var(--ac-primary-soft); color: var(--ac-primary-tint); flex: 0 0 auto; }

/* ════════ Cards (the member's own shareable identity cards) ════════════════
   A grid of tiles, each styled like a physical business card: a share-level top
   edge, perimeter metadata (handle + level chip), an inset content frame with
   monogram + name + role + contact strip, and a Share/Edit footer. */
.cd-page { width: 100%; padding: var(--aspire-spacing-4) 0 var(--aspire-spacing-10); }

/* Visibility filter rail — mirrors the contacts rail, tinted by the share ladder. */
.cd-rail { position: sticky; top: 0; z-index: 5; background: var(--shell-bg, var(--brand-canvas)); padding: 0 var(--aspire-spacing-5) var(--aspire-spacing-4); margin-bottom: 0; }
.ac-filter-group { display: inline-flex; flex-wrap: wrap; gap: var(--aspire-spacing-2); }
.ac-filter-chip__n { margin-left: 6px; font-family: var(--aspire-font-family-mono); font-size: 10px; color: var(--brand-text-dim); }
.ac-filter-chip--active .ac-filter-chip__n { color: inherit; }
.cd-chip--private.ac-filter-chip--active { background: var(--ac-share-private-soft); color: var(--ac-share-private); border-color: transparent; }
.cd-chip--private svg { color: var(--ac-share-private); }
.cd-chip--searchable.ac-filter-chip--active { background: var(--ac-share-searchable-soft); color: var(--ac-share-searchable); border-color: transparent; }
.cd-chip--searchable svg { color: var(--ac-share-searchable); }
.cd-chip--open.ac-filter-chip--active { background: var(--ac-share-open-soft); color: var(--ac-share-open); border-color: transparent; }
.cd-chip--open svg { color: var(--ac-share-open); }

/* Share-level pill (reach) — used by the card detail + share sheet. */
.cd-reach { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; font-family: var(--aspire-font-family-mono); font-size: 10.5px; font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: var(--aspire-border-radius-full); }
.cd-reach--icon { padding: 5px; }
.cd-reach--private { background: var(--ac-share-private-soft); color: var(--ac-share-private); }
.cd-reach--searchable { background: var(--ac-share-searchable-soft); color: var(--ac-share-searchable); }
.cd-reach--open { background: var(--ac-share-open-soft); color: var(--ac-share-open); }

/* Content frame — sharp 90° corners, sunken inset, like a playing-card frame. */
.cd-panel { margin-top: 26px; padding: 16px; background: var(--vc-bg); border: 1px solid var(--brand-border-strong); border-radius: 0; }

/* Empty state. */
.cd-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--aspire-spacing-3); padding: 64px 24px; background: var(--vc-panel); border: 1px solid var(--vc-panel-border); border-radius: var(--aspire-border-radius-2xl); }
.cd-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: var(--aspire-border-radius-xl); background: var(--brand-surface-hover); color: var(--brand-text-muted); }
.cd-empty__title { font-size: var(--aspire-font-size-lg); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); }
.cd-empty__body { max-width: 380px; font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); line-height: 1.6; text-wrap: pretty; margin-bottom: var(--aspire-spacing-2); }

/* ── Cards list: full-width stacked "identity" cards ──────────────────────────
   Cards are few (your own identities) and share-first. Each card leads with the /handle
   — the name the owner knows it by — beside the avatar + share-level badge, with the
   contact-method glyphs beneath it, and a three-up View / Share / Edit quick-action
   footer. Stacks vertically; never overflows a phone. Capped to a readable column on
   desktop, left-aligned with the intro/rail. */
.cd-list { display: flex; flex-direction: column; gap: var(--aspire-spacing-3); max-width: 720px; padding: 0 var(--aspire-spacing-5); }
.cd-card { display: flex; flex-direction: column; background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-lg); overflow: hidden; transition: border-color var(--aspire-transition-fast); }
.cd-card:hover { border-color: var(--brand-border-strong); }
/* Head: avatar + share badge, then the /handle headline with contact glyphs under it. The
   whole head opens the card (View is also an explicit footer action). */
.cd-card__head { display: flex; align-items: center; gap: var(--aspire-spacing-4); padding: var(--aspire-spacing-4) var(--aspire-spacing-5); cursor: pointer; }
.cd-card__avatar { position: relative; width: 52px; height: 52px; flex: 0 0 auto; border-radius: var(--aspire-border-radius-full); display: inline-flex; align-items: center; justify-content: center; font-size: var(--aspire-font-size-lg); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); background: var(--brand-control); }
/* Share-level badge — sits on the avatar's corner, coloured by level (word shown on hover). */
.cd-card__level { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: var(--aspire-border-radius-full); display: inline-flex; align-items: center; justify-content: center; background: var(--brand-surface); border: 1px solid var(--brand-border-soft); color: var(--brand-text-dim); }
.cd-card__level.ac-sharetag--private { color: var(--ac-share-private); }
.cd-card__level.ac-sharetag--searchable { color: var(--ac-share-searchable); }
.cd-card__level.ac-sharetag--open { color: var(--ac-share-open); }
/* Identity column: the /handle is the focal headline, contact glyphs beneath it. */
.cd-card__id { display: flex; flex-direction: column; min-width: 0; gap: var(--aspire-spacing-2); }
.cd-card__handle { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xl); font-weight: var(--aspire-font-weight-medium); color: var(--ac-primary-tint); overflow-wrap: anywhere; }
.cd-card__glyphs { display: flex; align-items: center; gap: var(--aspire-spacing-2); }
/* Quick-action footer — three equal cells (View / Share / Edit) split by hairlines. */
.cd-card__actions { display: flex; border-top: 1px solid var(--brand-border-soft); }
.cd-card__act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--aspire-spacing-2); padding: var(--aspire-spacing-3); background: transparent; border: 0; border-left: 1px solid var(--brand-border-soft); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text-muted); cursor: pointer; transition: background var(--aspire-transition-fast), color var(--aspire-transition-fast); }
.cd-card__act:first-child { border-left: 0; }
.cd-card__act:hover { background: var(--brand-surface-hover); color: var(--brand-text); }

/* ── Share sheet (inside AcModal) ── */
.cd-sheet__sub { margin: 0 0 var(--aspire-spacing-2); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); }
.cd-qr { display: flex; justify-content: center; }
.cd-qr__box { width: 188px; height: 188px; border-radius: var(--aspire-border-radius-lg); border: 1px solid var(--brand-border-strong); display: flex; align-items: center; justify-content: center; background-color: var(--brand-canvas); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 7px, transparent 7px 14px); }
.cd-qr__hint { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--brand-text-dim); }
.cd-sheet__scan { margin: var(--aspire-spacing-3) 0 var(--aspire-spacing-5); text-align: center; font-size: var(--aspire-font-size-xs); color: var(--brand-text-dim); }
.cd-linkrow { display: flex; align-items: center; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-2) var(--aspire-spacing-2) var(--aspire-spacing-2) var(--aspire-spacing-4); background: var(--brand-canvas); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-md); }
.cd-linkrow__url { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); flex: 1; min-width: 0; font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-sm); color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-linkrow__url svg { color: var(--brand-text-dim); flex: 0 0 auto; }
.cd-sheet__reach { display: flex; align-items: center; gap: var(--aspire-spacing-2); margin-top: var(--aspire-spacing-4); padding: var(--aspire-spacing-3) var(--aspire-spacing-4); border-radius: var(--aspire-border-radius-md); font-size: var(--aspire-font-size-sm); line-height: 1.45; }
.cd-sheet__reach strong { font-weight: var(--aspire-font-weight-semibold); }

/* Search wrapper positions the glyph inside the field. */
.ac-search { position: relative; }
.ac-search__glyph { position: absolute; left: var(--aspire-spacing-3); top: 50%; transform: translateY(-50%); color: var(--brand-text-dim); pointer-events: none; display: inline-flex; }
.ac-search__glyph svg { width: 1.05rem; height: 1.05rem; }

/* ── Segmented control (visibility: Private / Unlisted / Public) ──────────── */
.ac-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--brand-chrome); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-md); }
.ac-seg__opt {
  display: inline-flex; align-items: center; gap: var(--aspire-spacing-1);
  padding: var(--aspire-spacing-2) var(--aspire-spacing-3);
  border: none; background: transparent; cursor: pointer;
  border-radius: var(--aspire-border-radius-sm);
  font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs);
  letter-spacing: .04em; text-transform: uppercase; color: var(--brand-text-muted);
}
.ac-seg__opt:hover { color: var(--brand-text); }
.ac-seg__opt--active { background: var(--brand-control); color: var(--brand-text); }
.ac-seg__opt svg { width: .85rem; height: .85rem; }
/* Share ladder — the selected option carries its own share-level colour (private oxblood →
   exchange green → open slate); these override the neutral --active fill above. Private also
   gets an oxblood hairline so it reads as the rationed brand-accent (logo) colour. */
.ac-seg__opt--private.ac-seg__opt--active { background: var(--ac-share-private-soft); color: var(--ac-share-private); box-shadow: inset 0 0 0 1px var(--ac-accent-line); }
.ac-seg__opt--searchable.ac-seg__opt--active { background: var(--ac-share-searchable-soft); color: var(--ac-share-searchable); }
.ac-seg__opt--open.ac-seg__opt--active { background: var(--ac-share-open-soft); color: var(--ac-share-open); }

/* ── Inline alerts ───────────────────────────────────────────────────────── */
.ac-alert {
  display: flex;
  gap: var(--aspire-spacing-2);
  padding: var(--aspire-spacing-3);
  border-radius: var(--aspire-border-radius-md);
  font-size: var(--aspire-font-size-sm);
}
.ac-alert svg { flex: 0 0 auto; margin-top: 1px; }
.ac-alert--error { background: var(--ac-danger-soft); border: 1px solid var(--ac-danger-border); color: var(--ac-danger); }
/* Notice: recoverable/attention (412 conflict, last-personal-card) — neutral, not danger. */
.ac-alert--notice { background: var(--brand-surface-hover); border: 1px solid var(--brand-border-strong); color: var(--brand-text); }

/* Inline status whisper (optimistic save state, transient confirmations). */
.ac-status { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-medium); }
.ac-status--ok, .ac-status--saved { color: var(--ac-success); }
.ac-status--saving { color: var(--brand-text-muted); }
.ac-status--error { color: var(--ac-danger); }

/* Save-status pill (header + per-row). */
.ac-save-status { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); letter-spacing: .04em; min-height: 1.25rem; }
.ac-save-status--saving { color: var(--brand-text-muted); }
.ac-save-status--saved { color: var(--ac-success); }
.ac-save-status--error { color: var(--ac-danger); }

/* ── Snackbar (the ONLY floating timed surface) ──────────────────────────── */
.ac-snackbar-host {
  position: fixed; left: 0; right: 0; bottom: var(--aspire-spacing-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--aspire-spacing-2);
  z-index: var(--aspire-z-tooltip);
  pointer-events: none;
  padding-inline: var(--aspire-spacing-4);
}
.ac-snackbar {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--aspire-spacing-3);
  max-width: 480px; width: 100%;
  padding: var(--aspire-spacing-3) var(--aspire-spacing-4);
  background: var(--brand-chrome);
  border: 1px solid var(--brand-border-strong);
  border-left: 3px solid var(--brand-text-idle);
  border-radius: var(--aspire-border-radius-lg);
  box-shadow: var(--aspire-shadow-lg);
  color: var(--brand-text);
  font-size: var(--aspire-font-size-sm);
  animation: ac-snack-in var(--aspire-transition-base);
}
.ac-snackbar--success { border-left-color: var(--ac-success); }
.ac-snackbar--error { border-left-color: var(--ac-danger); }
.ac-snackbar__body { flex: 1; min-width: 0; }
.ac-snackbar__action { flex: 0 0 auto; background: transparent; border: none; color: var(--ac-primary); font-weight: var(--aspire-font-weight-medium); cursor: pointer; font-size: var(--aspire-font-size-sm); }
.ac-snackbar__action:hover { color: var(--ac-primary-hover); }
@keyframes ac-snack-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Cards & sections ────────────────────────────────────────────────────── */
.ac-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--aspire-border-radius-lg);
  box-shadow: var(--aspire-shadow-sm);
  padding: var(--aspire-spacing-5);
}

.ac-section { margin-bottom: var(--aspire-spacing-10); }
.ac-section__head { padding-bottom: var(--aspire-spacing-3); border-bottom: 1px solid var(--brand-border-soft); margin-bottom: var(--aspire-spacing-5); display: flex; align-items: center; justify-content: space-between; gap: var(--aspire-spacing-3); }
.ac-section__title { margin: 0; font-size: var(--aspire-font-size-xl); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); }
.ac-section__desc { margin: var(--aspire-spacing-2) 0 0; font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); }
.ac-section__actions { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); }

/* ── List rows ───────────────────────────────────────────────────────────── */
.ac-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--aspire-spacing-4);
  padding-block: var(--aspire-spacing-3);
}
.ac-row + .ac-row { border-top: 1px solid var(--brand-border-soft); }
.ac-row__main { display: flex; flex-direction: column; gap: var(--aspire-spacing-1); min-width: 0; }
.ac-row__primary { color: var(--brand-text); font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); }
.ac-row__secondary { color: var(--brand-text-muted); font-size: var(--aspire-font-size-xs); font-family: var(--aspire-font-family-mono); }
.ac-row__caption { color: var(--brand-text-muted); font-size: var(--aspire-font-size-sm); font-family: var(--aspire-font-family-sans); margin-top: 3px; }
.ac-row__trailing { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }

@media (max-width: 420px) {
  .ac-row { flex-direction: column; align-items: stretch; }
  .ac-row .ac-btn { width: 100%; }
}

/* Trailing action cell (e.g. cards' Share / Edit) — right-aligned icon buttons that don't
   trigger the row's navigation (the cell stops click propagation in markup). */
.ac-dactions { display: flex; align-items: center; justify-content: flex-end; gap: var(--aspire-spacing-1); white-space: nowrap; }

/* Share-level cue — restrained: the glyph carries the ladder colour, the label stays muted mono. */
.ac-sharetag { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); white-space: nowrap; }
.ac-sharetag__icon { display: inline-flex; color: var(--brand-text-dim); }
.ac-sharetag__icon.ac-sharetag--private { color: var(--ac-share-private); }
.ac-sharetag__icon.ac-sharetag--searchable { color: var(--ac-share-searchable); }
.ac-sharetag__icon.ac-sharetag--open { color: var(--ac-share-open); }
@media (max-width: 560px) { .ac-sharetag__label { display: none; } }

/* ── Directory table (full-bleed, responsive: aligned columns on desktop, fold on mobile) ──
   Shared by the contacts/cards lists. thead = mono micro-labels; secondary columns (.ac-col)
   hide below 768px and their content folds under the identity cell (.ac-fold). The whole row
   opens the record. Token-only; full-bleed (no card), cells inset to spacing-5 on the edges. */
.ac-dtable { width: 100%; border-collapse: collapse; font-size: var(--aspire-font-size-sm); }
.ac-dtable thead { display: none; }
.ac-dtable thead th {
  position: sticky; top: 0; z-index: 1; text-align: left;
  padding: var(--aspire-spacing-2) var(--aspire-spacing-3);
  background: var(--brand-chrome); border-bottom: 1px solid var(--brand-border-soft);
  font-family: var(--aspire-font-family-mono); font-size: 0.65rem; font-weight: var(--aspire-font-weight-medium);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-text-dim); white-space: nowrap;
}
.ac-dtable tbody td { padding: var(--aspire-spacing-2) var(--aspire-spacing-3); border-bottom: 1px solid var(--brand-border-soft); color: var(--brand-text-idle); vertical-align: middle; }
.ac-dtable thead th:first-child, .ac-dtable tbody td:first-child { padding-left: var(--aspire-spacing-5); }
.ac-dtable thead th:last-child, .ac-dtable tbody td:last-child { padding-right: var(--aspire-spacing-5); }
.ac-dtable__mono { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); white-space: nowrap; }
.ac-dtable__dim { color: var(--brand-text-dim); }

.ac-drow { cursor: pointer; }
.ac-drow:hover { background: var(--brand-surface-hover); }
.ac-chev { width: 26px; text-align: right; color: var(--brand-text-dim); }
.ac-drow:hover .ac-chev { color: var(--ac-primary); }

/* Alpha-group band (e.g. contacts A–Z). */
.ac-drow-group td { padding: var(--aspire-spacing-3) var(--aspire-spacing-5) var(--aspire-spacing-1); background: var(--brand-chrome); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-text-dim); }

/* Identity cell — avatar + name + sub. */
.ac-cellid { display: inline-flex; align-items: center; gap: var(--aspire-spacing-3); min-width: 0; }
.ac-cellid__avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: var(--aspire-border-radius-full); display: inline-flex; align-items: center; justify-content: center; font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); background: var(--brand-control); }
.ac-cellid__text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ac-cellid__name { font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-cellid__sub { font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Brand glyph row + status/label tags (shared by cells and the mobile fold). */
.ac-glyphs { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); color: var(--brand-text-dim); }
.ac-glyph { display: inline-flex; }
.ac-tags-cell { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); flex-wrap: wrap; }
/* Status glyphs — bare coloured icons matching the filter-chip glyphs (sync = green, pin = gold). */
.ac-status-ico { display: inline-flex; }
.ac-status-ico--sync { color: var(--ac-success); }
.ac-status-ico--pin { color: var(--ac-pin); }
.ac-status-ico--ended { color: var(--brand-text-dim); }

/* Responsive: columns on desktop, fold under the name on mobile. */
.ac-col { display: none; }
.ac-fold { display: flex; align-items: center; flex-wrap: wrap; gap: var(--aspire-spacing-3); margin-top: var(--aspire-spacing-1); }
@media (min-width: 768px) {
  .ac-dtable thead { display: table-header-group; }
  .ac-col { display: table-cell; }
  .ac-fold { display: none; }
}

/* ── Brand (platform) icons — the only non-palette colour, set inline ─────── */
.ac-brand-icon { display: inline-flex; flex: 0 0 auto; }
.ac-brand-icon svg { width: 1.15rem; height: 1.15rem; }
/* Platform icon (brand SVG from a URL, with a tinted generic-glyph fallback). */
.ac-platform-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* ── Badges / pills ──────────────────────────────────────────────────────── */
.ac-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--aspire-spacing-1);
  padding: var(--aspire-spacing-1) var(--aspire-spacing-2);
  background: var(--brand-control);
  color: var(--brand-text-idle);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--aspire-border-radius-sm);
  font-family: var(--aspire-font-family-mono);
  font-size: var(--aspire-font-size-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ac-badge svg { width: .85rem; height: .85rem; }
.ac-badge--accent { color: var(--ac-accent); border-color: var(--ac-accent-soft); background: var(--ac-accent-soft); }
.ac-badge--primary { color: var(--ac-primary-tint); border-color: var(--ac-primary-line); background: var(--ac-primary-soft); }
.ac-badge--ok { color: var(--ac-success); border-color: var(--ac-success-soft); background: var(--ac-success-soft); }
.ac-badge--error { color: var(--ac-danger); border-color: var(--ac-danger-border); background: var(--ac-danger-soft); }

/* Neutral state pill (e.g. Private visibility) — a state, never a warning colour. */
.ac-pill { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: var(--aspire-spacing-1) var(--aspire-spacing-2); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-sm); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text-muted); }
.ac-pill svg { width: .85rem; height: .85rem; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.ac-modal__backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: var(--aspire-z-modal-backdrop);
  display: grid; place-items: center;
  padding: var(--aspire-spacing-4);
}
.ac-modal__panel {
  position: relative;
  z-index: var(--aspire-z-modal);
  width: 100%;
  max-width: 440px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border-strong);
  border-radius: var(--aspire-border-radius-lg);
  box-shadow: var(--aspire-shadow-lg);
  padding: var(--aspire-spacing-6);
}
.ac-modal__close {
  position: absolute; top: var(--aspire-spacing-4); right: var(--aspire-spacing-4);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: var(--aspire-border-radius-md);
  background: transparent; color: var(--brand-text-muted); cursor: pointer;
  transition: background-color var(--aspire-transition-fast), color var(--aspire-transition-fast);
}
.ac-modal__close:hover { background: var(--brand-surface-hover); color: var(--brand-text); }
.ac-modal__close:focus-visible { outline: 2px solid var(--ac-focus); outline-offset: 2px; }
.ac-modal__close svg { width: 1.15rem; height: 1.15rem; }
.ac-modal__step { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--aspire-spacing-3); }
.ac-modal__title { margin: 0 0 var(--aspire-spacing-4); font-size: var(--aspire-font-size-xl); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); }
.ac-modal__title--glyph { display: inline-flex; align-items: center; gap: var(--aspire-spacing-3); }
.ac-modal__body { display: flex; flex-direction: column; gap: var(--aspire-spacing-4); }
.ac-modal__footer { display: flex; justify-content: flex-end; gap: var(--aspire-spacing-3); margin-top: var(--aspire-spacing-6); }
@media (max-width: 420px) {
  .ac-modal__footer { flex-direction: column-reverse; }
  .ac-modal__footer .ac-btn { width: 100%; }
}

/* ── Skeleton ────────────────────────────────────────────────────────────── */
.ac-skel { background: var(--brand-surface-hover); border-radius: var(--aspire-border-radius-md); animation: ac-pulse 1.4s ease-in-out infinite; }
.ac-skel--text { height: 14px; }
.ac-skel--row { height: 40px; }
@keyframes ac-pulse { 0%,100% { opacity: .4; } 50% { opacity: .7; } }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.ac-empty { display: flex; flex-direction: column; align-items: center; gap: var(--aspire-spacing-2); text-align: center; font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); padding: var(--aspire-spacing-5); }
.ac-empty svg { color: var(--brand-text-dim); }
.ac-empty__action { margin-top: var(--aspire-spacing-2); }
.ac-stack { display: flex; flex-direction: column; gap: var(--aspire-spacing-4); }
.ac-inline-callout { background: var(--brand-surface-hover); border-radius: var(--aspire-border-radius-md); padding: var(--aspire-spacing-3); font-size: var(--aspire-font-size-sm); color: var(--brand-text-idle); }

/* ── Auth account/security — promoted from auth-ui.css during the AuthCore.UI → shared
   design-system migration. Retokened onto the canonical --ac-danger / --ac-success. ────── */
.ac-success-card { background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-left: 3px solid var(--ac-success); border-radius: var(--aspire-border-radius-md); padding: var(--aspire-spacing-4); color: var(--brand-text); font-size: var(--aspire-font-size-sm); }

.ac-qr { width: 200px; height: 200px; margin-inline: auto; padding: var(--aspire-spacing-4); background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-md); display: grid; place-items: center; }
.ac-qr svg, .ac-qr img { width: 100%; height: 100%; }
.ac-key { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-sm); color: var(--brand-text); background: var(--brand-control); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-md); padding: var(--aspire-spacing-2) var(--aspire-spacing-3); user-select: all; word-break: break-all; }

.ac-codes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--aspire-spacing-2); }
@media (max-width: 420px) { .ac-codes { grid-template-columns: 1fr; } }
.ac-codes__item { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-base); color: var(--brand-text); background: var(--brand-surface-hover); border-radius: var(--aspire-border-radius-md); padding: var(--aspire-spacing-2) var(--aspire-spacing-3); text-align: center; user-select: all; }

.ac-badges { display: flex; gap: var(--aspire-spacing-2); flex-wrap: wrap; margin-bottom: var(--aspire-spacing-2); }
.ac-profile__save { display: flex; align-items: center; gap: var(--aspire-spacing-3); }

.ac-section--danger .ac-section__title { color: var(--ac-danger); }
.ac-danger-card { border-color: var(--ac-danger-border); border-top: 3px solid var(--ac-danger); }

/* ── App shell (header / sidebar / body grid + responsive drawer) ─────────── */
.ac-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas: "sidebar header" "sidebar body";
  height: 100dvh;
  background: var(--shell-bg, var(--brand-canvas));
}
.ac-shell__sidebar { grid-area: sidebar; display: flex; flex-direction: column; min-height: 0; background: var(--shell-nav-bg, var(--brand-chrome)); border-right: 1px solid var(--brand-border-soft); }
.ac-shell__header { grid-area: header; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--aspire-spacing-3); padding: 0 var(--aspire-spacing-5); background: var(--shell-bg, var(--brand-chrome)); border-bottom: 1px solid var(--brand-border-soft); }
.ac-shell__body { grid-area: body; overflow: auto; min-height: 0; }
.ac-shell__hamburger { display: none; }
.ac-shell__lead { justify-self: start; display: flex; align-items: center; gap: var(--aspire-spacing-2); min-width: 0; }
.ac-shell__title { justify-self: center; text-align: center; min-width: 0; display: flex; flex-direction: column; }
.ac-shell__eyebrow { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text-muted); }
.ac-shell__page-title { font-size: var(--aspire-font-size-lg); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ac-shell__actions { justify-self: end; display: flex; align-items: center; gap: var(--aspire-spacing-2); }
/* When a page docks search (or other content) in the header centre, let it grow + shrink. */
.ac-shell__header--center { grid-template-columns: auto minmax(0, 1fr) auto; }
.ac-shell__center { justify-self: stretch; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0 var(--aspire-spacing-3); }
.ac-shell__center .ac-search { width: 100%; max-width: 460px; }
.ac-shell__center .ac-input--search { min-height: 36px; }
.ac-shell__back { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); background: transparent; border: none; color: var(--brand-text-idle); cursor: pointer; font-size: var(--aspire-font-size-sm); white-space: nowrap; }
.ac-shell__back:hover { color: var(--brand-text); }

/* Sidebar internals */
.ac-sidebar__brand { display: flex; align-items: center; gap: var(--aspire-spacing-2); padding: var(--aspire-spacing-4) var(--aspire-spacing-5); }
/* Brand mark — the <BrandMark> inline SVG (burgundy slash + green powered-on light). */
.ac-brandmark { flex: 0 0 auto; display: block; }
/* Boot / authorizing splash — the brand mark centered on the canvas while auth resolves,
   replacing the framework's bare "Authorizing…" text. */
.ac-boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--brand-canvas); z-index: var(--aspire-z-modal); }
.ac-boot .ac-brandmark { animation: ac-boot-pulse 1.4s ease-in-out infinite; }
@keyframes ac-boot-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.ac-sidebar__brand-name { font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); }
.ac-sidebar__nav { display: flex; flex-direction: column; gap: 2px; padding: var(--aspire-spacing-2); flex: 1; overflow: auto; }
.ac-sidebar__link { position: relative; display: flex; align-items: center; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-3); border-radius: var(--aspire-border-radius-md); color: var(--brand-text-idle); text-decoration: none; font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); }
.ac-sidebar__link:hover { background: var(--brand-surface-hover); color: var(--brand-text); }
.ac-sidebar__link:hover .ac-sidebar__link-icon { color: var(--brand-text); }
/* Selected = subtle wash + electric-blue icon/label + a left accent bar (console style). */
.ac-sidebar__link.active { background: var(--ac-nav-active); color: var(--ac-primary-tint); }
.ac-sidebar__link.active .ac-sidebar__link-icon { color: var(--ac-primary-tint); }
.ac-sidebar__link.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 1.1rem; border-radius: 0 var(--aspire-border-radius-sm) var(--aspire-border-radius-sm) 0; background: var(--ac-primary); }
/* Monochrome at rest — uniform muted icons (was per-item --nav-icon hues; see COLOR_SYSTEM.md §4). */
.ac-sidebar__link-icon { display: inline-flex; color: var(--brand-text-muted); }
.ac-sidebar__link--disabled { opacity: .55; cursor: default; }
.ac-sidebar__link--disabled:hover { background: transparent; color: var(--brand-text-idle); }
.ac-sidebar__section-label { padding: var(--aspire-spacing-3) var(--aspire-spacing-3) var(--aspire-spacing-1); font-family: var(--aspire-font-family-mono); font-size: .65rem; font-weight: var(--aspire-font-weight-medium); letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text-muted); }
/* Sidebar links rendered as <button> (e.g. the external Admin portal) — strip native button chrome. */
button.ac-sidebar__link { width: 100%; border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.ac-sidebar__soon { margin-left: auto; font-family: var(--aspire-font-family-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text-dim); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-sm); padding: 1px 5px; }
.ac-sidebar__footer { border-top: 1px solid var(--brand-border-soft); padding: var(--aspire-spacing-2); }
.ac-sidebar__account { position: relative; display: flex; align-items: center; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-2) var(--aspire-spacing-3); border-radius: var(--aspire-border-radius-md); color: var(--brand-text-idle); text-decoration: none; }
.ac-sidebar__account:hover { background: var(--brand-surface-hover); color: var(--brand-text); }
/* Active = you're on the account page (the footer is now the sole entry to it); mirrors the
   nav-link selection — subtle wash + electric-blue name + left accent bar. */
.ac-sidebar__account.active { background: var(--ac-nav-active); }
.ac-sidebar__account.active .ac-sidebar__account-name { color: var(--ac-primary-tint); }
.ac-sidebar__account.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 1.1rem; border-radius: 0 var(--aspire-border-radius-sm) var(--aspire-border-radius-sm) 0; background: var(--ac-primary); }
.ac-sidebar__account-name { font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); }
.ac-avatar { width: 30px; height: 30px; flex: 0 0 auto; border-radius: var(--aspire-border-radius-full); background: var(--brand-control); color: var(--brand-text); display: inline-flex; align-items: center; justify-content: center; font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-semibold); }

/* Responsive: collapse the sidebar into an off-canvas drawer */
@media (max-width: 720px) {
  .ac-shell { grid-template-columns: 1fr; grid-template-areas: "header" "body"; }
  .ac-shell__hamburger { display: inline-flex; }
  /* On a sub-page (one that publishes a back target) the back affordance replaces the drawer
     hamburger — never show both. The nav drawer is reached from a root page. */
  .ac-shell__lead:has(.ac-shell__back) .ac-shell__hamburger { display: none; }
  .ac-shell__sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; z-index: var(--aspire-z-modal); transform: translateX(-100%); transition: transform var(--aspire-transition-base); }
  .ac-shell--drawer .ac-shell__sidebar { transform: none; box-shadow: var(--aspire-shadow-lg); }
  .ac-shell__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: var(--aspire-z-modal-backdrop); }

  /* Header CTAs collapse to icon-only to save width — but ONLY buttons that carry an icon
     (an icon-less button such as "Done" keeps its text). The label is visually hidden, NOT
     display:none, so the button keeps its accessible name for screen readers. */
  .ac-shell__actions .ac-btn--sm:has(svg) .ac-btn__label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ── Page container + card tiles ──────────────────────────────────────────── */
/* Near-full-width with a slight margin (matches legacy). Text-heavy pages opt into
   --narrow for readability. */
.ac-page { width: 100%; padding: var(--aspire-spacing-4) var(--aspire-spacing-6) var(--aspire-spacing-10); }
/* Readable column for text-heavy pages, left-aligned to match the rest of the app. */
.ac-page--narrow { max-width: 720px; }
/* Full-bleed form page (create/edit): flush on the content surface, no card frame, spacing-5
   inset so fields line up with the lists/detail. Spans the content width (admin/console look). */
.ac-formpage { width: 100%; padding: var(--aspire-spacing-4) var(--aspire-spacing-5) var(--aspire-spacing-10); }
.ac-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--aspire-spacing-4); }
.ac-card-tile { display: flex; flex-direction: column; min-height: 150px; background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-lg); text-decoration: none; color: var(--brand-text); overflow: hidden; transition: border-color var(--aspire-transition-fast); }
.ac-card-tile:hover { border-color: var(--brand-border-strong); }
/* Top strip — handle (left) + favorite/visibility cluster (right), separate from content. */
.ac-card-tile__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--aspire-spacing-2); padding: var(--aspire-spacing-2) var(--aspire-spacing-4); min-height: 36px; background: var(--brand-chrome); border-bottom: 1px solid var(--brand-border-soft); }
.ac-card-tile__handle { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-card-tile__flags { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); flex: 0 0 auto; color: var(--brand-text-muted); }
.ac-card-tile__body { display: flex; flex-direction: column; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-4); flex: 1; }
.ac-card-tile__id { display: flex; align-items: center; gap: var(--aspire-spacing-3); }
.ac-card-tile__name { font-weight: var(--aspire-font-weight-semibold); font-size: var(--aspire-font-size-base); color: var(--brand-text); line-height: 1.2; }
.ac-card-tile__meta { font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); margin-top: 2px; }
.ac-card-tile__icons { display: flex; align-items: center; gap: 10px; margin-top: auto; color: var(--brand-text-muted); }
/* Larger rounded-square avatar variant for cards. */
.ac-avatar--lg { width: 40px; height: 40px; border-radius: var(--aspire-border-radius-md); font-size: var(--aspire-font-size-base); }

/* ── Card detail ──────────────────────────────────────────────────────────── */
.ac-detail__sharerow { margin-bottom: var(--aspire-spacing-5); }
.ac-detail__section { margin-top: var(--aspire-spacing-6); }
.ac-detail__sectionlabel { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text-muted); margin-bottom: var(--aspire-spacing-3); }
.ac-detail__value { color: var(--brand-text); font-size: var(--aspire-font-size-sm); }
/* Contact row: leading glyph + stacked value/caption. */
.ac-detail__row { display: inline-flex; align-items: flex-start; gap: var(--aspire-spacing-3); }
.ac-detail__rowtext { display: flex; flex-direction: column; min-width: 0; }
/* Share-level chip — a deliberate 3-step colour scale (not a warning). */
.ac-share { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: var(--aspire-spacing-1) var(--aspire-spacing-3); border-radius: var(--aspire-border-radius-full); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .04em; }
.ac-share svg { width: .85rem; height: .85rem; }
.ac-share--private { background: var(--ac-share-private-soft); color: var(--ac-share-private); }
.ac-share--searchable { background: var(--ac-share-searchable-soft); color: var(--ac-share-searchable); }
.ac-share--open { background: var(--ac-share-open-soft); color: var(--ac-share-open); }

/* Synced indicator — the live-card-sync hero signal on shared contacts.
   Green = an active two-way sync; grey = the link has ended (revoked / expired). */
.ac-synced { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: var(--aspire-spacing-1) var(--aspire-spacing-3); border-radius: var(--aspire-border-radius-full); font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-medium); text-transform: uppercase; letter-spacing: .04em; background: var(--ac-success-soft); color: var(--ac-success); }
.ac-synced svg { width: .85rem; height: .85rem; }
.ac-synced--ended { background: var(--brand-surface-hover); color: var(--brand-text-muted); }

.ac-detail__head { display: flex; align-items: center; gap: var(--aspire-spacing-4); }
.ac-detail__avatar { width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--aspire-border-radius-lg); background: var(--brand-control); color: var(--brand-text); display: inline-flex; align-items: center; justify-content: center; font-size: var(--aspire-font-size-xl); font-weight: var(--aspire-font-weight-semibold); }
.ac-detail__name { margin: 0; font-size: var(--aspire-font-size-2xl); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); line-height: 1.15; }
.ac-detail__sub { margin: var(--aspire-spacing-1) 0 0; font-size: var(--aspire-font-size-sm); color: var(--brand-text-idle); }

/* Quick-action links — tap to call/text/email/open; tag label beneath each. */
.ac-actions { display: flex; flex-wrap: wrap; gap: var(--aspire-spacing-4); margin-top: var(--aspire-spacing-6); }
.ac-action { display: flex; flex-direction: column; align-items: center; gap: var(--aspire-spacing-2); width: 64px; background: none; border: none; padding: 0; cursor: pointer; }
.ac-action__btn { width: 48px; height: 48px; border-radius: var(--aspire-border-radius-md); background: var(--brand-surface); border: 1px solid var(--brand-border-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; transition: background-color var(--aspire-transition-fast), border-color var(--aspire-transition-fast); }
.ac-action:hover .ac-action__btn { background: var(--brand-surface-hover); border-color: var(--brand-border-strong); }
.ac-action__btn svg { width: 1.25rem; height: 1.25rem; }
.ac-action__label { font-family: var(--aspire-font-family-mono); font-size: 0.65rem; color: var(--brand-text-muted); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ac-detail__bio { margin: 0; font-size: var(--aspire-font-size-base); color: var(--brand-text); line-height: 1.65; }

/* ── Connect (exchanges) ─────────────────────────────────────────────────── */
/* Hero "go" CTA tile — the primary "begin a connection" action. */
.ac-cta-go { display: flex; align-items: center; gap: var(--aspire-spacing-4); width: 100%; background: var(--ac-go-soft); border: 1px solid var(--ac-go-line); border-radius: var(--aspire-border-radius-lg); padding: var(--aspire-spacing-4) var(--aspire-spacing-5); cursor: pointer; text-decoration: none; color: var(--brand-text); transition: background-color var(--aspire-transition-fast), border-color var(--aspire-transition-fast); }
.ac-cta-go:hover { background: rgba(16, 185, 129, .12); border-color: var(--ac-go); }
.ac-cta-go__icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: var(--aspire-border-radius-lg); background: rgba(16, 185, 129, .16); color: var(--ac-go-icon); display: flex; align-items: center; justify-content: center; }
.ac-cta-go__icon svg { width: 1.5rem; height: 1.5rem; }
.ac-cta-go__text { flex: 1; min-width: 0; }
.ac-cta-go__title { font-size: var(--aspire-font-size-base); font-weight: var(--aspire-font-weight-semibold); color: var(--brand-text); }
.ac-cta-go__sub { font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); margin-top: 2px; }

/* Tabs (Incoming / Outgoing). */
.ac-tabs { display: flex; gap: var(--aspire-spacing-5); border-bottom: 1px solid var(--brand-border-soft); margin: var(--aspire-spacing-6) 0 var(--aspire-spacing-2); }
.ac-tab { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); padding-bottom: var(--aspire-spacing-3); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; color: var(--brand-text-muted); font-family: var(--aspire-font-family-sans); font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); }
.ac-tab:hover { color: var(--brand-text); }
.ac-tab--active { color: var(--brand-text); border-bottom-color: var(--ac-primary); }
.ac-tab__count { min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--aspire-border-radius-full); font-family: var(--aspire-font-family-mono); font-size: .65rem; display: inline-flex; align-items: center; justify-content: center; background: var(--ac-primary-soft); color: var(--ac-primary-tint); }
.ac-tab--active .ac-tab__count { background: var(--ac-primary); color: var(--ac-primary-fg); }

/* Request rows. */
.ac-request-row { display: flex; align-items: center; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-3) 0; }
.ac-request-row + .ac-request-row { border-top: 1px solid var(--brand-border-soft); }
.ac-request-row__main { display: flex; align-items: center; gap: var(--aspire-spacing-3); flex: 1; min-width: 0; text-decoration: none; color: var(--brand-text); }
.ac-request-row__text { display: flex; flex-direction: column; min-width: 0; }
.ac-request-row__name { font-weight: var(--aspire-font-weight-semibold); font-size: var(--aspire-font-size-sm); color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-request-row__sub { font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Quiet disclosure chevron — muted trailing tone (badges/buttons inside set their own colour
   and override this). Anchors now inherit text colour globally, so this is a deliberate choice,
   not a bleed fix. */
.ac-request-row__actions { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); flex: 0 0 auto; color: var(--brand-text-muted); }

/* Bare reach glyph (Open=instant / Searchable=request) — no chip, colour set inline from a token. */
.ac-reach { display: inline-flex; align-items: center; justify-content: center; }

/* Sidebar count badge (Connect incoming pending). */
.ac-sidebar__badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--aspire-border-radius-full); background: var(--ac-primary); color: var(--ac-primary-fg); font-family: var(--aspire-font-family-mono); font-size: .65rem; font-weight: var(--aspire-font-weight-medium); display: inline-flex; align-items: center; justify-content: center; }

/* Two-card face-off on the exchange detail. */
.ac-exchange-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--aspire-spacing-4); }
@media (max-width: 420px) { .ac-exchange-cards { grid-template-columns: 1fr; } }
.ac-exchange-card__label { font-family: var(--aspire-font-family-mono); font-size: var(--aspire-font-size-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text-muted); margin-bottom: var(--aspire-spacing-2); }

/* Create-flow: the selected card summary + a Change affordance. */
.ac-pickrow { display: flex; align-items: center; gap: var(--aspire-spacing-3); background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-lg); padding: var(--aspire-spacing-3) var(--aspire-spacing-4); }
.ac-pickrow__text { flex: 1; min-width: 0; }
.ac-pickrow__name { font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); color: var(--brand-text); }
.ac-pickrow__meta { font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-pickrow__change { background: none; border: none; padding: 0; color: var(--ac-primary-tint); font-size: var(--aspire-font-size-sm); cursor: pointer; flex: 0 0 auto; }

/* Create-flow: choose which of your / their cards (selected = indigo, our "active choice"). */
.ac-cardpick { display: flex; flex-direction: column; background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-lg); overflow: hidden; margin-top: var(--aspire-spacing-2); }
.ac-cardpick__item { display: flex; align-items: center; gap: var(--aspire-spacing-3); padding: var(--aspire-spacing-3); background: none; border: none; border-left: 2px solid transparent; width: 100%; text-align: left; cursor: pointer; color: var(--brand-text); }
.ac-cardpick__item + .ac-cardpick__item { border-top: 1px solid var(--brand-border-soft); }
.ac-cardpick__item:hover { background: var(--brand-surface-hover); }
.ac-cardpick__item--selected { background: var(--ac-primary-soft); border-left-color: var(--ac-primary); }
.ac-cardpick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-cardpick__name { font-size: var(--aspire-font-size-sm); font-weight: var(--aspire-font-weight-medium); color: var(--brand-text); }
.ac-cardpick__meta { font-size: var(--aspire-font-size-xs); color: var(--brand-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-cardpick__check { color: var(--ac-primary); flex: 0 0 auto; display: inline-flex; }

/* Create-flow: static (non-interactive) contact-method preview on the recipient card. */
.ac-preview-icons { display: flex; flex-wrap: wrap; gap: var(--aspire-spacing-5); padding: var(--aspire-spacing-3) 0; border-top: 1px solid var(--brand-border-soft); border-bottom: 1px solid var(--brand-border-soft); margin: var(--aspire-spacing-3) 0; }
.ac-preview-icon { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--brand-text-idle); }
.ac-preview-icon svg { width: 1.25rem; height: 1.25rem; }
.ac-preview-icon__label { font-family: var(--aspire-font-family-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text-muted); }

/* Connect "go" send button — emerald begin action. */
.ac-btn--go { background: var(--ac-go); color: #04261c; border-color: var(--ac-go); }
.ac-btn--go:hover:not(:disabled) { background: #0fcf93; border-color: #0fcf93; }

/* ── Contact list rows ────────────────────────────────────────────────────── */
.ac-contact-list { display: flex; flex-direction: column; background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-lg); overflow: hidden; }
.ac-contact-row { display: flex; align-items: center; gap: var(--aspire-spacing-2); padding-right: var(--aspire-spacing-3); }
.ac-contact-row + .ac-contact-row { border-top: 1px solid var(--brand-border-soft); }
.ac-contact-row__main { display: flex; align-items: center; gap: var(--aspire-spacing-3); flex: 1; min-width: 0; padding: var(--aspire-spacing-3) var(--aspire-spacing-4); text-decoration: none; color: var(--brand-text); }
.ac-contact-row__main:hover { background: var(--brand-surface-hover); }
.ac-contact-row__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ac-contact-row__name { font-weight: var(--aspire-font-weight-semibold); font-size: var(--aspire-font-size-base); color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-contact-row__sub { font-size: var(--aspire-font-size-sm); color: var(--brand-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-contact-row__icons { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--brand-text-muted); }
.ac-contact-row__trailing { display: inline-flex; align-items: center; gap: var(--aspire-spacing-2); flex: 0 0 auto; }
.ac-contact-star { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; background: transparent; color: var(--brand-text-dim); cursor: pointer; border-radius: var(--aspire-border-radius-md); transition: color var(--aspire-transition-fast), background-color var(--aspire-transition-fast); }
.ac-contact-star:hover { background: var(--brand-surface-hover); color: var(--brand-text-muted); }
.ac-contact-star svg { width: 1.15rem; height: 1.15rem; }
.ac-contact-star--on { color: var(--ac-accent); }
.ac-contact-star--on:hover { color: var(--ac-accent-hover); }

/* ── Tags (private contact labels) ───────────────────────────────────────── */
.ac-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aspire-spacing-2); }
.ac-tag { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: 3px var(--aspire-spacing-2) 3px var(--aspire-spacing-3); background: var(--brand-surface-hover); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-full); font-size: var(--aspire-font-size-xs); color: var(--brand-text-idle); }
.ac-tag--readonly { padding-right: var(--aspire-spacing-3); }
.ac-tag__remove { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: none; background: transparent; color: var(--brand-text-dim); cursor: pointer; border-radius: var(--aspire-border-radius-full); padding: 0; }
.ac-tag__remove:hover { color: var(--ac-danger); background: var(--ac-danger-soft); }
.ac-tag__remove svg { width: .7rem; height: .7rem; }
/* Add-tag trigger + quick-add suggestion chips — indigo action affordance, set apart
   from the neutral grey tag pills (dashed outline = "add", not an applied tag). */
.ac-tag-btn { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: 3px var(--aspire-spacing-3); background: var(--ac-primary-soft); border: 1px dashed var(--ac-primary-line); border-radius: var(--aspire-border-radius-full); font-size: var(--aspire-font-size-xs); font-weight: var(--aspire-font-weight-medium); color: var(--ac-primary-tint); cursor: pointer; font-family: var(--aspire-font-family-sans); transition: background-color var(--aspire-transition-fast), border-color var(--aspire-transition-fast); }
.ac-tag-btn:hover { background: var(--ac-primary); border-color: var(--ac-primary); border-style: solid; color: var(--ac-primary-fg); }
.ac-tag-btn svg { width: .7rem; height: .7rem; }
.ac-tag-input { min-width: 130px; max-width: 220px; padding: 4px var(--aspire-spacing-3); background: var(--brand-surface); border: 1px solid var(--brand-border-strong); border-radius: var(--aspire-border-radius-full); font-size: var(--aspire-font-size-xs); color: var(--brand-text); font-family: var(--aspire-font-family-sans); }
.ac-tag-input::placeholder { color: var(--brand-text-dim); }
.ac-tag-input:focus-visible { outline: 2px solid var(--ac-focus); outline-offset: 1px; border-color: var(--ac-focus); }
.ac-tag-suggest-label { font-family: var(--aspire-font-family-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text-dim); }

/* ── Filter rail (list-page tag / synced filters) ────────────────────────── */
.ac-filter-rail { display: flex; flex-wrap: wrap; gap: var(--aspire-spacing-2); margin-bottom: var(--aspire-spacing-4); }
.ac-filter-chip { display: inline-flex; align-items: center; gap: var(--aspire-spacing-1); padding: var(--aspire-spacing-1) var(--aspire-spacing-3); background: var(--brand-surface); border: 1px solid var(--brand-border-soft); border-radius: var(--aspire-border-radius-full); font-size: var(--aspire-font-size-xs); color: var(--brand-text-idle); cursor: pointer; }
.ac-filter-chip:hover { border-color: var(--brand-border-strong); color: var(--brand-text); }
.ac-filter-chip--active { background: var(--ac-primary-soft); border-color: var(--ac-primary-line); color: var(--ac-primary-tint); }
