/* =====================================================
   Calculator pages — /tools/
   Loaded only on the four calculator pages. Inherits every
   design token from style.css; defines nothing global.
   ===================================================== */

.calc-page { padding-top: 2rem; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--navy-700); }
.crumbs a:hover { color: var(--gold-500); text-decoration: underline; }
.crumbs span { margin: 0 0.35rem; color: var(--line); }
.crumbs span[aria-current] { color: var(--muted); margin: 0; }

.calc-head { text-align: left; max-width: 46rem; margin-bottom: 2rem; }
.calc-head h1 { margin-bottom: 0.6rem; }
.calc-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- Layout ---------- */
.calc-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem; align-items: start;
}
.calc-grid-wide { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }

.calc-inputs {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; position: sticky; top: 92px;
}
.calc-results {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); min-width: 0;
}
.calc-sub { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--gold-500); display: inline-block; }
.calc-sub-small { font-size: 0.95rem; margin: 1.4rem 0 0.3rem; color: var(--navy-800); }
.calc-note-inline { font-size: 0.78rem; color: var(--muted); margin: 0.5rem 0 0.9rem; line-height: 1.45; }
.calc-placeholder { color: var(--muted); font-size: 0.92rem; }

/* ---------- Fields ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field-label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--navy-800); margin-bottom: 0.15rem; }
.field-hint { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4rem; line-height: 1.4; }
.cap { font-weight: 500; font-size: 0.72rem; color: var(--gold-500); white-space: nowrap; }

.field input[type="number"],
.field input[type="text"] {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,160,23,0.18);
}
/* Rupee prefix. Padding on the input leaves room for the glyph. */
.rupee-wrap { position: relative; display: block; }
.rupee-wrap::before {
  content: "₹"; position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.95rem; pointer-events: none;
}
.rupee-wrap input { padding-left: 1.9rem !important; }

.field-set { border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem; margin-bottom: 1.1rem; background: #fff; }
.field-set legend { font-size: 0.8rem; font-weight: 700; color: var(--navy-800); padding: 0 0.35rem; }
.radio, .check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.86rem; padding: 0.3rem 0; cursor: pointer; line-height: 1.4; }
.radio input, .check input { margin-top: 0.25rem; accent-color: var(--gold-500); flex-shrink: 0; }
.radio small, .check small { color: var(--muted); font-size: 0.76rem; }

/* GST rate chips */
.rate-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding-top: 0.4rem; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block; padding: 0.45rem 0.9rem; border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: var(--navy-800); background: #fff; transition: all 0.15s;
}
.chip input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-400); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(212,160,23,0.35); }
.chip span:hover { border-color: var(--gold-500); }

