/* ============================================ */
/*  GUIDES - Editorial Article Stylesheet      */
/*  Inherits CSS vars from root (index.html)   */
/*  Supports light + dark via var(--xxx)       */
/* ============================================ */


/* -------------------------------------------- */
/*  Container                                   */
/* -------------------------------------------- */

.guide-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 32px 80px;
}


/* -------------------------------------------- */
/*  Header                                      */
/* -------------------------------------------- */

.guide-header {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 48px;
}

.guide-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guide-breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.guide-breadcrumb a:hover {
    color: var(--accent-hover);
}

.guide-breadcrumb .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.guide-header h1 {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 16px;
}

.guide-header h1 em {
    font-style: italic;
    color: var(--accent-primary);
}

.guide-header .guide-subtitle {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.guide-meta .meta-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
}


/* -------------------------------------------- */
/*  Table of Contents                           */
/* -------------------------------------------- */

.guide-toc {
    background: var(--bg-section-alt);
    border: 1px solid var(--border-subtle);
    padding: 28px 32px;
    margin-bottom: 48px;
}

.guide-toc .toc-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin: 0 0 16px;
}

.guide-toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
    margin: 0;
}

.guide-toc ol li {
    counter-increment: toc-counter;
    margin-bottom: 10px;
}

.guide-toc ol li:last-child {
    margin-bottom: 0;
}

.guide-toc ol li::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-right: 12px;
    letter-spacing: 0.05em;
}

.guide-toc ol li a {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.guide-toc ol li a:hover {
    color: var(--accent-primary);
}


/* -------------------------------------------- */
/*  Content - Headings                          */
/* -------------------------------------------- */

.guide-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 56px 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.guide-content h2:first-child {
    margin-top: 0;
}

.guide-content h3 {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 40px 0 12px;
}

.guide-content h4 {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 32px 0 8px;
}


/* -------------------------------------------- */
/*  Content - Body Text                         */
/* -------------------------------------------- */

.guide-content p {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0 0 20px;
    letter-spacing: -0.005em;
}

.guide-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guide-content em {
    font-style: italic;
}


/* -------------------------------------------- */
/*  Content - Links                             */
/* -------------------------------------------- */

.guide-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(196, 94, 62, 0.3);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.guide-content a:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-hover);
}

[data-theme="dark"] .guide-content a {
    text-decoration-color: rgba(224, 122, 95, 0.3);
}


/* -------------------------------------------- */
/*  Content - Lists                             */
/* -------------------------------------------- */

.guide-content ul,
.guide-content ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.guide-content ul {
    list-style: none;
    padding-left: 0;
}

.guide-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.guide-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.7;
}

.guide-content ol {
    list-style: none;
    counter-reset: guide-ol-counter;
    padding-left: 0;
}

.guide-content ol li {
    counter-increment: guide-ol-counter;
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.guide-content ol li::before {
    content: counter(guide-ol-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.guide-content li strong {
    color: var(--text-primary);
}


/* -------------------------------------------- */
/*  Content - Code                              */
/* -------------------------------------------- */

.guide-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-section-alt);
    border: 1px solid var(--border-subtle);
    padding: 2px 6px;
    border-radius: 2px;
    color: var(--text-primary);
}

.guide-content pre {
    background: var(--bg-section-alt);
    border: 1px solid var(--border-subtle);
    padding: 24px;
    margin: 0 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guide-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}


/* -------------------------------------------- */
/*  Content - Blockquotes                       */
/* -------------------------------------------- */

.guide-content blockquote {
    margin: 0 0 24px;
    padding: 20px 24px;
    border-left: 3px solid var(--accent-primary);
    background: transparent;
}

.guide-content blockquote p {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}


/* -------------------------------------------- */
/*  Callout Box                                 */
/* -------------------------------------------- */

.guide-callout {
    border-left: 3px solid var(--accent-primary);
    background: var(--bg-section-alt);
    padding: 24px 28px;
    margin: 32px 0;
}

.guide-callout .callout-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    margin: 0 0 8px;
}

.guide-callout p {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

.guide-callout p + p {
    margin-top: 12px;
}

.guide-callout strong {
    color: var(--text-primary);
}


/* -------------------------------------------- */
/*  Stats Grid                                  */
/* -------------------------------------------- */

.guide-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border-subtle);
    margin: 32px 0;
}

.guide-stat {
    text-align: center;
    padding: 28px 20px;
    border-right: 1px solid var(--border-subtle);
}

.guide-stat:last-child {
    border-right: none;
}

.guide-stat .stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--accent-primary);
    line-height: 1.1;
    margin: 0 0 8px;
}

.guide-stat .stat-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    margin: 0;
}


/* -------------------------------------------- */
/*  Table                                       */
/* -------------------------------------------- */

.guide-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0 32px;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    min-width: 580px;
}

.guide-table thead th {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-subtle);
    white-space: nowrap;
}

.guide-table tbody td {
    padding: 14px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    line-height: 1.5;
    vertical-align: top;
}

.guide-table tbody tr:last-child td {
    border-bottom: none;
}

.guide-table tbody td strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guide-table tbody td code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background: var(--bg-section-alt);
    border: 1px solid var(--border-subtle);
    padding: 1px 5px;
    border-radius: 2px;
}

.guide-table .highlight-row td {
    color: var(--text-primary);
    font-weight: 500;
    background: var(--bg-section-alt);
}


/* -------------------------------------------- */
/*  Call to Action                              */
/* -------------------------------------------- */

.guide-cta {
    border: 1px solid var(--border-subtle);
    padding: 48px 40px;
    margin: 56px 0;
    text-align: center;
    background: var(--bg-section-alt);
}

