:root {
    color-scheme: light;
    --ink: #20242a;
    --muted: #6f7782;
    --line: #dde3ea;
    --soft: #f6f8fb;
    --search: #dff4ef;
    --meet: #f8e5d7;
    --accent: #3b766d;
    --accent-strong: #215b54;
    --shadow: 0 24px 70px rgba(42, 53, 68, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fbfcfd 0%, #f3f7f6 48%, #f8f3ee 100%);
    line-height: 1.5;
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 12% 18%, rgba(208, 237, 231, .55), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(249, 223, 205, .6), transparent 30%);
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    position: relative;
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 32px 24px 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 34px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 760;
    letter-spacing: .2px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--search), var(--meet));
    box-shadow: 0 10px 30px rgba(59, 118, 109, .15);
}

.brand-mark:before {
    content: "";
    width: 14px;
    height: 14px;
    border: 3px solid var(--accent);
    border-radius: 999px;
    box-shadow: 10px 8px 0 -3px #d8895f;
}

.profile-nav {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(221, 227, 234, .72);
    border-radius: 12px;
    background: rgba(255, 255, 255, .58);
}

.nav-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 3px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(223, 244, 239, .54);
    color: var(--accent-strong);
    text-decoration: none;
}

.nav-link.is-active {
    background: var(--accent-strong);
    color: #fff;
    box-shadow: 0 8px 20px rgba(33, 91, 84, .18);
}

.nav-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-profile-avatar {
    position: relative;
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(59, 118, 109, .24);
    border-radius: 50%;
    background: var(--search);
}

.nav-profile-avatar img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-profile-avatar svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.nav-link.is-active .nav-profile-avatar {
    border-color: rgba(255, 255, 255, .48);
    background: rgba(255, 255, 255, .16);
}

.nav-profile-auth {
    position: relative;
    display: inline-flex;
}

