/* ============================================================
   site.css — nav + footer (used on every page).
   ============================================================ */

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}
.site-nav.scrolled { border-bottom-color: var(--border); background: color-mix(in oklab, var(--bg) 92%, transparent); }

.nav-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 14px var(--content-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  /* brand ko sikudne mat do -- warna "Learn · Analyse · Practise"
     agli line me chala jaata hai */
  flex: 0 0 auto;
}
.brand-name, .brand-sub { white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -8px rgba(26,107,72,.7);
}
.brand-mark svg { width: 18px; height: 18px; }
/* Dono span the aur inline chal rahe the, isliye naam aur tagline ek
   hi line me baith jaate the. margin-top: 3px se saaf hai ki tagline
   neeche aani chahiye thi -- bas display: block chhoot gaya tha. */
.brand-name { display: block; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 15.5px; color: var(--text); line-height: 1.1; }
.brand-sub  { display: block; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }

@media (max-width: 620px) {
  .brand-full { display: none; }
  .brand-short { display: inline; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
  .brand-sub { font-size: 9.5px; }
}
@media (min-width: 621px) {
  .brand-short { display: none; }
  .brand-full  { display: inline; }
}

/* Desktop links */
.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav-links > a, .nav-links > .tools-wrap > button {
  padding: 10px 14px;
  font-size: 14px;
  /* Yeh line zaroori hai. Iske bina "What you learn" jagah kam padne
     par teen line me toot jaata tha, aur poori patti bigad jaati thi. */
  white-space: nowrap;
  color: var(--text-muted);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links > a:hover, .nav-links > .tools-wrap > button:hover { color: var(--text); background: rgba(28,26,23,.04); }
.nav-links > a.active { color: var(--text); }

/* Tools dropdown */
.tools-wrap { position: relative; }
.tools-btn { cursor: pointer; }
.tools-btn .chev { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease); }
.tools-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.tools-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.tools-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.tools-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  color: var(--text);
  transition: background var(--dur-fast) var(--ease);
}
.tools-item:hover { background: var(--surface-2); }
.tools-item .ti-ico {
  width: 36px; height: 36px;
  background: var(--accent-light);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.tools-item .ti-ico svg { width: 18px; height: 18px; }
.ti-name { display: block; font-weight: 500; font-size: 14px; color: var(--text); }
.ti-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tools-item.soon { cursor: default; opacity: .68; }
.tools-item.soon:hover { background: transparent; }
.soon-tag {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-muted);
  margin-left: 6px;
}
.tools-note {
  padding: 10px 12px 4px;
  color: var(--text-dim);
  font-size: 11.5px;
  text-align: center;
}

/* Nav actions on the right (Login / Sign in / user name / Logout) */
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-actions a { padding: 10px 14px; font-size: 14px; color: var(--text-muted); border-radius: var(--r-pill); }
.nav-actions a:hover { color: var(--text); background: rgba(28,26,23,.04); }
/* `.nav-actions a` (do class) `.btn-signup` (ek class) se bhaari hai,
   isliye safed rang haar jaata tha aur button par gehra bhoora likha
   aata tha -- hare par padha hi nahi jaata. Isliye yahan bhi utna hi
   bhaari selector rakha hai. */
.nav-actions a.btn-signup,
.btn-signup {
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  margin-left: 6px;
  transition: background var(--dur-fast) var(--ease);
}
.nav-actions a.btn-signup:hover,
.btn-signup:hover { background: var(--accent-strong); color: var(--on-accent); }

/* Hamburger — mobile only */
.nav-hamburger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  color: var(--text);
  align-items: center; justify-content: center;
}
.nav-hamburger svg { width: 22px; height: 22px; }

/* 1100px par mobile menu -- pehle 940 tha, par login ke baad itni
   cheezein ho jaati hain ki 940-1100 ke beech patti tang lagti thi */
