/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #faf7f2;
    --cream-dark: #f0ebe3;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-light: #6b6b6b;
    --text-muted: #9a9a9a;
    --blue: #4A7BF7;
    --blue-light: #e8eefb;
    --border: #e5e0da;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* === Top Banner === */
.top-banner {
    background: #dce8f5;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    position: relative;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.banner-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.banner-link:hover {
    text-decoration: underline;
}

.banner-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
    line-height: 1;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* === Navbar === */
.navbar {
    position: sticky;
    top: 0;
    background: var(--cream);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-left: -8px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.3s;
}

.nav-login {
    background: #e8e4de;
    color: var(--text);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-login:hover {
    background: #ddd8d0;
}

/* === Mobile Menu === */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: min(85vw, 360px);
    height: 100vh;
    background: var(--white);
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.mobile-menu-logo,
.chat-logo,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.5px;
}

/* ==========================================================================
   Unified brand icon (sparkle in circle)
   ========================================================================== */
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.brand-icon-sm {
    width: 28px;
    height: 28px;
}

.brand-icon-lg {
    width: 56px;
    height: 56px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Для hero-cluster: такого же размера как doc-photo */
.hero-avatars-cluster .brand-icon {
    width: 48px;
    height: 48px;
}

.logo-dot {
    color: var(--blue);
    font-size: 22px;
    font-weight: 700;
    margin-left: 1px;
}

.mobile-menu-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.mobile-menu-items {
    padding: 8px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.menu-item-active {
    color: var(--blue);
}

.menu-item-muted {
    color: var(--text-muted);
    font-weight: 400;
}

.menu-item-disabled {
    color: var(--text-muted);
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

.menu-badge {
    margin-left: auto;
    background: var(--cream-dark);
    color: var(--text-light);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 10px;
}

.link-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.mobile-menu-bottom {
    padding: 20px;
}

.menu-join-btn {
    width: 100%;
    background: var(--blue);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
}

.menu-join-text {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.mobile-menu-footer-links {
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
}

.mobile-menu-footer-links a {
    padding: 12px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-footer-links a:last-child {
    border-bottom: none;
}

.mobile-menu-disclaimer {
    padding: 16px 20px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: auto;
}

.mobile-menu-disclaimer a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* === Hero Section === */
.hero {
    background: var(--cream);
    padding: 24px 20px 48px;
    text-align: left;
}

.hero-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.proof-avatar-stack {
    display: flex;
}

.proof-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--white);
    object-fit: cover;
    background: var(--cream-dark);
}

.proof-avatar + .proof-avatar {
    margin-left: -8px;
}

/* Hero avatars cluster — logo + doctor photos (выравнен слева) */
.hero-avatars-cluster {
    display: flex;
    align-items: center;
    margin: 12px 0 22px;
}

.hero-avatars-cluster .brand-icon {
    position: relative;
    z-index: 3;
}

.hero-doc-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--cream);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    flex-shrink: 0;
}

.hero-doc-1 {
    margin-left: -12px;
    z-index: 2;
}

.hero-doc-2 {
    margin-left: -12px;
    z-index: 1;
}

/* Rating pill — под hero */
.rating-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 7px 16px 7px 12px;
    font-size: 13px;
    color: var(--text-light);
    margin: 24px auto 0;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    font-family: var(--font-sans);
    width: fit-content;
}

.rating-stars {
    display: inline-flex;
    gap: 1px;
    align-items: center;
}

.rating-value {
    font-weight: 600;
    color: var(--text);
    margin-left: 2px;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

.rating-sep {
    color: var(--text-muted);
    margin: 0 2px;
}

.rating-count {
    color: var(--text-light);
    font-family: var(--font-sans);
}

.rating-count #consultCounter {
    color: var(--text);
    font-weight: 600;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
}

/* Hero title */
.hero-title {
    font-family: var(--font-serif);
    font-size: 46px;
    font-weight: 500;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
    text-align: left;
}

.title-underline {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #a0c4f0;
    text-underline-offset: 4px;
}

.hero-text {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 14px;
    text-align: left;
}

.hero-text:last-of-type {
    margin-bottom: 22px;
}

