/* ===== Static Pages (Offer, Policy, About, etc.) ===== */

/* Hero */
.static-page-hero {
    background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6b 100%);
    padding: 120px 24px 56px;
    text-align: center;
}

.static-page-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.static-page-hero-title {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.static-page-hero-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 17px;
    font-weight: 400;
    margin: 0;
    line-height: 1.6;
}

/* Content area */
.static-page-content {
    max-width: 900px;
    width: 100%;
    margin: -32px auto 80px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.static-page-content--wide {
    max-width: 1060px;
}

.static-page-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 56px;
    box-shadow: 0 2px 12px rgba(18, 41, 75, 0.06);
    border: 1px solid rgba(18, 41, 75, 0.06);
    line-height: 1.75;
    color: #2a3a4e;
    font-size: 15px;
}

.static-page-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
    margin-top: 32px;
}

.static-page-card h4:first-child {
    margin-top: 0;
}

.static-page-card a:not([class*="error-page-btn"]) {
    color: var(--color-blue-dark, #3657CD);
    text-decoration: underline;
    text-decoration-color: rgba(54, 87, 205, 0.3);
    transition: text-decoration-color 0.2s;
}

.static-page-card a:not([class*="error-page-btn"]):hover {
    text-decoration-color: var(--color-blue-dark, #3657CD);
}

.static-page-card p {
    text-align: justify;
}

.static-page-card .sp-heading {
    text-align: center;
}

.static-page-card .sp-empty-state {
    text-align: center;
    color: #9ba8b7;
}

.static-page-card ul,
.static-page-card ol {
    padding-left: 24px;
}

.static-page-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.static-page-card table th,
.static-page-card table td {
    padding: 10px 14px;
    border: 1px solid #e0e6ee;
    font-size: 14px;
}

.static-page-card table th {
    background: #f5f7fa;
    font-weight: 600;
    color: #12294B;
}

/* ===== About Page ===== */
.about-section-title {
    color: #12294B;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4ff;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.about-feature-card {
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    transition: box-shadow 0.25s, transform 0.25s;
}

.about-feature-card:hover {
    box-shadow: 0 6px 24px rgba(18, 41, 75, 0.1);
    transform: translateY(-2px);
}

.about-feature-icon {
    width: 40px;
    height: 40px;
    background: #f0f4ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.about-feature-card h4 {
    color: #12294B;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.about-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about-card {
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
}

.about-card h4 {
    color: #12294B;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.about-card-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f7;
    font-size: 14px;
}

.about-card-row:last-child {
    border-bottom: none;
}

.about-card-label {
    color: #9ba8b7;
    min-width: 110px;
    flex-shrink: 0;
    font-weight: 500;
}

.about-card-value {
    color: #12294B;
    word-break: break-word;
}

.about-card-value a {
    color: var(--color-blue-dark, #3657CD);
    text-decoration: none;
}

.about-card-value a:hover {
    text-decoration: underline;
}

/* ===== FAQ Page ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(18, 41, 75, 0.08);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    gap: 16px;
    user-select: none;
}

.faq-question-text {
    font-size: 16px;
    font-weight: 600;
    color: #12294B;
    line-height: 1.4;
}

.faq-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.3s;
}

.faq-item.open .faq-toggle {
    background: var(--color-blue-dark, #12294B);
    transform: rotate(45deg);
}

.faq-item.open .faq-toggle svg path {
    stroke: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 600px;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    font-size: 15px;
    color: #5a6a7e;
    line-height: 1.7;
}

/* ===== Error Pages ===== */
.error-page-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-page-icon--danger {
    background: #fee2e2;
    color: #dc2626;
}

.error-page-icon--info {
    background: #e0edff;
    color: #1a3a6b;
}

.error-page-icon svg {
    width: 36px;
    height: 36px;
}

.error-page-code {
    font-size: 64px;
    font-weight: 800;
    color: #12294B;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    text-align: center;
}

.error-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #12294B;
    margin: 0 0 12px;
    text-align: center;
}

.error-page-desc {
    font-size: 15px;
    color: #5a6a7e;
    line-height: 1.7;
    text-align: center;
    margin: 0 0 28px;
}

.error-page-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.error-page-actions--row {
    flex-direction: row;
    justify-content: center;
    gap: 18px;
}

@media (max-width: 500px) {
    .error-page-actions--row {
        flex-direction: column;
    }
}

.error-page-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.error-page-btn-primary,
.error-page-btn-primary:visited,
.error-page-btn-primary:hover,
.error-page-btn-primary:active {
    background: linear-gradient(135deg, #3657CD 0%, #12294B 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(54, 87, 205, 0.2);
}

.error-page-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(54, 87, 205, 0.35);
}

.error-page-btn-outline {
    background: #ffffff;
    color: #12294B;
    border: 1.5px solid #e0e6ee;
}

.error-page-btn-outline:hover {
    background: #f8f9fb;
    border-color: #cdd4de;
}

.error-page-info {
    background: #f0f4ff;
    border: 1px solid #d6e0f5;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    color: #3a4a6a;
    line-height: 1.6;
    margin-bottom: 28px;
    text-align: left;
}

.error-page-info ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.error-page-info li {
    margin-bottom: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-cards-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .static-page-hero {
        padding: 100px 20px 40px;
    }

    .static-page-hero-title {
        font-size: 28px;
    }

    .static-page-hero-subtitle {
        font-size: 15px;
    }

    .static-page-content {
        padding: 0 16px;
        margin-bottom: 48px;
    }

    .static-page-card {
        padding: 28px 24px;
        border-radius: 16px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .error-page-code {
        font-size: 48px;
    }

    .error-page-title {
        font-size: 19px;
    }

    .error-page-actions a {
        min-width: 180px;
    }
}

/* ===== Video page ===== */
.video-page-title {
    margin: 0 auto;
    text-align: center;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.video-card {
    border: 1px solid #e0e4ea;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.video-card-player {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-card-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card-body {
    padding: 16px;
}

.video-card-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.video-card-desc {
    margin: 0;
    color: #3a4a6a;
    font-size: 0.95rem;
    line-height: 1.5;
}

.video-empty {
    text-align: center;
    color: #7a8aaa;
}

/* ===== Knowledge Base Page ===== */
.kb-search-wrap {
    position: relative;
    margin-bottom: 32px;
}

.kb-search-input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border: 1px solid rgba(18, 41, 75, 0.12);
    border-radius: 14px;
    font-size: 15px;
    color: #12294B;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.kb-search-input::placeholder {
    color: #9ba8b7;
}

.kb-search-input:focus {
    border-color: var(--color-blue-dark, #3657CD);
    box-shadow: 0 2px 12px rgba(54, 87, 205, 0.12);
}

.kb-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.kb-no-results {
    text-align: center;
    color: #9ba8b7;
    font-size: 15px;
    padding: 48px 24px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(18, 41, 75, 0.06);
}

.kb-category {
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.06);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    overflow: hidden;
}

.kb-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 0;
}

.kb-category-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #f0f4ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-category-title {
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
    margin: 0 0 4px;
}

.kb-category-desc {
    font-size: 14px;
    color: #9ba8b7;
    margin: 0;
    line-height: 1.4;
}

.kb-items {
    padding: 16px 28px 8px;
}

.kb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    text-decoration: none;
    color: #2a3a4e;
    font-size: 15px;
    transition: background 0.15s, color 0.15s;
}

