:root { --white:#ffffff; --black:#050505; --soft:#f6f6f4; --gold:#c79a3b; --muted:#666; --line:#050505; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; min-height:100vh; background:var(--white); color:var(--black); font-family:Georgia,"Times New Roman",serif; }
.janani-v6 { min-height:100vh; background:radial-gradient(circle at 50% 38%, rgba(0,0,0,.030), transparent 24%), linear-gradient(180deg,#ffffff 0%,#fbfbfa 100%); }
.top-links { position:relative; z-index:20; width:min(1080px, calc(100% - 32px)); margin:0 auto; padding:24px 0 0; display:flex; align-items:center; justify-content:flex-start; gap:16px; font-size:16px; }
.top-link { color:var(--black); text-decoration:underline; text-underline-offset:4px; display:inline-flex; align-items:center; gap:8px; font-weight:500; }
.top-link span { font-size:22px; text-decoration:none; }
.donate-link { padding:7px 0; }
.home-shell { width:min(1080px, calc(100% - 32px)); margin:0 auto; min-height:calc(100vh - 64px); padding:clamp(54px,10vh,110px) 0 72px; display:flex; flex-direction:column; align-items:center; }
.identity-block { width:100%; text-align:center; }
.janani-svg-logo-wrap { width:min(720px, 88vw); margin:0 auto; }
.janani-svg-logo { display:block; width:100%; height:auto; }
.thinking-mark { width:min(560px, 78vw); filter:drop-shadow(0 18px 28px rgba(0,0,0,.13)); }
.tagline-row { width:min(760px, 96%); margin:0 auto; display:grid; grid-template-columns:1fr auto 1fr; gap:18px; align-items:center; }
.tagline-row span { height:1px; background:linear-gradient(90deg, transparent, #111, transparent); }
.tagline-row p { margin:0; font-size:clamp(18px,2vw,28px); color:#1b1b1b; white-space:nowrap; }
.search-section { width:min(820px, 94%); margin-top:clamp(30px,4vw,48px); }
.search-form { width:100%; min-height:88px; border:4px solid var(--black); border-radius:26px; display:grid; grid-template-columns:1fr 72px 72px; align-items:center; background:rgba(255,255,255,.94); box-shadow:0 16px 30px rgba(0,0,0,.055); overflow:hidden; }
.search-form textarea { width:100%; min-height:84px; max-height:170px; resize:none; border:0; outline:0; padding:26px 24px; background:transparent; color:#111; font-family:Georgia,"Times New Roman",serif; font-size:clamp(20px,1.9vw,26px); }
.search-form textarea::placeholder { color:#777; }
.search-form button { width:72px; height:82px; border:0; background:transparent; cursor:pointer; display:grid; place-items:center; }
.search-icon { width:30px; height:30px; border:4px solid #050505; border-radius:50%; position:relative; display:block; }
.search-icon::after { content:""; position:absolute; width:15px; height:4px; background:#050505; transform:rotate(45deg); right:-10px; bottom:-5px; border-radius:2px; }
.voice-btn { font-size:28px; border-left:1px solid rgba(0,0,0,.10)!important; transition:background .18s linear, transform .18s linear; }
.voice-btn:hover { background:#f5f5f5; }
.voice-btn.listening { background:#050505; color:#fff; animation:voicePulse 1s infinite ease-in-out; }
@keyframes voicePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.voice-status-row { margin-top:12px; display:flex; align-items:center; justify-content:center; gap:12px; font-family:Arial,sans-serif; font-size:13px; color:#555; min-height:28px; }
#stopVoiceBtn { border:1.5px solid #111; border-radius:999px; background:#fff; padding:6px 12px; font-size:12px; cursor:pointer; font-family:Arial,sans-serif; display:none; }
.voice-active #stopVoiceBtn, .voice-speaking #stopVoiceBtn { display:inline-flex; }
.mode-wrap { margin-top:20px; display:flex; align-items:center; justify-content:center; gap:14px; font-size:17px; }
.mode-wrap select { min-width:270px; height:50px; border:2px solid #111; border-radius:16px; background:#fff; color:#111; padding:0 18px; font-family:Georgia,"Times New Roman",serif; font-size:17px; text-align:center; }
.answer-box { width:min(820px,94%); margin-top:30px; display:none; border:2px solid #111; border-radius:22px; padding:26px; background:#fff; box-shadow:0 18px 34px rgba(0,0,0,.05); font-family:Arial,sans-serif; line-height:1.75; white-space:pre-wrap; }
.answer-box.show { display:block; }
.janani-feedback-controls { margin-top:18px; padding-top:14px; border-top:1px solid rgba(0,0,0,.12); display:flex; flex-wrap:wrap; gap:10px; align-items:center; white-space:normal; }
.janani-feedback-controls button { border:1.5px solid #111; border-radius:999px; background:#fff; color:#111; padding:7px 12px; font:13px Arial,sans-serif; cursor:pointer; }
.janani-feedback-controls button:hover { background:#111; color:#fff; }
.janani-feedback-status { color:#666; font:12px Arial,sans-serif; min-height:18px; }
.bottom-values { margin-top:auto; padding-top:62px; text-align:center; color:#474747; }
.ornament { display:flex; align-items:center; justify-content:center; gap:24px; margin-bottom:20px; }
.ornament span { width:125px; height:1px; background:#111; }
.ornament b { font-size:20px; }
.bottom-values p { font-size:15px; margin:0; }
.thinking-screen { position:fixed; inset:0; z-index:9999; background:#fff; display:none; overflow:hidden; }
.thinking-screen.active { display:block; }
.glyph-field { position:absolute; inset:0; padding:8px 10px; display:flex; flex-direction:column; justify-content:stretch; gap:0; color:rgba(0,0,0,0.38); font-family:"Noto Sans Devanagari","Noto Sans Tamil","Times New Roman",Georgia,serif; font-size:clamp(13px,1.2vw,22px); line-height:1.18; letter-spacing:.08em; font-weight:400; opacity:.88; user-select:none; pointer-events:none; }
.glyph-line { flex:1 1 auto; width:100%; white-space:nowrap; overflow:hidden; display:block; font-weight:400!important; opacity:var(--o,.55); transform:translateX(var(--x,0px)); filter:blur(var(--b,0px)); transition:opacity .18s linear, transform .18s linear, filter .18s linear; }
.glyph-line:nth-child(odd) { text-align:left; }
.glyph-line:nth-child(even) { text-align:right; }
.glyph-line.strong { font-weight:400!important; }
.thinking-logo { position:absolute; inset:0; display:grid; place-items:center; background:radial-gradient(circle at center, rgba(255,255,255,.98) 0%, rgba(255,255,255,.90) 24%, rgba(255,255,255,.64) 42%, rgba(255,255,255,.16) 64%, transparent 78%); }
.thinking-content { width:min(760px,92vw); display:grid; gap:14px; place-items:center; }
.thinking-mark { width:min(520px,76vw); filter:drop-shadow(0 18px 28px rgba(0,0,0,.13)); }
.thinking-status-box { width:min(680px,88vw); border:1.6px solid #050505; border-radius:18px; background:rgba(255,255,255,.92); box-shadow:0 18px 42px rgba(0,0,0,.08); padding:13px 18px; text-align:center; }
.thinking-status-line { margin:0; min-height:28px; color:#111; font-family:Georgia,"Times New Roman",serif; font-size:clamp(15px,1.3vw,19px); line-height:1.5; transition:opacity .18s linear, transform .18s linear; }
.thinking-status-line.fade { opacity:.25; transform:translateY(4px); }
.thinking-children-line { margin-top:10px; padding-top:8px; border-top:1px solid rgba(0,0,0,.16); color:rgba(0,0,0,.72); font-family:Arial,sans-serif; font-size:12px; line-height:1.45; letter-spacing:.03em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:800px) {
    .top-links { width:min(100% - 32px,1080px); padding-top:18px; font-size:14px; }
    .home-shell { min-height:calc(100vh - 54px); padding-top:78px; }
    .janani-svg-logo-wrap { width:min(92vw,560px); }
    .thinking-mark { width:min(78vw,420px); }
    .tagline-row { grid-template-columns:1fr; gap:10px; margin-top:0; }
    .tagline-row span { display:none; }
    .tagline-row p { white-space:normal; line-height:1.35; font-size:20px; }
    .search-form { min-height:76px; border-width:3px; border-radius:22px; grid-template-columns:1fr 58px 58px; }
    .search-form textarea { min-height:72px; padding:22px 16px; font-size:20px; }
    .search-form button { width:58px; height:68px; }
    .voice-btn { font-size:23px; }
    .search-icon { width:26px; height:26px; border-width:3px; }
    .mode-wrap { flex-direction:column; gap:8px; }
    .mode-wrap select { width:100%; min-width:0; }
    .ornament span { width:80px; }
    .bottom-values { padding-top:54px; }
    .glyph-field { font-size:clamp(12px,3.6vw,20px); line-height:1.2; letter-spacing:.04em; padding:6px; color:rgba(0,0,0,0.34); font-weight:400; }
    .thinking-status-box { width:min(88vw,520px); padding:12px 14px; border-radius:16px; }
    .thinking-status-line { font-size:15px; }
    .thinking-children-line { margin-top:8px; padding-top:7px; font-size:11px; white-space:normal; max-height:34px; overflow:hidden; }
}


/* V8 Conversation Continuity */
.janani-new-topic-btn {
    display: block;
    margin: 14px auto 0;
    border: 1.8px solid #050505;
    border-radius: 999px;
    background: #fff;
    color: #050505;
    padding: 8px 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,.04);
}
.janani-new-topic-btn:hover {
    background: #050505;
    color: #fff;
}

/* JANANI_PATCH31_CITATIONS */
/* Janani Patch 31: public source citation UI */
.janani-answer-entry{margin:0 0 14px 0;white-space:pre-wrap;}
.janani-answer-entry.user{font-weight:600;}
.janani-answer-entry.janani{font-weight:400;}
.janani-citations{margin:10px 0 2px 0;padding:10px 12px;border:1px solid rgba(213,170,88,.45);border-radius:14px;background:rgba(255,248,224,.72);color:#33240c;white-space:normal;}
.janani-citations-title{font-weight:800;margin-bottom:6px;color:#1f1607;}
.janani-citations ol{margin:0;padding-left:20px;}
.janani-citations li{margin:4px 0;line-height:1.35;}
.janani-citation-method{font-size:12px;opacity:.72;}

