/**
 * calcprolife.ru — UI 2027
 * Modern design system: glass morphism, soft gradients, micro-animations.
 */

/* ========================================
   1. ДИЗАЙН-ТОКЕНЫ
   ======================================== */
:root {
    /* Поверхности */
    --bg-canvas:      #f6f7fb;
    --bg-surface:     #ffffff;
    --bg-elevated:    rgba(255, 255, 255, 0.72);
    --bg-subtle:      #eef1f8;
    --bg-muted:       #e6eaf3;

    /* Текст */
    --text-strong:    #0b1220;
    --text-primary:   #1e293b;
    --text-secondary: #55637a;
    --text-muted:     #8a94a6;
    --text-inverse:   #ffffff;

    /* Границы */
    --border-soft:    rgba(15, 23, 42, 0.06);
    --border-default: rgba(15, 23, 42, 0.10);
    --border-strong:  rgba(15, 23, 42, 0.18);

    /* Бренд */
    --brand-500:  #4f6bff;
    --brand-600:  #3a54e0;
    --brand-700:  #2d42b8;
    --brand-soft: rgba(79, 107, 255, 0.10);
    --brand-glow: rgba(79, 107, 255, 0.30);

    --accent-500: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.12);

    --success-500: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning-500: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger-500:  #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.10);

    /* Тени */
    --shadow-xs:   0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm:   0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-md:   0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg:   0 20px 48px rgba(15, 23, 42, 0.12);
    --shadow-xl:   0 32px 64px rgba(15, 23, 42, 0.16);
    --shadow-brand: 0 12px 32px rgba(79, 107, 255, 0.28);

    /* Радиусы */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 28px;
    --r-full: 9999px;

    /* Отступы */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 56px;
    --s-16: 80px;

    /* Типографика */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

    --fs-xs:   12px;
    --fs-sm:   13px;
    --fs-base: 15px;
    --fs-md:   16px;
    --fs-lg:   18px;
    --fs-xl:   22px;
    --fs-2xl:  28px;
    --fs-3xl:  36px;
    --fs-4xl:  48px;
    --fs-5xl:  64px;

    --lh-tight: 1.2;
    --lh-snug:  1.35;
    --lh-normal: 1.55;
    --lh-relaxed: 1.7;

    /* Скорости анимаций */
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --dur-fast: 150ms;
    --dur-base: 250ms;
    --dur-slow: 400ms;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-modal:    500;
}

/* Тёмная тема */
[data-theme="dark"] {
    --bg-canvas:      #0a0e1a;
    --bg-surface:     #121826;
    --bg-elevated:    rgba(23, 30, 48, 0.72);
    --bg-subtle:      #1a2235;
    --bg-muted:       #232c44;

    --text-strong:    #f5f7fc;
    --text-primary:   #e2e8f4;
    --text-secondary: #a4aec2;
    --text-muted:     #6d7893;

    --border-soft:    rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.10);
    --border-strong:  rgba(255, 255, 255, 0.18);

    --brand-500:  #6b8aff;
    --brand-600:  #5473f0;
    --brand-700:  #4060d8;
    --brand-soft: rgba(107, 138, 255, 0.14);
    --brand-glow: rgba(107, 138, 255, 0.40);

    --accent-500: #a78bfa;
    --accent-soft: rgba(167, 139, 250, 0.16);

    --shadow-sm:  0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.40);
    --shadow-lg:  0 20px 48px rgba(0, 0, 0, 0.50);
    --shadow-brand: 0 12px 32px rgba(107, 138, 255, 0.35);
}

