/* recipe-engine stylesheet — generated from recipe `CodeCanvas — Чёрный и алый` */

:root {
    --re-primary:      #c671c7;
    --re-primary-mid:  #b84db9;
    --re-on-primary:   #0a0a0a;
    --re-accent-text:  #ddacde;
    /* Варианты тех же токенов для тёмных областей — подвал и тёмный hero
       ссылаются на них, см. ниже. */
    --re-accent-on-dark:  #ddacde;
    --re-text-mid-on-dark: #b8acb8;
    --re-accent:       #d184b2;
    --re-accent-soft:  #4a3642;
    --re-bg:           #333a41;
    --re-bg-alt:       #3b434b;
    --re-text:         #ebe8eb;
    --re-text-mid:     #b8acb8;
    --re-surface:      #303840;
    --re-surface-dark: #2a3035;
    --re-radius-sm:    2px;
    --re-radius-md:    4px;
    --re-radius-lg:    6px;
    --re-radius-pill:  999px;
    --re-font-heading: 'DM Serif Display', system-ui, -apple-system, sans-serif;
    --re-font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
    --re-heading-weight: 900;
    --re-heading-letter: -0.03em;
}

/* Подвал переопределяет «текстовые» токены под свой тёмный фон.
   Он всегда залит --re-surface-dark и остаётся тёмным даже на светлом
   сайте, а одним значением обе среды не покрыть: цвет, затемнённый до
   читаемости на почти белом фоне, на почти чёрном подвале давал 1.6:1.
   Правила внутри об этом не знают — переменная каскадится сама.

   `.re-hero` сюда НЕ входит: по умолчанию он прозрачный и лежит на фоне
   страницы. Я сначала включил его в этот список и получил обратный
   эффект — на светлом сайте надзаголовок первого экрана стал 2.8:1.
   Тёмным hero бывает только в одном варианте, там токены переопределяются
   в самом правиле этого варианта. */
.re-footer {
    --re-accent-text: #ddacde;
    --re-text-mid:    #b8acb8;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}
body {
    margin: 0;
    font-family: var(--re-font-body);
    color: var(--re-text);
    background: var(--re-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    max-width: 100vw;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--re-accent-text); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--re-font-heading);
    font-weight: var(--re-heading-weight);
    letter-spacing: var(--re-heading-letter);
    margin: 0 0 18px;
    color: var(--re-text);
    line-height: 1.18;
}
h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); }
p { margin: 0 0 16px; color: var(--re-text-mid); }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 6px; }

body::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
    opacity: 0.35; mix-blend-mode: overlay;
}
body > * { position: relative; z-index: 1; }

.re-header {
    background: var(--re-bg);
    border-bottom: 1px solid color-mix(in srgb, var(--re-text) 8%, transparent);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(8px);
}
.re-header__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.re-brand {
    font-family: var(--re-font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--re-text);
    text-decoration: none;
}
.re-brand:hover { text-decoration: none; }
.re-nav { display: flex; gap: 28px; align-items: center; flex-shrink: 0; white-space: nowrap; }
.re-nav a {
    color: var(--re-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.re-nav a:hover { color: var(--re-accent-text); border-bottom-color: var(--re-primary); text-decoration: none; }
.re-nav a.is-active { color: var(--re-accent-text); border-bottom-color: var(--re-primary); }
@media (max-width: 860px) {
    .re-nav { display: none; }
}

.re-hero {
    position: relative;
    padding: 80px 0 96px;
    overflow: hidden;
}
.re-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}
.re-hero__eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--re-accent-text);
    margin: 0 0 18px;
}
.re-hero__title {
    font-family: var(--re-font-heading);
    font-size: clamp(2.2rem, 4.2vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: var(--re-heading-letter, -0.02em);
    font-weight: var(--re-heading-weight, 800);
    margin: 0 0 22px;
    color: var(--re-text);
}
.re-hero__subtitle {
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--re-text-mid);
    margin: 0 0 32px;
    max-width: 540px;
}
.re-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.re-hero__media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--re-radius-lg);
}

.re-hero__inner { max-width: 1080px; }
.re-hero__title {
    font-size: clamp(2.6rem, 5.5vw, 5.2rem);
    letter-spacing: -0.035em;
    line-height: 1.02;
    max-width: 900px;
}
.re-hero__media { margin-top: 56px; }
.re-hero__media img { border-radius: var(--re-radius-lg); }

.re-section { padding: 80px 0; position: relative; }
.re-section--alt { background: var(--re-bg-alt); }
.re-section__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.re-section__header { text-align: center; margin-bottom: 56px; max-width: 720px; margin-left: auto; margin-right: auto; }
.re-section__eyebrow {
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.12em; font-weight: 700;
    color: var(--re-accent-text); margin: 0 0 14px;
}
.re-section__title { margin: 0 0 14px; }
.re-section__subtitle { font-size: 1.05rem; color: var(--re-text-mid); margin: 0; }

.re-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}
.re-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
}
.re-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
}
.re-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 860px) {
    .re-split { grid-template-columns: 1fr; }
}

.re-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--re-font-heading);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .22s ease, color .22s ease, transform .18s ease, border-color .22s ease, box-shadow .22s ease, letter-spacing .22s ease;
    width: auto;
    max-width: max-content;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    isolation: isolate;
}
.re-btn:active { transform: translateY(1px) scale(0.99); }

