:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #101b31;
    --muted: #66758e;
    --line: #dce6f2;
    --primary: #1769ed;
    --primary-dark: #0e55c7;
    --primary-soft: #eaf2ff;
    --yellow: #fff5bd;
    --ring: rgba(23, 105, 237, .18);
    --shadow: 0 22px 55px rgba(19, 43, 76, .10);
    --soft-shadow: 0 12px 32px rgba(19, 43, 76, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(23,105,237,.12), transparent 34rem),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #fff 100%);
    line-height: 1.65;
}
a { color: inherit; }

.hero {
    min-height: 610px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.hero::before {
    width: 420px;
    height: 420px;
    right: -130px;
    top: 120px;
    background: rgba(23, 105, 237, .10);
    filter: blur(4px);
}
.hero::after {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: 20px;
    background: rgba(118, 90, 255, .10);
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 16px 24px;
    backdrop-filter: blur(18px);
}
.topbar::before {
    content: "";
    position: absolute;
    inset: 8px 14px;
    z-index: -1;
    border: 1px solid rgba(220, 230, 242, .82);
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 14px 35px rgba(18, 48, 88, .08);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    font-size: 27px;
    line-height: 1;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links > a {
    padding: 9px 11px;
    border-radius: 999px;
    color: #52627b;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: .18s ease;
}
.nav-links > a:hover {
    color: var(--primary);
    background: var(--primary-soft);
}
.menu-toggle { display: none; }
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}
.nav-login,
.nav-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 0 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: .18s ease;
}
.nav-login {
    color: var(--primary) !important;
    background: #fff;
    border: 1px solid #d4e3f7;
}
.nav-signup {
    color: #fff !important;
    border: 1px solid var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 20px rgba(23,105,237,.22);
}
.nav-login:hover,
.nav-signup:hover,
.btn:hover,
.footer-contact a:hover {
    transform: translateY(-1px);
}
.lang-dropdown {
    position: relative;
}
.lang-dropdown summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 39px;
    min-width: 126px;
    padding: 0 8px 0 12px;
    border: 1px solid #d4e3f7;
    border-radius: 999px;
    background: #fff;
    color: #465875;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.lang-dropdown summary::-webkit-details-marker { display: none; }
.lang-dropdown summary span { color: var(--muted); font-weight: 800; }
.lang-dropdown summary::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background-color: var(--primary-soft);
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.25 7.25L9 11L12.75 7.25' stroke='%231769ed' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    transition: transform .18s ease, background-color .18s ease;
}
.lang-dropdown[open] summary::after {
    transform: rotate(180deg);
    background-color: #dceaff;
}
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 168px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 11px;
    border-radius: 11px;
    color: #465875;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}
