/* ASTROMATE - midnight blue, rich gold, warm ivory. Mobile first; sidebar layout from 900px. */
:root {
  --bg: #08102a; --bg2: #0c1738; --surface: #111e44; --surface2: #17275a; --surface3: #1d3170;
  --line: rgba(214, 168, 74, 0.22); --line2: rgba(255, 255, 255, 0.09);
  --gold: #d6a84a; --gold2: #f1d28a; --gold3: #9c7425; --ivory: #f6efdc; --text: #eef0f8; --muted: #a9b3d1; --faint: #7d88ad;
  --yes: #3ecf8e; --no: #ff6b6b; --maybe: #f2b84b; --blue: #6aa5ff;
  --yes-bg: rgba(62, 207, 142, 0.14); --no-bg: rgba(255, 107, 107, 0.14); --maybe-bg: rgba(242, 184, 75, 0.14);
  --radius: 16px; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --nav-h: 64px; --top-h: 56px;
  /* surfaces and accents that differ between the colour modes */
  --glow1: rgba(214, 168, 74, 0.10); --glow2: rgba(106, 165, 255, 0.10);
  --topbar-bg: rgba(8, 16, 42, 0.92); --bottomnav-bg: rgba(10, 18, 46, 0.97); --sidebar-bg: linear-gradient(180deg, #0b1534, #070e26);
  --card-bg: linear-gradient(180deg, rgba(23, 39, 90, 0.78), rgba(17, 30, 68, 0.78));
  --tint: rgba(255, 255, 255, 0.03); --tint2: rgba(255, 255, 255, 0.05); --tint3: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(5, 10, 28, 0.7); --pop-bg: #0e1b40; --modal-bg: #0e1a3f; --option-bg: #0c1738; --th-bg: #14235a;
  --toast-bg: #1b2c66; --toast-fg: #f6efdc; --backdrop: rgba(2, 6, 20, 0.72); --code-bg: rgba(0, 0, 0, 0.3);
  --gold-grad: linear-gradient(180deg, #f1d28a, #d6a84a); --meter-grad: linear-gradient(90deg, #9c7425, #f1d28a);
  --on-gold: #231703; --btn-primary-border: #f4dc9d; --danger-text: #ffb0b0; --err-text: #ff9a9a; --hover-gold: rgba(214, 168, 74, 0.14);
  /* chart colours (inline SVG) */
  --ch-bg: #0a1534; --ch-frame: rgba(214, 168, 74, 0.55); --ch-line: rgba(214, 168, 74, 0.6); --ch-none: rgba(255, 255, 255, 0.02);
  --ch-num-bg: #0a1534; --ch-num-ink: #f1d28a; --ch-num-line: rgba(241, 210, 138, 0.6); --ch-lagna-bg: #f1d28a; --ch-lagna-ink: var(--on-gold);
  --ch-hl: #f1d28a; --ch-moon: #6aa5ff; --ch-faint: #7d88ad; --ch-title: #d6a84a; --ch-sub: #a9b3d1; --ch-deg: #c8d0ea; --ch-mark: #e8eefc;
  --pl-sun: #f5c451; --pl-moon: #e8eefc; --pl-mars: #ff7a7a; --pl-mercury: #6fe0a2; --pl-jupiter: #ffd86b; --pl-venus: #ff9bd0; --pl-saturn: #7fb2ff; --pl-rahu: #c3c8d8; --pl-ketu: #c3c8d8; --pl-transit: #ffd24a;
  font-family: Inter, "Segoe UI", "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Gujarati", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
/* light colour mode: warm ivory paper, deep navy ink, darker gold for text */
:root[data-theme="light"] {
  --bg: #faf6ea; --bg2: #f3ecd9; --surface: #ffffff; --surface2: #fbf7ec; --surface3: #f1e9d3;
  --line: rgba(122, 84, 16, 0.30); --line2: rgba(18, 33, 79, 0.14);
  --gold: #98700f; --gold2: #6c4a08; --gold3: #8a6416; --ivory: #12214f; --text: #1b2340; --muted: #454f72; --faint: #596386;
  --yes: #0b7249; --no: #bd2d2c; --maybe: #8f5a00; --blue: #2454ad;
  --yes-bg: rgba(11, 114, 73, 0.10); --no-bg: rgba(189, 45, 44, 0.09); --maybe-bg: rgba(143, 90, 0, 0.10);
  --shadow: 0 8px 24px rgba(60, 45, 10, 0.14);
  --glow1: rgba(214, 168, 74, 0.20); --glow2: rgba(106, 165, 255, 0.12);
  --topbar-bg: rgba(250, 246, 234, 0.95); --bottomnav-bg: rgba(255, 252, 243, 0.98); --sidebar-bg: linear-gradient(180deg, #fffdf6, #f1e9d3);
  --card-bg: linear-gradient(180deg, #ffffff, #fcf8ec);
  --tint: rgba(18, 33, 79, 0.035); --tint2: rgba(18, 33, 79, 0.06); --tint3: rgba(18, 33, 79, 0.10);
  --input-bg: #ffffff; --pop-bg: #ffffff; --modal-bg: #ffffff; --option-bg: #ffffff; --th-bg: #f1e9d3;
  --toast-bg: #12214f; --toast-fg: #f6efdc; --backdrop: rgba(18, 24, 48, 0.45); --code-bg: rgba(18, 33, 79, 0.06);
  --gold-grad: linear-gradient(180deg, #f1d28a, #d6a84a); --meter-grad: linear-gradient(90deg, #b8892a, #d6a84a);
  --on-gold: #231703; --btn-primary-border: #b98a2f; --danger-text: #a82222; --err-text: #b32525; --hover-gold: rgba(152, 112, 15, 0.12);
  --ch-bg: #fffdf5; --ch-frame: rgba(122, 84, 16, 0.55); --ch-line: rgba(122, 84, 16, 0.55); --ch-none: rgba(18, 33, 79, 0.02);
  --ch-num-bg: #fffdf5; --ch-num-ink: #6c4a08; --ch-num-line: rgba(122, 84, 16, 0.55); --ch-lagna-bg: #d6a84a; --ch-lagna-ink: var(--on-gold);
  --ch-hl: #8a5f0e; --ch-moon: #2454ad; --ch-faint: #596386; --ch-title: #6c4a08; --ch-sub: #454f72; --ch-deg: #454f72; --ch-mark: #1b2340;
  --pl-sun: #9a5b00; --pl-moon: #3b4a85; --pl-mars: #bd2d2c; --pl-mercury: #0b7249; --pl-jupiter: #8a6200; --pl-venus: #a82a73; --pl-saturn: #2454ad; --pl-rahu: #4d5576; --pl-ketu: #4d5576; --pl-transit: #8f4a00;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; font-size: 16px; line-height: 1.5;
  background: radial-gradient(1200px 600px at 80% -10%, var(--glow1), transparent 60%), radial-gradient(900px 500px at -10% 10%, var(--glow2), transparent 60%), var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: .01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; color: var(--gold2); }
p { margin: 0 0 .8em; }
a { color: var(--gold2); }
small, .small { font-size: .82rem; } .muted { color: var(--muted); } .faint { color: var(--faint); } .gold { color: var(--gold2); } .center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ------------------------------------------------------------ shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 16px; padding-top: env(safe-area-inset-top); background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); }
.topbar .title { flex: 1; font-weight: 600; font-size: .98rem; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 32px; height: 32px; flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark b { font-size: 1.05rem; letter-spacing: .22em; color: var(--ivory); font-weight: 700; }
.wordmark span { font-size: .55rem; letter-spacing: .34em; color: var(--gold); margin-top: 3px; font-weight: 600; }
.main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
.bottomnav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bottomnav-bg); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); text-decoration: none; font-size: .68rem; font-weight: 600; letter-spacing: .02em; min-height: 48px; }
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.on { color: var(--gold2); }
.sidebar { display: none; }
@media (min-width: 900px) {
  .app { flex-direction: row; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; width: 250px; flex: none; position: sticky; top: 0; height: 100vh; padding: 20px 14px; background: var(--sidebar-bg); border-right: 1px solid var(--line); }
  .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; text-decoration: none; }
  .sidebar .logo { width: 40px; height: 40px; }
  .sidebar a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
  .sidebar a.nav svg { width: 20px; height: 20px; }
  .sidebar a.nav:hover { background: var(--tint2); color: var(--ivory); }
  .sidebar a.nav.on { background: linear-gradient(90deg, rgba(214, 168, 74, 0.22), rgba(214, 168, 74, 0.04)); color: var(--gold2); }
  .sidebar .sep { height: 1px; background: var(--line2); margin: 10px 6px; }
  .sidebar .foot { margin-top: auto; padding: 10px; font-size: .75rem; color: var(--faint); }
  .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .bottomnav { display: none; }
  .topbar .brand { display: none; }
  .main { padding: 24px 28px 48px; }
}

@media (max-width: 480px) {
  .bottomnav a { font-size: .6rem; padding: 0 1px; text-align: center; line-height: 1.12; letter-spacing: 0; }
  .bottomnav a svg { width: 21px; height: 21px; }
  .wordmark b { letter-spacing: .15em; font-size: .95rem; } .wordmark span { letter-spacing: .27em; font-size: .5rem; }
  .topbar .title { display: none; } .topbar .tag { margin-left: auto; }
  .hero h1 { font-size: 1.75rem; letter-spacing: .2em; padding-left: .2em; } .hero .sub { font-size: .75rem; letter-spacing: .4em; }
  .verdict .word { font-size: 3rem; } .main { padding-left: 12px; padding-right: 12px; }
}

/* ------------------------------------------------------------ surfaces */
.card { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; background: var(--tint); border-color: var(--line2); }
.card h3 { display: flex; align-items: center; gap: 8px; color: var(--ivory); }
.card h3 .tag { margin-left: auto; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.tight { gap: 6px; }
.stack > * + * { margin-top: 12px; }
.hr { height: 1px; background: var(--line2); margin: 14px 0; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; border: 1px solid var(--line); color: var(--gold2); background: rgba(214, 168, 74, 0.08); white-space: nowrap; }
.tag.yes { color: var(--yes); border-color: rgba(62, 207, 142, .5); background: var(--yes-bg); } .tag.no { color: var(--no); border-color: rgba(255, 107, 107, .5); background: var(--no-bg); } .tag.maybe { color: var(--maybe); border-color: rgba(242, 184, 75, .5); background: var(--maybe-bg); }
.tag.blue { color: var(--blue); border-color: rgba(106, 165, 255, .45); background: rgba(106, 165, 255, .1); } .tag.dim { color: var(--muted); border-color: var(--line2); background: var(--tint); }

/* ------------------------------------------------------------ buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--tint2); color: var(--ivory); font-weight: 700; letter-spacing: .03em; cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.12); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold-grad); color: var(--on-gold); border-color: var(--btn-primary-border); box-shadow: 0 6px 20px rgba(214, 168, 74, .28); }
.btn.danger { border-color: rgba(255, 107, 107, .55); color: var(--danger-text); background: rgba(255, 107, 107, .08); }
.btn.ghost { background: transparent; } .btn.small { min-height: 36px; padding: 0 12px; font-size: .84rem; border-radius: 10px; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label, .lbl { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold2); }
.field .hint { font-size: .78rem; color: var(--faint); } .field .err { font-size: .8rem; color: var(--err-text); }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--input-bg); color: var(--text); outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 168, 74, .2); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--gold); }
select option { background: var(--option-bg); color: var(--text); }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.fgrid { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; } .fgrid .full { grid-column: 1 / -1; } @media (min-width: 700px) { .fgrid.c3 { grid-template-columns: repeat(3, 1fr); } .fgrid.c4 { grid-template-columns: repeat(4, 1fr); } }
.combo { position: relative; }
.combo .list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 260px; overflow: auto; background: var(--pop-bg); border: 1px solid var(--gold3); border-radius: 12px; box-shadow: var(--shadow); }
.combo .list button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line2); color: var(--text); cursor: pointer; }
.combo .list button:hover, .combo .list button:focus { background: var(--hover-gold); outline: none; }
.combo .list small { color: var(--faint); display: block; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { padding: 8px 14px; background: transparent; border: 0; color: var(--muted); font-weight: 700; cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--gold-grad); color: var(--on-gold); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--tint); color: var(--muted); font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip.on { border-color: var(--gold); color: var(--on-gold); background: var(--gold-grad); }
.chip b { margin-left: 6px; opacity: .8; }

/* ------------------------------------------------------------ data display */
.tablewrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line2); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; }
th { position: sticky; top: 0; background: var(--th-bg); color: var(--gold2); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
tr:last-child td { border-bottom: 0; } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; } td.nowrap { white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; } .kv dt { color: var(--faint); } .kv dd { margin: 0; color: var(--text); }
.meter { height: 8px; border-radius: 99px; background: var(--tint3); overflow: hidden; } .meter > i { display: block; height: 100%; border-radius: 99px; background: var(--meter-grad); }
.meter.pos > i { background: linear-gradient(90deg, #1f9f6b, var(--yes)); } .meter.neg > i { background: linear-gradient(90deg, #b64444, var(--no)); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: .74rem; font-weight: 700; background: var(--tint3); }
.pos-t { color: var(--yes); } .neg-t { color: var(--no); } .neu-t { color: var(--muted); }
.list-plain { list-style: none; padding: 0; margin: 0; } .list-plain li { padding: 9px 0; border-bottom: 1px solid var(--line2); } .list-plain li:last-child { border-bottom: 0; }
.bul { list-style: none; padding: 0; margin: 0; } .bul li { position: relative; padding: 6px 0 6px 22px; font-size: .92rem; } .bul li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.bul.pos li::before { background: var(--yes); } .bul.neg li::before { background: var(--no); }
.delta { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2em; display: inline-block; }

/* ------------------------------------------------------------ welcome, auth, verdict */
.hero { text-align: center; padding: 28px 8px 8px; }
.hero .logo { width: 104px; height: 104px; margin: 0 auto 8px; display: block; }
.hero h1 { font-size: 2.2rem; letter-spacing: .26em; margin: 12px 0 2px; color: var(--ivory); padding-left: .26em; }
.hero .sub { font-size: .9rem; letter-spacing: .5em; color: var(--gold); font-weight: 700; padding-left: .5em; }
.hero .lead { color: var(--muted); max-width: 520px; margin: 14px auto 22px; }
.hero .tagline { color: var(--gold2); font-style: italic; margin: 6px auto 0; max-width: 520px; font-size: .95rem; }
.steps { display: grid; gap: 10px; margin: 18px 0; } @media (min-width: 700px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--tint); font-size: .88rem; color: var(--muted); } .step b { display: block; color: var(--gold2); margin-bottom: 2px; }
.authbox { max-width: 460px; margin: 0 auto; }
.verdict { text-align: center; padding: 22px 12px; border-radius: 20px; border: 2px solid var(--line); margin-bottom: 14px; }
.verdict .word { font-size: 3.6rem; font-weight: 800; letter-spacing: .12em; line-height: 1; padding-left: .12em; }
.verdict .q { margin-top: 10px; font-size: .95rem; color: var(--muted); }
.verdict.YES { border-color: rgba(62, 207, 142, .6); background: radial-gradient(400px 160px at 50% 0, rgba(62, 207, 142, .22), transparent), var(--yes-bg); } .verdict.YES .word { color: var(--yes); }
.verdict.NO { border-color: rgba(255, 107, 107, .6); background: radial-gradient(400px 160px at 50% 0, rgba(255, 107, 107, .22), transparent), var(--no-bg); } .verdict.NO .word { color: var(--no); }
.verdict.MAYBE { border-color: rgba(242, 184, 75, .6); background: radial-gradient(400px 160px at 50% 0, rgba(242, 184, 75, .22), transparent), var(--maybe-bg); } .verdict.MAYBE .word { color: var(--maybe); }
.sub-verdicts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.stagelist { list-style: none; margin: 0; padding: 0; }
.stagelist li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); opacity: .45; transition: opacity .2s; }
.stagelist li.running, .stagelist li.done { opacity: 1; } .stagelist li:last-child { border-bottom: 0; }
.stagelist .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: var(--muted); }
.stagelist li.running .dot { border-color: var(--gold2); color: var(--gold2); animation: pulse 1s infinite; } .stagelist li.done .dot { background: var(--gold); border-color: var(--gold2); color: var(--on-gold); }
.stagelist .nm { font-weight: 700; color: var(--ivory); } .stagelist .sm { font-size: .84rem; color: var(--muted); margin-top: 2px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(214, 168, 74, .2); } }
.qcard { display: block; width: 100%; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--tint); color: var(--text); cursor: pointer; margin-bottom: 10px; }
.qcard:hover { border-color: var(--gold); background: rgba(214, 168, 74, .07); } .qcard .n { display: inline-block; min-width: 2.2em; color: var(--gold); font-weight: 800; }
.qcard .meta { font-size: .76rem; color: var(--faint); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: thin; }
.tabs button { flex: none; padding: 9px 14px; border-radius: 10px 10px 0 0; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--on-gold); background: var(--gold-grad); }
.chartbox { max-width: 460px; margin: 0 auto; } .chartbox svg { width: 100%; height: auto; display: block; }
.banner { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(214, 168, 74, .08); font-size: .88rem; margin-bottom: 14px; }
.banner.warn { border-color: rgba(242, 184, 75, .5); background: var(--maybe-bg); } .banner.bad { border-color: rgba(255, 107, 107, .5); background: var(--no-bg); } .banner.ok { border-color: rgba(62, 207, 142, .5); background: var(--yes-bg); }
.modal-back { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: var(--modal-bg); border: 1px solid var(--gold3); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 92vw; padding: 11px 18px; border-radius: 12px; background: var(--toast-bg); border: 1px solid var(--gold); color: var(--toast-fg); box-shadow: var(--shadow); font-size: .9rem; }
@media (min-width: 900px) { .toast { bottom: 28px; } }
details.fold { border: 1px solid var(--line2); border-radius: 12px; margin-bottom: 10px; background: var(--tint); } details.fold > summary { cursor: pointer; padding: 11px 14px; font-weight: 700; color: var(--ivory); list-style: none; display: flex; align-items: center; gap: 8px; } details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 1.2rem; } details.fold[open] > summary::after { content: "-"; } details.fold > .body { padding: 0 14px 14px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-word; background: var(--code-bg); border-radius: 10px; padding: 10px; border: 1px solid var(--line2); }
.footer-note { margin: 24px 0 0; font-size: .76rem; color: var(--faint); text-align: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold2); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; } @keyframes spin { to { transform: rotate(360deg); } }
.chart-planet { font: 700 13px system-ui, sans-serif; } .chart-small { font: 600 10px system-ui, sans-serif; }
@media print {
  body { background: #fff; color: #111; } .topbar, .bottomnav, .sidebar, .btn, .tabs, .noprint { display: none !important; }
  .card { background: #fff; color: #111; border: 1px solid #bbb; box-shadow: none; } .main { padding: 0; max-width: none; } h3, h4, th, .gold, .lbl { color: #5a4000 !important; } td, th { border-color: #ccc; } .muted, .faint { color: #444; }
}

/* ------------------------------------------------------------ language and colour-mode controls */
.prefs { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.prefs .seg button { padding: 3px 9px; min-height: 32px; font-size: .78rem; }
.prefs .modebtn { width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--tint2); color: var(--gold2); cursor: pointer; display: inline-grid; place-items: center; }
.prefs .modebtn:hover { background: var(--hover-gold); }
.prefs .modebtn svg { width: 19px; height: 19px; }
.prefs.float { position: absolute; top: 10px; right: 12px; z-index: 5; }
.prefs.side, .sidebar .foot .prefs { display: flex; margin: 0 0 12px; }
.prefs .seg button[lang="hi"], .prefs .seg button[lang="gu"] { font-size: .88rem; }
.bare { position: relative; }
.topbar .prefs { margin-left: auto; }
@media (max-width: 480px) { .topbar { gap: 8px; padding: 0 10px; } .topbar .prefs { gap: 6px; } .topbar .prefs .seg button { padding: 3px 7px; } }

/* ------------------------------------------------------------ about the creator (home and welcome pages) */
.creator-card { margin-top: 22px; border-color: var(--gold3); }
.creator { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.creator .photo { width: 132px; height: 164px; border-radius: 18px; object-fit: cover; object-position: 50% 18%; border: 2px solid var(--gold3); box-shadow: var(--shadow); background: var(--surface2); display: block; }
.creator .mono-av { width: 132px; height: 164px; border-radius: 18px; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: var(--on-gold); background: var(--gold-grad); border: 2px solid var(--gold3); }
.creator .eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.creator h3 { margin: 0 0 2px; font-size: 1.3rem; }
.creator .role { color: var(--gold2); font-size: .82rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.creator .brief { font-size: .92rem; color: var(--muted); margin: 0 0 8px; }
.creator details { margin-top: 2px; }
.creator details > summary { cursor: pointer; color: var(--gold2); font-weight: 700; font-size: .86rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.creator details > summary::-webkit-details-marker { display: none; }
.creator details > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s; }
.creator details[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.creator details[open] > summary { margin-bottom: 6px; } .creator details p { font-size: .92rem; color: var(--muted); margin: 0 0 8px; }
@media (max-width: 560px) { .creator { grid-template-columns: 1fr; justify-items: center; text-align: center; } .creator h3 { justify-content: center; } .creator details > summary { justify-content: center; } .creator details p { text-align: left; } }
@media print { .creator-card { break-inside: avoid; } }

/* ------------------------------------------------------------ Hindi and Gujarati: no letter spacing (it breaks the joined letters), roomier lines */
html[lang="hi"] body, html[lang="gu"] body { line-height: 1.68; }
html[lang="hi"] *, html[lang="gu"] * { letter-spacing: normal !important; }
html[lang="hi"] .wordmark b, html[lang="gu"] .wordmark b, html[lang="hi"] .wordmark span, html[lang="gu"] .wordmark span,
html[lang="hi"] .hero h1, html[lang="gu"] .hero h1, html[lang="hi"] .hero .sub, html[lang="gu"] .hero .sub { letter-spacing: revert !important; }
html[lang="hi"] .wordmark b, html[lang="gu"] .wordmark b { letter-spacing: .22em !important; } html[lang="hi"] .wordmark span, html[lang="gu"] .wordmark span { letter-spacing: .34em !important; }
html[lang="hi"] .hero h1, html[lang="gu"] .hero h1 { letter-spacing: .26em !important; } html[lang="hi"] .hero .sub, html[lang="gu"] .hero .sub { letter-spacing: .5em !important; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4, html[lang="gu"] h1, html[lang="gu"] h2, html[lang="gu"] h3, html[lang="gu"] h4 { line-height: 1.4; }
html[lang="hi"] .btn, html[lang="gu"] .btn { line-height: 1.35; }
html[lang="hi"] .bottomnav a, html[lang="gu"] .bottomnav a { font-size: .7rem; line-height: 1.25; }
html[lang="hi"] .field > label, html[lang="gu"] .field > label, html[lang="hi"] .lbl, html[lang="gu"] .lbl, html[lang="hi"] th, html[lang="gu"] th { font-size: .82rem; }
html[lang="hi"] .verdict .word, html[lang="gu"] .verdict .word { font-size: 3rem; letter-spacing: normal !important; }
::selection { background: rgba(214, 168, 74, .35); }