/*
 * The auth pages in the LastID Design System (the "Design System" artifact on claude.ai): its
 * tokens, Comfortaa, Lucide icons, and its Button, TextField, Checkbox, Radio and toast, written
 * as plain CSS. No framework: a class here is one of the design system's components.
 */

:root {
    --blue-50: #ebf4ff;
    --blue-100: #d6e9ff;
    --blue-500: #007aff;
    --blue-600: #0062d6;
    --blue-700: #004ca8;
    --gray-100: #eceef2;
    --gray-200: #dfe2e8;
    --gray-300: #c6cad3;
    --gray-400: #9aa0ad;
    --gray-500: #717886;
    --gray-600: #545a67;
    --gray-700: #3a3f4a;
    --gray-900: #13151a;
    --gray-950: #0a0b0e;
    --green-50: #e8f8ef;
    --green-500: #1fb86a;
    --amber-50: #fef5e6;
    --amber-500: #f59e0b;
    --red-50: #fdeceb;
    --red-500: #e5372e;
    --red-600: #c42b23;
    --red-700: #9e211b;

    --surface-app: #fff;
    --surface-card: #fff;
    --surface-sunken: #f5f6f8;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-500);
    --text-tertiary: var(--gray-400);
    --border-subtle: var(--gray-100);
    --border-default: var(--gray-200);
    --border-strong: var(--gray-300);
    --action-primary: var(--blue-500);
    --action-primary-tint: var(--blue-50);

    --gradient-text: linear-gradient(90deg, #007aff 0%, #8a67bc 55%, #fa577d 100%);
    --gradient-ring: linear-gradient(135deg, #007aff 10%, #8a67bc 50%, #fa577d 90%);
    --shadow-2: 0 4px 12px rgba(19, 21, 26, .06), 0 1px 3px rgba(19, 21, 26, .05);
    --shadow-3: 0 12px 32px rgba(19, 21, 26, .10), 0 2px 6px rgba(19, 21, 26, .05);
    --shadow-focus: 0 0 0 4px rgba(0, 122, 255, .22);
    --font: "Comfortaa Variable", "Comfortaa", ui-rounded, system-ui, sans-serif;
    --ease-standard: cubic-bezier(.2, 0, 0, 1);
    --duration-fast: 120ms;
    --duration-base: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 24px;
    color: var(--text-primary);
    background: var(--surface-app);
    -webkit-font-smoothing: antialiased;
}

/* Form controls don't take the page's font by themselves. */
button, input, select, textarea { font-family: inherit; }

h1, h2, p, ol, ul { margin: 0; }

a { color: var(--blue-500); text-decoration: none; font-weight: 700; }
a:hover { color: var(--blue-600); }

/* Lucide (lucide-static's font): outline, the colour of the text around it. */
[class^="icon-"], [class*=" icon-"] { line-height: 1; vertical-align: -0.125em; }

/* --- The page: the website's soft blue glow behind a white card --- */

body.auth-page {
    /* The viewport as it is now: on iOS 100vh is the height with the browser's bars hidden,
       taller than the sign-in sheet, which then scrolls through blank space. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
        radial-gradient(48% 60% at 0% 100%, rgba(0, 122, 255, .11), rgba(0, 122, 255, 0) 100%),
        radial-gradient(44% 56% at 100% 0%, rgba(0, 122, 255, .11), rgba(0, 122, 255, 0) 100%),
        var(--surface-app);
}

.auth-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-brand img {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    box-shadow: var(--shadow-2);
}

/* The Wordmark: Comfortaa 700, the letters filled with the brand gradient. */
.wordmark {
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    box-shadow: var(--shadow-3);
}

.auth-card--wide { max-width: 680px; }

.auth-card--center { text-align: center; }

/* On a phone the page is the card: no box floating on a backdrop, and the content starts at the
   top, where the keyboard leaves it in view. */
@media (max-width: 575.98px) {
    body.auth-page {
        justify-content: flex-start;
        padding: 24px 20px;
        background: var(--surface-app);
    }

    .auth-card {
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* --- Type: the design system's scale --- */

.title {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}

.subtitle {
    margin-top: 6px;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 20px;
    color: var(--text-secondary);
    text-align: center;
}

.title--spaced { margin-bottom: 20px; }
.subtitle--tight { margin-bottom: 8px; }
.subtitle--last { margin-bottom: 0; }

.headline {
    font-size: 17px;
    line-height: 22px;
    font-weight: 700;
}

.footnote {
    font-size: 13px;
    line-height: 18px;
    color: var(--text-secondary);
}

.page-note {
    margin-top: 24px;
    font-size: 15px;
    line-height: 20px;
    color: var(--text-secondary);
    text-align: center;
}

.page-note + .page-note { margin-top: 8px; }
.page-note--above { margin: 0 0 20px; }

/* A big Lucide glyph over a page's title. */
.page-icon {
    display: block;
    margin-bottom: 12px;
    font-size: 40px;
    color: var(--text-tertiary);
}

.page-icon--danger { color: var(--red-500); }
.page-icon--success { color: var(--green-500); }

.stack { display: flex; flex-direction: column; gap: 12px; }

/* --- Button: outline for in-screen actions, filled primary for the one confirming action --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform var(--duration-fast) var(--ease-standard),
        background var(--duration-fast),
        color var(--duration-fast),
        border-color var(--duration-fast);
}

.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn [class^="icon-"] { font-size: 20px; }

.btn--lg { height: 56px; padding: 0 24px; border-radius: 16px; font-size: 16px; }
.btn--lg [class^="icon-"] { font-size: 22px; }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn--block { display: flex; width: 100%; }

.btn--primary { background: var(--blue-500); color: #fff; }
.btn--primary:hover { background: var(--blue-600); color: #fff; }
.btn--primary:active { background: var(--blue-700); }

.btn--outline { background: var(--surface-card); color: var(--blue-500); border-color: var(--blue-500); }
.btn--outline:hover { color: var(--blue-600); border-color: var(--blue-600); }
.btn--outline:active { color: var(--blue-700); border-color: var(--blue-700); }

.btn--outline-neutral { background: var(--surface-card); color: var(--gray-700); border-color: var(--gray-300); }
.btn--outline-neutral:hover { color: var(--gray-900); border-color: var(--gray-400); }
.btn--outline-neutral:active { color: var(--gray-950); border-color: var(--gray-500); }

.btn--outline-danger { background: var(--surface-card); color: var(--red-500); border-color: var(--red-500); }
.btn--outline-danger:hover { color: var(--red-600); border-color: var(--red-600); }
.btn--outline-danger:active { color: var(--red-700); border-color: var(--red-700); }

.btn--danger { background: var(--red-50); color: var(--red-500); }
.btn--danger:hover { background: #fad9d7; color: var(--red-600); }
.btn--danger:active { background: #f6c4c1; color: var(--red-700); }

.btn--ghost { color: var(--blue-500); }
.btn--ghost:hover { background: var(--blue-50); color: var(--blue-600); }
.btn--ghost:active { background: var(--blue-100); color: var(--blue-700); }

/* --- Notice: the toast's look, in the page - its tone's line and icon over the tone's tint --- */

.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--tone);
    background: var(--tint);
    font-size: 15px;
    line-height: 20px;
    font-weight: 700;
    text-align: left;
}

.notice [class^="icon-"] { flex: none; font-size: 20px; color: var(--tone); }

.notice--danger { --tone: var(--red-500); --tint: var(--red-50); }
.notice--success { --tone: var(--green-500); --tint: var(--green-50); }
.notice--warning { --tone: var(--amber-500); --tint: var(--amber-50); }
.notice--brand { --tone: var(--blue-500); --tint: var(--blue-50); }

/* --- TextField: the label above, then a 52px box with a 1.5px border that turns blue, with a
   halo, while its input has focus. What else the box holds - the phone number's country - sits
   on the input's line. --- */

.field { margin-bottom: 20px; }

.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.field-box {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    transition: border-color var(--duration-base), box-shadow var(--duration-base);
}

.field-box:focus-within {
    border-color: var(--action-primary);
    box-shadow: var(--shadow-focus);
}

.field-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 17px;
    color: var(--text-primary);
}

.field-input--code { letter-spacing: 0.2em; }

/* --- The six-digit code: six boxes like the text field's, the one taking the next digit blue
   with the halo. code-input.js marks it live; until then only the plain field shows. The input
   stays over the boxes, invisible, so taps, autofill and paste go to it. --- */

.code-slots { display: none; }

.code-input--live {
    position: relative;
}

.code-input--live .field-box {
    position: absolute;
    inset: 0;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.code-input--live .field-box:focus-within { box-shadow: none; }

.code-input--live .field-input--code {
    width: 100%;
    height: 100%;
    color: transparent;
    caret-color: transparent;
    letter-spacing: 0;
    /* Under 16px, iOS zooms in on focus. */
    font-size: 16px;
}

.code-input--live .field-input--code::selection { background: transparent; }

.code-input--live .code-slots {
    display: flex;
    gap: 8px;
}

.code-slot {
    flex: 1;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    transition: border-color var(--duration-base), box-shadow var(--duration-base);
}

.code-slot--filled { border-color: var(--border-strong); }

.code-slot--active {
    border-color: var(--action-primary);
    box-shadow: var(--shadow-focus);
}

/* The caret, in the box taking the next digit. */
.code-slot--active:empty::after {
    content: "";
    width: 2px;
    height: 26px;
    border-radius: 1px;
    background: var(--action-primary);
    animation: code-caret 1s steps(1) infinite;
}

@keyframes code-caret {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .code-slot--active:empty::after { animation: none; }
}

/* The phone number's country, with the native select laid over it - invisible, so a tap opens
   the platform's own picker. A rule after it parts it from the number. */
.phone-country {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: stretch;
    padding-right: 12px;
    border-right: 1.5px solid var(--border-default);
    font-size: 17px;
    font-weight: 700;
}

.phone-country .fi {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(19, 21, 26, .12);
}

.phone-country .icon-chevron-down {
    font-size: 16px;
    color: var(--text-tertiary);
}

.phone-country-select {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- Checkbox and Radio: 24px, 1.5px strong border; checked is filled blue --- */

.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-size: 16px;
    cursor: pointer;
}

.checkbox input {
    appearance: none;
    flex: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 7px;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-card) center / 16px no-repeat;
    cursor: pointer;
    transition: background-color var(--duration-fast);
}

.checkbox input:checked {
    border: none;
    background-color: var(--action-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.checkbox input:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.radio-mark {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-card);
    transition: border var(--duration-fast) var(--ease-standard);
}

/* --- List: rows on white, no dividers; a glyph, the label over a grey line, an action --- */

.list { list-style: none; padding: 0; margin: 0 0 24px; }

.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 0;
}

.list-row > [class^="icon-"] { flex: none; width: 24px; font-size: 22px; color: var(--action-primary); text-align: center; }
.list-row-text { flex: 1; min-width: 0; }
.list-row-label { font-size: 16px; line-height: 21px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-line { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.list-row-label, .list-row-line { display: block; }

/* A whole row that is one choice: "Sign in as". */
.list-row--button {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 12px;
}
.list-row--button:hover { background: var(--surface-sunken); }
.list-row--button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.list-row--button > .icon-chevron-right { flex: none; color: var(--text-tertiary); }

/* --- The waiting page's steps for finishing a recovery later --- */

.howto {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--action-primary-tint);
    text-align: left;
}

.howto ol { margin: 8px 0; padding-left: 20px; font-size: 15px; line-height: 22px; }

.ready-at { margin-bottom: 24px; font-weight: 700; }

/* --- Consent: the person's card, as lastid-web's card screen shows it, and what the application receives --- */

.auth-card--consent { max-width: 592px; padding: 32px 16px 24px; }

@media (max-width: 575.98px) {
    .auth-card--consent { padding: 0; }
}

/* The application's icon, above what it asks for. */
.consent-application { position: relative; display: flex; justify-content: center; width: max-content; margin: 0 auto 12px; }
/* The label hangs 9px below the icon: the intro keeps its gap under it. */
.consent-application:has(.application-label) { margin-bottom: 21px; }

/* The label its owner put on it ("staging"), on the icon's lower edge like a card's chip: small caps
   in one of the design system's colours, a white border lifting it off the icon. */
.application-label {
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    padding: 2px 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--gray-600);
    box-shadow: 0 2px 6px rgba(19, 21, 26, .16);
    color: #fff;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.application-label--blue { background: var(--blue-500); }
.application-label--green { background: var(--green-500); }
.application-label--amber { background: var(--amber-500); color: var(--gray-900); }
.application-label--red { background: var(--red-500); }

.consent-intro { margin-bottom: 24px; text-align: center; font-size: 15px; line-height: 20px; color: var(--text-secondary); }
.consent-intro strong { color: var(--text-primary); }
/* Under the intro, for an account that acts for others: the intro's gap, split around it. */
.consent-closed-cards { margin-top: 24px; text-align: left; }

.auth-card--consent .notice { margin-bottom: 20px; }

/* The person's card (the design canvas's cards.css, as lastid-web's): one frame, its banner - each
   card's own (CardBanner) - with the photo on its lower left in the gradient ring and a white border,
   the name chip on its lower right, the name and the card's line under it, then the groups inside it. */
.hero-wrap { position: relative; }
.consent-card {
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    background: var(--surface-card);
    box-shadow: var(--shadow-2);
}
.pcard-hero { padding: 12px 12px 4px; }
.pcard-top { position: relative; margin-bottom: 62px; }
.pcard-banner { height: 176px; border-radius: 22px; background-color: var(--blue-500); }
.pcard-photo {
    position: absolute;
    left: 30px;
    bottom: -52px;
    display: flex;
    padding: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 16px rgba(19, 21, 26, .18);
}
.pcard-photo .avatar--lg { width: 116px; height: 116px; }
.pcard-chip {
    position: absolute;
    right: 30px;
    bottom: -18px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 180px);
    padding: 8px 14px 8px 18px;
    border: none;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(19, 21, 26, .14);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
    white-space: nowrap;
}
.pcard-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pcard-chip--menu { cursor: pointer; }
.pcard-chip--menu:hover { background: var(--blue-50); }
.pcard-chip--menu:focus-visible, .pcard-chip--menu[aria-expanded="true"] { outline: none; box-shadow: var(--shadow-focus); }
.pcard-chip .icon-chevron-down { flex: none; font-size: 14px; }
.pcard-body { padding: 0 18px 4px 30px; }
.pcard-text { display: flex; flex-direction: column; min-width: 0; }
.pcard-name { margin: 0; overflow: hidden; font-size: 24px; line-height: 30px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.pcard-role { margin: 2px 0 0; font-size: 15px; line-height: 20px; color: var(--text-secondary); }
.pcard-role[hidden] { display: none; }
.consent-card .card-values { padding: 20px 12px 20px; }

/* Each thing asked for: a group, its header over the rows. */
.group + .group { margin-top: 28px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 8px 8px; }
.group-header { margin: 0; font-size: 13px; line-height: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
/* Where lastid-web changes it; back from there, the page shows what is there now. */
.group-action { font-size: 14px; line-height: 18px; font-weight: 700; color: var(--action-primary); }
.group-action:hover { text-decoration: underline; }
.group .checkbox { margin: 0 8px; }
/* One or more to pick: plain rows, the checkbox first, like the birthday's. */
.group .value-options { gap: 0; margin: 0; }
.group .value-option { padding: 10px 8px; border: none; border-radius: 14px; }
.group .value-option:hover { background: var(--surface-sunken); }
.group .value-option:has(input:checked) { box-shadow: none; }
.group .value-option:has(input:focus-visible) { box-shadow: var(--shadow-focus); }

.consent-hint { margin: 28px 0 0; }
.note { padding: 0 8px; font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.note--center { text-align: center; }
.consent-actions { margin-top: 28px; padding: 0 8px; }
.consent-terms { margin: 28px 0 0; }

.value-options { display: grid; gap: 8px; margin-bottom: 8px; }

.value-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color var(--duration-base), box-shadow var(--duration-base);
}

.value-option:hover { border-color: var(--border-strong); }

.value-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.value-option:has(input:checked) { border-color: var(--action-primary); box-shadow: var(--shadow-focus); }
.value-option:has(input:checked) .radio-mark { border: 7px solid var(--action-primary); }

/* A value-option that is one of several picked: the Checkbox's square in place of the radio. */
.check-mark {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-card) center / 16px no-repeat;
    transition: background-color var(--duration-fast);
}
.value-option:has(input:checked) .check-mark {
    border: none;
    background-color: var(--action-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.value-option:has(input:focus-visible) { box-shadow: var(--shadow-focus); }

.value-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.value-option-value { font-size: 15px; line-height: 20px; font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.value-option-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-secondary); }

/* The card picker: the chip's menu of the person's cards; one picks what it gives of each kind (consent.js). */
/* It opens under the name chip, on the banner's lower right. */
.card-menu {
    position: absolute;
    top: 228px;
    right: 24px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: min(320px, calc(100% - 28px));
    padding: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: var(--surface-card);
    box-shadow: var(--shadow-3);
}
.card-menu[hidden] { display: none; }
.card-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.card-menu-item:hover { background: var(--surface-sunken); }
.card-menu-item--on, .card-menu-item--on:hover { background: var(--action-primary-tint); }
.card-menu-item > .icon-id-card { flex: none; font-size: 20px; color: var(--text-secondary); }
.card-menu-item--on > .icon-id-card { color: var(--action-primary); }
.card-menu-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.card-menu-name { font-size: 15px; line-height: 20px; font-weight: 700; }
.card-menu-item--on .card-menu-name { color: var(--blue-600); }
.card-menu-sub { font-size: 13px; line-height: 18px; color: var(--text-secondary); overflow-wrap: anywhere; }

/* InfoRow, the app's: a glyph, a grey line above the value, the verified check, what it ends with. */
.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 10px 8px;
    border: none;
    border-radius: 14px;
    background: var(--surface-card);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    text-decoration: none;
    transition: background var(--duration-fast);
}
button.info-row, a.info-row { cursor: pointer; }
button.info-row:hover, a.info-row:hover { background: var(--surface-sunken); }
button.info-row:focus-visible, a.info-row:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.info-row[hidden] { display: none; }
.info-row > [class^="icon-"] { flex: none; width: 24px; font-size: 22px; color: var(--action-primary); text-align: center; }
.info-row--dimmed > [class^="icon-"], .info-row--dimmed .info-row-value { color: var(--text-tertiary); }
.info-row-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.info-row-label { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.info-row-value { font-size: 16px; line-height: 21px; font-weight: 500; white-space: pre-line; overflow-wrap: anywhere; }
.info-row-trailing { display: flex; flex: none; align-items: center; }
.chevron { font-size: 18px; color: var(--text-tertiary); transition: transform var(--duration-fast); }
.pick-row[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.add-row { min-height: 52px; color: var(--action-primary); font-weight: 600; }
.add-row .info-row-value { color: var(--action-primary); font-weight: 600; }

/* A kind's other values, expanded below its row: picking one puts it in the row (consent.js). */
.choices { margin-top: 2px; }
.choices[hidden] { display: none; }

/* Adding one in place: its form opens under the row, the design system's text fields in it. */
.add-form { padding: 8px 8px 4px; }
.add-form[hidden] { display: none; }
.add-form .notice { margin-bottom: 16px; }
.add-form .note { margin: -8px 0 16px; padding: 0; }
.add-actions { display: flex; justify-content: flex-end; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field-box > [class^="icon-"] { flex: none; font-size: 20px; color: var(--text-tertiary); }
.field-box--area { height: auto; min-height: 52px; padding-top: 12px; padding-bottom: 12px; align-items: flex-start; }
.field-box--area > [class^="icon-"] { margin-top: 2px; }
.field-box textarea.field-input { resize: vertical; font: inherit; font-size: 17px; line-height: 24px; }
.field-select {
    appearance: none;
    height: 100%;
    padding-right: 24px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right center / 18px no-repeat;
    font: inherit;
    font-size: 17px;
    cursor: pointer;
}
/* An address: its country's fields in its rows (consent-add.js), two to a row where it has two. */
.address-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.address-fields > * { grid-column: 1 / -1; }
.address-fields > .note { order: 100; }
.address-fields > [hidden] { display: none; }
/* In their own words, a gender is typed. */
.gender-own { display: none; }
.add-form:has(option[value="own"]:checked) .gender-own { display: block; }

/* Verified: the app's blue badge-check right after the value. */
.verified-mark { margin-left: 6px; font-size: 16px; color: var(--blue-500); vertical-align: -2px; }

/* Application icon: a rounded square like an iPhone app icon, so an application never reads as a
   person; a hairline keeps a white icon's edge on white. Without one, Lucide's app-window on grey. */
.application-icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 22.5%;
    outline: 1px solid rgba(0, 0, 0, 0.08);
    outline-offset: -1px;
    object-fit: cover;
}

.application-icon--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-sunken);
    color: var(--text-tertiary);
    font-size: 24px;
}

/* Avatar: the photo in the thin gradient ring; without one, Lucide's user on white. One element
   draws it all - the ring is its border, the white gap its padding, the photo its content - so
   the circles share one box; nested boxes each snap to whole pixels and leave the ring uneven. */
.avatar {
    flex: none;
    width: 52px;
    height: 52px;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(#fff, #fff) padding-box, var(--gradient-ring) border-box;
    object-fit: cover;
}

.avatar--sm { width: 36px; height: 36px; }

/* A card hero's photo. */
.avatar--lg { width: 96px; height: 96px; border-width: 2.5px; padding: 3px; }

.avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 24px;
}

.avatar--lg.avatar--placeholder { font-size: 46px; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    color: var(--gray-600);
    box-shadow: inset 0 0 0 1px var(--border-default);
}

.pill--brand { color: var(--blue-500); box-shadow: none; background: var(--blue-50); }
.pill--success { color: var(--green-500); box-shadow: none; background: var(--green-50); }

.actions { display: flex; justify-content: flex-end; gap: 12px; }

@media (max-width: 575.98px) {
    .actions { flex-direction: column-reverse; }
    .actions .btn { width: 100%; }
}
