/* ============================================================
   SIGMA TECH INDIA — BANKING TOOLKIT (PREMIUM VARIANT)
   Shared chrome for the editorial calculator pages
   (emi, fd, compound-interest, prepayment): serif KPIs,
   glass panels, 2-col results. Extracted from their common CSS.
   Page-specific rules + :root vars remain inline per page.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy-grad);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.55;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background-image:
    radial-gradient(900px 700px at 18% 8%, rgba(111, 168, 214, 0.10), transparent 60%),
    radial-gradient(700px 600px at 90% 90%, rgba(201, 171, 122, 0.45), transparent 60%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: ''; position: fixed; inset: 0; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px; pointer-events: none; z-index: 9999;
}
a { color: inherit; text-decoration: none; }
/* topbar */
header.topbar {
  position: relative; z-index: 5;
  background: rgba(10, 10, 14, 0.75);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 18px 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-weight: 700;
  color: var(--navy-900); font-size: 22px;
  letter-spacing: -0.03em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 6px 18px rgba(111, 168, 214, 0.25);
}
.brand-text { line-height: 1.15; }
.brand-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
}
.brand-text p {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--gold); margin-top: 4px;
}
.topbar-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text-soft);
  padding: 9px 16px; border-radius: 9px;
  border: 1px solid var(--line);
  transition: all 0.18s ease;
}
.topbar-back:hover { color: var(--text); border-color: var(--line-bright); background: rgba(255,255,255,0.04); }
@media (max-width: 720px) {
  .topbar-inner { padding: 14px 18px; gap: 12px; }
  .brand-text p { display: none; }
  .topbar-back { padding: 8px 12px; }
}
/* main */
main {
  max-width: 1280px; margin: 0 auto;
  padding: 44px 36px 28px;
  position: relative; z-index: 2;
}
.page-head { margin-bottom: 32px; position: relative; }
.page-head > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold);
  padding: 6px 14px;
  border: 1px solid rgba(111, 168, 214, 0.35);
  border-radius: 999px;
  background: var(--gold-soft);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 10px rgba(111, 168, 214, 0.7);
}
.page-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5.2vw, 56px);
  font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.04; margin-bottom: 12px;
}
.page-head h2 em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.workbench {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 24px; align-items: start;
}
@media (max-width: 1024px) { .workbench { grid-template-columns: 1fr; } }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.panel-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.panel-head::after {
  content: ''; position: absolute;
  left: 26px; right: 26px; bottom: -1px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(111, 168, 214, 0.45) 50%, transparent);
}
.panel-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.012em;
  display: flex; align-items: center; gap: 12px;
}
.panel-head h3 .num {
  font-style: italic; font-size: 18px;
  color: var(--gold); font-weight: 600;
  letter-spacing: 0.02em;
}
.panel-head p {
  margin-top: 4px; font-size: 13px;
  color: var(--text-muted); padding-left: 36px;
}
.panel-body { padding: 24px 26px 26px; }
/* inputs (shared style with compound) */
.field { margin-bottom: 16px; }
.field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 8px;
}
.field-label .hint {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em; text-transform: none;
  color: var(--text-muted);
}
.input-shell {
  position: relative;
  display: flex; align-items: stretch;
  background: rgba(10, 10, 14, 0.5);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.input-shell:focus-within {
  border-color: var(--gold);
  background: rgba(10, 10, 14, 0.7);
  box-shadow: 0 0 0 4px rgba(111, 168, 214, 0.12);
}
.input-shell .prefix, .input-shell .suffix {
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 14px; font-weight: 600;
  color: var(--gold);
  background: rgba(111, 168, 214, 0.06);
  pointer-events: none;
}
.input-shell .prefix { border-right: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); }
.input-shell input, .input-shell select {
  flex: 1;
  background: transparent; border: 0; outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.005em;
  padding: 13px 14px;
  font-variant-numeric: tabular-nums;
  width: 100%;
}
.input-shell input::placeholder { color: var(--text-dim); font-weight: 500; }
.input-shell select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d4a64a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.input-shell select option { background: var(--navy-900); color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 0; cursor: pointer;
  font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
}
.btn-primary {
  background: var(--gold-grad);
  color: var(--navy-900);
  flex: 1;
  box-shadow: 0 8px 24px rgba(111, 168, 214, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(111, 168, 214, 0.42); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-bright); background: rgba(255,255,255,0.08); }
.kpi {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.kpi-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); margin-bottom: 8px;
}
.kpi-sub { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.kpi--accent .kpi-val { color: var(--gold-bright); }
/* schedule */
.schedule {
  padding: 22px 26px 28px;
}
.schedule-head h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.015em;
}
.schedule-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.schedule-table thead th {
  background: rgba(10, 10, 14, 0.65);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  backdrop-filter: blur(6px);
}
.schedule-table thead th:first-child { text-align: left; }
.schedule-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px dashed var(--line);
  text-align: right;
  color: var(--text-soft);
}
.schedule-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table tbody tr.final {
  background: rgba(111, 168, 214, 0.07);
}
.schedule-table tbody tr.final td { color: var(--gold-bright); font-weight: 600; }
.error {
  display: none;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #fca5a5;
  border-radius: var(--radius);
  font-size: 13px;
}
.error.show { display: block; }
.band {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}
.band a { color: var(--gold); }
footer.appbar {
  margin-top: 32px;
  padding: 24px 36px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  position: relative; z-index: 2;
}
footer.appbar a { color: var(--gold); }