.nav-auth-popover {
    position: absolute;
    z-index: 5;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    grid-template-columns: auto auto minmax(0, auto);
    width: max-content;
    min-width: 0;
    max-width: min(360px, calc(100vw - 32px));
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(221, 227, 234, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 16px 42px rgba(42, 53, 68, .12);
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
    line-height: 1.2;
    opacity: 1;
    pointer-events: none;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease;
    animation: navAuthAutoHide .18s ease 5s forwards;
}

.nav-auth-popover > span,
.nav-auth-popover strong {
    white-space: nowrap;
}

.nav-auth-popover:before {
    content: "";
    position: absolute;
    top: -6px;
    right: 28px;
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(221, 227, 234, .9);
    border-left: 1px solid rgba(221, 227, 234, .9);
    background: rgba(255, 255, 255, .88);
    transform: rotate(45deg);
}

.nav-auth-popover strong {
    color: var(--accent-strong);
    font-size: 13px;
}

.nav-auth-popover small {
    overflow: hidden;
    min-width: 0;
    max-width: 170px;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-auth:hover .nav-auth-popover,
.nav-profile-auth:focus-within .nav-auth-popover {
    animation: none;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes navAuthAutoHide {
    to {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-4px);
    }
}

.nav-unread-badge {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.nav-link.is-active .nav-unread-badge {
    background: #fff;
    color: var(--accent-strong);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 28px;
    align-items: stretch;
}

.hero--single {
    grid-template-columns: minmax(0, 1fr);
}

.hero-copy {
    padding: 28px 0 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 11px;
    border: 1px solid rgba(59, 118, 109, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 680;
}

.eyebrow:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #78b7aa;
}

h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: .98;
    letter-spacing: 0;
    font-weight: 780;
}

h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

p {
    margin: 0;
}

.lead {
    max-width: 620px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.auth-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    width: fit-content;
    margin: 14px 0 4px;
    padding: 12px 14px;
    box-shadow: 0 14px 36px rgba(42, 53, 68, .08);
}

.auth-summary span,
.auth-summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.auth-summary strong {
    color: var(--accent-strong);
    font-size: 14px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 720;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(33, 91, 84, .18);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover,
button:hover {
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(33, 91, 84, .22);
}

.secondary {
    background: #fff !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
    box-shadow: none !important;
}

.ghost {
    background: transparent !important;
    color: var(--accent-strong) !important;
    border-color: rgba(59, 118, 109, .24) !important;
    box-shadow: none !important;
}

.panel,
.box {
    border: 1px solid rgba(221, 227, 234, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.status-card {
    padding: 24px;
}

.status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 720;
}

.status-pill:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b766d;
}

.profile-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.profile-list strong {
    color: var(--ink);
    font-weight: 680;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.scenario {
    min-height: 154px;
    padding: 18px;
    border: 1px solid rgba(221, 227, 234, .86);
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
}

.scenario:nth-child(1) {
    background: linear-gradient(180deg, var(--search), rgba(255, 255, 255, .78));
}

.scenario:nth-child(2) {
    background: linear-gradient(180deg, var(--meet), rgba(255, 255, 255, .78));
}

.scenario:nth-child(3) {
    background: linear-gradient(180deg, #e9e7fb, rgba(255, 255, 255, .78));
}

.scenario-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: #fff;
    color: var(--accent-strong);
    font-weight: 800;
}

.scenario p,
.muted {
    color: var(--muted);
}

.home-dashboard {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.home-dashboard-block {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(221, 227, 234, .86);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 30px rgba(42, 53, 68, .08);
}

.home-dashboard-block--useful {
    background: linear-gradient(180deg, rgba(223, 244, 239, .9), rgba(255, 255, 255, .82));
}

.home-dashboard-block__head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.home-dashboard-block__head h2 {
    font-size: 20px;
}

.home-dashboard-block__head span,
.home-dashboard-block__head a {
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.home-dashboard-list {
    display: grid;
    gap: 8px;
}

.home-dashboard-list--compact {
    gap: 7px;
}

.home-dashboard-item,
.home-dashboard-empty {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(221, 227, 234, .78);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
    color: inherit;
    text-decoration: none;
}

.home-dashboard-item:hover,
.home-dashboard-empty:hover {
    border-color: rgba(59, 118, 109, .28);
    text-decoration: none;
}

.home-dashboard-item strong {
    overflow-wrap: anywhere;
    color: #20272d;
    font-size: 15px;
    line-height: 1.28;
}

.home-dashboard-item span,
.home-dashboard-item small,
.home-dashboard-empty {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.home-dashboard-item small {
    display: block;
}

.auth-card {
    padding: 28px;
}

.auth-card .button {
    width: 100%;
    margin-top: 12px;
}

.auth-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.login-page {
    max-width: 560px;
    margin: 0 auto;
    padding-top: 32px;
}

.login-page .panel {
    padding: 28px;
}

.login-page h1 {
    font-size: clamp(34px, 8vw, 48px);
    line-height: 1.02;
}

code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    background: var(--soft);
    padding: 3px 7px;
    border-radius: 4px;
    color: #43505d;
}

.profile-page {
    width: min(1040px, 100%);
}

.profile-hero {
    max-width: 760px;
    margin-bottom: 28px;
}

.profile-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.notice {
    display: inline-flex;
    margin-top: 18px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--search);
    color: var(--accent-strong);
    font-weight: 720;
}

.notice[hidden] {
    display: none !important;
}

.notice--error {
    background: #fdebea;
    color: #9f2d26;
}

.save-inline-status {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    padding: 0 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 720;
}

.save-inline-status--error {
    color: #9f2d26;
}

.autosave-hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

button:disabled {
    opacity: .62;
    cursor: wait;
}

.questionnaire {
    display: grid;
    gap: 18px;
}

.profile-structured-form {
    margin-top: 18px;
}

.goals-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.goals-toolbar .save-inline-status {
    margin-right: auto;
}

.goals-list {
    display: grid;
    gap: 14px;
}

.empty-goals,
.goal-card {
    padding: 22px;
}

.empty-goals {
    display: grid;
    gap: 12px;
}

.goal-card {
    display: grid;
    gap: 16px;
}

.goal-card--highlighted {
    animation: goal-highlight 5s ease-out forwards;
}

@keyframes goal-highlight {
    0%,
    72% {
        border-color: rgba(46, 125, 112, .66);
        background: linear-gradient(180deg, rgba(223, 244, 239, .95), rgba(255, 255, 255, .96));
        box-shadow: 0 30px 80px rgba(46, 125, 112, .24);
    }

    100% {
        border-color: rgba(210, 220, 226, .9);
        background: rgba(255, 255, 255, .82);
        box-shadow: var(--shadow);
    }
}

.goal-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.goal-card__head h2 {
    margin: 0;
    font-size: 22px;
}

.goal-card__head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.goal-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.goal-metrics span {
    display: grid;
    gap: 3px;
    min-height: 72px;
    align-content: center;
    padding: 12px;
    border: 1px solid rgba(59, 118, 109, .14);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(223, 244, 239, .72), rgba(255, 255, 255, .86));
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.goal-metrics strong {
    color: var(--accent-strong);
    font-size: 24px;
    line-height: 1;
}

.goal-status {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.goal-status--done {
    background: #eef7ee;
    color: #2d6f3a;
}

.goal-status--paused,
.goal-status--cancelled,
.goal-status--expired {
    background: rgba(246, 248, 251, .9);
    color: var(--muted);
}

.goal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mail-thread-list,
.mail-message-list {
    display: grid;
    gap: 18px;
    max-width: 900px;
}

.mail-inbox-hero {
    margin-bottom: 42px;
}

.mail-thread-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    padding: 24px 26px;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mail-thread-card__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.mail-thread-card__link:hover {
    text-decoration: none;
}

.mail-thread-card:hover {
    border-color: rgba(59, 118, 109, .28);
    box-shadow: 0 28px 70px rgba(42, 53, 68, .15);
    text-decoration: none;
    transform: translateY(-2px);
}

.mail-thread-card--assistant {
    border-left: 4px solid var(--accent);
    background: linear-gradient(180deg, rgba(223, 244, 239, .54), rgba(255, 255, 255, .86));
}

.mail-thread-card__body {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.mail-thread-card__avatar {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--search), var(--meet));
    box-shadow: 0 8px 24px rgba(59, 118, 109, .16);
}

.mail-thread-card__avatar > span:before {
    content: "";
    display: block;
    width: 19px;
    height: 19px;
    margin: 0 auto 3px;
    border-radius: 50%;
    background: rgba(59, 118, 109, .45);
}

.mail-thread-card__avatar > span:after {
    content: "";
    display: block;
    width: 32px;
    height: 16px;
    border-radius: 20px 20px 8px 8px;
    background: rgba(59, 118, 109, .45);
}

.mail-thread-card__avatar img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mail-thread-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mail-thread-card__tags span {
    max-width: 100%;
    padding: 5px 8px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(59, 118, 109, .16);
    border-radius: 999px;
    background: rgba(223, 244, 239, .58);
    color: #58706c;
    font-size: 12px;
    font-weight: 800;
}

.mail-direction {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
}

.mail-direction--outgoing {
    background: var(--soft);
    color: var(--muted);
}

.mail-route {
    display: grid;
    grid-template-columns: 50px auto minmax(80px, max-content) auto 50px;
    gap: 9px;
    align-items: center;
    min-width: 0;
    width: fit-content;
    max-width: 100%;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.mail-route__item {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    gap: 7px;
}

.mail-route__item strong {
    overflow-wrap: anywhere;
}

.mail-route__item--goal {
    min-width: 0;
    color: var(--accent-strong);
}

.mail-route__item--goal strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-route__avatar {
    position: relative;
    display: inline-grid;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--search), var(--meet));
    box-shadow: 0 8px 18px rgba(59, 118, 109, .18);
}

.mail-route__avatar:before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    margin: 0 auto 4px;
    border-radius: 50%;
    background: rgba(59, 118, 109, .46);
}

.mail-route__avatar:after {
    content: "";
    display: block;
    width: 28px;
    height: 14px;
    border-radius: 14px 14px 6px 6px;
    background: rgba(59, 118, 109, .46);
}

.mail-route__avatar img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mail-route__icon {
    position: relative;
    display: inline-grid;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid rgba(59, 118, 109, .24);
    border-radius: 50%;
    background: rgba(223, 244, 239, .7);
}

.mail-route__icon:before {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.mail-route__icon--goal {
    border-radius: 6px;
    background: rgba(255, 245, 231, .9);
}

.mail-route__icon--goal:before {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: #d98c4a;
}

.mail-route__icon--to:before {
    background: var(--accent-strong);
}

.mail-route__arrow {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 1px;
    background: rgba(101, 112, 125, .45);
}

.mail-route__arrow:after {
    content: "";
    position: absolute;
    top: -3px;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 1px solid rgba(101, 112, 125, .65);
    border-right: 1px solid rgba(101, 112, 125, .65);
    transform: rotate(45deg);
}

.mail-thread-card h2 {
    font-size: 21px;
}

.mail-thread-card__dot {
    margin: 0 6px;
    color: var(--muted);
}

.mail-thread-card p,
.mail-thread-card small {
    color: var(--muted);
}

.mail-delete-form {
    margin: 0;
}

.mail-delete-form button {
    min-height: 36px;
    padding: 8px 12px;
    border-color: rgba(111, 119, 130, .3);
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    box-shadow: none;
    font-size: 13px;
}

.mail-delete-form button:hover {
    border-color: #a83f3f;
    color: #8a2f2f;
}

.mail-thread-page {
    width: min(1120px, 100%);
}

.mail-thread-hero {
    max-width: 900px;
    margin: 34px 0 38px;
}

.mail-thread-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 4.4vw, 54px);
    line-height: 1.04;
}

.mail-thread-hero .lead strong {
    color: var(--ink);
}

.mail-routing-note {
    display: grid;
    gap: 5px;
    max-width: 900px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(59, 118, 109, .18);
    border-radius: 14px;
    background: rgba(223, 244, 239, .72);
    color: var(--accent-strong);
}

.mail-routing-note span {
    color: #496660;
}

.mail-consent-panel {
    display: grid;
    gap: 18px;
    max-width: 900px;
    margin-bottom: 24px;
    padding: 24px 26px;
    border-radius: 16px;
}

.mail-consent-panel p {
    margin-top: 6px;
    color: var(--muted);
}

.mail-consent-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.mail-consent-status div {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .65);
}

.mail-consent-status dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.mail-consent-status dd {
    margin: 5px 0 0;
    color: var(--ink);
    font-weight: 800;
}

.mail-consent-panel button {
    justify-self: start;
}

.mail-internal-tools,
.mail-review-debug {
    display: grid;
    gap: 16px;
    max-width: 900px;
    margin-bottom: 20px;
    padding: 22px 24px;
    border-radius: 8px;
}

.mail-internal-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-left: 4px solid var(--accent);
}

