/* Ask-God.ca — "simple sanctuary": saffron, ivory and temple brown, serif
   headings, calm motion. Tokens follow DESIGN.md; the text colours were
   darkened where the original palette failed WCAG AA contrast. */

/* ============================================================
   Tokens
   ============================================================ */
:root {
    --saffron: #ff8c00;          /* brand, decoration, focus glow */
    --marigold: #ffc233;
    --lotus: #ffb6c1;
    --jade: #0f766e;

    --bg: #fff8f0;               /* ivory cream */
    --bg-alt: #f7ecdf;           /* warm sandstone */
    --surface: #fffdf9;
    --surface-2: #fcf3e7;
    --text: #2c1810;             /* temple dark */
    --text-2: #5c3a1e;           /* vedic brown */
    --text-3: #7a5a3e;
    --border: #ead8c1;
    --border-input: #a4815b;     /* 3.4:1 on ivory, enough for a control outline */
    --accent: #b4500a;           /* deep saffron: 4.8:1 with ivory text */
    --accent-hover: #933f06;
    --accent-ink: #fff8f0;
    --link: #a3480a;
    --accent-soft: rgba(255, 140, 0, 0.11);
    --accent-line: rgba(180, 80, 10, 0.28);
    --verse-bg: rgba(255, 194, 51, 0.12);
    --verse-line: #f0a500;
    --shadow-card: 0 1px 2px rgba(44, 24, 16, 0.04), 0 4px 18px rgba(44, 24, 16, 0.06);
    --shadow-float: 0 10px 30px rgba(44, 24, 16, 0.11);
    --hero-glow: radial-gradient(60% 70% at 78% 40%, rgba(255, 194, 51, 0.22), transparent 70%),
                 radial-gradient(50% 60% at 10% 10%, rgba(255, 140, 0, 0.08), transparent 70%);
    --footer-bg: #2c1810;
    --footer-text: #ecdcc6;
    --footer-muted: #c3a98b;

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-serif: 'Lora', Georgia, 'Noto Serif', 'Nirmala UI', 'Hiragino Mincho ProN', 'Yu Mincho', 'Songti SC', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Nirmala UI', 'Hiragino Sans', 'Yu Gothic UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-sanskrit: 'Noto Serif Devanagari', 'Nirmala UI', 'Kohinoor Devanagari', 'Mangal', serif;
    --font-iast: 'Noto Serif', 'Lora', Georgia, serif;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --max: 1180px;
    --header-h: 68px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1a100b;
        --bg-alt: #20140e;
        --surface: #26180f;
        --surface-2: #2e1d13;
        --text: #f7ebdc;
        --text-2: #e0c9ac;
        --text-3: #bfa383;
        --border: #3f2b1d;
        --border-input: #80614a;
        --accent: #ffa233;
        --accent-hover: #ffb85c;
        --accent-ink: #1a100b;
        --link: #ffb45c;
        --accent-soft: rgba(255, 162, 51, 0.12);
        --accent-line: rgba(255, 162, 51, 0.3);
        --verse-bg: rgba(255, 194, 51, 0.07);
        --verse-line: #d98b0b;
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 22px rgba(0, 0, 0, 0.25);
        --shadow-float: 0 12px 34px rgba(0, 0, 0, 0.45);
        --hero-glow: radial-gradient(60% 70% at 78% 40%, rgba(255, 162, 51, 0.13), transparent 70%),
                     radial-gradient(50% 60% at 10% 10%, rgba(255, 140, 0, 0.06), transparent 70%);
        --footer-bg: #120a06;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #1a100b;
    --bg-alt: #20140e;
    --surface: #26180f;
    --surface-2: #2e1d13;
    --text: #f7ebdc;
    --text-2: #e0c9ac;
    --text-3: #bfa383;
    --border: #3f2b1d;
    --border-input: #80614a;
    --accent: #ffa233;
    --accent-hover: #ffb85c;
    --accent-ink: #1a100b;
    --link: #ffb45c;
    --accent-soft: rgba(255, 162, 51, 0.12);
    --accent-line: rgba(255, 162, 51, 0.3);
    --verse-bg: rgba(255, 194, 51, 0.07);
    --verse-line: #d98b0b;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 22px rgba(0, 0, 0, 0.25);
    --shadow-float: 0 12px 34px rgba(0, 0, 0, 0.45);
    --hero-glow: radial-gradient(60% 70% at 78% 40%, rgba(255, 162, 51, 0.13), transparent 70%),
                 radial-gradient(50% 60% at 10% 10%, rgba(255, 140, 0, 0.06), transparent 70%);
    --footer-bg: #120a06;
    color-scheme: dark;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 600; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: rgba(255, 140, 0, 0.25); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.6vw + 0.6rem, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.85rem, 2.4vw + 1rem, 2.5rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; }
