/* =====================================================
   Kalkulator.my — shared design system
   Edit this file once → every calculator page updates.
   ===================================================== */

:root {
  --paper: #F6F1E8;
  --paper-2: #EFE7D6;
  --ink: #0F1B2D;
  --ink-soft: #2A3548;
  --muted: #6B6457;
  --line: #D9CFB9;
  --ochre: #C8742C;
  --ochre-deep: #A85B1C;
  --teal: #0E5C5F;
  --green-soft: #2F6E4C;
  --red-soft: #B23A3A;
  --white: #FFFCF6;
  --shadow: 0 1px 2px rgba(15,27,45,.04), 0 8px 32px rgba(15,27,45,.06);
  --shadow-lg: 0 2px 4px rgba(15,27,45,.06), 0 24px 48px rgba(15,27,45,.10);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 800px 400px at 80% -10%, rgba(200,116,44,.08), transparent 60%),
    radial-gradient(ellipse 600px 500px at 0% 30%, rgba(14,92,95,.06), transparent 60%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
main, header, footer { position: relative; z-index: 1; }

/* ============ NAV ============ */
header.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(246,241,232,.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ochre-deep); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ============ HERO ============ */
.hero {
  max-width: 1180px; margin: 0 auto;
  padding: 64px 28px 32px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre-deep);
  font-weight: 600;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: var(--ochre-deep);
}
h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 16ch;
}
h1 em {
  font-style: italic;
  color: var(--ochre);
  font-weight: 400;
}
.hero p.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 8px;
}

/* ============ CALCULATOR SHELL ============ */
.calc-shell {
  max-width: 1180px; margin: 32px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-shell { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ============ FORM FIELDS ============ */
.field { margin-bottom: 22px; }
.field label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field label .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix, .input-suffix {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.input-wrap input[type="number"],
.input-wrap select {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
  -moz-appearance: textfield;
  appearance: none;
}
.input-wrap select {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236B6457' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.input-wrap.has-suffix input[type="number"] {
  padding-right: 44px;
}
.input-wrap.no-prefix input[type="number"],
.input-wrap.no-prefix select {
  padding-left: 16px;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input:focus,
.input-wrap select:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(15,27,45,.08);
}

.range-row {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px;
}
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--ochre);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px var(--ochre);
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--ochre);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px var(--ochre);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--paper);
  padding: 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.segmented.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.segmented button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all .15s;
}
.segmented button.active {
  background: var(--ink);
  color: var(--paper);
}

/* ============ RESULT PANEL ============ */
.result {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: 40px;
  position: sticky;
  top: 92px;
  overflow: hidden;
}
.result::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,116,44,.18), transparent 60%);
  pointer-events: none;
}
.result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(246,241,232,.6);
  margin-bottom: 12px;
}
.result-amount {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.result-amount .currency {
  font-size: 0.45em;
  vertical-align: 0.4em;
  margin-right: 6px;
  color: var(--ochre);
  font-style: italic;
}
.result-period {
  color: rgba(246,241,232,.7);
  font-size: 14px;
  margin-bottom: 32px;
}
.result-divider {
  height: 1px;
  background: rgba(246,241,232,.15);
  margin: 28px 0;
}
.result-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0;
  font-size: 14px;
}
.result-row .key { color: rgba(246,241,232,.65); }
.result-row .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--paper);
  text-align: right;
  white-space: nowrap;
}
.result-row .val.accent { color: var(--ochre); }
.result-row .val.green { color: #6BD49A; }

.breakdown-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  margin: 20px 0 8px;
  background: rgba(246,241,232,.12);
}
.breakdown-bar > div { transition: width .3s ease; }
.breakdown-bar .principal { background: var(--paper); }
.breakdown-bar .interest  { background: var(--ochre); }
.breakdown-bar .seg-1     { background: var(--paper); }
.breakdown-bar .seg-2     { background: var(--ochre); }
.breakdown-bar .seg-3     { background: #6BD49A; }
.breakdown-bar .seg-4     { background: var(--teal); }
.breakdown-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px;
  color: rgba(246,241,232,.7);
}
.breakdown-legend .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