.re-btn--primary {
    background: var(--re-primary); color: var(--re-on-primary);
    padding: 16px 32px; border: 0;
    border-radius: 2px;
    font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.re-btn--primary:hover {
    background: var(--re-primary-mid);
    letter-spacing: 0.14em;
}
.re-btn--ghost {
    background: transparent; color: var(--re-text);
    padding: 14px 28px; border: 2px solid var(--re-primary);
    border-radius: 2px;
    font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.re-btn--ghost:hover {
    background: var(--re-primary); color: var(--re-on-primary);
    letter-spacing: 0.14em;
}

/* Readable body/heading colors on every card motif (except dark_panel
   which inverts). Force high-contrast so dark-theme recipes don't drop
   to a low-contrast text-mid that blends into tinted card backgrounds. */
.re-card h3,
.re-card h4,
.re-card .re-pricing-card__head h3 {
    color: var(--re-text);
}
.re-card p,
.re-card li,
.re-card ul li,
.re-card .re-role {
    color: var(--re-text) !important;
    opacity: 0.88;
}
.re-card li::before,
.re-card .re-stars {
    color: var(--re-accent-text) !important;
    opacity: 1;
}
/* Role/meta labels need to stay readable on dark panels */
.re-team-card .re-role,
.re-review-card .re-role,
.re-review-card .re-author,
.re-pricing-card .re-price {
    color: var(--re-text) !important;
    opacity: 0.95;
}
/* Force primary accent for numbering so it pops on both themes */
.re-card .re-num {
    color: var(--re-accent-text) !important;
    opacity: 1;
}

.re-card {
    background: color-mix(in srgb, var(--re-text) 4%, var(--re-bg));
    border-radius: 4px;
    padding: 28px;
    border: 2px solid color-mix(in srgb, var(--re-primary) 50%, transparent);
}
.re-card:hover { border-color: var(--re-primary); }

.re-section { padding: 112px 0; }

/* FAQ */
.re-faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.re-faq-item {
    background: var(--re-surface);
    border: 1px solid color-mix(in srgb, var(--re-text) 12%, transparent);
    border-radius: var(--re-radius-md);
    padding: 20px 26px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.re-faq-item[open] { border-color: var(--re-primary); }
.re-faq-item:hover { border-color: var(--re-primary); background: color-mix(in srgb, var(--re-accent-soft) 40%, var(--re-surface)); }
.re-faq-item summary {
    cursor: pointer; font-weight: 700;
    font-size: 1.1rem; color: var(--re-text);
    font-family: var(--re-font-heading);
    list-style: none; position: relative; padding-right: 36px;
}
.re-faq-item summary::-webkit-details-marker { display: none; }
.re-faq-item summary::after {
    content: "+"; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px; font-size: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--re-accent-text); background: color-mix(in srgb, var(--re-primary) 14%, transparent);
    border-radius: 50%; transition: background .15s ease;
}
/* Не #ffffff: на светлом акценте (жёлтый, мятный, песочный) белый давал
   1.5:1. --re-on-primary считается от яркости акцента. */
.re-faq-item[open] summary::after { content: "−"; background: var(--re-primary); color: var(--re-on-primary); }
.re-faq-item p { margin: 14px 0 0; color: var(--re-text-mid); }

/* FAQ — row variant (accordion_plus): no box, just border-top dividers, big +/- marker on the right */
.re-faq-row { border-top: 2px solid color-mix(in srgb, var(--re-text) 12%, transparent); padding: 0; }
.re-faq-row summary {
    cursor: pointer; padding: 22px 36px 22px 0;
    font-weight: 700; font-size: 1.1rem; color: var(--re-text);
    font-family: var(--re-font-heading);
    list-style: none; position: relative;
}
.re-faq-row summary::-webkit-details-marker { display: none; }
.re-faq-row summary::marker { content: ""; }
.re-faq-row summary::after {
    content: "+"; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    color: var(--re-accent-text); font-size: 1.8rem;
    font-weight: 300; line-height: 1;
}
.re-faq-row[open] summary::after { content: "−"; }
.re-faq-row p { margin: 0; padding: 0 0 20px; opacity: 0.85; color: var(--re-text-mid); }

/* Team */
.re-team-card { text-align: center; }
.re-team-card img {
    width: 150px; height: 150px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 16px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.re-team-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.re-team-card .re-role {
    color: var(--re-accent-text);
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.08em; font-weight: 700;
    margin: 0 0 12px;
}
.re-team-card p { font-size: 0.95rem; color: var(--re-text-mid); }

/* Timeline */
.re-timeline { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; position: relative; padding-left: 34px; }
.re-timeline::before {
    content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px;
    width: 2px; background: color-mix(in srgb, var(--re-primary) 25%, transparent);
}
.re-timeline-item {
    position: relative; padding: 18px 22px;
    background: var(--re-surface);
    border: 1px solid color-mix(in srgb, var(--re-text) 8%, transparent);
    border-radius: var(--re-radius-md);
}
.re-timeline-item::before {
    content: ""; position: absolute; left: -25px; top: 22px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--re-primary);
    border: 3px solid var(--re-bg);
}
.re-timeline-item .re-date {
    color: var(--re-accent-text); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 700; margin-bottom: 6px;
}
.re-timeline-item h3 { margin: 0 0 6px; font-size: 1.1rem; }

/* Pricing */
.re-pricing-card { display: flex; flex-direction: column; height: 100%; }
.re-pricing-card--featured {
    border-color: var(--re-primary) !important;
    box-shadow: 0 14px 40px color-mix(in srgb, var(--re-primary) 18%, transparent);
    transform: scale(1.03);
}
.re-pricing-card__head h3 { margin: 0 0 6px; font-size: 1.15rem; }
.re-pricing-card .re-price {
    font-family: var(--re-font-heading);
    font-weight: 800; font-size: 2.3rem;
    color: var(--re-accent-text); margin-bottom: 18px;
    letter-spacing: -0.02em;
}
.re-pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.re-pricing-card li { position: relative; padding-left: 22px; color: var(--re-text-mid); }
.re-pricing-card li::before {
    content: "✓"; position: absolute; left: 0;
    color: var(--re-accent-text); font-weight: 800;
}

/* Reviews */
.re-review-card .re-stars {
    color: var(--re-accent-text);
    font-size: 1.1rem; letter-spacing: 2px;
    margin-bottom: 14px;
}
.re-review-card p { font-size: 1rem; color: var(--re-text); margin: 0 0 18px; font-style: italic; }
.re-review-card .re-author { font-weight: 700; margin: 0 0 2px; }
.re-review-card .re-role {
    color: var(--re-accent-text); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 700; margin: 0;
}

/* Stats */
.re-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    padding: 40px 28px;
    background: var(--re-primary);
    /* см. выше: белый поверх акцента читается только если акцент тёмный */
    color: var(--re-on-primary);
    border-radius: var(--re-radius-lg);
    text-align: center;
}
.re-stat__num {
    font-family: var(--re-font-heading);
    font-size: 2.8rem; font-weight: 800; line-height: 1;
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 4px;
}
.re-stat__label {
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.08em; opacity: 0.85;
}

/* Articles grid */
.re-article {
    background: var(--re-surface);
    border-radius: var(--re-radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform .15s ease, box-shadow .15s ease;
    border: 1px solid color-mix(in srgb, var(--re-text) 6%, transparent);
}
.re-article:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); }
.re-article img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; }
.re-article__body { padding: 22px 24px; display: flex; flex-direction: column; flex: 1; }
.re-article__date {
    color: var(--re-accent-text);
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.08em; font-weight: 700;
    margin: 0 0 10px;
}
.re-article h3 { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.35; }
.re-article h3 a { color: inherit; }
.re-article h3 a:hover { color: var(--re-accent-text); text-decoration: none; }
.re-article p { font-size: 0.95rem; margin: 0 0 14px; flex: 1; }
.re-article__link { color: var(--re-accent-text); font-weight: 700; font-size: 0.92rem; }

/* Sources */
.re-source-card { border-left: 3px solid var(--re-primary); background: var(--re-surface); padding: 22px 26px; border-radius: var(--re-radius-sm); }
.re-source-card h3 { margin: 0 0 14px; font-size: 1.05rem; }
.re-source-card ul { list-style: none; margin: 0; padding: 0; }
.re-source-card li { color: var(--re-text-mid); padding-left: 18px; position: relative; margin-bottom: 8px; }
.re-source-card li::before { content: "→"; position: absolute; left: 0; color: var(--re-accent-text); }