/* ========================================
   2. БАЗА
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--text-primary);
    background: var(--bg-canvas);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(1200px 600px at 15% -10%, rgba(79, 107, 255, 0.08), transparent 60%),
        radial-gradient(900px 500px at 85% 0%, rgba(139, 92, 246, 0.06), transparent 60%);
    background-attachment: fixed;
}

[data-theme="dark"] body {
    background-image:
        radial-gradient(1200px 600px at 15% -10%, rgba(79, 107, 255, 0.14), transparent 60%),
        radial-gradient(900px 500px at 85% 0%, rgba(139, 92, 246, 0.10), transparent 60%);
}

a {
    color: var(--brand-500);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--brand-600); }

img { max-width: 100%; height: auto; display: block; }

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

::selection {
    background: var(--brand-soft);
    color: var(--brand-700);
}

h1, h2, h3, h4 {
    color: var(--text-strong);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(28px, 3.5vw, 44px); margin-bottom: var(--s-4); }
h2 { font-size: clamp(22px, 2.4vw, 30px); margin: var(--s-8) 0 var(--s-4); }
h3 { font-size: var(--fs-xl); margin: var(--s-6) 0 var(--s-3); }

p  { margin-bottom: var(--s-4); color: var(--text-primary); }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: var(--r-sm);
    color: var(--brand-700);
}

/* ========================================
   3. КОНТЕЙНЕР
   ======================================== */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--s-5);
}

@media (min-width: 768px) {
    .container { padding: 0 var(--s-8); }
}

/* ========================================
   4. ШАПКА — GLASS
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    padding: var(--s-4) 0;
}

.header__logo {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: opacity var(--dur-fast) var(--ease);
}

.header__logo:hover { opacity: 0.85; color: var(--text-strong); }

.header__logo-img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.header__logo-text {
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header__nav {
    display: none;
    align-items: center;
    gap: var(--s-1);
    flex: 1;
    justify-content: center;
}

@media (min-width: 900px) {
    .header__nav { display: flex; }
}

.header__nav-link {
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--r-md);
    transition: all var(--dur-fast) var(--ease);
}

.header__nav-link:hover {
    color: var(--text-strong);
    background: var(--bg-subtle);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-shrink: 0;
}

/* Кнопка переключения темы */
.btn--icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-default);
    border-radius: var(--r-md);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all var(--dur-fast) var(--ease);
}

.btn--icon:hover {
    color: var(--brand-500);
    border-color: var(--brand-500);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-icon--dark { display: none; }

[data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="dark"] .theme-icon--dark  { display: inline-flex; }

/* Бургер */
.burger {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--r-md);
    position: relative;
    transition: all var(--dur-fast) var(--ease);
}

.burger:hover {
    border-color: var(--brand-500);
    background: var(--brand-soft);
}

.burger__line {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--dur-base) var(--ease);
}

.burger__line:nth-child(1) { top: 14px; }
.burger__line:nth-child(2) { top: 19px; }
.burger__line:nth-child(3) { top: 24px; }

@media (max-width: 899px) {
    .burger { display: block; }
    .header__nav { display: none; }
}

/* ========================================
   5. ГЛАВНАЯ ОБЛАСТЬ
   ======================================== */
.main {
    flex: 1;
    padding: var(--s-10) 0 var(--s-16);
}

/* ========================================
   6. КАРТОЧКИ КАЛЬКУЛЯТОРОВ
   ======================================== */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--s-5);
    margin-top: var(--s-6);
}

.calculator-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--s-6);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    transition: all var(--dur-base) var(--ease);
    overflow: hidden;
    color: inherit;
}

.calculator-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-soft), transparent 60%);
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease);
    pointer-events: none;
}

.calculator-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
}

.calculator-card:hover::before { opacity: 1; }

.calculator-card__icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #ffffff;
    margin-bottom: var(--s-4);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease);
}

.calculator-card:hover .calculator-card__icon {
    transform: scale(1.08) rotate(-3deg);
}

.calculator-card__icon .icon { color: #ffffff; }

.calculator-card__title {
    position: relative;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: var(--s-2);
    line-height: var(--lh-snug);
}

.calculator-card__description {
    position: relative;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-normal);
}

/* ========================================
   7. ФОРМА КАЛЬКУЛЯТОРА
   ======================================== */
.calculator-form {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-2xl);
    padding: var(--s-8);
    margin: var(--s-6) 0;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .calculator-form { padding: var(--s-5); border-radius: var(--r-xl); }
}