/* Chat input */
.chat-input-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.chat-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text);
    background: transparent;
    line-height: 1.5;
}

.chat-input::placeholder {
    color: var(--text-muted);
    transition: opacity 0.3s ease;
}

.chat-input.placeholder-fade::placeholder {
    opacity: 0;
}

.chat-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 8px;
}

.chat-submit {
    background: #e8e4de;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    transition: background 0.2s, color 0.2s, transform 0.1s;
    font-family: inherit;
}

.chat-submit:hover {
    background: #ddd8d0;
    color: var(--text);
}

/* Активное состояние — когда в textarea есть текст */
.chat-input-box.has-text .chat-submit {
    background: var(--blue);
    color: var(--white);
}

.chat-input-box.has-text .chat-submit:hover {
    background: #3a68d9;
}

.chat-input-box.has-text .chat-submit:active {
    transform: scale(0.97);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* === Fullpage Sections === */
.fullpage-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 88px 20px;
    position: relative;
}

/* Вертикальный тонкий разделитель между соседними секциями */
.fullpage-section + .fullpage-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, var(--border));
}

.section-cream {
    background: var(--cream);
}

.section-white {
    background: var(--white);
}

.fullpage-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.section-soon-badge {
    display: inline-block;
    background: var(--cream-dark);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.section-icon-circle {
    margin-bottom: 32px;
}

.serif-heading {
    font-family: var(--font-serif);
    font-size: clamp(30px, 5.5vw, 46px);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

/* Lora корректно отображает цифры, но оставим класс как no-op на случай,
   если захотим вернуть sans-numbers в serif-заголовках */
.num-inline {
    font-family: inherit;
    font-weight: inherit;
}

.serif-subtext {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto;
}

/* === Doctor Circle Illustration === */
.doctor-circle-illustration {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 36px;
}

/* Декоративное кольцо вокруг центра (совпадает с окружностью аватаров) */
.doctor-circle-illustration::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--border);
    opacity: 0.6;
}

.center-person {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    /* Без рамки и тени — фото сливается с фоном секции */
}

.orbit-avatar {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid var(--cream);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

/* 6 позиций по окружности. Центр аватара попадает ровно на точку окружности.
   Используем top/left в % относительно контейнера + transform translate(-50%, -50%).
   Точки на окружности с центром (50%, 50%) и радиусом 50%:
   12ч (0°):   (50%, 0%)
   2ч (60°):   (93.3%, 25%)
   4ч (120°):  (93.3%, 75%)
   6ч (180°):  (50%, 100%)
   8ч (240°):  (6.7%, 75%)
   10ч (300°): (6.7%, 25%)
*/
.orbit-1 { top: 0%;   left: 50%;   transform: translate(-50%, -50%); }
.orbit-2 { top: 25%;  left: 93.3%; transform: translate(-50%, -50%); }
.orbit-3 { top: 75%;  left: 93.3%; transform: translate(-50%, -50%); }
.orbit-4 { top: 100%; left: 50%;   transform: translate(-50%, -50%); }
.orbit-5 { top: 75%;  left: 6.7%;  transform: translate(-50%, -50%); }
.orbit-6 { top: 25%;  left: 6.7%;  transform: translate(-50%, -50%); }

/* === Chat Demo === */
.chat-demo {
    background: transparent;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 14.5px;
    line-height: 1.5;
    max-width: 78%;
    position: relative;
}

.chat-bubble p {
    margin: 0;
    text-align: left;
}

.chat-bubble-left {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 6px;
    margin-right: auto;
}

.chat-bubble-right {
    background: #e0eaff;
    color: var(--text);
    border-bottom-right-radius: 6px;
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-right: 14px;
}

.chat-bubble-right p {
    flex: 1;
}

.chat-demo-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Tight content — иллюстрация ближе к заголовку */
.fullpage-content-tight .chat-demo {
    margin-bottom: 28px;
}

.fullpage-content-tight .serif-heading {
    margin-top: 0;
}

/* === Doctors Row === */
.doctors-row {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.doctor-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--cream);
    margin-left: -12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.doctor-thumb:first-child {
    margin-left: 0;
}

.availability-pill {
    display: inline-block;
    border: 1.5px solid #34c759;
    color: #34c759;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin: 16px 0 20px;
}

/* Doctor features card */
.doctor-features-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
    text-align: left;
}

