/* ==================================================================
   MAHA SEARCH — STYLES
   Mavorium Private Limited
   Upload to: public_html/maha/assets/maha.css

   Three themes: light, dark, and a colour mode where the visitor
   picks the background. In colour mode the text colour is computed
   from the background's luminance, so a bright yellow background
   gets black text and a deep blue gets white — the page stays
   readable whatever they choose.
   ================================================================== */

:root{
  --brand:#1E2E7A;
  --accent:#E8A317;
  --paper:#ffffff;
  --surface:#F6F7F9;
  --ink:#14161A;
  --muted:#5B6472;
  --rule:#E4E7EC;
  --link:#1A3FA0;
  --visited:#5B3FA0;
  --radius:14px;
  --shadow:0 1px 2px rgba(20,22,26,.06),0 8px 24px rgba(20,22,26,.06);
}

[data-theme="dark"]{
  --paper:#0F1116;
  --surface:#171A21;
  --ink:#E6E9EF;
  --muted:#98A1B0;
  --rule:#262B35;
  --link:#8FB0FF;
  --visited:#C4A6FF;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.3);
}

/* Colour mode: --paper and --ink are set inline by maha.js */
[data-theme="colour"]{
  --rule:rgba(128,128,128,.28);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:400 16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}

/* ---------- wordmark ----------
   A serif wordmark against a sans interface. Search engines all use
   geometric sans logos; a serif reads as considered rather than
   generic, and it is the one place the page allows itself an
   ornament. */
.wordmark{
  font-family:"Instrument Serif",Georgia,"Times New Roman",serif;
  font-weight:400;
  letter-spacing:-.01em;
  color:var(--ink);
  text-decoration:none;
  display:inline-block;
}
.wordmark .maha{color:var(--brand)}
[data-theme="dark"] .wordmark .maha{color:#93A8FF}
[data-theme="colour"] .wordmark .maha{color:inherit;opacity:.85}

/* ---------- home ---------- */
.home{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 20px 80px;
  text-align:center;
}
.home .wordmark{font-size:clamp(2.6rem,11vw,4.2rem);margin-bottom:6px}
.tagline{
  color:var(--muted);
  font-size:.9rem;
  margin:0 0 30px;
  letter-spacing:.01em;
}

/* ---------- search box ---------- */
.searchbox{width:100%;max-width:580px}
.searchbox form{display:flex;gap:8px}
.field{
  position:relative;
  flex:1;
  display:flex;
  align-items:center;
  background:var(--paper);
  border:1px solid var(--rule);
  border-radius:999px;
  box-shadow:var(--shadow);
  padding:0 6px 0 18px;
  transition:border-color .15s;
}
.field:focus-within{border-color:var(--brand)}
[data-theme="dark"] .field{background:var(--surface)}
.field input{
  flex:1;
  border:0;
  background:transparent;
  color:var(--ink);
  font:400 16px/1.4 inherit;
  padding:14px 6px;
  outline:none;
  min-width:0;
}
.field input::placeholder{color:var(--muted)}
.go{
  border:0;
  background:var(--brand);
  color:#fff;
  border-radius:999px;
  padding:10px 18px;
  font:600 15px/1 inherit;
  cursor:pointer;
  flex-shrink:0;
}
.go:hover{filter:brightness(1.1)}
.go:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* ---------- chips ---------- */
.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:20px;
}
.chip{
  border:1px solid var(--rule);
  background:transparent;
  color:var(--muted);
  border-radius:999px;
  padding:7px 15px;
  font:500 13.5px/1 inherit;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}
.chip:hover{border-color:var(--brand);color:var(--ink)}
.chip[aria-current="true"]{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}

