:root {
    --font-body: "Inter", sans-serif;
    --font-display: "Playfair Display", serif;
    --color-plum: #771847;
    --color-plum-dark: #5f1238;
    --color-white: #ffffff;
    --color-ink: #171717;
    --color-muted: #777777;
    --color-soft: #f7f7f7;
    --line: #b45a84;
    --line-soft: #e8c9d8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: transparent;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
}

.newsletter-page {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: 12px 14px 24px;
}

.newsletter-card {
    width: 100%;
    background: transparent;
    padding: 58px 48px 54px;
}

h1 {
    margin: 0;
    color: var(--color-plum);
    font-family: var(--font-display);
    font-size: 31px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0;
}

.title-rule {
    width: 58px;
    height: 3px;
    margin: 17px 0 17px;
    background: var(--color-plum);
}

.intro-text {
    max-width: 500px;
    margin: 0 0 26px;
    color: var(--color-plum);
    font-size: 14px;
    line-height: 1.7;
}

.message {
    display: none;
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid transparent;
    font-size: 13px;
}

.message.is-error {
    display: block;
    border-color: #b73737;
    background: #fff7f7;
    color: #8a1d1d;
}

.message.is-success {
    display: block;
    border-color: var(--line);
    background: #fff9fc;
    color: var(--color-plum);
    text-align: center;
}

.message.is-success strong,
.message.is-success span {
    display: block;
}

.message.is-success strong {
    margin-bottom: 2px;
    color: var(--color-ink);
    font-size: 11px;
    font-weight: 700;
}

.message.is-success span {
    color: var(--color-ink);
    font-size: 10px;
}

.field {
    margin-bottom: 19px;
}

label,
.field-label,
.recaptcha-label {
    display: block;
    margin-bottom: 5px;
    color: #7b7b7b;
    font-size: 12px;
    font-weight: 400;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    height: 33px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--color-white);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 14px;
    outline: 1px solid transparent;
}

input:focus {
    outline-color: var(--color-plum);
}

.topic-select {
    position: relative;
}

.topic-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 33px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: var(--color-white);
    color: var(--color-muted);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.topic-control:focus {
    outline: 1px solid var(--color-plum);
}

.topic-control::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 1px solid var(--color-plum);
    border-bottom: 1px solid var(--color-plum);
    transform: rotate(45deg) translateY(-2px);
}

.topic-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-menu {
    position: absolute;
    z-index: 5;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: none;
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid var(--line);
    background: var(--color-white);
    box-shadow: 0 12px 24px rgba(90, 18, 54, .14);
}

.topic-select.is-open .topic-menu {
    display: block;
}

.topic-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid #f0e0e7;
    background: var(--color-white);
    color: var(--color-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.topic-option:hover,
.topic-option.is-selected {
    background: #fbf0f6;
}

.topic-option::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1px solid var(--line);
    background: var(--color-white);
}

.topic-option.is-selected::before {
    background: var(--color-plum);
    box-shadow: inset 0 0 0 2px var(--color-white);
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 24px;
    margin-top: 8px;
}

.topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-height: 20px;
    padding: 3px 7px;
    background: var(--color-soft);
    color: var(--color-ink);
    font-size: 10px;
    line-height: 1.2;
}

.topic-tag button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-ink);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.topic-empty {
    display: none;
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

.recaptcha-wrap {
    width: fit-content;
    max-width: 100%;
    margin: 26px 0 21px;
}

.recaptcha-frame {
    min-height: 78px;
    overflow: hidden;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 15px;
    color: #202020;
    font-size: 12px;
    line-height: 1.45;
}

.consent-row input {
    width: 14px;
    height: 14px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--color-plum);
}

.privacy-copy {
    margin: 0 0 20px;
    color: #8a8a8a;
    font-size: 10px;
    line-height: 1.55;
}

.actions {
    display: flex;
    justify-content: flex-start;
}

button[type="submit"] {
    min-width: 128px;
    height: 30px;
    padding: 0 20px;
    border: 0;
    border-radius: 4px;
    background: var(--color-plum);
    color: var(--color-white);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
}

button[type="submit"]:hover {
    background: var(--color-plum-dark);
}

button[type="submit"]:disabled {
    cursor: wait;
    opacity: .65;
}

@media (max-width: 640px) {
    .newsletter-page {
        padding: 10px;
    }

    .newsletter-card {
        padding: 34px 22px 38px;
    }

    h1 {
        font-size: 27px;
    }

    input[type="text"],
    input[type="email"],
    .topic-control {
        min-height: 38px;
        font-size: 16px;
    }

    button[type="submit"] {
        width: 100%;
        height: 36px;
    }
}
