/* ATREYA_CHAT_C01R4_RIGHT_RAIL_READABILITY
   Approved visual rebuild for /chat inner workspace only.
   The C01 common left navigation and C01 common top utility/title bar are intentionally untouched.
*/
:root{
  --c01r3-bg:#f8f3e9;--c01r3-card:#fffdf8;--c01r3-card2:#fff8eb;--c01r3-text:#2e2117;--c01r3-muted:#786b5e;
  --c01r3-line:#eadbc4;--c01r3-line2:#dca54a;--c01r3-gold:#d8890b;--c01r3-gold2:#ffc955;--c01r3-blue:#e9f1fc;
  --c01r3-shadow:0 18px 48px rgba(81,54,18,.10);--c01r3-display:Georgia,"Times New Roman",serif;
  --c01r3-ui:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
html[data-theme="dark"]{
  --c01r3-bg:#06121f;--c01r3-card:#091a2b;--c01r3-card2:#0e2238;--c01r3-text:#fff6e8;--c01r3-muted:#98a9bc;
  --c01r3-line:rgba(232,177,73,.18);--c01r3-line2:rgba(239,162,29,.58);--c01r3-gold:#efa21d;--c01r3-gold2:#ffd062;--c01r3-blue:#133154;
  --c01r3-shadow:0 20px 52px rgba(0,0,0,.30);
}
body.atreya-chat-c01r3-active #atreyaChatC01Content{padding-top:12px!important;padding-bottom:30px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content>.topbar{display:none!important}
#atreyaChatC01R3Hero{height:181px;border:1px solid var(--c01r3-line2);border-radius:17px;margin:0 0 12px;overflow:hidden;position:relative;background:var(--c01r3-card);box-shadow:var(--c01r3-shadow);isolation:isolate}
#atreyaChatC01R3Hero:before{content:"";position:absolute;inset:0;background:url('/assets/atreya-chat-c01r3-hero-dark.png') center/cover no-repeat;z-index:0;filter:saturate(.93) brightness(1.02)}
html[data-theme="light"] #atreyaChatC01R3Hero:before{filter:saturate(.82) brightness(1.09) contrast(.94)}
#atreyaChatC01R3Hero:after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(180deg,transparent 55%,rgba(4,14,26,.08)),radial-gradient(circle at 52% 52%,rgba(255,197,83,.09),transparent 34%)}
#atreyaChatC01R3Hero .c01r3-hero-live{position:absolute;left:310px;top:26px;z-index:3;border:1px solid rgba(92,226,153,.36);background:rgba(5,25,31,.72);color:#7fe7ac;border-radius:999px;padding:7px 11px;display:flex;align-items:center;gap:7px;font:800 9px/1 var(--c01r3-ui);backdrop-filter:blur(8px)}
#atreyaChatC01R3Hero .c01r3-hero-live i{width:7px;height:7px;border-radius:50%;background:#36d982;box-shadow:0 0 0 5px rgba(54,217,130,.11)}
body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 340px!important;gap:14px!important;align-items:start!important;min-width:0!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-window{min-width:0!important;border:1px solid var(--c01r3-line2)!important;border-radius:18px!important;background:linear-gradient(180deg,color-mix(in srgb,var(--c01r3-card) 99%,transparent),color-mix(in srgb,var(--c01r3-card2) 38%,var(--c01r3-card)))!important;box-shadow:var(--c01r3-shadow)!important;overflow:hidden!important;max-height:none!important;min-height:575px!important;display:flex!important;flex-direction:column!important;position:relative!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-window:before{content:"";position:absolute;inset:76px 0 0;pointer-events:none;opacity:.22;background:radial-gradient(circle at 82% 24%,color-mix(in srgb,var(--c01r3-gold) 15%,transparent),transparent 24%),linear-gradient(90deg,color-mix(in srgb,var(--c01r3-gold) 4%,transparent) 1px,transparent 1px);background-size:auto,44px 44px;z-index:0}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head{min-height:76px!important;padding:14px 18px!important;border-bottom:1px solid var(--c01r3-line)!important;background:linear-gradient(110deg,color-mix(in srgb,var(--c01r3-card) 98%,transparent),color-mix(in srgb,var(--c01r3-card2) 60%,var(--c01r3-card)))!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;position:relative!important;z-index:2!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head>div:first-child{position:relative;padding-left:56px!important;min-width:0;display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head>div:first-child:before{content:"ॐ";position:absolute;left:0;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--c01r3-gold2),var(--c01r3-gold));color:#fff;font:700 22px/1 var(--c01r3-display);box-shadow:0 8px 22px rgba(215,125,0,.21)}
html[data-theme="dark"] body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head>div:first-child:before{background:#091a2c;border:1px solid var(--c01r3-gold);color:var(--c01r3-gold2);box-shadow:0 0 26px rgba(239,162,29,.14)}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head b{font:700 28px/1 var(--c01r3-display)!important;color:var(--c01r3-text)!important;letter-spacing:-.35px}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head .badge{height:25px!important;border-radius:999px!important;padding:0 10px!important;background:rgba(40,178,113,.10)!important;border:1px solid rgba(40,178,113,.30)!important;color:#3bc486!important;font-size:8px!important;display:inline-flex!important;align-items:center!important}
.c01r3-head-note{flex-basis:100%;display:block;color:var(--c01r3-muted);font-size:8px;font-weight:600;margin-top:-3px}
body.atreya-chat-c01r3-active #atreyaChatC01Content #subjectSelect{height:48px!important;min-width:330px!important;max-width:430px!important;border:1px solid var(--c01r3-line2)!important;border-radius:13px!important;background:var(--c01r3-card2)!important;color:var(--c01r3-text)!important;padding:0 42px 0 14px!important;font-size:12px!important;font-weight:800!important;outline:0!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c01r3-card) 55%,transparent)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content #subjectSelect:focus{border-color:var(--c01r3-gold)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--c01r3-gold) 15%,transparent)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .messages{position:relative!important;z-index:1!important;flex:1!important;min-height:340px!important;max-height:49vh!important;overflow-y:auto!important;overflow-x:hidden!important;padding:18px 62px 12px!important;background:transparent!important;scrollbar-color:color-mix(in srgb,var(--c01r3-gold) 48%,transparent) transparent!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg{position:relative!important;max-width:min(78%,760px)!important;width:max-content!important;min-width:0!important;margin:0 0 17px!important;border:1px solid var(--c01r3-line)!important;border-radius:14px!important;padding:13px 15px!important;line-height:1.52!important;font-size:12px!important;color:var(--c01r3-text)!important;box-shadow:0 8px 24px rgba(0,0,0,.08)!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;clear:both!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.ai{background:linear-gradient(145deg,color-mix(in srgb,var(--c01r3-card2) 90%,var(--c01r3-card)),var(--c01r3-card))!important;margin-right:auto!important;border-top-left-radius:6px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.ai:before{content:"ॐ";position:absolute;left:-50px;top:-2px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--c01r3-card2);border:1px solid var(--c01r3-line2);color:var(--c01r3-gold2);font:700 18px/1 var(--c01r3-display);box-shadow:0 6px 16px rgba(0,0,0,.10)}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.user{background:linear-gradient(145deg,#dceafd,#edf4fd)!important;margin-left:auto!important;border-color:rgba(74,137,220,.28)!important;border-top-right-radius:6px!important;color:#16233a!important}
html[data-theme="dark"] body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.user{background:linear-gradient(145deg,#173a68,#123052)!important;border-color:rgba(74,144,236,.35)!important;color:#fff!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.user:after{content:"◉";position:absolute;right:-50px;top:-2px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--c01r3-card2);border:1px solid var(--c01r3-line2);color:var(--c01r3-gold);font-size:14px;box-shadow:0 6px 16px rgba(0,0,0,.10)}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg .meta{margin-top:7px!important;color:var(--c01r3-muted)!important;font-size:8px!important;opacity:.9}
body.atreya-chat-c01r3-active #atreyaChatC01Content .msg pre,body.atreya-chat-c01r3-active #atreyaChatC01Content .msg code{white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;max-width:100%!important}
.c01r3-prompts{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:8px 14px 4px;background:transparent;position:relative;z-index:2}.c01r3-prompts::-webkit-scrollbar{display:none}.c01r3-prompt{height:32px;white-space:nowrap;border:1px solid var(--c01r3-line2);background:color-mix(in srgb,var(--c01r3-card) 88%,transparent);color:var(--c01r3-text);border-radius:999px;padding:0 12px;display:flex;align-items:center;gap:7px;font-size:9px;font-weight:800;cursor:pointer;transition:transform .16s,border-color .16s,background .16s}.c01r3-prompt:hover{border-color:var(--c01r3-gold);background:var(--c01r3-card2);transform:translateY(-1px)}.c01r3-prompt span{color:var(--c01r3-gold)}
body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-compose{position:relative!important;z-index:2!important;border-top:1px solid var(--c01r3-line)!important;background:linear-gradient(180deg,var(--c01r3-card),color-mix(in srgb,var(--c01r3-card2) 42%,var(--c01r3-card)))!important;padding:9px 14px 13px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .compose-row{display:grid!important;grid-template-columns:1fr!important;gap:0!important;align-items:stretch!important;border:1px solid var(--c01r3-line2)!important;border-radius:14px!important;background:var(--c01r3-card2)!important;padding:0!important;position:relative!important;overflow:hidden!important;transition:border-color .18s,box-shadow .18s!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .compose-row:focus-within{border-color:var(--c01r3-gold)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--c01r3-gold) 13%,transparent),0 12px 30px rgba(0,0,0,.06)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .compose-row textarea{min-height:72px!important;max-height:168px!important;resize:vertical!important;border:0!important;background:transparent!important;color:var(--c01r3-text)!important;outline:0!important;padding:14px 14px 10px!important;font-size:12px!important;line-height:1.45!important;box-shadow:none!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .compose-row textarea::placeholder{color:var(--c01r3-muted)!important}
.c01r3-charcount{position:absolute;right:13px;top:10px;color:var(--c01r3-muted);font-size:7px;pointer-events:none}
.c01r3-compose-footer{min-height:55px;border-top:1px solid var(--c01r3-line);display:flex;align-items:center;gap:8px;padding:7px 8px 7px 9px;background:color-mix(in srgb,var(--c01r3-card) 74%,transparent)}
.c01r3-compose-footer .c01r3-tools{display:flex!important;gap:7px!important;flex-wrap:wrap!important;margin:0!important;min-width:0!important;flex:1!important}
.c01r3-compose-footer .c01r3-tools .btn{height:36px!important;border-radius:11px!important;border:1px solid var(--c01r3-line2)!important;background:var(--c01r3-card)!important;color:var(--c01r3-text)!important;font-size:9px!important;font-weight:800!important;padding:0 12px!important}
.c01r3-compose-footer .c01r3-tools .btn:hover{border-color:var(--c01r3-gold)!important;background:var(--c01r3-card2)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .send-btn{width:auto!important;height:40px!important;min-width:148px!important;border-radius:12px!important;border:0!important;background:linear-gradient(145deg,var(--c01r3-gold2),var(--c01r3-gold))!important;color:#201405!important;font-size:11px!important;font-weight:900!important;box-shadow:0 9px 22px rgba(215,125,0,.22)!important;padding:0 18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;white-space:nowrap!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content .send-btn:hover{filter:brightness(1.04);transform:translateY(-1px)}
#atreyaChatC01Rail.c01r3-rail{display:grid!important;gap:11px!important;align-content:start!important;min-width:0!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card,.c01r3-quick,.c01r3-more,.c01r3-insight{border:1px solid var(--c01r3-line2)!important;border-radius:17px!important;background:linear-gradient(160deg,var(--c01r3-card),color-mix(in srgb,var(--c01r3-card2) 56%,var(--c01r3-card)))!important;box-shadow:var(--c01r3-shadow)!important;color:var(--c01r3-text)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card{padding:15px!important;margin:0!important;position:relative!important;top:auto!important;height:auto!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card h3{font:700 22px/1 var(--c01r3-display)!important;margin:0 0 12px!important;color:var(--c01r3-text)!important;padding-right:98px!important}
.c01r3-context-badge{position:absolute;right:13px;top:12px;height:27px;border:1px solid rgba(49,203,126,.32);background:rgba(49,203,126,.08);color:#43cc82;border-radius:999px;padding:0 10px;display:flex;align-items:center;gap:6px;font-size:7px;font-weight:900}.c01r3-context-badge i{width:7px;height:7px;border-radius:50%;background:#39d57c;box-shadow:0 0 0 4px rgba(57,213,124,.12)}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line{padding:9px 0!important;border-bottom:1px dashed color-mix(in srgb,var(--c01r3-line) 86%,transparent)!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span{color:var(--c01r3-muted)!important;font-size:9px!important}body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{font-size:9px!important;text-align:right!important;overflow-wrap:anywhere!important;max-width:185px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .mini-note{margin-top:12px!important;border:1px solid var(--c01r3-line)!important;border-radius:11px!important;background:var(--c01r3-card2)!important;color:var(--c01r3-muted)!important;padding:10px!important;font-size:8px!important;line-height:1.45!important}
.c01r3-quick,.c01r3-more,.c01r3-insight{padding:12px}.c01r3-quick h4,.c01r3-more h4,.c01r3-insight h4{margin:0 0 9px;font:700 18px/1 var(--c01r3-display);color:var(--c01r3-text)}
.c01r3-quick-grid,.c01r3-more-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.c01r3-quick button,.c01r3-more button{min-height:40px;border-radius:11px;border:1px solid var(--c01r3-line2);background:var(--c01r3-card2);color:var(--c01r3-text);padding:0 10px;display:flex;align-items:center;justify-content:flex-start;gap:8px;font-size:8px;font-weight:850;cursor:pointer;text-align:left}.c01r3-quick button:hover,.c01r3-more button:hover{border-color:var(--c01r3-gold);background:color-mix(in srgb,var(--c01r3-card2) 75%,var(--c01r3-gold) 7%)}.c01r3-quick button span,.c01r3-more button span{font-size:14px;color:var(--c01r3-gold);flex:0 0 auto}
.c01r3-more>p{margin:-3px 0 9px;color:var(--c01r3-muted);font-size:7.5px;line-height:1.4}.c01r3-more .c01r3-secondary{margin-top:8px;padding-top:8px;border-top:1px solid var(--c01r3-line);display:flex;gap:7px}.c01r3-more .c01r3-secondary button{flex:1;min-height:34px;justify-content:center;font-size:7.5px}
.c01r3-insight-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.c01r3-insight-head h4{margin:0}.c01r3-insight small{font-size:7px;color:var(--c01r3-muted)}.c01r3-quote{border:1px solid var(--c01r3-line);background:var(--c01r3-card2);border-radius:10px;padding:10px 11px;color:var(--c01r3-text);font:italic 10px/1.4 var(--c01r3-display)}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01-actions-card{display:none!important}
@media(max-width:1180px){body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{grid-template-columns:minmax(0,1fr) 300px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content #subjectSelect{min-width:275px!important}#atreyaChatC01R3Hero{height:164px}.c01r3-quick-grid,.c01r3-more-grid{grid-template-columns:1fr}}
@media(max-width:900px){#atreyaChatC01R3Hero{height:134px}body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{grid-template-columns:1fr!important}#atreyaChatC01Rail.c01r3-rail{grid-template-columns:repeat(2,minmax(0,1fr))!important;order:-1!important}#atreyaChatC01Rail .context-card{grid-column:1/-1}.c01r3-insight{grid-column:1/-1}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-window{min-height:550px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .messages{max-height:48vh!important}}
@media(max-width:640px){body.atreya-chat-c01r3-active #atreyaChatC01Content{padding-top:8px!important}#atreyaChatC01R3Hero{height:112px;border-radius:12px;margin-bottom:9px}#atreyaChatC01R3Hero .c01r3-hero-live{left:8px;top:auto;bottom:8px;padding:5px 8px;font-size:6.5px}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-window{border-radius:14px!important;min-height:520px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head{padding:11px!important;min-height:70px!important;align-items:flex-start!important;flex-direction:column!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head>div:first-child{padding-left:42px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head>div:first-child:before{width:34px;height:34px;font-size:17px}body.atreya-chat-c01r3-active #atreyaChatC01Content .chat-head b{font-size:21px!important}.c01r3-head-note{display:none}body.atreya-chat-c01r3-active #atreyaChatC01Content #subjectSelect{width:100%!important;min-width:0!important;max-width:none!important;height:43px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .messages{min-height:292px!important;max-height:43vh!important;padding:12px 46px 6px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .msg{max-width:96%!important;font-size:10.5px!important;padding:11px 12px!important;margin-bottom:15px!important}body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.ai:before{left:-39px;width:30px;height:30px;font-size:15px}body.atreya-chat-c01r3-active #atreyaChatC01Content .msg.user:after{right:-39px;width:30px;height:30px}.c01r3-prompts{padding:7px 9px 3px}.c01r3-prompt{height:29px;font-size:7.5px}.c01r3-compose-footer{align-items:stretch;flex-direction:column}.c01r3-compose-footer .c01r3-tools{width:100%!important}.c01r3-compose-footer .c01r3-tools .btn{flex:1!important;min-width:0!important;padding:0 7px!important}.c01r3-compose-footer .send-btn{width:100%!important;min-width:0!important}.c01r3-charcount{top:8px}#atreyaChatC01Rail.c01r3-rail{grid-template-columns:1fr!important}.c01r3-quick-grid,.c01r3-more-grid{grid-template-columns:1fr 1fr}.c01r3-more .c01r3-secondary{flex-direction:column}.c01r3-insight{grid-column:auto}}
@media(prefers-reduced-motion:reduce){.c01r3-prompt,.c01r3-quick button,.c01r3-more button,body.atreya-chat-c01r3-active #atreyaChatC01Content .send-btn{transition:none!important;animation:none!important}}


/* ATREYA_CHAT_C01R3_FINAL_REFINEMENT
   User-approved correction:
   - no promotional banner on /chat
   - existing sidebar/topbar containers are NOT recreated
   - sidebar nav link set mirrors the solved Home dashboard
   - center Ask Atreya workspace remains the primary feature
   - Reading Context / Quick Actions / More rail receives premium graphic treatment
*/
body.atreya-chat-c01r3-active #atreyaChatC01R2Hero,
body.atreya-chat-c01r3-active #atreyaChatC01R3Hero{display:none!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content{padding-top:10px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{margin-top:0!important;grid-template-columns:minmax(0,1fr) 356px!important;gap:14px!important}

/* Home menu parity: existing .sidebar/.nav shell is preserved; only its route links are normalized. */
body.atreya-chat-c01r3-active .sidebar .nav{overflow-y:auto!important;scrollbar-width:none!important;padding-bottom:10px!important}
body.atreya-chat-c01r3-active .sidebar .nav::-webkit-scrollbar{display:none!important}
body.atreya-chat-c01r3-active .sidebar .nav a.c01r3-home-menu{height:42px!important}
body.atreya-chat-c01r3-active .sidebar .nav a.c01r3-home-menu .ico{font-size:14px!important}

/* Eight clear purpose chips - useful without becoming visual noise. */
.c01r3-prompts{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;padding:12px 16px 7px!important;overflow:visible!important}
.c01r3-prompt{height:36px!important;justify-content:center!important;white-space:normal!important;text-align:center!important;border-radius:12px!important;background:linear-gradient(180deg,color-mix(in srgb,var(--c01r3-card) 92%,transparent),color-mix(in srgb,var(--c01r3-card2) 68%,var(--c01r3-card)))!important;font-size:8.5px!important;line-height:1.15!important;padding:0 9px!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 40%,transparent)!important}
html[data-theme="dark"] .c01r3-prompt{background:linear-gradient(180deg,rgba(15,39,63,.92),rgba(8,28,47,.92))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 8px 20px rgba(0,0,0,.10)!important}
.c01r3-prompt span{font-size:14px!important}

/* Premium reading context rail */
#atreyaChatC01Rail.c01r3-rail{gap:12px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card,
.c01r3-quick,.c01r3-more{position:relative!important;overflow:hidden!important;border:1px solid color-mix(in srgb,var(--c01r3-gold) 52%,var(--c01r3-line))!important;background:
 radial-gradient(circle at 104% -4%,color-mix(in srgb,var(--c01r3-gold) 11%,transparent),transparent 35%),
 linear-gradient(155deg,var(--c01r3-card),color-mix(in srgb,var(--c01r3-card2) 64%,var(--c01r3-card)))!important;
 box-shadow:0 18px 48px rgba(34,20,4,.10),inset 0 1px 0 color-mix(in srgb,#fff 38%,transparent)!important}
html[data-theme="dark"] body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card,
html[data-theme="dark"] .c01r3-quick,html[data-theme="dark"] .c01r3-more{
 background:radial-gradient(circle at 110% -8%,rgba(239,162,29,.10),transparent 35%),linear-gradient(155deg,#0a1c2e,#071827)!important;
 box-shadow:0 20px 52px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.025)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card:before{content:"✦";position:absolute;right:-18px;top:-26px;width:118px;height:118px;border-radius:50%;border:1px solid color-mix(in srgb,var(--c01r3-gold) 18%,transparent);display:grid;place-items:center;color:color-mix(in srgb,var(--c01r3-gold) 16%,transparent);font-size:46px;transform:rotate(18deg);pointer-events:none}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card h3{font-size:21px!important;letter-spacing:-.25px!important;margin-bottom:10px!important}
.c01r3-context-badge{z-index:2!important;background:color-mix(in srgb,#24c879 10%,var(--c01r3-card))!important}
.c01r3-context-identity{position:relative;z-index:1;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;margin:0 0 9px;border:1px solid color-mix(in srgb,var(--c01r3-gold) 25%,var(--c01r3-line));border-radius:13px;background:linear-gradient(120deg,color-mix(in srgb,var(--c01r3-gold) 9%,var(--c01r3-card2)),var(--c01r3-card2))}
.c01r3-context-avatar{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--c01r3-gold2),var(--c01r3-gold));color:#261600;font:900 12px/1 var(--c01r3-ui);box-shadow:0 8px 20px rgba(218,136,14,.20)}
.c01r3-context-copy{min-width:0}.c01r3-context-copy small{display:block;color:var(--c01r3-muted);font-size:6.5px;font-weight:850;letter-spacing:.12em;text-transform:uppercase;margin-bottom:3px}.c01r3-context-copy strong{display:block;color:var(--c01r3-text);font-size:10px;line-height:1.2;overflow-wrap:anywhere}.c01r3-context-copy em{display:block;color:var(--c01r3-gold);font-size:7px;font-style:normal;font-weight:800;margin-top:3px}.c01r3-context-sigil{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;color:var(--c01r3-gold);border:1px solid color-mix(in srgb,var(--c01r3-gold) 35%,transparent);background:color-mix(in srgb,var(--c01r3-gold) 6%,transparent);font:700 16px/1 var(--c01r3-display)}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line{position:relative;z-index:1;display:grid!important;grid-template-columns:28px 92px minmax(0,1fr)!important;align-items:center!important;gap:7px!important;padding:8px 0!important;border-bottom:1px solid color-mix(in srgb,var(--c01r3-line) 76%,transparent)!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line:before{width:25px;height:25px;border-radius:8px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--c01r3-gold) 28%,var(--c01r3-line));background:color-mix(in srgb,var(--c01r3-gold) 6%,var(--c01r3-card2));color:var(--c01r3-gold);font-size:11px}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="date"]:before{content:"▣"}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="time"]:before{content:"◷"}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="place"]:before{content:"⌖"}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="source"]:before{content:"✦"}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="person"],body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line[data-c01r3-kind="relationship"]{display:none!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span{font-size:8px!important;font-weight:750!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{max-width:none!important;font-size:8.5px!important;line-height:1.35!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .mini-note{position:relative;z-index:1;margin-top:10px!important;padding:10px 11px 10px 34px!important;background:linear-gradient(120deg,color-mix(in srgb,var(--c01r3-blue) 60%,var(--c01r3-card2)),var(--c01r3-card2))!important;line-height:1.5!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .mini-note:before{content:"✓";position:absolute;left:10px;top:10px;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:#2bc77b;color:#04140d;font-size:9px;font-weight:900}

.c01r3-quick,.c01r3-more{padding:13px!important}
.c01r3-quick h4,.c01r3-more h4{font-size:18px!important;margin-bottom:10px!important;display:flex;align-items:center;gap:8px}.c01r3-quick h4:before{content:"✦";color:var(--c01r3-gold);font-size:13px}.c01r3-more h4:before{content:"⋯";width:24px;height:24px;border-radius:8px;display:grid;place-items:center;border:1px solid var(--c01r3-line2);color:var(--c01r3-gold);font:900 14px/1 var(--c01r3-ui)}
.c01r3-quick-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}.c01r3-quick button{min-height:46px!important;border-radius:12px!important;padding:0 11px!important;font-size:8.5px!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 32%,transparent)!important}.c01r3-quick button span{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:color-mix(in srgb,var(--c01r3-gold) 9%,var(--c01r3-card));font-size:14px!important}
.c01r3-more>p{margin:-4px 0 10px!important;font-size:7.5px!important}.c01r3-more-grid{display:none!important}.c01r3-more .c01r3-secondary{margin:0!important;padding:0!important;border:0!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.c01r3-more .c01r3-secondary button{min-height:44px!important;justify-content:flex-start!important;font-size:8.5px!important;padding:0 12px!important}.c01r3-more .c01r3-secondary button:first-child{background:linear-gradient(135deg,color-mix(in srgb,var(--c01r3-card2) 88%,var(--c01r3-gold) 7%),var(--c01r3-card2))!important}.c01r3-more .c01r3-secondary button:last-child{background:linear-gradient(135deg,#641421,#8d1d2b)!important;color:#ffe9ae!important;border-color:#b04b52!important}

/* The chat page intentionally carries no extra insight/banner card after More. */
.c01r3-insight{display:none!important}

@media(max-width:1180px){body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{grid-template-columns:minmax(0,1fr) 315px!important}.c01r3-prompts{grid-template-columns:repeat(2,minmax(0,1fr))!important}.c01r3-quick-grid{grid-template-columns:1fr!important}}
@media(max-width:900px){body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{grid-template-columns:1fr!important}#atreyaChatC01Rail.c01r3-rail{grid-template-columns:1fr 1fr!important;order:-1!important}.c01r3-quick,.c01r3-more{align-self:stretch!important}.c01r3-context-identity{grid-template-columns:42px minmax(0,1fr) auto}.c01r3-context-avatar{width:42px;height:42px}}
@media(max-width:640px){body.atreya-chat-c01r3-active #atreyaChatC01Content{padding-top:7px!important}.c01r3-prompts{grid-template-columns:1fr 1fr!important;padding:8px 9px 4px!important}.c01r3-prompt{height:34px!important;font-size:7.5px!important}#atreyaChatC01Rail.c01r3-rail{grid-template-columns:1fr!important}.c01r3-quick-grid{grid-template-columns:1fr 1fr!important}.c01r3-more .c01r3-secondary{grid-template-columns:1fr 1fr!important}.c01r3-context-copy strong{font-size:9px}.c01r3-context-sigil{display:none}}


/* ATREYA_CHAT_C01R4R1_BHAV_CONTEXT_SHIFT_BASE
   User-marked surgical refinement only:
   - Make Reading Context, Quick Actions and More typography clearly readable.
   - Preserve C01R3 geometry, menu parity, chat pipeline, theme/language authorities and functional proxies.
*/
body.atreya-chat-c01r3-active #atreyaChatC01Rail{
  --c01r4-rail-label:color-mix(in srgb,var(--c01r3-text) 72%,var(--c01r3-muted));
  --c01r4-rail-value:var(--c01r3-text);
}
html[data-theme="dark"] body.atreya-chat-c01r3-active #atreyaChatC01Rail{
  --c01r4-rail-label:#b7c5d5;
  --c01r4-rail-value:#fff8ea;
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card{padding:17px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card h3{
  font-size:23px!important;line-height:1.08!important;letter-spacing:-.2px!important;margin-bottom:12px!important
}
.c01r3-context-badge{font-size:8.5px!important;font-weight:900!important;height:29px!important;padding:0 11px!important}
.c01r3-context-identity{grid-template-columns:50px minmax(0,1fr) 32px!important;gap:11px!important;padding:11px!important;margin-bottom:11px!important}
.c01r3-context-avatar{width:50px!important;height:50px!important;font-size:13px!important}
.c01r3-context-copy small{font-size:8.5px!important;line-height:1.15!important;letter-spacing:.09em!important;margin-bottom:4px!important;color:var(--c01r4-rail-label)!important}
.c01r3-context-copy strong{font-size:12.5px!important;line-height:1.3!important;font-weight:850!important;color:var(--c01r4-rail-value)!important}
.c01r3-context-copy em{font-size:9px!important;line-height:1.2!important;margin-top:4px!important}
.c01r3-context-sigil{width:32px!important;height:32px!important;font-size:17px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line{
  grid-template-columns:30px 82px minmax(0,1fr)!important;gap:9px!important;padding:10px 0!important;min-height:44px!important
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line:before{width:28px!important;height:28px!important;font-size:12px!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span{
  font-size:10.5px!important;line-height:1.25!important;font-weight:750!important;color:var(--c01r4-rail-label)!important
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{
  font-size:10.5px!important;line-height:1.4!important;font-weight:850!important;color:var(--c01r4-rail-value)!important;text-align:right!important
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .mini-note{
  font-size:9.5px!important;line-height:1.5!important;padding:11px 12px 11px 36px!important;color:var(--c01r4-rail-label)!important
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .mini-note:before{width:19px!important;height:19px!important;font-size:10px!important}
.c01r3-quick,.c01r3-more{padding:15px!important}
.c01r3-quick h4,.c01r3-more h4{font-size:20px!important;line-height:1.1!important;margin-bottom:12px!important}
.c01r3-quick button{
  min-height:50px!important;font-size:10.5px!important;line-height:1.2!important;font-weight:800!important;padding:0 12px!important;gap:8px!important
}
.c01r3-quick button span{width:30px!important;height:30px!important;font-size:15px!important;flex:0 0 30px!important}
.c01r3-more>p{font-size:9.5px!important;line-height:1.4!important;margin:-3px 0 11px!important;color:var(--c01r4-rail-label)!important}
.c01r3-more .c01r3-secondary button{
  min-height:48px!important;font-size:10.5px!important;line-height:1.2!important;font-weight:850!important;padding:0 13px!important;gap:8px!important
}
.c01r3-more .c01r3-secondary button span{font-size:14px!important}
@media(max-width:1180px){
  body.atreya-chat-c01r3-active #atreyaChatC01Content>.chat-layout{grid-template-columns:minmax(0,1fr) 330px!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line{grid-template-columns:30px 74px minmax(0,1fr)!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span{font-size:10px!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{font-size:10px!important}
  .c01r3-quick button,.c01r3-more .c01r3-secondary button{font-size:10px!important}
}
@media(max-width:900px){
  .c01r3-context-copy strong{font-size:12px!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span,
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{font-size:10.5px!important}
}
@media(max-width:640px){
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card{padding:14px!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-card h3{font-size:21px!important}
  .c01r3-context-copy small{font-size:8px!important}.c01r3-context-copy strong{font-size:11.5px!important}.c01r3-context-copy em{font-size:8.5px!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line{grid-template-columns:28px 76px minmax(0,1fr)!important;padding:9px 0!important}
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line span,
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .context-line b{font-size:10px!important}
  .c01r3-quick button,.c01r3-more .c01r3-secondary button{font-size:10px!important}
}


/* ATREYA_CHAT_C01R4R1_BHAVISHWANI_CONTEXT_SHIFT
   Surgical layout change only:
   - Move Bhavishwani Book from More into Reading Context, directly below Source.
   - Preserve C01R4 readable typography, center chat, common shell, theme/language and all functional runtimes.
*/
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav{
  width:100%!important;
  min-height:44px!important;
  margin:10px 0 0!important;
  padding:0 13px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  border-radius:12px!important;
  border:1px solid color-mix(in srgb,#d8aa45 62%,var(--c01r3-line))!important;
  background:linear-gradient(135deg,#651421,#8f1d2c)!important;
  color:#ffe9ae!important;
  box-shadow:0 8px 22px rgba(81,15,25,.24),inset 0 1px 0 rgba(255,255,255,.08)!important;
  font:850 10.5px/1.2 var(--c01r3-ui)!important;
  cursor:pointer!important;
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav:hover,
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav:focus-visible{
  transform:translateY(-1px);
  border-color:#efbe58!important;
  box-shadow:0 10px 26px rgba(115,19,34,.31),0 0 0 2px color-mix(in srgb,#efbe58 15%,transparent)!important;
  outline:none!important;
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav .c01r4r1-bhav-icon{
  width:29px;height:29px;flex:0 0 29px;border-radius:9px;display:grid;place-items:center;
  background:rgba(255,224,147,.10);border:1px solid rgba(255,225,151,.20);font-size:15px;color:#ffd568;
}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav .c01r4r1-bhav-copy{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav .c01r4r1-bhav-copy strong{font-size:10.5px!important;line-height:1.1!important;color:#fff2c4!important}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav .c01r4r1-bhav-copy small{font-size:8.5px!important;line-height:1.25!important;color:#f2c97b!important;margin-top:2px}
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r3-more .c01r3-secondary{grid-template-columns:1fr!important}
html[data-theme="light"] body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav{
  background:linear-gradient(135deg,#8b1d28,#aa2c37)!important;color:#fff8dd!important;border-color:#bd6b62!important;
}
@media(max-width:640px){
  body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r4r1-context-bhav{min-height:42px!important;font-size:10px!important}
}


/* ATREYA_CHAT_C01R4R2_REMOVE_MORE_BLOCK
   User-approved surgical change: remove the More/Share-Manage rail card from /chat.
   Reading Context, Bhavishwani, Quick Actions and all C01R4 readability remain unchanged. */
body.atreya-chat-c01r3-active #atreyaChatC01Rail .c01r3-more{display:none!important}