/* ---------- results ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--paper);
  border-bottom:1px solid var(--rule);
  padding:12px 16px 0;
}
.topbar .row{
  display:flex;
  align-items:center;
  gap:14px;
  max-width:720px;
  margin:0 auto;
}
.topbar .wordmark{font-size:1.5rem;flex-shrink:0}
.topbar .searchbox{max-width:none}
.tabs{
  display:flex;
  gap:4px;
  overflow-x:auto;
  max-width:720px;
  margin:10px auto 0;
  padding-bottom:2px;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none}
.tab{
  padding:9px 14px;
  font:500 14px/1 inherit;
  color:var(--muted);
  text-decoration:none;
  border-bottom:2px solid transparent;
  white-space:nowrap;
}
.tab[aria-current="page"]{color:var(--brand);border-bottom-color:var(--brand)}
[data-theme="dark"] .tab[aria-current="page"]{color:#93A8FF;border-bottom-color:#93A8FF}

main{max-width:720px;margin:0 auto;padding:22px 16px 90px}

.meta{color:var(--muted);font-size:.82rem;margin:0 0 20px}

.result{margin-bottom:26px}
.result .site{
  color:var(--muted);
  font-size:.79rem;
  margin:0 0 3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.result h3{margin:0 0 4px;font-size:1.07rem;font-weight:500;line-height:1.35}
.result h3 a{color:var(--link);text-decoration:none}
.result h3 a:visited{color:var(--visited)}
.result h3 a:hover{text-decoration:underline}
.result p{margin:0;color:var(--muted);font-size:.92rem;line-height:1.5}

.answerbox{
  border:1px solid var(--rule);
  border-left:3px solid var(--accent);
  border-radius:var(--radius);
  padding:16px 18px;
  margin-bottom:26px;
  background:var(--surface);
}
.answerbox p{color:var(--ink);font-size:1rem;margin:0}

/* image grid */
.imggrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.imggrid a{display:block;border-radius:10px;overflow:hidden;background:var(--surface);aspect-ratio:1}
.imggrid img{width:100%;height:100%;object-fit:cover;display:block}

/* news + video cards */
.card{display:flex;gap:12px;margin-bottom:20px;align-items:flex-start}
.card img{width:104px;height:74px;object-fit:cover;border-radius:9px;flex-shrink:0;background:var(--surface)}
.card .body{min-width:0;flex:1}
.card h3{margin:0 0 4px;font-size:.97rem;font-weight:500;line-height:1.35}
.card h3 a{color:var(--link);text-decoration:none}
.card .sub{color:var(--muted);font-size:.78rem;margin:0}

