:root {
    --bg: #edf5f8;
    --surface: rgba(255, 255, 255, 0.86);
    --text: #112230;
    --muted: #5d7482;
    --line: rgba(17, 34, 48, 0.12);
    --brand: #812a90;
    --brand-dark: #63206f;
    --accent: #6ec9d6;
    --ok: #812a90;
    --shadow: 0 24px 60px rgba(12, 34, 48, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
        linear-gradient(180deg, #f8fcfd 0%, var(--bg) 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.header-topbar {
    background: #351055;
    color: #fff;
}

.header-topbar__inner,
.header-mainbar__inner {
    width: min(1280px, calc(100vw - 32px));
    margin: 0 auto;
}

.header-topbar__inner {
    min-height: 42px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.header-contact-list,
.header-contact-item,
.header-lang-switcher {
    display: flex;
    align-items: center;
}

.header-contact-list {
    gap: 14px;
    flex-wrap: wrap;
}

.header-contact-item {
    gap: 7px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.header-contact-icon {
    color: #ffcd37;
    font-size: 14px;
}

.header-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.35);
}

.header-lang-switcher {
    position: relative;
    gap: 6px;
}

.header-right-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-divider--social {
    margin-left: 4px;
    margin-right: 2px;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.header-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.95;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-social-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.header-social-link svg {
    width: 18px;
    height: 18px;
    display: block;
}

.lang-dropdown-toggle {
    border: 0;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    min-width: 76px;
    height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.lang-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-code {
    letter-spacing: 0.03em;
}

.lang-caret {
    font-size: 11px;
    opacity: 0.9;
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 188px;
    padding: 8px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(17, 34, 48, 0.1);
    box-shadow: 0 18px 40px rgba(17, 34, 48, 0.22);
}

.lang-dropdown-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #263341;
    min-height: 42px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.lang-dropdown-item:hover,
.lang-dropdown-item.is-active {
    background: rgba(129, 42, 144, 0.1);
    color: #722a94;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    line-height: 1;
}

.lang-flag img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(17, 34, 48, 0.12);
}

.header-mainbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(17, 34, 48, 0.08);
    box-shadow: 0 10px 30px rgba(17, 34, 48, 0.08);
}

.header-mainbar__inner {
    min-height: 108px;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    align-items: center;
    gap: 16px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.site-logo img {
    width: 124px;
    height: auto;
    display: block;
}

.site-demo-alert {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.header-title-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-title {
    font-family: "Archivo", "Segoe UI", Tahoma, sans-serif;
    font-size: 31px;
    line-height: 1.1;
    font-weight: 800;
    color: #263341;
    text-align: center;
}

.header-home-btn {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8d33a2 0%, #722a94 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(129, 42, 144, 0.24);
}

button, input, select, textarea { font: inherit; }

.page {
    width: min(1200px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
}

.hero-grid,
.main-grid,
.grid-2 {
    display: grid;
    gap: 18px;
}

.pill,
.tag,
.summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.pill {
    background: rgba(255,255,255,0.12);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.choice strong,
.choice small {
    display: block;
}

.main-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.simulator-card { padding: 18px; }
.summary-card { position: sticky; top: 154px; padding: 18px; }

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

.section-head h2,
.summary-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.section-head p,
.summary-card > p,
.block p,
.muted,
.note,
.footer {
    color: var(--muted);
    line-height: 1.6;
}

.tag {
    background: rgba(14, 116, 144, 0.08);
    color: var(--ok);
    white-space: nowrap;
}

.stack { display: grid; gap: 12px; }

.block {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--line);
}

.block h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #812a90;
}

.block p { margin: 0 0 10px; }

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }

.field {
    display: grid;
    gap: 6px;
}

.label {
    font-size: 14px;
    font-weight: 800;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.95);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.textarea {
    min-height: 96px;
    resize: vertical;
}

.block-base-rate {
    padding-bottom: 12px;
}

.base-rate-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.base-rate-row h3 {
    margin: 0;
}

.base-rate-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2f6fd 0%, #ebfaff 100%);
    color: #3d00b7;
    font-weight: 900;
}

.block-tight {
    padding-top: 12px;
    padding-bottom: 12px;
}

.unified-group {
    padding: 0;
    overflow: hidden;
}

.unified-section {
    padding: 18px;
}

.unified-section + .unified-section {
    border-top: 1px solid rgba(17, 34, 48, 0.08);
}

.unified-section h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #812a90;
}

.unified-section p {
    margin: 0 0 12px;
}

.microcopy {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(14, 116, 144, 0.46);
    box-shadow: 0 0 0 5px rgba(14, 116, 144, 0.08);
    transform: translateY(-1px);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: rgba(185, 28, 28, 0.35);
    background: rgba(254, 242, 242, 0.92);
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.06);
}