p { text-wrap: pretty; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.muted { color: var(--text-3); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 14px rgba(44, 24, 16, 0.06); }

.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; }
.brand-name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.brand-dash { color: var(--saffron); padding: 0 1px; }
.brand-tld { color: var(--accent); font-weight: 600; font-size: 0.82em; }

.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { white-space: nowrap; }
.nav-links a, .mobile-nav a {
    color: var(--text-2);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--radius);
    position: relative;
    transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--saffron);
}

.nav-tools { display: flex; align-items: center; gap: 6px; }

.lang-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: border-color 0.15s;
}
.lang-select:hover, .lang-select:focus-within { border-color: var(--border-input); }
.lang-select svg {
    position: absolute;
    left: 11px;
    width: 17px; height: 17px;
    fill: none;
    stroke: var(--text-2);
    stroke-width: 1.6;
    pointer-events: none;
}
.lang-select select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    height: 100%;
    padding: 0 30px 0 34px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 999px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23a4815b' stroke-width='1.6' d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.lang-select select:focus-visible { outline-offset: 0; }
.lang-select option { background: var(--surface); color: var(--text); }

.icon-btn {
    width: 42px; height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-2);
    transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#themeToggle .i-sun { display: none; }
#themeToggle[data-mode="dark"] .i-sun { display: block; }
#themeToggle[data-mode="dark"] .i-moon { display: none; }

.burger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease), opacity 0.2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { font-size: 1.05rem; padding: 12px 12px; }
.mobile-nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ============================================================
   Buttons, chips
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px rgba(180, 80, 10, 0.22); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(180, 80, 10, 0.28); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent-line); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent); }

.text-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.text-btn:hover { background: var(--accent-soft); color: var(--accent); }
.text-btn svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.text-btn.done { color: var(--jade); }

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: left;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.more { color: var(--accent); font-weight: 600; }

/* ============================================================
   Sections
   ============================================================ */
main > section { padding: 96px 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-family: var(--font-serif); font-size: 1.15rem; color: var(--text-2); }

.daily, .about, .faq { background: var(--bg-alt); }