.doctor-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
}

.doctor-feature + .doctor-feature {
    border-top: 1px solid var(--border);
}

.df-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--blue-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-feature strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.doctor-feature span {
    font-size: 13px;
    color: var(--text-muted);
}

/* === Memory Illustration === */
.memory-illustration {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 36px;
}

.memory-illustration::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--border);
    opacity: 0.6;
}

.memory-person {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--cream);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.memory-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

/* 6 иконок по окружности — та же геометрия что у orbit-* */
.mi-1 { top: 0%;   left: 50%;   transform: translate(-50%, -50%); }
.mi-2 { top: 25%;  left: 93.3%; transform: translate(-50%, -50%); }
.mi-3 { top: 75%;  left: 93.3%; transform: translate(-50%, -50%); }
.mi-4 { top: 100%; left: 50%;   transform: translate(-50%, -50%); }
.mi-5 { top: 75%;  left: 6.7%;  transform: translate(-50%, -50%); }
.mi-6 { top: 25%;  left: 6.7%;  transform: translate(-50%, -50%); }

/* === Privacy Section: чат-пузыри с замком === */
.privacy-illustration {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 40px auto 0;
    padding: 32px 28px 40px;
    border-radius: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.privacy-bubbles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    filter: blur(3px);
    opacity: 0.55;
}

.pb {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 82%;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}

.pb-left {
    background: var(--cream);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    text-align: left;
}

.pb-right {
    background: #e0eaff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    text-align: left;
}

