:root {
    --brand: #0066ff;
    --brand-dark: #0052cc;
    --ink: #111827;
    --muted: #4b5563;
    --subtle: #6b7280;
    --line: #e5e7eb;
    --bg: #f3f5f9;
    --card: #ffffff;
    --soft: #eff6ff;
    --radius: 14px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 24px;
    gap: 28px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo { width: 48px; height: auto; display: block; }

.brand-name { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }

.card {
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
    padding: 36px 32px;
    text-align: center;
}

.card h1 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.01em; }

.lead { color: var(--muted); margin: 0 0 28px; }

.card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--brand);
    font-size: 1.35rem;
}

.card-icon-muted { background: #f3f4f6; color: var(--subtle); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-secondary { background: #fff; color: var(--ink); border-color: #d1d5db; }
.btn-secondary:hover { border-color: var(--subtle); }

.btn:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.35); outline-offset: 2px; }

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(30%);
}
.btn-primary[disabled]:hover { background: var(--brand); }
.btn-secondary[disabled]:hover { border-color: #d1d5db; }

.note { margin: 20px 0 0; font-size: 0.875rem; color: var(--subtle); }
.note i { margin-right: 4px; }

.footer {
    font-size: 0.875rem;
    color: var(--subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.footer a { color: var(--subtle); text-decoration: none; }
.footer a:hover { color: var(--brand); }
.footer a i { margin-right: 4px; }

@media (max-width: 480px) {
    .card { padding: 28px 20px; }
    .card h1 { font-size: 1.25rem; }
}

/* ---- Forms (Step 2) ---- */

.card-form { max-width: 520px; }

.card-icon-success { background: #ecfdf5; color: #047857; }

.form { text-align: left; display: flex; flex-direction: column; gap: 18px; margin: 0 0 4px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field label { font-weight: 600; font-size: 0.925rem; }

.field input {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18); }
.field input[aria-invalid="true"] { border-color: #dc2626; }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.hint { margin: 0; font-size: 0.85rem; color: var(--subtle); }
.hint i { margin-right: 4px; color: var(--brand); }
.hint a { color: var(--brand); font-weight: 600; text-decoration: none; }
.hint a:hover { text-decoration: underline; }
.contact-tip { margin-top: 2px; line-height: 1.45; }

.field-error { margin: 0; font-size: 0.85rem; color: #b91c1c; }
.field-error i { margin-right: 4px; }

.field-captcha { align-items: flex-start; min-height: 78px; }

.code-input {
    text-align: center;
    font-size: 1.6rem !important;
    letter-spacing: 0.4em;
    font-variant-numeric: tabular-nums;
    padding: 12px 13px 12px calc(13px + 0.4em) !important;
}

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
    padding: 12px 14px;
    margin: 0 0 20px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 0.925rem;
}
.alert i { margin-top: 3px; }
.alert a { color: inherit; font-weight: 600; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-info { background: var(--soft); border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.company-banner { margin-bottom: 16px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 16px;
    color: var(--subtle);
    font-size: 0.875rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.resend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.resend form { margin: 0; }
.resend .note { grid-column: 1 / -1; margin: 4px 0 0; }

.signout { margin: 22px 0 0; }

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--subtle);
    cursor: pointer;
    text-decoration: underline;
}
.link-button:hover { color: var(--brand); }

.note a { color: var(--brand); font-weight: 600; text-decoration: none; }
.note a:hover { text-decoration: underline; }

.nowrap { white-space: nowrap; }

[hidden] { display: none !important; }

@media (max-width: 480px) {
    .field-row, .resend { grid-template-columns: 1fr; }
}

/* ---- Contact changes, email verification, profile (Step 3) ---- */

.resend-single { grid-template-columns: 1fr; }

.change { margin: 22px 0 0; text-align: left; }
.change summary {
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand);
    list-style: none;
}
.change summary::-webkit-details-marker { display: none; }
.change summary i { margin-right: 4px; font-size: 0.8rem; }
.change summary:hover { text-decoration: underline; }
.change[open] summary { margin-bottom: 16px; }
.change .form { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: #ecfdf5; color: #047857; }
.badge-muted { background: #f3f4f6; color: var(--subtle); }
.lead .badge { margin-bottom: 10px; }

.profile { margin: 0 0 24px; text-align: left; border: 1px solid var(--line); border-radius: 10px; }
.profile-row { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.profile-row + .profile-row { border-top: 1px solid var(--line); }
.profile dt { font-size: 0.85rem; font-weight: 600; color: var(--subtle); }
.profile dt i { width: 1.1em; margin-right: 4px; color: var(--brand); }
.profile dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-value { font-weight: 600; overflow-wrap: anywhere; }

/* ---- One-page account flows (Step 4) ---- */

.loading { color: var(--subtle); margin: 8px 0 0; }
.loading i { margin-right: 6px; color: var(--brand); }

.steps {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    counter-reset: none;
}
.steps-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--subtle);
}
.steps-item + .steps-item::before {
    content: "";
    position: absolute;
    top: 15px;
    right: calc(50% + 20px);
    width: calc(100% - 32px);
    height: 2px;
    background: var(--line);
}
.steps-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid #d1d5db;
    background: #fff;
    color: var(--subtle);
    font-size: 0.85rem;
}
.steps-dot .fa-check { display: none; }
.steps-item.is-current { color: var(--ink); }
.steps-item.is-current .steps-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12); }
.steps-item.is-done { color: #047857; }
.steps-item.is-done .steps-dot { border-color: #059669; background: #059669; color: #fff; }
.steps-item.is-done .steps-num { display: none; }
.steps-item.is-done .steps-dot .fa-check { display: inline-block; }
.steps-item.is-done + .steps-item::before { background: #059669; }

.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-link { font-size: 0.85rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.label-link:hover { text-decoration: underline; }

.choice { border: 0; padding: 0; margin: 0; }
.choice legend { font-weight: 600; font-size: 0.925rem; padding: 0; margin-bottom: 8px; }
.choice-option { display: block; cursor: pointer; }
.choice-option + .choice-option { margin-top: 10px; }
.choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.choice-body > i { width: 1.4em; text-align: center; color: var(--brand); font-size: 1.1rem; }
.choice-body strong { display: block; font-size: 0.95rem; }
.choice-hint { display: block; font-size: 0.82rem; color: var(--subtle); }
.choice-option input:checked + .choice-body { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 0 1px var(--brand); }
.choice-option input:focus-visible + .choice-body { box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.3); }

.btn[aria-busy="true"] { cursor: progress; }

@media (max-width: 480px) {
    .steps-label { font-size: 0.72rem; text-align: center; }
}

/* ---- New-password rules and strength meter ---- */

.password-rules { line-height: 1.7; }
.specials { white-space: nowrap; }
.specials code {
    display: inline-block;
    min-width: 1.35em;
    padding: 0 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    color: var(--ink);
    background: #f3f4f6;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.strength { margin: 2px 0 0; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-bar span { height: 6px; border-radius: 3px; background: var(--line); transition: background-color 0.15s ease; }
.strength-label { margin: 4px 0 0; font-size: 0.82rem; color: var(--subtle); }

.strength[data-strength="1"] .strength-bar span:nth-child(-n+1) { background: #dc2626; }
.strength[data-strength="2"] .strength-bar span:nth-child(-n+2) { background: #d97706; }
.strength[data-strength="3"] .strength-bar span:nth-child(-n+3) { background: #16a34a; }
.strength[data-strength="4"] .strength-bar span { background: #047857; }
.strength[data-strength="1"] .strength-label { color: #b91c1c; font-weight: 600; }
.strength[data-strength="2"] .strength-label { color: #b45309; font-weight: 600; }
.strength[data-strength="3"] .strength-label { color: #15803d; font-weight: 600; }
.strength[data-strength="4"] .strength-label { color: #047857; font-weight: 600; }

.field-live { margin: 0; font-size: 0.85rem; }
.field-live:empty { margin-top: -6px; }
.field-live i { margin-right: 4px; }
.field-live-error { color: #b91c1c; }
.field-live-ok { color: #047857; }

/* ---- App shell (/portal/*) ---- */

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--brand);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

body.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.topbar-logo { width: 38px; height: auto; display: block; }
.topbar-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.topbar-toggle {
    display: none;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 1.05rem;
    cursor: pointer;
}

.topbar-toggle:focus-visible,
.usermenu-button:focus-visible,
.usermenu-item:focus-visible,
.app-nav-link:focus-visible,
.icon-button:focus-visible,
.tab:focus-visible,
.link-button:focus-visible,
.profile-avatar:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }

.usermenu { position: relative; margin-left: auto; }
.usermenu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
}
.usermenu-button:hover, .usermenu-button[aria-expanded="true"] { background: #f3f4f6; border-color: var(--line); }
.usermenu-name { font-weight: 600; font-size: 0.925rem; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-caret { font-size: 0.7rem; color: var(--subtle); transition: transform 0.15s ease; }
.usermenu-button[aria-expanded="true"] .usermenu-caret { transform: rotate(180deg); }
.usermenu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}
.usermenu-header { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.usermenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}
.usermenu-item i { width: 1.2em; text-align: center; color: var(--subtle); }
.usermenu-item:hover, .usermenu-item:focus { background: var(--soft); color: var(--brand-dark); }
.usermenu-item:hover i, .usermenu-item:focus i { color: var(--brand); }

.avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-xl { width: 128px; height: 128px; font-size: 2.6rem; border: 4px solid var(--card); box-shadow: 0 2px 8px rgba(17, 24, 39, 0.12); }
.avatar-initials { letter-spacing: 0.02em; }

.app-body {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.app-nav { position: sticky; top: 84px; }
.app-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.app-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.app-nav-link i { width: 1.25em; text-align: center; color: var(--subtle); }
.app-nav-link:hover { background: #fff; color: var(--ink); }
.app-nav-link.is-active { background: var(--soft); color: var(--brand-dark); }
.app-nav-link.is-active i { color: var(--brand); }

.tag {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--subtle);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.app-main { min-width: 0; outline: none; }
.app-main > .alert, .app-main [data-alert] .alert { margin-bottom: 16px; }

.app-footer {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 18px 16px 28px;
    font-size: 0.85rem;
    color: var(--subtle);
}
.app-footer a { color: var(--subtle); text-decoration: none; }
.app-footer a:hover { color: var(--brand); }

@media (max-width: 959px) {
    .topbar-toggle { display: inline-grid; place-items: center; }
    .app-body { grid-template-columns: 1fr; padding-top: 16px; }
    .app-nav {
        display: none;
        position: fixed;
        top: 61px;
        left: 0;
        right: 0;
        z-index: 30;
        max-height: calc(100vh - 61px);
        overflow-y: auto;
        padding: 10px 16px 16px;
        background: var(--card);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
    }
    body.nav-open .app-nav { display: block; }
}

@media (max-width: 480px) {
    .usermenu-name, .usermenu-caret { display: none; }
    .topbar-name { font-size: 1.05rem; }
}

/* ---- Panels, page headings, tabs ---- */

.page-head { margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.page-head h1 i { color: var(--brand); font-size: 1.2rem; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    padding: 22px 24px;
    margin: 0 0 16px;
}
.panel h2, .panel-title { margin: 0 0 12px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.panel h2 i, .panel-title i { color: var(--brand); font-size: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.panel-head h2 { margin: 0; }
.muted { color: var(--subtle); font-size: 0.925rem; margin: 0 0 12px; }
.muted:last-child { margin-bottom: 0; }

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: none;
    color: var(--subtle);
    cursor: pointer;
    font-size: 0.95rem;
}
.icon-button:hover { background: #f3f4f6; color: var(--ink); }

.btn-inline { width: auto; }
.btn-sm { padding: 6px 12px; font-size: 0.875rem; border-radius: 8px; gap: 6px; }
.link-strong { color: var(--brand); font-weight: 600; text-decoration: none; font-size: inherit; }
.link-strong:hover { text-decoration: underline; color: var(--brand-dark); }

.tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: thin;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 0 -1px;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
    white-space: nowrap;
}
.tab i { font-size: 0.85em; }
.tab:hover { color: var(--ink); }
/* Many tabs: wrap to a second row instead of scrolling out of sight. */
.tabs-wrap { flex-wrap: wrap; overflow: visible; }
.tab.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* ---- Dashboard ---- */

.profile-header { padding: 0; overflow: hidden; }
.profile-banner { height: 96px; background: linear-gradient(120deg, #0052cc 0%, #0066ff 45%, #38bdf8 100%); }
.profile-header-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 20px;
    align-items: end;
    padding: 0 24px 22px;
}
.profile-avatar { margin-top: -56px; }
.profile-id { min-width: 0; padding-top: 12px; }
.profile-id h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.profile-headline { margin: 4px 0 0; color: var(--muted); font-size: 1rem; overflow-wrap: anywhere; }
.profile-location { margin: 4px 0 0; color: var(--subtle); font-size: 0.9rem; }
.profile-location i { margin-right: 4px; }
.profile-actions { padding-bottom: 2px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.about-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.section-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.section-cards .panel { margin: 0; }
.section-card h2 { font-size: 1rem; }
.section-count { margin: 0; font-size: 0.925rem; }
.section-count a { color: var(--brand); font-weight: 600; text-decoration: none; }

.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0066ff, #16a34a); border-radius: 999px; transition: width 0.4s ease; }
.meter-label { margin: 8px 0 12px; font-size: 0.9rem; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.925rem; }
.checklist li { display: flex; gap: 10px; align-items: baseline; }
.checklist li i { color: #d1d5db; }
.checklist li.is-done { color: var(--subtle); text-decoration: line-through; }
.checklist li.is-done i { color: #16a34a; }
.checklist a { color: var(--brand); font-weight: 600; text-decoration: none; }
.checklist a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side { order: -1; }
}
@media (max-width: 640px) {
    .section-cards { grid-template-columns: 1fr; }
    .profile-header-body { grid-template-columns: 1fr; padding: 0 18px 18px; }
    .avatar-xl { width: 104px; height: 104px; font-size: 2.1rem; }
    .profile-avatar { margin-top: -52px; }
    .panel { padding: 18px; }
}

/* ---- Dialog ---- */

.dialog {
    width: min(620px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgba(17, 24, 39, 0.25);
    color: var(--ink);
}
.dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
.dialog .form { gap: 0; margin: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.15rem; }
.dialog-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 190px); }
.dialog-fields { display: flex; flex-direction: column; gap: 16px; }
.more-options summary { cursor: pointer; font-weight: 600; font-size: 0.925rem; color: var(--brand); }
.more-options[open] summary { margin-bottom: 12px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbfc; }

.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fieldset legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; padding: 0; }

.field select, .field textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18); }
.field select:disabled { background: #f3f4f6; color: var(--subtle); }
.field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #dc2626; }
.counter { text-align: right; }

/* Place fields (partials/place-fields.php): the wrapper lays out like its parent. */
.geo-place:not(.field-row) { display: contents; }

/* ---- Account settings ---- */

.setting-value { margin: 0 0 6px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); }
.setting-row strong i { color: var(--brand); margin-right: 4px; }
.setting-row .muted { margin: 2px 0 0; }
.setting-row .tag { margin-left: 0; }

.form-narrow { max-width: 460px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.panel .form { margin-top: 8px; }
.panel .form .btn-inline { align-self: flex-start; }

.disclosure { margin-top: 12px; }
.disclosure summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.925rem;
    list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:hover { text-decoration: underline; }
.disclosure summary:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; border-radius: 4px; }
.disclosure-body { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; max-width: 520px; }
.disclosure-body .form { margin-top: 0; }

.choice-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-inline legend { grid-column: 1 / -1; }
.choice-inline .choice-option + .choice-option { margin-top: 0; }
.choice { max-width: 460px; }

.code-input-sm { max-width: 220px; font-size: 1.35rem !important; }

.photo-editor { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 4px 0 12px; }
.photo-controls { flex: 1; min-width: 240px; }
.photo-controls input[type="file"] { padding: 9px; background: #fafbfc; }

.empty-state { text-align: center; padding: 40px 24px; }
.empty-state h2 { justify-content: center; font-size: 1.25rem; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 10px; }
.empty-state .btn { margin-top: 10px; }
.empty-icon {
    width: 64px; height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--brand);
    font-size: 1.5rem;
}

@media (max-width: 480px) {
    .choice-inline { grid-template-columns: 1fr; }
    .setting-row { flex-direction: column; align-items: flex-start; }
}

/* ---- Profile sections (career, education, skills, certifications, references, referrals) ---- */

.page-head-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-intro { margin: -6px 0 16px; color: var(--muted); max-width: 720px; }
.optional { font-weight: 400; color: var(--subtle); font-size: 0.85rem; }
.label-sub { font-weight: 500 !important; font-size: 0.85rem !important; color: var(--subtle); }
.fieldset-inline { gap: 0; }
.fieldset-inline.is-disabled { opacity: 0.55; }
.field input:disabled { background: #f3f4f6; color: var(--subtle); }

.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.925rem; cursor: pointer; align-self: flex-start; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.check input:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-outline { background: #fff; color: #b91c1c; border-color: #fecaca; }
.btn-danger-outline:hover { border-color: #dc2626; }
.dialog-foot-start { margin-right: auto; }
.dialog-sm { width: min(440px, calc(100vw - 24px)); }
.dialog-sm .dialog-body p { margin: 0; color: var(--muted); }

.badge-info { background: var(--soft); color: #1e40af; }
.badge-warn { background: #fffbeb; color: #b45309; }

/* Combobox (typeahead) */
.combobox { position: relative; }
.combobox input { padding-left: 38px; }
.combobox-icon { position: absolute; left: 14px; top: 15px; color: var(--subtle); font-size: 0.9rem; pointer-events: none; }
.combobox-list {
    position: absolute;
    z-index: 20;
    left: 0; right: 0; top: calc(100% + 4px);
    margin: 0; padding: 6px;
    list-style: none;
    max-height: 264px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.16);
}
.combobox-option { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combobox-option.is-active, .combobox-option:hover { background: var(--soft); }
.combobox-option.is-active { box-shadow: inset 0 0 0 2px var(--brand); }
.combobox-name { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.combobox-detail { font-size: 0.82rem; color: var(--subtle); }
.combobox-create { flex-direction: row; align-items: center; gap: 8px; color: var(--brand-dark); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.combobox-create i { color: var(--brand); }

/* Entry lists */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry:first-child { padding-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry-logo { width: 48px; height: 48px; border-radius: 10px; background: var(--soft); color: var(--brand); display: grid; place-items: center; font-size: 1.2rem; }
.entry-title { margin: 0 0 2px; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; }
.entry-title .badge { vertical-align: 2px; }
.entry-sub { margin: 0; font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.entry-desc { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 0.95rem; }
.entry-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #fafbfc; border: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.entry-note i { color: var(--brand); }
.entry-actions { display: flex; gap: 4px; align-items: flex-start; }
.entry-actions-row { grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; }

/* References */
.reference { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.reference-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reference-text { margin: 10px 0 0; padding: 0 0 0 14px; border-left: 3px solid var(--brand); white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-name { overflow-wrap: anywhere; }
.person-headline { font-size: 0.875rem; color: var(--subtle); overflow-wrap: anywhere; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; flex: none; }
.avatar-muted { background: #f3f4f6; color: var(--subtle); }
[data-write-person] { display: flex; flex-direction: column; gap: 8px; }
[data-write-person]:empty { display: none; }

/* Skills */
.skills-form { flex-direction: row; align-items: flex-start; gap: 12px; }
.skills-form .field { flex: 1; }
/* On the input line: label (0.925rem x 1.5) plus the field gap, whatever the hint below says. */
.skills-form .btn { margin-top: calc(0.925rem * 1.5 + 6px); }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px 2px 2px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 0.9rem;
}
.chip.is-dragging { opacity: 0.5; }
.chip-name { padding: 0 4px; overflow-wrap: anywhere; }
.chip-handle { border: 0; background: none; color: var(--subtle); cursor: grab; width: 28px; height: 30px; border-radius: 50%; }
.chip-handle:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 1px; }
.chip .icon-button { width: 28px; height: 28px; font-size: 0.85rem; }

/* Skills on positions (Career cards, the position dialog, the dashboard) and where a skill is used */
.entry-skills { margin-top: 10px; gap: 6px; }
.entry-skills .tag, .card-tags .tag { margin-left: 0; padding: 2px 10px; background: var(--soft); color: var(--brand-dark); white-space: normal; overflow-wrap: anywhere; }
.entry-skills .tag { font-size: 0.8rem; }
.position-skills { margin: -6px 0 4px; }
.chip-used { padding: 0 8px 0 2px; font-size: 0.8rem; font-weight: 500; color: var(--subtle); text-decoration: none; overflow-wrap: anywhere; }
.chip-used:hover { color: var(--brand-dark); text-decoration: underline; }
.chip-used i { margin-right: 3px; }
.dialog-check { margin-top: 12px; font-weight: 500; }

/* Dashboard card summaries */
.card-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card-items li { display: flex; flex-direction: column; min-width: 0; }
.card-items strong { font-size: 0.95rem; overflow-wrap: anywhere; }
.card-items span { font-size: 0.85rem; color: var(--subtle); overflow-wrap: anywhere; }
.card-chips { margin: 0 0 10px; }
.card-chips .chip { padding: 4px 10px; font-size: 0.85rem; }
.card-items .card-tags { flex-direction: row; gap: 4px; margin-top: 4px; }
.card-items .card-tags li { display: inline-flex; }
.card-items .tag-more { background: #f3f4f6; color: var(--subtle); }

/* Company logos (Career cards, the dashboard Career card, company typeahead options) */
.company-logo { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.company-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.company-logo-none { background: var(--soft); border-color: transparent; color: var(--brand); }
.entry-logo.company-logo { width: 48px; height: 48px; border-radius: 10px; }
.entry-logo.company-logo:not(.company-logo-none) { background: #fff; border: 1px solid var(--line); }
.combobox-company { flex-direction: row; align-items: center; gap: 10px; }
.combobox-logo { width: 32px; height: 32px; border-radius: 6px; font-size: 0.85rem; }
.combobox-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card-items li.card-item-logo { flex-direction: row; align-items: flex-start; gap: 10px; }
.card-item-body { display: flex; flex-direction: column; min-width: 0; }
.card-items .card-logo { width: 36px; height: 36px; font-size: 0.9rem; }
.card-items .company-logo-none { color: var(--brand); }

@media (max-width: 640px) {
    .entry { grid-template-columns: 40px minmax(0, 1fr); }
    .entry-logo, .entry-logo.company-logo { width: 40px; height: 40px; }
    .entry-actions { grid-column: 1 / -1; }
    .skills-form { flex-direction: column; align-items: stretch; }
    .skills-form .btn { margin-top: 0; }
    .dialog-foot { flex-wrap: wrap; }
}

/* Public writer link (/reference/{token}) */
.card-reference { max-width: 640px; text-align: left; }
.card-reference .card-icon { margin-left: 0; }
.card-reference .lead { margin-bottom: 20px; }
.reference-requester { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.reference-context { display: grid; gap: 6px; margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #fafbfc; border: 1px solid var(--line); }
.reference-context div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.reference-context dt { color: var(--subtle); font-size: 0.875rem; }
.reference-context dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.reference-message { margin: 0 0 16px; }
.reference-decline { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); gap: 8px; }
.pre-line { white-space: pre-line; }

/* Writer badges and the member picker */
.badge-member { background: var(--soft); color: #1e40af; }
.badge-email { background: #f3f4f6; color: var(--muted); }
.person-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.choice-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.choice-list legend { font-weight: 600; font-size: 0.925rem; padding: 0; margin-bottom: 8px; }
.choice-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.choice-list input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.choice-list label:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.combobox-person { flex-direction: row; align-items: center; gap: 10px; }
.combobox-person .avatar { width: 36px; height: 36px; font-size: 0.8rem; }
.combobox-person-text { display: flex; flex-direction: column; min-width: 0; }
.picked-member { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 560px) {
    .reference-context div { grid-template-columns: 1fr; gap: 0; }
}

/* ---- Authenticator app (account phone tab, sign-in code step) ---- */

.totp-steps { margin: 4px 0 16px; padding-left: 1.3em; color: var(--muted); font-size: 0.925rem; }
.totp-steps li + li { margin-top: 4px; }
.totp-setup { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin: 0 0 16px; }
.totp-qr { width: 200px; height: 200px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.totp-manual { flex: 1; min-width: 220px; }
.totp-manual .hint + .hint { margin-top: 6px; }
.totp-key { margin: 8px 0 10px; }
.totp-key code {
    display: inline-block;
    padding: 8px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    letter-spacing: 0.06em;
    word-spacing: 0.3em;
    background: var(--soft);
    border-radius: 8px;
    overflow-wrap: anywhere;
    user-select: all;
}
.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    max-width: 360px;
    margin: 0 0 16px;
    padding: 14px 18px;
    list-style: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}
[data-totp-badge]:focus { outline: none; }

.backup-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.3rem !important; letter-spacing: 0.12em; text-align: center; }
.alt-methods { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.alt-methods-title { margin: 0 0 8px; font-size: 0.875rem; font-weight: 600; color: var(--subtle); }
.alt-methods-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.alt-methods-list .link-button i { width: 1.2em; margin-right: 4px; color: var(--brand); }

/* Pickers: choose-from-the-list comboboxes (templates/partials/picker-control.php, HRW.picker). */
.combobox-picker .combobox-icon { top: 50%; transform: translateY(-50%); }
.field .combobox-picker input { padding-right: 40px; text-overflow: ellipsis; }
.combobox-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--subtle); font-size: 0.8rem; cursor: pointer;
}
.combobox-toggle:hover { background: var(--soft); color: var(--ink); }
.combobox-toggle:disabled { cursor: default; background: transparent; color: #cbd5e1; }
.combobox-toggle i { transition: transform 0.15s ease; }
.combobox-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.combobox-more, .combobox-empty { padding: 8px 10px; font-size: 0.82rem; color: var(--subtle); }
.combobox-more { border-top: 1px solid var(--line); margin-top: 4px; }

/* ---- Active sessions (Account > Sign-in & password) ---- */

.session-list { list-style: none; margin: 12px 0 0; padding: 0; }
.session-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.session-item:first-child { border-top: 0; }
@media (max-width: 560px) {
    .session-item { flex-wrap: wrap; }
    .session-item > .form-actions { flex-basis: 100%; padding-left: 52px; }
}
.session-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--soft); color: var(--brand); }
.session-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.session-text strong { overflow-wrap: anywhere; }
.session-text .badge { align-self: flex-start; }
.session-sub { font-size: 0.85rem; color: var(--subtle); }
[data-panel="sessions"] .form-actions { margin-top: 12px; }

/* Invitations (/portal/invite, /portal/invitations) */
.invite-summary { text-align: left; }
.invite-summary .actions { margin-top: 20px; }
.invite-company { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.invite-gets { margin: 0 0 12px; }
.invite-gets p { margin: 0 0 6px; }
.invite-gets ul { margin: 0; padding: 0; list-style: none; }
.invite-gets li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.invite-gets li i { color: var(--brand); }
.invite-next { font-size: 1.05rem; margin: 24px 0 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.invite-steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.invite-steps strong { color: var(--ink); }
.invite-company h1, .invite-company h2 { margin: 0; overflow-wrap: anywhere; }
.invite-company p { margin: 2px 0 0; }
.actions-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.center { text-align: center; }

/* Lists of rows (companies, people, addresses, documents): shared by the portal, HR Admin, and SaaS Admin. */
.company-list, .people-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.company-list li + li, .people-list li + li, .plain-list li + li { border-top: 1px solid var(--line); }
.company-list a, .company-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: inherit; text-decoration: none; }
.company-list a:hover .cell-main, .company-list a:focus-visible .cell-main { color: var(--brand); text-decoration: underline; }
.company-list .cell-main, .people-list .cell-main, .company-row .cell-main { display: block; font-weight: 600; overflow-wrap: anywhere; }
.company-list .cell-sub, .people-list .cell-sub, .company-row .cell-sub { display: block; font-size: 0.85rem; color: var(--subtle); overflow-wrap: anywhere; }
.company-row-text { flex: 1; min-width: 0; }
.people-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.people-list li > .name-with-logo { flex: 1; min-width: 0; }
.plain-list li { padding: 8px 4px; }
.company-list li.has-action { display: flex; align-items: center; gap: 8px; }
.company-list li.has-action > a { flex: 1; min-width: 0; }
@media (max-width: 560px) {
    .people-list li, .company-row { flex-wrap: wrap; }
    .people-list li > .name-with-logo, .company-row > .company-row-text { flex-basis: calc(100% - 60px); }
    .people-list .cell-sub, .company-row .cell-sub { overflow-wrap: break-word; word-break: normal; }
}
/* ---- Notification bell (every signed-in top bar) and /portal/notifications ---- */

.bell { position: relative; margin-left: auto; }
.bell + .usermenu { margin-left: 4px; }
.bell-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
}
.bell-button:hover, .bell-button[aria-expanded="true"] { background: #f3f4f6; border-color: var(--line); color: var(--ink); }
.bell-button:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.bell-count {
    position: absolute;
    top: 2px; right: 0;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--card);
}
.bell-panel {
    position: absolute;
    right: -48px;
    top: calc(100% + 8px);
    z-index: 50;
    width: min(380px, calc(100vw - 24px));
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line); }
.bell-head h2 { margin: 0; font-size: 1rem; }
.bell-head .link-button { font-size: 0.875rem; }
.bell-status { margin: 0; padding: 18px 12px; color: var(--subtle); font-size: 0.925rem; text-align: center; }
.bell-status i { margin-right: 4px; }
.bell-list { list-style: none; margin: 0; padding: 4px 0; max-height: min(420px, 60vh); overflow-y: auto; }
.bell-list:empty { display: none; }
.note-link {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
}
.note-link:hover, .note-link:focus-visible { background: var(--soft); outline: none; }
.note-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.is-unread .note-dot { background: var(--brand); }
.note-title { font-weight: 600; font-size: 0.925rem; line-height: 1.35; overflow-wrap: anywhere; }
.is-read .note-title { font-weight: 500; color: var(--muted); }
.note-body { grid-column: 2; font-size: 0.85rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.note-time { grid-column: 2; font-size: 0.78rem; color: var(--subtle); }
.bell-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--brand); font-weight: 600; font-size: 0.9rem; text-decoration: none; border-radius: 0 0 8px 8px; }
.bell-all:hover { background: var(--soft); }
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-list > li + li { border-top: 1px solid var(--line); }
.notification-row { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.notification-row .note-link { flex: 1 1 auto; min-width: 0; }
.notification-row .btn { margin-top: 6px; flex: 0 0 auto; }
.notifications-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
@media (max-width: 480px) {
    .bell-panel { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
}
.notes-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 6px; }
.notes-summary { margin: 0; font-size: 0.9rem; color: var(--muted); min-height: 1em; }
.notes-per-page { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.notes-per-page select { padding: 5px 8px; font: inherit; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: var(--ink); }
.notes-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.notifications-head .btn { margin-left: auto; }
.tab-count { color: var(--subtle); font-weight: 600; }

/* ---- Portal, Documents (C1) ---- */
.doc-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-storage { padding-top: 16px; padding-bottom: 14px; }
.doc-storage-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 8px; }
.panel .doc-storage-title { margin: 0; font-size: 0.95rem; }
.doc-storage-used { margin: 0; font-size: 0.9rem; color: var(--muted); }
.doc-storage-used strong { color: var(--ink); }
.doc-storage-note { margin-top: 8px; }
.meter.is-full .meter-fill { background: linear-gradient(90deg, #f59e0b, #dc2626); }
.doc-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.doc-trail ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.doc-trail li + li::before { content: "/"; margin: 0 6px 0 2px; color: #9ca3af; }
.doc-trail a { color: var(--brand); font-weight: 600; text-decoration: none; }
.doc-trail a:hover { text-decoration: underline; }
.doc-trail [aria-current] { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.doc-trail-page { margin: 0 0 10px; }
.doc-search { position: relative; flex: 0 1 280px; min-width: 200px; }
.doc-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); font-size: 0.85rem; pointer-events: none; }
.doc-search input { width: 100%; padding: 8px 12px 8px 34px; font: inherit; font-size: 0.925rem; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--ink); }
.doc-search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.doc-more { display: flex; justify-content: center; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.entry-link { color: var(--ink); text-decoration: none; }
.entry-link:hover, .entry-link:focus-visible { color: var(--brand); text-decoration: underline; }
.doc-folder .entry-logo { color: #b45309; background: #fffbeb; }
.upload-meter { margin: 10px 0 2px; }
.upload-check { margin-top: 4px; }
.upload-check i { color: var(--brand); }
.upload-row.is-blocked .entry-logo { color: #b91c1c; background: #fef2f2; }
.upload-row.is-paused .entry-logo { color: var(--subtle); background: #f3f4f6; }
/* A company claim's uploads sit between its documents and the upload form. */
.claim-uploads { margin: 8px 0 18px; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.claim-uploads + .alert, .claim-uploads + .form { margin-top: 0; }
.doc-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.doc-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.doc-facts dt { color: var(--subtle); }
.doc-facts dd { margin: 0; }
.doc-version-n { font-weight: 700; font-size: 0.95rem; }
.doc-history { list-style: none; margin: 0; padding: 0; }
.doc-history-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.doc-history-item + .doc-history-item { border-top: 1px solid var(--line); }
.doc-history-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font-size: 0.85rem; }
.doc-history-what { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.doc-history-when { margin: 2px 0 0; font-size: 0.85rem; color: var(--subtle); }
@media (max-width: 640px) {
    .doc-head-actions { width: 100%; }
    .doc-head-actions .btn { flex: 1 1 auto; justify-content: center; }
    .doc-search { flex: 1 1 100%; }
}
.doc-section-hint { margin: -4px 0 14px; }
.doc-form-actions .btn-danger-outline { margin-left: auto; }
@media (max-width: 640px) {
    .entry.entry-icons { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .entry.entry-icons .entry-actions { grid-column: auto; }
}
/* Portal documents (C2): kept copies grouped by company */
.doc-group-head { display: flex; align-items: center; gap: 8px; padding: 12px 4px 6px; color: var(--muted); font-size: 0.9rem; list-style: none; }
.doc-group-head i { color: var(--brand); }
.doc-group-head strong { color: var(--ink); }
.entry-list > .doc-group-head + .entry { border-top: 0; }

/* E-signature (Documents C5): PDF pages, the signing page, Signatures, and the verify page */
@font-face { font-family: "Dancing Script"; src: url("vendor/fonts/dancing-script-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
.pdf-stage { container-type: inline-size; background: #e5e7eb; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.pdf-page { position: relative; width: 100%; max-width: 860px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.pdf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pdf-page-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #9ca3af; font-size: 1.3rem; }
.pdf-page.is-drawn .pdf-page-loading { display: none; }
.pdf-page.is-failed .pdf-page-loading::after { content: "This page could not be shown."; font-size: 0.85rem; margin-left: 6px; }
.pdf-layer { position: absolute; inset: 0; }
.sign-guide { position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; align-self: stretch; padding: 10px 12px 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12); font-size: 0.925rem; }
.sign-guide-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.sign-guide-count { font-weight: 700; color: var(--ink); white-space: nowrap; }
.sign-guide-label { color: var(--muted); }
.sign-guide .btn { flex: none; }
.fingerprint { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; overflow-wrap: anywhere; }
.mark-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; object-position: left center; }

.sign-head { align-items: flex-start; }
.sign-from { margin: 4px 0 0; color: var(--muted); }
.sign-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sign-panel { position: sticky; top: 76px; }
.sign-panel .panel { margin: 0 0 16px; }
.sf { position: absolute; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; font-weight: 700; font-size: clamp(0.6rem, 1.6cqi, 0.9rem); white-space: nowrap; overflow: hidden; padding: 0 4px; font-family: inherit; }
.sf-mine { border: 2px dashed #f59e0b; background: #fffbeb; color: #92400e; cursor: pointer; }
.sf-mine:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.sf-mine.is-done { border: 1px solid #bfdbfe; background: rgba(248, 251, 255, 0.92); color: #1e3a8a; }
.sf-mine.is-optional.is-todo { border-color: #cbd5e1; background: #f8fafc; color: var(--muted); }
.sf-mine.is-current { outline: 3px solid var(--brand); outline-offset: 2px; }
.sf-mine.is-next { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.45); }
.sf-other { border: 1px dashed #cbd5e1; color: #94a3b8; font-weight: 600; background: rgba(255, 255, 255, 0.6); }
.sf-mark { width: 100%; height: 100%; display: flex; align-items: center; justify-content: flex-start; overflow: hidden; padding: 2px 0; }
.sf-mark .mark-image { height: 100%; }
.sf-auto, .sf-value { font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; }
.sf-label { overflow: hidden; text-overflow: ellipsis; }
.check-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.925rem; }
.check-list li { display: flex; gap: 10px; align-items: baseline; }
.check-list li i { color: #cbd5e1; }
.check-list li.is-done i { color: #16a34a; }
.check-list li.field-todo { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 26px; }
.check-list li.field-todo i { color: var(--brand); }
.code-box { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.code-box .field { margin: 0; }
.code-links { margin: 0; }
.sign-statement { margin: 0 0 12px; font-size: 0.9rem; }
.sign-hint { margin: 8px 0 0; }
.about-line { margin: 0 0 8px; font-size: 0.925rem; }
.about-note { margin: 10px 0 0; }
.sign-state { display: flex; gap: 18px; align-items: flex-start; padding: 28px; }
.sign-state-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--soft); color: var(--brand); }
.sign-state.is-success .sign-state-icon { background: #ecfdf5; color: #047857; }
.sign-state.is-error .sign-state-icon { background: #fef2f2; color: #b91c1c; }
.sign-state.is-muted .sign-state-icon { background: #f3f4f6; color: var(--subtle); }
.sign-state h2 { margin: 0 0 6px; font-size: 1.2rem; }
.sign-state p { margin: 0 0 14px; color: var(--muted); max-width: 640px; }
.sign-state-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sign-message { margin: 0 0 16px; }
.consent-text { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; font-size: 0.925rem; }
.consent-text p { margin: 0 0 10px; }
.consent-text p:last-child { margin: 0; }
.consent-form { margin-top: 16px; gap: 14px; }
.consent-check { align-items: flex-start; font-weight: 600; line-height: 1.45; }
.consent-check input { flex: none; margin-top: 2px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.adopt-tabs { margin: 0; }
.adopt-tabs .tab { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font: inherit; }
.mark-preview { min-height: 72px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: "Dancing Script", "Brush Script MT", cursive; font-size: 2.2rem; line-height: 1.3; color: #0b1f4d; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mark-preview.is-initials { font-size: 2.4rem; }
.draw-box { border: 1px dashed #94a3b8; border-radius: 10px; background: #fff; touch-action: none; }
.draw-box canvas { display: block; width: 100%; height: 160px; touch-action: none; }
.draw-box.is-initials canvas { height: 120px; }
.dialog-text { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
    .sign-layout { grid-template-columns: 1fr; }
    .sign-panel { position: static; }
    .pdf-stage { padding: 10px; border-radius: 10px; }
}
@media (max-width: 640px) {
    .sign-state { flex-direction: column; padding: 22px 18px; gap: 12px; }
    .sf { font-size: 0.6rem; gap: 3px; }
    .sf i { display: none; }
}
.sig-entry .entry-logo { font-size: 1.1rem; }
/* Account: the Signature and Initials blocks (design 26) */
.mark-intro { margin: 0 0 16px; }
.mark-return { margin: 0 0 16px; scroll-margin-top: 84px; }
.mark-block { scroll-margin-top: 84px; }
.mark-return-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; flex: 1; min-width: 0; }
.mark-return-body p { margin: 0; }
.mark-current { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.mark-card-image { height: 84px; display: flex; align-items: center; padding: 6px 12px; border-bottom: 1px solid #cbd5e1; background: #fafbfc; border-radius: 6px 6px 0 0; }
.mark-card-image .mark-image { height: 100%; }
.mark-card-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 0.875rem; }
.mark-card-facts dt { color: var(--subtle); }
.mark-card-facts dd { margin: 0; overflow-wrap: anywhere; }
.mark-editor { max-width: 560px; gap: 12px; }
.mark-editor-none { margin: 0; }
.mark-editor .draw-hint { margin: 6px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.mark-editor .draw-hint .link-button { text-decoration: none; }
/* The signing page: no saved mark yet, and Clear on an applied spot */
.sign-setup { margin: 0 0 16px; }
.sign-setup-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sign-setup-body p { margin: 0; }
.sign-setup .btn-primary, .sign-setup .btn-primary:hover { color: #fff; text-decoration: none; }
.sf-clear { position: absolute; z-index: 2; width: 24px; height: 24px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%; border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 0.75rem; cursor: pointer; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2); padding: 0; }
.sf-clear:hover { color: #b91c1c; border-color: #fca5a5; }
.sf-clear:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.badge-warning { background: #fffbeb; color: #b45309; }
.verify { text-align: center; }
.verify .lead { margin-bottom: 20px; }
.verify-form { margin: 0 0 16px; }
.verify-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; cursor: pointer; }
.verify-drop i { font-size: 1.8rem; color: var(--brand); }
.verify-drop:hover, .verify-drop.is-over { border-color: var(--brand); background: var(--soft); }
.verify-drop.is-busy { opacity: 0.6; pointer-events: none; }
.verify-drop-text { font-weight: 700; overflow-wrap: anywhere; text-align: center; }
.verify-form input:focus-visible + .verify-drop, .verify-drop:focus-within { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.verify-result { text-align: left; margin: 0 0 16px; }
.verify-verdict { display: block; margin: 0 0 4px; }
.verify-message { margin: 0; }
.verify-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 14px 0 0; font-size: 0.9rem; }
.verify-facts dt { color: var(--subtle); }
.verify-facts dd { margin: 0; overflow-wrap: anywhere; }
.verify-note { margin-top: 8px; }

/* ---- Public profiles: hr.world/p/{name} and /portal/public-profile ---- */

.public-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.public-main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 24px 16px 40px; outline: none; }
.public-profile .profile-header-body { grid-template-columns: auto minmax(0, 1fr); }
.public-profile .entry { grid-template-columns: 48px minmax(0, 1fr); }
.public-profile .entry-title { font-size: 1rem; font-weight: 700; }
.public-profile .public-skills .chip { padding: 4px 12px; font-size: 0.9rem; }
.public-url { margin: 6px 0 0; font-size: 0.875rem; color: var(--subtle); overflow-wrap: anywhere; }
.public-url i { margin-right: 4px; }
.entry-meta { color: var(--subtle); font-size: 0.85rem; }
.public-note { margin: 8px 0 0; text-align: center; color: var(--subtle); font-size: 0.85rem; }
.public-note i { margin-right: 4px; }
.public-missing { max-width: 560px; margin: 32px auto; }
.public-missing h1 { margin: 0 0 8px; font-size: 1.4rem; }
.public-missing-actions { justify-content: center; margin-top: 8px; }
.public-missing-actions .btn { margin-top: 0; }

.public-link { margin: 0 0 12px; font-weight: 600; overflow-wrap: anywhere; }
.public-link a { color: var(--brand); text-decoration: none; }
.public-link a:hover { text-decoration: underline; }
.switch-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.url-preview { overflow-wrap: anywhere; }
.url-preview strong { color: var(--ink); }
.old-names { margin-top: 14px; overflow-wrap: anywhere; }
.toggle-list { list-style: none; margin: 0; padding: 0; }
.toggle-list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 0; flex-wrap: wrap; }
.toggle-list > li + li { border-top: 1px solid var(--line); }
.toggle-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.toggle-title i { color: var(--brand); width: 1.25em; text-align: center; }
.toggle-title .hint { font-weight: 400; }
.toggle-list.is-off { opacity: 0.6; }
.public-card .public-link { margin-bottom: 10px; font-size: 0.925rem; }
.public-card .form-actions { gap: 8px; }

@media (max-width: 640px) {
    .profile-header { padding: 0; }
    .public-profile .profile-header-body { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .public-actions .btn { padding: 6px 10px; }
    .public-missing { margin-top: 8px; }
}
.public-card-hint { margin-top: 12px; }
.field input[readonly] { background: #f3f4f6; color: var(--muted); cursor: default; }
.field input[readonly]:focus { border-color: #d1d5db; box-shadow: none; }

/* ---- Profile banners (dashboard, public profile, banner dialog) ---- */

.profile-banner-wide { height: auto; aspect-ratio: 4 / 1; position: relative; overflow: hidden; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-preset-ocean { background: linear-gradient(120deg, #0e7490 0%, #0891b2 45%, #5eead4 100%); }
.banner-preset-sunrise { background: linear-gradient(120deg, #c2410c 0%, #f97316 40%, #fbbf24 100%); }
.banner-preset-forest { background: linear-gradient(120deg, #14532d 0%, #15803d 50%, #65a30d 100%); }
.banner-preset-slate { background: linear-gradient(120deg, #0f172a 0%, #334155 55%, #64748b 100%); }
.banner-preset-aurora { background: radial-gradient(circle at 15% 120%, #22d3ee 0%, transparent 45%), radial-gradient(circle at 85% -20%, #a78bfa 0%, transparent 50%), linear-gradient(120deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%); }
.banner-preset-blueprint {
    background-color: #0b3d91;
    background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
}
.banner-edit {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.94); border-color: var(--line); color: var(--ink);
    box-shadow: 0 1px 4px rgba(17, 24, 39, 0.18);
}
.banner-edit:hover { background: #fff; color: var(--brand); }
.profile-header { position: relative; }

.banner-dialog { width: min(760px, calc(100vw - 24px)); }
.banner-panel { display: flex; flex-direction: column; gap: 14px; }
.banner-panel[hidden] { display: none; }
.banner-panel .hint { margin: 0; }
.banner-label { margin: 0 0 6px; font-weight: 600; font-size: 0.875rem; color: var(--muted); }
.banner-stage { border-radius: 10px; background: linear-gradient(120deg, #0052cc 0%, #0066ff 45%, #38bdf8 100%); cursor: grab; touch-action: none; user-select: none; }
.banner-stage.is-dragging { cursor: grabbing; }
.banner-stage:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.banner-stage img { position: absolute; max-width: none; width: auto; height: auto; object-fit: fill; pointer-events: none; }
.banner-stage-empty { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; text-align: center; color: #fff; font-weight: 600; font-size: 0.925rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.banner-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 8px; }
.banner-zoom { display: inline-flex; align-items: center; gap: 10px; color: var(--subtle); }
.banner-zoom input { width: 200px; accent-color: var(--brand); }
.banner-phone { position: relative; width: 240px; padding-bottom: 30px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.banner-phone .profile-banner { background: linear-gradient(120deg, #0052cc 0%, #0066ff 45%, #38bdf8 100%); }
.banner-phone-avatar { position: absolute; left: 12px; top: calc(240px / 4 - 28px); width: 56px; height: 56px; font-size: 1.1rem; border: 3px solid var(--card); }
.banner-upload input[type="file"] { padding: 9px; background: #fafbfc; }
.banner-presets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.banner-swatch { width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.banner-swatch .profile-banner { border-radius: 8px; }
.banner-swatch span { display: block; padding: 6px 2px 0; font-size: 0.875rem; font-weight: 600; }
.banner-swatch[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18); }
.banner-swatch:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
.banner-default { background: linear-gradient(120deg, #0052cc 0%, #0066ff 45%, #38bdf8 100%); }
.banner-reset { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.banner-reset[hidden] { display: none; }
.banner-panel-preview { border-radius: 10px; margin-bottom: 12px; }

@media (max-width: 640px) {
    .banner-edit { top: 8px; right: 8px; width: 34px; height: 34px; }
    .banner-zoom input { width: 150px; }
}
/* The banner is positioned (it holds the image), so lift the photo above it. */
.profile-avatar { position: relative; z-index: 1; }

/* ---- Per-entry public visibility (P1c) ---- */

.public-entry-check { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.entry-hidden { margin: 0 0 2px; font-size: 0.825rem; color: var(--subtle); }
.entry-hidden i { margin-right: 2px; }
.chip.chip-private { background: #fff; border-style: dashed; color: var(--muted); }
.chip-hidden { display: inline-flex; padding: 0 4px; color: var(--subtle); font-size: 0.8rem; }
.skills-form .check { margin-top: calc(0.925rem * 1.5 + 6px + 12px); white-space: nowrap; font-weight: 500; }
@media (max-width: 640px) { .skills-form .check { margin-top: 0; } }
.toggle-list > li.section-toggle { display: block; padding: 12px 0; }
.section-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.section-toggle-controls { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.entries-panel { margin: 12px 0 0 34px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.entries-tools { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; font-size: 0.9rem; }
.entries-tools .link-button[disabled] { color: var(--subtle); cursor: default; text-decoration: none; }
.saved-note { margin-left: auto; color: #047857; font-size: 0.85rem; font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.saved-note.is-on { opacity: 1; }
.entry-toggles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entry-toggle { align-items: flex-start; font-weight: 400; }
.entry-toggle input { margin-top: 3px; }
.entry-toggle-text { display: flex; flex-direction: column; min-width: 0; }
.entry-toggle-text strong { font-weight: 600; overflow-wrap: anywhere; }
.entry-toggle-text span { font-size: 0.85rem; color: var(--subtle); overflow-wrap: anywhere; }
.entry-chips { margin: 0; gap: 6px; }
.chip-toggle { padding: 4px 10px; gap: 6px; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.85rem; }
.chip-toggle i { font-size: 0.8rem; }
.chip-toggle:focus-visible { outline: 3px solid rgba(0, 102, 255, 0.45); outline-offset: 2px; }
@media (max-width: 640px) {
    .entries-panel { margin-left: 0; }
}