.choice-grid.is-invalid {
    padding: 10px;
    border-radius: 18px;
    background: rgba(254, 242, 242, 0.72);
    box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.18);
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.grid-2 .select {
    min-height: 46px;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.94);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.choice:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(17, 34, 48, 0.08);
}

.choice.active {
    border-color: rgba(15, 118, 110, 0.4);
    background: rgba(15, 118, 110, 0.08);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.1);
}

.choice input { margin-top: 4px; }
.choice strong { margin-bottom: 4px; font-size: 14px; }
.choice small { color: var(--muted); line-height: 1.45; }

.multiselect {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.94);
}

.multiselect-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 16px;
    text-align: left;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text);
}

.multiselect-options {
    display: none;
    padding: 0 12px 12px;
    gap: 10px;
}

.multiselect.open .multiselect-options { display: grid; }

.selected-list {
    margin: 8px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.summary-badge {
    background: rgba(14, 116, 144, 0.1);
    color: var(--ok);
}

.summary-lines {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.summary-line,
.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: 14px;
}

.summary-line span:first-child { color: var(--muted); }
.summary-line span:last-child { text-align: right; font-weight: 700; }

.divider {
    height: 1px;
    background: var(--line);
    margin: 10px 0;
}

.summary-total {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(129, 42, 144, 0.08), rgba(110, 201, 214, 0.14));
    border: 1px solid rgba(129, 42, 144, 0.14);
    display: grid;
    gap: 10px;
}

.summary-total-row strong:last-child { font-size: 24px; }

.terms {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.84);
}

.terms.alert {
    border-color: rgba(185, 28, 28, 0.35);
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.06);
}

.terms label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.55;
}

.terms-link-wrap {
    margin-top: 12px;
    text-align: center;
}

.terms-link {
    color: #812a90;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

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

.actions {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    box-shadow: 0 14px 28px rgba(129, 42, 144, 0.24);
}

.btn-outline {
    background: transparent;
    color: var(--ok);
    border: 1px solid rgba(14, 116, 144, 0.22);
}

.btn-soft {
    background: rgba(17, 34, 48, 0.06);
    color: var(--text);
}

.note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px dashed rgba(17, 34, 48, 0.18);
    background: rgba(255,255,255,0.8);
    font-size: 14px;
}

.footer {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
}

.status-shell {
    max-width: 760px;
    margin: 0 auto;
}

.status-card {
    overflow: hidden;
}

.status-hero {
    padding: 26px 28px;
    color: #2b1f35;
    background: #ffffff;
    border-top: 8px solid #812a90;
}

.status-hero h1 {
    margin: 0 0 8px;
    font-size: 32px;
    color: #812a90;
}

.status-hero p {
    margin: 0;
    color: #5b4766;
}

.status-body {
    padding: 24px 28px 26px;
    background: rgba(255,255,255,0.94);
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

@media (max-width: 980px) {
    .header-topbar__inner {
        padding: 8px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-mainbar__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 14px 0 18px;
        min-height: auto;
    }

    .header-title {
        font-size: 25px;
    }

    .site-logo img {
        width: 108px;
    }

    .header-home-btn {
        justify-self: center;
        min-height: 48px;
    }

    .header-socials {
        margin-left: 0;
    }

    .header-right-tools {
        margin-left: 0;
    }

    .main-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .header-topbar__inner,
    .header-mainbar__inner,
    .page {
        width: min(100vw - 20px, 1280px);
    }

    .header-topbar__inner {
        justify-content: center;
    }

    .header-contact-list {
        justify-content: center;
    }

    .header-divider {
        display: none;
    }

    .page {
        padding-top: 8px;
    }

    .simulator-card,
    .summary-card {
        padding: 16px;
        border-radius: 24px;
    }

    .section-head {
        flex-direction: column;
    }

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