/* =====================================================================
   BIJLI CALC — bijlicalculator.in — Design System v5
   Style: "Electric Bill" purple gradient + Poppins + FontAwesome.
   Mobile-first, 8px grid. Dark mode: auto + manual (html.dark).
   Theme classes: light / dark / gradient / minimal (theme.js).
   v4: premium calculator look — animated gradient ring, glow focus,
   toggle switch, button shine, flowing bars, floating card.
   v5: calculator refinements — sliding active pill on the input-mode
   segmented toggle (scoped via :has([data-mode]) so state-page
   Copy/WhatsApp/Print chips are untouched), result-cell accent strips,
   bouncier amount, notice-tip icon, slab-input focus glow, line hover.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

/* ---------- Tokens ---------- */
:root {
  --primary: #5b2be0;
  --primary-hover: #4218bd;
  --energy: #7a38ff;
  --energy-soft: #eef0ff;
  --energy-line: #ddd4ff;
  --teal: #0f766e;
  --blue: #2563eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --error: #dc2626;

  --bg: #f5f7fb;
  --bg-soft: #eef2ff;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --heading: #22203a;
  --body: #44425e;
  --muted: #6b6a85;

  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow-sm: 0 1px 3px rgba(30, 27, 75, 0.05);
  --shadow-md: 0 10px 35px rgba(91, 43, 224, 0.1);
  --shadow-lg: 0 20px 60px rgba(91, 43, 224, 0.18);

  --font: 'Poppins', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Dark mode (auto) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.gradient) {
    --bg: #0d0b1f; --bg-soft: #161236; --surface: #161236;
    --border: #2a2652; --border-strong: #3a3570;
    --heading: #f4f2ff; --body: #c9c4e0; --muted: #8f8ab0;
    --primary: #8b5cf6; --primary-hover: #a78bfa;
    --energy-soft: #241a4d; --energy-line: #4c3a8f;
    --shadow-md: 0 10px 35px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Dark mode (manual) ---------- */
html.dark {
  --bg: #0d0b1f; --bg-soft: #161236; --surface: #161236;
  --border: #2a2652; --border-strong: #3a3570;
  --heading: #f4f2ff; --body: #c9c4e0; --muted: #8f8ab0;
  --primary: #8b5cf6; --primary-hover: #a78bfa;
  --energy-soft: #241a4d; --energy-line: #4c3a8f;
  --shadow-md: 0 10px 35px rgba(0, 0, 0, 0.4);
}

/* ---------- Gradient theme (vivid "Electric Bill", frosted glass) ---------- */
html.gradient {
  --bg: #efeafc;
  --bg-soft: rgba(255, 255, 255, 0.55);
  --surface: rgba(255, 255, 255, 0.82);
  --border: rgba(255, 255, 255, 0.75);
  --border-strong: rgba(74, 31, 208, 0.3);
  --heading: #231c4d;
  --body: #37315c;
  --muted: #5f5890;
  --primary: #4a1fd0; --primary-hover: #3618a8;
  --energy-soft: rgba(255, 255, 255, 0.66);
  --energy-line: rgba(74, 31, 208, 0.22);
  --shadow-md: 0 12px 38px rgba(74, 31, 208, 0.18);
}
html.gradient body {
  background: linear-gradient(160deg, #c9b8ff 0%, #f2b8e4 26%, #a9cfff 55%, #ffd6a8 82%, #c9e3ff 100%) fixed;
}
html.gradient .header { background: rgba(255, 255, 255, 0.72); }
html.gradient .bottom-nav { background: rgba(255, 255, 255, 0.8); }
html.gradient .notice-tip { background: rgba(255, 255, 255, 0.78); border-color: rgba(74, 31, 208, 0.25); color: #3a1fb8; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font: 400 15px/1.65 var(--font);
  color: var(--body); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; color: var(--heading); margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(91, 43, 224, 0.16); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[id] { scroll-margin-top: 90px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .wrap { padding: 0 14px; } }

.bolt-strip { height: 3px; background: linear-gradient(90deg, #5b2be0 0 33.3%, #f5f6f7 33.3% 66.6%, #a946ff 66.6% 100%); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(30, 27, 75, 0.06);
}
html.dark .header { background: rgba(13, 11, 31, 0.94); }
.nav { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--heading); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #4d3df5, #7a38ff, #a946ff);
  color: #fff; display: grid; place-items: center; font-size: 19px;
  box-shadow: 0 3px 10px rgba(91, 43, 224, 0.35);
}
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--body);
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--primary); text-decoration: none; }
.nav-links a.active { background: var(--energy-soft); color: var(--primary); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--body); border-radius: 2px; }
.nav-toggle span:nth-child(1) { top: 15px; } .nav-toggle span:nth-child(2) { top: 21px; }
.theme-btns { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.theme-btns button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--body); cursor: pointer; font-size: 16px; }
.theme-btns button:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 900px) {
  .nav { height: auto; padding: 8px 14px; gap: 8px; }
  .nav .brand { flex-shrink: 1; min-width: 0; white-space: nowrap; }
  .nav-toggle { display: block; order: 3; flex-shrink: 0; }
  .nav .theme-btns { order: 2; margin-left: auto; flex: 1 1 auto; min-width: 0; justify-content: flex-end; gap: 4px; }
  .nav .hdr-ctl { flex: 1 1 auto; min-width: 0; }
  .nav .hdr-ctl select { width: 100%; max-width: none; font-size: 11.5px; padding-left: 6px; padding-right: 22px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 10px 16px;
    box-shadow: 0 16px 32px rgba(30, 27, 75, 0.14);
  }
  .nav-links.open { display: flex; }
  .nav-links a { min-height: 44px; }
}
@media (max-width: 480px) {
  .nav { gap: 6px; }
  .nav .brand { font-size: 13px; gap: 6px; }
  .nav .brand-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-toggle span:nth-child(1) { top: 13px; } .nav-toggle span:nth-child(2) { top: 19px; }
  .nav .theme-btns { gap: 4px; }
  .nav .hdr-ctl select { max-width: 76px; font-size: 11px; padding-left: 6px; padding-right: 18px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; }
}
@media (max-width: 400px) {
  .nav .brand span[style] { display: none; }
}