@media (max-width: 1100px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: inline-flex; }
  .nav-inner { padding-block: 12px; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0;
  z-index: 60;
  visibility: hidden;
}
.mobile-drawer.open { visibility: visible; }
.mobile-scrim {
  position: absolute; inset: 0;
  background: rgba(20,18,15,.35);
  opacity: 0; transition: opacity var(--dur-med) var(--ease);
}
.mobile-drawer.open .mobile-scrim { opacity: 1; }
.mobile-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(340px, 88vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-drawer.open .mobile-panel { transform: translateX(0); }
.mobile-panel .m-close {
  align-self: flex-end; width: 40px; height: 40px; border-radius: var(--r-pill);
  color: var(--text); font-size: 22px;
}
.mobile-panel .m-close:hover { background: var(--surface-2); }
.mobile-panel a, .mobile-panel .m-group-title {
  padding: 12px 10px; border-radius: var(--r-md);
  font-size: 15px; color: var(--text); font-weight: 500;
}
.mobile-panel a:hover { background: var(--surface-2); }
.m-group-title { color: var(--text-muted); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; padding-top: 18px; padding-bottom: 4px; }
.mobile-panel .m-tools a { padding-left: 22px; color: var(--text-muted); font-size: 14px; }
.mobile-panel .m-cta {
  margin-top: 16px;
  background: var(--accent); color: #fff;
  padding: 14px 18px;
  text-align: center;
  border-radius: var(--r-pill);
}
.mobile-panel .m-cta:hover { background: var(--accent-strong); }

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 44px 0 28px;
  /* Pehle yahan `margin-top: 80px` tha. Har page ke aakhri hisse me
     neeche pehle se 56-96px padding hai, isliye wo 80px DOHRA lag
     raha tha -- button aur footer ke text ke beech 236px khaali
     jagah. Footer ki apni 60px top padding, border aur alag
     background use kaafi alag dikha dete hain. */
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 780px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-grid > .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}
.foot-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--text); letter-spacing: -0.01em; }
.foot-brand-sub  { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.foot-brand p { color: var(--text-muted); font-size: 14px; margin-top: 14px; max-width: 320px; line-height: 1.6; }
.foot-col h4 { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: 14px; }
.foot-col a, .foot-col span.dim { display: block; padding: 5px 0; color: var(--text); font-size: 14px; transition: color var(--dur-fast) var(--ease); }
.foot-col a:hover { color: var(--accent); }
.foot-col span.dim { color: var(--text-dim); }

.foot-legal { border-top: 1px solid var(--border); padding-top: 22px; }
.legal-text { color: var(--text-muted); font-size: 12.5px; line-height: 1.7; max-width: 820px; }
.legal-text strong { color: var(--text); font-weight: 600; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 18px; font-size: 12px; color: var(--text-dim); }
.foot-meta a:hover { color: var(--text); }

/* ============================================================
   Account menu -- HAR page par chahiye (23 Aug)

   Yeh block do jagah rakha hai: site.css (naya homepage) aur
   style.css (baaki saare page). Wajah: nav-auth.js har page par
   chalti hai, par site.css sirf homepage load karta hai. Pehle
   yeh sirf site.css me tha, isliye /class aur /admin par menu
   BINA CSS ke khul raha tha -- saara text ek saath.

   Variable ke naam dono theme me alag hain (naya: --accent,
   purana: --teal), isliye har jagah fallback diya hai. Ek hi
   block dono jagah chalta hai.

   Badle to DONO jagah badalna.
   ============================================================ */

.nav-signin {
  padding: 10px 14px; font-size: 14px;
  color: var(--text-muted, #5c574e);
  border-radius: var(--r-pill, 999px);
  white-space: nowrap; text-decoration: none;
  transition: color .18s ease, background .18s ease;
}
.nav-signin:hover { color: var(--text, #1c1a17); background: rgba(128,128,128,.10); }

.acct-wrap { position: relative; }

.acct-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border, rgba(128,128,128,.25));
  border-radius: var(--r-pill, 999px);
  background: var(--surface, rgba(128,128,128,.08));
  cursor: pointer; font: inherit; color: inherit;
  transition: border-color .18s ease, background .18s ease;
}
.acct-btn:hover { border-color: var(--accent, var(--teal, #1a6b48)); }
.acct-ini {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent, var(--teal, #1a6b48));
  color: #fff;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  flex: 0 0 auto;
}
.acct-btn .chev {
  width: 14px; height: 14px;
  color: var(--text-muted, #5c574e);
  transition: transform .18s ease;
}
.acct-wrap.open .acct-btn .chev { transform: rotate(180deg); }

.acct-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 232px;
  background: var(--surface, #1a2036);
  border: 1px solid var(--border, rgba(128,128,128,.25));
  border-radius: var(--r-lg, 14px);
  padding: 6px;
  box-shadow: var(--shadow-lg, 0 18px 44px rgba(0,0,0,.28));
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 90;
}
.acct-wrap.open .acct-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.acct-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border, rgba(128,128,128,.25));
  margin-bottom: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.acct-name { font-size: 14px; font-weight: 600; color: var(--text, inherit); }
.acct-meta {
  font-size: 12px; color: var(--text-muted, #8b857a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px;
}

.acct-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 9px;
  font-size: 14px; color: var(--text, inherit);
  background: none; border: 0; cursor: pointer;
  font: inherit; text-decoration: none;
  transition: background .18s ease;
}
.acct-item:hover { background: rgba(128,128,128,.12); }
.acct-item.danger { color: var(--red, var(--danger, #9a3b26)); }
.acct-item.danger:hover { background: rgba(154,59,38,.12); }

/* mobile drawer ke account link */
.m-acct { display: block; }
