/* AiHisab Knowledge — Release 3 add-on (v6.1.0)
   Brand line, mobile bottom tab bar, Listen button on answers, EN / हि switch.
   Load after app.css. Uses the same colour tokens, so light and dark themes both work. */

/* ---------- brand: "by Atulya Intelligence" ---------- */
.brand .brand-t{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding-left:11px;border-left:1px solid var(--line)}
.brand .brand-t .kb{line-height:1.2}
.brand .by{display:block;font:500 10.5px/1.25 'Inter',system-ui,sans-serif;letter-spacing:0;color:var(--muted);white-space:nowrap}
.brand .by .by-n{font-weight:600;color:var(--text-2)}
.foot .brand .brand-t{border-left-color:var(--line-2)}
/* make room in the header for the brand line */
.cmdk{width:168px}
.nav{margin-left:12px}.nav a{padding:8px 10px}
@media (max-width:1280px){.cmdk{width:auto}.cmdk span{display:none}}
@media (max-width:1100px){.app-btn span{display:none}.app-btn{padding:9px 10px}}

/* ---------- EN / हि switch ---------- */
.lang-sw{display:inline-flex;align-items:center;height:38px;padding:3px;border-radius:11px;border:1px solid var(--line);background:var(--panel)}
.lang-sw button{display:grid;place-items:center;min-width:32px;height:30px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:600 12.5px/1 var(--display);cursor:pointer;transition:background .15s,color .15s}
.lang-sw button[data-lang=hi]{font-family:'Noto Sans Devanagari',var(--display);font-size:14px}
.lang-sw button:hover{color:var(--text)}
.lang-sw button[aria-pressed=true]{background:var(--soft);color:var(--teal)}
/* in the dark top strip on desktop */
.fbar .lang-sw{flex:none;height:24px;padding:2px;margin-left:4px;border-radius:7px;border-color:rgba(165,180,252,.3);background:transparent}
.fbar .lang-sw button{height:18px;min-width:26px;padding:0 6px;border-radius:5px;font-size:11px;color:var(--on-navy2)}
.fbar .lang-sw button[data-lang=hi]{font-size:12px}
.fbar .lang-sw button:hover{color:#fff}
.fbar .lang-sw button[aria-pressed=true]{background:rgba(165,180,252,.2);color:#fff}
@media (min-width:961px){.r3-strip-sw .top-r .lang-sw{display:none}}
@media (max-width:960px){.fbar .lang-sw{display:none}}

/* ---------- Listen button on answers ---------- */
.a-foot button[data-speak] svg{flex:none}
.a-foot button[data-speak].on{color:#fff;background:var(--grad);border-color:transparent;box-shadow:0 6px 16px rgba(var(--acc),.28)}
.a-foot button[data-speak].on .eq{display:inline-flex}
.a-foot button[data-speak] .eq{display:none;align-items:flex-end;gap:2px;height:12px}
.a-foot button[data-speak] .eq i{display:block;width:2px;border-radius:1px;background:currentColor;animation:r3eq .9s ease-in-out infinite}
.a-foot button[data-speak] .eq i:nth-child(1){height:5px}
.a-foot button[data-speak] .eq i:nth-child(2){height:11px;animation-delay:-.3s}
.a-foot button[data-speak] .eq i:nth-child(3){height:8px;animation-delay:-.6s}
@keyframes r3eq{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}

/* ---------- mobile bottom tab bar ---------- */
.tabbar{display:none}
@media (max-width:960px){
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));
    background:color-mix(in srgb,var(--panel) 90%,transparent);backdrop-filter:blur(16px) saturate(1.5);-webkit-backdrop-filter:blur(16px) saturate(1.5);
    border-top:1px solid var(--line);box-shadow:0 -10px 30px rgba(15,23,42,.07)}
  .tabbar a,.tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:52px;padding:4px 2px;
    border:0;border-radius:12px;background:transparent;font:600 11px/1.15 'Inter',system-ui,sans-serif;color:var(--muted);cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tabbar .ti{display:grid;place-items:center;width:44px;height:28px;border-radius:999px;transition:background .2s,color .2s}
  .tabbar .tl{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tabbar a:active .ti,.tabbar button:active .ti{transform:scale(.94)}
  .tabbar [aria-current=page]{color:var(--teal)}
  .tabbar [aria-current=page] .ti{background:var(--soft)}
  :root[data-theme=dark] .tabbar{box-shadow:0 -10px 30px rgba(0,0,0,.35)}

  /* the tab bar replaces the burger menu */
  .burger{display:none!important}
  .nav.open{display:none}
  body.has-tabbar{padding-bottom:calc(70px + env(safe-area-inset-bottom,0px))}
  body.has-tabbar .foot{padding-bottom:20px}
  .chatting .ask.docked{bottom:calc(82px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:640px){
  .cmdk{display:none}                 /* Search lives in the tab bar */
  .brand img{height:30px}
  .brand .brand-t{padding-left:8px;gap:0}
  .brand .by{max-width:80px;white-space:normal;font-size:10px}
  .lang-sw{height:36px;padding:0;border-radius:11px}
  .lang-sw button{height:34px;min-width:34px;border-radius:10px;padding:0 6px}
  .lang-sw button[aria-pressed=true]{display:none}   /* on a phone it is one tap: shows the other language */
}
@media (max-width:350px){.brand .brand-t{display:none}}
@media (prefers-reduced-motion:reduce){.a-foot button[data-speak] .eq i{animation:none}}

/* ---------- Hindi mode ---------- */
html[lang=hi] body{font-family:'Inter','Noto Sans Devanagari',system-ui,-apple-system,'Segoe UI',sans-serif}
html[lang=hi] h1,html[lang=hi] h2,html[lang=hi] h3,html[lang=hi] .brand b,html[lang=hi] .tile h3,html[lang=hi] .btn,html[lang=hi] .ask .go,html[lang=hi] .app-btn{font-family:'Plus Jakarta Sans','Noto Sans Devanagari',ui-sans-serif,system-ui,sans-serif}
html[lang=hi] h1,html[lang=hi] .hero h1{letter-spacing:-.01em;line-height:1.22}
/* wide tracking and capitals break Devanagari joins: switch them off in Hindi */
html[lang=hi] .kicker,html[lang=hi] .sec-k,html[lang=hi] .badge,html[lang=hi] .brand .kb,html[lang=hi] .demo-top,html[lang=hi] .foot h4,
html[lang=hi] .box h3,html[lang=hi] .f label,html[lang=hi] .ob .k,html[lang=hi] .pal-list .grp,html[lang=hi] .try-k,html[lang=hi] .how .n,
html[lang=hi] .tool-h small,html[lang=hi] .table.t th,html[lang=hi] table.t th,html[lang=hi] .pill,html[lang=hi] .crumbs{letter-spacing:0;text-transform:none}
html[lang=hi] .f label,html[lang=hi] .ob .k,html[lang=hi] .foot h4,html[lang=hi] .box h3{font-size:12.5px}
html[lang=hi] .kicker,html[lang=hi] .sec-k{font-size:12.5px}
html[lang=hi] .tabbar a,html[lang=hi] .tabbar button{font-size:11.5px}