.form-group {
    margin-bottom: var(--s-5);
    position: relative;
}

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: var(--s-2);
    letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-subtle);
    border: 1.5px solid transparent;
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: var(--fs-base);
    transition: all var(--dur-fast) var(--ease);
    outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    background: var(--bg-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background: var(--bg-surface);
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.form-hint {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: var(--s-2);
    line-height: var(--lh-snug);
}

.form-error {
    color: var(--danger-500);
    font-size: var(--fs-sm);
    margin-top: var(--s-2);
}

.form-radio {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    margin: 0 var(--s-2) var(--s-2) 0;
    border-radius: var(--r-md);
    background: var(--bg-subtle);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
    font-size: var(--fs-sm);
}

.form-radio:hover { background: var(--bg-muted); }

.form-radio input[type="radio"] {
    accent-color: var(--brand-500);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-500);
    cursor: pointer;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 12px 22px;
    font-size: var(--fs-base);
    font-weight: 600;
    border-radius: var(--r-md);
    border: none;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn--primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #ffffff;
    box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px var(--brand-glow);
    color: #ffffff;
}

.btn--primary:active { transform: translateY(0); }

.btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn--lg {
    width: 100%;
    padding: 16px 24px;
    font-size: var(--fs-md);
    border-radius: var(--r-lg);
    margin-top: var(--s-4);
}

.btn--success {
    background: linear-gradient(135deg, var(--success-500), #059669);
}

/* ========================================
   8. РЕЗУЛЬТАТ РАСЧЕТА
   ======================================== */
.calculator-result {
    display: none;
    margin-top: var(--s-8);
    padding: var(--s-8);
    background: var(--bg-surface);
    border: 1.5px solid var(--brand-soft);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.calculator-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
}

.calculator-result--visible {
    display: block;
    animation: resultIn var(--dur-slow) var(--ease);
}

@keyframes resultIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.calculator-result h3 {
    font-size: var(--fs-xl);
    margin: 0 0 var(--s-5);
    color: var(--text-strong);
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--border-soft);
}

.result-item:last-child { border-bottom: none; }

.result-label {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.result-value {
    font-weight: 700;
    font-size: var(--fs-lg);
    color: var(--text-strong);
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.result-value--large {
    font-size: var(--fs-2xl);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Рекомендация и предупреждение */
.recommendation,
.warning {
    margin-top: var(--s-5);
    padding: var(--s-4) var(--s-5);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    line-height: var(--lh-normal);
    border-left: 4px solid;
}

.recommendation {
    background: var(--brand-soft);
    border-left-color: var(--brand-500);
    color: var(--brand-700);
}

.warning {
    background: var(--warning-soft);
    border-left-color: var(--warning-500);
    color: #92400e;
}

[data-theme="dark"] .warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

/* ========================================
   9. ХЛЕБНЫЕ КРОШКИ
   ======================================== */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-6);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: background var(--dur-fast) var(--ease);
}

.breadcrumbs a:hover {
    background: var(--bg-subtle);
    color: var(--brand-500);
}

.breadcrumbs span { color: var(--text-muted); }

/* ========================================
   10. БЛОКИ СТАТЬИ / КАЛЬКУЛЯТОРА
   ======================================== */
.article,
.calc-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    padding: var(--s-8);
    margin-top: var(--s-6);
    box-shadow: var(--shadow-xs);
}

@media (max-width: 640px) {
    .article, .calc-section { padding: var(--s-5); border-radius: var(--r-lg); }
}

.article__meta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 6px 12px;
    background: var(--bg-subtle);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    margin-top: var(--s-2);
}

.article__content {
    margin-top: var(--s-5);
    color: var(--text-primary);
    line-height: var(--lh-relaxed);
    font-size: var(--fs-md);
}

.article__content h2 {
    font-size: var(--fs-2xl);
    margin: var(--s-8) 0 var(--s-4);
}

.article__content h3 {
    font-size: var(--fs-xl);
    margin: var(--s-6) 0 var(--s-3);
}

.article__content p { margin-bottom: var(--s-4); }

.article__content ul,
.article__content ol {
    margin: 0 0 var(--s-4) var(--s-6);
    padding-left: var(--s-4);
}

.article__content li {
    margin-bottom: var(--s-2);
    color: var(--text-primary);
}

.article__content a {
    color: var(--brand-500);
    font-weight: 500;
    border-bottom: 1px solid var(--brand-soft);
    transition: border-color var(--dur-fast) var(--ease);
}

