:root {
  --ink: #12263a;
  --ink-soft: #46586b;
  --paper: #faf8f3;
  --card: #ffffff;
  --line: #e6e0d3;
  --brand: #0f6b57;
  --brand-strong: #0a4f40;
  --on-brand: #ffffff;
  --accent: #c8862a;
  --tint: #eef5f2;
  --danger: #a3262a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 38, 58, .06), 0 8px 24px rgba(18, 38, 58, .06);
}
@media (prefers-color-scheme: dark) and (max-width: 0px) {
  :root {
    --ink: #eaf0f5;
    --ink-soft: #a9b8c6;
    --paper: #0e1a26;
    --card: #14232f;
    --line: #25384a;
    --brand: #3fc2a3;
    --brand-strong: #6fd8bd;
    --on-brand: #06231c;
    --accent: #e3a752;
    --tint: #123029;
    --danger: #ff8d8d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-strong); }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
section { padding: 4rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .75rem; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; }
.muted { color: var(--ink-soft); }

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-family: Georgia, serif; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 1rem; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: .45rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--tint); }
.nav .btn { margin-left: .5rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .7rem; color: var(--ink); font: inherit; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--paper); padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav .btn { margin: .5rem 0 0; text-align: center; }
}

.btn { display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none; padding: .75rem 1.3rem; border-radius: 999px; background: var(--brand); color: var(--on-brand); transition: transform .15s ease, background .15s ease; }
.btn:hover { background: var(--brand-strong); color: var(--on-brand); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--tint); color: var(--ink); }
.btn.small { padding: .5rem 1rem; font-size: .92rem; }

.hero { padding: 5rem 0 4rem; background: radial-gradient(1200px 400px at 85% -10%, var(--tint), transparent 60%); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.page-head { padding: 3.5rem 0 1rem; }

.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand), var(--ink)); display: grid; place-items: center; color: var(--on-brand); font-family: Georgia, serif; font-size: 2.2rem; overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card .body h3 { margin: 0; }
.card .body p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card .foot { margin-top: auto; padding-top: .75rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.badge { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; background: var(--tint); color: var(--brand-strong); }
.price { font-weight: 800; font-size: 1.1rem; }
.meta { font-size: .88rem; color: var(--ink-soft); }
a.card-link { text-decoration: none; color: inherit; }
a.card-link:hover .card { border-color: var(--brand); }

.features { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: .9rem; }
.band { background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: 3rem 2rem; text-align: center; }
.band h2 { color: inherit; }
.band .btn { background: var(--on-brand); color: var(--brand-strong); }
.alt { background: var(--tint); }

table.ledger { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .98rem; }
table.ledger th, table.ledger td { padding: .65rem .9rem; border-bottom: 1px solid var(--line); text-align: left; }
table.ledger th { background: var(--tint); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
table.ledger td.num, table.ledger th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.two-col { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } section { padding: 3rem 0; } }

details.problem { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
details.problem summary { cursor: pointer; font-weight: 700; list-style: none; }
details.problem summary::-webkit-details-marker { display: none; }
details.problem .q { margin: .35rem 0 0; font-weight: 400; color: var(--ink-soft); }
details.problem[open] summary { margin-bottom: .6rem; }
details.problem .answer { border-top: 1px dashed var(--line); padding-top: .75rem; margin-top: .75rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--tint); color: var(--brand-strong); margin-right: .4rem; }

form.stack { display: grid; gap: 1rem; }
label { font-weight: 600; font-size: .95rem; display: grid; gap: .35rem; }
input, select, textarea { font: inherit; padding: .7rem .85rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
textarea { min-height: 130px; resize: vertical; }
.row2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.notice { padding: .9rem 1.1rem; border-radius: 10px; background: var(--tint); border: 1px solid var(--line); }
.notice.error { color: var(--danger); border-color: var(--danger); background: transparent; }
.notice.ok { border-color: var(--brand); }

.slot-day { margin: 1.1rem 0 .4rem; font-weight: 700; }
.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { font: inherit; padding: .45rem .9rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.slot:disabled { opacity: .5; cursor: not-allowed; text-decoration: line-through; }

.detail-hero { display: grid; gap: 2.5rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 900px) { .detail-hero { grid-template-columns: 1fr; } }
.detail-hero .cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--brand), var(--ink)); }
.detail-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.article p { font-size: 1.08rem; }
.article .byline { color: var(--ink-soft); margin-bottom: 1.5rem; }
.skeleton { height: 220px; border-radius: var(--radius); background: linear-gradient(90deg, var(--tint), var(--card), var(--tint)); background-size: 200% 100%; animation: sh 1.4s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--ink-soft); font-size: .93rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: inherit; margin-right: 1rem; }