/* Values / feature cards with numbers */
.re-value-card { padding: 26px; }
.re-value-card .re-num {
    display: block; font-family: var(--re-font-heading);
    font-size: 1.8rem; font-weight: 800;
    color: var(--re-accent-text); margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.re-value-card h3 { margin: 0 0 8px; font-size: 1.15rem; }

/* Newsletter + CTA — mix primary into bg (not accent-soft) so contrast
   with --re-text is reliable on both dark and light themes. Previously
   accent-soft was a near-white tint which collided with light text on
   dark-theme recipes, making the headline invisible. */
.re-cta-box {
    text-align: center;
    max-width: 720px; margin: 0 auto;
    padding: 48px 36px;
    background: color-mix(in srgb, var(--re-primary) 10%, var(--re-bg));
    border-radius: var(--re-radius-lg);
    border: 1px solid color-mix(in srgb, var(--re-primary) 28%, transparent);
}
.re-cta-box h2,
.re-cta-box p {
    color: var(--re-text) !important;
}
.re-cta-box h2 { margin: 0 0 12px; }
.re-cta-box p { margin: 0 0 24px; opacity: 0.85; }
.re-cta-box .re-btn { margin: 0 auto; }

/* Contact form */
.re-form { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.re-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .re-form-row { grid-template-columns: 1fr; } }
.re-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--re-text); }
.re-form input, .re-form textarea {
    font: inherit; font-family: var(--re-font-body);
    padding: 12px 14px;
    background: var(--re-surface);
    border: 1px solid color-mix(in srgb, var(--re-text) 20%, transparent);
    border-radius: var(--re-radius-md);
    color: var(--re-text);
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
.re-form input:focus, .re-form textarea:focus {
    outline: none;
    border-color: var(--re-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 18%, transparent);
}
.re-form textarea { min-height: 140px; resize: vertical; }
.re-form__note { font-size: 0.85rem; color: var(--re-text-mid); margin: 0; }

/* Consent row — overrides `.re-form label { flex-direction: column }` so
   the checkbox sits to the LEFT of the privacy note (not above it). Custom
   checkbox styling (appearance:none + theme-aware fill + drawn checkmark)
   makes the box feel intentional instead of looking like a stray native
   widget. The attribute selector on `name="consent"` also targets future
   forms where someone forgets the `.re-form__consent` class. */
.re-form__consent {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 400 !important;
    line-height: 1.5;
    color: color-mix(in srgb, var(--re-text) 72%, transparent) !important;
    cursor: pointer;
    padding: 4px 0 0;
}
.re-form__consent input[type="checkbox"],
.re-form input[type="checkbox"][name="consent"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    flex-shrink: 0;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    background: var(--re-surface);
    border: 1.5px solid color-mix(in srgb, var(--re-text) 32%, transparent);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.re-form__consent input[type="checkbox"]:hover,
.re-form input[type="checkbox"][name="consent"]:hover {
    border-color: var(--re-primary);
}
.re-form__consent input[type="checkbox"]:checked,
.re-form input[type="checkbox"][name="consent"]:checked {
    background: var(--re-primary);
    border-color: var(--re-primary);
}
.re-form__consent input[type="checkbox"]:checked::after,
.re-form input[type="checkbox"][name="consent"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--re-bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.re-form__consent input[type="checkbox"]:focus-visible,
.re-form input[type="checkbox"][name="consent"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 25%, transparent);
}
.re-form__consent > span { flex: 1; }

/* Contact info cards. Colors use !important because `.re-f a` (footer base)
   has equal specificity (0,1,1) and comes later in the cascade — without
   !important the footer's 80% white rule hides the card text on light
   footer variants. */
.re-contact-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 22px 24px;
    background: var(--re-bg) !important;
    border: 1px solid color-mix(in srgb, var(--re-text) 14%, transparent);
    border-radius: var(--re-radius-md);
    color: var(--re-text) !important;
}
.re-contact-card__label {
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.08em; font-weight: 700;
    color: var(--re-accent-text) !important;
    opacity: 1 !important;
}
/* Long email/phone tokens (info@bramleyfie11ld.mobi) overflow narrow
   viewports without explicit wrap — set overflow-wrap so they break inside
   the card instead of pushing the page wider than the screen. */
.re-contact-card__value { color: var(--re-text) !important; font-weight: 600; opacity: 1 !important; overflow-wrap: anywhere; word-break: break-word; }
.re-contact-card a { color: var(--re-text) !important; font-weight: 600; opacity: 1 !important; text-decoration: none; overflow-wrap: anywhere; word-break: break-word; }
.re-contact-card a:hover { color: var(--re-accent-text) !important; text-decoration: underline; }

/* Legal block in footer. Structural only — colors INHERIT from the footer
   default (`.re-footer h4` = #fff, `.re-footer a` = 80% white), which is the
   right contrast on the dark default background. Forcing `var(--re-text)` here
   was the bug: dark text on the dark footer → invisible. Light-background
   variants (signup_wide) and the dark-inverted variant get scoped overrides
   further down. */
.re-legal-col { display: flex; flex-direction: column; }
.re-legal-col__heading {
    opacity: 0.88;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 14px;
    font-family: var(--re-font-heading, inherit);
}
.re-legal-col__list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.re-legal-item a {
    display: inline-flex; align-items: center; gap: 10px;
    opacity: 0.88;
    font-size: 0.92rem;
    text-decoration: none;
    transition: color .15s ease, opacity .15s ease;
}
.re-legal-item a:hover { opacity: 1; }
.re-legal-item a span { flex: 1; }
/* Icon color is set to primary so it stays visible on both dark AND light
   footer variants — the surrounding text inherits the footer default. */
.re-legal-item__icon { flex-shrink: 0; color: var(--re-accent-text); opacity: 0.95; }
.re-legal-item a:hover .re-legal-item__icon { opacity: 1; }

/* Footer nav column heading + inline link groups inherit `.re-footer h4`
   (#fff) and `.re-footer a` (80% white) respectively — just tune opacity and
   typographic scale here. */
.re-footer__h {
    opacity: 0.88;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 14px;
    font-family: var(--re-font-heading, inherit);
}
.re-footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.re-footer__links a { opacity: 0.88; text-decoration: none; transition: opacity .15s ease; }
.re-footer__links a:hover { opacity: 1; }
.re-footer__navitem { line-height: 1.6; }

/* Light-background footer variant: signup_wide uses a tinted LIGHT background
   (color-mix(primary 6%, --re-bg)), so the footer's default 80%-white text is
   unreadable there. Flip text to `var(--re-text)` (dark) inside that variant. */
.re-footer--signup_wide { color: var(--re-text) !important; }
.re-footer--signup_wide h4,
.re-footer--signup_wide .re-footer__h,
.re-footer--signup_wide .re-legal-col__heading {
    color: var(--re-text) !important;
}
.re-footer--signup_wide a,
.re-footer--signup_wide .re-footer__links a,
.re-footer--signup_wide .re-legal-item a {
    color: var(--re-text) !important;
}
.re-footer--signup_wide a:hover { color: var(--re-accent-text) !important; }

/* Dark-inverted variant uses `background:var(--re-text)` (a different shade
   of dark than `--re-surface-dark`). Default 80%-white reads fine there too,
   so no override is strictly needed — but we pin to `var(--re-bg)` for a
   cleaner, less-faded look on the distinctly darker panel. */
.re-footer--dark_inverted .re-footer__h,
.re-footer--dark_inverted .re-legal-col__heading,
.re-footer--dark_inverted h4 {
    color: var(--re-bg) !important;
}
.re-footer--dark_inverted .re-footer__links a,
.re-footer--dark_inverted .re-legal-item a {
    color: var(--re-bg) !important;
    opacity: 0.92;
}
.re-footer--dark_inverted .re-footer__links a:hover,
.re-footer--dark_inverted .re-legal-item a:hover { opacity: 1; }

/* Thank-you page */
.re-thank-you { min-height: 60vh; display: flex; align-items: center; }
.re-thank-you__inner { text-align: center; max-width: 620px; margin: 0 auto; padding: 0 24px; }
.re-thank-icon {
    width: 84px; height: 84px; border-radius: 50%;
    background: color-mix(in srgb, var(--re-primary) 18%, transparent);
    color: var(--re-accent-text);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 42px; font-weight: 800;
    margin: 0 auto 28px;
}

/* ── featured_products section (product-catalog skeleton) ───────────── */
.re-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
.re-product-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 8px 24px 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.re-product-carousel > .re-product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
.re-product-split {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
.re-product-split__rest {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 720px) {
    .re-product-split {
        grid-template-columns: 1fr;
    }
}
.re-product-card {
    background: var(--re-surface);
    border: 1px solid color-mix(in srgb, var(--re-text) 10%, transparent);
    border-radius: var(--re-radius-md, 12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    text-decoration: none;
    color: inherit;
}
.re-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--re-text) 24%, transparent);
    border-color: var(--re-primary);
}
.re-product-card__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: color-mix(in srgb, var(--re-text) 5%, transparent);
}
.re-product-card__body {
    padding: 18px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--re-text);
}
.re-product-card__category {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--re-accent-text);
    margin: 0;
    font-weight: 700;
}
.re-product-card__name {
    margin: 0;
    font-family: var(--re-font-heading);
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--re-text);
}
.re-product-card__desc {
    margin: 4px 0 0;
    font-size: 0.92rem;
    opacity: 0.78;
    line-height: 1.5;
    flex: 1;
}
.re-product-card__cta {
    margin-top: 14px;
    font-family: var(--re-font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--re-accent-text);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}
