:root {
    --bg-ink: #080714;
    --midnight: #111832;
    --purple: #26133d;
    --gold: #d7b56d;
    --gold-deep: #a98135;
    --text: #f6f1e8;
    --muted: #c8bdd8;
    --glass: rgba(18, 12, 34, 0.68);
    --glass-strong: rgba(14, 10, 27, 0.86);
    --border: rgba(215, 181, 109, 0.34);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background:
        linear-gradient(135deg, rgba(8, 7, 20, 0.88), rgba(22, 16, 45, 0.7)),
        radial-gradient(circle at 70% 10%, rgba(215, 181, 109, 0.22), transparent 24rem),
        radial-gradient(circle at 20% 88%, rgba(77, 144, 156, 0.16), transparent 20rem),
        url("background.jpg"),
        linear-gradient(150deg, #080714 0%, #16102d 45%, #101b35 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.1), transparent 15rem),
        linear-gradient(180deg, rgba(5, 4, 12, 0.18), rgba(5, 4, 12, 0.68));
    pointer-events: none;
}

button,
input,
textarea {
    font: inherit;
}

.page-shell {
    width: min(100%, 1040px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 18px;
}

.chat-panel {
    width: min(100%, 720px);
    max-height: none;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(170px, auto) auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--glass);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(22px);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 24px 26px 18px;
    border-bottom: 1px solid rgba(215, 181, 109, 0.18);
}

.chat-intro {
    max-width: 600px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 500;
    line-height: 1.08;
}

.chat-subtitle,
.trust-line {
    max-width: 560px;
    margin: 10px 0 0;
    line-height: 1.5;
}

.chat-subtitle {
    color: rgba(246, 241, 232, 0.86);
    font-size: 1rem;
}

.trust-line {
    color: #f7df9a;
    font-size: 0.9rem;
}

.status-pill {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(215, 181, 109, 0.42);
    border-radius: 999px;
    color: #f7df9a;
    background: rgba(215, 181, 109, 0.12);
    font-size: 0.82rem;
}

.messages {
    min-height: 170px;
    max-height: clamp(180px, 34vh, 340px);
    padding: 22px 26px;
    overflow-y: auto;
    scrollbar-color: rgba(215, 181, 109, 0.48) rgba(255, 255, 255, 0.05);
}

.message {
    width: fit-content;
    max-width: min(88%, 560px);
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 20px;
    line-height: 1.58;
    white-space: pre-wrap;
}

.message.ai {
    border-top-left-radius: 8px;
    color: #fff8ed;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.message.user {
    margin-left: auto;
    border-top-right-radius: 8px;
    color: #170d24;
    background: linear-gradient(135deg, #f5dc9c, #c79b48);
}

.message.error {
    color: #ffe9e9;
    background: rgba(124, 30, 47, 0.76);
    border: 1px solid rgba(255, 180, 180, 0.25);
}

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

.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 1s infinite ease-in-out;
}

.typing span:nth-child(2) {
    animation-delay: 0.16s;
}

.typing span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes pulse {
    0%,
    80%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.chat-form {
    padding: 18px 20px 22px;
    border-top: 1px solid rgba(215, 181, 109, 0.18);
    background: var(--glass-strong);
}

.input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

textarea,
input[type="email"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

textarea {
    min-height: 54px;
    max-height: 160px;
    padding: 15px 16px;
    resize: vertical;
}

input[type="email"] {
    min-height: 54px;
    padding: 0 16px;
}

textarea::placeholder,
input::placeholder {
    color: rgba(246, 241, 232, 0.58);
}

textarea:focus,
input[type="email"]:focus {
    border-color: rgba(215, 181, 109, 0.72);
    box-shadow: 0 0 0 4px rgba(215, 181, 109, 0.12);
}

.send-button,
.offer-button {
    border: 0;
    border-radius: 999px;
    min-height: 54px;
    padding: 0 22px;
    color: #1a1022;
    font-weight: 800;
    background: linear-gradient(135deg, #f8df9c, var(--gold) 52%, var(--gold-deep));
    box-shadow: 0 12px 28px rgba(169, 129, 53, 0.28);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.send-button:hover,
.offer-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(169, 129, 53, 0.34);
}

.send-button:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.details-step {
    display: grid;
    gap: 12px;
}

.details-step.is-hidden {
    display: none;
}

.privacy-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.privacy-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    margin-top: 1px;
}

.wide {
    width: 100%;
}

.offer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.offer-button {
    min-height: 48px;
    white-space: normal;
}

.offer-block {
    margin-top: 16px;
}

.offer-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: rgba(246, 241, 232, 0.72);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.offer-notice__link {
    font-size: inherit;
}

.dream-topics {
    width: min(100%, 720px);
    margin: 0 auto;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(215, 181, 109, 0.24);
    border-radius: 20px;
    padding: 20px 22px;
    color: rgba(246, 241, 232, 0.82);
    background: rgba(14, 10, 27, 0.58);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
}

.dream-topics h2 {
    margin: 0;
    color: #f7df9a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 4vw, 1.7rem);
    font-weight: 500;
    line-height: 1.2;
}

.dream-topics p {
    margin: 8px 0 0;
    line-height: 1.55;
}

.dream-topic-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 12px;
}

.dream-topic-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 0;
    border-bottom: 1px solid rgba(216, 214, 223, 0.36);
    border-radius: 0;
    padding: 4px 0;
    color: #d8d6df;
    background: transparent;
    font-size: 0.88rem;
    line-height: 1.25;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, text-shadow 0.18s ease;
}

.dream-topic-links a:visited {
    color: #d8d6df;
    border-bottom-color: rgba(216, 214, 223, 0.36);
}

.dream-topic-links a:hover,
.dream-topic-links a:focus-visible {
    color: #f4d98a;
    border-bottom-color: rgba(244, 217, 138, 0.78);
    outline: none;
    text-shadow: 0 0 18px rgba(244, 217, 138, 0.22);
}

.dream-topic-links a:focus-visible {
    outline: 2px solid rgba(244, 217, 138, 0.72);
    outline-offset: 4px;
}

.legal-note {
    width: min(100%, 720px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    align-items: center;
    color: rgba(246, 241, 232, 0.78);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.legal-link {
    all: unset;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: inline-flex;
    align-items: center;
    vertical-align: baseline;
    min-width: 0;
    min-height: 0;
    margin: 0;
    outline: 0;
    border: none !important;
    border-color: transparent !important;
    border-radius: 4px;
    padding: 0 0.35rem;
    color: #d8b85a;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(216, 184, 90, 0.72);
    text-decoration-thickness: 1px;
    text-transform: none;
    text-underline-offset: 4px;
    overflow: visible;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(215, 181, 109, 0.18);
}

button.legal-link {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

button.legal-link::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.legal-link:hover {
    color: #f4d98a;
    text-decoration-color: #f4d98a;
    text-decoration-thickness: 2px;
    text-shadow: 0 0 18px rgba(244, 217, 138, 0.22);
}

.legal-link:focus {
    outline: none;
}

.legal-link:focus-visible {
    color: #f4d98a;
    outline: 2px solid rgba(244, 217, 138, 0.72);
    outline-offset: 4px;
    text-decoration-color: #f4d98a;
    text-decoration-thickness: 2px;
    text-shadow: 0 0 18px rgba(244, 217, 138, 0.22);
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 22px;
}

.legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 4, 12, 0.76);
    backdrop-filter: blur(10px);
}

.legal-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: min(82vh, 720px);
    overflow-y: auto;
    border: 1px solid rgba(215, 181, 109, 0.42);
    border-radius: 24px;
    padding: 30px;
    color: var(--text);
    background: rgba(14, 10, 27, 0.94);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.legal-modal__panel h2 {
    margin: 0 44px 18px 0;
    color: #f7df9a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 500;
}

.legal-modal__panel p {
    margin: 0 0 14px;
    color: rgba(246, 241, 232, 0.84);
    line-height: 1.68;
}

.legal-modal__panel h3 {
    margin: 24px 0 10px;
    color: #f7df9a;
    font-size: 1rem;
    line-height: 1.35;
}

.legal-modal__panel ul {
    margin: 0 0 16px;
    padding-left: 22px;
    color: rgba(246, 241, 232, 0.84);
    line-height: 1.62;
}

.legal-modal__panel li {
    margin: 0 0 7px;
}

.legal-modal__panel p:last-child {
    margin-bottom: 0;
}

.legal-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(215, 181, 109, 0.38);
    border-radius: 50%;
    color: #f7df9a;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
    outline: none;
    color: #1a1022;
    background: var(--gold);
}

body.legal-modal-open {
    overflow: hidden;
}

.article-page-shell {
    width: min(100%, 980px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 20px;
}

.article-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin: 0 0 22px;
    color: rgba(246, 241, 232, 0.76);
    font-size: 0.92rem;
}

.article-brand,
.article-nav a,
.article-content a,
.article-footer a {
    color: #f7df9a;
    text-decoration: underline;
    text-decoration-color: rgba(215, 181, 109, 0.58);
    text-underline-offset: 4px;
}

.article-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    text-decoration: none;
}