.article__content a:hover { border-bottom-color: var(--brand-500); }

.calc-section__body {
    color: var(--text-primary);
    line-height: var(--lh-relaxed);
}

.calc-section h2 { margin-top: 0; }

/* ========================================
   11. FAQ
   ======================================== */
.calc-faq {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    padding: var(--s-8);
    margin-top: var(--s-6);
    box-shadow: var(--shadow-xs);
}

@media (max-width: 640px) {
    .calc-faq { padding: var(--s-5); }
}

.calc-faq h2 { margin-top: 0; margin-bottom: var(--s-5); }

.faq__item {
    background: var(--bg-subtle);
    border-radius: var(--r-md);
    margin-bottom: var(--s-3);
    overflow: hidden;
    transition: background var(--dur-fast) var(--ease);
}

.faq__item:hover { background: var(--bg-muted); }

.faq__question {
    padding: var(--s-4) var(--s-5);
    padding-right: 56px;
    font-weight: 600;
    font-size: var(--fs-base);
    color: var(--text-strong);
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: color var(--dur-fast) var(--ease);
}

.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { display: none; }

.faq__question::after {
    content: '';
    position: absolute;
    right: var(--s-5);
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6bff' stroke-width='2.5' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform var(--dur-base) var(--ease);
}

.faq__item[open] .faq__question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq__item[open] .faq__question { color: var(--brand-500); }

.faq__answer {
    padding: 0 var(--s-5) var(--s-5);
    color: var(--text-secondary);
    line-height: var(--lh-normal);
    font-size: var(--fs-sm);
    animation: faqIn var(--dur-base) var(--ease);
}

@keyframes faqIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   12. КАРТОЧКИ СТАТЕЙ
   ======================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--s-5);
    margin-top: var(--s-6);
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: var(--s-6);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    transition: all var(--dur-base) var(--ease);
    color: inherit;
    position: relative;
    overflow: hidden;
}

.article-card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
    transition: width var(--dur-base) var(--ease);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-soft);
}

.article-card:hover::after { width: 100%; }

.article-card__title {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: var(--s-3);
    line-height: var(--lh-snug);
    transition: color var(--dur-fast) var(--ease);
}

.article-card:hover .article-card__title { color: var(--brand-500); }

.article-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-normal);
    flex: 1;
    margin-bottom: var(--s-4);
}

.article-card__meta {
    display: flex;
    gap: var(--s-4);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    padding-top: var(--s-3);
    border-top: 1px solid var(--border-soft);
}

/* ========================================
   13. ПОХОЖИЕ КАЛЬКУЛЯТОРЫ / СТАТЬИ
   ======================================== */
.related-calculators,
.related-articles {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    padding: var(--s-8);
    margin-top: var(--s-6);
}

@media (max-width: 640px) {
    .related-calculators,
    .related-articles { padding: var(--s-5); }
}

.related-calculators h2,
.related-articles h2 {
    margin-top: 0;
    margin-bottom: var(--s-5);
}

.related-calculators__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    padding: 0;
}

.related-calculators__list a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-subtle);
    border: 1px solid transparent;
    border-radius: var(--r-full);
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--fs-sm);
    transition: all var(--dur-fast) var(--ease);
}

.related-calculators__list a:hover {
    background: var(--brand-soft);
    border-color: var(--brand-500);
    color: var(--brand-500);
    transform: translateY(-2px);
}

/* ========================================
   14. КАРТА САЙТА
   ======================================== */
.sitemap-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    padding: var(--s-8);
    box-shadow: var(--shadow-xs);
}

@media (max-width: 640px) {
    .sitemap-section { padding: var(--s-5); }
}

.sitemap-section__title {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin: 0 0 var(--s-5);
    padding-bottom: var(--s-3);
    border-bottom: 2px solid var(--brand-soft);
    display: inline-block;
}

.sitemap-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--s-3);
    padding: 0;
}

.sitemap-list__item { margin: 0; }

.sitemap-list__link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
    padding: var(--s-3) var(--s-4);
    background: var(--bg-subtle);
    border-radius: var(--r-md);
    color: var(--text-primary);
    transition: all var(--dur-fast) var(--ease);
}