/* Большой замок по центру */
.privacy-lock-big {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(74, 123, 247, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    z-index: 2;
}

/* === CTA Section === */
.cta-icon {
    margin-bottom: 24px;
}

.highlight-blue {
    background: linear-gradient(180deg, transparent 60%, #c8d8f0 60%);
    padding: 0 4px;
}

/* === Reviews Section === */
.reviews-section .fullpage-content {
    max-width: 1100px;
}

.reviews-header {
    margin-bottom: 48px;
}

.rating-stars-large {
    justify-content: center;
    margin-bottom: 16px;
    gap: 2px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}

.review-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.review-stars {
    display: flex;
    gap: 1px;
}

.review-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    margin: 0;
    font-style: italic;
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.review-author strong {
    font-size: 14px;
    font-weight: 600;
}

.review-author span {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* === Footer === */
.footer {
    background: var(--white);
    padding: 48px 20px 24px;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light);
    max-width: 220px;
}

.footer-links h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.footer-disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}

.footer-disclaimer a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .fullpage-section {
        padding: 64px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .hero-title {
        font-size: 30px;
    }

    .serif-heading {
        font-size: 28px;
    }

    .doctor-circle-illustration {
        width: 260px;
        height: 260px;
    }

    .center-person {
        width: 150px;
        height: 150px;
    }

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

@media (min-width: 769px) {
    .hero-container {
        max-width: 600px;
        margin: 0 auto;
        padding-top: 30px;
    }

    .nav-hamburger {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 42px;
    }

    .serif-heading {
        font-size: 44px;
    }

    .fullpage-content {
        max-width: 680px;
    }
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delayed {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Chat Page
   ========================================================================== */

body.chat-page {
    background: var(--cream);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-logo {
    display: flex;
    align-items: baseline;
    text-decoration: none;
}

.chat-new-btn {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.chat-new-btn:hover {
    background: var(--cream-dark);
    border-color: var(--text-muted);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    scroll-behavior: smooth;
}

.msg {
    display: flex;
    gap: 10px;
    max-width: 100%;
    animation: msgFadeIn 0.3s ease;
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-user {
    justify-content: flex-end;
}

.msg-assistant {
    justify-content: flex-start;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.msg-bubble {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    max-width: 100%;
    word-wrap: break-word;
}

/* Сообщения пользователя — пузырь в голубом */
.msg-user .msg-bubble {
    background: #e0eaff;
    border-radius: 18px;
    border-bottom-right-radius: 6px;
    padding: 10px 16px;
    max-width: 80%;
}

/* Сообщения ассистента — без рамки и фона, просто текст */
.msg-assistant .msg-bubble {
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
}

.msg-bubble p {
    margin: 0 0 8px;
}

.msg-bubble p:last-child {
    margin-bottom: 0;
}

.msg-bubble h3,
.msg-bubble h4 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    margin: 12px 0 4px;
    color: var(--text);
}

.msg-bubble h3:first-child,
.msg-bubble h4:first-child {
    margin-top: 0;
}

.msg-bubble ul,
.msg-bubble ol {
    margin: 4px 0 8px;
    padding-left: 20px;
}

.msg-bubble li {
    margin-bottom: 2px;
    line-height: 1.5;
}

.msg-bubble li:last-child {
    margin-bottom: 0;
}

.msg-bubble strong {
    font-weight: 600;
}

.msg-bubble em {
    font-style: italic;
}

/* Inline privacy consent (после первого сообщения пользователя) */
.inline-consent {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
    animation: msgFadeIn 0.4s ease;
}

.consent-intro {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}

.consent-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s;
}

.consent-box:hover {
    border-color: var(--text-muted);
}

.consent-box input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--blue);
    cursor: pointer;
}

.consent-box a {
    color: var(--blue);
    text-decoration: underline;
}

/* Welcome screen (пустой чат) */
.chat-welcome {
    text-align: center;
    padding: 60px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: msgFadeIn 0.4s ease;
}

.chat-welcome-logo {
    margin-bottom: 20px;
}

.chat-welcome-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
    color: var(--text);
}

.chat-welcome-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    max-width: 440px;
}

/* Inline demographics form (под сообщением ассистента) */
.inline-demographics {
    display: flex;
    justify-content: flex-end;
    animation: msgFadeIn 0.4s ease;
}

.demographics-form {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
    width: 100%;
}

.demographics-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 10px;
}

.demographics-age input[type="number"] {
    width: 100%;
    border: 1.5px solid var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    outline: none;
    -moz-appearance: textfield;
}

.demographics-age input[type="number"]::-webkit-outer-spin-button,
.demographics-age input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.demographics-age input[type="number"]:focus {
    border-color: var(--blue);
}

.inline-demographics .gender-toggle {
    display: flex;
    background: var(--cream-dark);
    border-radius: 14px;
    padding: 4px;
    position: relative;
}

.inline-demographics .gender-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inline-demographics .gender-toggle label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.inline-demographics .gender-toggle input[type="radio"]:checked + label {
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.demographics-submit {
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    background: linear-gradient(90deg, #4A7BF7 0%, #6b92ff 100%);
    box-shadow: 0 2px 10px rgba(74, 123, 247, 0.25);
}

.demographics-submit:hover {
    background: linear-gradient(90deg, #3a68d9 0%, #5a82ef 100%);
}

.demographics-submit:active {
    transform: scale(0.98);
}

.demographics-error {
    font-size: 13px;
    color: #d9352c;
    text-align: center;
    margin: 0;
}

/* ==========================================================================
   Loading overlay (перед финальным отчётом)
   ========================================================================== */
.loading-overlay {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    animation: msgFadeIn 0.4s ease;
}

.loading-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.loading-icon-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    border-top-color: var(--blue);
    animation: loadingSpin 1.2s linear infinite;
}

@keyframes loadingSpin {
    to { transform: rotate(360deg); }
}

.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}

.loading-title {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 8px;
    transition: opacity 0.25s ease;
}

.loading-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ==========================================================================
   Report screen (финальный протокол)
   ========================================================================== */
.report-screen {
    padding: 8px 4px 40px;
    animation: msgFadeIn 0.5s ease;
}

.report-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.report-share-btn {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: background 0.2s;
}

.report-share-btn:hover {
    background: var(--cream);
}

.report-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
    color: var(--text);
}

.report-date {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 22px;
}

.report-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 24px;
}

.report-summary {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 28px;
}

.report-summary p {
    margin-bottom: 2px;
}