.guide-cta .cta-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin: 0 0 16px;
}

.guide-cta h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.guide-cta p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.guide-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 500;
    border: 1px solid var(--text-primary);
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.guide-cta .btn-primary:hover {
    opacity: 0.85;
}


/* -------------------------------------------- */
/*  Footer / Back Navigation                    */
/* -------------------------------------------- */

.guide-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 32px;
    margin-top: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.guide-footer a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.guide-footer a:hover {
    color: var(--accent-primary);
}

.guide-footer .footer-arrow {
    font-size: 1rem;
    line-height: 1;
}


/* -------------------------------------------- */
/*  Content Divider                             */
/* -------------------------------------------- */

.guide-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 48px 0;
}


/* -------------------------------------------- */
/*  Image / Figure                              */
/* -------------------------------------------- */

.guide-content figure {
    margin: 32px 0;
}

.guide-content figure img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-subtle);
    display: block;
}

.guide-content figcaption {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 12px;
    text-align: center;
}


/* -------------------------------------------- */
/*  Responsive - Tablet (768px)                 */
/* -------------------------------------------- */

@media (max-width: 768px) {
    .guide-container {
        padding: 0 24px 60px;
    }

    .guide-header {
        padding: 36px 0 32px;
        margin-bottom: 36px;
    }

    .guide-header h1 {
        font-size: 2.5rem;
    }

    .guide-header .guide-subtitle {
        font-size: 1rem;
    }

    .guide-meta {
        gap: 12px;
    }

    .guide-toc {
        padding: 24px;
        margin-bottom: 36px;
    }

    .guide-content h2 {
        font-size: 1.75rem;
        margin-top: 44px;
    }

    .guide-content h3 {
        font-size: 1.25rem;
        margin-top: 32px;
    }

    .guide-content p,
    .guide-content ul li,
    .guide-content ol li {
        font-size: 1rem;
    }

    .guide-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-stat {
        padding: 20px 12px;
    }

    .guide-stat:nth-child(2) {
        border-right: none;
    }

    .guide-stat:nth-child(1),
    .guide-stat:nth-child(2) {
        border-bottom: 1px solid var(--border-subtle);
    }

    .guide-stat .stat-number {
        font-size: 2rem;
    }

    .guide-table {
        font-size: 0.875rem;
    }

    .guide-table thead th,
    .guide-table tbody td {
        padding: 10px 12px;
    }

    .guide-cta {
        padding: 36px 28px;
        margin: 44px 0;
    }

    .guide-cta h3 {
        font-size: 1.75rem;
    }

    .guide-callout {
        padding: 20px 24px;
    }

    .guide-content pre {
        padding: 20px;
    }
}


/* -------------------------------------------- */
/*  Responsive - Mobile (480px)                 */
/* -------------------------------------------- */

@media (max-width: 480px) {
    .guide-container {
        padding: 0 16px 48px;
    }

    .guide-header {
        padding: 28px 0 24px;
        margin-bottom: 28px;
    }

    .guide-header h1 {
        font-size: 2rem;
        line-height: 1.15;
    }

    .guide-header .guide-subtitle {
        font-size: 0.9375rem;
    }

    .guide-breadcrumb {
        font-size: 0.625rem;
        margin-bottom: 20px;
    }

    .guide-meta {
        gap: 8px;
        font-size: 0.625rem;
    }

    .guide-meta .meta-divider {
        width: 2px;
        height: 2px;
    }

    .guide-toc {
        padding: 20px;
        margin-bottom: 28px;
    }

    .guide-toc ol li a {
        font-size: 0.875rem;
    }

    .guide-content h2 {
        font-size: 1.5rem;
        margin-top: 36px;
    }

    .guide-content h3 {
        font-size: 1.125rem;
        margin-top: 28px;
    }

    .guide-content p,
    .guide-content ul li,
    .guide-content ol li {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    .guide-content ol li {
        padding-left: 28px;
    }

    .guide-stats {
        grid-template-columns: 1fr;
        border: none;
        gap: 0;
    }

    .guide-stat {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 20px 16px;
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 12px;
    }

    .guide-stat:first-child {
        border-top: 1px solid var(--border-subtle);
    }

    .guide-stat:last-child {
        border-bottom: 1px solid var(--border-subtle);
    }

    .guide-stat .stat-number {
        font-size: 1.75rem;
        margin: 0;
        flex-shrink: 0;
    }

    .guide-stat .stat-label {
        margin: 0;
    }

    .guide-table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .guide-table thead th,
    .guide-table tbody td {
        padding: 10px;
        white-space: nowrap;
    }

    .guide-cta {
        padding: 32px 20px;
        margin: 36px 0;
    }

    .guide-cta h3 {
        font-size: 1.5rem;
    }

    .guide-cta p {
        font-size: 0.9375rem;
    }

    .guide-cta .btn-primary {
        padding: 14px 32px;
        font-size: 0.75rem;
        width: 100%;
    }

    .guide-callout {
        padding: 18px 20px;
        margin: 24px 0;
    }

    .guide-callout p {
        font-size: 0.875rem;
    }

    .guide-content pre {
        padding: 16px;
        margin: 0 -16px 24px;
        border-left: none;
        border-right: none;
    }

    .guide-content pre code {
        font-size: 0.75rem;
    }

    .guide-content blockquote {
        padding: 16px 20px;
    }

    .guide-content blockquote p {
        font-size: 1.125rem;
    }

    .guide-footer {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 24px;
        margin-top: 40px;
    }
}
