/* Гайд по браку: Unbounded, аккордеон, оглавление справа */

.defects-guide-page {
    --dg-text: #252525;
    --dg-muted: #5c5c5c;
    --dg-accent: #7231ff;
}

.defects-guide-page,
.defects-guide-page * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.defects-guide-page .defects-guide-main {
    padding-bottom: 48px;
}

.defects-guide-page .defects-guide-main .page-section.defects-guide-page-section {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 16px 0 64px;
    box-sizing: border-box;
}

.defects-guide-page .page-hero.defects-guide-top-spacer {
    padding: 4px 0 0;
    min-height: 0;
}

.defects-guide-page .page-hero.defects-guide-hero-title {
    padding-top: 0;
    padding-bottom: 12px;
}

.defects-guide-page .defects-guide-hero-title .page-title {
    font-size: clamp(24px, 3.5vw, 40px);
    line-height: 1.15;
    margin-bottom: 8px;
}

.defects-guide-page .defects-guide-hero-title .page-subtitle {
    font-size: 16px;
    line-height: 1.45;
}

.defects-guide-page .defects-guide-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(260px, 30%);
    gap: 24px;
    align-items: start;
}

.defects-guide-page .defects-guide-article {
    text-align: left;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--dg-text);
    min-width: 0;
}

.defects-guide-page .defects-guide-toc {
    position: sticky;
    top: 20px;
    padding: 20px 18px;
    align-self: start;
}

.defects-guide-page .defects-guide-toc-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dg-accent);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(114, 49, 255, 0.3);
    letter-spacing: 0.02em;
}

.defects-guide-page .defects-guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.defects-guide-page .defects-guide-toc-list li {
    margin-bottom: 8px;
}

.defects-guide-page .defects-guide-toc-list a {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--dg-text);
    text-decoration: none;
    display: block;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.defects-guide-page .defects-guide-toc-list a:hover,
.defects-guide-page .defects-guide-toc-list a:focus-visible {
    background: rgba(114, 49, 255, 0.1);
    color: var(--dg-accent);
    outline: none;
}

.defects-guide-page .defects-guide-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}

.defects-guide-page .defects-guide-acc-item {
    scroll-margin-top: 100px;
    border-bottom: 1px solid rgba(114, 49, 255, 0.15);
}

.defects-guide-page .defects-guide-acc-item:first-of-type {
    border-top: 1px solid rgba(114, 49, 255, 0.15);
}

.defects-guide-page .defects-guide-acc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 16px 4px 16px 0;
    text-align: left;
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: var(--dg-accent);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.15s ease;
}

.defects-guide-page .defects-guide-acc-trigger:hover {
    color: #5a1fd6;
}

.defects-guide-page .defects-guide-acc-trigger:focus-visible {
    outline: 2px solid var(--dg-accent);
    outline-offset: 4px;
}

.defects-guide-page .defects-guide-acc-trigger-text {
    flex: 1;
    min-width: 0;
}

.defects-guide-page .defects-guide-acc-trigger::after {
    content: '';
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 3px solid var(--dg-accent);
    border-bottom: 3px solid var(--dg-accent);
    transform: rotate(45deg);
    margin-top: -6px;
    transition: transform 0.2s ease;
}

.defects-guide-page .defects-guide-acc-item--open .defects-guide-acc-trigger::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.defects-guide-page .defects-guide-acc-panel {
    padding: 0 0 20px;
}

.defects-guide-page .defects-guide-acc-panel[hidden] {
    display: none;
}

.defects-guide-page .defects-guide-acc-panel > p:first-child {
    margin-top: 0;
}

.defects-guide-page .defects-guide-acc-panel h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.015em;
    color: var(--dg-accent);
    margin: 22px 0 12px;
    padding: 10px 0 10px 14px;
    border-left: 5px solid var(--dg-accent);
    background: linear-gradient(
        90deg,
        rgba(114, 49, 255, 0.08),
        rgba(114, 49, 255, 0)
    );
}

.defects-guide-page .defects-guide-acc-panel h3 i {
    margin-right: 8px;
    font-size: 0.95em;
}

.defects-guide-page .defects-guide-acc-panel h3 .fa-triangle-exclamation {
    color: #e6a700;
}

.defects-guide-page .defects-guide-acc-panel h3 .fa-circle-check {
    color: #28a745;
}

.defects-guide-page .defects-guide-acc-panel h4 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: var(--dg-text);
    margin: 18px 0 10px;
    padding-left: 12px;
    border-left: 3px solid rgba(114, 49, 255, 0.55);
}

.defects-guide-page .defects-guide-lead {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--dg-muted);
    margin: 0 0 22px;
}

.defects-guide-page .defects-guide-article p {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--dg-text);
    margin: 0 0 12px;
}

.defects-guide-page .defects-guide-acc-panel p {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--dg-text);
    margin: 0 0 12px;
}

.defects-guide-page .defects-guide-acc-panel ul {
    margin: 8px 0 16px;
    padding-left: 1.35rem;
    color: var(--dg-text);
}

.defects-guide-page .defects-guide-acc-panel li {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 8px;
    color: var(--dg-text);
}