.mail-internal-tools h2,
.mail-review-debug h2 {
    margin: 2px 0 0;
    font-size: 22px;
}

.mail-internal-tools__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.mail-internal-tools__actions form {
    margin: 0;
}

.mail-review-debug__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.mail-review-debug__grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .68);
}

.mail-review-debug__grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mail-review-debug__grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.mail-review-debug__feedback {
    margin: 0;
    padding: 14px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    background: rgba(223, 244, 239, .5);
    color: #35414b;
}

.mail-message {
    width: fit-content;
    max-width: min(82%, 780px);
    padding: 22px 24px;
    border-radius: 16px;
}

.mail-message--own {
    justify-self: end;
    margin-left: auto;
    background: var(--search);
}

.mail-message--system {
    width: 100%;
    max-width: 900px;
    justify-self: stretch;
    margin-left: 0;
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, .86);
}

.mail-followup-card {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(223, 244, 239, .48), rgba(255, 255, 255, .9));
}

.mail-followup-card__head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.mail-followup-card__head .mail-message__meta {
    margin-bottom: 0;
}

.mail-followup-card__toggle {
    min-height: 34px;
    padding: 7px 10px;
    border-color: rgba(111, 119, 130, .3);
    background: rgba(255, 255, 255, .75);
    color: var(--muted);
    box-shadow: none;
    font-size: 13px;
}

.mail-followup-card__body {
    display: grid;
    gap: 12px;
}

.mail-followup-card.is-collapsed .mail-followup-card__body {
    display: none;
}

.mail-followup-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.mail-followup-reply textarea {
    min-height: 68px;
}

.mail-followup-reply button {
    min-height: 42px;
}

.mail-followup-reply-item {
    display: grid;
    gap: 4px;
    max-width: 76%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
}

.mail-followup-reply-item--own {
    justify-self: end;
    background: rgba(223, 244, 239, .7);
}

.mail-followup-reply-item small {
    color: var(--muted);
    font-size: 12px;
}

.mail-followup-reply-item p {
    margin: 0;
}

.mail-followup-reply-done {
    margin: 0;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.mail-message__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--muted);
}

.mail-message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.72;
    white-space: normal;
}

.mail-reply-form {
    display: grid;
    gap: 18px;
    max-width: 900px;
    margin-top: 30px;
    padding: 26px;
    border-radius: 16px;
}

.mail-reply-form__head p {
    margin-top: 5px;
    color: var(--muted);
}

.mail-reply-form textarea {
    min-height: 160px;
}

.mail-reply-form button {
    justify-self: start;
}

.mail-reply-form--closed {
    border-left: 4px solid var(--accent);
    background: rgba(223, 244, 239, .55);
}

.assistant-page {
    width: min(980px, 100%);
}

.assistant-hero {
    max-width: 860px;
}

.assistant-test-panel {
    display: grid;
    gap: 16px;
    max-width: 860px;
    margin-bottom: 24px;
    padding: 22px;
}

.assistant-test-panel__head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.assistant-test-panel__head h2 {
    margin: 2px 0 0;
    font-size: 24px;
}

.assistant-test-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.assistant-test-search label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.assistant-test-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-test-metrics span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #3d4650;
    font-size: 13px;
    font-weight: 700;
}

.assistant-test-list {
    display: grid;
    gap: 12px;
}

.assistant-test-thread {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .62);
}

.assistant-test-thread > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: space-between;
}

.assistant-test-thread > div:first-child span {
    color: var(--muted);
    font-size: 13px;
}

.assistant-test-thread dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.assistant-test-thread dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.assistant-test-thread dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
}

