/* ==========================================================================
   COMPONENTS · ACCOUNT MENU — the SIGNED-IN form of the nameplate's quiet
   utility cluster. Where a logged-out reader sees "Sign in", a member sees a
   small monogram + name that opens a filed list of their rooms (the Dossier,
   the Library, Billing) plus settings and a plain Sign out. It lives in the
   dateline strip on desktop and folds into the mobile index menu — it never
   enters the six-destination running head (s1 §1). The exit (Sign out) is as
   plain as the entry. Composes nothing it must reinvent; pure furniture.

   NOTE (harvest): s1-navigation owns the chrome and names "the signed-in
   account menu" but ships only the Sign-in link. This is that menu, built in
   the clean room as an s1 harvest candidate. ITCSS: 06-components.
   ========================================================================== */

.op-account {
  position: relative;
  display: inline-flex;
}

/* The trigger — a monogram lozenge + the member's name + a caret */
.op-account__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.2em 0.4em;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: var(--font-furniture);
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition-ink);
}
.op-account__trigger:hover { color: var(--text); border-color: var(--rule); }
.op-account__trigger:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.op-account__trigger[aria-expanded="true"] { color: var(--text); border-color: var(--rule); }

/* The monogram — a pressed paper square with mono initials (record, not avatar) */
.op-account__monogram {
  display: inline-grid;
  place-items: center;
  inline-size: 1.6em;
  block-size: 1.6em;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-xs);
  font-family: var(--font-data);
  font-size: 0.85em;
  letter-spacing: 0;
  box-shadow: var(--shadow-emboss);
}
.op-account__caret {
  font-family: var(--font-data);
  font-size: 0.85em;
  color: var(--text-muted);
}

/* — The dropped menu: a small filed panel, ruled rows — */
.op-account__menu {
  position: absolute;
  top: calc(100% + 0.4em);
  right: 0;
  z-index: var(--z-popover);
  inline-size: 16rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  padding: var(--space-2xs);
}
.op-account__menu[hidden] { display: none; }

.op-account__who {
  padding: var(--space-2xs) var(--space-xs) var(--space-xs);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-2xs);
}
.op-account__name {
  display: block;
  font-family: var(--font-reading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
}
.op-account__email {
  display: block;
  font-family: var(--font-data);
  font-size: var(--text-3xs);
  color: var(--text-muted);
  margin-top: 0.1em;
}

.op-account__list { list-style: none; margin: 0; padding: 0; }
.op-account__label {
  padding: var(--space-2xs) var(--space-xs) var(--space-3xs);
  font-family: var(--font-furniture);
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.op-account__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-xs);
  font-family: var(--font-furniture);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-ink);
}
.op-account__link:hover { background: var(--accent-wash); color: var(--accent); }
.op-account__link[aria-current="page"] { color: var(--text); }
.op-account__link[aria-current="page"]::after {
  content: "·";
  color: var(--accent);
  font-family: var(--font-data);
}
.op-account__link-count {
  font-family: var(--font-data);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-muted);
}

.op-account__sep {
  height: 1px;
  background: var(--rule);
  margin: var(--space-2xs) 0;
}
/* Sign out — plain text, as findable as Sign in was. Never hidden, never red. */
.op-account__signout {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2xs) var(--space-xs);
  background: none;
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: var(--font-furniture);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}
.op-account__signout:hover { background: var(--accent-wash); color: var(--accent); }
.op-account__signout:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