.report-summary p:last-child {
    margin-bottom: 0;
}

/* CTA block */
.report-cta {
    background: #f4f6ff;
    border-left: 4px solid var(--blue);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 32px;
}

.report-cta-image {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
    aspect-ratio: 16 / 9;
    background: var(--cream-dark);
}

.report-cta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.report-cta-title {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
    color: var(--text);
}

.report-cta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.report-cta-list li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
}

.report-cta-list li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--blue);
    font-weight: 700;
}

.report-cta-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: linear-gradient(135deg, #3b6bf2 0%, #5a85f7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(59, 107, 242, 0.3);
    transition: transform 0.1s, box-shadow 0.2s;
}

.report-cta-btn:hover {
    box-shadow: 0 6px 20px rgba(59, 107, 242, 0.4);
}

.report-cta-btn:active {
    transform: scale(0.99);
}

/* Shimmer animation */
.shimmer-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: shimmer 3.5s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%   { left: -75%; }
    50%  { left: 150%; }
    100% { left: 150%; }
}

.report-cta-note {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin: 12px 0 0;
}

/* Collapsible sections */
.report-section {
    border-top: 1px solid var(--border);
}

.report-section[open] .report-chevron {
    transform: rotate(90deg);
}

.report-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
}

.report-section-header::-webkit-details-marker { display: none; }

.report-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 2px;
}

.report-section-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.report-chevron {
    color: var(--text-muted);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.report-section-body {
    padding: 0 0 20px;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--text);
}

.report-section-body h3,
.report-section-body h4 {
    font-family: var(--font-sans);
    font-size: 15.5px;
    font-weight: 600;
    margin: 20px 0 6px;
    color: var(--text);
}

.report-section-body h3:first-child,
.report-section-body h4:first-child {
    margin-top: 0;
}

.report-section-body ul,
.report-section-body ol {
    padding-left: 20px;
    margin: 4px 0 8px;
}

.report-section-body li {
    margin-bottom: 2px;
    line-height: 1.5;
}

.report-section-body li:last-child {
    margin-bottom: 0;
}

.report-section-body p {
    margin-bottom: 4px;
}

.report-section-body p:last-child {
    margin-bottom: 0;
}

.report-section-body strong {
    font-weight: 600;
}

/* Feedback block */
.report-feedback {
    text-align: center;
    padding: 28px 0 24px;
    border-top: 1px solid var(--border);
}

.report-feedback h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.report-feedback p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.report-feedback-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.report-feedback-buttons button {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    color: var(--text);
}

.report-feedback-buttons button:hover {
    background: var(--cream);
}

.report-feedback-buttons button.selected {
    background: #f4f6ff;
    border-color: var(--blue);
    color: var(--blue);
    font-weight: 600;
}

.report-feedback-thanks {
    font-size: 13px;
    color: var(--blue);
    margin-top: 12px;
    font-weight: 500;
}

/* Bottom actions */
.report-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.report-action-btn {
    background: #f4f6ff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.report-action-btn:hover {
    background: #e8edff;
}

/* Feedback comment form */
.fb-rating {
    color: var(--blue);
    font-weight: 600;
}

.feedback-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.feedback-comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--white);
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
    outline: none;
    transition: border-color 0.2s;
}

.feedback-comment-form textarea:focus {
    border-color: var(--blue);
}