/* ============ AD SLOT ============ */
.ad-slot {
  max-width: 1180px;
  margin: 48px auto 0;
  padding: 0 28px;
}
.ad-box {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.ad-box strong { color: var(--ink-soft); display: block; margin-bottom: 4px; }

/* ============ CONTENT SECTIONS ============ */
.content {
  max-width: 760px;
  margin: 80px auto 0;
  padding: 0 28px;
}
.content h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin: 32px 0 8px;
}
.content p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 16px;
}
.content ul, .content ol {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  padding-left: 24px;
}
.content ul li, .content ol li { margin-bottom: 6px; }
.content strong { color: var(--ink); }

.formula-box {
  background: var(--white);
  border-left: 3px solid var(--ochre);
  border-radius: var(--r-sm);
  padding: 20px 24px;
  margin: 20px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow-x: auto;
  line-height: 1.8;
}
.formula-box .label {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre-deep);
  margin-bottom: 10px;
  font-weight: 600;
}

/* ============ RATES TABLE ============ */
.rates-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 14px;
}
.rates-table th, .rates-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.rates-table th {
  background: var(--paper-2);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.rates-table td {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-soft);
}
.rates-table tr:last-child td { border-bottom: none; }
.rates-table tr:hover td { background: rgba(200,116,44,.04); }

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: 'Fraunces', serif;
  font-size: 28px;
  color: var(--ochre);
  font-weight: 300;
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 0 22px;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ============ RELATED CARDS ============ */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: block;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ochre);
}
.related-card .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre-deep);
  font-weight: 600;
  margin-bottom: 8px;
}
.related-card h4 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 6px;
}
.related-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ============ AFFILIATE CTA ============ */
.affiliate-cta {
  background: linear-gradient(135deg, var(--paper-2), var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  margin: 40px 0;
}
.affiliate-cta .tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--teal); font-weight: 600; margin-bottom: 8px;
}
.affiliate-cta h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: 22px;
  margin: 0 0 8px;
}
.affiliate-cta p { margin: 0 0 16px; }
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s;
}
.btn:hover { background: var(--ochre-deep); }

/* ============ FOOTER ============ */
footer {
  margin-top: 96px;
  padding: 48px 28px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  font-size: 13px; color: var(--muted);
}
.footer-inner a { color: var(--ink-soft); text-decoration: none; margin-right: 18px; }
.footer-inner a:hover { color: var(--ochre-deep); }

.disclaimer {
  max-width: 760px;
  margin: 48px auto 0;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

/* ============ HOMEPAGE GRID ============ */
.tools-grid {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: "→";
  position: absolute;
  bottom: 24px; right: 24px;
  font-size: 24px;
  color: var(--ochre);
  transition: transform .2s;
  font-family: 'Fraunces', serif;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ochre);
}
.tool-card:hover::after { transform: translateX(4px); }
.tool-card .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.tool-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.tool-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  padding-right: 32px;
}

/* =====================================================
   PROFESSIONAL HOMEPAGE — additions (May 2026)
   ===================================================== */

/* ---------- NAV CTA ---------- */
.nav-inner { gap: 24px; }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ochre-deep); transform: translateY(-1px); }
@media (max-width: 720px) { .nav-cta { display: none; } }

/* ---------- HERO PRO (split layout) ---------- */
.hero-pro {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 56px;
}
@media (max-width: 960px) {
  .hero-pro { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
}
.hero-pro h1 { max-width: 14ch; }
.hero-pro p.lede { margin-bottom: 28px; }

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  font-size: 15px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex; align-items: center;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--ochre-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 22px;
  font-size: 15px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: border-color .2s, color .2s, background .2s;
  display: inline-flex; align-items: center;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--white); }