.sitemap-list__link:hover {
    background: var(--brand-soft);
    color: var(--brand-600);
    transform: translateX(4px);
}

.sitemap-list__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-500);
    flex-shrink: 0;
}

.sitemap-list__name {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--text-strong);
}

.sitemap-list__link:hover .sitemap-list__name { color: var(--brand-500); }

.sitemap-list__desc {
    flex-basis: 100%;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: var(--lh-snug);
}

/* ========================================
   15. ПОДВАЛ
   ======================================== */
.footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-soft);
    padding: var(--s-10) 0 var(--s-6);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-8);
    padding-bottom: var(--s-8);
    border-bottom: 1px solid var(--border-soft);
}

@media (min-width: 768px) {
    .footer__inner {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
}

.footer__section-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: var(--s-4);
}

.footer__inner p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--lh-normal);
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li { margin-bottom: var(--s-2); }

.footer__links a {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    transition: color var(--dur-fast) var(--ease);
}

.footer__links a:hover {
    color: var(--brand-500);
    transform: translateX(2px);
}

.footer__copyright {
    padding-top: var(--s-6);
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* ========================================
   16. ПЛАШКА «РАЗРАБОТКА САЙТОВ»
   ======================================== */
.dev-card {
    display: flex;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-5);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-lg);
    transition: all var(--dur-base) var(--ease);
    position: relative;
    overflow: hidden;
}

.dev-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -30%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(79, 107, 255, 0.35) 0%, transparent 70%);
    pointer-events: none;
    transition: transform var(--dur-slow) var(--ease);
}

.dev-card:hover::before { transform: scale(1.4); }

.dev-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-500);
    box-shadow: var(--shadow-brand);
    color: #ffffff;
}

.dev-card__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    border-radius: var(--r-md);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 107, 255, 0.4);
}

.dev-card__body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dev-card__title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.dev-card__subtitle {
    font-size: var(--fs-xs);
    color: #94a3b8;
    line-height: 1.4;
}

.dev-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--s-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: #93c5fd;
    transition: gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.dev-card:hover .dev-card__link {
    gap: 10px;
    color: #ffffff;
}

/* ========================================
   17. МОБИЛЬНОЕ МЕНЮ
   ======================================== */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
}

.mobile-menu.is-open { display: block; }

.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 22, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn var(--dur-base) var(--ease);
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 340px;
    max-width: 88vw;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideInRight var(--dur-base) var(--ease);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.mobile-menu__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-strong);
}

.mobile-menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    color: var(--text-secondary);
    transition: all var(--dur-fast) var(--ease);
}

.mobile-menu__close:hover {
    background: var(--danger-soft);
    color: var(--danger-500);
}

.mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--s-4) var(--s-4) var(--s-8);
    -webkit-overflow-scrolling: touch;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    color: var(--text-primary);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    transition: all var(--dur-fast) var(--ease);
}

.mobile-menu__link:hover,
.mobile-menu__link:active {
    background: var(--brand-soft);
    color: var(--brand-600);
}

.mobile-menu__link--top {
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 2px;
}

.mobile-menu__link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--r-sm);
    background: var(--brand-soft);
    color: var(--brand-500);
    flex-shrink: 0;
}

.mobile-menu__link-text {
    line-height: 1.3;
    flex: 1;
}

.mobile-menu__group {
    margin-top: var(--s-6);
}

.mobile-menu__group-title {
    padding: var(--s-2) var(--s-4);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

@media (min-width: 900px) {
    .mobile-menu { display: none !important; }
}

/* ========================================
   18. SVG-ИКОНКИ
   ======================================== */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    color: currentColor;
}

/* ========================================
   19. УТИЛИТЫ
   ======================================== */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mt-1 { margin-top: var(--s-2); }
.mt-2 { margin-top: var(--s-4); }
.mt-3 { margin-top: var(--s-5); }
.mt-4 { margin-top: var(--s-6); }

.mb-1 { margin-bottom: var(--s-2); }
.mb-2 { margin-bottom: var(--s-4); }
.mb-3 { margin-bottom: var(--s-5); }
.mb-4 { margin-bottom: var(--s-6); }

.hidden  { display: none !important; }
.visible { display: block !important; }