.assistant-test-thread p {
    margin: 0;
    color: #3d4650;
    font-size: 14px;
}

.assistant-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-test-actions button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.assistant-chat {
    display: grid;
    gap: 16px;
    max-width: 860px;
}

.assistant-message {
    width: fit-content;
    max-width: min(82%, 720px);
    padding: 20px 22px;
}

.assistant-message--user {
    justify-self: end;
    margin-left: auto;
    background: var(--search);
}

.assistant-message--assistant {
    justify-self: start;
    border-left: 4px solid var(--accent);
}

.assistant-message__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 10px;
    color: var(--muted);
}

.assistant-message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.68;
}

.assistant-reply-form {
    display: grid;
    gap: 16px;
    max-width: 860px;
    margin-top: 24px;
    padding: 22px;
}

.assistant-reply-form textarea {
    min-height: 140px;
}

.assistant-reply-form button {
    justify-self: start;
}

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

@media (max-width: 720px) {
    .mail-inbox-hero,
    .mail-thread-hero {
        margin-bottom: 28px;
    }

    .mail-thread-card {
        grid-template-columns: 1fr;
        align-items: flex-start;
        padding: 20px;
        gap: 14px;
    }

    .mail-thread-card__link {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mail-route {
        grid-template-columns: 44px auto minmax(0, 1fr) auto 44px;
    }

    .mail-route__avatar {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .mail-thread-card__link,
    .mail-delete-form,
    .mail-delete-form button {
        width: 100%;
    }

    .mail-thread-card__avatar {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }

    .mail-thread-card .status-pill {
        margin-top: 0;
    }

    .mail-message {
        max-width: 94%;
        padding: 19px 20px;
    }

    .mail-message--system {
        max-width: 100%;
    }

    .mail-followup-card__head,
    .mail-followup-reply {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .mail-followup-card__toggle,
    .mail-followup-reply button {
        width: 100%;
    }

    .assistant-message {
        max-width: 94%;
        padding: 18px 20px;
    }

    .assistant-test-search,
    .assistant-test-thread dl,
    .mail-internal-tools,
    .mail-review-debug__grid {
        grid-template-columns: 1fr;
    }

    .mail-internal-tools__actions {
        justify-content: stretch;
    }

    .mail-internal-tools__actions,
    .mail-internal-tools__actions form,
    .mail-internal-tools__actions button {
        width: 100%;
    }

    .mail-consent-status {
        grid-template-columns: 1fr;
    }

    .assistant-reply-form,
    .mail-reply-form {
        padding: 20px;
    }

    .assistant-reply-form button,
    .mail-reply-form button {
        width: 100%;
    }
}

.goal-meta span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #3d4650;
    font-size: 13px;
    font-weight: 700;
}

.goal-card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.goal-card__actions form {
    margin: 0;
}

.goal-match-hero {
    display: grid;
    gap: 10px;
    max-width: 1040px;
}

.goal-match-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.goal-match-hero__actions .button {
    width: fit-content;
    padding: 10px 14px;
    font-size: 14px;
}

.goal-search-status {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    padding: 22px 24px;
}

.goal-search-status .goal-match-result__head {
    margin-bottom: 0;
}

.goal-match-run {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.goal-match-run span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.goal-match-error {
    margin-bottom: 18px;
    color: #9b2c2c;
}

.goal-match-result,
.goal-search-plan,
.goal-match-history {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.goal-match-result__head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.goal-match-result__head h2 {
    margin: 5px 0 0;
    font-size: 24px;
}

.goal-match-warning {
    margin: 0;
    padding: 12px 14px;
    border-left: 3px solid #bd7a1b;
    background: #fff7e8;
    color: #6e4b17;
    font-weight: 700;
}

.goal-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 18px;
}

.goal-candidate {
    display: grid;
    gap: 20px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(246, 250, 249, .94));
    box-shadow: 0 18px 45px rgba(42, 53, 68, .08);
}

.goal-candidate__head,
.goal-candidate__identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.goal-candidate__head {
    justify-content: space-between;
}

.goal-candidate__identity {
    min-width: 0;
}

.goal-candidate__avatar {
    position: relative;
    display: grid;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--search), var(--meet));
    box-shadow: 0 8px 24px rgba(59, 118, 109, .16);
}

.goal-candidate__avatar > span:before {
    content: "";
    display: block;
    width: 21px;
    height: 21px;
    margin: 0 auto 3px;
    border-radius: 50%;
    background: rgba(59, 118, 109, .45);
}

.goal-candidate__avatar > span:after {
    content: "";
    display: block;
    width: 36px;
    height: 18px;
    border-radius: 22px 22px 8px 8px;
    background: rgba(59, 118, 109, .45);
}

.goal-candidate__avatar img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goal-candidate h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
}

.goal-candidate__profile-link {
    color: inherit;
    text-decoration: none;
}

.goal-candidate__profile-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.goal-candidate small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.goal-candidate__score {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
}

.goal-candidate__score strong {
    color: var(--accent-strong);
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}

.goal-candidate__summary {
    margin: -4px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    background: rgba(255, 249, 238, .74);
    color: #43524f;
    font-size: 14px;
    line-height: 1.45;
}

.goal-candidate__matches {
    display: grid;
    gap: 10px;
}

.goal-candidate__match {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(223, 244, 239, .58);
}

.goal-candidate__match strong {
    font-size: 13px;
    line-height: 1.35;
}

.goal-candidate__match span {
    color: #58706c;
    font-size: 12px;
}

.goal-candidate__action {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.goal-candidate__action form {
    flex: 1;
    margin: 0;
}

.goal-candidate__action .button,
.goal-candidate__action button {
    width: 100%;
    padding: 9px 13px;
    font-size: 13px;
}

.mail-thread-hero__profile {
    display: inline-flex;
    margin-left: 10px;
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.mail-thread-hero__profile:hover {
    text-decoration: underline;
}

.profile-avatar-editor {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px;
    border: 1px dashed rgba(59, 118, 109, .3);
    border-radius: 16px;
    background: rgba(223, 244, 239, .34);
}

.profile-avatar-editor__preview {
    position: relative;
    display: grid;
    flex: 0 0 112px;
    width: 112px;
    height: 112px;
    place-items: center;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--search), var(--meet));
    box-shadow: 0 14px 34px rgba(42, 53, 68, .14);
}