.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  padding: 14px 22px;
  font-size: 15px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(246,241,232,.25);
  transition: border-color .2s, background .2s;
  display: inline-flex; align-items: center;
}
.btn-ghost-light:hover { border-color: var(--paper); background: rgba(246,241,232,.06); }

.trust-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  max-width: 480px;
}
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item strong {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.trust-item span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.trust-divider { width: 1px; height: 32px; background: var(--line); }

/* ---------- HERO CARD (visual preview) ---------- */
.hero-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transform: rotate(0.6deg);
  transition: transform .4s ease;
}
.hero-card:hover { transform: rotate(0deg) translateY(-3px); }
.hero-card::before {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(200,116,44,.22), transparent 60%);
  pointer-events: none;
}
.hero-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: rgba(246,241,232,.04);
  border-bottom: 1px solid rgba(246,241,232,.08);
}
.hero-card-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(246,241,232,.18);
}
.hero-card-dot:first-child { background: var(--ochre); }
.hero-card-title {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(246,241,232,.5);
}
.hero-card-body { padding: 28px 32px 32px; position: relative; z-index: 1; }
.hero-card-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  font-size: 13px;
  color: rgba(246,241,232,.65);
}
.hero-card-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
}
.hero-card-divider {
  height: 1px;
  background: rgba(246,241,232,.12);
  margin: 16px 0 20px;
}
.hero-card-result { display: flex; flex-direction: column; gap: 6px; }
.hero-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(246,241,232,.55);
  font-weight: 600;
}
.hero-card-amount {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.hero-card-amount em {
  font-style: italic;
  font-size: 0.45em;
  color: var(--ochre);
  vertical-align: 0.5em;
  margin-right: 6px;
  font-weight: 400;
}
.hero-card-foot {
  font-size: 12px;
  color: rgba(246,241,232,.55);
}
.hero-card-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 22px;
  background: rgba(246,241,232,.1);
}
.hero-card-bar > div:nth-child(1) { background: var(--paper); }
.hero-card-bar > div:nth-child(2) { background: var(--ochre); }
.hero-card-bar > div:nth-child(3) { background: #6BD49A; }

/* ---------- AUTHORITY STRIP ---------- */
.authority-strip {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.authority-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}
.authority-list {
  display: flex; gap: 28px; flex-wrap: wrap;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
  font-weight: 500;
}
.authority-list span { position: relative; }
.authority-list span:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -18px; top: 0;
  color: var(--line);
  font-style: normal;
}

/* ---------- SECTION HEADERS ---------- */
.section-head {
  max-width: 1180px;
  margin: 96px auto 32px;
  padding: 0 28px;
}
.section-head-center {
  text-align: center;
  margin-bottom: 48px;
}
.section-head-center .section-eyebrow { justify-content: center; }
.section-head-center .section-eyebrow::before { display: none; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ochre-deep);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: var(--ochre-deep);
}
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 22ch;
  color: var(--ink);
}
.section-head-center .section-title { margin-left: auto; margin-right: auto; }
.section-lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* ---------- TOOL CARDS — enhanced ---------- */
.tool-card {
  position: relative;
}
.tool-card::after { display: none; } /* remove old arrow, replaced by tool-link */
.tool-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ochre-deep);
  display: grid; place-items: center;
  margin-bottom: 18px;
  transition: background .2s, color .2s;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-card:hover .tool-icon { background: var(--ochre); color: var(--white); }
.tool-icon-soft { background: var(--paper-2); color: var(--muted); }
.tool-link {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ochre-deep);
  letter-spacing: 0.02em;
  display: inline-block;
}
.tool-link-muted { color: var(--muted); }
.tool-card-soon {
  background: var(--paper);
  border-style: dashed;
  cursor: default;
}
.tool-card-soon:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.tag-muted { color: var(--muted) !important; }

