/* =========================================================
   8th Pay Commission Salary Calculator — Stylesheet
   Palette: Navy #0F4C81 / Blue #1E88E5 / Teal #00B894
   ========================================================= */

:root {
  --navy: #0F4C81;
  --navy-700: #0c3d68;
  --blue: #1E88E5;
  --blue-100: #e3f0fc;
  --teal: #00B894;
  --teal-700: #009b7d;
  --bg: #F8FAFC;
  --bg-alt: #eef3f9;
  --card: #ffffff;
  --ink: #15202b;
  --ink-soft: #4a5a6a;
  --line: #e4ecf4;
  --shadow-sm: 0 1px 2px rgba(15,76,129,.06), 0 2px 8px rgba(15,76,129,.05);
  --shadow-md: 0 6px 24px rgba(15,76,129,.08), 0 2px 6px rgba(15,76,129,.05);
  --shadow-lg: 0 18px 48px rgba(15,76,129,.14);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1160px;
  --grad: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  --grad-teal: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Poppins", "Inter", sans-serif;
}

[data-theme="dark"] {
  --navy: #4ea3f0;
  --navy-700: #3b8fdc;
  --blue: #5cb0ff;
  --blue-100: #15314b;
  --teal: #2fd6ad;
  --bg: #0b1622;
  --bg-alt: #0f1d2e;
  --card: #15233440;
  --ink: #e8eef5;
  --ink-soft: #9fb2c6;
  --line: #24384f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 28px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.55);
  --card: #13202f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *{animation:none!important;transition:none!important;} }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.18; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 600; font-size: 1rem; padding: 14px 26px; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .2s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(30,136,229,.34); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(30,136,229,.42); }
.btn-teal { background: var(--grad-teal); color: #fff; box-shadow: 0 8px 22px rgba(0,184,148,.3); }
.btn-teal:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
[data-theme="dark"] .btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--blue-100); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .site-header { background: rgba(11,22,34,.8); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(15,76,129,.30); }
.brand-mark svg { display: block; width: 40px; height: 40px; }
.brand small { display: block; font-size: .68rem; font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 9px; transition: background .2s, color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); background: var(--blue-100); text-decoration: none; }
[data-theme="dark"] .nav-links a:hover, [data-theme="dark"] .nav-links a.active { color: var(--ink); }
.nav-links a.nav-cta { background: var(--grad); color: #fff; font-weight: 600; padding: 9px 17px; }
.nav-links a.nav-cta:hover { background: var(--grad); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30,136,229,.35); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--blue-100); transform: translateY(-1px); }
.menu-toggle { display: none; }
@media (max-width: 880px) {
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 20px; transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow-md); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 12px; border-radius: 10px; }
  .menu-toggle { display: grid; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 64px; background: radial-gradient(1100px 460px at 78% -8%, rgba(30,136,229,.13), transparent 60%), radial-gradient(800px 400px at 0% 110%, rgba(0,184,148,.10), transparent 55%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(0,184,148,.18); }
[data-theme="dark"] .hero-badge { color: var(--ink); }
.hero h1 { font-size: clamp(2.05rem, 5vw, 3.35rem); }
.hero h1 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.16rem; color: var(--ink-soft); margin: 20px 0 30px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats .stat strong { font-family: var(--font-head); font-size: 1.7rem; color: var(--navy); display: block; }
[data-theme="dark"] .hero-stats .stat strong { color: var(--blue); }
.hero-stats .stat span { font-size: .85rem; color: var(--ink-soft); }

/* signature: 7th -> 8th transformation card */
.transform-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); position: relative; }
.transform-card::before { content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1px; background: linear-gradient(135deg, rgba(30,136,229,.5), rgba(0,184,148,.4)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.tc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.tc-head h3 { font-size: 1.05rem; }
.tc-tag { font-size: .72rem; font-weight: 700; color: var(--teal); background: rgba(0,184,148,.12); padding: 4px 10px; border-radius: 999px; }
.tc-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 16px 0; }
.tc-pill { text-align: center; padding: 16px 10px; border-radius: 14px; background: var(--bg-alt); }
.tc-pill.now { border: 1px dashed var(--line); }
.tc-pill.new { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(30,136,229,.3); }
.tc-pill small { display: block; font-size: .72rem; opacity: .8; margin-bottom: 4px; }
.tc-pill b { font-family: var(--font-head); font-size: 1.32rem; }
.tc-arrow { color: var(--teal); font-size: 1.3rem; }
.tc-bar { height: 10px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; margin-top: 6px; }
.tc-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad-teal); animation: grow 1.4s .3s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes grow { to { width: var(--w, 72%); } }
.tc-note { font-size: .78rem; color: var(--ink-soft); margin-top: 14px; text-align: center; }

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 52px 0 44px; } }