/* ========================================
   20. АДАПТИВ
   ======================================== */
@media (max-width: 640px) {
    :root {
        --fs-base: 14px;
        --fs-md:   15px;
        --fs-lg:   17px;
        --fs-xl:   20px;
        --fs-2xl:  24px;
        --fs-3xl:  30px;
    }

    .container { padding: 0 var(--s-4); }

    .main { padding: var(--s-6) 0 var(--s-12); }

    .header__logo-text { font-size: var(--fs-md); }
    .header__logo-img  { width: 28px; height: 28px; }

    .calculators-grid {
        grid-template-columns: 1fr;
        gap: var(--s-4);
    }

    .sitemap-section__title { font-size: var(--fs-lg); }

    .sitemap-list { grid-template-columns: 1fr; }
}

/* ========================================
   21. ПЕЧАТЬ
   ======================================== */
@media print {
    .header, .footer, .mobile-menu, .btn, .burger, .dev-card { display: none !important; }
    body { background: #ffffff; color: #000000; }
    .calculator-form, .calculator-result, .article, .calc-section { box-shadow: none; border: 1px solid #ddd; }
}

/* ========================================
   22. ТИПОГРАФИКА КОНТЕНТА (UI 2027)
   Работает для .article__content, .calc-section__body,
   .faq__answer и любого контента из БД
   ======================================== */

/* --- Читабельная ширина и ритм --- */
.article__content,
.calc-section__body,
.faq__answer {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}

.article__content > * + *,
.calc-section__body > * + * {
    margin-top: 1.1em;
}

.article__content p,
.calc-section__body p,
.faq__answer p {
    margin: 0;
    color: var(--text-primary);
}

/* --- Вводный абзац (первый) — крупнее и мягче --- */
.article__content > p:first-of-type,
.calc-section__body > p:first-of-type {
    font-size: 1.08em;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Буквица в самом первом абзаце статьи --- */
.article__content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.6em;
    line-height: 0.9;
    font-weight: 800;
    padding: 6px 12px 0 0;
    color: var(--brand-500);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Заголовки H2 с акцентной вертикальной полосой --- */
.article__content h2,
.calc-section__body h2,
.calc-section h2 {
    position: relative;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    color: var(--text-strong);
    padding-left: 18px;
    margin: 2.2em 0 0.9em;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.article__content h2::before,
.calc-section__body h2::before,
.calc-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand-500), var(--accent-500));
}

/* --- H3 с маркером-точкой --- */
.article__content h3,
.calc-section__body h3 {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-strong);
    padding-left: 20px;
    margin: 1.8em 0 0.7em;
    line-height: 1.3;
}

.article__content h3::before,
.calc-section__body h3::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

/* --- H4 --- */
.article__content h4,
.calc-section__body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 1.5em 0 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
}

/* --- Списки: стильные маркеры --- */
.article__content ul,
.calc-section__body ul,
.faq__answer ul {
    list-style: none;
    padding: 0;
    margin: 1.1em 0;
}

.article__content ul li,
.calc-section__body ul li,
.faq__answer ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 1.65;
}

.article__content ul li::before,
.calc-section__body ul li::before,
.faq__answer ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Нумерованные — свои маркеры */
.article__content ol,
.calc-section__body ol,
.faq__answer ol {
    list-style: none;
    counter-reset: item;
    padding: 0;
    margin: 1.1em 0;
}

.article__content ol li,
.calc-section__body ol li,
.faq__answer ol li {
    position: relative;
    padding-left: 42px;
    margin-bottom: 12px;
    counter-increment: item;
    line-height: 1.65;
}

.article__content ol li::before,
.calc-section__body ol li::before,
.faq__answer ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--brand-glow);
}

/* --- Ссылки внутри текста: аккуратное подчёркивание --- */
.article__content a,
.calc-section__body a,
.faq__answer a {
    color: var(--brand-500);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed var(--brand-500);
    transition: all var(--dur-fast) var(--ease);
}

.article__content a:hover,
.calc-section__body a:hover,
.faq__answer a:hover {
    color: var(--brand-600);
    border-bottom-color: var(--brand-600);
    background: var(--brand-soft);
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
}

