/* B/452: the header's sign-in dialog (the page side), the sign-in inside its frame (/account/signin-embed, body.sx), and the profile rows of the account menu.
   The drawing sheet: paper, a 2 px ink border, square corners, a hard ink offset; Heebo, never mono. Tokens only (no colour literal outside tokens.css), no inline CSS. */

/* ---- the dialog on the page ---- */
.signin-dlg { inline-size: min(420px, calc(100vw - 32px)); max-block-size: calc(100dvh - 32px); padding: 0; border: 2px solid var(--vit-ink); border-radius: 0; background: var(--vit-paper); color: var(--vit-ink); box-shadow: 6px 6px 0 var(--vit-ink); font-family: var(--vit-f-heb); overflow: hidden; }
.signin-dlg::backdrop { background: color-mix(in srgb, var(--vit-ink) 55%, transparent); }
.sdlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--vit-space-3); padding: var(--vit-space-3) var(--vit-space-4); border-bottom: 1px solid var(--vit-ink); }
.sdlg-t { margin: 0; font-family: var(--vit-f-heb); font-size: 20px; font-weight: 700; line-height: 1.3; }
.sdlg-x { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; margin-inline-end: calc(-1 * var(--vit-space-2)); padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--vit-ink); font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.sdlg-x:hover { background: var(--vit-ink); color: var(--vit-paper); }
.sdlg-x:focus-visible { outline: 2px solid var(--vit-clay-ink); outline-offset: -4px; }
.sdlg-body { display: block; }
.sdlg-frame { display: block; inline-size: 100%; block-size: 300px; border: 0; background: var(--vit-paper); }
@media (prefers-reduced-motion: no-preference) { .signin-dlg[open] { animation: sdlg-in 140ms ease-out; } }
@keyframes sdlg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hdr-auth[hidden] { display: none !important; }   /* B9: /ops, /operator hide the whole slot (.hdr-auth sets display: flex) */

/* ---- the account menu: separators and the profile rows (the switch) ---- */
.acct-sep { display: block; block-size: 0; margin-block: var(--vit-space-1); border-top: 1px solid var(--vit-line-default); }
.acct-menu [data-acct-switch] { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
/* the open switch is a disclosure, not a selection: it stays paper (בצלאל 452), a light paper-2 hover, a 1 px ink rule under it while open */
.acct-menu [data-acct-switch]:hover { background: var(--vit-paper-2); color: var(--vit-ink); }
.acct-menu [data-acct-switch][aria-expanded="true"] { box-shadow: inset 0 -1px 0 var(--vit-ink); }
.acct-menu [data-acct-switch]::after { content: ""; inline-size: 0; block-size: 0; border-inline: 5px solid transparent; border-top: 6px solid currentColor; }
.acct-menu [data-acct-switch][aria-expanded="true"]::after { transform: rotate(180deg); }
.acct-profiles { display: flex; flex-direction: column; gap: 2px; padding-inline-start: var(--vit-space-2); }
.acct-profiles[hidden] { display: none; }
.acct-menu .acct-prof { display: flex; align-items: center; gap: var(--vit-space-2); }
.acct-letter { flex: none; display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; border: 1px solid var(--vit-ink); border-radius: 50%; background: var(--vit-paper-2); color: var(--vit-ink); font-weight: 700; font-size: 13px; line-height: 1; }
.acct-prof[aria-checked="true"] .acct-letter { background: var(--vit-clay); color: var(--vit-on-clay); }
.acct-menu .acct-prof[aria-current="true"], .acct-menu .acct-prof[aria-current="true"]:hover { background: transparent; color: var(--vit-ink); cursor: default; }
.acct-check { flex: none; margin-inline-start: auto; font-weight: 700; font-size: 16px; line-height: 1; color: var(--vit-ink); }
.acct-prof-t { display: flex; flex-direction: column; min-inline-size: 0; overflow-wrap: break-word; font-size: 14px; line-height: 1.35; }
.acct-prof-t b { font-weight: 600; }
.acct-again { font-style: normal; font-size: 12px; color: var(--vit-clay-text); }
.acct-menu .acct-prof:hover .acct-again { color: inherit; }
.acct-menu button[disabled] { opacity: .55; cursor: not-allowed; }
.acct-menu button[disabled]:hover { background: transparent; color: var(--vit-ink); }

/* ---- inside the frame ---- */
html:has(body.sx) { background: var(--vit-paper); }
body.sx { margin: 0; background: var(--vit-paper); color: var(--vit-ink); font-family: var(--vit-f-heb); font-size: 16px; line-height: 1.5; }
.sx-main { display: flex; flex-direction: column; gap: var(--vit-space-3); padding: var(--vit-space-4); }
.sx-status { margin: 0; min-block-size: 1.5em; font-size: 15px; }
.sx-btns, .sx-form { display: flex; flex-direction: column; gap: var(--vit-space-2); }
.sx-btns[hidden], .sx-form[hidden], .sx-shared[hidden] { display: none; }
.sx button { min-block-size: 44px; inline-size: 100%; padding: var(--vit-space-2) var(--vit-space-4); border: 2px solid var(--vit-ink); border-radius: 0; background: var(--vit-paper); color: var(--vit-ink); font: inherit; font-weight: 700; cursor: pointer; }
.sx button:hover:not([disabled]) { background: var(--vit-ink); color: var(--vit-paper); }
.sx button[disabled] { opacity: .5; cursor: default; }
.sx-form button[type="submit"] { background: var(--vit-clay); color: var(--vit-on-clay); }
.sx-form label { font-size: 14px; font-weight: 500; }
.sx input[type="email"] { min-block-size: 44px; padding: 0 var(--vit-space-3); border: 1px solid var(--vit-ink); border-radius: 0; background: var(--vit-paper); color: var(--vit-ink); font: inherit; }
.sx-shared { display: flex; align-items: center; gap: var(--vit-space-2); min-block-size: 44px; font-size: 14px; cursor: pointer; }
.sx-shared input { inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--vit-ink); }
.sx :is(button, input, a):focus-visible { outline: 2px solid var(--vit-clay-ink); outline-offset: 2px; }
/* F-35R R9: the one-time marketing question (portal/marketing-optin.js) inside the dialog, at a uid's first sign-in */
.sx-mkt[hidden] { display: none; }
.sx-mkt .mkt-row { display: flex; align-items: flex-start; gap: var(--vit-space-2); min-block-size: 44px; font-size: 14px; cursor: pointer; overflow-wrap: break-word; }
.sx-mkt .mkt-row input { flex: none; inline-size: 18px; block-size: 18px; margin: 3px 0 0; accent-color: var(--vit-ink); }
.sx-mkt .mkt-note { margin: var(--vit-space-2) 0; font-size: 13px; color: var(--vit-ink-2); }
