/* AVVA / Bio workspaces. A shared visual language; a distinct task for each role. */
:root {
  --cabinet-blue: #8ebdff;
  --cabinet-inset: #0f1a2c;
  --cabinet-divider: #2b3c53;
  --cabinet-success: #92dac0;
  --cabinet-warning: #edc58b;
}

/* The entry screen pairs a quiet, branded observation story with a focused form. */
.auth-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(440px, 1fr); background: #0b1220; max-width: none; margin: 0; padding: 0; }
.auth-story { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(34px, 5.5vw, 84px); background: #10223a; border-right: 1px solid #253c59; overflow: hidden; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: #edf3fd; font-size: 15px; line-height: 1.4; font-weight: 600; }
.auth-brand .brand-symbol { width: 43px; height: 43px; border-radius: 14px; flex: 0 0 auto; }
.auth-brand .brand-word { font-size: 35px; }
.auth-brand > span:not(.brand-symbol):not(.brand-word) { display: block; }
.auth-brand small { display: block; color: #a6bedb; font-size: 11px; font-weight: 400; margin-top: 2px; }
.auth-story h1 { font-size: clamp(36px, 4.1vw, 62px); font-weight: 700; letter-spacing: -.045em; max-width: 12ch; line-height: 1.04; margin: clamp(50px, 8.5vh, 110px) 0 23px; }
.auth-story > p, .auth-story .lead, .auth-story .auth-lead { color: #b2c8e3; font-size: 16px; max-width: 38ch; line-height: 1.65; }
.auth-story > div:not(.auth-proof) { width: 100%; }
.auth-story .cabinet-kicker { margin-top: 45px; color: #9cbbdf; }
.auth-story .cabinet-kicker + h1 { margin-top: 18px; }
.auth-orbit { width: 100%; min-width: 0; max-width: 510px; margin: 37px 0 28px; }
.auth-orbit svg { display: block; width: 100%; height: auto; overflow: visible; }
svg.auth-orbit { display: block; height: auto; overflow: visible; }
.auth-orbit text { font-family: var(--font); }
.auth-proof { margin: auto 0 0; padding: 22px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 13px 24px; border-top: 1px solid #314761; width: 100%; color: #b8cde7; font-size: 12px; }
.auth-proof li, .auth-proof > span { display: flex; align-items: center; gap: 8px; }
.auth-proof .icon { width: 17px; height: 17px; color: #89b7f7; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px clamp(30px, 5vw, 80px); min-width: 0; }
.auth-form-wrap { width: 100%; max-width: 415px; }
.auth-form-wrap > .badge { margin-bottom: 19px; }
.auth-form-wrap h2 { font-size: 32px; font-weight: 710; letter-spacing: -1px; line-height: 1.15; margin: 0 0 12px; }
.auth-form-wrap > p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.auth-form-wrap .field { margin: 19px 0; }
.auth-form-wrap .field-label { font-size: 13px; color: #c6d5e9; margin-bottom: 8px; }
.auth-form-wrap .field input:not([type=range]), .auth-form-wrap .field select { min-height: 52px; border: 1px solid #354962; border-radius: 12px; background: #111d30; padding: 13px 15px; font-size: 16px; box-shadow: none; }
.auth-form-wrap input:-webkit-autofill { -webkit-text-fill-color: #edf3fd; -webkit-box-shadow: 0 0 0 1000px #111d30 inset; }
.password-wrap { display: flex; position: relative; align-items: center; }
.auth-form-wrap .password-wrap input:not([type=range]) { padding-right: 58px; }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; color: #a8bfdc; background: transparent; }
.password-toggle:hover { color: #e3efff; background: #23344d; }
.password-toggle .icon { width: 20px; height: 20px; }
.auth-submit { width: 100%; min-height: 52px; margin-top: 6px; font-size: 15px; border-radius: 12px; background: #377be2; border-color: #5896f4; }
.auth-submit:hover { transform: none; background: #4386eb; }
.login-help { display: flex; width: fit-content; min-height: 44px; align-items: center; justify-content: center; margin: 9px auto 17px; padding: 7px; font-size: 13px; color: #97c3ff; background: transparent; }
.auth-error { padding: 13px 15px; border: 1px solid #854650; background: #36212b; border-radius: 11px; margin: 16px 0; color: #ffd0d3; font-size: 13px; line-height: 1.5; }
.auth-error:empty { display: none; }
.auth-form-wrap input[aria-invalid="true"] { border-color: #e58b96; }
.auth-footer { color: #8b9fb9; font-size: 11px; line-height: 1.6; margin-top: 22px; max-width: 48ch; }
.auth-footer .icon { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }

/* First visit keeps the program and privacy choices together. */
.onboarding-layout { min-height: 100dvh; display: grid; place-items: center; padding: 48px 22px; background: #0b1220; max-width: none; margin: 0; }
.onboarding-card { width: 100%; max-width: 620px; padding: 38px; border: 1px solid #30445f; border-radius: 28px; background: #131e2f; }
.onboarding-card .auth-brand { margin-bottom: 32px; }
.onboarding-card h1 { font-size: 34px; line-height: 1.14; letter-spacing: -1px; font-weight: 700; margin-bottom: 12px; }
.onboarding-card > p { color: #a7bbd5; font-size: 14px; line-height: 1.65; }
.onboarding-summary { padding: 19px; border-radius: 16px; background: #1b2d46; margin: 24px 0; }
.onboarding-summary h2 { font-size: 18px; font-weight: 650; margin-bottom: 7px; }
.onboarding-summary p { font-size: 13px; color: #b0c7e5; line-height: 1.6; }
.onboarding-summary .row + .row { margin-top: 12px; }
.onboarding-summary .icon { color: #95c1fd; }
.onboarding-summary > div { display: flex; gap: 15px; align-items: baseline; justify-content: space-between; font-size: 13px; }
.onboarding-summary > div + div { margin-top: 14px; }
.onboarding-summary > div > span { color: #9bb5d7; }
.onboarding-summary > div > strong { font-size: 13px; font-weight: 550; text-align: right; }
.consent-line { display: flex; align-items: flex-start; gap: 13px; min-height: 56px; padding: 15px 0; cursor: pointer; font-size: 14px; line-height: 1.5; }
.consent-line + .consent-line { border-top: 1px solid var(--line); }
.consent-line input[type="checkbox"] { accent-color: #669fff; width: 23px; height: 23px; flex-shrink: 0; margin: 1px 0 0; }
.consent-line strong { display: block; font-weight: 550; }
.consent-line small { display: block; color: #a1b4ce; font-size: 12px; margin-top: 5px; line-height: 1.5; }
.onboarding-card .form-actions { margin-top: 25px; }
.onboarding-card .field input:not([type=range]), .onboarding-card .field select { min-height: 48px; border-radius: 11px; font-size: 16px; }

/* Signed-in identity is persistent; role changes happen through a different account. */
.role-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 1px solid #354d70; border-radius: 20px; color: #b6d3ff; background: #1a2d49; font-size: 11px; font-weight: 550; white-space: nowrap; }
.role-curator .role-badge { background: #1c3045; border-color: #355970; color: #a9d2ed; }
.role-admin .role-badge { background: #292a44; border-color: #464b73; color: #c4c7f4; }
.account-chip { display: inline-flex; align-items: center; gap: 9px; color: #c1d3ed; font-size: 12px; background: transparent; padding: 0; min-height: 44px; }
.account-chip .avatar { width: 32px; height: 32px; font-size: 11px; }
.shell .top-actions { gap: 10px; }
.shell .top-actions [data-action="logout"] { min-height: 44px; min-width: 44px; font-size: 12px; }
.nav-link[data-page="more"] { display: none; }
.welcome-strip { display: flex; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid #2a4262; background: #142640; border-radius: 17px; margin: -5px 0 22px; }
.welcome-strip > .icon { color: #8fbaff; width: 25px; height: 25px; }
.welcome-strip > div { min-width: 0; flex: 1; }
.welcome-strip > div { display: flex; gap: 12px; align-items: center; }
.welcome-strip > div > .icon { color: #8fbaff; width: 23px; height: 23px; }
.welcome-strip > span.muted { font-size: 12px; }
.welcome-strip strong { font-size: 14px; font-weight: 600; display: block; }
.welcome-strip p, .welcome-strip small { display: block; font-size: 12px; color: #a7bfdc; margin-top: 4px; }
.welcome-strip .text-btn { flex-shrink: 0; }

/* Curator and administration views favor readable rows and useful summaries. */
.cabinet-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 2px 0 27px; }
.cabinet-intro h1 { font-size: 36px; letter-spacing: -1.15px; font-weight: 720; line-height: 1.15; }
.cabinet-intro p { color: #a0b5d0; font-size: 13px; line-height: 1.6; max-width: 62ch; margin-top: 9px; }
.cabinet-intro > .btn { flex-shrink: 0; }
.cabinet-kicker { color: #83aff0; font-size: 12px; margin-bottom: 9px; line-height: 1.4; }
.cabinet-stats, .admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #2a3e58; border-radius: 18px; background: #142137; margin-bottom: 25px; overflow: hidden; }
.cabinet-stat { padding: 22px 24px; min-width: 0; }
.cabinet-stat + .cabinet-stat { border-left: 1px solid #2a3e58; }
.cabinet-stat > .icon { color: #8ab7f5; width: 20px; height: 20px; margin-bottom: 10px; }
.cabinet-stat strong { display: block; font-size: 34px; line-height: 1.1; font-weight: 650; letter-spacing: -1px; font-variant-numeric: tabular-nums; margin: 0 0 9px; color: #e4eeff; }
.cabinet-stat strong small { font-size: 17px; font-weight: 400; color: #819dbc; letter-spacing: 0; }
.cabinet-stat > span + strong { margin-top: 11px; }
.cabinet-stat > span, .cabinet-stat > p { display: block; color: #aec1db; font-size: 12px; line-height: 1.5; }
.cabinet-stat > small { display: block; color: #8ea8ca; font-size: 11px; margin-top: 5px; }
.cabinet-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); align-items: start; gap: 22px; }
.cabinet-section { min-width: 0; background: #131e2f; border: 1px solid #28394f; border-radius: 19px; padding: 22px; }
.cabinet-section + .cabinet-section { margin-top: 22px; }
.cabinet-columns > .cabinet-section + .cabinet-section { margin-top: 0; }
.cabinet-section h2 { font-size: 20px; font-weight: 660; letter-spacing: -.45px; }
.cabinet-section > p { color: #a0b4cf; font-size: 13px; line-height: 1.6; margin-top: 9px; }
.cabinet-section-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.cabinet-section-head p { color: #9bb0cd; font-size: 12px; margin-top: 5px; }
.cabinet-section-head .text-btn { flex-shrink: 0; font-size: 12px; }
.people-list { display: flex; flex-direction: column; }
.person-row { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #28394f; background: transparent; text-align: left; padding: 16px 0; min-height: 78px; }
.person-row:last-child { border-bottom: 0; }
button.person-row:hover, a.person-row:hover { background: #182940; }
.person-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; border-radius: 13px; background: #233957; color: #bed8ff; font-size: 13px; font-weight: 650; }
.person-copy { flex: 1; min-width: 0; }
.person-copy strong { display: block; color: #e4edfb; font-size: 14px; font-weight: 600; line-height: 1.4; }
.person-copy small, .person-copy p { display: block; margin-top: 4px; color: #9db2ce; font-size: 11px; line-height: 1.5; }
.person-status { font-size: 11px; color: #a2b9d6; white-space: nowrap; }
.person-actions { display: flex; gap: 8px; align-items: center; }
.person-actions > .icon { width: 17px; height: 17px; color: #7e9fc9; }
.person-actions .btn, .person-actions .text-btn { font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; font-size: 11px; line-height: 1.35; color: #bfd0e9; background: #253650; white-space: nowrap; }
.status-pill.active, .status-pill.success { color: #a4e1ca; background: #1b3c38; }
.status-pill.paused, .status-pill.warning { color: #efcb96; background: #3b3023; }
.status-pill.suspended { color: #efcb96; background: #3b3023; }
.status-pill.pending { color: #b9cced; background: #253853; }
.status-pill.expired, .status-pill.error { color: #efb7c0; background: #392834; }
.workspace-toolbar { display: flex; align-items: center; gap: 11px; margin: 18px 0; flex-wrap: wrap; }
.workspace-toolbar input, .workspace-toolbar select { min-height: 44px; padding: 10px 13px; border: 1px solid #3c526e; background: #0f1b2d; color: #e6f0ff; border-radius: 10px; font-size: 13px; min-width: 0; }
.workspace-toolbar input { flex: 1; min-width: 170px; }
.workspace-toolbar input::placeholder { color: #8fa7c7; }
.workspace-toolbar label { display: flex; gap: 8px; align-items: center; color: #a8bedc; font-size: 12px; }
.workspace-toolbar label.field { flex-direction: column; align-items: stretch; margin: 0; gap: 0; }
.workspace-toolbar label.field:first-child { flex: 1; }
/* Filters use explicit columns so nested flex controls cannot stretch vertically. */
#admin-filters.workspace-toolbar { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px; }
#admin-filters.workspace-toolbar > label.field { display: block; min-width: 0; width: 100%; margin: 0; }
#admin-filters.workspace-toolbar .field-label { margin-bottom: 8px; line-height: 1.4; }
#admin-filters.workspace-toolbar :is(input, select) { display: block; flex: none; width: 100%; min-width: 0; height: 48px; min-height: 48px; max-height: 48px; }
.workspace-table-wrap { min-width: 0; overflow-x: auto; }
.workspace-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.workspace-table th { color: #91a8c7; font-weight: 400; font-size: 11px; padding: 12px 10px; border-bottom: 1px solid #3a4e69; }
.workspace-table td { vertical-align: middle; padding: 16px 10px; border-bottom: 1px solid #2b3b51; line-height: 1.5; }
.workspace-table th:first-child, .workspace-table td:first-child { padding-left: 0; }
.workspace-table th:last-child, .workspace-table td:last-child { padding-right: 0; }
.workspace-table tr:last-child td { border-bottom: 0; }
.workspace-table td strong { font-weight: 600; }
.workspace-table td small { display: block; font-size: 11px; color: #98afcc; margin-top: 3px; }
.workspace-table .btn, .workspace-table .text-btn { min-height: 44px; font-size: 11px; }
.workspace-table .btn { padding-inline: 12px; }
.workspace-table td .row { gap: 9px; }
.workspace-table select { max-width: 180px; min-height: 44px; padding: 8px; border: 1px solid #3c526e; border-radius: 9px; background: #102035; color: #d6e7ff; font-size: 12px; }
.activity-list { list-style: none; padding: 0; margin: 5px 0 0; }
.activity-item { position: relative; padding: 16px 0 16px 22px; border-bottom: 1px solid #293a50; }
.activity-item:last-child { border-bottom: 0; }
.activity-item:before { content: ''; position: absolute; top: 23px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #739cd6; }
.activity-item strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; }
.activity-item time, .activity-item small { display: block; margin-top: 5px; font-size: 11px; color: #96adcc; }
.activity-item p { color: #aac0dd; font-size: 12px; line-height: 1.5; margin-top: 4px; }
.activity-item:has(.activity-icon) { display: flex; align-items: flex-start; gap: 11px; padding-left: 0; }
.activity-item:has(.activity-icon):before { display: none; }
.activity-icon { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; background: #20354f; color: #8eafe0; border-radius: 9px; }
.activity-icon .icon { width: 15px; height: 15px; }
.empty-state { padding: 35px 20px; text-align: center; color: #9db4d1; line-height: 1.6; }
.empty-state > .icon { width: 32px; height: 32px; color: #759ccf; margin-bottom: 11px; }
.empty-state h2, .empty-state h3 { color: #dbe8fa; font-size: 18px; font-weight: 600; margin-bottom: 7px; }
.empty-state p { max-width: 42ch; margin-inline: auto; font-size: 13px; }
.empty-state .btn { margin-top: 18px; }
.account-profile { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; margin-bottom: 5px; }
.account-profile .person-avatar, .account-profile .avatar { width: 58px; height: 58px; font-size: 19px; border-radius: 18px; }
.account-profile h2 { font-size: 24px; font-weight: 650; }
.account-profile p { color: #a3bad8; font-size: 12px; margin-top: 5px; }
.account-profile .role-badge { margin-top: 8px; }
.card.account-profile { display: block; }
dl.account-profile { display: block; margin: 0 0 22px; padding: 0; }
dl.account-profile > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid #2b3c53; font-size: 13px; }
dl.account-profile > div:last-child { border-bottom: 0; }
dl.account-profile dt { color: #9db5d3; }
dl.account-profile dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.section-links { display: flex; flex-direction: column; gap: 0; }
.section-links a, .section-links button { min-height: 61px; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: transparent; border-bottom: 1px solid #2c3c54; text-align: left; color: #d5e5fb; font-size: 14px; }
.section-links a:last-child, .section-links button:last-child { border-bottom: 0; }
.section-links .icon { color: #89b3ef; }
.section-links :is(a,button) > .icon:last-child { margin-left: auto; width: 17px; height: 17px; }
.mini-timeline { display: flex; gap: 14px; padding: 21px 0 3px; }
.mini-timeline > div { flex: 1; min-width: 0; padding-top: 15px; border-top: 2px solid #3c5579; position: relative; }
.mini-timeline > div:before { position: absolute; content: ''; top: -5px; left: 0; width: 8px; height: 8px; border: 2px solid #719bd5; background: #142238; border-radius: 50%; }
.mini-timeline strong { display: block; font-size: 13px; font-weight: 600; }
.mini-timeline small, .mini-timeline p { display: block; margin-top: 6px; color: #9db4d2; font-size: 11px; line-height: 1.5; }
.mini-timeline:has(> .person-row) { flex-direction: column; gap: 0; padding: 0; }
.mini-timeline > .person-row { min-height: 66px; }
.participant-context { display: flex; align-items: center; gap: 15px; margin: 0 0 20px; padding: 20px; border: 1px solid #2d4564; background: #16263e; border-radius: 17px; }
.participant-context .person-copy strong { font-size: 20px; }
.participant-tabs { display: flex; gap: 8px; border-bottom: 1px solid #2e4059; margin: 22px 0; overflow-x: auto; padding-bottom: 8px; }
.participant-tabs a, .participant-tabs button { white-space: nowrap; flex-shrink: 0; min-height: 44px; padding: 10px 14px; background: transparent; color: #9fb6d3; font-size: 13px; border-radius: 10px; }
.participant-tabs .active, .participant-tabs [aria-selected="true"] { background: #213957; color: #c4ddff; }
.message-list { display: flex; flex-direction: column; gap: 11px; margin: 18px 0; }
.message-card { padding: 17px 19px; background: #182a42; border: 1px solid #2f4869; border-radius: 16px; min-width: 0; }
.message-card.outgoing, .message-card.is-own { background: #1b3455; border-color: #3b5b86; margin-left: 28px; }
.message-card strong { color: #bdd8ff; font-size: 12px; font-weight: 600; }
.message-card p { font-size: 14px; line-height: 1.6; color: #dce8fa; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 7px; }
.message-card time, .message-card small { display: block; color: #9eb6d5; font-size: 10px; margin-top: 8px; }
.message-card .row { justify-content: space-between; align-items: baseline; }
.message-card .row time { margin-top: 0; }
.invite-card { border: 1px solid #345170; border-radius: 16px; background: #162b42; padding: 22px; margin: 18px 0; }
.invite-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 9px; }
.invite-card p { font-size: 12px; color: #a8c1df; line-height: 1.6; }
.invite-code { display: block; padding: 12px 14px; background: #0c1c30; border: 1px dashed #50749f; border-radius: 10px; color: #c6e0ff; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 17px; letter-spacing: .5px; margin: 15px 0; overflow-wrap: anywhere; }
.invite-code code { font: inherit; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.form-actions .small { max-width: 42ch; color: #9ab2d0; }
.cabinet-section .field input:not([type=range]), .cabinet-section .field select, .cabinet-section .field textarea { min-height: 46px; font-size: 14px; border-radius: 10px; }
.cabinet-section .field textarea { min-height: 110px; }
.auth-layout :is(button,a,input,select,summary):focus-visible, .onboarding-layout :is(button,a,input,select):focus-visible, .shell :is(.person-row,.participant-tabs a):focus-visible { outline: 2px solid #9fc7ff; outline-offset: 4px; }

@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
  .auth-story { padding: 40px 34px; }
  .auth-panel { padding: 40px 30px; }
  .auth-story h1 { font-size: 46px; }
  .cabinet-columns { grid-template-columns: 1fr; }
  .cabinet-stats, .admin-summary { margin-bottom: 22px; }
  .cabinet-stat { padding: 21px 18px; }
  .cabinet-intro { align-items: flex-start; }
  .account-chip > span:not(.avatar) { display: none; }
}

@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-story { padding: 27px 30px 29px; border-right: 0; border-bottom: 1px solid #2a405e; }
  .auth-story h1 { max-width: 22ch; font-size: 33px; line-height: 1.13; margin: 26px 0 11px; }
  .auth-story > p, .auth-story .lead, .auth-story .auth-lead { font-size: 13px; max-width: 52ch; line-height: 1.55; }
  .auth-story .cabinet-kicker { display: none; }
  .auth-story .cabinet-kicker + h1 { margin-top: 26px; }
  .auth-orbit, .auth-proof { display: none; }
  .auth-panel { padding: 29px 30px 40px; align-items: flex-start; }
  .auth-form-wrap { max-width: 460px; }
  .auth-form-wrap h2 { font-size: 27px; letter-spacing: -.7px; }
  .auth-form-wrap > p { margin-bottom: 20px; font-size: 13px; }
}

@media (max-width: 700px) {
  .shell .topbar { min-height: 72px; padding: 10px 17px; gap: 8px; }
  .shell .top-actions { gap: 5px; min-width: 0; }
  .shell .top-actions .role-badge { min-height: 27px; font-size: 10px; padding: 3px 8px; }
  .shell .top-actions .account-chip { display: none; }
  .shell .top-actions [data-action="logout"] { padding: 10px; width: 44px; height: 44px; }
  .shell .top-actions [data-action="logout"] > span { display: none; }
  .shell .top-actions > .icon-btn { width: 44px; height: 44px; }
  .shell .mobile-brand { font-size: 25px; flex-shrink: 0; }
  .shell .desktop-only, .shell .mobile-hidden { display: none; }
  .role-curator .nav-link[data-page="more"], .role-admin .nav-link[data-page="more"] { display: flex; }
  .role-curator .nav-link, .role-admin .nav-link { min-width: 0; flex: 1 1 0; font-size: 9px; gap: 5px; }
  .role-curator .nav-link > span, .role-admin .nav-link > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .role-curator .nav-link.mobile-hidden, .role-admin .nav-link.mobile-hidden { display: none; }
  .role-curator .nav-link[data-page="plan"] { display: flex; }
  .cabinet-intro { margin-bottom: 23px; gap: 13px; flex-wrap: wrap; }
  .cabinet-intro h1 { font-size: 32px; line-height: 1.12; letter-spacing: -1px; }
  .cabinet-intro p { font-size: 13px; max-width: 43ch; }
  .cabinet-intro > .btn { width: 100%; }
  .cabinet-kicker { font-size: 12px; margin-bottom: 8px; }
  .cabinet-stats, .admin-summary { gap: 0; border-radius: 17px; margin-bottom: 20px; }
  .cabinet-stat { padding: 17px 12px 16px; }
  .cabinet-stat strong { font-size: 28px; margin-bottom: 7px; letter-spacing: -.7px; }
  .cabinet-stat strong small { font-size: 12px; }
  .cabinet-stat > span, .cabinet-stat > p { font-size: 10px; line-height: 1.5; }
  .cabinet-stat > small { font-size: 10px; }
  .cabinet-stat > .icon { width: 19px; height: 19px; margin-bottom: 9px; }
  .cabinet-columns { gap: 18px; }
  .cabinet-section { padding: 20px 17px; border-radius: 19px; }
  .cabinet-section + .cabinet-section { margin-top: 18px; }
  .cabinet-columns > .cabinet-section + .cabinet-section { margin-top: 0; }
  .cabinet-section-head { gap: 9px; margin-bottom: 12px; }
  .cabinet-section h2 { font-size: 20px; }
  .cabinet-section-head .text-btn { font-size: 11px; }
  .cabinet-section-head p { font-size: 11px; }
  .welcome-strip { padding: 15px; gap: 11px; align-items: flex-start; flex-wrap: wrap; margin: -3px 0 19px; }
  .welcome-strip strong { font-size: 13px; }
  .welcome-strip p, .welcome-strip small { font-size: 11px; }
  .welcome-strip > .icon { margin-top: 2px; width: 22px; height: 22px; }
  .welcome-strip > div { flex-basis: 100%; }
  .welcome-strip > span.muted { margin-left: 35px; font-size: 11px; }
  .welcome-strip .text-btn { margin-left: 33px; padding: 0; min-height: 32px; }
  .person-row { gap: 10px; padding: 15px 0; flex-wrap: wrap; }
  .person-avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
  .person-copy strong { font-size: 13px; }
  .person-copy small, .person-copy p { font-size: 10px; }
  .person-status { font-size: 10px; }
  .person-actions { gap: 3px; }
  .person-actions .btn { padding-inline: 9px; font-size: 10px; }
  .people-list > .person-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 5px 10px; }
  .people-list > .person-row > .person-avatar { grid-row: 1 / 3; }
  .people-list > .person-row > .person-copy { grid-column: 2; }
  .people-list > .person-row > .status-pill { grid-column: 2; grid-row: 2; justify-self: start; white-space: normal; font-size: 9px; }
  .people-list > .person-row > .person-actions { grid-column: 3; grid-row: 1 / 3; }
  .status-pill { font-size: 10px; padding: 5px 7px; }
  .workspace-toolbar { gap: 9px; margin: 17px 0; align-items: stretch; }
  .workspace-toolbar input { flex-basis: 100%; width: 100%; min-width: 0; }
  .workspace-toolbar select { flex: 1; }
  .workspace-toolbar label { min-width: 0; flex: 1 1 45%; flex-direction: column; align-items: stretch; gap: 5px; font-size: 11px; }
  .workspace-toolbar input, .workspace-toolbar select { font-size: 16px; width: 100%; }
  #admin-filters.workspace-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 10px; }
  #admin-filters.workspace-toolbar > label.field:first-child { grid-column: 1 / -1; }
  .workspace-table, .workspace-table tbody, .workspace-table tr, .workspace-table td { display: block; width: 100%; }
  .workspace-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .workspace-table tr { padding: 15px 0; border-bottom: 1px solid #30435c; }
  .workspace-table tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .workspace-table td, .workspace-table td:first-child, .workspace-table td:last-child { padding: 7px 0; border-bottom: 0; }
  .workspace-table td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
  .workspace-table td[data-label]:before { content: attr(data-label); color: #8fa8c8; flex-shrink: 0; font-size: 11px; }
  .workspace-table td:first-child { font-size: 15px; padding-bottom: 11px; }
  .workspace-table td:first-child[data-label] { display: block; }
  .workspace-table td:first-child[data-label]:before { display: none; }
  .workspace-table td:first-child .row { gap: 11px; }
  .workspace-table td:first-child strong { font-size: 14px; }
  .workspace-table td:last-child .actions-wrap, .workspace-table td:last-child .person-actions { width: 100%; gap: 9px; }
  .workspace-table td .btn { flex: 1; font-size: 12px; min-height: 44px; }
  .workspace-table td select { max-width: 64%; font-size: 16px; }
  .activity-item { padding: 15px 0 15px 18px; }
  .activity-item strong { font-size: 12px; }
  .activity-item time, .activity-item small { font-size: 10px; }
  .participant-context { padding: 17px; gap: 12px; flex-wrap: wrap; }
  .participant-context .person-copy strong { font-size: 19px; }
  .participant-context .person-actions { flex-basis: 100%; }
  .participant-tabs { gap: 4px; margin: 17px 0; }
  .participant-tabs a, .participant-tabs button { padding: 10px 11px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { gap: 12px; align-items: stretch; }
  .form-actions .btn { flex: 1; }
  .form-actions .small { flex-basis: 100%; }
  .cabinet-section .field input:not([type=range]), .cabinet-section .field select, .cabinet-section .field textarea { font-size: 16px; }
  .message-card { padding: 15px; border-radius: 15px; }
  .message-card.outgoing, .message-card.is-own { margin-left: 18px; }
  .message-card p { font-size: 13px; }
  .message-card .row { gap: 7px; flex-wrap: wrap; }
  .invite-card { padding: 18px; }
  .invite-code { font-size: 16px; }
  .account-profile h2 { font-size: 22px; }
  .account-profile .person-avatar, .account-profile .avatar { width: 50px; height: 50px; border-radius: 16px; }
  .onboarding-layout { padding: 22px 17px; display: block; }
  .onboarding-card { padding: 24px 19px; border-radius: 23px; margin-inline: auto; }
  .onboarding-card h1 { font-size: 30px; }
  .onboarding-card > p { font-size: 13px; }
  .onboarding-card .auth-brand { margin-bottom: 28px; }
  .onboarding-summary { margin: 22px 0 17px; padding: 17px; }
  .onboarding-summary h2 { font-size: 17px; }
  .onboarding-summary p { font-size: 12px; }
  .consent-line { font-size: 13px; gap: 11px; }
  .consent-line small { font-size: 11px; }
  .onboarding-card .form-actions .btn { width: 100%; flex-basis: 100%; }
}

@media (max-width: 450px) {
  .auth-story { padding: 25px 24px 24px; }
  .auth-brand { font-size: 13px; gap: 11px; }
  .auth-brand .brand-symbol { width: 37px; height: 37px; border-radius: 12px; }
  .auth-story h1 { font-size: 32px; margin-top: 25px; max-width: 18ch; }
  .auth-story > p, .auth-story .lead, .auth-story .auth-lead { font-size: 12px; }
  .auth-panel { padding: 28px 24px 34px; }
  .auth-form-wrap h2 { font-size: 26px; }
  .auth-form-wrap .field { margin: 17px 0; }
  .auth-form-wrap .field input:not([type=range]), .auth-form-wrap .field select { min-height: 50px; }
  .auth-footer { font-size: 10px; }
}

@media (max-width: 380px) {
  .shell .topbar { padding-inline: 13px; }
  .shell .top-actions { gap: 2px; }
  .shell .top-actions .role-badge { font-size: 9px; padding-inline: 7px; }
  .cabinet-stat { padding-inline: 10px; }
  .cabinet-stat strong { font-size: 26px; }
  .cabinet-intro h1 { font-size: 30px; }
  .person-status { white-space: normal; max-width: 85px; text-align: right; }
}

@media (prefers-reduced-motion: no-preference) {
  .password-toggle, .participant-tabs :is(a,button) { transition: background .16s ease, border-color .16s ease, color .16s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-layout *, .onboarding-layout *, .role-curator *, .role-admin * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* A life-size background contour leaves the entry form and its copy in front. */
.auth-human-story { position: relative; isolation: isolate; }
.auth-human-story > :is(.auth-brand, .auth-story-content, .auth-proof) { position: relative; z-index: 2; }
.auth-human-story > .bio-human-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; }
.bio-human-backdrop:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #10223ae8 0%, #10223a91 30%, #10223a24 63%, #10223a00 100%); }
.bio-human-svg { position: absolute; right: -12%; bottom: 2%; height: 95%; min-height: 650px; width: auto; max-width: none; opacity: .51; }
.bio-human-outline { stroke: url(#bio-human-outline-gradient); stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; fill: url(#bio-human-fill-gradient); }
.bio-human-details { stroke: #a2c7ef; stroke-width: .85; stroke-linecap: round; stroke-linejoin: round; opacity: .33; }
.bio-human-face { opacity: .65; }
.bio-human-breath { transform-origin: 310px 340px; }
.bio-human-flow { stroke: #b8d7fb; stroke-width: 1.8; stroke-dasharray: 19 981; stroke-linecap: round; opacity: .23; }
.bio-human-pulse { stroke: var(--human-color); stroke-width: .75; fill: none; opacity: .3; transform-box: fill-box; transform-origin: center; }
.bio-human-point { fill: var(--human-color); opacity: .68; }
@keyframes bio-human-breathe {
  0%, 100% { transform: scale(.97); opacity: .6; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes bio-human-trace { to { stroke-dashoffset: -1000; } }
@keyframes bio-human-pulse {
  0%, 100% { transform: scale(.87); opacity: .14; }
  50% { transform: scale(1.1); opacity: .4; }
}
@media (prefers-reduced-motion: no-preference) {
  .bio-human-breath { animation: bio-human-breathe 8s ease-in-out infinite; }
  .bio-human-flow { animation: bio-human-trace 24s linear infinite; }
  .bio-human-pulse { animation: bio-human-pulse 8s ease-in-out var(--human-delay, 0s) infinite; }
}
@media (max-width: 800px) {
  .auth-human-story { min-height: 285px; }
  .bio-human-svg { min-height: 0; height: 360px; right: -80px; top: -12px; bottom: auto; opacity: .33; }
  .bio-human-backdrop:after { background: linear-gradient(90deg, #10223adb 0%, #10223a99 43%, #10223a22 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .bio-human-breath { transform: none; opacity: .75; }
  .bio-human-flow { display: none; }
  .bio-human-pulse { transform: none; opacity: .28; }
}