.re-product-card:hover .re-product-card__cta {
    text-decoration: underline;
}
/* End featured_products styles */

.re-footer {
    background: var(--re-surface-dark);
    color: color-mix(in srgb, #ffffff 94%, transparent);
    padding: 64px 0 28px;
    margin-top: 96px;
}
.re-footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}
.re-footer h4 {
    color: #ffffff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 18px;
}
.re-footer p, .re-footer li, .re-footer a { color: color-mix(in srgb, #ffffff 92%, transparent); font-size: 0.92rem; }
.re-footer a { color: color-mix(in srgb, #ffffff 92%, transparent); }
.re-footer a:hover { color: #ffffff; text-decoration: none; }
/* Contact-card visibility safety — force readable text on the card's light bg
   regardless of footer text rules or pack cascade. */
.re-footer .re-contact-card { background: var(--re-bg) !important; color: var(--re-text) !important; }
.re-footer .re-contact-card__label { color: var(--re-accent-text) !important; opacity: 1 !important; }
.re-footer .re-contact-card__value, .re-footer .re-contact-card a { color: var(--re-text) !important; opacity: 1 !important; }
.re-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.re-footer__brand { font-family: var(--re-font-heading); font-weight: 800; font-size: 1.2rem; color: #ffffff; margin-bottom: 14px; display: block; }
.re-footer__bottom {
    max-width: 1240px;
    margin: 40px auto 0;
    padding: 22px 24px 0;
    border-top: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    font-size: 0.85rem;
}
@media (max-width: 860px) {
    .re-footer__inner { grid-template-columns: 1fr; }
}

.re-legal { max-width: 1200px; margin: 60px auto 0; padding: 0 24px; }
.re-legal__grid { display: flex; flex-direction: column; gap: 18px; }
.re-legal__card {
    display: flex; gap: 22px; align-items: flex-start;
    padding: 22px 28px; border-radius: var(--re-radius-lg);
    border: 1px solid color-mix(in srgb, var(--re-text) 12%, transparent);
    border-left-width: 4px;
    background: color-mix(in srgb, var(--re-text) 5%, var(--re-bg));
}
.re-legal__card--risk {
    border-left-color: #E07B39;
    background: color-mix(in srgb, #E07B39 8%, var(--re-bg));
}
.re-legal__card--biz {
    border-left-color: #3B82F6;
    background: color-mix(in srgb, #3B82F6 7%, var(--re-bg));
}
.re-legal__icon {
    flex-shrink: 0; width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.re-legal__card--risk .re-legal__icon {
    background: color-mix(in srgb, #E07B39 20%, var(--re-bg));
    color: #E07B39;
}
.re-legal__card--biz .re-legal__icon {
    background: color-mix(in srgb, #3B82F6 18%, var(--re-bg));
    color: #3B82F6;
}
.re-legal__icon svg { width: 24px; height: 24px; display: block; }
.re-legal__body h3 {
    margin: 0 0 8px; font-size: 1.05rem; font-weight: 700;
    color: var(--re-text) !important;
    font-family: var(--re-font-heading);
}
.re-legal__body p {
    margin: 0; font-size: 0.95rem; line-height: 1.6;
    color: var(--re-text) !important; opacity: 0.85;
}
@media (max-width: 720px) {
    .re-legal__card { flex-direction: column; padding: 20px; gap: 14px; }
    .re-legal__icon { width: 42px; height: 42px; }
}

.re-cookie {
    position: fixed;
    left: 24px; right: 24px; bottom: 24px;
    z-index: 9000;
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 22px;
    border-radius: var(--re-radius-lg);
    background: color-mix(in srgb, var(--re-text) 10%, var(--re-bg));
    border: 1px solid color-mix(in srgb, var(--re-text) 18%, transparent);
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
    transform: translateY(32px);
    opacity: 0;
    pointer-events: none;
    transition: transform .24s ease, opacity .24s ease;
    font-family: var(--re-font-body, inherit);
}
.re-cookie.re-cookie--show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.re-cookie__inner {
    display: flex; flex-wrap: wrap; gap: 16px;
    align-items: center; justify-content: space-between;
}
.re-cookie__text {
    flex: 1 1 280px; margin: 0;
    color: var(--re-text); opacity: 0.92;
    font-size: 0.92rem; line-height: 1.5;
}
.re-cookie__link {
    color: var(--re-accent-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.re-cookie__actions { display: flex; gap: 10px; flex-shrink: 0; }
.re-cookie__btn {
    appearance: none; cursor: pointer;
    font-family: var(--re-font-heading, inherit);
    font-weight: 600; font-size: 0.88rem;
    padding: 10px 20px;
    border-radius: var(--re-radius-md);
    border: 1.5px solid transparent;
    transition: background .15s ease, transform .1s ease, border-color .15s ease;
    white-space: nowrap;
}
.re-cookie__btn:hover { transform: translateY(-1px); }
.re-cookie__btn--accept {
    /* Не #ffffff: на светлом акценте белый текст давал контраст 3.3:1.
       --re-on-primary считается от яркости акцента и даёт читаемый цвет. */
    background: var(--re-primary); color: var(--re-on-primary);
    border-color: var(--re-primary);
}
.re-cookie__btn--accept:hover { background: var(--re-primary-mid); border-color: var(--re-primary-mid); }
.re-cookie__btn--ghost {
    background: transparent; color: var(--re-text);
    border-color: color-mix(in srgb, var(--re-text) 28%, transparent);
}
.re-cookie__btn--ghost:hover { border-color: var(--re-text); }
@media (max-width: 560px) {
    .re-cookie { left: 12px; right: 12px; bottom: 12px; padding: 16px; }
    .re-cookie__inner { flex-direction: column; align-items: stretch; }
    .re-cookie__actions { justify-content: flex-end; }
}

.re-policy {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
}
.re-policy__intro {
    padding: 22px 26px;
    background: color-mix(in srgb, var(--re-primary) 8%, var(--re-bg));
    border-left: 3px solid var(--re-primary);
    border-radius: var(--re-radius-md);
    margin-bottom: 48px;
}
.re-policy__intro p {
    margin: 0 0 12px;
    color: var(--re-text) !important;
    font-size: 1rem;
}
.re-policy__intro p:last-child { margin-bottom: 0; }
.re-policy__updated {
    font-size: 0.88rem !important;
    color: var(--re-text-mid) !important;
    margin-bottom: 16px !important;
}
.re-policy__section {
    margin-bottom: 40px;
}
.re-policy__section h2 {
    font-size: 1.5rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid color-mix(in srgb, var(--re-primary) 20%, transparent);
    color: var(--re-text);
}
.re-policy__section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--re-text);
    margin: 0 0 14px;
}
.re-policy__section p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
    .re-policy__section h2 { font-size: 1.25rem; }
}

.re-article-page { padding: 80px 0; }
.re-article-page__inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.re-article-page h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.12;
    margin: 8px 0 20px;
}
.re-article-page .re-eyebrow {
    color: var(--re-accent-text);
    font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; font-size: 12px;
    margin-bottom: 8px;
}
.re-article-page .re-lead {
    font-size: 1.2rem; color: var(--re-text-mid);
    margin: 0 0 32px; font-weight: 500; line-height: 1.55;
}
.re-article-page p { font-size: 1.06rem; line-height: 1.72; margin: 0 0 20px; color: var(--re-text); }

/* AI-generated article body — matches the editorial shell */
.re-article-body .article-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--re-border); }
.re-article-body .article-eyebrow {
    color: var(--re-accent-text); font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; font-size: 12px; margin: 0 0 10px;
}
.re-article-body h1 {
    font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.14;
    margin: 4px 0 18px; color: var(--re-text); font-family: var(--re-font-heading);
}
.re-article-body .article-lead {
    font-size: 1.2rem; color: var(--re-text-mid);
    margin: 0 0 18px; font-weight: 500; line-height: 1.55;
}
.re-article-body .article-meta {
    font-size: 0.88rem; color: var(--re-text-mid);
    margin: 0; letter-spacing: 0.02em;
}
.re-article-body h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.25;
    margin: 44px 0 14px; color: var(--re-text);
    font-family: var(--re-font-heading); letter-spacing: -0.01em;
}
.re-article-body h3 {
    font-size: 1.2rem; line-height: 1.35;
    margin: 32px 0 12px; color: var(--re-text);
    font-family: var(--re-font-heading);
}
.re-article-body p { font-size: 1.06rem; line-height: 1.72; margin: 0 0 20px; color: var(--re-text); }
.re-article-body ul, .re-article-body ol { margin: 0 0 22px; padding-left: 1.3em; color: var(--re-text); }
.re-article-body li { font-size: 1.04rem; line-height: 1.65; margin-bottom: 8px; }
.re-article-body blockquote, .re-article-body .article-pullquote {
    margin: 28px 0; padding: 20px 24px;
    border-left: 4px solid var(--re-primary);
    background: var(--re-surface); color: var(--re-text);
    font-size: 1.14rem; line-height: 1.55; font-style: italic;
    border-radius: 4px;
}
.re-article-body .article-footer-note {
    margin-top: 36px; padding: 14px 18px;
    background: var(--re-surface-muted, var(--re-surface));
    font-size: 0.92rem; color: var(--re-text-mid); border-radius: 4px;
}
/* Ссылки в теле статьи красим акцентом, но КНОПКИ трогать нельзя.
   `.re-article-body a` имеет специфичность выше, чем `.re-btn--primary`,
   поэтому у кнопки внутри статьи цвет текста становился равен её же
   фону — кнопка «Back to blog» была залита акцентом и подписана тем же
   акцентом, то есть читалась как пустой прямоугольник. */
.re-article-body a:not(.re-btn) { color: var(--re-accent-text); }
.re-article-body a:not(.re-btn):hover { text-decoration: underline; }
.re-article-body strong { color: var(--re-text); font-weight: 700; }
.re-article-body em { font-style: italic; }
.re-article-body .re-article-figure,
.re-article-body figure {
    margin: 28px 0; padding: 0;
}
.re-article-body .re-article-figure img,
.re-article-body figure img {
    width: 100%; height: auto; display: block; border-radius: 8px;
}
.re-article-body figcaption {
    font-size: 0.88rem; color: var(--re-text-mid);
    margin-top: 10px; text-align: center;
}

/* ── Mobile hamburger nav (hidden on desktop) ─────────────────────── */
.re-header__inner { position: relative; }
.re-mobile-nav-wrap { display: none; }
.re-mobile-nav__checkbox { position: absolute; opacity: 0; pointer-events: none; }

@media (max-width: 860px) {
    .re-mobile-nav-wrap {
        display: block;
        position: absolute;
        top: 50%;
        /* `inset-inline-end` instead of `right` so the hamburger lands on
           the same edge as the nav links — i.e. the right edge in LTR (en/ru),
           the LEFT edge in RTL (ur/ar). With literal `right:14px` the toggle
           sat on top of the brand wordmark on Urdu pages. */
        inset-inline-end: 14px;
        transform: translateY(-50%);
        z-index: 100;
    }
    .re-mobile-nav__toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
    }
    .re-mobile-nav__toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 0 auto;
        background: var(--re-text);
        transition: transform 0.18s ease, opacity 0.18s ease;
    }
    .re-mobile-nav__checkbox:checked ~ .re-mobile-nav__toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .re-mobile-nav__checkbox:checked ~ .re-mobile-nav__toggle span:nth-child(2) { opacity: 0; }
    .re-mobile-nav__checkbox:checked ~ .re-mobile-nav__toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .re-mobile-nav__panel {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        /* Match wrapper anchoring: pin to the same inline-end edge so in
           RTL the panel grows INTO the screen (rightward) instead of off
           the left edge. Literal `right:0` was leaking the panel offscreen
           on Urdu pages. */
        inset-inline-end: 0;
        min-width: 220px;
        padding: 14px 18px;
        background: var(--re-bg);
        border: 1px solid color-mix(in srgb, var(--re-text) 14%, transparent);
        border-radius: 12px;
        box-shadow: 0 16px 40px color-mix(in srgb, var(--re-text) 22%, transparent);
    }
    .re-mobile-nav__checkbox:checked ~ .re-mobile-nav__panel {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .re-mobile-nav__panel a {
        color: var(--re-text);
        font-size: 1rem;
        font-weight: 500;
        padding: 10px 6px;
        border-bottom: 1px solid color-mix(in srgb, var(--re-text) 8%, transparent);
    }
    .re-mobile-nav__panel a:last-child { border-bottom: 0; }
    .re-mobile-nav__panel a:hover { color: var(--re-accent-text); text-decoration: none; }

    /* On mobile, only the brand wordmark + hamburger should appear in the
       header bar. Variants like dot_separated, right_brand, pill_container,
       and stacked_left wrap the desktop nav + CTA + dot separators in
       inline-styled <div>/<span>/<a> children of .re-header__inner. The
       existing `.re-nav { display: none }` rule only hides the <nav>
       element — the wrapping cluster div, the dot bullets, and the CTA
       button stay visible and collide with the hamburger toggle. Hide
       every direct child of .re-header__inner that isn't the brand or the
       hamburger wrapper. (banner_bar's promo strip is a sibling of
       .re-header__inner, so it stays visible.) */
    .re-header__inner > *:not(.re-brand):not(.re-mobile-nav-wrap) {
        display: none !important;
    }
    /* Some variants (centered_stack, stacked_left, editorial_tall) set
       inline `flex-direction:column` on .re-header__inner — the inline
       style would otherwise override the default row layout we want when
       only brand+hamburger remain. Force horizontal so brand sits on the
       start edge and hamburger floats on inline-end without stacking. */
    .re-header__inner[style*="flex-direction:column"],
    .re-header__inner[style*="flex-direction: column"] {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }
    /* Reserve room on the inline-end edge for the absolutely-positioned
       hamburger (44px wide + 14px offset). Without this, a long brand
       wordmark in RTL Urdu prints under the toggle. */
    .re-header__inner {
        padding-inline-end: 68px !important;
    }
    .re-header__inner > .re-brand {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ── Phone breakpoint (≤480px) — tighten spacing & type ──────────── */
@media (max-width: 480px) {
    .re-section { padding: 56px 0; }
    .re-section__inner { padding: 0 16px; }
    .re-section__header { margin-bottom: 40px; }
    .re-header__inner { padding: 14px 18px; }
    .re-hero { padding: 56px 0 64px; }
    .re-hero__inner { padding: 0 16px; gap: 32px; }
    .re-grid-3, .re-grid-4 { gap: 16px; }
    .re-grid-2 { gap: 24px; }
    .re-split { gap: 28px; }
    .re-card,
    .re-faq-item,
    .re-pricing-card,
    .re-value-card,
    .re-team-card,
    .re-review-card,
    .re-feature-card,
    .re-service-card { padding: 18px; }
    .re-pricing-card--featured { transform: none; }
    .re-btn { padding: 12px 18px; font-size: 0.92rem; }
    .re-hero__cta .re-btn,
    .re-hero__actions .re-btn { width: 100%; max-width: 320px; }
    .re-stat__num { font-size: clamp(1.8rem, 7vw, 2.8rem); }
    .re-footer__inner { padding: 48px 16px 28px; }
    .re-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .re-legal { padding: 48px 16px; }
    .re-legal__card { padding: 18px; }
    .re-article { padding: 48px 16px; }
    .re-article img { height: auto; }
    table { display: block; overflow-x: auto; max-width: 100%; }
    pre, code { max-width: 100%; overflow-x: auto; word-wrap: break-word; }
}

@media (max-width: 380px) {
    .re-section__inner { padding: 0 14px; }
    .re-header__inner { padding: 12px 14px; }
    .re-hero__inner { padding: 0 14px; }
    .re-mobile-nav-wrap { inset-inline-end: 10px; right: auto; }
}

/* ── Mobile: collapse inline-styled grids + flex rows (640px) ─────────
   Renderers use inline `style="grid-template-columns:..."` and inline
   `style="display:flex"` rows with fixed pixel/fr values that overflow a
   393px viewport (article-list rows, big_brand footer grid, timeline
   row+circle layouts, FAQ q/a grids). Below 640px we force any such grid
   inside sections and the footer to a single column AND collapse flex rows
   to columns. Rules use `!important` because inline styles otherwise beat
   the media query. */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    /* Hard cap every direct top-level wrapper to viewport width. Without this
       a single overflowing descendant (a long URL, a fixed-width grid that
       slips through the inline-style match, an absolutely-positioned decor)
       still drags the whole page sideways in iOS Safari, defeating
       overflow-x:hidden on body. NOTE: skip <header> on purpose — the
       hamburger drawer panel is absolutely-positioned BELOW the header and
       gets clipped if the header has overflow:clip/hidden. Vertical
       overflow cap on body+html is enough to stop horizontal scroll. */
    main, footer, section { max-width: 100vw; overflow-x: clip; }
    footer [style*="grid-template-columns"],
    .re-section__inner [style*="grid-template-columns"],
    .re-section [style*="grid-template-columns"],
    .re-footer__inner [style*="grid-template-columns"],
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    /* Inline `column-count:N` (CSS multi-column) used by the `masonry`
       articles variant doesn't get caught by the grid-template rule above —
       on a 393px viewport 3 columns become unreadable slivers. Collapse
       to a single column on mobile. */
    [style*="column-count:2"],
    [style*="column-count:3"],
    [style*="column-count: 2"],
    [style*="column-count: 3"] {
        column-count: 1 !important;
    }
    /* Inline flex rows that stretch wider than the viewport (avatar
       strips, chip rows, hero clusters, footer columns) — wrap them. */
    footer [style*="display:flex"],
    .re-section__inner [style*="display:flex"],
    .re-section [style*="display:flex"] {
        flex-wrap: wrap !important;
    }
    /* Inline `min-width:NNNpx` on form inputs / chips / cards routinely
       exceeds 393px viewport (e.g. CTA email input has min-width:220px,
       fine; but stacked rows of multiple chips with min-width pile up).
       Strip min-width on anything inline-styled below 640px. */
    [style*="min-width"] {
        min-width: 0 !important;
    }
    /* Long Urdu paragraphs in inline-styled <p>/<h1>/<h2>/<h3> can
       refuse to wrap if they contain a single multi-word ligature run.
       Force wrap on every inline-styled text container. */
    p[style], h1[style], h2[style], h3[style], h4[style],
    a[style], span[style], li[style] {
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    /* Block-level inline-styled containers (divs, sections, navs) that
       carry a fixed/large max-width — cap to viewport on mobile. */
    div[style*="max-width"],
    nav[style*="max-width"] {
        max-width: 100% !important;
    }
    /* Negative-margin overlapping avatar strips (avatar_strip team variant)
       look fine wrapped, but the negative left margin pushes items off-
       screen when they wrap — reset it under 640px. */
    .re-section img[style*="margin-left:-"] { margin-left: 0 !important; }
    /* Keep images inside collapsed grids from stretching weirdly */
    footer img, .re-section img { max-width: 100%; height: auto; }
    /* When an article-list row collapses, the "Read more" column
       becomes its own row — align left instead of right. */
    .re-section [style*="text-align:right"] { text-align: left !important; }
    /* Hero headlines and section titles routinely use clamp() with fluid
       sizing already, but inline-styled <h2> / <h3> in section variants
       sometimes lock to desktop sizes — cap them on mobile so RTL Urdu
       (which renders ~30% wider than Latin) doesn't break out of the
       viewport. */
    .re-section h1[style] { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
    .re-section h2[style] { font-size: clamp(1.35rem, 5.5vw, 1.85rem) !important; }
    .re-section h3[style] { font-size: clamp(1.05rem, 4.4vw, 1.4rem) !important; }
    /* `sidebar_toc` FAQ variant pins the question TOC with
       `position:sticky;top:100px`. On mobile that TOC scrolls into the
       details column when both stack — text overlaps. Reset all inline
       sticky positioning under 640px so stacked sections render in normal
       flow. */
    .re-section [style*="position:sticky"],
    .re-section [style*="position: sticky"] {
        position: static !important;
        top: auto !important;
    }
}


/* ── Стили, вынесенные из разметки ──────────────────────
   Были атрибутами style="" в HTML. Селектор удвоен, а блок
   стоит последним, чтобы вес совпадал с прежним поведением. */
.re-x1.re-x1 { background:var(--re-primary);color:var(--re-on-primary);padding:7px 24px;text-align:center;font-size:0.78rem;letter-spacing:0.06em;text-transform:uppercase;font-weight:600; }
.re-x2.re-x2 { display:flex;flex-direction:column;gap:6px; }
.re-x3.re-x3 { display:grid;grid-template-columns:1fr 1fr;gap:24px;font-size:0.9rem; }
.re-x4.re-x4 { display:inline-block;vertical-align:-7px;margin-right:9px; }
.re-x5.re-x5 { font-family:var(--re-font-heading);font-size:clamp(2rem,4vw,3rem);font-weight:900;letter-spacing:-0.03em;line-height:0.95; }
.re-x6.re-x6 { font-size:0.85rem;padding:10px 20px; }
.re-x7.re-x7 { margin-top:18px;max-width:540px;font-size:1.05rem; }
.re-x8.re-x8 { max-width:1240px;margin:0 auto;display:grid;grid-template-columns:1.6fr 1fr;gap:64px;align-items:start; }
.re-x9.re-x9 { max-width:1240px;margin:36px auto 0;padding-top:18px;border-top:1px solid color-mix(in srgb,#ffffff 20%,transparent);font-size:0.78rem; }
.re-x10.re-x10 { padding:56px 24px 28px; }
.re-x11.re-x11 { display:flex;gap:16px;align-items:baseline;padding:9px 0;border-top:1px solid color-mix(in srgb,currentColor 16%,transparent); }
.re-x12.re-x12 { flex:0 0 110px;font-size:0.66rem;letter-spacing:0.14em;text-transform:uppercase;opacity:0.55; }
.re-x13.re-x13 { font-weight:600;color:inherit;text-decoration:none; }
.re-x14.re-x14 { max-width:1240px;margin:0 auto 28px;padding:0 24px; }
.re-x15.re-x15 { max-width:560px; }
.re-x16.re-x16 { display:flex;flex-direction:column;align-items:stretch; }
.re-x17.re-x17 { margin:0 0 10px;font-size:1.05rem;line-height:1.3; }
.re-x18.re-x18 { margin:0;opacity:0.82;line-height:1.55; }
.re-x19.re-x19 { opacity:0.75; }
.re-x20.re-x20 { color:var(--re-text); }
.re-x21.re-x21 { display:flex;gap:8px;justify-content:space-between;padding:7px 0;border-top:1px solid color-mix(in srgb,var(--re-text) 9%,transparent);font-size:.9rem; }
.re-x22.re-x22 { font-family:var(--re-font-heading);font-size:3.8rem;font-weight:900;line-height:0.9;color:var(--re-accent-text); }
.re-x23.re-x23 { font-size:0.72rem;opacity:0.6;letter-spacing:0.14em;text-transform:uppercase;color:var(--re-accent-text);margin-bottom:8px;font-weight:700; }
.re-x24.re-x24 { font-weight:600;text-align:right; }
.re-x25.re-x25 { margin-top:14px;font-weight:700;font-size:1.05rem; }
.re-x26.re-x26 { margin-top:40px; }
.re-x27.re-x27 { margin:0 0 8px;font-size:clamp(1.2rem,2vw,1.5rem); }
.re-x28.re-x28 { margin:0;opacity:0.82; }
.re-x29.re-x29 { margin:6px 0 0;opacity:0.78;font-size:0.92rem; }
.re-x30.re-x30 { max-width:720px;margin:0 auto; }
.re-x31.re-x31 { opacity:.6; }
.re-x32.re-x32 { padding:20px 0;border-bottom:1px solid color-mix(in srgb,var(--re-text) 10%,transparent); }
.re-x33.re-x33 { padding:24px 18px; }
.re-x34.re-x34 { width:100%;aspect-ratio:3/1;object-fit:cover;border-radius:6px;margin-bottom:16px; }
.re-x35.re-x35 { background:color-mix(in srgb,var(--re-primary) 8%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-radius:12px;padding:22px 26px; }
.re-x36.re-x36 { display:flex;align-items:center;gap:16px;margin-bottom:10px; }
.re-x37.re-x37 { margin:0;opacity:.85;line-height:1.6;font-size:.95rem;padding-right:14px; }
.re-x38.re-x38 { background:color-mix(in srgb,var(--re-accent,var(--re-primary)) 8%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-radius:12px;padding:22px 26px; }
.re-x39.re-x39 { background:var(--re-surface,var(--re-bg-alt,#fff));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-radius:var(--re-radius-lg,16px);padding:24px 26px; }
.re-x40.re-x40 { margin:0 0 14px;font-size:1.05rem;line-height:1.35;color:var(--re-accent,var(--re-primary)); }
.re-x41.re-x41 { margin:0 0 6px;font-size:1.15rem; }
.re-x42.re-x42 { margin:0;opacity:.82; }
.re-x43.re-x43 { padding-top:4px; }
.re-x44.re-x44 { position:relative;display:grid;grid-template-columns:48px 1fr;gap:20px;padding-bottom:28px; }
.re-x45.re-x45 { width:48px;height:48px;border-radius:50%;background:var(--re-primary);color:var(--re-on-primary,#fff);display:flex;align-items:center;justify-content:center;font-weight:800;font-family:var(--re-font-heading);position:relative;z-index:1; }
.re-x46.re-x46 { margin:0 0 18px;font-size:1.05rem;line-height:1.65; }
.re-x47.re-x47 { position:absolute;left:23px;top:48px;bottom:-20px;width:2px;background:color-mix(in srgb,var(--re-primary) 30%,transparent); }
.re-x48.re-x48 { align-self:center;background:color-mix(in srgb,var(--re-accent,var(--re-primary)) 22%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-bottom:none;border-radius:10px 10px 0 0;padding:7px 18px;font-family:var(--re-font-heading);font-weight:800;font-size:0.78rem;letter-spacing:0.08em;margin-bottom:-1px;position:relative;z-index:1; }
.re-x49.re-x49 { align-self:center;background:color-mix(in srgb,var(--re-primary) 22%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-bottom:none;border-radius:10px 10px 0 0;padding:7px 18px;font-family:var(--re-font-heading);font-weight:800;font-size:0.78rem;letter-spacing:0.08em;margin-bottom:-1px;position:relative;z-index:1; }
.re-x50.re-x50 { align-self:flex-end;background:color-mix(in srgb,var(--re-primary) 22%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-bottom:none;border-radius:10px 10px 0 0;padding:7px 18px;font-family:var(--re-font-heading);font-weight:800;font-size:0.78rem;letter-spacing:0.08em;margin-bottom:-1px;position:relative;z-index:1; }
.re-x51.re-x51 { align-self:flex-start;background:color-mix(in srgb,var(--re-accent,var(--re-primary)) 22%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-bottom:none;border-radius:10px 10px 0 0;padding:7px 18px;font-family:var(--re-font-heading);font-weight:800;font-size:0.78rem;letter-spacing:0.08em;margin-bottom:-1px;position:relative;z-index:1; }
.re-x52.re-x52 { align-self:flex-start;background:color-mix(in srgb,var(--re-primary) 22%,var(--re-bg));border:1px solid color-mix(in srgb,var(--re-text) 12%,transparent);border-bottom:none;border-radius:10px 10px 0 0;padding:7px 18px;font-family:var(--re-font-heading);font-weight:800;font-size:0.78rem;letter-spacing:0.08em;margin-bottom:-1px;position:relative;z-index:1; }
.re-x53.re-x53 { color:var(--re-ok,#2f8f4e);display:flex;flex:0 0 auto; }
.re-x54.re-x54 { color:var(--re-warn,#c08a12);display:flex;flex:0 0 auto; }
.re-x55.re-x55 { display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0; }
.re-x56.re-x56 { display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px;max-width:1080px;margin:0 auto; }
.re-x57.re-x57 { font-weight:800;color:var(--re-ok,#2f8f4e);font-family:var(--re-font-heading);letter-spacing:.01em; }
.re-x58.re-x58 { font-weight:800;color:var(--re-warn,#c08a12);font-family:var(--re-font-heading);letter-spacing:.01em; }
.re-x59.re-x59 { max-width:760px;margin:0 auto; }
.re-x60.re-x60 { position:absolute;top:0;right:0;width:0;height:0;border-top:26px solid var(--re-ok,#2f8f4e);border-left:26px solid transparent; }
.re-x61.re-x61 { position:absolute;top:0;right:0;width:0;height:0;border-top:26px solid var(--re-warn,#c08a12);border-left:26px solid transparent; }
.re-x62.re-x62 { position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--re-ok,#2f8f4e) 12%,transparent),color-mix(in srgb,var(--re-ok,#2f8f4e) 3%,transparent));border:1px solid color-mix(in srgb,var(--re-text) 10%,transparent);border-radius:var(--re-radius-lg,16px);padding:24px 26px; }
.re-x63.re-x63 { position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--re-warn,#c08a12) 12%,transparent),color-mix(in srgb,var(--re-warn,#c08a12) 3%,transparent));border:1px solid color-mix(in srgb,var(--re-text) 10%,transparent);border-radius:var(--re-radius-lg,16px);padding:24px 26px; }
.re-x64.re-x64 { text-align:center;max-width:1000px;margin:0 auto;font-size:1.1rem;line-height:1.8; }
.re-x65.re-x65 { background:color-mix(in srgb,var(--re-primary) 8%,var(--re-bg)); }
.re-x66.re-x66 { background:var(--re-primary);color:var(--re-on-primary,#fff);border:0;padding:14px 28px;border-radius:var(--re-radius-pill,999px);font-weight:700;cursor:pointer;font-size:1rem; }
.re-x67.re-x67 { border-radius:var(--re-radius-lg,16px);overflow:hidden; }
.re-x68.re-x68 { color:var(--re-danger,#c0392b);display:flex;flex:0 0 auto; }
.re-x69.re-x69 { color:var(--re-note,#cf6a1f);display:flex;flex:0 0 auto; }
.re-x70.re-x70 { display:flex;flex-wrap:wrap;gap:10px;max-width:520px; }
.re-x71.re-x71 { display:flex;justify-content:center; }
.re-x72.re-x72 { display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center;max-width:1080px;margin:0 auto; }
.re-x73.re-x73 { display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;align-items:start; }
.re-x74.re-x74 { display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:clamp(28px,4vw,56px);align-items:start;max-width:1040px;margin:0 auto; }
.re-x75.re-x75 { flex:1 1 220px;min-width:0;padding:14px 18px;border-radius:var(--re-radius-pill,999px);border:1px solid color-mix(in srgb,var(--re-text) 20%,transparent);background:var(--re-surface,#fff);color:var(--re-text);font-size:1rem;outline:none; }
.re-x76.re-x76 { font-family:var(--re-font-heading);font-size:clamp(1.4rem,2.5vw,2rem);line-height:1.3;border-left:4px solid var(--re-primary);padding:6px 0 6px 22px;margin:32px 0;color:var(--re-accent-text); }
.re-x77.re-x77 { font-size:clamp(2rem,4vw,3rem);margin:10px 0 18px; }
.re-x78.re-x78 { font-weight:800;color:var(--re-danger,#c0392b);font-family:var(--re-font-heading);letter-spacing:.01em; }
.re-x79.re-x79 { font-weight:800;color:var(--re-note,#cf6a1f);font-family:var(--re-font-heading);letter-spacing:.01em; }
.re-x80.re-x80 { margin:0 0 24px;opacity:.82; }
.re-x81.re-x81 { margin:6px 0 10px;font-size:clamp(1.7rem,3.4vw,2.6rem); }
.re-x82.re-x82 { max-width:1040px;margin:0 auto 28px;border-radius:var(--re-radius-lg,16px);overflow:hidden; }
.re-x83.re-x83 { max-width:620px;margin:0 auto; }
.re-x84.re-x84 { max-width:640px;margin:0 auto;text-align:center; }
.re-x85.re-x85 { position:absolute;left:-9999px;top:-9999px; }
.re-x86.re-x86 { position:absolute;top:0;right:0;width:0;height:0;border-top:26px solid var(--re-danger,#c0392b);border-left:26px solid transparent; }
.re-x87.re-x87 { position:absolute;top:0;right:0;width:0;height:0;border-top:26px solid var(--re-note,#cf6a1f);border-left:26px solid transparent; }
.re-x88.re-x88 { position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--re-danger,#c0392b) 12%,transparent),color-mix(in srgb,var(--re-danger,#c0392b) 3%,transparent));border:1px solid color-mix(in srgb,var(--re-text) 10%,transparent);border-radius:var(--re-radius-lg,16px);padding:24px 26px; }
.re-x89.re-x89 { position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--re-note,#cf6a1f) 12%,transparent),color-mix(in srgb,var(--re-note,#cf6a1f) 3%,transparent));border:1px solid color-mix(in srgb,var(--re-text) 10%,transparent);border-radius:var(--re-radius-lg,16px);padding:24px 26px; }
.re-x90.re-x90 { text-align:left; }
.re-x91.re-x91 { width:100%;aspect-ratio:16/9;object-fit:cover;display:block; }
.re-x92.re-x92 { width:100%;aspect-ratio:3/4;object-fit:cover;display:block; }
.re-x93.re-x93 { width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:var(--re-radius-lg,16px); }