/* ---------- FEATURES ---------- */
.features {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ochre);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
.feature p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- HOW IT WORKS / STEPS ---------- */
.how-it-works {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
  margin-top: 8px;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--ochre);
}
.step-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  color: var(--ochre);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}
.step h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- FAQ SECTION ---------- */
.faq-section {
  margin-top: 0;
}
.faq-section .section-head {
  margin: 96px auto 24px;
  padding: 0;
}

/* ---------- CTA BAND ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  margin-top: 96px;
  padding: 72px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 80% 20%, rgba(200,116,44,.18), transparent 60%),
    radial-gradient(ellipse 500px 300px at 10% 90%, rgba(14,92,95,.18), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.cta-band h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--paper);
}
.cta-band p {
  font-size: 17px;
  color: rgba(246,241,232,.75);
  margin: 0 0 28px;
}
.cta-actions {
  display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}
.cta-actions .btn-primary { background: var(--ochre); color: var(--ink); }
.cta-actions .btn-primary:hover { background: var(--paper); color: var(--ink); }

/* ---------- CONTENT PRO ---------- */
.content-pro {
  margin-top: 96px;
}
.content-pro .section-eyebrow { margin-bottom: 12px; }
.content-pro h2:first-of-type { margin-top: 0; }

/* ---------- FOOTER PRO ---------- */
.footer-pro {
  margin-top: 96px;
  padding: 72px 28px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 36ch;
}
.footer-meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.footer-col h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 16px;
}
.footer-col a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  margin: 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--ochre-deep); }
.footer-base {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.footer-disclaimer { font-style: italic; }

/* ---------- INDEPENDENCE BANNER ---------- */
.indie-banner {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 13px;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 60;
}
.indie-banner a {
  color: var(--ochre);
  text-decoration: none;
  font-weight: 600;
}
.indie-banner a:hover { text-decoration: underline; }
.indie-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6BD49A;
  box-shadow: 0 0 0 4px rgba(107,212,154,.18);
  display: inline-block;
}
@media (max-width: 560px) { .indie-banner { font-size: 12px; padding: 9px 14px; } }

/* ---------- AUTHORITY LINK ---------- */
.authority-link {
  margin-left: auto;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ochre-deep);
  text-decoration: none;
  white-space: nowrap;
}
.authority-link:hover { color: var(--ink); }

