/* Mahendra Maths Path — shared styles. Light theme, Mahendra blue + saffron. */
:root {
  --navy: #0b2559; --blue: #1c4fd8; --blue-600: #1a44b8; --blue-50: #eef3ff; --blue-100: #dce6ff;
  --saffron: #f59e0b; --saffron-600: #d97706; --saffron-50: #fff7e6;
  --green: #15803d; --green-50: #e9f8ef; --red: #c2410c; --red-50: #fff1ea; --violet: #6d28d9; --violet-50: #f3eeff; --teal: #0f766e; --teal-50: #e6f6f4;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f4f6fb; --card: #fff;
  --radius: 16px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --font: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
:lang(hi), .hi { font-family: 'Noto Sans Devanagari', 'Plus Jakarta Sans', sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
.ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ico svg { width: 100%; height: 100%; }
.icon-bubble .ico { width: 18px; height: 18px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .center { text-align: center; }
.en-sub { display: block; font-size: .82em; color: var(--muted); font-weight: 500; font-family: 'Plus Jakarta Sans', sans-serif; }
.row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; } .stack-lg > * + * { margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); }
.logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; box-shadow: 0 4px 12px rgba(28, 79, 216, .35); position: relative; }
.logo::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--saffron); border: 2px solid #fff; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }

.icon-bubble { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ring-wrap { display: grid; place-items: center; position: relative; }
.ring-wrap .ring-label { position: absolute; text-align: center; }
.ring-wrap .ring-label b { font-size: 30px; display: block; line-height: 1; }

.stat { background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); border: 1px solid rgba(226, 232, 240, .7); }
.stat b { display: block; font-size: 22px; line-height: 1.1; } .stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.click { cursor: pointer; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(226, 232, 240, .7); }
.card.flat { box-shadow: none; }
.card.click { cursor: pointer; transition: transform .12s, box-shadow .12s; } .card.click:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(15, 23, 42, .1); }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.card-h h3 { font-size: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; cursor: pointer; background: var(--blue); color: #fff; min-height: 44px; transition: background .15s, transform .05s; text-align: center; }
.btn:hover { background: var(--blue-600); } .btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.saffron { background: var(--saffron); color: #1f1300; } .btn.saffron:hover { background: var(--saffron-600); color: #fff; }
.btn.ghost { background: var(--blue-50); color: var(--blue); } .btn.ghost:hover { background: var(--blue-100); }
.btn.line { background: #fff; color: var(--ink-2); border: 1px solid var(--line); } .btn.line:hover { background: #f8fafc; }
.btn.green { background: var(--green); } .btn.danger { background: var(--red); }
.btn.block { width: 100%; } .btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { min-height: 54px; font-size: 16px; border-radius: 14px; }

.field { display: block; } .field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; min-height: 46px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
textarea.input { min-height: 90px; resize: vertical; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--blue-50); color: var(--blue); white-space: nowrap; }
.pill.saffron { background: var(--saffron-50); color: #9a5a00; } .pill.green { background: var(--green-50); color: var(--green); } .pill.red { background: var(--red-50); color: var(--red); }
.pill.violet { background: var(--violet-50); color: var(--violet); } .pill.teal { background: var(--teal-50); color: var(--teal); } .pill.grey { background: #eef1f5; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; cursor: pointer; font-weight: 600; font-size: 13px; }
.chip.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.chip.suggest { border-color: var(--saffron); }

.bar { height: 8px; background: #e8edf5; border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #4f7cff); border-radius: 99px; }
.bar.saffron > i { background: linear-gradient(90deg, var(--saffron), #fbbf24); } .bar.green > i { background: linear-gradient(90deg, #16a34a, #4ade80); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow); max-width: min(92vw, 520px); font-weight: 600; }
.toast.err { background: #9a3412; }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 90; padding: 12px; }
@media (min-width: 640px) { .modal-bg { align-items: center; } }
.modal { background: #fff; border-radius: 20px; width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--blue-100); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.tbl td { padding: 10px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f7f9ff; }
.scroll-x { overflow-x: auto; }

/* data interpretation visuals */
.visual { background: #fafbff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; overflow-x: auto; }
.visual table { border-collapse: collapse; width: 100%; font-size: 13px; }
.visual th, .visual td { border: 1px solid #dfe5ef; padding: 6px 8px; text-align: right; } .visual th:first-child, .visual td:first-child { text-align: left; }
.visual th { background: #eef3ff; }
.visual .vt { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-top: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.update-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 120; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--saffron); color: #1f1300; font: 700 14px var(--font); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); cursor: pointer; max-width: calc(100vw - 24px); }