.profile-avatar-editor__preview img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-editor__placeholder:before,
.profile-avatar-editor__placeholder:after {
    content: "";
    display: block;
    margin: 0 auto;
    background: rgba(59, 118, 109, .42);
}

.profile-avatar-editor__placeholder:before {
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    border-radius: 50%;
}

.profile-avatar-editor__placeholder:after {
    width: 62px;
    height: 30px;
    border-radius: 36px 36px 12px 12px;
}

.profile-avatar-editor__copy {
    display: grid;
    gap: 7px;
}

.profile-avatar-editor__copy > span {
    color: var(--muted);
    font-size: 13px;
}

.profile-avatar-upload {
    width: fit-content;
    margin-top: 5px;
    cursor: pointer;
}

.profile-avatar-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.goal-search-plan__items {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.goal-search-plan__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.goal-search-plan__head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.18;
}

.goal-search-plan__head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.goal-search-plan__mark {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 7px;
    background: rgba(223, 244, 239, .62);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.goal-search-requirement {
    display: grid;
    grid-template-columns: 110px minmax(240px, .95fr) minmax(220px, 1.05fr);
    gap: 22px;
    align-items: start;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.goal-search-requirement:last-child {
    border-bottom: 0;
}

.goal-search-requirement__mode {
    color: #59636b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.goal-search-requirement__mode--must {
    color: #a04d24;
}

.goal-search-requirement__mode--must_not {
    color: #9b2c2c;
}

.goal-search-requirement small {
    min-width: 0;
    padding-top: 2px;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.goal-search-requirement strong {
    color: #20272d;
    font-size: 16px;
    line-height: 1.45;
}

.goal-search-debug details {
    display: grid;
    gap: 14px;
}

.goal-search-debug > details > summary,
.goal-search-debug__profile > summary {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    cursor: pointer;
    font-weight: 900;
}

.goal-search-debug > details > summary {
    justify-content: flex-start;
}

.goal-search-debug > details > summary:after,
.goal-search-debug__profile > summary:after {
    content: "Раскрыть";
    margin-left: auto;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 900;
}

.goal-search-debug > details[open] > summary:after,
.goal-search-debug__profile[open] > summary:after {
    content: "Свернуть";
}

.goal-search-debug > details > summary small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.goal-search-debug__body {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.goal-search-debug h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.goal-search-debug pre {
    max-height: 360px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6f8f8;
    color: #20272d;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.goal-search-debug__profile {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.goal-match-test-hero {
    max-width: 900px;
}

.goal-match-test-form {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.goal-match-test-form label {
    display: grid;
    gap: 7px;
    color: #3d4650;
    font-size: 13px;
    font-weight: 800;
}

.goal-match-test-form textarea {
    min-height: 108px;
}

.goal-match-test-form__query textarea {
    min-height: 70px;
}

.goal-match-test-form__filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.goal-match-test-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
}

.goal-match-test-form__actions input[type=number] {
    width: 110px;
}

.goal-match-test-checkbox {
    grid-template-columns: auto 1fr !important;
    align-items: center;
    min-height: 46px;
}

.goal-match-test-checkbox input {
    width: 18px;
    height: 18px;
}

.goal-match-test-self-note {
    align-self: center;
    color: #5a6470;
    font-size: 13px;
    font-weight: 800;
}

.goal-match-test-form__actions button {
    margin-left: auto;
}

.goal-match-test-results {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: 18px;
    align-items: start;
}

.goal-match-index-note {
    margin: -4px 0 0;
    padding: 9px 11px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    color: #3d625d;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.goal-form .save-inline-status {
    justify-content: center;
    margin: 0 auto;
}

.goal-form .sticky-actions .button {
    justify-self: start;
}

.goal-form__secondary-actions {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-self: start;
}

.goal-form .sticky-actions button[type=submit] {
    grid-column: 3;
    justify-self: end;
}

.ai-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    gap: 18px;
    align-items: start;
}

.ai-chat-panel,
.extracted-profile {
    padding: 24px;
}

.ai-section-head {
    margin-bottom: 18px;
}

.ai-chat-tools {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 14px;
}

.ai-clear-button {
    white-space: nowrap;
}

.ai-chat-log {
    display: grid;
    gap: 12px;
    max-height: 460px;
    overflow-y: auto;
    padding: 4px 4px 16px;
}

.ai-message {
    max-width: 86%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #34404b;
    font-weight: 600;
    line-height: 1.45;
}

.ai-message p {
    margin: 0;
}

.ai-message--user {
    justify-self: end;
    border-color: rgba(59, 118, 109, .3);
    background: var(--search);
    color: var(--accent-strong);
}

.ai-message--assistant {
    justify-self: start;
}

.ai-message--loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 6px 2px;
    border: 0;
    background: transparent;
}

.ai-pulse-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-strong);
    animation: aiPulseDot 1.05s ease-in-out infinite;
}

.ai-pulse-dot:nth-child(2) {
    animation-delay: .14s;
}

.ai-pulse-dot:nth-child(3) {
    animation-delay: .28s;
}