.feedback-comment-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.feedback-skip,
.feedback-send {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.feedback-skip {
    background: var(--white);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.feedback-skip:hover {
    background: var(--cream);
}

.feedback-send {
    background: var(--blue);
    color: var(--white);
    font-weight: 600;
}

.feedback-send:hover {
    background: #3a68d9;
}

.feedback-thanks {
    font-size: 15px;
    color: var(--blue);
    font-weight: 500;
    margin: 0;
    padding: 14px 0;
}

/* Next steps: See a Doctor / Continue */
.report-next-steps {
    margin-top: 24px;
    text-align: center;
    padding: 24px 8px;
}

.report-next-steps h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.report-next-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.report-next-btn {
    background: #f4f6ff;
    border: none;
    border-radius: 14px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.report-next-btn:hover {
    background: #e8edff;
}

.report-next-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .report-container {
        padding: 32px 22px;
        border-radius: 18px;
    }
    .report-title {
        font-size: 32px;
    }
    .report-next-buttons {
        flex-direction: column;
    }
    .report-next-btn {
        width: 100%;
    }
}

/* Кнопка «Получить рекомендацию» (рядом с полем ввода) */
.recommend-slot {
    min-height: 0;
}

.recommend-btn {
    display: block;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
    margin: 8px 0 0;
    text-align: center;
    animation: msgFadeIn 0.3s ease;
}

.recommend-btn:hover {
    background: #f4f6ff;
    border-color: var(--blue);
}

.recommend-confirm {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    margin: 8px 0 0;
    animation: msgFadeIn 0.3s ease;
}

.recommend-confirm p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 14px;
}

.recommend-confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.recommend-yes {
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.recommend-yes:hover {
    background: #3a68d9;
}

.recommend-no {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.recommend-no:hover {
    background: var(--cream);
}

/* Typing indicator */
.msg-typing .msg-bubble {
    padding: 10px 0;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.thinking-text {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    animation: thinkingPulse 1.5s infinite ease-in-out;
}

@keyframes thinkingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Chat input area */
.chat-form-wrapper {
    padding: 12px 20px 16px;
    flex-shrink: 0;
    background: var(--cream);
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 10px 10px 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-form:focus-within {
    border-color: var(--blue);
    box-shadow: 0 2px 16px rgba(74, 123, 247, 0.12);
}

.chat-input-field {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: transparent;
    max-height: 160px;
    min-height: 22px;
    padding: 4px 0;
}

.chat-input-field::placeholder {
    color: var(--text-muted);
}

.chat-input-field:disabled {
    opacity: 0.6;
}

.chat-send-btn {
    background: var(--blue);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

.chat-send-btn:hover:not(:disabled) {
    background: #3a68d9;
}

.chat-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    background: #c4c0b8;
    cursor: not-allowed;
}

.chat-disclaimer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 0 8px;
}

/* ==========================================================================
   Modal (contact form)
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: modalFadeIn 0.2s ease;
}

.modal-overlay[hidden] {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--white);
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 28px 28px;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--cream);
    color: var(--text);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.modal-icon-success {
    background: #e8f8ec;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
}

.modal-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.modal-field input[type="text"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.modal-field input[type="text"]:focus {
    border-color: var(--blue);
}

.modal-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 0;
}

.modal-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--blue);
}

.modal-consent a {
    color: var(--blue);
    text-decoration: underline;
}

.modal-submit {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
    transition: background 0.2s;
}

.modal-submit:hover:not(:disabled) {
    background: #3a68d9;
}

.modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-error {
    font-size: 13px;
    color: #d9352c;
    text-align: center;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fdecea;
    border-radius: 8px;
}

.modal-success {
    text-align: center;
}


.modal-success .modal-submit {
    margin-top: 16px;
    width: 100%;
}

/* ==========================================================================
   Legal pages (privacy, terms)
   ========================================================================== */

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.legal-page h1 {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.legal-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
}

.legal-page h2 {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 12px;
    color: var(--text);
}

.legal-page p {
    margin-bottom: 14px;
}

.legal-page ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.legal-page li {
    margin-bottom: 6px;
}

.legal-page a {
    color: var(--blue);
    text-decoration: underline;
}

.legal-page code {
    background: var(--cream-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: ui-monospace, Menlo, Monaco, monospace;
}

.legal-warning {
    background: #fff8e6;
    border: 1px solid #f0d98a;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0 8px;
    font-size: 14px;
    line-height: 1.6;
}

.legal-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

@media (max-width: 600px) {
    .legal-page {
        padding: 32px 18px 60px;
    }
    .legal-page h1 {
        font-size: 30px;
    }
    .legal-page h2 {
        font-size: 18px;
        margin-top: 28px;
    }
    .legal-footer {
        flex-direction: column;
    }
}

/* Chat page: responsive */
@media (max-width: 600px) {
    .chat-header {
        padding: 12px 16px;
    }
    .chat-messages {
        padding: 16px 14px 8px;
        gap: 14px;
    }
    .msg-bubble {
        font-size: 14.5px;
        padding: 11px 14px;
    }
    .chat-form-wrapper {
        padding: 10px 14px 14px;
    }
    .modal {
        padding: 32px 22px 24px;
        border-radius: 18px;
    }
    .modal-title {
        font-size: 22px;
    }
}

/* ======================================================================
   Save-results CTA (report screen) + Tariffs screen
   ====================================================================== */

/* Компактная версия doctor-circle для CTA-блока в отчёте */
.doctor-circle-compact {
    width: 200px;
    height: 200px;
    margin: 0 auto 18px;
}

.doctor-circle-compact .center-person {
    width: 120px;
    height: 120px;
}

.doctor-circle-compact .orbit-avatar {
    width: 36px;
    height: 36px;
    border-width: 2.5px;
}

/* Save-CTA — содержимое центрируется */
.report-cta-save .report-cta-title,
.report-cta-save .report-cta-lead {
    text-align: center;
}

.report-cta-lead {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 20px;
}

/* === Tariffs modal (полноэкранная модалка поверх чата) === */
.tariffs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    overflow-y: auto;
    animation: modalFadeIn 0.2s ease;
    padding: 32px 16px;
}

.tariffs-modal {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--cream);
    border-radius: 20px;
    padding: 48px 28px 40px;
    animation: modalSlideUp 0.3s ease;
}

.tariffs-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.tariffs-modal-close:hover {
    background: var(--cream-dark);
    color: var(--text);
}

.tariffs-container {
    max-width: 1100px;
    margin: 0 auto;
}

.tariffs-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    margin: 0 0 8px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.tariffs-subtitle {
    text-align: center;
    color: var(--text-light);
    margin: 0 0 32px;
    font-size: 14.5px;
}

.tariffs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 820px) {
    .tariffs-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        align-items: stretch;
    }
}

.tariff-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tariff-card-featured {
    border: 2px solid var(--blue);
    box-shadow: 0 10px 30px rgba(74, 123, 247, 0.18);
}

@media (min-width: 820px) {
    .tariff-card-featured {
        transform: translateY(-8px);
    }
}

.tariff-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: var(--white);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 99px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tariff-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.tariff-price {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 500;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.tariff-period-inline {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 400;
    font-family: var(--font-sans);
}

.tariff-period {
    font-size: 13.5px;
    color: var(--text-light);
    margin-bottom: 22px;
    line-height: 1.45;
    min-height: 38px;
}

.tariff-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex-grow: 1;
}

.tariff-features li {
    padding: 7px 0 7px 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

.tariff-features li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    top: 7px;
    color: var(--blue);
    font-weight: 700;
}

.tariff-features strong {
    font-weight: 600;
}

.tariff-cta-btn {
    width: 100%;
    background: var(--white);
    color: var(--text);
    border: 1.5px solid var(--text);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.tariff-cta-btn:hover {
    background: var(--text);
    color: var(--white);
}

.tariff-cta-btn:active {
    transform: scale(0.99);
}

.tariff-cta-featured {
    background: linear-gradient(135deg, #3b6bf2 0%, #5a85f7 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(74, 123, 247, 0.3);
}

.tariff-cta-featured:hover {
    background: linear-gradient(135deg, #2d5be8 0%, #4a76f0 100%);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(74, 123, 247, 0.4);
}

@media (max-width: 768px) {
    .tariffs-modal-overlay {
        padding: 0;
    }
    .tariffs-modal {
        padding: 52px 16px 28px;
        border-radius: 0;
        min-height: 100vh;
    }
    .tariffs-title {
        font-size: 24px;
    }
    .tariff-card {
        padding: 22px 18px 20px;
    }
    .tariff-price {
        font-size: 32px;
    }
    .doctor-circle-compact {
        width: 180px;
        height: 180px;
    }
    .doctor-circle-compact .center-person {
        width: 110px;
        height: 110px;
    }
    .doctor-circle-compact .orbit-avatar {
        width: 32px;
        height: 32px;
    }
}