/* Hero */
.hero {
    padding: 64px 0 88px;
    background: var(--hero-glow), linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
    min-height: min(640px, calc(100vh - var(--header-h) - 120px));
}
.eyebrow {
    display: inline-block;
    margin-bottom: 22px;
    padding: 6px 14px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent {
    background: linear-gradient(100deg, #a3480a 0%, #c9620c 45%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
:root[data-theme="dark"] .hero h1 .accent { background-image: linear-gradient(100deg, #ffb85c, #ff9a1f 60%, #ffc233); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero h1 .accent { background-image: linear-gradient(100deg, #ffb85c, #ff9a1f 60%, #ffc233); }
}
@media (forced-colors: active) { .hero h1 .accent { color: CanvasText; background: none; } }
.lede { font-family: var(--font-serif); font-size: clamp(1.08rem, 0.5vw + 1rem, 1.25rem); line-height: 1.75; color: var(--text-2); max-width: 36em; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-points { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-size: 0.93rem; font-weight: 500; color: var(--text-2); }
.hero-points svg { width: 18px; height: 18px; fill: none; stroke: var(--jade); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hero-art { display: grid; place-items: center; }
.mandala { width: min(100%, 470px); height: auto; overflow: visible; filter: drop-shadow(0 18px 40px rgba(180, 80, 10, 0.12)); }
.m-glow-0 { stop-color: #ffc233; stop-opacity: 0.32; }
.m-glow-1 { stop-color: #ff8c00; stop-opacity: 0.08; }
.m-glow-2 { stop-color: #ff8c00; stop-opacity: 0; }
.m-petal-0 { stop-color: #e8690c; }
.m-petal-1 { stop-color: #ffc233; }
.m-outer path { fill: none; stroke: #e7900f; stroke-width: 1.4; opacity: 0.75; }
.m-dots circle { fill: #f0a500; opacity: 0.8; }
.m-line { fill: none; stroke: #e0a050; stroke-width: 1.2; opacity: 0.7; }
.m-dash { stroke-dasharray: 2 6; stroke-linecap: round; stroke-width: 2; }
.m-mid path { fill: rgba(255, 194, 51, 0.16); stroke: #e8961a; stroke-width: 1.3; }
.m-mid-in path { fill: rgba(255, 140, 0, 0.14); stroke: none; }
.m-lotus path { fill: url(#mPetal); opacity: 0.55; }
.m-lotus-front path { fill: url(#mPetal); stroke: rgba(255, 248, 240, 0.7); stroke-width: 1.2; }
.m-core { fill: var(--surface); stroke: #e8961a; stroke-width: 1.5; }
.m-core-line { stroke-dasharray: 1 4; }
.m-om { font-family: var(--font-sanskrit); font-size: 42px; fill: #b4500a; font-weight: 500; }
:root[data-theme="dark"] .m-om { fill: #ffb85c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .m-om { fill: #ffb85c; } }
.spin-slow, .spin-rev { transform-origin: 0 0; }
@media (prefers-reduced-motion: no-preference) {
    .spin-slow { animation: spin 180s linear infinite; }
    .spin-rev { animation: spin 140s linear infinite reverse; }
    .hero-copy > * { animation: rise 0.8s var(--ease) both; }
    .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
    .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
    .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
    .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
    .hero-art { animation: fade 1.4s ease 0.2s both; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   Chat
   ============================================================ */
.chat {
    max-width: 840px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.chat-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 10px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.chat-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.93rem; color: var(--text-2); }
.chat-who svg { width: 26px; height: 26px; }

.chat-log {
    /* Short while empty so the question box is in view; grows with the conversation, then scrolls. */
    min-height: 180px;
    max-height: clamp(400px, 64vh, 680px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.chat-log:focus-visible { outline-offset: -3px; }

.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }
@media (prefers-reduced-motion: no-preference) { .msg { animation: rise 0.35s var(--ease) both; } }
.avatar {
    width: 38px; height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    font-weight: 600;
    font-size: 0.95rem;
}
.avatar svg { width: 26px; height: 26px; }
.msg.user .avatar { background: var(--accent); color: var(--accent-ink); }
.bubble { min-width: 0; max-width: min(100%, 680px); }
.msg.user .bubble { max-width: min(82%, 560px); }
.msg-text {
    font-family: var(--font-serif);
    font-size: 1.04rem;
    line-height: 1.75;
    padding: 14px 18px;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    overflow-wrap: anywhere;
}
.msg-text p + p, .msg-text p + ul, .msg-text ul + p, .msg-text p + ol, .msg-text ol + p { margin-top: 0.75em; }
.msg-text ul, .msg-text ol { padding-left: 1.3em; }
.msg-text li + li { margin-top: 0.3em; }
.msg.user .msg-text {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: transparent;
    border-radius: var(--radius-xl) var(--radius-xl) 4px var(--radius-xl);
    white-space: pre-wrap;
}
.msg.error .msg-text { border-color: rgba(185, 28, 28, 0.35); background: rgba(185, 28, 28, 0.06); }
.msg-note { font-size: 0.85rem; color: var(--text-3); font-style: italic; margin: 0 0 8px 4px; }
.msg-text .msg-note { margin: 0.7em 0 0; }

.cite {
    display: inline-block;
    padding: 0 7px;
    margin: 0 1px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: 0.06em;
}
a.cite:hover { background: var(--accent); color: var(--accent-ink); }
.cite.pending { opacity: 0.7; }

.typing { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 4px 2px; }
.typing .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); opacity: 0.4; }
.typing-label { margin-left: 8px; font-family: var(--font-sans); font-size: 0.86rem; font-style: italic; color: var(--text-3); }
@media (prefers-reduced-motion: no-preference) {
    .typing .dot { animation: bounce 1.3s infinite ease-in-out; }
    .typing .dot:nth-child(2) { animation-delay: 0.15s; }
    .typing .dot:nth-child(3) { animation-delay: 0.3s; }
}

.crisis {
    margin-bottom: 10px;
    padding: 14px 18px;
    border: 1px solid rgba(15, 118, 110, 0.35);
    border-left: 4px solid var(--jade);
    border-radius: var(--radius-lg);
    background: rgba(15, 118, 110, 0.07);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}
.crisis ul { padding-left: 1.2em; margin-top: 6px; }
.crisis li + li { margin-top: 3px; }
.crisis p + ul { margin-top: 6px; }

.notice {
    margin: 0 18px 14px;
    padding: 16px 18px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-2);
}
.notice[hidden] { display: none; }
.notice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.9rem; }
@keyframes bounce { 0%, 70%, 100% { transform: translateY(0); opacity: 0.35; } 35% { transform: translateY(-6px); opacity: 1; } }

.msg-verses { margin-top: 12px; display: grid; gap: 10px; }
.msg-verses-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 4px 0 0 4px;
}
.msg-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; }

.suggestions { padding: 0 22px 16px; }
.suggestions[hidden] { display: none; }
.suggestions-title { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.suggestion-list { display: flex; flex-wrap: wrap; gap: 8px; }

.composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 16px 18px 6px;
    border-top: 1px solid var(--border);
}
.composer textarea {
    flex: 1;
    min-height: 52px;
    max-height: 200px;
    resize: none;
    overflow-y: hidden;
    padding: 13px 16px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-lg);
    background: var(--bg);
    font-family: var(--font-serif);
    font-size: 1.04rem;
    line-height: 1.55;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.composer textarea::placeholder { color: var(--text-3); font-style: italic; opacity: 1; }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.send {
    width: 52px; height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: var(--accent-ink);
    transition: background-color 0.15s, transform 0.15s var(--ease);
}
.send:hover { background: var(--accent-hover); }
.send:active { transform: scale(0.96); }
.send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.send .i-stop { display: none; fill: currentColor; stroke: none; }
.send.stop .i-send { display: none; }
.send.stop .i-stop { display: block; }
.composer-foot { display: flex; justify-content: space-between; gap: 12px; padding: 4px 20px 0; font-size: 0.8rem; color: var(--text-3); }
.counter.over { color: #b91c1c; font-weight: 600; }
:root[data-theme="dark"] .counter.over { color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .counter.over { color: #fca5a5; } }
.counter.flash { animation: flash-text 0.9s ease; }
@keyframes flash-text { 30% { opacity: 0.3; } }
.turnstile { padding: 10px 18px 0; }
.disclaimer {
    margin: 10px 18px 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-2);
}

@media (pointer: coarse) { .hint { display: none; } }

/* ============================================================
   Verse cards
   ============================================================ */
.verse {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--verse-line);
    border-radius: var(--radius-lg);
    padding: 18px 20px 10px;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s var(--ease);
    scroll-margin: 90px;
}
.verse.compact { box-shadow: none; padding: 14px 16px 6px; }
.verse.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow-card); } 25% { box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.35); } }
.verse-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.verse-ref {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 9px;
    border-radius: var(--radius-sm);
}
.verse-speaker { font-size: 0.82rem; color: var(--text-3); font-style: italic; }
.verse-sa {
    font-family: var(--font-sanskrit);
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--text-2);
    padding: 10px 14px;
    background: var(--verse-bg);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.verse-iast {
    font-family: var(--font-iast);
    font-style: italic;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-3);
    margin-bottom: 12px;
    padding: 0 2px;
}
.verse.compact .verse-sa { font-size: 1.04rem; }
.verse.compact .verse-iast { font-size: 0.86rem; }
.verse-tr { font-family: var(--font-serif); font-size: 1.04rem; line-height: 1.75; color: var(--text); }
.verse-credit { font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }
.verse-none { font-family: var(--font-sans); font-size: 0.88rem; line-height: 1.6; color: var(--text-2); font-style: italic; }
.verse-actions { display: flex; flex-wrap: wrap; gap: 2px; margin: 10px -8px 0; padding-top: 6px; border-top: 1px dashed var(--border); }

/* Verse of the day */
.daily-card { max-width: 760px; margin: 0 auto; }
.daily-card .verse { padding: 30px 34px 16px; border-left-width: 4px; }
.daily-card .verse-sa { font-size: 1.3rem; text-align: center; padding: 18px; }
.daily-card .verse-iast { text-align: center; font-size: 1rem; }
.daily-card .verse-tr { font-size: 1.18rem; text-align: center; max-width: 34em; margin: 0 auto; }
.daily-card .verse-credit, .daily-card .verse-none { text-align: center; }
.daily-card .verse-head { justify-content: center; }
.daily-card .verse-actions { justify-content: center; }
.skeleton { display: grid; gap: 14px; padding: 34px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.skeleton span { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; }
.skeleton span:nth-child(1) { width: 30%; margin: 0 auto; }
.skeleton span:nth-child(2) { height: 64px; }
.skeleton span:nth-child(3) { width: 80%; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) { .skeleton span { animation: shimmer 1.6s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Explorer */
.explore-controls { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 320px; max-width: 460px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1.5px solid var(--border-input);
    border-radius: 999px;
    background: var(--surface);
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--text-3); opacity: 1; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.segmented { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.segmented button { min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 0.9rem; font-weight: 500; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.segmented button:hover { color: var(--accent); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.topic-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 980px; margin: 0 auto 20px; }
.topic-chips .chip { min-height: 34px; padding: 5px 13px; font-size: 0.86rem; }
.explore-count { text-align: center; font-size: 0.85rem; color: var(--text-3); margin-bottom: 22px; }
.verse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; align-items: start; }
.verse-grid .verse:hover { box-shadow: var(--shadow-float); }
.verse-grid .empty { grid-column: 1 / -1; text-align: center; padding: 30px 0; }
.explore-more { display: flex; justify-content: center; margin-top: 30px; }
.explore-more .btn[hidden] { display: none; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); }
.card-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); margin-bottom: 20px; }
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 10px; }
.card p { font-family: var(--font-serif); color: var(--text-2); line-height: 1.75; }

/* Scriptures */
.scriptures-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.scripture {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--saffron);
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    box-shadow: var(--shadow-card);
}
.scripture.bhagavatam { border-top-color: var(--marigold); }
.scripture h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 18px; }
.scripture .verse-sa { font-size: 1.1rem; }
.scripture-tr { font-family: var(--font-serif); font-style: italic; color: var(--text-2); line-height: 1.75; margin-bottom: 6px; }
.scripture-ref { font-size: 0.82rem; font-weight: 600; color: var(--accent); margin-bottom: 20px; }
.facts { list-style: none; padding: 0; display: grid; gap: 6px; margin-bottom: 18px; font-size: 0.93rem; color: var(--text-2); }
.facts li { padding-left: 18px; position: relative; }
.facts li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--saffron); }
.essence { font-family: var(--font-serif); font-weight: 500; color: var(--text); padding-top: 14px; border-top: 1px solid var(--border); }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow 0.2s;
}
.faq details[open] { box-shadow: var(--shadow-card); }
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 54px 18px 22px;
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    position: relative;
    border-radius: var(--radius-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '';
    position: absolute;
    right: 22px; top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-a { padding: 0 22px 20px; font-family: var(--font-serif); color: var(--text-2); line-height: 1.8; }

/* Reveal on scroll (only once scripts run, so nothing hides without them) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 72px 0 32px; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--marigold); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; margin-bottom: 44px; }
.site-footer .brand { color: #fff8f0; }
.site-footer .brand-tld { color: var(--marigold); }
.footer-tagline { margin-top: 12px; color: var(--footer-muted); font-family: var(--font-serif); font-style: italic; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h2 { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--marigold); margin-bottom: 6px; }
.footer-col a { font-size: 0.95rem; padding: 3px 0; width: fit-content; }
.footer-quote {
    max-width: 760px;
    margin: 0 auto 36px;
    padding: 26px 30px;
    border: 1px solid rgba(236, 220, 198, 0.14);
    border-radius: var(--radius-lg);
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--footer-text);
}
.footer-quote-text { display: block; }
.footer-quote-ref { display: inline-block; margin-top: 10px; font-family: var(--font-sans); font-style: normal; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--marigold); }
.site-footer a.footer-quote-ref { color: var(--marigold); }
.site-footer.compact { padding: 40px 0 28px; }
.site-footer.compact .footer-help { margin-top: 0; }
.back { margin-left: -10px; }
.footer-help { text-align: center; font-size: 0.9rem; color: var(--footer-muted); margin: -12px auto 28px; max-width: 640px; }
.footer-help strong { color: var(--footer-text); }
.footer-bottom { border-top: 1px solid rgba(236, 220, 198, 0.14); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; font-size: 0.85rem; color: var(--footer-muted); }
.footer-note { max-width: 640px; }

/* ============================================================
   Simple pages (privacy, 404)
   ============================================================ */
.page { padding: 64px 0 96px; }
.page h1 { font-size: clamp(2rem, 3vw + 1rem, 2.8rem); margin-bottom: 10px; }
.page .updated { color: var(--text-3); font-size: 0.9rem; margin-bottom: 36px; }
.prose { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.8; color: var(--text-2); }
.prose h2 { font-family: var(--font-display); font-size: 1.45rem; color: var(--text); margin: 40px 0 12px; }
.prose p, .prose ul { margin-bottom: 14px; }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.notfound { text-align: center; padding: 120px 0; }
.notfound .brand-mark { width: 84px; height: 84px; margin: 0 auto 26px; }
.notfound p { font-family: var(--font-serif); font-size: 1.15rem; color: var(--text-2); max-width: 32em; margin: 14px auto 30px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

/* Four links and the language menu need about 960 px in French and Spanish. */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav-tools { margin-left: auto; }
    .burger { display: inline-flex; }
}

@media (max-width: 860px) {
    .hero { padding: 32px 0 64px; }
    .hero-grid { grid-template-columns: 1fr; gap: 20px; min-height: 0; text-align: center; }
    .hero-art { order: -1; }
    .mandala { width: min(62vw, 260px); }
    .lede { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-points { justify-content: center; }
    .scriptures-grid { grid-template-columns: 1fr; }
    main > section { padding: 72px 0; }
}

@media (max-width: 560px) {
    :root { --header-h: 60px; }
    .container { padding: 0 16px; }
    .nav-inner { padding: 0 12px 0 16px; gap: 8px; }
    .brand-mark { width: 30px; height: 30px; }
    .brand-name { font-size: 1.2rem; }
    .lang-select select { padding: 0 24px 0 30px; font-size: 0.85rem; }
    .lang-select svg { left: 9px; width: 15px; height: 15px; }
    .lang-select select { background-position: right 9px center; }
    .icon-btn { width: 40px; height: 40px; }
    .hero-actions .btn { width: 100%; }
    .hero-points { flex-direction: column; align-items: center; gap: 8px; }
    .section-head { margin-bottom: 32px; }
    .section-head p { font-size: 1.05rem; }
    main > section { padding: 60px 0; }
    .chat { border-radius: var(--radius-lg); margin: 0 -6px; }
    .chat-log { padding: 18px 12px; max-height: clamp(380px, 66vh, 600px); }
    .msg { gap: 8px; }
    .avatar { width: 32px; height: 32px; }
    .avatar svg { width: 22px; height: 22px; }
    .msg.bot .avatar { display: none; }
    .msg.user .bubble { max-width: 88%; }
    .msg-text { padding: 12px 14px; font-size: 1rem; }
    .suggestions { padding: 0 12px 14px; }
    .composer { padding: 12px 12px 4px; }
    .composer-foot { padding: 2px 14px 0; }
    .disclaimer { margin: 10px 12px 14px; }
    .notice { margin: 0 12px 12px; }
    .daily-card .verse { padding: 22px 18px 12px; }
    .daily-card .verse-sa { font-size: 1.12rem; padding: 12px; }
    .daily-card .verse-tr { font-size: 1.06rem; }
    .verse { padding: 16px 16px 8px; }
    .segmented { width: 100%; justify-content: center; }
    .segmented button { flex: 1; padding: 6px 8px; font-size: 0.85rem; white-space: normal; line-height: 1.2; }
    .card, .scripture { padding: 26px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-quote { padding: 20px 18px; font-size: 1rem; }
}

@media (max-width: 360px) {
    .brand-tld { display: none; }
    .nav-inner { padding: 0 8px 0 12px; gap: 4px; }
    .nav-tools { gap: 2px; }
    .icon-btn { width: 36px; height: 36px; }
    .lang-select select { padding: 0 20px 0 28px; background-position: right 7px center; }
    .lang-select svg { left: 8px; }
}

/* ============================================================
   Print: the conversation and verses, without the chrome
   ============================================================ */
@media print {
    .site-header, .hero, .composer, .composer-foot, .suggestions, .chat-bar, .explore-controls, .topic-chips,
    .explore-more, .msg-actions, .verse-actions, .site-footer, .faq, .about, .disclaimer { display: none !important; }
    body { background: #fff; color: #000; }
    .chat { border: 0; box-shadow: none; }
    .chat-log { height: auto; overflow: visible; }
    .verse { box-shadow: none; break-inside: avoid; }
}