/* ---------- Verdict ---------- */
.verdict {
  border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.3rem;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff;
  border-left: 5px solid var(--gold-500);
}
.verdict-lead { font-size: 0.9rem; color: #cdd9e6; margin-bottom: 0.25rem; }
.verdict-lead strong { color: var(--gold-400); letter-spacing: 0.04em; }
.verdict-amount { font-family: var(--font-head); font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 700; color: var(--gold-400); line-height: 1.1; }
.verdict-detail { font-size: 0.86rem; color: #cdd9e6; margin-top: 0.5rem; line-height: 1.5; }
.verdict-detail strong { color: #fff; }
.verdict-warn { background: linear-gradient(135deg, #7a5b06, #a67c0d); border-left-color: var(--gold-400); }
.verdict-old  { background: linear-gradient(135deg, #6b1414, #a02020); border-left-color: #ff9a9a; }

/* ---------- Regime comparison cards ---------- */
.compare-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
.compare-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; min-width: 0; }
.compare-card.is-winner { border-color: var(--gold-500); box-shadow: 0 0 0 2px rgba(212,160,23,0.22); background: #fffdf6; }
.compare-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.tag { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
       background: var(--gold-100); color: #7a5b06; padding: 0.12rem 0.4rem; border-radius: 4px; vertical-align: middle; }
.compare-total { font-family: var(--font-head); font-size: 1.55rem; font-weight: 700; color: var(--navy-800); margin-bottom: 0.7rem; }

.compare-lines li {
  display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.8rem;
  padding: 0.32rem 0; border-bottom: 1px dashed var(--line); color: var(--muted);
}
.compare-lines li b { color: var(--ink); font-weight: 600; text-align: right; white-space: nowrap; }
.compare-lines .line-strong { color: var(--navy-800); font-weight: 600; }
.compare-lines .line-strong b { color: var(--navy-800); }
.compare-lines .line-relief b { color: #1a7f37; }
.compare-lines .line-total { border-bottom: none; border-top: 2px solid var(--navy-800); margin-top: 0.3rem; padding-top: 0.5rem; font-weight: 700; color: var(--navy-800); }
.compare-lines .line-total b { font-size: 1rem; color: var(--navy-800); }
.compare-lines .line-muted { border-bottom: none; font-size: 0.74rem; }

/* ---------- Insight / warning callouts ---------- */
.calc-insight, .calc-warn {
  font-size: 0.86rem; line-height: 1.55; padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem;
}
.calc-insight { background: var(--gold-100); border-left: 4px solid var(--gold-500); color: #4a3a08; }
.calc-insight a { color: var(--navy-700); font-weight: 600; text-decoration: underline; }
.calc-warn { background: #fdecec; border-left: 4px solid var(--red); color: #7a1414; }

.honesty-banner {
  background: var(--navy-900); color: #dbe6f2; border-left: 5px solid var(--gold-500);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.8rem;
  font-size: 0.9rem; line-height: 1.6;
}
.honesty-banner strong { color: var(--gold-400); }
.honesty-banner em { color: #fff; font-style: normal; font-weight: 600; }

/* ---------- Tables ---------- */
/* Wide tables scroll inside their own box rather than pushing the page sideways. */
.table-scroll {
  overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}
.calc-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 380px; }
.calc-table caption {
  text-align: left; font-weight: 700; color: var(--navy-800); font-size: 0.88rem;
  padding: 0.75rem 0.9rem; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.calc-table th, .calc-table td { padding: 0.55rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); }
.calc-table thead th { background: var(--bg-soft); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.calc-table td small { color: var(--muted); font-size: 0.74rem; }
.calc-table td.num, .calc-table th.num { text-align: right; white-space: nowrap; }
.calc-table tbody tr:last-child td { border-bottom: none; }
.calc-table .row-empty { color: var(--muted); opacity: 0.6; }
.calc-table .row-head td { background: var(--bg-soft); font-weight: 700; color: var(--navy-800); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
.calc-table .row-total td, .calc-table .row-total th {
  background: var(--navy-800); color: #fff; font-weight: 700; border-bottom: none;
}
.calc-table .row-total td:first-child { color: var(--gold-400); }
.calc-table tfoot th { background: var(--bg-soft); font-weight: 600; color: var(--navy-800); text-align: left; }
.calc-table tfoot th:last-child { text-align: right; }
.calc-table .line-strong td { font-weight: 700; color: var(--navy-800); background: #fbfcfe; }
.calc-table .line-muted td { color: var(--muted); font-size: 0.78rem; }
.calc-table .td-muted { color: var(--muted); font-size: 0.78rem; font-style: italic; }

/* ---------- Company name check list ---------- */
.check-list { margin: 1.2rem 0; }
.check {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.8rem 0.9rem;
  border-radius: 10px; margin-bottom: 0.6rem; border: 1px solid var(--line); background: #fff;
}
.check strong { display: block; font-size: 0.9rem; color: var(--navy-800); margin-bottom: 0.2rem; }
.check p { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }
.check-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700; color: #fff; margin-top: 0.1rem;
}
.check-pass { background: #f2fbf4; border-color: #b7e4c2; }
.check-pass .check-icon { background: #1a7f37; }
.check-fail { background: #fdecec; border-color: #f3b7b7; }
.check-fail .check-icon { background: var(--red); }
.check-warn { background: #fffaf0; border-color: #f0dda8; }
.check-warn .check-icon { background: var(--gold-500); }
.check-info { background: var(--bg-soft); }
.check-info .check-icon { background: var(--navy-600); }

.normalised { background: var(--bg-soft); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.normalised h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.normalised p { font-size: 0.83rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.5rem; }
.normalised-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem !important;
  font-weight: 700; color: var(--navy-800) !important; background: #fff; padding: 0.6rem 0.8rem;
  border-radius: 8px; border: 1px dashed var(--navy-600); word-break: break-all;
}
.official-links { margin-bottom: 1.2rem; }
.official-links h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.official-links li { font-size: 0.85rem; padding: 0.3rem 0; color: var(--muted); line-height: 1.5; }
.official-links a { color: var(--navy-700); font-weight: 600; text-decoration: underline; }
.official-links a:hover { color: var(--gold-500); }

/* ---------- Formula block ---------- */
.formula {
  background: var(--navy-900); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.2rem 0;
  border-left: 5px solid var(--gold-500);
}
.formula-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-400);
  font-size: 0.95rem; padding: 0.3rem 0; line-height: 1.5;
}

/* ---------- Guide prose ---------- */
.guide { max-width: 52rem; margin: 3rem auto 0; }
.guide h2 { margin: 2.2rem 0 0.9rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.guide h2:first-child { margin-top: 0; }
.guide h3 { margin: 1.7rem 0 0.6rem; color: var(--navy-700); font-size: 1.08rem; }
.guide p { margin-bottom: 0.9rem; color: var(--ink); line-height: 1.75; }
.guide strong { color: var(--navy-800); }
.guide a { color: var(--navy-700); font-weight: 600; text-decoration: underline; }
.guide a:hover { color: var(--gold-500); }
.guide-list { margin: 0 0 1.1rem; padding-left: 0; }
.guide-list li { position: relative; padding-left: 1.4rem; margin-bottom: 0.55rem; line-height: 1.7; }
.guide-list li::before { content: "—"; position: absolute; left: 0; color: var(--gold-500); font-weight: 700; }
.guide-list-num { counter-reset: g; }
.guide-list-num li { padding-left: 1.9rem; }
.guide-list-num li::before {
  counter-increment: g; content: counter(g); position: absolute; left: 0; top: 0.15rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--navy-800); color: var(--gold-400);
  font-size: 0.72rem; font-weight: 700; display: grid; place-items: center;
}
.guide .table-scroll { margin-top: 0.6rem; }

.disclaimer {
  font-size: 0.76rem; color: var(--muted); line-height: 1.6; padding-top: 0.9rem;
  border-top: 1px solid var(--line); margin-top: 0.5rem;
}

/* ---------- Cross-links ---------- */
.tool-links { max-width: 52rem; margin: 3rem auto 0; padding: 1.4rem 1.6rem; background: var(--bg-soft); border-radius: var(--radius); }
.tool-links h2 { font-size: 1.1rem; margin-bottom: 0.7rem; }
.tool-links li { padding: 0.35rem 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.tool-links a { color: var(--navy-700); font-weight: 600; }
.tool-links a:hover { color: var(--gold-500); text-decoration: underline; }

/* ---------- Lead card ----------
   leads.php renders .lead-card / .lead-row / .hp / .sr-only, but style.css
   defines none of them — it only has .hp-field. Without these the honeypot
   would be visible to real users and would poison every lead. Defined here
   with :where() so specificity stays at zero and a future global rule wins
   without a fight. */
:where(.lead-card) {
  max-width: 52rem; margin: 2.5rem auto 0; padding: 1.5rem 1.6rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #dbe6f2;
  border-left: 5px solid var(--gold-500);
}
:where(.lead-card h3) { color: #fff; margin-bottom: 0.4rem; font-size: 1.15rem; }
:where(.lead-card > p) { font-size: 0.9rem; line-height: 1.6; margin-bottom: 1rem; }
:where(.lead-row) { display: flex; gap: 0.6rem; flex-wrap: wrap; }
:where(.lead-row input) {
  flex: 1 1 15rem; padding: 0.75rem 1rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); background: #fff;
}
:where(.lead-row input:focus) { outline: none; box-shadow: 0 0 0 3px rgba(212,160,23,0.4); }
:where(.lead-row button) { flex: 0 0 auto; }
:where(.lead-note) { font-size: 0.75rem; color: #9fb2c6; margin-top: 0.7rem; line-height: 1.5; }
/* The honeypot must never be visible or focusable. */
:where(.hp) { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
:where(.sr-only) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Live-update affordance ---------- */
.calc-updating .calc-results { opacity: 0.55; transition: opacity 0.12s ease; }
.js-live .calc-submit-hint { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .calc-grid, .calc-grid-wide { grid-template-columns: 1fr; }
  .calc-inputs { position: static; }
}
@media (max-width: 560px) {
  .compare-cards { grid-template-columns: 1fr; }
  .calc-inputs, .calc-results { padding: 1.1rem; }
  .verdict { padding: 1rem; }
  .guide, .tool-links, .lead-card { margin-top: 2rem; }
  .calc-table { font-size: 0.8rem; }
  .calc-table th, .calc-table td { padding: 0.5rem 0.65rem; }
}

@media print {
  .calc-inputs, .lead-card, .tool-links, .site-header, .topbar, .whatsapp-float, .site-footer { display: none !important; }
  .calc-grid { grid-template-columns: 1fr; }
  .verdict { background: none !important; color: #000; border-left: 3px solid #000; }
  .verdict-amount, .verdict-lead, .verdict-detail { color: #000 !important; }
}