/* ---- toolkit, login modal, news, portals ---- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(8, 20, 32, .6); display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--card); color: var(--ink); border-radius: 18px; max-width: 440px; width: 100%; padding: 2rem 1.75rem; box-shadow: var(--shadow); position: relative; }
.modal h2 { font-size: 1.6rem; }
.modal .x { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; font-size: 1.6rem; color: var(--ink-soft); cursor: pointer; }
.modal .btn, .login-box .btn { display: block; width: 100%; text-align: center; margin-top: .6rem; }
.btn.google { background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; }
.btn.google:hover { background: #f6f8fa; color: #1f1f1f; }
.login-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.tile:hover { border-color: var(--brand); }
.tile .ico { font-size: 1.5rem; }
.tile strong { display: block; margin: .35rem 0 .15rem; }
.tile span.d { color: var(--ink-soft); font-size: .92rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tabs a { text-decoration: none; padding: .5rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; font-size: .95rem; }
.tabs a:hover { background: var(--tint); }
.search { max-width: 520px; margin-bottom: 1rem; }
.news-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.news-item h3 { margin: .3rem 0 .4rem; }
.news-item .src { font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .5rem; }
.pill-gst { background: #e7f0ff; color: #1b4fa8; }
.pill-it { background: #fdf0dc; color: #8a5200; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { .pill-gst { background: #163057; color: #b9d2ff; } .pill-it { background: #4a3413; color: #ffd9a0; } .btn.google { background: #f1f3f4; } }
.portal-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.portal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; display: block; }
.portal:hover { border-color: var(--brand); }
.portal strong { display: block; }
.portal small { color: var(--ink-soft); display: block; margin-top: .2rem; }
.steps { counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: .2rem 0 1rem 3rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; }
.note { font-size: .9rem; color: var(--ink-soft); }
.chip { display: inline-block; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--line); margin-left: .4rem; color: var(--ink-soft); }
.nav { flex-wrap: wrap; }
.nav a { padding: .4rem .65rem; font-size: .9rem; }

/* ---- floating chat button ---- */
.chat-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 999px; background: #1f9d55; color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.chat-fab:hover { background: #17803f; color: #fff; }
.chat-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.was { text-decoration: line-through; color: var(--ink-soft); font-weight: 400; font-size: .85em; margin-left: .45rem; }

/* Footer: Follow us cards */
.site-footer .follow { min-width: 260px; }
.follow-cards { display: grid; gap: .6rem; margin-top: .75rem; }
.site-footer a.fcard { margin-right: 0; }
.fcard { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem .65rem .65rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(127,127,127,.08); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.fcard:hover, .fcard:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.15); }
.fcard .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.fcard.yt .fi { background: #ff0033; }
.fcard.ig .fi { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.fcard.wa .fi { background: #25d366; }
.fcard.yt:hover { border-color: #ff0033; }
.fcard.ig:hover { border-color: #dd2a7b; }
.fcard.wa:hover { border-color: #25d366; }
.fcard .ft { flex: 1; }
.fcard b { display: block; color: var(--ink); }
.fcard small { display: block; opacity: .8; }
.fcard .fgo { opacity: .5; font-size: 1.1rem; }
.fcard:hover .fgo { opacity: 1; }
.chat-fab.dragging, #story-fab.dragging { cursor: grabbing !important; opacity: .9; box-shadow: 0 16px 40px rgba(0,0,0,.35) !important; }
/* Side tabs: Hisaab Guru + Chat, small and docked to the right edge */
#story-fab#story-fab,body>.chat-fab.chat-fab.chat-fab{position:fixed!important;right:0!important;left:auto!important;bottom:auto!important;transform:none!important;min-width:0!important;width:56px!important;height:auto!important;padding:.45rem .3rem .4rem!important;border-radius:14px 0 0 14px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:.2rem!important;text-align:center!important;box-shadow:-2px 4px 14px rgba(0,0,0,.25)!important;z-index:71!important;transition:width .2s,padding .2s!important}
#story-fab#story-fab[hidden],body.guru-open>.chat-fab.chat-fab.chat-fab{display:none!important}
#story-fab#story-fab{top:calc(50% - 74px)!important}
body>.chat-fab.chat-fab.chat-fab{top:calc(50% + 6px)!important}
#story-fab#story-fab>span:last-child,body>.chat-fab.chat-fab.chat-fab>span:last-child{display:none!important}
#story-fab#story-fab .av{width:32px!important;height:32px!important;font-size:.95rem!important}
#story-fab#story-fab .av i{width:9px!important;height:9px!important}
#story-fab#story-fab::after{content:"Guru";font-size:.68rem;font-weight:800;line-height:1}
body>.chat-fab.chat-fab.chat-fab>span:first-child{font-size:1.25rem;line-height:1}
body>.chat-fab.chat-fab.chat-fab::after{content:"Chat";font-size:.68rem;font-weight:800;line-height:1}
@media (hover:hover){#story-fab#story-fab:hover,body>.chat-fab.chat-fab.chat-fab:hover{width:64px!important}}