/* =========================================================
   CS17 GUIDE SYSTEM
   MASTER GUIDE CSS
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

.cs17-guide {
    width: calc(100% - 32px);
    max-width: 1180px;
    margin: 24px auto 50px;
}

/* TOP BAR */

.cs17-guide-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cs17-guide-back {
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.cs17-guide-back:hover {
    text-decoration: underline;
}

.cs17-guide-print {
    border: 0;
    border-radius: 8px;
    background: #172033;
    color: #fff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* HERO */

.cs17-guide-hero {
    padding: 26px 28px;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: #fff;
}

.cs17-guide-category {
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cs17-guide-hero h1 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 34px;
    line-height: 1.15;
}

.cs17-guide-summary {
    max-width: 850px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

/* FACTS */

.cs17-guide-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.cs17-guide-fact {
    padding: 14px 16px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
}

.cs17-guide-fact strong {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
}

.cs17-guide-fact span {
    font-weight: 700;
}

/* PAGE LAYOUT */

.cs17-guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 20px;
    align-items: start;
}

/* ARTICLE */

.cs17-guide-article {
    min-width: 0;
}

.cs17-guide-section {
    margin-bottom: 14px;
    padding: 22px 24px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #fff;
}

.cs17-guide-section h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 22px;
}

.cs17-guide-section h3 {
    margin: 18px 0 7px;
    color: #172033;
    font-size: 17px;
}

.cs17-guide-section p:first-child {
    margin-top: 0;
}

.cs17-guide-section p:last-child {
    margin-bottom: 0;
}

.cs17-guide-section ul,
.cs17-guide-section ol {
    padding-left: 22px;
}

/* IMAGE */

.cs17-guide-image {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #fff;
}

.cs17-guide-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.cs17-guide-image figcaption {
    padding: 10px 4px 2px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

/* SIDE NAVIGATION */

.cs17-guide-side {
    position: sticky;
    top: 18px;
    padding: 18px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #fff;
}

.cs17-guide-side h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.cs17-guide-nav a {
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid #edf1f5;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
}

.cs17-guide-nav a:last-child {
    border-bottom: 0;
}

.cs17-guide-nav a:hover {
    color: #2563eb;
}

/* RELATED */

.cs17-guide-related {
    padding: 22px 24px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #fff;
}

.cs17-guide-related h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

/* RESPONSIVE */

@media (max-width: 800px) {

    .cs17-guide {
        width: calc(100% - 20px);
        margin-top: 12px;
    }

    .cs17-guide-hero {
        padding: 20px;
    }

    .cs17-guide-hero h1 {
        font-size: 28px;
    }

    .cs17-guide-facts {
        grid-template-columns: 1fr;
    }

    .cs17-guide-layout {
        grid-template-columns: 1fr;
    }

    .cs17-guide-side {
        position: static;
        order: -1;
    }

    .cs17-guide-section {
        padding: 18px;
    }
}

/* PRINT */

@media print {

    body {
        background: #fff;
    }

    .cs17-guide {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .cs17-guide-top,
    .cs17-guide-side {
        display: none !important;
    }

    .cs17-guide-layout {
        display: block;
    }

    .cs17-guide-hero,
    .cs17-guide-fact,
    .cs17-guide-section,
    .cs17-guide-image,
    .cs17-guide-related {
        border-color: #bbb;
        box-shadow: none;
    }
}