.lang-menu a:hover,
.lang-menu a[aria-current="page"] {
    color: var(--primary);
    background: var(--primary-soft);
}
.lang-menu a[aria-current="page"]::after {
    content: "✓";
    font-weight: 900;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1010px;
    margin: 0 auto;
    padding: 108px 24px 120px;
    text-align: center;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 0 0 16px;
    padding: 0 11px;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: var(--primary);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .16em;
    text-transform: uppercase;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1 {
    max-width: 850px;
    margin: 0 auto 20px;
    font-size: clamp(43px, 8vw, 82px);
    line-height: .94;
    letter-spacing: -.06em;
}
.hero-copy {
    max-width: 720px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 19px;
}
.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
    box-shadow: var(--soft-shadow);
    transition: .18s ease;
}
.btn.primary {
    color: #fff;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 30px rgba(23,105,237,.22);
}
.section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 82px 24px;
}
.section.alt {
    max-width: none;
    margin: 0;
    padding-left: max(24px, calc((100vw - 1220px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1220px) / 2 + 24px));
    background: rgba(255,255,255,.78);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.section-heading {
    max-width: 760px;
    margin-bottom: 30px;
}
.section-heading h2 {
    margin-bottom: 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.03;
    letter-spacing: -.045em;
}
.section-heading p:last-child {
    color: var(--muted);
    font-size: 17px;
}
.cards,
.field-grid,
.steps,
.calc-grid {
    display: grid;
    gap: 18px;
}
.cards.three,
.field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-grid { grid-template-columns: 1.15fr .85fr; }
.card,
.calc-card,
.step,
.field-card,
.table-wrap {
    border: 1px solid rgba(220,230,242,.92);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--soft-shadow);
}
.card,
.calc-card,
.field-card { padding: 26px; }
.card,
.calc-card,
.field-card,
.step,
.table-wrap,
.note {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover,
.calc-card:hover,
.field-card:hover,
.step:hover {
    transform: translateY(-2px);
    border-color: #c8daf2;
    box-shadow: var(--shadow);
}
.card h3,
.calc-card h3,
.step h3,
.field-card h3 {
    margin-bottom: 9px;
    font-size: 20px;
    letter-spacing: -.02em;
}
.card p,
.calc-card p,
.step p,
.field-card p {
    color: var(--muted);
}
.small-card { padding: 21px; }
.table-wrap {
    overflow-x: auto;
    background: #fff;
}
table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}
th, td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th {
    background: #f7faff;
    color: #53627b;
    font-size: 12px;
    text-transform: uppercase;
}
td { color: #24314a; }
.step {
    display: flex;
    gap: 16px;
    min-height: 150px;
    padding: 24px;
}
.step span {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 950;
}
.calc-card.wide { grid-row: span 2; }
.formula-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.formula-list p {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    background: #f8fbff;
    color: #24314a;
}
.example {
    padding: 18px;
    border: 1px solid #efd865;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--yellow), #fff9d8);
}
.example h4 { margin-bottom: 8px; }
.example p {
    margin-bottom: 6px;
    color: #3b3518;
    font-weight: 800;
}
.mt { margin-top: 22px; }
.note {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    color: #24314a;
    box-shadow: var(--soft-shadow);
}
.note.blue {
    background: #eef5ff;
    border-color: #cfe0f7;
}
.note.yellow {
    background: #fff7c2;
    border-color: #f1dc72;
}
.footer {
    padding: 34px 24px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border-top: 1px solid var(--line);
}
.footer p { margin: 0; }
.footer a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
}
.footer-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.footer-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f7faff;
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
    transition: .18s ease;
}
.footer-contact a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 1040px) {
    .nav-links > a { display: none; }
    .nav-cta { border-left: 0; }
}
@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        color: var(--text);
        font-weight: 900;
    }
    .nav-links {
        position: absolute;
        top: 72px;
        left: 24px;
        right: 24px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links > a { display: flex; border-radius: 12px; }
    .nav-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-left: 0;
        padding-left: 0;
        gap: 8px;
    }
    .lang-dropdown { grid-column: 1 / -1; }
    .lang-dropdown summary { width: 100%; justify-content: space-between; }
    .lang-menu {
        position: static;
        margin-top: 8px;
        box-shadow: none;
        background: #f8fbff;
    }
    .cards.three,
    .cards.four,
    .field-grid,
    .steps,
    .calc-grid { grid-template-columns: 1fr; }
    .hero-content { padding-top: 76px; }
}
@media (max-width: 520px) {
    .topbar { padding: 14px 16px; }
    .topbar::before { inset: 7px 10px; border-radius: 18px; }
    .brand { font-size: 19px; }
    .brand-mark { width: 34px; height: 34px; font-size: 24px; }
    .hero-content,
    .section,
    .section.alt { padding-left: 16px; padding-right: 16px; }
    .section { padding-top: 58px; padding-bottom: 58px; }
    .hero-content { padding-bottom: 84px; }
    .step { flex-direction: column; }
    .nav-cta { grid-template-columns: 1fr; }
}
