/* Account page of the Squorli directory service. Colors, typography and radii from docs/brand (tokens in brand/squorli-tokens.css). */
:root {
  color-scheme: dark;
  font-family: var(--sq-font, "Segoe UI", system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  --bg: var(--sq-night, #0C1424); --bg2: var(--sq-surface, #162238); --bg4: var(--sq-raised, #1E2D47); --sel: var(--sq-selection, #243E68); --line: #22334F;
  --text: var(--sq-text, #F5F8FF); --muted: var(--sq-muted, #A9B8D2); --brand: var(--sq-squorli-blue, #6397FF);
  --accent: var(--sq-action, #246BFD); --accent-hover: var(--sq-action-hover, #1856D8);
  --ok: var(--sq-mint, #42D6AE); --warn: var(--sq-amber, #FFC568); --danger: var(--sq-coral, #FF7F91);
  --r: var(--sq-radius-control, 12px); --r-panel: var(--sq-radius-panel, 20px);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.page { max-width: 72rem; margin: 0 auto; padding: 4rem 2rem; display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 40rem); gap: 1.25rem 4rem; align-items: start; }
.page > :not(.brand-head) { grid-column: 2; }
.brand-head { grid-column: 1; grid-row: 1 / span 5; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 3rem; }
.brand-logo { display: block; width: 280px; max-width: 100%; height: auto; }
h1 { font-size: 2rem; line-height: 1.25; margin: 0.25rem 0 0; }
h2 { font-size: 1.5rem; margin: 0 0 0.8rem; }
h3 { font-size: 1rem; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
p { margin: 0.4rem 0; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 1.75rem; min-width: 0; }
form { display: flex; flex-direction: column; gap: 0.8rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; }
input { font: inherit; color: var(--text); background: var(--bg4); border: 1px solid transparent; border-radius: var(--r); padding: 0.55rem 0.8rem; min-width: 0; }
input:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
.lang { display: flex; align-items: center; gap: 0.5rem; }
.lang > span { flex-basis: 100%; }
.lang button { font-size: 0.875rem; border: 1px solid transparent; }
.lang button[aria-pressed="true"] { background: var(--sel); border-color: var(--brand); color: var(--text); }
input::placeholder { color: var(--muted); opacity: 0.8; }
.prefix { display: flex; align-items: center; gap: 0.4rem; }
.prefix input { flex: 1; }
.grow { flex: 1; min-width: 12rem; }
button { font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: var(--r); padding: 0.55rem 1.1rem; background: var(--accent); color: #FFFFFF; transition: background 0.12s; }
button:hover { background: var(--accent-hover); }
button.secondary { background: var(--bg4); color: var(--text); }
button.secondary:hover { background: var(--sel); }
button.danger { background: var(--danger); color: var(--bg); }
button.danger:hover { background: #ff9aa8; }
button:disabled { opacity: 0.5; cursor: default; }
.row { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.status { font-size: 0.875rem; word-break: break-word; }
.status.error { color: var(--danger); }
.status.ok, .ok { color: var(--ok); }
.muted { color: var(--muted); }
.small, small { font-size: 0.875rem; }
.key { display: block; word-break: break-all; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; }
a { color: var(--brand); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }
/* M6c: account area after signing in */
.block { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1.25rem; }
.block > :not(summary) { margin-top: 1rem; }
.block form { margin-top: 0.2rem; }
.badge { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--ok); color: var(--bg); }
.badge.warn { background: var(--warn); }
/* Same look as the chat client's .user-avatar--large: initials on the selection color until an image is stored. */
.avatar-preview { display: inline-grid; place-items: center; flex: none; width: 5rem; height: 5rem; border-radius: 50%; overflow: hidden; background: var(--sel); color: var(--text); font-size: 1.5rem; font-weight: 600; line-height: 1; }
.avatar-preview > img { width: 100%; height: 100%; object-fit: cover; }
/* Crop editor for the profile picture (avatarEditor.ts, same look as the chat client's AvatarEditor.tsx): square frame, zoom slider, buttons. */
.avatar-editor { display: flex; flex-direction: column; gap: 0.5rem; max-width: 100%; }
.avatar-editor-frame { display: block; width: min(16rem, 100%); aspect-ratio: 1; border-radius: var(--r); background: var(--bg); cursor: grab; touch-action: none; user-select: none; }
.avatar-editor-frame:active { cursor: grabbing; }
.avatar-editor-zoom { flex-direction: row; align-items: center; gap: 0.5rem; width: min(16rem, 100%); color: var(--muted); font-size: 0.875rem; }
.avatar-editor-zoom > input { flex: 1; min-width: 0; padding: 0; background: transparent; accent-color: var(--brand); }
.avatar-editor > p { margin: 0; }
/* Inline confirmation for deleting the account on a chat server (no browser dialogs) */
.list li.server .confirm-row { flex-basis: 100%; font-size: 0.875rem; }
.qr { background: #fff; padding: 0.5rem; border-radius: var(--r); line-height: 0; flex: 0 0 auto; }
.qr svg { width: 11rem; height: 11rem; display: block; }
.codes { columns: 2; column-gap: 2rem; margin: 0.4rem 0; padding-left: 1.5rem; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; user-select: all; }
.codes li { padding: 0.1rem 0; break-inside: avoid; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.list li:last-child { border-bottom: 0; }
.list .factor { color: var(--muted); }
.list .factor.recovery { color: var(--warn); }
.list li.server { align-items: center; }
.list li.server input { flex: 1 1 10rem; }
.list li.server img.server-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; }
label.check { flex-direction: row; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
label.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* A quiet service identity beside the task, with progressive disclosure for account tools. */
.brand-head > .row { align-items: flex-start; gap: 1rem; flex-direction: column; }
.brand-head .lang { order: 2; margin-top: 1rem; flex-wrap: wrap; }
.service-host { overflow-wrap: anywhere; }
.brand-head > p:last-child { max-width: 32ch; }
.auth-nav { display: flex; padding: 0.25rem; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); gap: 0.25rem; }
.auth-nav button { flex: 1; background: transparent; color: var(--muted); }
.auth-nav button[aria-pressed="true"] { background: var(--sel); color: var(--text); }
.auth-nav button:hover { color: var(--text); background: var(--bg4); }
.auth-card > p { margin-bottom: 1.5rem; }
.proof-card { border-color: var(--brand); }
.proof-card > p { margin: 0 0 0.75rem; }
form { gap: 1rem; }
input, button { min-height: 44px; }
label.check { display: grid; grid-template-columns: auto 1fr; align-items: start; }
label.check input { min-height: 0; margin-top: 0.25rem; }
label.check small { grid-column: 2; }
/* Irreversible consequence: amber notice with a text label, never colour alone. */
.warning { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem 1rem; border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--r); background: var(--bg); }
.warning strong { color: var(--warn); }
.warning p { margin: 0; }
.password-field { display: flex; gap: 0.25rem; background: var(--bg4); border-radius: var(--r); padding: 0.25rem; }
.password-field input { width: 100%; flex: 1; background: transparent; }
.password-toggle { flex: 0 0 44px; display: grid; place-items: center; padding: 0.5rem; }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
summary { cursor: pointer; font-weight: 600; border-radius: 4px; overflow-wrap: anywhere; }
summary::marker { color: var(--brand); }
.block > summary { font-size: 1.125rem; padding: 0.25rem 0; }
.key-details { color: var(--muted); font-size: 0.875rem; margin: 0.75rem 0; }
.key-details .key { margin-top: 0.75rem; color: var(--text); }
.lookup-card { background: transparent; padding: 1rem 1.5rem; }
.lookup-card form { margin-top: 1.25rem; }
footer { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 0.5rem; }
footer details { width: 100%; }
footer details p { margin: 1rem 0; }
.badge { text-transform: none; letter-spacing: normal; vertical-align: middle; white-space: nowrap; display: inline-block; }
@media (max-width: 900px) {
  .page { max-width: 44rem; display: flex; flex-direction: column; padding: 1.5rem; gap: 1rem; }
  .page > * { width: 100%; }
  .brand-head { position: static; gap: 0.5rem; padding-bottom: 1rem; }
  .brand-head > .row { flex-direction: row; align-items: center; }
  .brand-head .lang { margin-top: 0; }
  .brand-head > p:last-child { max-width: 60ch; }
  .brand-logo { width: 240px; }
}
@media (max-width: 480px) {
  .page { padding: 1rem; }
  .card { padding: 1.25rem; }
  .grow { min-width: 0; }
  .row > .prefix, .row > input { flex-basis: 100%; }
  .row > button { max-width: 100%; }
  .codes { columns: 1; }
}
/* The profile block holds two parts (image, display name): the second heading keeps its distance from the first part. */
.block > h3 ~ h3 { margin-top: 1.75rem; }

/* Notices about a measure (main.ts renderNotices): one quiet card each, the suspension in the warning colour. */
.notices { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.6rem 0 0.2rem; }
.notice { border: 1px solid var(--line, #22334F); border-left: 4px solid var(--away, #FFC568); border-radius: var(--r, 12px); padding: 0.8rem 1rem; background: var(--bg, #0C1424); display: flex; flex-direction: column; gap: 0.5rem; }
.notice.suspended { border-left-color: var(--danger, #FF7F91); }
.notice.done { border-left-color: var(--ok, #42D6AE); }
.notice p { margin: 0; }
.notice .when { font-size: 0.875rem; }
.notice button { align-self: flex-start; }
.notices details > summary { font-size: 0.875rem; }
.notices details .notice { margin-top: 0.5rem; }