@keyframes aiPulseDot {
    0%,
    100% {
        opacity: .35;
        transform: scale(.78);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

.ai-profile-form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ai-profile-form[hidden] {
    display: none;
}

.ai-start-button {
    justify-self: start;
    margin-top: 12px;
}

.ai-profile-form label {
    display: grid;
    gap: 8px;
    color: #3d4650;
    font-size: 14px;
    font-weight: 800;
}

.ai-profile-form textarea {
    min-height: 120px;
    max-height: 210px;
}

.ai-profile-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.ai-question-limit {
    margin-right: auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.extracted-profile {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
}

.extracted-profile__head {
    display: grid;
    gap: 6px;
}

.extracted-profile__head h2 {
    margin: 0;
    font-size: 22px;
}

.extracted-profile__head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.profile-uniqueness {
    display: grid;
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #d7b96e;
    border-radius: 8px;
    background: #fffdf7;
    box-shadow: 0 14px 34px rgba(55, 45, 20, .09);
}

.profile-uniqueness__head {
    display: grid;
    gap: 8px;
}

.profile-uniqueness__eyebrow {
    display: flex;
    gap: 7px;
    align-items: center;
    color: #77601f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.profile-uniqueness__eyebrow span {
    color: #c18c13;
    font-size: 17px;
}

.profile-uniqueness__head :is(h2, h3) {
    margin: 0;
    color: #20272d;
    font-size: 24px;
    line-height: 1.08;
}

.profile-uniqueness__head p {
    margin: 0;
    color: #68717a;
    font-size: 13px;
    line-height: 1.5;
}

.profile-uniqueness__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-block: 1px solid #eadfbd;
}

.profile-uniqueness__metric {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 13px 10px 13px 0;
}

.profile-uniqueness__metric + .profile-uniqueness__metric {
    padding-left: 14px;
    border-left: 1px solid #eadfbd;
}

.profile-uniqueness__metric strong {
    color: #9a6b00;
    font-size: 27px;
    line-height: 1;
}

.profile-uniqueness__metric span {
    color: #636b72;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.profile-uniqueness__summary {
    margin: -2px 0 0;
    color: #7a6a40;
    font-size: 11px;
    line-height: 1.4;
}

.profile-uniqueness__summary strong {
    display: block;
    margin-bottom: 3px;
    color: #5f450a;
    font-size: 13px;
}

.profile-uniqueness__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.unique-skill {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
    min-height: 210px;
    padding: 16px;
    border: 1px solid #e4dcc5;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(43, 39, 29, .05);
}

.unique-skill__topline {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
}

.unique-skill__mark {
    color: #c18c13;
    font-size: 15px;
}

.unique-skill__badge {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    padding: 3px 6px;
    border-radius: 999px;
    background: #f8edcc;
    color: #785508;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.unique-skill h3 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #252c31;
    font-size: 17px;
    line-height: 1.22;
}

.unique-skill__story,
.unique-skill__basis {
    display: grid;
    gap: 4px;
}

.unique-skill__story span,
.unique-skill__basis span {
    color: #876312;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.unique-skill__story p,
.unique-skill__basis p {
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.unique-skill__story p {
    color: #4b555c;
    font-size: 13px;
    font-weight: 720;
}

.unique-skill__basis p {
    display: -webkit-box;
    overflow: hidden;
    color: #747c83;
    font-size: 11px;
    font-weight: 650;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.unique-skill__evidence {
    align-self: end;
    margin-top: auto;
    padding-top: 7px;
    border-top: 1px solid #eee8d9;
    color: #8a6715;
    font-size: 10px;
    font-weight: 850;
}

.profile-uniqueness--standalone {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
    grid-template-rows: auto auto 1fr;
    gap: 18px 30px;
    margin: 20px 0;
    padding: 28px;
    border-top: 4px solid #c18c13;
    background: #fffdf7;
    box-shadow: 0 22px 55px rgba(39, 37, 30, .12);
}

.profile-uniqueness--standalone .profile-uniqueness__head {
    align-content: end;
}

.profile-uniqueness--standalone .profile-uniqueness__head :is(h2, h3) {
    max-width: 470px;
    font-size: 34px;
    line-height: 1.06;
}

.profile-uniqueness--standalone .profile-uniqueness__head p {
    max-width: 500px;
    font-size: 15px;
}

.profile-uniqueness--standalone .profile-uniqueness__metrics {
    align-self: start;
}

.profile-uniqueness--standalone .profile-uniqueness__metric strong {
    font-size: 38px;
}

.profile-uniqueness--standalone .profile-uniqueness__metric span {
    font-size: 12px;
}

.profile-uniqueness--standalone .profile-uniqueness__summary {
    align-self: start;
    max-width: 430px;
    font-size: 12px;
}

.profile-uniqueness--standalone .profile-uniqueness__list {
    grid-column: 2;
    grid-row: 1 / 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-uniqueness--standalone .unique-skill {
    min-height: 240px;
    padding: 18px;
}

.profile-uniqueness--standalone .unique-skill h3 {
    font-size: 18px;
}

.profile-uniqueness__value {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid #dfc77f;
    border-radius: 7px;
    background: #fff8e7;
}

.profile-uniqueness__value > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #d5b65d;
    border-radius: 50%;
    color: #9a6b00;
    font-size: 20px;
}

.profile-uniqueness__value h3 {
    margin: 0 0 4px;
    color: #342d1d;
    font-size: 16px;
}

.profile-uniqueness__value p {
    margin: 0;
    color: #665d49;
    font-size: 13px;
    line-height: 1.45;
}

.profile-uniqueness-mini {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, .9fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid #e2d5ae;
    border-top: 3px solid #c18c13;
    border-radius: 8px;
    background: #fffdf7;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(39, 37, 30, .08);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-uniqueness-mini:hover {
    border-color: #c9a850;
    box-shadow: 0 16px 36px rgba(39, 37, 30, .12);
    text-decoration: none;
    transform: translateY(-2px);
}

.profile-uniqueness-mini__copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.profile-uniqueness-mini__copy h2 {
    margin: 0;
    color: #252b30;
    font-size: 20px;
    line-height: 1.18;
}

.profile-uniqueness-mini__copy p {
    margin: 0;
    color: #756a4f;
    font-size: 12px;
    font-weight: 700;
}

.profile-uniqueness-mini__traits {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.profile-uniqueness-mini__traits span {
    padding: 6px 8px;
    border: 1px solid #e5d7ae;
    border-radius: 999px;
    background: #fff;
    color: #55471f;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.profile-uniqueness-mini__action {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    color: #765509;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.profile-uniqueness-mini__action span {
    font-size: 20px;
    line-height: 1;
}

.extracted-section {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.extracted-section h3 {
    margin: 0;
    color: #3d4650;
    font-size: 14px;
    line-height: 1.3;
}

.public-profile-layout {
    display: grid;
    grid-template-columns: minmax(260px, .7fr) minmax(320px, 1.3fr);
    gap: 18px;
    align-items: start;
    margin: 20px 0;
}

.public-profile-card {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.public-profile-card__photo {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #eaf3f0, #f7ead6);
    color: var(--accent-strong);
    font-size: 72px;
    font-weight: 900;
}

.public-profile-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-card__copy {
    display: grid;
    gap: 5px;
}

.public-profile-card__copy .eyebrow,
.public-profile-card__copy h1 {
    margin: 0;
}

.public-profile-card__copy h1 {
    color: #252c31;
    font-size: 30px;
    line-height: 1.1;
}

.public-profile-card__message {
    width: 100%;
    margin-top: 8px;
}

.public-profile-tags {
    position: static;
    padding: 24px;
}

.network-layout {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 18px;
    align-items: start;
}

.network-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.network-panel {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.network-panel__head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}

.network-panel__head .eyebrow {
    margin-bottom: 8px;
}

.network-panel__head h2 {
    font-size: 22px;
}

.network-panel__head .button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
}

.network-list {
    display: grid;
    gap: 10px;
}

.network-search {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(221, 227, 234, .78);
    border-radius: 8px;
    background: rgba(246, 248, 251, .72);
}

.network-search span {
    color: #4c5863;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.network-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid rgba(177, 194, 205, .72);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 720;
    box-shadow: none;
}

.network-search input:focus {
    border-color: rgba(59, 118, 109, .44);
    outline: 3px solid rgba(120, 183, 170, .18);
}

.network-contact,
.network-event,
.network-empty {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.network-contact[hidden],
.network-empty[hidden] {
    display: none !important;
}

.network-contact__head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.network-contact__avatar {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(59, 118, 109, .2);
    border-radius: 50%;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.network-contact__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.network-contact h3,
.network-event h3,
.network-empty strong {
    margin: 0;
    color: #20272d;
    font-size: 16px;
    line-height: 1.3;
}

.network-contact h3 a {
    color: inherit;
    text-decoration: none;
}

.network-contact h3 a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.network-contact p,
.network-event p,
.network-empty span {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.network-skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.network-skill-list span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid rgba(59, 118, 109, .24);
    border-radius: 8px;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 850;
}

.network-note-form {
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.network-note-form label {
    display: grid;
    gap: 5px;
    color: #4c5863;
    font-size: 12px;
    font-weight: 850;
}

.network-note-form textarea {
    min-height: 58px;
    resize: vertical;
}

.network-note-form .button {
    justify-self: start;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.network-contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.network-contact__actions form {
    margin: 0;
}

.network-contact__actions .button {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12px;
    box-shadow: none;
}

.network-contact-history {
    border-top: 1px solid var(--line);
    padding-top: 9px;
}

.network-contact-history summary {
    width: fit-content;
    cursor: pointer;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 900;
}

.network-contact-history .network-event-group__body {
    padding: 10px 0 0;
}

.network-hidden {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.network-hidden summary {
    width: fit-content;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.network-hidden__list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.network-hidden__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(246, 248, 251, .68);
}

.network-hidden__item strong,
.network-hidden__item span {
    display: block;
}

.network-hidden__item strong {
    color: #20272d;
    font-size: 14px;
}

.network-hidden__item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.network-hidden__item form {
    margin: 0;
}

.network-hidden__item .button {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12px;
}

.network-event-group {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.network-event-group summary {
    display: block;
    cursor: pointer;
    list-style: none;
}

.network-event-group summary::-webkit-details-marker {
    display: none;
}

.network-event-group__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
}

.network-event-group__summary:after {
    content: "Открыть";
    grid-column: 1 / -1;
    width: fit-content;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 900;
}

.network-event-group[open] .network-event-group__summary:after {
    content: "Свернуть";
}

.network-event-group__summary h3 {
    margin: 0;
    color: #20272d;
    font-size: 17px;
    line-height: 1.25;
}

.network-event-group__summary p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.network-event-group__body {
    display: grid;
    gap: 9px;
    padding: 0 14px 14px;
}

.network-event-group__body > .network-event__link {
    margin-top: -2px;
}

.network-event-group .network-event {
    background: rgba(246, 248, 251, .64);
    box-shadow: none;
}

.network-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.network-meta span {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--search);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 850;
}

.network-event__link {
    width: fit-content;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.network-event__link:hover {
    text-decoration: underline;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.data-chip,
.empty-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.25;
}

.data-chip {
    border: 1px solid rgba(59, 118, 109, .26);
    background: var(--search);
    color: var(--accent-strong);
}

.tag-remove-button {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(33, 91, 84, .12);
    color: var(--accent-strong);
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transform: scale(.88);
    box-shadow: none;
    transition: opacity .14s ease, transform .14s ease, background .14s ease;
}

.data-chip:hover .tag-remove-button,
.data-chip:focus-within .tag-remove-button {
    opacity: 1;
    transform: scale(1);
}

.tag-remove-button:hover {
    background: rgba(159, 45, 38, .12);
    color: #9f2d26;
    transform: scale(1);
}

.tag-remove-button:disabled {
    opacity: .45;
}

.empty-chip {
    border: 1px solid var(--line);
    background: rgba(246, 248, 251, .74);
    color: var(--muted);
}

.form-section {
    padding: 24px;
}

.section-head {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    margin-bottom: 22px;
}

.section-head p {
    margin-top: 6px;
    color: var(--muted);
}

.section-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--accent-strong);
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid label,
.wide-label {
    position: relative;
    display: grid;
    gap: 8px;
    color: #3d4650;
    font-size: 14px;
    font-weight: 700;
}

.form-grid label:has(textarea:not([data-autogrow])),
.wide-label {
    grid-column: 1 / -1;
}

input[type=text],
input:not([type]),
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
}

textarea {
    min-height: 104px;
    resize: vertical;
}

textarea[data-autogrow] {
    min-height: 44px;
    max-height: 180px;
    overflow-y: hidden;
    resize: none;
    line-height: 1.35;
}

.compact-textarea {
    min-height: 44px;
    max-height: 116px;
    overflow-y: auto;
    resize: none;
    line-height: 1.35;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(59, 118, 109, .22);
    border-color: rgba(59, 118, 109, .48);
}

.ability-list,
.capital-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ability-row,
.capital-card {
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 154px;
    padding: 16px;
    border: 1px solid rgba(221, 227, 234, .95);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, rgba(246, 248, 251, .7));
    font-weight: 700;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ability-row:has(.ability-toggle input:checked),
.capital-card:has(.capital-toggle input:checked) {
    border-color: rgba(59, 118, 109, .42);
    background: linear-gradient(180deg, #fff, var(--search));
    box-shadow: 0 12px 28px rgba(33, 91, 84, .1);
}

.ability-toggle,
.capital-toggle {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: start;
    color: var(--ink);
    cursor: pointer;
}

.ability-toggle input,
.capital-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #b8c2cc;
    border-radius: 7px;
    background: #fff;
    transition: background .18s ease, border-color .18s ease;
}

.ability-toggle input:checked + .checkmark,
.capital-toggle input:checked + .checkmark {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
}

.ability-toggle input:checked + .checkmark:after,
.capital-toggle input:checked + .checkmark:after {
    content: "";
    width: 11px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.ability-copy {
    display: grid;
    gap: 4px;
}

.ability-copy strong {
    font-size: 16px;
    line-height: 1.25;
}

.ability-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
}

.ability-detail,
.capital-detail {
    display: none;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ability-detail textarea,
.capital-detail textarea {
    min-height: 84px;
    background: rgba(255, 255, 255, .88);
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.ability-row:has(.ability-toggle input:checked) .ability-detail,
.capital-card:has(.capital-toggle input:checked) .capital-detail {
    display: grid;
}

.contacts-list {
    display: grid;
    gap: 14px;
}

.contact-row {
    display: grid;
    gap: 0;
    padding: 16px;
    border: 1px solid rgba(221, 227, 234, .95);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, rgba(246, 248, 251, .7));
}

.contact-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.contact-summary {
    display: grid;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    box-shadow: none;
}

.contact-summary:hover {
    transform: none;
}

.contact-summary__title {
    margin: 0;
    font-size: 16px;
    font-weight: 820;
    line-height: 1.25;
}

.contact-summary__meta,
.contact-summary__help {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-summary__help {
    color: #3d4650;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff !important;
    color: #6f7782 !important;
    font-size: 22px;
    line-height: 1;
    box-shadow: none !important;
}

.icon-button:hover {
    transform: none;
}

.icon-button:disabled {
    opacity: .36;
    cursor: not-allowed;
}

.contact-grid {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.contact-row.is-open .contact-grid {
    display: grid;
}

.contact-grid label {
    display: grid;
    gap: 7px;
    color: #3d4650;
    font-size: 14px;
    font-weight: 700;
}

.contact-grid label:has(textarea:not([data-autogrow])) {
    grid-column: 1 / -1;
}

.contact-grid textarea {
    min-height: 44px;
}

.add-contact {
    margin-top: 14px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.preference-groups {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.preference-group {
    display: grid;
    gap: 10px;
}

.preference-group h3 {
    margin: 0;
    color: #3d4650;
    font-size: 14px;
    line-height: 1.25;
}

.preference-group .choice-grid {
    margin-bottom: 0;
}

.choice-grid label {
    min-height: 46px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .66);
    font-weight: 700;
}

.questionnaire input[type=checkbox],
.questionnaire input[type=radio] {
    accent-color: var(--accent-strong);
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    padding: 16px 0;
    background: linear-gradient(180deg, rgba(248, 250, 251, 0), rgba(248, 250, 251, .94) 24%, rgba(248, 250, 251, .98));
}

.sticky-actions .save-inline-status,
.sticky-actions .autosave-hint {
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

.sticky-actions .save-inline-status + .autosave-hint {
    display: none;
}

.sticky-actions .button {
    grid-column: 3;
    justify-self: end;
}

@media (max-width: 820px) {
    .app-shell {
        padding: 22px 16px 30px;
    }

    .topbar {
        flex-wrap: wrap;
        margin-bottom: 18px;
    }

    .profile-nav {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .nav-auth-popover {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 10px 0;
    }

    .scenario-grid,
    .ai-profile-layout,
    .form-grid,
    .ability-list,
    .contact-grid,
    .choice-grid,
    .capital-grid,
    .goal-candidate-grid,
    .goal-match-test-form__filters,
    .goal-match-test-results {
        grid-template-columns: 1fr;
    }

    .ai-chat-tools {
        justify-content: flex-start;
    }

    .ai-chat-tools .ai-clear-button {
        width: 100%;
    }

    .profile-avatar-editor {
        align-items: flex-start;
    }

    .goal-candidate__head {
        align-items: flex-start;
    }

    .goal-search-requirement {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .goal-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-match-test-form__actions button {
        width: 100%;
        margin-left: 0;
    }

    .extracted-profile {
        position: static;
    }

    .public-profile-layout {
        grid-template-columns: 1fr;
    }

    .public-profile-card {
        position: static;
    }

    .network-layout {
        grid-template-columns: 1fr;
    }

    .network-panel__head {
        display: grid;
    }

    .profile-uniqueness--standalone {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 22px;
    }

    .profile-uniqueness--standalone .profile-uniqueness__list {
        grid-column: 1;
        grid-row: auto;
    }

    .profile-uniqueness--standalone .profile-uniqueness__head :is(h2, h3) {
        font-size: 28px;
    }

    .profile-uniqueness-mini {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-uniqueness-mini__action {
        justify-content: flex-start;
    }

    .tag-remove-button {
        opacity: 1;
        transform: scale(1);
    }

    .status-head {
        display: block;
    }

    .status-pill {
        margin-top: 14px;
    }

    h1 {
        font-size: 42px;
    }

    .lead {
        font-size: 16px;
    }

    .profile-nav {
        gap: 10px;
    }

    .form-section {
        padding: 18px;
    }

    .section-head {
        grid-template-columns: 1fr;
    }

    .sticky-actions .button {
        justify-self: end;
    }
}

@media (max-width: 520px) {
    .profile-avatar-editor {
        display: grid;
        justify-items: center;
        text-align: center;
    }

    .profile-avatar-upload {
        width: 100%;
        justify-content: center;
    }

    .goal-candidate {
        padding: 18px;
    }

    .goal-candidate__avatar {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
    }

    .profile-uniqueness--standalone .profile-uniqueness__list {
        grid-template-columns: 1fr;
    }
}
