/* ================================================================
   Mandala guide — long-form reading page
   One readable column with a sticky contents list. Theme variables only.
   ================================================================ */

.guide-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding-inline: clamp(2rem, 7vw, 5rem);
}

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

.guide-hero {
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.guide-hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: end;
}

@media (min-width: 900px) {
    .guide-hero-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 4rem;
    }
}

.guide-hero-figure {
    margin: 0;
    max-width: 18rem;
}

@media (min-width: 900px) {
    .guide-hero-figure {
        max-width: 26rem;
    }
}

.guide-hero-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.guide-hero-figure figcaption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.guide-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.guide-breadcrumb li + li::before {
    content: '/';
    margin-right: 0.25rem;
    color: var(--text-subtle);
}

.guide-breadcrumb a {
    color: var(--text-secondary);
}

.guide-breadcrumb a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.guide-hero h1 {
    font-size: clamp(2.75rem, 6.5vw, 5rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.guide-intro {
    max-width: 60ch;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 1.75rem;
}

.guide-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    background: var(--brand-primary-strong);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--brand-primary-strong);
    transition: background-color 0.15s ease;
}

.guide-button:hover,
.guide-button:focus-visible {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

[data-theme="dark"] .guide-button:hover,
[data-theme="dark"] .guide-button:focus-visible {
    color: var(--bg-primary);
}

/* ---------- Layout ---------- */

.guide-layout {
    display: grid;
    gap: 2rem;
    padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

@media (min-width: 1024px) {
    .guide-layout {
        grid-template-columns: 14rem minmax(0, 68ch);
        gap: 4rem;
        align-items: start;
    }
}

/* ---------- Contents ---------- */

.guide-toc {
    font-size: 0.9375rem;
    border-block: 1px solid var(--border-light);
    padding: 1.25rem 0;
}

@media (min-width: 1024px) {
    .guide-toc {
        position: sticky;
        top: 88px;
        border: 0;
        padding: 0;
    }
}

.guide-toc h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

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

.guide-toc li {
    margin: 0 0 0.45rem;
}

.guide-toc a {
    color: var(--text-secondary);
    text-decoration: none;
}

.guide-toc a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* ---------- Body ---------- */

.guide-body {
    min-width: 0;
    max-width: 68ch;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
}

.guide-body section {
    scroll-margin-top: 88px;
    padding-top: 3rem;
    margin-top: 3.5rem;
    border-top: 1px solid var(--border-light);
}

.guide-body section:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.guide-body h2 {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.guide-body h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.75rem 0 0.4rem;
}

.guide-body p,
.guide-body li,
.guide-body dd {
    color: var(--text-secondary);
}

.guide-body p {
    margin: 0 0 1rem;
}

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

.guide-body a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.guide-body a:hover {
    text-decoration-thickness: 2px;
}

.guide-body a.guide-button {
    color: #fff;
    text-decoration: none;
}

[data-theme="dark"] .guide-body a.guide-button:hover,
[data-theme="dark"] .guide-body a.guide-button:focus-visible {
    color: var(--bg-primary);
}

.guide-page a:focus-visible,
.guide-faq summary:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.guide-lead {
    font-size: 1.125rem;
}

.guide-body .guide-lead {
    color: var(--text-primary);
}

.guide-note,
.guide-body .guide-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* Aside ("Did you know?") — set as larger type between rules */

.guide-aside {
    margin: 2rem 0 0;
    padding: 1.5rem 0;
    border-block: 1px solid var(--border-light);
}

.guide-body .guide-aside p {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.375rem);
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Term lists */

.guide-terms {
    margin: 1.25rem 0 1rem;
}

.guide-terms dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1rem;
}

.guide-terms dt:first-child {
    margin-top: 0;
}

.guide-terms dd {
    margin: 0.15rem 0 0;
}

.guide-tag {
    margin-left: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
}

.guide-tag::before {
    content: '· ';
}

/* Timeline */

.guide-timeline {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.guide-timeline li {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-light);
}

.guide-timeline li:first-child {
    border-top: 0;
    padding-top: 0;
}

.guide-date {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--brand-primary);
    padding-top: 0.1rem;
}

.guide-timeline h3 {
    margin-top: 0;
}

.guide-timeline p {
    margin-bottom: 0;
}

@media (max-width: 479px) {
    .guide-timeline li {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* Symbols table */

.guide-table-wrap {
    overflow-x: auto;
    margin: 2.5rem 0 0;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.guide-table caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.guide-table th,
.guide-table td {
    text-align: left;
    padding: 0.7rem 1rem 0.7rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.guide-table thead th {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom-color: var(--text-primary);
}

.guide-table tbody th {
    color: var(--text-primary);
    font-weight: 500;
}

.guide-table tbody tr:last-child > * {
    border-bottom: 0;
}

.guide-glyph {
    width: 2.5rem;
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Steps */

.guide-steps {
    list-style: none;
    counter-reset: guide-step;
    margin: 1.5rem 0 0;
    padding: 0;
}

.guide-steps > li {
    counter-increment: guide-step;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: 1rem;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid var(--border-light);
}

.guide-steps > li:first-child {
    border-top: 0;
    padding-top: 0;
}

.guide-steps > li::before {
    content: counter(guide-step);
    grid-row: 1 / span 3;
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--brand-primary);
}

.guide-steps > li > * {
    grid-column: 2;
}

.guide-steps h3 {
    margin-top: 0.15rem;
}

/* Tool call-out */

.guide-tool {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--text-primary);
}

.guide-tool h3 {
    margin-top: 0;
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    letter-spacing: -0.02em;
}

.guide-tool ul {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
}

/* FAQ */

.guide-faq details {
    border-bottom: 1px solid var(--border-light);
}

.guide-faq details:first-child {
    border-top: 1px solid var(--border-light);
}

.guide-faq summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
}

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

.guide-faq summary::after {
    content: '+';
    flex: none;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--text-muted);
}

.guide-faq details[open] summary::after {
    content: '−';
}

.guide-faq summary:hover {
    color: var(--brand-primary);
}

.guide-faq details p {
    margin: 0 0 1rem;
}

/* Related */

.guide-related ul {
    margin: 0;
    padding-left: 1.25rem;
}

.guide-related li {
    margin-bottom: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .guide-button {
        transition: none;
    }
}

@media print {
    .guide-toc,
    .guide-button,
    .guide-tool {
        display: none;
    }

    .guide-layout {
        display: block;
    }
}