.kb-item:hover {
    background: #f5f7fc;
    color: #12294B;
    text-decoration: none;
}

.kb-item-num {
    font-size: 13px;
    font-weight: 600;
    color: #9ba8b7;
    min-width: 32px;
}

.kb-item-text {
    flex: 1;
    line-height: 1.4;
}

.kb-item-arrow {
    flex-shrink: 0;
    color: #cdd4de;
    transition: color 0.15s, transform 0.15s;
}

.kb-item:hover .kb-item-arrow {
    color: var(--color-blue-dark, #3657CD);
    transform: translateX(2px);
}

.kb-footer-info {
    text-align: center;
    color: #9ba8b7;
    font-size: 14px;
    margin-top: 12px;
    padding: 16px 0;
}

@media (max-width: 640px) {
    .kb-category-header {
        padding: 20px 20px 0;
    }

    .kb-items {
        padding: 12px 12px 4px;
    }

    .kb-item {
        padding: 10px 12px;
    }

    .kb-category-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .kb-category-title {
        font-size: 16px;
    }
}

/* ===== KB Article Detail Page ===== */

/* Breadcrumbs */
.kb-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 28px;
    padding: 12px 16px;
    background: #f7f8fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.kb-breadcrumbs a {
    color: var(--color-blue-dark, #3657CD);
    text-decoration: none;
    font-weight: 600;
}

.kb-breadcrumbs a:hover {
    text-decoration: underline;
}

.kb-breadcrumbs .kb-breadcrumb-sep {
    color: #9ba8b7;
}

.kb-breadcrumbs > span:last-child {
    color: #2a3a4e;
    font-weight: 500;
}

/* Article header */
.kb-article-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(18, 41, 75, 0.08);
}