.article-nav__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.article-shell {
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--glass);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.article-hero,
.article-content,
.article-footer {
    padding: 30px;
}

.article-hero {
    border-bottom: 1px solid rgba(215, 181, 109, 0.18);
}

.article-hero h1 {
    max-width: 780px;
}

.article-intro {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(246, 241, 232, 0.86);
    font-size: 1.08rem;
    line-height: 1.68;
}

.article-content {
    color: rgba(246, 241, 232, 0.86);
    line-height: 1.72;
}

.article-content h2 {
    margin: 34px 0 12px;
    color: #f7df9a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 500;
    line-height: 1.22;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    margin: 0 0 16px;
}

.article-content ul {
    margin: 0 0 18px;
    padding-left: 22px;
}

.article-content li {
    margin: 0 0 8px;
}

.article-cta-row {
    margin-top: 34px;
    text-align: center;
}

.article-cta {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 24px;
    color: #1a1022;
    background: linear-gradient(135deg, #f8df9c, var(--gold) 52%, var(--gold-deep));
    box-shadow: 0 12px 28px rgba(169, 129, 53, 0.28);
    font-weight: 800;
    text-decoration: none;
}

.article-cta:hover,
.article-cta:focus-visible {
    color: #1a1022;
    outline: none;
    box-shadow: 0 0 0 4px rgba(215, 181, 109, 0.18), 0 16px 36px rgba(169, 129, 53, 0.34);
    transform: translateY(-1px);
}

.article-footer {
    display: grid;
    gap: 12px;
    border-top: 1px solid rgba(215, 181, 109, 0.18);
    color: rgba(246, 241, 232, 0.76);
    font-size: 0.84rem;
    line-height: 1.55;
    text-align: center;
}

.article-footer p {
    margin: 0;
}

.article-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
}

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