/* ---------- COMPARISON TABLE ---------- */
.comparison {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.comparison .section-head { margin-top: 96px; padding: 0; }
.compare-table {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 8px;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.compare-row:last-child { border-bottom: none; }
.compare-feat {
  padding: 18px 24px;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
}
.compare-col {
  padding: 18px 20px;
  font-size: 13.5px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.compare-us { background: rgba(200,116,44,.04); }
.compare-head .compare-col { padding: 22px 16px; }
.compare-brand {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.compare-brand-them {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}
.compare-mark {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}
.compare-mark.good { color: var(--green-soft); }
.compare-mark.bad  { color: var(--red-soft); }
.compare-mark.neutral { color: var(--muted); font-weight: 500; font-style: italic; font-size: 12.5px; }
.compare-mark.good::before { content: "✓"; font-size: 14px; }
.compare-mark.bad::before  { content: "✕"; font-size: 14px; }

@media (max-width: 720px) {
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-feat {
    grid-column: 1 / -1;
    background: var(--paper-2);
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
  }
  .compare-head .compare-feat { display: none; }
  .compare-col { border-left: 1px solid var(--line); padding: 14px 12px; font-size: 12.5px; }
  .compare-col:first-of-type { border-left: none; }
}

/* ---------- META BAR (last updated, source, share) ---------- */
.meta-bar {
  max-width: 1180px;
  margin: 0 auto 20px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.meta-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.meta-chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6BD49A;
}
.meta-chip-source {
  color: var(--ochre-deep);
  border-color: rgba(200,116,44,.3);
  background: rgba(200,116,44,.05);
  cursor: pointer;
}
.meta-chip-source:hover { background: rgba(200,116,44,.12); }
.meta-bar-spacer { flex: 1; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .15s;
}
.share-btn:hover { background: var(--ochre-deep); transform: translateY(-1px); }
.share-btn.copied { background: var(--green-soft); }
.share-btn svg { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .meta-bar { padding: 12px 16px; gap: 8px; }
  .meta-chip { font-size: 11px; padding: 5px 9px; }
}

/* ---------- FORMULA REVEAL (in result panel) ---------- */
.formula-reveal {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(246,241,232,.15);
}
.formula-reveal summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(246,241,232,.6);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.formula-reveal summary::-webkit-details-marker { display: none; }
.formula-reveal summary::after {
  content: "+";
  color: var(--ochre);
  font-size: 16px;
  font-weight: 400;
}
.formula-reveal[open] summary::after { content: "−"; }
.formula-reveal .formula-body {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(246,241,232,.06);
  border-radius: var(--r-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(246,241,232,.9);
  border-left: 2px solid var(--ochre);
}
.formula-reveal .source-link {
  display: inline-block;
  margin-top: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: var(--ochre);
  text-decoration: none;
  font-weight: 600;
}
.formula-reveal .source-link:hover { text-decoration: underline; }

/* ---------- MOBILE TWEAKS ---------- */
@media (max-width: 720px) {
  .hero-pro { padding-top: 40px; }
  .trust-bar { padding: 16px; gap: 16px; }
  .trust-item strong { font-size: 22px; }
  .section-head { margin-top: 64px; }
  .cta-band { margin-top: 64px; padding: 56px 24px; }
  .footer-pro { margin-top: 64px; padding: 56px 24px 24px; }
  .authority-strip { gap: 14px; padding: 20px; }
  .authority-list { gap: 18px; font-size: 15px; }
  .authority-list span:not(:last-child)::after { right: -12px; }
}

/* ============================================================
   PRINT STYLESHEET
   When a user prints a calculator page, give them a clean
   document with just the result panel, the formula, and a
   small footer attribution. Hide chrome, ads, feedback, etc.
   ============================================================ */
@media print {
  /* Strip site chrome and noise */
  .indie-banner,
  .nav,
  .meta-bar,
  .meta-bar-inner,
  .share-btn,
  .ad-slot,
  .affiliate-cta,
  .footer-pro,
  .related-grid,
  .compare-table,
  .comparison,
  .cta-band,
  .kalk-fb-btn,
  .kalk-rater,
  .kalk-consent,
  .stale-banner {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11pt;
  }

  main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hero, .hero-pro {
    padding: 0 0 0.6cm 0 !important;
    border-bottom: 1px solid #aaa;
  }
  .hero h1, .hero-pro h1 { font-size: 18pt; margin: 0 0 0.2cm; }
  .hero .lede { font-size: 11pt; color: #333; }

  /* Stack calculator inputs + result in print */
  .calc-shell {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  .card, .result {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin: 0.4cm 0;
    padding: 0.5cm !important;
  }

  details.formula-reveal[open] .formula-body { display: block !important; }
  details.formula-reveal { page-break-inside: avoid; }
  details.schedule-wrap { display: none; } /* schedule is too large for print */

  /* Make sure the "show the work" formula prints even if collapsed */
  .formula-box { border: 1px solid #888; padding: 0.3cm; }

  /* Print footer attribution */
  main::after {
    content: "Source: kalkulator.my  ·  Estimate only — not financial advice  ·  © 2026 Kalkulator.my";
    display: block;
    margin-top: 0.6cm;
    padding-top: 0.3cm;
    border-top: 1px solid #aaa;
    font-size: 9pt;
    color: #555;
    text-align: center;
  }

  a, a:link, a:visited {
    color: #000 !important;
    text-decoration: underline;
  }
  /* Hide anchor URLs except for source links */
  a[href]:not(.source-link)::after { content: ""; }

  /* Keep result amounts large and centred */
  .result-amount { font-size: 22pt !important; }
  .result-label { font-size: 10pt; text-transform: uppercase; letter-spacing: 0.05em; }
}