.kb-article-title {
    font-size: 28px;
    font-weight: 800;
    color: #12294B;
    margin: 0 0 8px;
    line-height: 1.25;
}

.kb-article-subtitle {
    font-size: 16px;
    color: #9ba8b7;
    margin: 0;
    line-height: 1.5;
}

/* Video overview block — hide step number, use play icon instead */
.kb-video-wrapper {
    margin-bottom: 24px;
}

.kb-video-step {
    counter-increment: none !important;
}

.kb-video-step::before {
    background: #1a3a6b !important;
}

.kb-video-step h2::before {
    content: "\25B6" !important;
    font-size: 14px;
    background: #1a3a6b !important;
    color: #fff !important;
}

/* Navigation between articles */
.kb-article-nav {
    display: flex;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(18, 41, 75, 0.08);
}

.kb-article-nav a {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    text-decoration: none;
    color: #2a3a4e;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kb-article-nav a:hover {
    border-color: var(--color-blue-dark, #3657CD);
    box-shadow: 0 2px 8px rgba(54, 87, 205, 0.1);
    text-decoration: none;
}

.kb-article-nav .kb-nav-next {
    justify-content: flex-end;
    text-align: right;
}

/* ===== Instruction Styles (CKEditor-friendly: semantic HTML) ===== */
/*
 * Styles for KB articles edited via CKEditor in Django Admin.
 * CKEditor strips custom classes, so styles target semantic HTML:
 *   h2        → step heading (auto-numbered via CSS counter)
 *   h3        → sub-heading (problem title, etc.)
 *   ol, ul    → step lists
 *   blockquote→ note/tip/warning block
 *   p, li     → body text
 *   img       → screenshot
 *   a         → link
 *
 * Legacy class-based styles (.inst-step, .inst-note, etc.) are kept
 * below for backward compatibility with pre-existing template content.
 */

.instruction {
    counter-reset: inst-step;
}

.instruction p {
    margin: 10px 0;
    line-height: 1.7;
    color: #2a3a4e;
    font-size: 15px;
}

.instruction ol,
.instruction ul {
    margin: 10px 0 10px 22px;
    color: #2a3a4e;
}

.instruction li {
    margin: 7px 0;
    line-height: 1.7;
    font-size: 15px;
}

.instruction a {
    color: var(--color-blue-dark, #3657CD);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.instruction a:hover {
    color: #1e40af;
}

/* ---- h2: Step heading with auto-numbering ---- */
.instruction h2 {
    position: relative;
    counter-increment: inst-step;
    margin: 28px 0 14px;
    padding: 16px 18px 16px 56px;
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-left: 5px solid var(--color-blue-dark, #3657CD);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    line-height: 1.4;
}

.instruction h2::before {
    content: counter(inst-step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #f0f4ff;
    border: 1px solid #bfdbfe;
    color: var(--color-blue-dark, #3657CD);
    font: 700 14px/1 system-ui;
}

/* First h2 in article (intro) — no number, different style */
.instruction h2:first-child {
    counter-increment: none;
    border-left-color: #10b981;
    padding-left: 18px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.instruction h2:first-child::before {
    content: none;
}

/* ---- h3: Sub-heading (problem titles, etc.) ---- */
.instruction h3 {
    margin: 20px 0 10px;
    padding: 12px 16px 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #991b1b;
    background: #fff;
    border: 1px solid #fecaca;
    border-left: 5px solid #ef4444;
    border-radius: 10px;
}

/* ---- blockquote: Note/tip block ---- */
.instruction blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 6px solid var(--color-blue-dark, #3657CD);
    position: relative;
    font-size: 15px;
    color: #1e40af;
}

.instruction blockquote::before {
    content: "💡";
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 16px;
    background: #eff6ff;
    padding: 0 6px;
    border-radius: 999px;
}

.instruction blockquote p {
    margin: 0;
    color: inherit;
}

/* ---- img: Screenshot styling ---- */
.instruction img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* ---- hr: Section divider ---- */
.instruction hr {
    border: none;
    border-top: 1px solid rgba(18, 41, 75, 0.08);
    margin: 28px 0;
}

/* ---- table: Data tables ---- */
.instruction table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.instruction th {
    background: #f0f4ff;
    color: #12294B;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid #bfdbfe;
}

.instruction td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #2a3a4e;
}

.instruction tr:last-child td {
    border-bottom: none;
}

.instruction tr:hover td {
    background: #f8fafc;
}

/* ---- strong inside list items: accent ---- */
.instruction li strong {
    color: #12294B;
}

/* ---- Video embed (iframe) ---- */
.instruction iframe {
    display: block;
    width: 100%;
    max-width: 720px;
    height: 405px;
    margin: 20px auto;
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}


/* ===== Legacy class-based styles (backward compat) ===== */
/* Kept for articles populated from HTML templates with classes intact */

/* Section intro */
.instruction .inst-intro {
    margin-bottom: 24px;
}

.instruction .inst-intro h2 {
    counter-increment: none;
    border-left-color: #10b981;
    padding-left: 18px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.instruction .inst-intro h2::before {
    content: none;
}

/* Step block */
.instruction .inst-step {
    position: relative;
    padding: 20px 20px 20px 22px;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(18, 41, 75, 0.04);
    overflow: hidden;
    margin-bottom: 16px;
}

.instruction .inst-step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: var(--color-blue-dark, #3657CD);
}

.instruction .inst-step h2 {
    border: none;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction .inst-step h2::before {
    position: static;
    transform: none;
}

/* Notes */
.instruction .inst-note {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 6px solid #f59e0b;
    position: relative;
}

.instruction .inst-note::before {
    content: "Важно";
    position: absolute;
    top: -10px;
    left: 12px;
    font: 700 12px/1 system-ui;
    color: #92400e;
    background: #fff7ed;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #fed7aa;
}

.instruction .inst-note p {
    color: #92400e;
}

.instruction .inst-note-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-left-color: #10b981;
}

.instruction .inst-note-ok::before {
    content: "Готово";
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.instruction .inst-note-ok p {
    color: #065f46;
}

.instruction .inst-note-warn {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #ef4444;
}

.instruction .inst-note-warn::before {
    content: "Внимание";
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.instruction .inst-note-warn p {
    color: #991b1b;
}

.instruction .inst-note-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    border-left-color: var(--color-blue-dark, #3657CD);
}

.instruction .inst-note-info::before {
    content: "Подсказка";
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.instruction .inst-note-info p {
    color: #1e40af;
}

/* Screenshot placeholder */
.instruction .inst-media {
    margin: 16px 0 0;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    position: relative;
}

.instruction .inst-media::before {
    content: "Скриншот";
    position: absolute;
    top: -10px;
    left: 16px;
    background: #fff;
    border: 1px solid #dbeafe;
    color: var(--color-blue-dark, #3657CD);
    font: 600 12px/1 system-ui;
    padding: 3px 10px;
    border-radius: 999px;
}

.instruction .inst-media img {
    margin: 0;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.instruction .inst-media figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: #475569;
}

/* Image/video placeholder */
.instruction .inst-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf4 100%);
    border: 2px dashed #bfcde0;
    color: #7a8aaa;
    text-align: center;
    padding: 24px;
}

.instruction .inst-placeholder svg { opacity: 0.5; }
.instruction .inst-placeholder-text { font-size: 14px; font-weight: 500; color: #9ba8b7; }
.instruction .inst-placeholder-device { font-size: 12px; font-weight: 600; color: #b0bac9; text-transform: uppercase; letter-spacing: 0.05em; }

.instruction .inst-video-placeholder {
    min-height: 280px;
    background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6b 100%);
    border-color: #2a4a7a;
}
.instruction .inst-video-placeholder svg { opacity: 0.7; color: rgba(255, 255, 255, 0.6); }
.instruction .inst-video-placeholder .inst-placeholder-text { color: rgba(255, 255, 255, 0.5); }
.instruction .inst-video-placeholder .inst-placeholder-device { color: rgba(255, 255, 255, 0.35); }

/* Device tabs */
.instruction .inst-device-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.instruction .inst-device-tab { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(18, 41, 75, 0.12); background: #ffffff; cursor: pointer; font-size: 13px; font-weight: 600; color: #2a3a4e; transition: 0.2s; }
.instruction .inst-device-tab:hover { border-color: var(--color-blue-dark, #3657CD); color: var(--color-blue-dark, #3657CD); }
.instruction .inst-device-tab.active { background: var(--color-blue-dark, #3657CD); color: #ffffff; border-color: var(--color-blue-dark, #3657CD); }
.instruction .inst-device-content { display: none; }
.instruction .inst-device-content.active { display: block; }

/* Compare (side-by-side) */
.instruction .inst-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.instruction .inst-compare figure { margin: 0; }

/* Quick summary */
.instruction .inst-summary {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: #f0f4ff;
    border: 1px solid #dbeafe;
}
.instruction .inst-summary h2 { counter-increment: none; border: none; box-shadow: none; background: none; padding: 0; margin: 0 0 12px; font-size: 18px; }
.instruction .inst-summary h2::before { content: none; }
.instruction .inst-summary ol { margin: 0 0 0 20px; }
.instruction .inst-summary li { margin: 6px 0; font-size: 15px; }

/* Troubleshooting */
.instruction .inst-troubles {
    padding: 20px 20px 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fbfdff;
    margin-top: 24px;
}
.instruction .inst-troubles h2 { counter-increment: none; border: none; box-shadow: none; background: none; padding: 0; margin: 0 0 12px; font-size: 18px; }
.instruction .inst-troubles h2::before { content: none; }

.instruction .inst-problem {
    position: relative;
    padding: 16px 16px 16px 18px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.04);
    overflow: hidden;
}
.instruction .inst-problem::before { content: ""; position: absolute; left: 0; top: 0; width: 6px; height: 100%; background: #ef4444; border-radius: 16px 0 0 16px; }
.instruction .inst-problem h3 { margin: 0 0 8px; border: none; background: none; padding: 0; font-size: 16px; color: #991b1b; font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .kb-article-title {
        font-size: 22px;
    }

    .instruction h2 {
        font-size: 16px;
        padding: 12px 14px 12px 48px;
    }

    .instruction h2::before {
        min-width: 26px;
        height: 26px;
        font-size: 12px;
        left: 12px;
    }

    .instruction h3 {
        font-size: 15px;
        padding: 10px 14px 10px 16px;
    }

    .instruction iframe {
        height: 220px;
    }

    .instruction .inst-step {
        padding: 14px 14px 14px 16px;
        border-radius: 14px;
    }

    .instruction .inst-compare {
        grid-template-columns: 1fr;
    }

    .instruction .inst-placeholder {
        min-height: 160px;
    }

    .instruction .inst-video-placeholder {
        min-height: 200px;
    }

    .kb-article-nav {
        flex-direction: column;
    }
}