.is-hidden {
    display: none;
}

@media (max-width: 680px) {
    body {
        background-attachment: scroll;
    }

    .page-shell {
        min-height: 100svh;
        padding: 14px;
        gap: 12px;
    }

    .chat-panel {
        max-height: none;
        border-radius: 22px;
    }

    .chat-header {
        padding: 20px 18px 14px;
    }

    .chat-subtitle {
        font-size: 0.94rem;
    }

    .trust-line {
        font-size: 0.84rem;
    }

    .status-pill {
        display: none;
    }

    .messages {
        min-height: 150px;
        max-height: 28svh;
        padding: 18px;
    }

    .message {
        max-width: 96%;
        font-size: 0.96rem;
    }

    .chat-form {
        padding: 14px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .send-button {
        width: 100%;
    }

    .offer-actions {
        grid-template-columns: 1fr;
    }

    .dream-topics {
        gap: 12px;
        border-radius: 18px;
        padding: 18px;
    }

    .dream-topic-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dream-topic-links a {
        justify-content: center;
        text-align: center;
    }

    .legal-note {
        font-size: 0.78rem;
    }

    .legal-modal {
        padding: 12px;
        align-items: end;
    }

    .legal-modal__panel {
        max-height: 84svh;
        border-radius: 20px;
        padding: 24px 18px 20px;
    }

    .legal-modal__close {
        top: 12px;
        right: 12px;
    }

    .article-page-shell {
        padding: 14px;
    }

    .article-nav {
        margin-bottom: 12px;
    }

    .article-shell {
        border-radius: 22px;
    }

    .article-hero,
    .article-content,
    .article-footer {
        padding: 22px 18px;
    }

    .article-intro {
        font-size: 0.98rem;
    }
}