/* ---------- Calculator ---------- */
.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.calc-form { padding: 30px; }
.calc-form h3 { font-size: 1.25rem; margin-bottom: 4px; }
.calc-form .sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field label .hint { font-weight: 500; color: var(--ink-soft); }
.field input[type="number"], .field select {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1rem; font-family: var(--font-body); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slider-val { font-family: var(--font-head); font-weight: 700; color: var(--teal); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--blue) 0 50%, var(--bg-alt) 50% 100%); margin-top: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); cursor: pointer; box-shadow: var(--shadow-sm); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-soft); margin-top: 4px; }

/* results */
.calc-results { padding: 30px; position: sticky; top: 88px; }
.calc-results h3 { font-size: 1.25rem; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.result-hero { background: var(--grad); border-radius: 14px; padding: 22px; color: #fff; margin-bottom: 18px; box-shadow: 0 12px 28px rgba(15,76,129,.28); }
.result-hero small { font-size: .8rem; opacity: .85; }
.result-hero .big { font-family: var(--font-head); font-size: 2.3rem; font-weight: 800; margin: 4px 0; }
.result-hero .delta { font-size: .9rem; background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 999px; display: inline-block; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-cell { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.result-cell small { display: block; font-size: .78rem; color: var(--ink-soft); margin-bottom: 3px; }
.result-cell b { font-family: var(--font-head); font-size: 1.18rem; color: var(--ink); }
.result-cell.up b { color: var(--teal); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.result-actions .icon-btn { width: auto; padding: 0 13px; height: 38px; gap: 7px; font-size: .85rem; font-weight: 600; }
.calc-empty { text-align: center; color: var(--ink-soft); padding: 30px 10px; }
.calc-empty svg { margin: 0 auto 12px; opacity: .5; }
.calc-note { font-size: .78rem; color: var(--ink-soft); margin-top: 16px; padding: 12px 14px; background: var(--bg-alt); border-radius: 10px; border-left: 3px solid var(--teal); }
@media (max-width: 860px) { .calc-wrap { grid-template-columns: 1fr; } .calc-results { position: static; } }

/* ---------- Benefits ---------- */
.benefits { background: var(--bg-alt); }
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.benefit { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.benefit .ico { width: 48px; height: 48px; border-radius: 13px; background: var(--blue-100); color: var(--navy); display: grid; place-items: center; margin-bottom: 14px; }
[data-theme="dark"] .benefit .ico { color: var(--blue); }
.benefit h3 { font-size: 1.05rem; margin-bottom: 6px; }
.benefit p { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 900px) { .benefit-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .benefit-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-q .chev { transition: transform .25s; color: var(--blue); flex-shrink: 0; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a div { padding: 0 20px 18px; color: var(--ink-soft); font-size: .95rem; }
.faq-item.open .faq-a { max-height: 460px; }

/* ---------- Updates / Blog cards ---------- */
.update-grid, .blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.update-card, .post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.update-card:hover, .post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.update-card .thumb, .post-card .thumb { height: 140px; background: var(--grad); position: relative; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; text-align: center; padding: 16px; }
.post-card .thumb.t2 { background: var(--grad-teal); }
.post-card .thumb.t3 { background: linear-gradient(135deg,#0F4C81,#00B894); }
.update-card .body, .post-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.tag { font-size: .72rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; }
.update-card h3, .post-card h3 { font-size: 1.08rem; margin: 8px 0; }
.update-card p, .post-card p { font-size: .9rem; color: var(--ink-soft); flex: 1; }
.update-card .meta, .post-card .meta { font-size: .8rem; color: var(--ink-soft); margin-top: 12px; display: flex; gap: 12px; }
@media (max-width: 900px) { .update-grid, .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .update-grid, .blog-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); border-radius: 24px; padding: 52px 40px; text-align: center; color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 80% 0%, rgba(255,255,255,.18), transparent 60%); }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); position: relative; }
.cta-band p { opacity: .92; max-width: 560px; margin: 12px auto 26px; position: relative; }
.cta-band .btn { position: relative; }
.cta-band .btn-light { background: #fff; color: var(--navy); }
.cta-band .btn-light:hover { transform: translateY(-2px); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--ink-soft); padding: 18px 0 0; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--ink); font-weight: 600; }

/* ---------- Article / legal content ---------- */
.page-hero { padding: 46px 0 10px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: var(--ink-soft); margin-top: 12px; max-width: 720px; font-size: 1.05rem; }
.prose { max-width: 820px; }
.prose h2 { font-size: 1.5rem; margin: 34px 0 12px; }
.prose h3 { font-size: 1.18rem; margin: 24px 0 8px; }
.prose p { margin-bottom: 14px; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); }
.prose .callout { background: var(--bg-alt); border-left: 4px solid var(--blue); padding: 16px 20px; border-radius: 12px; margin: 20px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-alt); font-family: var(--font-head); }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contact-form .field input, .contact-form .field textarea { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1rem; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .field input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.contact-info .info-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-100); color: var(--navy); display: grid; place-items: center; flex-shrink: 0; }
[data-theme="dark"] .contact-info .ico { color: var(--blue); }
.contact-info h4 { font-size: 1rem; }
.contact-info p { color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Ad slots ---------- */
.ad-slot { max-width: 970px; margin: 28px auto; min-height: 90px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--ink-soft); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; background: var(--bg-alt); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfe0f0; padding: 56px 0 26px; margin-top: 20px; }
[data-theme="dark"] .site-footer { background: #0a131e; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand .brand-mark { margin-bottom: 14px; }
.footer-brand p { font-size: .9rem; color: #a9c3dc; max-width: 300px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b9d0e6; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 38px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #9fb8d2; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating buttons ---------- */
.floats { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 12px; z-index: 90; }
.float-btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); border: none; cursor: pointer; transition: transform .2s; }
.float-btn:hover { transform: translateY(-3px) scale(1.05); }
.float-wa { background: #25D366; }
.float-top { background: var(--navy); opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s; }
.float-top.show { opacity: 1; pointer-events: auto; }
[data-theme="dark"] .float-top { background: var(--blue); }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* print */
@media print {
  .site-header, .floats, .hero-cta, .calc-form, .result-actions, .site-footer, .ad-slot, .cta-band, .menu-toggle { display: none !important; }
  body { background: #fff; }
  .calc-results { box-shadow: none; border: 1px solid #ccc; }
}

/* ============ ADVANCED CALCULATOR v2 ============ */
.calc-head { text-align:center; max-width:720px; margin:0 auto 28px; }
.seg { display:inline-flex; background:var(--bg-alt); border:1px solid var(--line); border-radius:14px; padding:5px; gap:4px; margin:0 auto 26px; }
.seg-btn { border:none; background:transparent; color:var(--ink-soft); font-family:var(--font-head); font-weight:600; font-size:.92rem; padding:10px 20px; border-radius:10px; cursor:pointer; transition:all .2s; display:flex; align-items:center; gap:7px; }
.seg-btn.active { background:var(--card); color:var(--navy); box-shadow:var(--shadow-sm); }
[data-theme="dark"] .seg-btn.active { color:var(--blue); }
.seg-wrap { display:flex; justify-content:center; }
.mode-panel { display:none; }
.mode-panel.active { display:block; }

.adv-toggle { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; background:var(--bg-alt); border-radius:11px; margin:4px 0 18px; font-size:.88rem; font-weight:600; }
.switch { position:relative; width:46px; height:26px; flex-shrink:0; }
.switch input { opacity:0; width:0; height:0; }
.switch .track { position:absolute; inset:0; background:var(--line); border-radius:999px; transition:.25s; cursor:pointer; }
.switch .track::before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.25s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background:var(--teal); }
.switch input:checked + .track::before { transform:translateX(20px); }

/* breakdown table */
.breakdown { width:100%; border-collapse:collapse; margin-top:4px; font-size:.9rem; }
.breakdown th, .breakdown td { padding:10px 8px; text-align:right; border-bottom:1px solid var(--line); }
.breakdown th:first-child, .breakdown td:first-child { text-align:left; color:var(--ink-soft); }
.breakdown thead th { font-family:var(--font-head); font-size:.8rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; }
.breakdown tbody td { font-variant-numeric:tabular-nums; font-weight:600; }
.breakdown tr.total td { border-top:2px solid var(--line); border-bottom:none; padding-top:12px; font-size:1.02rem; color:var(--ink); }
.breakdown tr.total td:last-child { color:var(--teal); }
.breakdown .rev { color:var(--navy); }
[data-theme="dark"] .breakdown .rev { color:var(--blue); }

/* mini bar chart */
.barchart { margin:18px 0 6px; }
.bar-row { display:grid; grid-template-columns:90px 1fr auto; align-items:center; gap:12px; margin-bottom:12px; }
.bar-row small { font-size:.82rem; color:var(--ink-soft); font-weight:600; }
.bar-track { height:30px; background:var(--bg-alt); border-radius:8px; overflow:hidden; }
.bar-fill { height:100%; width:0; border-radius:8px; transition:width 1s cubic-bezier(.2,.7,.3,1); }
.bar-fill.cur { background:linear-gradient(90deg,#9fb2c6,#c3d2e2); }
.bar-fill.new { background:var(--grad-teal); }
.bar-row b { font-family:var(--font-head); font-size:.95rem; font-variant-numeric:tabular-nums; }

/* scenario comparison */
.scenario { margin-top:8px; overflow-x:auto; }
.scenario table { width:100%; border-collapse:collapse; font-size:.88rem; min-width:420px; }
.scenario th, .scenario td { padding:10px 12px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap; }
.scenario th:first-child, .scenario td:first-child { text-align:left; }
.scenario thead th { font-family:var(--font-head); font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-soft); }
.scenario tbody tr.hl { background:var(--blue-100); }
.scenario tbody tr.hl td { font-weight:700; color:var(--navy); }
[data-theme="dark"] .scenario tbody tr.hl td { color:var(--ink); }
.scenario td b { color:var(--teal); }

.result-block { margin-top:20px; }
.result-block h4 { font-family:var(--font-head); font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-soft); margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.result-block h4::after { content:""; flex:1; height:1px; background:var(--line); }

.net-strip { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.net-card { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:14px; }
.net-card.hl { background:linear-gradient(135deg,rgba(0,184,148,.1),rgba(30,136,229,.08)); border-color:rgba(0,184,148,.3); }
.net-card small { display:block; font-size:.76rem; color:var(--ink-soft); margin-bottom:3px; }
.net-card b { font-family:var(--font-head); font-size:1.2rem; }
.net-card.hl b { color:var(--teal); }

/* matrix reference table on content section */
.matrix-table { overflow-x:auto; margin:18px 0; }
.matrix-table table { width:100%; border-collapse:collapse; font-size:.9rem; min-width:560px; }
.matrix-table th, .matrix-table td { border:1px solid var(--line); padding:11px 13px; text-align:center; }
.matrix-table thead th { background:var(--grad); color:#fff; font-family:var(--font-head); border-color:transparent; }
.matrix-table tbody td:first-child { text-align:left; font-weight:600; background:var(--bg-alt); }
.matrix-table tbody tr:hover { background:var(--blue-100); }

/* trust row */
.trust-row { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:18px; }
.trust-chip { display:inline-flex; align-items:center; gap:7px; background:var(--card); border:1px solid var(--line); padding:8px 15px; border-radius:999px; font-size:.83rem; font-weight:600; color:var(--ink-soft); box-shadow:var(--shadow-sm); }
.trust-chip svg { color:var(--teal); }

/* ============ BLOG ARTICLE v2 ============ */
.article-hero-img { width:100%; max-width:860px; margin:0 auto 8px; border-radius:18px; overflow:hidden; box-shadow:var(--shadow-md); border:1px solid var(--line); }
.article-hero-img img { width:100%; height:auto; display:block; }
.article-wrap { max-width:860px; margin:0 auto; }
.article-meta { display:flex; flex-wrap:wrap; gap:14px; align-items:center; font-size:.85rem; color:var(--ink-soft); margin-top:10px; }
.article-meta .tag { color:var(--teal); }
.toc { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px 22px; margin:24px 0; box-shadow:var(--shadow-sm); }
.toc h4 { font-family:var(--font-head); font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-soft); margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.toc ol { margin:0; padding-left:20px; }
.toc li { margin-bottom:8px; }
.toc a { color:var(--navy); font-weight:500; font-size:.95rem; }
[data-theme="dark"] .toc a { color:var(--blue); }
.toc a:hover { text-decoration:underline; }
.prose h2[id] { scroll-margin-top:90px; }
.prose .ext { white-space:nowrap; }
.prose .ext::after { content:" ↗"; font-size:.8em; opacity:.7; }
.article-share { display:flex; gap:10px; flex-wrap:wrap; margin:24px 0 4px; }
.article-share a { display:inline-flex; align-items:center; gap:7px; font-size:.85rem; font-weight:600; padding:9px 16px; border-radius:999px; border:1px solid var(--line); color:var(--ink-soft); background:var(--card); }
.article-share a:hover { background:var(--blue-100); color:var(--navy); text-decoration:none; }
.article-faq { max-width:860px; margin:0 auto; }

/* ============ RESPONSIVE TABLES (blog) ============ */
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:1.1em 0; border:1px solid var(--line); border-radius:12px; }
.table-scroll table { margin:0; border:0; min-width:480px; }
.prose .table-scroll table th, .prose .table-scroll table td { white-space:normal; }