/* ---------- notices ---------- */
.notice{
  border:1px solid var(--rule);
  border-radius:var(--radius);
  padding:18px 20px;
  margin:8px 0 26px;
  background:var(--surface);
}
.notice.block{border-left:3px solid #C2410C}
.notice p{margin:0;font-size:.95rem}
.notice p + p{margin-top:8px}
.empty{color:var(--muted);text-align:center;padding:44px 0}

/* ---------- history ---------- */
.history{max-width:580px;width:100%;margin:32px auto 0;text-align:left}
.history header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-bottom:8px;
}
.history h2{font:600 12px/1 inherit;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0}
.history .clear{
  background:none;border:0;color:var(--muted);
  font:500 12.5px/1 inherit;cursor:pointer;text-decoration:underline;padding:0;
}
.history ul{list-style:none;margin:0;padding:0}
.history li{
  display:flex;align-items:center;gap:8px;
  border-bottom:1px solid var(--rule);
}
.history li a{
  flex:1;padding:11px 2px;color:var(--ink);
  text-decoration:none;font-size:.93rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.history li button{
  background:none;border:0;color:var(--muted);
  font-size:19px;line-height:1;cursor:pointer;padding:8px;
}
.history li button:hover{color:#C2410C}

/* ---------- points chip ---------- */
.points{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:30;
  background:var(--brand);
  color:#fff;
  border-radius:999px;
  padding:9px 15px;
  font:600 13px/1 inherit;
  box-shadow:var(--shadow);
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:7px;
}
.points .earn{
  color:var(--accent);
  opacity:0;
  transform:translateY(4px);
}
.points .earn.show{animation:earn 1.9s ease forwards}
@keyframes earn{
  0%{opacity:0;transform:translateY(5px)}
  18%{opacity:1;transform:translateY(0)}
  72%{opacity:1;transform:translateY(0)}
  100%{opacity:0;transform:translateY(-5px)}
}

/* ---------- toolbar ---------- */
.tools{
  position:fixed;
  left:14px;
  bottom:14px;
  z-index:30;
  display:flex;
  gap:7px;
  align-items:center;
}
.tools button,.tools a{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:50%;
  border:1px solid var(--rule);
  background:var(--paper);
  color:var(--ink);
  cursor:pointer;
  font-size:15px;
  text-decoration:none;
  box-shadow:var(--shadow);
}
.tools button:hover{border-color:var(--brand)}
.tools .on{background:var(--brand);color:#fff;border-color:var(--brand)}

.swatches{
  display:none;
  gap:6px;
  align-items:center;
  background:var(--paper);
  border:1px solid var(--rule);
  border-radius:999px;
  padding:6px 9px;
  box-shadow:var(--shadow);
}
.swatches.open{display:flex}
.swatches span{
  width:22px;height:22px;border-radius:50%;
  cursor:pointer;border:1px solid rgba(0,0,0,.14);
}
.swatches input[type=color]{
  width:26px;height:26px;padding:0;border:0;background:none;cursor:pointer;
}

/* ---------- footer ---------- */
.foot{
  text-align:center;
  padding:26px 16px 100px;
  color:var(--muted);
  font-size:.79rem;
}
.foot a{color:var(--muted);margin:0 9px}

@media (max-width:560px){
  /* The wordmark stays on phones. A search engine with no name beside
     the box could be anyone's; the mark is the whole point of being
     recognised. It shrinks rather than disappearing. */
  .card img{width:82px;height:60px}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}

/* ---------- coded wordmark ----------
   The SVG carries its own colour, so the theme must not tint it.
   Sizing is capped per context: full width on the home screen,
   compact in the results bar. */
.home-mark{display:block;width:100%;max-width:430px;margin:0 auto 6px}
.home-mark .wm-svg{height:auto}
.top-mark{display:block;width:92px;flex-shrink:0}
.top-mark .wm-svg{height:28px}
@media (max-width:560px){
  .top-mark{width:62px}
  .top-mark .wm-svg{height:22px}
  .topbar .row{gap:9px}
  .topbar{padding-left:12px;padding-right:56px}
  .field{padding:0 4px 0 13px}
  .go{padding:10px 14px;font-size:14px}
}
@media (max-width:380px){
  .top-mark{width:52px}
}
@media (max-width:560px){
  .home-mark{max-width:310px}
}

/* ---------- account menu ---------- */
.mmenu{position:fixed;top:12px;right:12px;z-index:40}
.mmenu > button{
  width:40px;height:40px;border-radius:50%;
  border:1px solid var(--rule);background:var(--paper);color:var(--ink);
  font-size:17px;cursor:pointer;box-shadow:var(--shadow);
  display:grid;place-items:center;
}
.mmenu > button:hover{border-color:var(--brand)}
.mmenu nav{
  display:none;position:absolute;right:0;top:48px;min-width:196px;
  background:var(--paper);border:1px solid var(--rule);border-radius:14px;
  box-shadow:var(--shadow);padding:7px;
}
.mmenu nav.open{display:block}
.mmenu nav a{
  display:block;padding:10px 12px;border-radius:9px;
  color:var(--ink);text-decoration:none;font-size:14.5px;
}
.mmenu nav a:hover{background:var(--surface)}
.mmenu nav a.out{
  color:#C2410C;border-top:1px solid var(--rule);
  margin-top:5px;padding-top:11px;border-radius:0;
}
.mmenu .me{
  margin:5px 12px 9px;font-size:13.5px;font-weight:600;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.mmenu .me small{
  display:block;font-weight:400;font-size:11.5px;color:var(--muted);
  margin-top:2px;letter-spacing:.03em;
}
/* The results bar is sticky, so the menu needs to clear it. */
.topbar{padding-right:60px}
@media (max-width:560px){
  .mmenu{top:9px;right:9px}
  .mmenu > button{width:36px;height:36px}
}

/* ---------- Maya ----------
   The answer sits above the sources but is visually subordinate to
   them: a panel, not a headline. Maya reads the page; the sources are
   still the authority, and the design should not suggest otherwise. */
.maya{
  border:1px solid var(--rule);
  border-left:3px solid #7B3BF0;
  border-radius:var(--radius);
  background:var(--surface);
  padding:18px 20px;
  margin:0 0 26px;
}
.maya-by{
  display:flex;align-items:center;gap:8px;
  font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);margin:0 0 12px;font-weight:600;
}
.maya-dot{
  width:8px;height:8px;border-radius:50%;
  background:linear-gradient(135deg,#7B3BF0,#E23AA0);
  flex-shrink:0;
}
.maya-text{font-size:1rem;line-height:1.62;color:var(--ink)}
.maya-text ul{margin:9px 0;padding-left:20px}

/* Citation markers: small, superscript, obviously clickable. */
a.maya-cite{
  display:inline-block;
  min-width:16px;height:16px;line-height:16px;
  margin:0 1px 0 2px;padding:0 3px;
  font-size:10px;font-weight:700;text-align:center;
  vertical-align:super;
  color:#fff;background:#7B3BF0;
  border-radius:4px;text-decoration:none;
}
a.maya-cite:hover{background:#E23AA0}

/* Numbered sources, so [2] in the answer maps to a visible source. */
.srcnum{
  display:inline-block;
  min-width:16px;height:16px;line-height:16px;
  margin-right:7px;padding:0 3px;
  font-size:10px;font-weight:700;text-align:center;
  color:var(--muted);border:1px solid var(--rule);border-radius:4px;
}

/* ---------- instant answer cards ----------
   Distinct from a result, because it is an answer rather than a link.
   Always carries its source: an unattributed answer is a claim by us,
   and Maha Search does not make claims of its own. */
.acard{
  display:flex;gap:16px;align-items:flex-start;
  border:1px solid var(--rule);border-radius:var(--radius);
  background:var(--surface);padding:18px 20px;margin:0 0 22px;
}
.acard-ico{width:56px;height:56px;object-fit:contain;flex-shrink:0}
.acard-body{min-width:0;flex:1}
.acard-big{
  font-size:2rem;font-weight:600;letter-spacing:-.02em;
  margin:0 0 2px;line-height:1.1;color:var(--ink);
}
.acard h3{margin:0 0 5px;font-size:1rem;font-weight:600;line-height:1.35}
.acard p{margin:0;color:var(--muted);font-size:.92rem;line-height:1.5}
.acard-src{margin-top:9px!important;font-size:.78rem!important}
.acard-src a{color:var(--muted);text-decoration:none}
.acard-src a:hover{color:var(--brand);text-decoration:underline}

.acard-weather{border-left:3px solid #2B8CE0}
.acard-currency{border-left:3px solid #12A594}
.acard-dictionary{border-left:3px solid #7B3BF0}
.acard-wiki{border-left:3px solid #5B6472}

@media (max-width:520px){
  .acard{padding:15px 16px;gap:12px}
  .acard-ico{width:44px;height:44px}
  .acard-big{font-size:1.6rem}
}

/* ---------- language picker ---------- */
.langpick{padding:9px 12px 4px;border-top:1px solid var(--rule);margin-top:5px}
.langpick p{
  margin:0 0 6px;font-size:11px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);font-weight:600;
}
.langpick select{
  width:100%;padding:8px 10px;border-radius:8px;
  border:1px solid var(--rule);background:var(--paper);color:var(--ink);
  font:400 14px/1.3 inherit;cursor:pointer;
}

/* ---------- right-to-left ----------
   Arabic and Urdu. Only the handful of rules that actually assume a
   left-to-right page need flipping; the rest is direction-agnostic. */
[dir="rtl"] .field{padding:0 18px 0 6px}
[dir="rtl"] .result .site,
[dir="rtl"] .maya-text,
[dir="rtl"] .acard-body{text-align:right}
[dir="rtl"] .tools{left:auto;right:14px}
[dir="rtl"] .points{right:auto;left:14px}
[dir="rtl"] .mmenu{right:auto;left:12px}
[dir="rtl"] .mmenu nav{right:auto;left:0}
[dir="rtl"] .topbar{padding-right:16px;padding-left:60px}
[dir="rtl"] .acard{flex-direction:row-reverse}
[dir="rtl"] .card{flex-direction:row-reverse}
[dir="rtl"] .srcnum{margin-right:0;margin-left:7px}
[dir="rtl"] .history li a{text-align:right}
[dir="rtl"] .rowlink .arrow{transform:rotate(180deg)}

/* Devanagari, Tamil and other Indic scripts sit taller than Latin;
   a little extra line height stops descenders colliding. */
html[lang="hi"] body, html[lang="mr"] body, html[lang="bn"] body,
html[lang="ta"] body, html[lang="te"] body, html[lang="gu"] body,
html[lang="kn"] body, html[lang="ml"] body, html[lang="pa"] body{
  line-height:1.68;
}
html[lang="ur"] body, html[lang="ar"] body{line-height:1.85}

/* ---------- about card ----------
   Facts as a definition list rather than prose: someone asking who
   built this wants the answer scannable, not buried in a paragraph. */
.acard-sub{
  color:var(--muted)!important;font-size:.8rem!important;
  margin:-2px 0 8px!important;letter-spacing:.02em;
}
.acard-facts{margin:13px 0 0;padding:0;display:grid;gap:7px}
.acard-facts div{display:flex;gap:10px;align-items:baseline}
.acard-facts dt{
  flex:0 0 40%;max-width:150px;color:var(--muted);
  font-size:.78rem;margin:0;
}
.acard-facts dd{margin:0;font-size:.84rem;color:var(--ink);min-width:0;word-break:break-word}
.acard-links{margin:13px 0 0!important;display:flex;flex-wrap:wrap;gap:5px 14px}
.acard-links a{color:var(--brand);text-decoration:none;font-size:.83rem;font-weight:500}
.acard-links a:hover{text-decoration:underline}
[data-theme="dark"] .acard-links a{color:#93A8FF}
.acard-about{border-left:3px solid #1E2E7A}
[data-theme="dark"] .acard-about{border-left-color:#93A8FF}
@media (max-width:480px){
  .acard-facts dt{flex:0 0 42%}
}
