/* Content pages (/guide, /today) — self-contained so the SPA's stylesheet can't
   bleed in. Tokens mirror style.css; theme follows the OS via prefers-color-scheme. */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;600&display=swap');

:root {
    --color-bg:          #07070d;
    --color-bg-2:        #12122a;
    --color-surface:     rgba(255, 255, 255, 0.05);
    --color-border:      rgba(255, 255, 255, 0.1);
    --color-text:        #f0f0f0;
    --color-text-muted:  rgba(255, 255, 255, 0.55);
    --color-accent:      #e8341c;
    --color-gold:        #f0b429;
    --color-gold-soft:   rgba(240, 180, 41, 0.12);
    --swara-ida:         #86b4dd;
    --swara-pingala:     #e79256;
    --swara-ida-soft:    rgba(134, 180, 221, 0.14);
    --swara-pingala-soft:rgba(231, 146, 86, 0.14);
    --font-sans:  'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Lora', Georgia, serif;
    --radius-md: 12px;
    --radius-lg: 20px;
    --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --color-bg:          #f5f3ef;
        --color-bg-2:        #efe9df;
        --color-surface:     rgba(0, 0, 0, 0.04);
        --color-border:      rgba(0, 0, 0, 0.12);
        --color-text:        #1a1a1a;
        --color-text-muted:  rgba(0, 0, 0, 0.55);
        --color-gold:        #b9790a;
        --color-gold-soft:   rgba(190, 120, 10, 0.1);
        --swara-ida:         #3f74a6;
        --swara-pingala:     #bd6529;
        --swara-ida-soft:    rgba(63, 116, 166, 0.12);
        --swara-pingala-soft:rgba(189, 101, 41, 0.12);
    }
}

* { box-sizing: border-box; }

body.content-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 700px at 50% -15%, var(--color-bg-2) 0%, var(--color-bg) 58%),
        var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

a { color: inherit; }
::selection { background: var(--color-gold-soft); }

/* ── Header ── */
.c-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 1.1rem 1.25rem;
}
.c-logo {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.c-logo em { color: var(--color-gold); font-style: normal; }
.c-nav { display: flex; align-items: center; gap: 1.1rem; }
.c-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.c-nav a:hover { color: var(--color-text); }
.c-cta {
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    color: #fff !important;
    font-weight: 600;
}
.c-cta:hover { filter: brightness(1.08); }

/* ── Main reading column ── */
.c-main {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3.5rem;
}

.c-eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-gold);
    margin: 0 0 0.75rem;
}

/* ── Guide index ── */
.c-page-title {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
    margin: 0 0 0.6rem;
}
.c-lede {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin: 0 0 2.25rem;
}
.c-card-list { display: flex; flex-direction: column; gap: 1rem; }
.c-card {
    display: block;
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    padding: 1.35rem 1.4rem;
    transition: border-color 0.2s, transform 0.2s;
}
.c-card:hover { border-color: var(--color-gold); transform: translateY(-2px); }
.c-card-meta {
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}
.c-card-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    line-height: 1.25;
}
.c-card-excerpt { color: var(--color-text-muted); font-size: 0.95rem; margin: 0; }

/* ── Article ── */
.c-breadcrumb {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}
.c-breadcrumb a { color: var(--color-gold); text-decoration: none; }
.article-meta {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0.5rem 0 2rem;
}
.article-body { font-size: 1.06rem; }
.article-body h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.4rem 0 0.9rem;
    line-height: 1.25;
}
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { color: var(--color-text); font-weight: 600; }
.article-body em { color: var(--color-gold); font-style: italic; }

/* ── Inline CTA (bottom of articles + today page) ── */
.c-conversion {
    margin-top: 3rem;
    padding: 1.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-gold-soft);
    text-align: center;
}
.c-conversion h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}
.c-conversion p { color: var(--color-text-muted); margin: 0 0 1.25rem; }
.c-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.c-btn:hover { filter: brightness(1.08); }

/* ── Today's Swara panel ── */
.today-almanac {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}
.today-fact {
    flex: 1;
    min-width: 130px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: 0.85rem 1rem;
}
.today-fact .k {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
}
.today-fact .v { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; }

.swara-panel { margin: 0 0 2rem; }
.swara-panel-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}
.swara-row {
    display: grid;
    grid-template-columns: 1.6rem 3.4rem 1fr;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    margin-bottom: 0.45rem;
}
.swara-row--ida { background: var(--swara-ida-soft); border-left-color: var(--swara-ida); }
.swara-row--pingala { background: var(--swara-pingala-soft); border-left-color: var(--swara-pingala); }
.swara-row-glyph { font-size: 1.15rem; text-align: center; }
.swara-row--ida .swara-row-glyph { color: var(--swara-ida); }
.swara-row--pingala .swara-row-glyph { color: var(--swara-pingala); }
.swara-row-src {
    font-family: var(--mono);
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}
.swara-row-value { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; }
.swara-row--ida .swara-row-value { color: var(--swara-ida); }
.swara-row--pingala .swara-row-value { color: var(--swara-pingala); }

/* ── Footer ── */
.c-footer {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.c-invocation { font-family: var(--font-serif); color: var(--color-gold); margin: 0 0 0.6rem; }
.c-footer-nav { margin-bottom: 0.6rem; }
.c-footer-nav a { color: var(--color-text-muted); text-decoration: none; margin: 0 0.15rem; }
.c-footer-nav a:hover { color: var(--color-text); }
.c-copy { margin: 0; font-size: 0.8rem; }

@media (max-width: 560px) {
    .c-nav { gap: 0.7rem; }
    .c-nav a:not(.c-cta) { display: none; }
}

/* ── Related reading (guide articles) ───────────────────────────── */
/* Internal links out of every article, so no guide page is a dead end. */

.c-related {
    margin: 3rem 0 2rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border, rgba(255,255,255,0.1));
    border-radius: 16px;
}

.c-related-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-gold, #f0b429);
    margin: 0 0 1rem;
}

.c-related-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.c-related-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.c-related-list a {
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.c-related-list a:hover { text-decoration: underline; }

.c-related-meta {
    font-size: 0.78rem;
    opacity: 0.6;
}

.c-related-more { margin: 0; font-size: 0.85rem; }