/* --- Инлайн-код --- */
.article__content code,
.calc-section__body code {
    background: var(--bg-subtle);
    color: var(--brand-700);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 500;
    border: 1px solid var(--border-soft);
}

[data-theme="dark"] .article__content code,
[data-theme="dark"] .calc-section__body code {
    color: #a5b4fc;
    background: rgba(107, 138, 255, 0.10);
}

/* --- Блок кода --- */
.article__content pre,
.calc-section__body pre {
    background: #0f172a;
    color: #e2e8f4;
    padding: 20px 24px;
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 1.4em 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.article__content pre code,
.calc-section__body pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* --- Цитаты --- */
.article__content blockquote,
.calc-section__body blockquote {
    position: relative;
    margin: 1.5em 0;
    padding: 20px 24px 20px 56px;
    background: var(--bg-subtle);
    border-radius: var(--r-md);
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.7;
    border-left: 4px solid var(--brand-500);
}

.article__content blockquote::before,
.calc-section__body blockquote::before {
    content: '“';
    position: absolute;
    left: 16px;
    top: 8px;
    font-size: 48px;
    line-height: 1;
    color: var(--brand-500);
    opacity: 0.35;
    font-family: Georgia, serif;
    font-style: normal;
}

/* --- Разделитель --- */
.article__content hr,
.calc-section__body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-default), transparent);
    margin: 2.5em 0;
}

/* --- Таблицы --- */
.article__content table,
.calc-section__body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    font-size: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    overflow: hidden;
}

.article__content thead,
.calc-section__body thead {
    background: var(--bg-subtle);
}

.article__content th,
.calc-section__body th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-strong);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-default);
}

.article__content td,
.calc-section__body td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
}

.article__content tbody tr:last-child td,
.calc-section__body tbody tr:last-child td { border-bottom: none; }

.article__content tbody tr:hover,
.calc-section__body tbody tr:hover { background: var(--bg-subtle); }

/* ========================================
   23. CALLOUT-БЛОКИ (для статей и контента)
   ======================================== */
.callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--r-md);
    margin: 1.4em 0;
    border-left: 4px solid;
    background: var(--bg-subtle);
    font-size: 15px;
    line-height: 1.65;
}

.callout__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.callout__body { flex: 1; }

.callout__title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Варианты */
.callout--info {
    background: var(--brand-soft);
    border-left-color: var(--brand-500);
    color: var(--brand-700);
}
.callout--info .callout__title { color: var(--brand-700); }