/* ---------- Hero (purple gradient) ---------- */
.hero {
  padding: 60px 0 34px;
  background: linear-gradient(135deg, #4d3df5, #7a38ff 55%, #a946ff);
  color: #fff;
  border-radius: 0 0 32px 32px;
}
.hero .wrap { position: relative; text-align: center; }
.hero .wrap > h1 { margin-left: auto; margin-right: auto; }
.hero p.sub { margin: 14px auto 0; max-width: 660px; }
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; margin-top: 16px; max-width: 720px; color: #fff; }
.hero p.sub { margin-top: 14px; font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, 0.92); max-width: 660px; }
.hero .updated-stamp {
  display: inline-flex; margin-top: 18px; font-size: 12px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  padding: 5px 12px; margin-right: 6px;
}
.updated-stamp { color: #fff; }
.hero-ico {
  width: 58px; height: 58px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff; display: grid; place-items: center; font-size: 30px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}
.hero .btn { background: #fff; color: #5b2be0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.hero .btn:hover { background: #f0edff; color: #4218bd; }
@media (max-width: 640px) { .hero { padding: 36px 0 24px; border-radius: 0 0 22px 22px; } }

/* ---------- Card / calculator ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(30, 27, 75, 0.12);
}
.card h2 { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, #5b2be0, #a946ff); flex-shrink: 0; }
@media (max-width: 640px) { .card { padding: 20px 16px; border-radius: 20px; } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
main > .grid-2 { max-width: 940px; margin-left: auto; margin-right: auto; }
main .launch-card { max-width: 940px; margin-left: auto; margin-right: auto; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--body); margin-bottom: 6px; }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap .pfx { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 15px; pointer-events: none; }
.input-wrap input, .field select {
  width: 100%; height: 52px; padding: 0 14px;
  font: 500 16px var(--font); color: var(--heading);
  background: var(--energy-soft);
  border: 1px solid transparent; border-radius: 12px;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field select {
  padding-left: 14px; padding-right: 44px;
  border-color: var(--border-strong); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 15px center;
  background-size: 14px 14px; background-repeat: no-repeat;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus, .field select:focus {
  outline: none; border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(91, 43, 224, 0.16);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; height: 50px; padding: 0 24px;
  border: 0; border-radius: 14px;
  background: var(--primary); color: #fff;
  font: 600 16px var(--font); cursor: pointer;
  box-shadow: 0 4px 12px rgba(91, 43, 224, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(91, 43, 224, 0.35); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface); color: var(--primary); border: 1px solid var(--border-strong); box-shadow: none; }
.btn-ghost:hover { border-color: var(--primary); background: var(--energy-soft); color: var(--primary); }
a.btn { text-decoration: none; }

/* ---------- Results ---------- */
.results { display: none; }
.results.show { display: block; animation: fade-up 0.25s ease; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.res-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(135deg, #4d3df5, #7a38ff, #a946ff);
  color: #fff; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(91, 43, 224, 0.25);
}
.res-hero .big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.res-hero .lbl { font-size: 12.5px; opacity: 0.92; }

.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 520px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-cell { background: var(--energy-soft); border: 1px solid var(--energy-line); border-radius: 12px; padding: 12px 13px; }
.res-cell .rc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.res-cell .rc-value { margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.res-cell .rc-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }

.lines { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 6px 16px; background: var(--surface); }
.line { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 13.5px; color: var(--body); border-bottom: 1px dashed var(--border); font-variant-numeric: tabular-nums; }
.line:last-child { border-bottom: 0; }
.line.strong { border-top: 2px solid var(--border-strong); font-weight: 800; color: var(--heading); }
.line.strong span:last-child { color: var(--primary); font-size: 16px; }

/* ---------- Slab bars / editor ---------- */
.bars { margin-top: 14px; }
.bar-row { margin: 8px 0; }
.br-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--body); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #5b2be0, #a946ff); transition: width 0.4s; }

/* ---------- Slab editor table ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--bg-soft); color: var(--body); }
.tbl input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 8px; font: 600 14px var(--font); color: var(--heading); background: var(--surface); }
.tbl .act { color: var(--error); cursor: pointer; font-weight: 700; }
.tbl .act.add { color: var(--success); }

/* ---------- Chips / segmented ---------- */
.seg-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg {
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px;
  font: 600 13.5px var(--font); color: var(--body); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.seg:hover { border-color: var(--primary); color: var(--primary); }
.seg.on { background: linear-gradient(135deg, #5b2be0, #7a38ff); border-color: transparent; color: #fff; }

/* ---------- Info / editorial ---------- */
.editorial { max-width: 820px; margin: 0 auto; }
.editorial h2 { font-size: 22px; margin: 40px 0 12px; text-align: center; }
.editorial p { margin: 10px 0; font-size: 15px; line-height: 1.75; color: var(--body); }
.editorial ul, .editorial ol { padding-left: 22px; }
.editorial li { margin-bottom: 8px; line-height: 1.7; }
.editorial strong { color: var(--heading); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }
.info-block { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.info-ico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: var(--energy-soft); border: 1px solid var(--energy-line);
  color: var(--primary); display: grid; place-items: center; font-weight: 800;
}
.info-block h3 { font-size: 15px; margin-bottom: 4px; }
.info-block p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq { margin-top: 8px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 4px 14px rgba(30, 27, 75, 0.06); }
.faq summary { position: relative; padding: 14px 46px 14px 16px; font-size: 14.5px; font-weight: 600; color: var(--heading); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { padding: 0 16px 16px; margin: 10px 0 0; font-size: 14px; line-height: 1.75; color: var(--muted); }

/* ---------- Notice ---------- */
.notice { border: 1px solid var(--border); border-left: 4px solid var(--primary); background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--body); }
.notice-tip { background: #eef0ff; border: 1px solid #ddd4ff; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #4218bd; margin-top: 12px; }
html.dark .notice-tip { background: #241a4d; border-color: #4c3a8f; color: #c4b5fd; }

/* ---------- Grid sections ---------- */
.sec { padding: 34px 0 8px; }
.sec-title { font-size: 22px; text-align: center; }
.sec-sub { color: var(--muted); max-width: 620px; margin: 6px auto 0; font-size: 14.5px; text-align: center; }

.state-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.state-chip {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--body);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.state-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--energy-soft); text-decoration: none; }

/* ---------- Comparison ---------- */
.cmp-table { margin-top: 12px; }
.cmp-row { display: grid; grid-template-columns: 140px 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--bg-soft); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row .dn { font-weight: 700; color: var(--heading); }
.cmp-bar { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.cmp-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5b2be0, #a946ff); border-radius: 999px; }

/* ---------- Footer (dark purple) ---------- */
.footer {
  margin-top: 56px;
  background: linear-gradient(160deg, #2c1b72, #3d26a8);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 40px 20px; max-width: 1180px; margin: 0 auto; }
@media (max-width: 800px) { .f-grid { grid-template-columns: 1fr; gap: 20px; } }
.f-brand { font-size: 18px; font-weight: 800; color: #fff; }
.f-desc { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.8); max-width: 300px; line-height: 1.7; }
.f-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.7); margin-bottom: 10px; }
.f-grid a { display: block; padding: 4px 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.88); }
.f-grid a:hover { color: #fff; text-decoration: none; }
.f-bottom { border-top: 0; padding: 16px 20px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.72); max-width: 1180px; margin: 0 auto; }
.f-bottom a { color: #fff; }
.f-bottom a:hover { text-decoration: underline; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: none;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(30, 27, 75, 0.08);
}
html.dark .bottom-nav { background: rgba(13, 11, 31, 0.96); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.bottom-nav a.on { color: var(--primary); font-weight: 700; }
@media (max-width: 900px) { .bottom-nav { display: flex; } body { padding-bottom: 60px; } }

/* ---------- Homepage launcher ---------- */
.launch-card { overflow: hidden; }
.launch-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: none; margin: 0 auto; }
@media (min-width: 900px) { .launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.step-list { display: grid; gap: 10px; margin: 18px 0; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--energy-soft); border: 1px solid var(--energy-line); border-radius: 12px; padding: 12px 14px; }
.step .n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #5b2be0, #7a38ff); border: 0;
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.step h3 { font-size: 14.5px; }
.step p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.page-link { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.page-link .arr { transition: transform 0.2s; }
.page-link:hover .arr { transform: translateX(4px); }

/* ---------- Tool guide containers (homepage explainers) ---------- */
.tool-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
@media (max-width: 860px) { .tool-guides { grid-template-columns: 1fr; } }
.tool-guide {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 22px 20px;
  box-shadow: 0 10px 34px rgba(30, 27, 75, 0.08);
  display: flex; flex-direction: column; gap: 10px;
}
.tool-guide .tg-head { display: flex; align-items: flex-start; gap: 12px; }
.tool-guide .tg-ico {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
  background: var(--energy-soft);
  border: 1px solid var(--energy-line); color: var(--primary);
  display: grid; place-items: center; font-size: 22px;
}
.tool-guide h3 { font-size: 16.5px; line-height: 1.35; }
.tool-guide .tg-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.tool-guide p { font-size: 13.5px; line-height: 1.7; color: var(--body); }
.tool-guide ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tool-guide li { font-size: 13.5px; line-height: 1.65; color: var(--body); }
.tool-guide .tg-out {
  background: var(--energy-soft); border: 1px solid var(--energy-line);
  border-radius: 12px; padding: 10px 13px; font-size: 13px; line-height: 1.65;
  color: var(--heading);
}
.tool-guide .btn { margin-top: auto; }

/* ---------- Tools grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (max-width: 1060px) { .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px 18px; color: var(--heading);
  box-shadow: 0 6px 22px rgba(30, 27, 75, 0.07);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tool-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-4px); box-shadow: 0 14px 34px rgba(91, 43, 224, 0.14); }
.tool-card .t-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--energy-soft);
  border: 1px solid var(--energy-line); color: var(--primary);
  display: grid; place-items: center; font-size: 21px;
}
.tool-card h3 { font-size: 15.5px; }
.tool-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; flex: 1; }

/* ---------- Board-wise quick links ---------- */
.board-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.board-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--body);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.board-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--energy-soft); text-decoration: none; }

/* ---------- Tool pages ---------- */
.tool-hero { padding: 38px 0 6px; text-align: center; }
.tool-hero .tag {
  color: var(--primary);
  background: var(--energy-soft);
  border-color: var(--energy-line);
}
.tool-hero h1 { font-size: clamp(26px, 3.4vw, 36px); }
.tool-hero p.sub { margin: 10px auto 0; font-size: 15.5px; color: var(--muted); max-width: 640px; }
.tool-ui { margin-top: 22px; max-width: 760px; margin-left: auto; margin-right: auto; }
.tool-ui .row-2 { display: grid; grid-template-columns: 1fr; gap: 0; }
.big-result {
  text-align: center; margin-top: 16px;
  background: linear-gradient(135deg, #4d3df5, #7a38ff, #a946ff);
  color: #fff; border-radius: 16px; padding: 20px 18px; display: none;
  box-shadow: 0 8px 24px rgba(91, 43, 224, 0.25);
}
.big-result.show { display: block; animation: fade-up 0.25s ease; }
.big-result .b-num { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.big-result .b-lbl { font-size: 13px; opacity: 0.92; }
.big-result .b-sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.rate-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.rate-presets button { min-height: 38px; padding: 0 14px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; font: 600 13px var(--font); color: var(--body); cursor: pointer; }
.rate-presets button:hover { border-color: var(--primary); color: var(--primary); }
.rate-presets button.on { background: linear-gradient(135deg, #5b2be0, #7a38ff); color: #fff; border-color: transparent; }
.calc-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.more-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; justify-content: center; }
@media (max-width: 800px) { .more-tools { grid-template-columns: 1fr; } }
.more-tool {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
  font-size: 13.5px; font-weight: 700; color: var(--heading);
  transition: border-color 0.15s, transform 0.15s;
}
.more-tool:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }

/* ---------- Mobile: bigger text ---------- */
@media (max-width: 640px) {
  body { font-size: 16.5px; line-height: 1.7; }
  .tool-card p, .field label, .notice, .calc-note { font-size: 14px; }
  .editorial p { font-size: 16.5px; }
  .tool-guide p, .tool-guide li { font-size: 14.5px; }
  .tool-guide .tg-sub { font-size: 13px; }
  .faq details p { font-size: 15px; }
  .faq summary { font-size: 15.5px; }
  .state-grid a { font-size: 14.5px; }
  .sec-sub { font-size: 15px; }
  .bottom-nav a { font-size: 11.5px; }
}

/* ---------- Calculator form: single stacked column ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }

/* ---------- Tariff verification banner ---------- */
.verify-banner {
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-top: 14px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #bbf7d0; background: #f0fdf4;
  font-size: 12.5px; font-weight: 600; color: #166534;
}
.verify-banner.show { display: flex; }
html.dark .verify-banner { background: #14261b; border-color: #166534; color: #86efac; }
.verify-banner .vb-reg { display: inline-flex; align-items: center; gap: 6px; }
.verify-banner .vb-reg::before { content: "✓"; width: 18px; height: 18px; border-radius: 50%; background: #16a34a; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; }

/* ---------- Header controls ---------- */
.hdr-ctl { position: relative; }
.hdr-ctl select {
  height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface); color: var(--body);
  font: 700 13px var(--font); cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-size: 13px 13px; background-repeat: no-repeat;
}
.hdr-ctl select:hover { border-color: var(--primary); }
@media (max-width: 480px) {
  .hdr-ctl select { max-width: 96px; font-size: 12px; padding-left: 8px; }
}

/* ---------- Theme buttons (light / night / gradient / auto) ---------- */
.theme-btns button[data-theme] {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 42px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--body);
  font: 700 12.5px var(--font); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.theme-btns button[data-theme]:hover { border-color: var(--primary); color: var(--primary); }
.theme-btns button[data-theme] .t-label { margin-left: 6px; }
.theme-btns button[data-theme].on {
  background: linear-gradient(135deg, #5b2be0, #7a38ff);
  border-color: transparent; color: #fff;
}
@media (max-width: 1200px) { .theme-btns button[data-theme] .t-label { display: none; } }
@media (max-width: 480px) { .theme-btns button[data-theme] { min-width: 34px; height: 38px; padding: 0 6px; } }

/* ---------- SEO content blocks ---------- */
.seo-block { max-width: 900px; margin: 46px auto 0; padding-top: 38px; border-top: 1px solid var(--border); }
.seo-block h2 { font-size: clamp(21px, 2.6vw, 27px); margin: 34px 0 10px; scroll-margin-top: 90px; }
.seo-block h3 { font-size: 17px; margin: 22px 0 8px; }
.seo-block p { margin: 10px 0; font-size: 15.5px; line-height: 1.78; color: var(--body); }
.seo-block ul, .seo-block ol { padding-left: 22px; }
.seo-block li { margin-bottom: 9px; line-height: 1.72; font-size: 15px; }
.seo-block li b, .seo-block p b { color: var(--heading); }
.seo-block a { font-weight: 600; }
.seo-block .seo-note { background: var(--energy-soft); border: 1px solid var(--energy-line); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; line-height: 1.7; margin: 12px 0; }
.seo-block table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 12px 0; }
.seo-block table th { text-align: left; padding: 9px 11px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.seo-block table td { padding: 9px 11px; border-bottom: 1px solid var(--bg-soft); color: var(--body); }
.seo-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.seo-chip {
  display: inline-block; padding: 7px 13px;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--body);
}
.seo-chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
@media (max-width: 640px) {
  .seo-block { margin-top: 34px; padding-top: 28px; }
  .seo-block p { font-size: 16px; }
}

/* =====================================================================
   "Electric Bill" landing sections (features / benefits / states grid)
   ===================================================================== */
.features { padding: 70px 20px; }
.features h2, .benefits h2, .states h2 { text-align: center; font-size: 32px; margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.card.feature-card, .grid .card { text-align: center; }
.grid .card i, .grid .card .fa-solid { font-size: 40px; margin-bottom: 16px; color: #7a38ff; }
.grid .card h3 { margin-bottom: 8px; }

.benefits {
  padding: 70px 20px;
  background: linear-gradient(135deg, #4d3df5, #7a38ff, #a946ff);
  color: #fff;
}
.benefits ul { max-width: 650px; margin: auto; list-style: none; padding: 0; }
.benefits li {
  background: rgba(255, 255, 255, 0.16);
  padding: 16px 18px; margin-bottom: 12px;
  border-radius: 14px; color: #fff; font-weight: 500;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.states { padding: 70px 20px; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.state-grid a {
  text-decoration: none; background: var(--surface);
  padding: 18px; border-radius: 14px;
  box-shadow: 0 10px 25px rgba(30, 27, 75, 0.08);
  font-weight: 600; color: var(--body); transition: 0.3s;
  display: block; text-align: center;
}
.state-grid a:hover { background: var(--primary); color: #fff; text-decoration: none; transform: translateY(-2px); }

.footer-logo { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.footer-links { margin: 18px 0; }
.footer-links a { color: rgba(255, 255, 255, 0.85); margin: 0 12px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.copyright { font-size: 13px; opacity: 0.75; }

/* =====================================================================
   Print — beautiful bill-only PDF (no full page)
   ===================================================================== */
#print-bill { display: none; }

@media print {
  body * { visibility: hidden; }
  #print-bill, #print-bill * { visibility: visible; }
  #print-bill {
    display: block !important;
    position: absolute; left: 0; top: 0; width: 100%;
    background: #fff; color: #111827;
    font-family: var(--font);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  @page { size: A4; margin: 12mm 14mm; }
}

.pb-head { background: linear-gradient(135deg, #4218bd, #5b2be0, #a946ff); color: #fff; border-radius: 10px 10px 0 0; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pb-brand { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.pb-brand small { display: block; font-size: 11px; font-weight: 500; opacity: 0.85; }
.pb-title { text-align: right; font-size: 15px; font-weight: 700; }
.pb-title span { display: block; font-size: 11px; opacity: 0.9; font-weight: 500; }

.pb-body { border: 1.5px solid #e5e7eb; border-top: 0; border-radius: 0 0 10px 10px; padding: 16px 22px 20px; }
.pb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; margin: 6px 0 14px; }
.pb-cell { border-bottom: 1px dashed #e5e7eb; padding: 5px 0; }
.pb-cell .k { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9ca3af; }
.pb-cell .v { font-size: 14.5px; font-weight: 700; color: #111827; margin-top: 2px; }

.pb-sec { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #5b2be0; margin: 14px 0 6px; }

.pb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pb-table th { background: #ede9fe; color: #4218bd; text-align: left; padding: 7px 10px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid #e5e7eb; }
.pb-table td { padding: 6px 10px; border: 1px solid #e5e7eb; color: #111827; }
.pb-table td.num, .pb-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pb-table tr.sub td { background: #ecfdf5; color: #065f46; font-weight: 700; }

.pb-charges { margin-top: 4px; }
.pb-row { display: flex; justify-content: space-between; padding: 5px 2px; font-size: 12.5px; color: #111827; border-bottom: 1px dashed #e5e7eb; font-variant-numeric: tabular-nums; }
.pb-row.sub { color: #065f46; font-weight: 700; }
.pb-row .amt { font-weight: 700; }

.pb-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px 16px; border-radius: 8px; background: linear-gradient(135deg, #4218bd, #5b2be0, #a946ff); color: #fff; }
.pb-total .l { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.pb-total .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.pb-note { margin-top: 14px; font-size: 10px; line-height: 1.6; color: #6b7280; border-top: 1px solid #e5e7eb; padding-top: 8px; }
.pb-stamp { margin-top: 16px; text-align: right; font-size: 11px; color: #374151; font-weight: 600; }

/* ---------- Blog ---------- */
.blog-hero { padding: 26px 0 6px; text-align: center; }
.blog-hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--primary); background: var(--energy-soft);
  border: 1px solid var(--energy-line); border-radius: 999px;
  padding: 6px 12px;
}
.blog-hero .post-thumb { width: 100%; max-width: 960px; aspect-ratio: 16/9; object-fit: cover; border-radius: 18px; box-shadow: 0 14px 40px rgba(30, 27, 75, 0.18); margin: 0 auto; display: block; }
.blog-hero h1 { font-size: clamp(24px, 3.4vw, 38px); margin-top: 22px; }
.blog-hero .sub { margin: 12px auto 0; font-size: 15.5px; color: var(--muted); max-width: 720px; line-height: 1.7; }
.post-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { font-weight: 600; }
.breadcrumb .cur { color: var(--primary); font-weight: 700; }
main .seo-block { margin-top: 24px; padding-top: 26px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 20px; }
.blog-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; color: var(--heading); box-shadow: 0 8px 26px rgba(30, 27, 75, 0.08); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.blog-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(91, 43, 224, 0.16); text-decoration: none; }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card .bc-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card h3 { font-size: 16.5px; line-height: 1.4; }
.blog-card p { font-size: 13.5px; color: var(--muted); line-height: 1.65; flex: 1; }
.blog-card .bc-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
@media (max-width: 860px) { .related-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .blog-card h3 { font-size: 17.5px; }
  .blog-card p { font-size: 14.5px; }
}

/* =====================================================================
   "Premium" calculator look — animated gradient ring, glow focus,
   toggle switch, button shine, flowing bars, floating card.
   Pure CSS, token-based (works in light / dark / gradient).
   ===================================================================== */

@property --ring-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Calculator section spacing (no hero overlap) */
#calc { margin-top: 28px; }
@media (max-width: 640px) { #calc { margin-top: 20px; } }

/* Animated gradient ring around calculator cards */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  #calc .card { position: relative; border-color: transparent; }
  #calc .card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1.8px;
    background: conic-gradient(from var(--ring-a), #5b2be0, #7a38ff, #a946ff, #4d3df5, #5b2be0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  @supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    #calc .card::before { animation: ring-spin 7s linear infinite; }
  }
  @keyframes ring-spin { to { --ring-a: 360deg; } }
}

/* Inputs: hover affordance + layered glow focus */
.input-wrap input:hover, .field select:hover { border-color: var(--border-strong); }
.input-wrap input:focus, .field select:focus {
  box-shadow: 0 0 0 3px rgba(91, 43, 224, 0.16), 0 0 0 7px rgba(122, 56, 255, 0.07);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent),
              0 0 0 7px color-mix(in srgb, var(--energy) 10%, transparent);
}

/* Subsidy checkbox -> modern toggle switch */
input[type="checkbox"]#el-subsidy {
  -webkit-appearance: none; appearance: none;
  position: relative; flex-shrink: 0;
  width: 46px !important; height: 26px !important;
  min-width: 46px; min-height: 26px; margin: 0;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--border-strong); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
input[type="checkbox"]#el-subsidy::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(30, 27, 75, 0.3);
  transition: transform 0.2s ease;
}
input[type="checkbox"]#el-subsidy:checked {
  background: linear-gradient(135deg, #5b2be0, #7a38ff);
  border-color: transparent;
}
input[type="checkbox"]#el-subsidy:checked::after { transform: translateX(20px); }

/* Buttons: gradient fill + shine sweep */
.btn { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--energy)); }
.btn-ghost { background: var(--surface); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -90%;
  width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-22deg);
}
@media (prefers-reduced-motion: no-preference) {
  .btn::after { transition: left 0.55s ease; }
  .btn:hover::after { left: 135%; }
}

/* Result hero: shimmer sweep + glowing amount */
.res-hero, .big-result { position: relative; overflow: hidden; }
.res-hero .big { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28); }
@media (prefers-reduced-motion: no-preference) {
  .res-hero::after, .big-result::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%;
    width: 45%; pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-22deg);
    animation: hero-shine 3.4s ease-in-out infinite;
  }
  @keyframes hero-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
}

/* Slab bars: flowing energy gradient */
.bar-fill {
  background: linear-gradient(90deg, #5b2be0, #7a38ff, #a946ff, #5b2be0);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .bar-fill { animation: bar-flow 3s linear infinite; }
  @keyframes bar-flow { to { background-position: 200% 0; } }
}

/* Lines box accent */
.lines { border-left: 3px solid #7a38ff; }

/* Seg chips + result cells: tactile + lift */
.seg { box-shadow: 0 1px 3px rgba(30, 27, 75, 0.06); }
.seg:active { transform: translateY(1px); }
.seg.on { box-shadow: 0 4px 12px rgba(91, 43, 224, 0.32); }
.res-cell { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.res-cell:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 6px 16px rgba(91, 43, 224, 0.1); }

/* ---------- Lightweight entrance + micro-interactions (CSS only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  main > section { animation: fade-up 0.5s ease both; }
  main > section:nth-child(2) { animation-delay: 0.06s; }
  main > section:nth-child(3) { animation-delay: 0.12s; }
  main > section:nth-child(4) { animation-delay: 0.18s; }
  main > section:nth-child(5) { animation-delay: 0.24s; }
  .tool-card, .tool-guide, .blog-card, .more-tool { animation: fade-up 0.5s ease both; }
  .tool-card:nth-child(2), .tool-guide:nth-child(2), .blog-card:nth-child(2), .more-tool:nth-child(2) { animation-delay: 0.05s; }
  .tool-card:nth-child(3), .tool-guide:nth-child(3), .blog-card:nth-child(3), .more-tool:nth-child(3) { animation-delay: 0.1s; }
  .tool-card:nth-child(4), .tool-guide:nth-child(4), .blog-card:nth-child(4), .more-tool:nth-child(4) { animation-delay: 0.15s; }
  .tool-card:nth-child(5), .tool-guide:nth-child(5), .blog-card:nth-child(5), .more-tool:nth-child(5) { animation-delay: 0.2s; }
  .tool-card:nth-child(6), .tool-guide:nth-child(6), .blog-card:nth-child(6) { animation-delay: 0.25s; }
  .tool-card:nth-child(7), .tool-guide:nth-child(7) { animation-delay: 0.3s; }
  .tool-card:nth-child(8), .tool-guide:nth-child(8) { animation-delay: 0.35s; }
  .state-grid a { animation: fade-up 0.4s ease both; }
  .state-grid a:nth-child(3n+2) { animation-delay: 0.05s; }
  .state-grid a:nth-child(3n+3) { animation-delay: 0.1s; }
  .btn:active { transform: translateY(0) scale(0.98); }
  .state-chip:hover, .board-chip:hover, .seo-chip:hover { transform: translateY(-2px); }
}
.state-chip, .board-chip, .seo-chip, .tool-card, .blog-card, .more-tool, .state-grid a {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.brand-mark { transition: transform 0.25s ease; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }

/* ---------- Calculator refinements (segmented control, stats, polish) ---------- */

/* Segmented control (input-mode toggle only): joined pill track with a
   sliding active pill. Scoped with :has() on buttons carrying [data-mode] so
   it never touches the .seg-row/.seg chips reused for Copy/WhatsApp/Print on
   state pages. Falls back to plain chips where :has() is unsupported. */
.seg-row:has(.seg[data-mode]) {
  position: relative;
  display: flex; gap: 0; flex-wrap: nowrap;
  width: 100%;
  padding: 3px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.seg-row:has(.seg[data-mode]) .seg {
  position: relative; z-index: 1;
  flex: 1 1 0; min-height: 38px; padding: 0 14px;
  border: 0; background: transparent; box-shadow: none;
  border-radius: 999px; color: var(--body);
  white-space: nowrap;
  transition: color 0.18s ease;
}
.seg-row:has(.seg[data-mode]) .seg:hover { color: var(--primary); }
.seg-row:has(.seg[data-mode]) .seg.on { color: #fff; }
.seg-row:has(.seg[data-mode])::before {
  content: "";
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(135deg, #5b2be0, #7a38ff);
  box-shadow: 0 4px 12px rgba(91, 43, 224, 0.32);
  z-index: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.seg-row:has(.seg[data-mode="reading"].on)::before { transform: translateX(100%); }
@media (prefers-reduced-motion: reduce) {
  .seg-row:has(.seg[data-mode])::before { transition: none; }
}
@media (max-width: 640px) { .seg-row:has(.seg[data-mode]) .seg { min-height: 44px; } }

/* Hide number-input spinners for a cleaner look */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Result stats: gradient accent strip per cell (last = subsidy = green) */
.res-cell { position: relative; overflow: hidden; }
.res-cell::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #5b2be0, #a946ff);
}
.res-cell:first-child::before { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.res-cell:last-child::before { background: linear-gradient(90deg, #16a34a, #34d399); }

/* Bigger, bouncier ₹ amount when results appear */
.res-hero .big { font-size: clamp(30px, 5vw, 40px); }
.results.show .res-hero { animation: fade-up 0.3s ease; }
@media (prefers-reduced-motion: no-preference) {
  .results.show .res-hero .big { animation: amount-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
}
@keyframes amount-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }

/* Notice tip: info icon prefix */
.notice-tip { position: relative; padding-left: 40px; }
.notice-tip::before {
  content: "ℹ️";
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 15px;
}

/* Slab editor inputs: focus glow for consistency */
.tbl input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 43, 224, 0.16); }

/* Bill lines: hover highlight */
.line { padding: 9px 12px; margin: 0 -12px; border-radius: 8px; transition: background 0.15s; }
.line:hover { background: var(--bg-soft); }
