* {
    /* The fallbacks are the scripts Inconsolata cannot draw at all: Devanagari,
       Arabic and CJK. Without them a translated page is a row of boxes, which
       reads as a translation bug and is a font one. System faces rather than
       three more webfonts on a marketing page. */
    font-family: 'Inconsolata', 'Noto Sans Devanagari', 'Nirmala UI',
      'Noto Sans Arabic', 'Geeza Pro', 'Noto Sans SC', 'PingFang SC',
      'Microsoft YaHei', monospace;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding-inline, NOT the `padding` shorthand. A <section class="container">
       is both, and the shorthand resets the section's vertical padding to zero -
       which collapsed every section against the next one's background band. */
    padding-inline: 20px;
}

.hero {
    text-align: center;
    padding: 4rem 0 3rem 0;
    background: #ffffff;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.services li:hover {
    color: #000;
    padding-inline-start: 1rem;
}

.contacts-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.contacts-links a {
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border-radius: 50%;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

.contact-icon {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
    fill: #333;
}

.contacts-links a:hover {
    background: #333;
    border-color: #333;
}

.contacts-links a:hover .contact-icon {
    fill: #ffffff;
}

.footer {
    background: #1a1a1a;
    padding: 0.75rem 0;
    margin-top: 4rem;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    /* A COLUMN, so what follows the contact icons sits under them rather than
       beside them. It held one child for a long time, and the row direction was
       invisible until a second one was added: the legal links came out on the
       same line as the icons, baseline-aligned with circles twice their height
       and clipped by the footer's padding. */
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    text-align: center;
}

.footer .contact-info {
    max-width: 600px;
}

@media (max-width: 768px) {
    /* The frame's height moved onto the iframe, so this sets the same thing in
       the same place the rest of the sheet does. Leaving it on the frame meant
       two elements each claiming a height and the inner one winning. */
    .contacts-links {
        gap: 1.5rem;
    }

    .footer {
        padding: 0.75rem 0;
    }

    .footer-content {
        gap: 0.5rem;
    }
}

/* ---- Site header / sign-in ------------------------------------------- */

.site-header {
    border-bottom: 1px solid #eee;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    /* .container already supplies the horizontal padding and max-width. */
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.site-header__brand img {
    height: 26px;
    width: auto;
}

.site-header__nav {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.15rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--ghost {
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    background: transparent;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    background: #1a1a1a;
    color: #ffffff;
}

@media (max-width: 480px) {
    .site-header__brand span { display: none; }
}


/* Language picker. A row of plain links, so every language is a real URL that
   can be bookmarked or shared - which a scripted <select> is not. */
/* The language picker: one name and a globe, with the other seven behind a
   disclosure. A <details>, so it opens with no script and its contents stay
   real links - see the partial. */
.langswitch {
    position: relative;
    font-size: 0.85rem;
}

.langswitch__summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.75;
    /* The default triangle is drawn differently in every browser and sits on
       the wrong side under dir=rtl. */
    list-style: none;
    white-space: nowrap;
}

/* Safari needs the WebKit pseudo-element named as well as `list-style`. */
.langswitch__summary::-webkit-details-marker { display: none; }

.langswitch__summary:hover,
.langswitch[open] .langswitch__summary {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.langswitch__globe {
    display: flex;
    opacity: 0.8;
}

.langswitch__menu {
    position: absolute;
    /* Logical, so the menu hangs off the correct corner under dir=rtl. */
    inset-inline-end: 0;
    top: calc(100% + 6px);
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 9rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.langswitch__menu li { margin: 0; }

.langswitch__link {
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
}

.langswitch__link:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.langswitch__link.is-current {
    font-weight: 700;
    opacity: 1;
}


/* The MCP section. A setup people copy, so the command has to be readable
   and selectable - monospace, scrollable on a phone rather than wrapped into
   something that breaks when pasted. */
.mcp {
    /* margin-block, NOT the `margin` shorthand. This element is also a
       .container, whose `margin: 0 auto` is what centres it - and the
       shorthand resets those side margins to 0, which pinned the whole
       section to the left edge while every other one stayed centred. */
    margin-block: 3rem;
}

.mcp__steps {
    margin: 1.25rem 0 0;
    padding-inline-start: 1.4rem;
    line-height: 1.8;
}

.mcp__steps li {
    margin-bottom: 1rem;
}

.mcp__code {
    margin: 0.5rem 0 0;
    padding: 0.85rem 1rem;
    background: #1a1a1a;
    color: #e8e4dc;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    /* Preserved, not wrapped: a wrapped shell command is one that breaks when
       somebody pastes it. */
    white-space: pre;
}

.mcp__note {
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.9rem;
}


/* ---------------------------------------------------------------------------
   The page below the hero.
   
   One rhythm throughout: a section is either on white or on the warm band,
   alternating, with the same vertical padding and the same heading size. The
   old page had each section inventing its own, which is most of why it read as
   a list of fragments rather than a page.
   --------------------------------------------------------------------------- */

section {
    padding: 4rem 0;
}

/* The alternating band. Warm rather than grey, to match the product's own
   paper colour - the dashboard and the chat page are both #f5f2ec. */
.band {
    background: #f8f6f1;
    border-block: 1px solid #efeae1;
}

h2 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 1rem;
    text-align: center;
}

h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

/* A sentence under a heading, centred and narrow enough to read. */
.lede {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
}

.note {
    max-width: 640px;
    margin: 1rem auto 0;
    text-align: center;
    color: #777;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
    text-align: center;
    padding: 5rem 0 4rem;
}

.hero__sub {
    max-width: 620px;
    margin: 0 auto 2rem;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #555;
}

.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__note {
    margin-top: 1rem;
    color: #888;
    font-size: 0.88rem;
}

/* --- buttons ------------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: 1px solid #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn--primary {
    background: #1a1a1a;
    color: #ffffff;
}

.btn--primary:hover {
    background: #000000;
}

.btn--ghost {
    background: transparent;
    color: #1a1a1a;
}

.btn--ghost:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.btn--block {
    display: block;
    text-align: center;
    margin-top: auto;
}

/* --- how it works -------------------------------------------------------- */

.steps {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.step__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #1a1a1a;
    border-radius: 50%;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.step p {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

/* --- feature grid -------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.card {
    padding: 1.6rem;
    border: 1px solid #e6e0d6;
    background: #ffffff;
}

.card p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- pricing ------------------------------------------------------------- */

.plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.4rem;
    border: 1px solid #e6e0d6;
    background: #ffffff;
}

/* One tier marked, because a price list with nothing suggested makes the
   reader do the comparing. Beginner, since it is the first one with a
   language model - which is the thing most people are here for. */
.plan--pick {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

.plan__price {
    font-size: 2rem;
    font-weight: 300;
    color: #1a1a1a;
    margin: 0.4rem 0 0.2rem;
    line-height: 1.1;
}

.plan__per {
    display: block;
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
    letter-spacing: 0;
    margin-top: 0.3rem;
}

.plan__for {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.6rem 0 1rem;
    min-height: 3.2rem;
}

.plan__list {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.9;
    color: #444;
    flex-grow: 1;
}

.plan__list li::before {
    content: "— ";
    color: #aaa;
}

/* What a plan does NOT have, said plainly. A price list that only lists
   what is included makes somebody discover the gap after paying. */
.plan__not {
    color: #999;
}

/* --- demo ---------------------------------------------------------------- */

.chatbot-frame {
    max-width: 760px;
    margin: 0 auto;
    border: 1px solid #e6e0d6;
    background: #ffffff;
}

.chatbot-iframe {
    display: block;
    width: 100%;
    height: 560px;
    border: 0;
}

/* --- closing ------------------------------------------------------------- */

.closing {
    text-align: center;
}

.closing__contact {
    margin-top: 2.5rem;
    color: #666;
    font-size: 0.92rem;
    line-height: 1.8;
}

.inline-link {
    color: #6b5b47;
}

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 900px) {
    .plans { grid-template-columns: repeat(2, 1fr); }
    .grid  { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; gap: 2rem; }
    .plan__for { min-height: 0; }
}

@media (max-width: 620px) {
    section { padding: 3rem 0; }
    .hero { padding: 3.5rem 0 2.5rem; }
    .hero h1 { font-size: 2.2rem; }
    .plans, .grid { grid-template-columns: 1fr; }
    h2 { font-size: 1.8rem; }
    /* The CALLS TO ACTION go full width, not every button on the page - the
       header's sign-in link is a .btn too, and stretching it pushed the brand
       onto a row of its own. */
    .hero__actions .btn,
    .plan .btn,
    .closing .btn { width: 100%; text-align: center; }
    .chatbot-iframe { height: 460px; }
}


/* The header on a narrow screen.
   
   Eight language names wedged between the brand and the sign-in button is the
   first thing a visitor sees on a phone, and it reads as clutter rather than
   as a choice. Two rows instead: who we are and the way in, then the languages
   underneath, quieter. */
@media (max-width: 760px) {
    .site-header__inner {
        flex-wrap: wrap;
        row-gap: 0.6rem;
    }

    /* The picker and the sign-in button are BOTH inside the nav, so the wrap
       has to happen there - moving the nav itself takes the button with it and
       leaves the brand alone on the first row. */
    .site-header__nav {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 0.55rem;
        /* Shares the brand's row and takes what is left of it. Without this
           the nav is as wide as the language list wants to be, so the whole
           thing wraps and the brand sits alone on a line of its own. */
        /* basis 0, not auto: with `auto` the nav's base size is its content
           width, which the full-width language row makes large enough to force
           a wrap - and then the brand sits alone on a line. */
        flex: 1 1 0;
        min-width: 0;
    }

    .langswitch {
        /* It is one short control now rather than a row of eight names, so it
           stays on the brand's line next to the sign-in button instead of
           being given a row of its own. */
        font-size: 0.78rem;
    }

    .langswitch__current {
        /* The globe carries the meaning at this width; the name is what runs
           out of room first. */
        display: none;
    }
}

/* ---- Footer: legal links ---------------------------------------------- */

.footer-legal {
    display: flex;
    justify-content: center;
    align-items: baseline;
    /* Wraps, because this row is not a fixed length: English has two links,
       the Russian site has four and each name is about twice as long, so the
       bar ran off the side of the phone and "Контакты" was half a word. The
       links break onto their own lines instead. */
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    /* No margin: `.footer-content` is a column with a gap, and a margin here
       would be added to it rather than replacing it. */
    font-size: 0.85rem;
    /* Descenders in "Privacy Policy" reached the edge of the footer's own
       padding. Its own line-height rather than the body's keeps them inside. */
    line-height: 1.5;
}

.footer-legal a {
    /* The footer is near-black, so the inherited link colour is unreadable on
       it. Dimmed rather than white: these are links somebody looks for, not
       links the page is steering them towards. */
    color: #bdbdbd;
    text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.footer-legal span {
    color: #6e6e6e;
}

/* The seller's name and ИНН, quieter than the links above them: required to be
   present, not required to be read. */
.footer-requisites {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #8a8a8a;
    text-align: center;
}

/* ---- Legal pages ------------------------------------------------------ */

.legal {
    /* The header is sticky, so a page that starts at the very top starts
       underneath it. */
    padding-top: 2rem;
}

.legal__body {
    max-width: 48rem;
    /* Prose, not a landing section: a measure wide enough to read and no
       wider. */
    line-height: 1.65;
}

.legal__body h1 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.legal__body h2 {
    margin-top: 2.2rem;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

.legal__body ul {
    padding-inline-start: 1.4rem;
}

.legal__body li {
    margin-bottom: 0.35rem;
}

.legal__back {
    margin-top: 3rem;
}