.callout--tip {
    background: var(--success-soft);
    border-left-color: var(--success-500);
    color: #047857;
}
.callout--tip .callout__title { color: #047857; }

.callout--warning {
    background: var(--warning-soft);
    border-left-color: var(--warning-500);
    color: #92400e;
}
.callout--warning .callout__title { color: #92400e; }

.callout--danger {
    background: var(--danger-soft);
    border-left-color: var(--danger-500);
    color: #991b1b;
}
.callout--danger .callout__title { color: #991b1b; }

[data-theme="dark"] .callout--info    { color: #a5b4fc; }
[data-theme="dark"] .callout--tip     { color: #6ee7b7; }
[data-theme="dark"] .callout--warning { color: #fbbf24; }
[data-theme="dark"] .callout--danger  { color: #fca5a5; }

[data-theme="dark"] .callout--info .callout__title    { color: #c7d2fe; }
[data-theme="dark"] .callout--tip .callout__title     { color: #a7f3d0; }
[data-theme="dark"] .callout--warning .callout__title { color: #fde68a; }
[data-theme="dark"] .callout--danger .callout__title  { color: #fecaca; }

/* ========================================
   24. ХАЙЛАЙТ-БЛОК (важный вывод)
   ======================================== */
.highlight {
    position: relative;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
    border-radius: var(--r-lg);
    margin: 1.6em 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-strong);
    border: 1px solid rgba(79, 107, 255, 0.18);
}

.highlight strong { color: var(--brand-700); }

[data-theme="dark"] .highlight strong { color: #c7d2fe; }

.highlight::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand-500), var(--accent-500));
}

/* ========================================
   25. МЕТКИ / БЕЙДЖИ
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--r-full);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.badge--new    { background: var(--success-soft); color: #047857; }
.badge--hot    { background: var(--danger-soft);  color: #991b1b; }
.badge--update { background: var(--brand-soft);   color: var(--brand-700); }
.badge--pro    { background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); color: #ffffff; }

[data-theme="dark"] .badge--new    { color: #6ee7b7; }
[data-theme="dark"] .badge--hot    { color: #fca5a5; }
[data-theme="dark"] .badge--update { color: #a5b4fc; }

/* ========================================
   26. АКЦЕНТНАЯ СТРОКА (выделение фразы)
   ======================================== */
.mark {
    background: linear-gradient(180deg, transparent 60%, var(--brand-soft) 60%);
    color: inherit;
    padding: 0 4px;
    font-weight: 600;
}

/* ========================================
   27. КАРТОЧКА-ФАКТ (для статей)
   ======================================== */
.fact-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 1.6em 0;
}

.fact-box__item {
    padding: 20px;
    background: var(--bg-subtle);
    border-radius: var(--r-md);
    border: 1px solid var(--border-soft);
    text-align: center;
    transition: all var(--dur-fast) var(--ease);
}

.fact-box__item:hover {
    border-color: var(--brand-500);
    transform: translateY(-2px);
}

.fact-box__value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fact-box__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* ========================================
   28. КНОПКИ В ТЕКСТЕ
   ======================================== */
.btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-brand);
    transition: all var(--dur-fast) var(--ease);
    text-decoration: none;
    border: none;
    margin: 6px 4px 6px 0;
}

.btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px var(--brand-glow);
    color: #ffffff;
}

/* ========================================
   29. СТРЕЛКА-ССЫЛКА В СТАТЬЕ
   ======================================== */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--brand-500);
    text-decoration: none;
    border-bottom: none !important;
    padding: 4px 0;
    transition: gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.link-arrow::after {
    content: '→';
    font-size: 1.1em;
    transition: transform var(--dur-fast) var(--ease);
}

.link-arrow:hover {
    gap: 12px;
    color: var(--brand-600);
    background: none !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ========================================
   30. СЕТКА ДВУХ КОЛОНОК В СТАТЬЕ
   ======================================== */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 1.4em 0;
}

@media (min-width: 720px) {
    .two-col { grid-template-columns: 1fr 1fr; }
}

/* ========================================
   31. SEO-ТЕКСТ ПОД КАЛЬКУЛЯТОРОМ (seo_content)
   ======================================== */
.calc-section .seo-text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-primary);
}

.calc-section .seo-text h2 {
    font-size: 22px;
    margin: 1.8em 0 0.8em;
}

.calc-section .seo-text h3 {
    font-size: 17px;
    margin: 1.4em 0 0.6em;
}

.calc-section .seo-text ul {
    list-style: none;
    padding: 0;
}

.calc-section .seo-text ul li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
}

.calc-section .seo-text ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-500);
    font-weight: 700;
}

/* ========================================
   32. ТЕКСТ FAQ — УМЕРЕННЫЙ
   ======================================== */
.faq__answer {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.faq__answer strong { color: var(--text-strong); }

.faq__answer ul { margin: 0.8em 0; }

.faq__answer li { margin-bottom: 6px; }

/* ========================================
   33. МОБИЛЬНЫЕ ТЕКСТЫ
   ======================================== */
@media (max-width: 640px) {
    .article__content,
    .calc-section__body { font-size: 15px; line-height: 1.7; }

    .article__content > p:first-of-type::first-letter {
        font-size: 2.8em;
        padding: 4px 8px 0 0;
    }

    .article__content h2,
    .calc-section__body h2 { font-size: 20px; padding-left: 14px; }

    .article__content h2::before,
    .calc-section__body h2::before { width: 3px; }

    .article__content h3,
    .calc-section__body h3 { font-size: 17px; }

    .callout { padding: 14px 16px; font-size: 14px; }
    .highlight { padding: 18px 20px; font-size: 15px; }
    .fact-box__value { font-size: 26px; }

    .article__content table,
    .calc-section__body table { font-size: 13px; }
    .article__content th,
    .article__content td,
    .calc-section__body th,
    .calc-section__body td { padding: 10px 12px; }
}