/* ============================================
   КНИГА "ИНВЕСТИЦИИ ДЛЯ НАЧИНАЮЩИХ"
   Версия 12.7 — Лёгкие фоны, новые классы
   ============================================ */

/* ----------------------------
   1. БАЗОВЫЕ ЭЛЕМЕНТЫ
---------------------------- */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    text-decoration: underline;
    color: #004999;
}

/* ----------------------------
   2. ТИПОГРАФИКА
---------------------------- */
h2 {
    color: #124c5c;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 8px;
    margin: 30px 0 20px;
    font-weight: 700;
}
h3 {
    color: #2e7d8a;
    margin: 25px 0 15px;
    font-weight: 600;
}
h4 {
    color: #3a7a86;
    margin: 20px 0 12px;
    font-weight: 600;
}
h5 {
    color: #4f8a94;
    margin: 15px 0 10px;
    font-weight: 500;
}
.chapter-subtitle {
    color: #6b7280;
    display: block;
    margin-bottom: 24px;
    font-style: italic;
    font-size: 15px;
}.folk-metaphor {
    font-style: italic;
    color: #444;
    margin: 15px 0 20px;
    padding: 10px 15px;
    border-left: 3px dashed #4ecdc4;
    background: #faf9f0;
    border-radius: 0 8px 8px 0;
}
.folk-metaphor.plain {
    background: #fffbeb;
    border-left: none;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Диалог без блока */
.dialogue-italic {
    font-style: italic;
    color: #444;
    margin: 15px 0;
    padding: 0;
    border: none;
    background: none;
}

/* Цитата без левой полосы */
.quote-plain {
    font-style: italic;
    color: #444;
    margin: 15px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: none;
}
.quote-plain strong {
    font-style: normal;
    color: #1a3e4c;
}

/* ----------------------------
   3. НАВИГАЦИЯ
---------------------------- */
.nav-series {
    background: #f0f0f0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;    text-align: center;
}
.nav-series a {
    color: #0066cc;
}
.nav-series a:hover {
    text-decoration: underline;
}
.nav-series strong {
    white-space: nowrap;
    display: inline-block;
}
.nav-disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Нижняя навигация */
.nav-footer {
    margin-top: 32px;
    padding: 25px;
    background: #eff6ff;
    border-radius: 12px;
    border-left: 4px solid #5b7fba;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.nav-footer-icon {
    font-size: 48px;
    line-height: 1;
}
.nav-footer-content {
    flex: 1;
    min-width: 250px;
}
.nav-footer-title {
    font-weight: 600;
    font-size: 18px;
    color: #1a5c6e;
    margin-bottom: 8px;
}
.nav-footer-text {
    color: #2c7a86;
    line-height: 1.6;
    font-size: 14px;
}
.nav-footer-button {    background: #5b7fba;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.nav-footer-button:hover {
    background: #4a6a9a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.nav-footer-button.disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
}

/* ----------------------------
   4. МЕДИА: ВИДЕО И ИЛЛЮСТРАЦИИ
---------------------------- */
.video-figure,
.illustration {
    margin: 20px 0;
    padding: 8px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}
.video-figure video,
.illustration img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* ----------------------------   5. БЛОКИ КОНТЕНТА
---------------------------- */
/* 💭 Облачко мыслей — БЛЕДНО-ПЕРСИКОВЫЙ, без хвостиков */
.thought-cloud {
    position: relative;
    background: #fff9f5 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin: 10px 0 20px 40px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    font-style: italic;
    color: #555;
    max-width: 90%;
}
.thought-cloud::before,
.thought-cloud::after {
    display: none !important;
}

/* 🟡 Визуальный якорь (инфо-заметка) */
.info-anchor {
    font-style: italic;
    color: #555;
    margin: 15px 0;
    padding: 12px 16px;
    background: #fffbeb;
    border-left: 3px solid #fcd34d;
    border-radius: 0 8px 8px 0;
}

/* 📊 Расчёты (зелёные) — ОЧЕНЬ СВЕТЛЫЙ фон */
.calculation-block {
    background: #f8fff9;
    border-left: 3px solid #86efac;
    border-radius: 12px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.calculation-block summary {
    cursor: pointer;
    font-weight: 600;
    color: #1a4b2e;
    padding: 15px 20px;
    background: #f8fff9;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}
.calculation-block summary:hover {
    background: #f0fcf3;
}
.calculation-block summary::-webkit-details-marker {
    display: none;
}
.calculation-block summary::before {
    content: "▶";
    font-size: 0.9em;
    color: #10b981;    transition: transform 0.2s ease;
    display: inline-block;
}
.calculation-block[open] summary::before {
    transform: rotate(90deg);
}
.calculation-block[open] summary {
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}
.calculation-content {
    padding: 15px 20px;
    background: #f8fff9;
    line-height: 1.6;
}
.calc-section {
    margin-bottom: 15px;
}

/* ⚠️ Важные примечания (жёлтые) — СВЕТЛЕЕ */
.important-block {
    background: #fffbeb;
    border-left: 3px solid #fcd34d;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.important-block strong:first-child {
    color: #856404;
}
.important-block--danger {
    background: #fef2f2;
    border-left-color: #f87171;
}
.important-block--danger strong:first-child {
    color: #991b1b;
}
.important-block-small {
    font-size: 14px;
}
.important-block-center {
    text-align: center;
}
.important-block-center .bonus-title {
    font-size: 1.2em;
}

/* 💬 Цитаты — СВЕТЛЕЕ */
.quote-block {
    background: #f8fafc;    border-left: 3px solid #93c5fd;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    margin: 15px 0;
    font-style: italic;
}
.quote-block strong {
    font-style: normal;
    color: #1a4b6d;
    display: block;
    margin-bottom: 8px;
}
.quote-large {
    font-size: 18px;
}
.quote-center {
    text-align: center;
}
.quote-success {
    background: #f0fdf4 !important;
    border-left-color: #86efac !important;
    text-align: center;
}
.quote-success .thank-you-title {
    font-size: 1.2em;
}
.quote-separator {
    font-style: italic;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #4ecdc4;
}

/* ❤️ Мораль (фиолетовые) — СВЕТЛЕЕ */
.morale-block {
    background: #faf5ff;
    border-left: 3px solid #a78bfa;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    text-align: center;
}
.morale-block::before {
    content: "❤️ ";
    font-size: 18px;
    font-style: normal;
}
.morale-block strong:first-child {    display: none;
}

/* 🚀 Микро-шаг (призыв к действию) — СВЕТЛЕЕ */
.micro-step {
    background: #fff5f8;
    border-left: 3px solid #f9a8d4;  /* Мягкий розовый (полоска) */
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}
.micro-step strong {
    color: #be185d;  /* Насыщенный розовый (заголовок) — читаемо! */
}
.micro-step span {
    color: #666;
}

/* ----------------------------
   6. ТАБЛИЦЫ
---------------------------- */
.investment-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}
.investment-table th {
    background: #e9ecef !important;
    border: 1px solid #ddd !important;
    padding: 12px !important;
    text-align: left !important;
    color: #1a3e4c !important;
    font-weight: 600 !important;}
.investment-table td {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    padding: 10px !important;
}
.investment-table tr:hover td {
    background: #f3f3f3 !important;
}
.table-footer {
    padding: 12px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    background: #f8f9fa;
}
.table-note {
    font-size: 14px;
    color: #666;
    margin: -5px 0 15px;
    text-align: center;
}

/* ----------------------------
   7. ГЛОССАРИЙ
---------------------------- */
.glossary-mini {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.glossary-mini summary {
    font-weight: 600;
    cursor: pointer;
    color: #0066cc;
    padding: 15px 20px;
    background: #f8fafc;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}
.glossary-mini summary:hover {
    background: #f1f5f9;
}
.glossary-mini summary::-webkit-details-marker {    display: none;
}
.glossary-mini summary::before {
    content: "▶";
    font-size: 0.9em;
    color: #0066cc;
    transition: transform 0.2s ease;
    display: inline-block;
}
.glossary-mini[open] summary::before {
    transform: rotate(90deg);
}
.glossary-mini[open] summary {
    border-bottom: 1px solid #e5e7eb;
}
.glossary-terms {
    padding: 5px 20px 15px;
}
.glossary-term {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}
.glossary-term:last-child {
    border-bottom: none;
}
.glossary-term strong {
    color: #1a4b6d;
    min-width: 140px;
    font-weight: 700;
}
.glossary-link {
    display: inline-block;
    margin: 5px 20px 20px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    padding-top: 5px;
    border-top: 1px solid #e5e7eb;
}
.glossary-link:hover {
    text-decoration: underline;
}

/* ----------------------------
   8. СПИСКИ
---------------------------- */.list-card {
    list-style-type: none;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}
.list-card li {
    margin-bottom: 8px;
    line-height: 1.4;
}
.list-card li:last-child {
    margin-bottom: 0;
}
.instruction-list {
    list-style-type: none;
    background: #f8fafc;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    margin: 20px 0;
}
.instruction-list li {
    margin-bottom: 10px;
}
.instruction-list .teaser-item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #4ecdc4;
}
.expense-list {
    list-style-type: none;
    background: #fef2f2;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}
.benefit-list {
    list-style-type: none;
    background: #f0fdf4;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}
.info-list {
    list-style-type: none;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}
.story-list {    background: #f8fafc;
    padding: 12px 12px 12px 28px;
    border-radius: 8px;
    margin: 8px 0 20px;
    list-style-position: outside;
    font-size: 15px;
}
.story-list li {
    margin-bottom: 4px;
    line-height: 1.4;
}
.story-list li:last-child {
    margin-bottom: 0;
}

/* ----------------------------
   9. СЕТКИ И КАРТОЧКИ
---------------------------- */
.grid-cards {
    display: grid;
    gap: 15px;
    margin: 25px 0;
}
.zavet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 30px 0;
}
.zavet-section-title {
    grid-column: 1 / -1;
    font-weight: 700;
    font-size: 16px;
    margin: 10px 0 5px;
    color: #2c5a2c;
}
.zavet-card {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

/* 🥚 Сетка активов (3 в ряд) */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;    margin: 25px 0;
}
.asset-card {
    background: #f9fafb;
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.asset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.asset-icon {
    font-size: 48px;
    margin-bottom: 10px;
}
.asset-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: #1a3e4c;
}
.asset-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.asset-risk {
    font-size: 13px;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
}
.asset-risk-high {
    color: #dc3545;
    background: #ffe5e5;
}
.asset-risk-low {
    color: #28a745;
    background: #e5f4ea;
}
.asset-risk-inflation {
    color: #856404;
    background: #fff3cd;
}
/* 🎁 Сетка ИИС */
.iis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
}
.iis-card {
    padding: 15px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
}
.iis-type-a {
    background: #eff6ff;
    border-left: 4px solid #17a2b8;
}
.iis-type-b {
    background: #fffbeb;
    border-left: 4px solid #ffc107;
}

/* ----------------------------
   10. КРАСНАЯ ЗОНА: МИКРОЗАЙМЫ
---------------------------- */
.danger-zone-block {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 50%, #990000 100%);
    border: 4px solid #ffcc00;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 30px 0;
    box-shadow: 
        0 8px 25px rgba(255, 0, 0, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.1),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.danger-zone-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: danger-pulse 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes danger-pulse {    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}
.danger-zone-block::after {
    content: '💀 ⚠️ ';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    letter-spacing: 8px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.danger-zone-block .danger-title {
    font-size: 1.4em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.4);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.danger-zone-block .danger-title::before,
.danger-zone-block .danger-title::after {
    content: '☠️';
    font-size: 1.2em;
}
.danger-zone-block .danger-main {
    font-size: 1.15em;
    font-weight: 700;
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid #ffcc00;
}
.danger-zone-block .danger-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}
.danger-zone-block .danger-list li {
    padding: 8px 0 8px 28px;
    position: relative;    font-weight: 600;
    line-height: 1.5;
}
.danger-zone-block .danger-list li::before {
    content: '🔴';
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 14px;
}
.danger-zone-block .danger-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px dashed rgba(255, 255, 255, 0.4);
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
}
.danger-zone-block .danger-footer strong {
    color: #ffcc00;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.danger-zone-block .danger-alternative {
    display: block;
    margin-top: 10px;
    font-size: 0.95em;
    font-weight: 500;
    opacity: 0.95;
}

/* ----------------------------
   11. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
---------------------------- */
.text-center { text-align: center; }
.text-danger { color: #dc3545; }
.disclaimer-note {
    color: #666;
    font-size: 14px;
    display: block;
    margin: 0 0 15px;
    line-height: 1.4;
    font-style: italic;
}
.small-note {
    color: #666;
    display: block;
    margin: 0 0 10px;
    font-size: 13px;
}
.dialogue-note { margin: 5px 0 0; }.chart-arrows { font-size: 24px; margin: 10px 0; }
.chart-note { margin-top: 15px; }
.footer-note {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 40px 0 20px;
}
.footer-note a { color: #0066cc; }
.footer-final {
    text-align: center;
    font-size: 18px;
    margin: 20px 0 10px;
}
.footer-meta {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}
.finansist-speech {
    font-style: italic;
    color: #2c5a2c;
}
.brokers-list {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.brokers-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    line-height: 1.5;
}
.brokers-item:last-child {
    border-bottom: none;
}
.brokers-item strong {
    color: #1a4b6d;
    font-weight: 700;
}
.decorative-hr {
    margin: 25px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
    opacity: 0.7;
}
/* ----------------------------
   12. ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ
---------------------------- */
/* 💡 Подсказки рисков (обновлено: спокойные цвета) */
.risk-hint {
    color: inherit;  /* Цвет как у обычного текста */
    cursor: help;
    position: relative;
    display: inline-block;
    font-weight: 500;
    border-bottom: 1px dotted #9ca3af;  /* Точечная серая линия вместо оранжевой */
    transition: all 0.2s ease;
}
.risk-hint:hover {
    background: #f3f4f6;  /* Лёгкий серый фон при наведении */
    border-bottom-color: #4f46e5;  /* Синяя линия при наведении */
    color: #4f46e5;
}
.risk-hint:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    width: max-content;
    max-width: 280px;
    z-index: 100;
    line-height: 1.5;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeIn 0.2s ease;
    pointer-events: none;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Подсказки для мобильных */
@media (max-width: 600px) {
    .risk-hint:hover::after {
        width: 240px;
        font-size: 0.85em;
    }
}

/* 🧮 Калькулятор ИИС */
.interactive-calc {
    border: 2px solid #ffd700;
    background: #fffbeb;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}
.interactive-calc h4 {
    margin-top: 0;
    color: #854d0e;
}
.calc-desc {    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
}
.calc-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.calc-input-row input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 140px;
    font-size: 1em;
}
.calc-result {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.calc-row {
    margin-bottom: 8px;
    font-size: 1.05em;
}
.calc-row:last-child {
    margin-bottom: 0;
}
.val-green { color: #10b981; font-weight: bold; }
.val-blue { color: #3b82f6; font-weight: bold; }
.calc-note {
    font-size: 0.8em;
    color: #888;
    margin-top: 12px;
    margin-bottom: 0;
}

/* 🧠 Квиз — РАМКА КАК У КАЛЬКУЛЯТОРА (компактный) */
.quiz-block {
    background: #f0f4ff;
    border: 2px solid #818cf8;
    border-radius: 12px;
    padding: 16px 18px;      /* Было: 20px → компактнее */
    margin: 30px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.quiz-block h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #3730a3;
}
.quiz-block > p {
    margin-bottom: 12px;     /* Вопрос ближе к кнопкам */
}
.quiz-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 14px;       /* Было: 12px 16px → в 2 раза компактнее */
    margin: 4px 0;           /* Было: 8px 0 → меньше отступ между кнопками */
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95em;       /* Чуть меньше шрифт */
    line-height: 1.3;        /* Плотный текст */
    transition: all 0.2s;
}
.quiz-btn:hover {
    border-color: #818cf8;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.quiz-result {
    margin-top: 15px;
    font-weight: 600;
    padding: 12px;
    border-radius: 6px;
    display: none;
}
.quiz-result.correct {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.quiz-result.wrong {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ----------------------------
   13. АДАПТИВНОСТЬ
---------------------------- */
@media (max-width: 768px) {
    .asset-grid {
        grid-template-columns: 1fr;
    }
    .iis-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    /* Таблицы */
    .investment-table {
        font-size: 13px;
    }
    .investment-table th,
    .investment-table td {
        padding: 8px !important;
    }
    
    /* Навигация */
    .nav-footer {
        flex-direction: column;
        text-align: center;
    }
    
    /* Сетки */
    .zavet-grid,
    .iis-grid {
        grid-template-columns: 1fr;
    }
    
    /* Глоссарий */
    .glossary-term {
        flex-direction: column;
        gap: 4px;
    }
    .glossary-term strong {
        min-width: auto;
    }
    
    /* Блоки */
    .morale-block,
    .thought-cloud {
        text-align: center;
        margin-left: 20px !important;
        max-width: 85%;
    }
    
    /* Инфографика инфляции */
    .inflation-visual {
        flex-direction: column;
        gap: 12px;
    }
    .inflation-visual .arrow {
        transform: rotate(90deg);
    }
    
    /* Красная зона */
    .danger-zone-block {        padding: 20px 16px;
        border-radius: 12px;
    }
    .danger-zone-block::after {
        font-size: 16px;
        letter-spacing: 4px;
    }
    .danger-zone-block .danger-title {
        font-size: 1.2em;
    }
    .danger-zone-block .danger-main {
        font-size: 1.05em;
    }
    
/* Калькулятор мобильный */
    .calc-input-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .calc-input-row input {
        width: 100%;
    }
} /* ВОТ ЭТА СКОБКА БЫЛА ПРОПУЩЕНА! Она закрывает мобильные стили */

/* ============================================
   ФИНАЛЬНАЯ ТЕТРАДЬ: БЕЗ ОБРЕЗКИ ЗАГОЛОВКА (v2.4)
   ============================================ */

.ivan-ledger {
    background: #fdfdf2 !important;
    background-image: linear-gradient(#e5e5e5 1px, transparent 1px) !important;
    background-size: 100% 2.4em !important;
    background-attachment: local !important;
    border: 1px solid #dcdcdc !important;
    border-left: 1px solid #dcdcdc !important; 
    padding: 35px 20px 20px 95px !important; 
    border-radius: 2px !important;
    position: relative !important;
    
    /* УВЕЛИЧИЛИ ОТСТУП СВЕРХУ, чтобы заголовок не прилипал к тексту выше */
    margin: 60px 0 40px 0 !important; 
    
    font-family: "Segoe Print", "Comic Sans MS", "Apple Chancery", cursive !important;
    font-style: italic !important;
    color: #2b4581 !important;
    line-height: 2.4em !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.05) !important;
    
    /* ГЛАВНОЕ ИСПРАВЛЕНИЕ: разрешаем элементам вылезать за границы */
    overflow: visible !important; 
    
    transform: rotate(-0.3deg);
}

.ivan-ledger::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 75px !important;
    width: 2px !important;
    border-left: 1px solid rgba(248, 113, 113, 0.3) !important;
    border-right: 1px solid rgba(248, 113, 113, 0.3) !important;
    z-index: 1 !important;
}

.ivan-ledger-title {
    position: absolute !important;
    /* ТЕПЕРЬ ОН НЕ ОБРЕЖЕТСЯ */
    top: -25px !important; 
    left: 10px !important; 
    background: #f1f5f9 !important;
    color: #475569 !important;
    padding: 4px 15px !important;
    font-weight: bold !important;
    font-size: 0.85em !important;
    font-family: sans-serif !important;
    font-style: normal !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.15) !important;
    z-index: 20 !important;
    white-space: nowrap !important;
    transform: rotate(-2deg);
}

.ledger-row {
    display: flex !important;
    align-items: flex-start !important;
    position: relative !important;
    z-index: 5 !important;
}

.ledger-marker {
    flex-shrink: 0 !important;
    margin-right: 12px !important;
    font-size: 1.2em !important;
    padding-top: 10px !important; 
    line-height: 1 !important;
    display: block !important;
}

.ledger-content {
    flex-grow: 1 !important;
    margin-top: 2px !important;
}

.ledger-content p, .ledger-content span, .ledger-content li {
    font-family: inherit !important;
    font-style: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 600px) {
    .ivan-ledger {
        padding-left: 55px !important;
        transform: none !important;
        margin-top: 50px !important;
    }
    .ivan-ledger::before { left: 40px !important; }
    .ivan-ledger-title { left: 5px !important; transform: none !important; }
}
/* ============================================
   БЛОК: АНКЕТА ПОРТФЕЛЯ (Типографский бланк)
   ============================================ */

.user-portfolio-check {
    background-color: #fffdf5 !important; /* Цвет старой бумаги */
    border: 2px solid #e2e8f0 !important;
    padding: 25px !important;
    margin: 30px 0 !important;
    border-radius: 8px !important;
    font-family: "Georgia", serif !important; /* Строгий книжный шрифт */
    color: #334155 !important;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.02), 5px 5px 15px rgba(0,0,0,0.05) !important;
}

/* Заголовок анкеты */
.portfolio-check-title {
    display: block !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    color: #b91c1c !important; /* Темно-красный акцент */
    border-bottom: 2px solid #fee2e2 !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Подзаголовки разделов */
.portfolio-check-section {
    display: block !important;
    font-weight: bold !important;
    font-size: 0.9em !important;
    margin: 20px 0 10px 0 !important;
    color: #475569 !important;
    text-decoration: underline dotted #cbd5e1 !important;
}

/* Стиль строк с прочерками */
.portfolio-line {
    display: block !important;
    margin-bottom: 12px !important;
    line-height: 1.6 !important;
}

/* Имитация линии для заполнения */
.portfolio-line span {
    border-bottom: 1px solid #94a3b8 !important;
    display: inline-block !important;
    min-width: 80px !important;
    text-align: center !important;
    margin: 0 5px !important;
    color: #1e40af !important; /* Цвет "будущих" записей */
}

/* Итоговая строка */
.portfolio-total {
    margin-top: 20px !important;
    padding: 15px !important;
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    font-weight: bold !important;
    font-size: 1.05em !important;
    color: #0f172a !important;
}