.defects-guide-page .defects-guide-article strong,
.defects-guide-page .defects-guide-acc-panel strong {
    font-weight: 700;
    color: inherit;
}

.defects-guide-page .defects-guide-callout {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(37, 37, 37, 0.05);
    border-left: 5px solid var(--dg-accent);
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--dg-text);
}

.defects-guide-page .defects-guide-recommendations {
    list-style: none;
    padding-left: 0;
    margin: 0 0 8px;
}

.defects-guide-page .defects-guide-recommendations li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
}

.defects-guide-page .defects-guide-recommendations li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dg-accent);
}

.defects-guide-page .defects-guide-signoff {
    margin-top: 20px;
    margin-bottom: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--dg-muted);
}

@media (max-width: 900px) {
    .defects-guide-page .defects-guide-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .defects-guide-page .defects-guide-toc {
        position: static;
        order: -1;
        max-width: 100%;
        padding: 18px 16px;
        border-radius: 14px;
        background: rgba(114, 49, 255, 0.06);
        border: 1px solid rgba(114, 49, 255, 0.12);
    }

    .defects-guide-page .defects-guide-toc-title {
        font-size: 0.875rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .defects-guide-page .defects-guide-toc-list a {
        font-size: 0.875rem;
        line-height: 1.45;
        padding: 10px 10px;
        margin: 0 -6px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .defects-guide-page .defects-guide-main .page-section.defects-guide-page-section {
        padding-left: 0;
        padding-right: 0;
        padding-top: 12px;
        padding-bottom: 56px;
    }

    .defects-guide-page .defects-guide-hero-title .page-subtitle {
        font-size: 15px;
        line-height: 1.5;
        max-width: 36em;
    }

    .defects-guide-page .content-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .defects-guide-page .defects-guide-lead {
        font-size: 1.0625rem;
        line-height: 1.65;
        margin-bottom: 18px;
    }
}

@media (max-width: 640px) {
    .defects-guide-page .defects-guide-main {
        padding-bottom: 40px;
    }

    .defects-guide-page .defects-guide-hero-title .page-title {
        font-size: clamp(1.25rem, 6vw, 1.65rem);
        line-height: 1.2;
        margin-bottom: 10px;
        hyphens: auto;
        -webkit-hyphens: auto;
        overflow-wrap: break-word;
    }

    /* Длинные абзацы на узком экране: Roboto + чуть крупнее кегль и интерлиньяж */
    .defects-guide-page .defects-guide-article p,
    .defects-guide-page .defects-guide-article li,
    .defects-guide-page .defects-guide-article .defects-guide-callout {
        font-family: 'Roboto', system-ui, -apple-system, sans-serif;
        font-size: 1.0625rem;
        line-height: 1.68;
        letter-spacing: 0.01em;
        -webkit-font-smoothing: antialiased;
    }

    .defects-guide-page .defects-guide-article .defects-guide-signoff {
        font-family: 'Roboto', system-ui, -apple-system, sans-serif;
        font-size: 1rem;
        line-height: 1.6;
    }

    .defects-guide-page .defects-guide-acc-item {
        scroll-margin-top: 72px;
    }

    .defects-guide-page .defects-guide-acc-trigger {
        position: relative;
        font-size: clamp(1rem, 4vw, 1.2rem);
        font-weight: 700;
        line-height: 1.35;
        padding: 14px 36px 14px 0;
        min-height: 48px;
        align-items: center;
    }

    .defects-guide-page .defects-guide-acc-trigger::after {
        position: absolute;
        right: 2px;
        top: 50%;
        margin-top: 0;
        transform: translateY(-50%) rotate(45deg);
    }

    .defects-guide-page .defects-guide-acc-item--open .defects-guide-acc-trigger::after {
        transform: translateY(-50%) rotate(-135deg);
    }

    .defects-guide-page .defects-guide-acc-panel {
        padding: 4px 0 18px;
    }

    .defects-guide-page .defects-guide-acc-panel h3 {
        font-size: 1.05rem;
        line-height: 1.4;
        margin: 18px 0 10px;
        padding: 10px 10px 10px 11px;
        overflow-wrap: break-word;
    }

    .defects-guide-page .defects-guide-acc-panel h4 {
        font-size: 1rem;
        line-height: 1.45;
        margin: 16px 0 8px;
        overflow-wrap: break-word;
    }

    .defects-guide-page .defects-guide-acc-panel p {
        margin-bottom: 14px;
    }

    .defects-guide-page .defects-guide-acc-panel ul {
        padding-left: 1.2rem;
    }

    .defects-guide-page .defects-guide-acc-panel li {
        margin-bottom: 10px;
    }

    .defects-guide-page .defects-guide-callout {
        padding: 14px 14px;
        font-size: 1.0625rem;
        line-height: 1.65;
    }

    .defects-guide-page .defects-guide-recommendations li {
        font-family: 'Roboto', system-ui, -apple-system, sans-serif;
        font-size: 1.0625rem;
        line-height: 1.65;
        padding-left: 1.35rem;
        margin-bottom: 14px;
    }

    .defects-guide-page .content-card {
        padding: 16px 14px;
    }
}
