/* Guide pages (/guides, /guides/:slug). Loaded AFTER home-styles.css, which
   provides the design tokens (:root vars), nav, footer, .section-tag, and
   .btn-primary. This file only adds the article/index layout + typography. */

.guides-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 8.5rem 2rem 5rem;
}

/* ─── INDEX ─── */
.guides-hero { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }

.guides-hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 0.75rem 0 1rem;
}

.guides-hero-sub { color: var(--text-muted); font-size: 1rem; }

.guides-empty { text-align: center; color: var(--text-muted); }

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(107, 170, 128, 0.2);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.6rem;
    text-decoration: none;
    transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.guide-card:hover {
    box-shadow: 0 8px 30px rgba(28, 61, 42, 0.1);
    border-color: var(--sage);
    transform: translateY(-2px);
}

.guide-card-tag {
    align-self: flex-start;
    background: var(--sage-pale);
    color: var(--forest-mid);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 0.2rem 0.7rem;
    margin-bottom: 0.9rem;
}

.guide-card-title {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.guide-card-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; flex: 1; }

.guide-card-meta { margin-top: 1rem; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

/* ─── ARTICLE ─── */
.guide-article { max-width: 720px; margin: 0 auto; }

.guide-back {
    display: inline-block;
    color: var(--forest-mid);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
}
.guide-back:hover { color: var(--forest); }

.guide-article-header { margin-bottom: 2.5rem; }
.guide-article-header .guide-card-tag { display: inline-block; }

.guide-article-header h1 {
    font-family: 'Lora', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
    margin: 0.75rem 0 0.5rem;
}

.guide-article-meta { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; margin: 0; }

.guide-body { font-size: 1rem; color: var(--text-body); }

.guide-body h2 {
    font-family: 'Lora', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.25rem 0 0.75rem;
    line-height: 1.3;
}

.guide-body h3 {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.75rem 0 0.5rem;
}

.guide-body p { margin: 0 0 1.1rem; line-height: 1.75; }
.guide-body ul, .guide-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.guide-body li { margin-bottom: 0.45rem; line-height: 1.65; }
.guide-body a { color: var(--forest-mid); font-weight: 600; }
.guide-body strong { color: var(--text-dark); }

.guide-body blockquote {
    border-left: 3px solid var(--sage);
    background: var(--sage-pale);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.1rem;
    color: var(--text-body);
}
.guide-body blockquote p:last-child { margin-bottom: 0; }

.guide-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
}
.guide-body th, .guide-body td {
    border: 1px solid rgba(107, 170, 128, 0.3);
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.guide-body th { background: var(--sage-pale); color: var(--text-dark); font-weight: 700; }

.guide-body hr { border: none; border-top: 1px solid rgba(107, 170, 128, 0.3); margin: 2rem 0; }

/* ─── ARTICLE CTA (waitlist bridge) ─── */
.guide-cta {
    margin-top: 3rem;
    background: var(--forest);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    text-align: center;
}

.guide-cta h2 {
    font-family: 'Lora', serif;
    color: var(--white);
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
}

.guide-cta p {
    color: rgba(200, 230, 208, 0.8);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 1.5rem;
}

.guide-cta .btn-primary { display: inline-flex; }

/* ─── FAQ ACCORDION ─── */
.faq-item {
    background: var(--white);
    border: 1px solid rgba(107, 170, 128, 0.22);
    border-radius: var(--radius-sm);
    padding: 0 1.1rem;
    margin-bottom: 0.75rem;
    transition: border-color var(--dur-base) var(--ease-out);
}

.faq-item[open] { border-color: var(--sage); }

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.75rem 1rem 0;
    position: relative;
    font-family: 'Lora', serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.45;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Nunito', sans-serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--sage);
    transition: transform var(--dur-base) var(--ease-out);
}

.faq-item[open] summary::after { content: '\2212'; }

.faq-item summary:focus-visible {
    outline: 2px solid var(--forest-mid);
    outline-offset: 3px;
    border-radius: 4px;
}

.faq-item > p {
    margin: 0;
    padding: 0 0 1.1rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.faq-more { margin-top: 2rem; font-size: 0.95rem; }

/* ─── PRINTABLE CARD (embedded in guide markdown as raw HTML) ─── */
.printable-card-wrap { margin: 1.5rem 0 2rem; }

.printable-card {
    background: var(--white);
    border: 2px solid var(--forest);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    max-width: 430px;
    margin-bottom: 1rem;
    break-inside: avoid;
}

.printable-card + .printable-card { margin-top: 0.75rem; }

.printable-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--forest);
    border-bottom: 2px solid var(--forest);
    padding-bottom: 0.35rem;
    margin-bottom: 0.6rem;
}

.printable-card-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.55rem;
}

.printable-card-row .fill {
    flex: 1;
    border-bottom: 1px solid #9AA89E;
    min-height: 1.05rem;
}

.printable-card-section {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--forest-mid);
    margin: 0.6rem 0 0.35rem;
}

.print-card-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cream);
    background: var(--forest);
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}
.print-card-btn:hover { background: var(--forest-mid); }

@media print {
    /* When a guide contains a printable card, print ONLY the card(s). */
    body:has(.printable-card-wrap) #main-nav,
    body:has(.printable-card-wrap) footer,
    body:has(.printable-card-wrap) .guide-cta,
    body:has(.printable-card-wrap) .guide-article-header,
    body:has(.printable-card-wrap) .guide-body > *:not(.printable-card-wrap),
    .print-hide { display: none !important; }

    body { background: #fff; }
    .guides-page { padding: 0; max-width: none; }

    .printable-card {
        width: 3.375in;          /* standard wallet-card size */
        min-height: 2.125in;
        border-radius: 8px;
        page-break-inside: avoid;
    }
}

@media (max-width: 640px) {
    .guides-page { padding: 7rem 1.25rem 3.5rem; }
    .guide-cta { padding: 1.75rem 1.25rem; }
}
