@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'IBM Plex Sans', sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; }
a { color: #0369a1; text-decoration: none; }
a:hover { text-decoration: underline; }

nav { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 58px; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; font-size: 16px; color: #0f172a; letter-spacing: -0.3px; }
.brand a { color: #0f172a !important; }
nav .dl { background: #0369a1; color: #fff; font-weight: 600; font-size: 13px; padding: 8px 18px; border-radius: 6px; white-space: nowrap; }
nav .dl:hover { background: #0284c7; text-decoration: none; }
.app-badge { height: 28px; display: block; }

/* Calculator hero */
.calc-hero { background: #0f172a; color: #f1f5f9; padding: 56px 32px 48px; }
.calc-hero-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.calc-hero-text .eyebrow { font-size: 11px; font-weight: 700; color: #38bdf8; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.calc-hero-text h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 700; color: #f1f5f9; line-height: 1.1; letter-spacing: -0.5px; margin-bottom: 14px; }
.calc-hero-text h1 em { color: #38bdf8; font-style: normal; }
.calc-hero-text p { color: #94a3b8; font-size: 16px; line-height: 1.65; }

/* The calculator widget */
.calc-widget { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 28px; }
.calc-widget h3 { font-size: 11px; font-weight: 700; color: #38bdf8; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 11px; font-weight: 600; color: #94a3b8; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 6px; }
.input-group input { width: 100%; padding: 10px 12px; background: #0f172a; border: 1px solid #334155; border-radius: 6px; color: #f1f5f9; font-family: 'IBM Plex Mono', monospace; font-size: 15px; outline: none; transition: border-color 0.15s; }
.input-group input:focus { border-color: #38bdf8; }
.calc-output { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 20px; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.output-cell { }
.output-cell .val { font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 600; color: #38bdf8; line-height: 1; }
.output-cell .lbl { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }
.calc-note { font-size: 12px; color: #475569; margin-top: 14px; }

/* Mode toggle */
.mode-toggle { display: flex; gap: 4px; background: #0f172a; border-radius: 6px; padding: 3px; margin-bottom: 20px; }
.mode-btn { flex: 1; padding: 8px; font-size: 12px; font-weight: 600; color: #64748b; border: none; background: transparent; cursor: pointer; border-radius: 4px; transition: all 0.15s; font-family: 'IBM Plex Sans', sans-serif; }
.mode-btn.active { background: #1e293b; color: #38bdf8; }

/* Sections */
.wrap { max-width: 900px; margin: 0 auto; padding: 0 32px; }
section { padding: 52px 0; border-bottom: 1px solid #e2e8f0; }
section:last-child { border-bottom: none; }
.label { font-size: 11px; font-weight: 700; color: #0369a1; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
h2 { font-size: clamp(20px, 3vw, 30px); font-weight: 700; color: #0f172a; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.3px; }
p { font-size: 15.5px; color: #334155; margin-bottom: 14px; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

/* Reference table */
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 20px 0; }
th { background: #f1f5f9; color: #64748b; font-weight: 600; text-align: left; padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 2px solid #e2e8f0; }
td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; }
td.y { color: #059669; font-weight: 600; }
td.n { color: #94a3b8; }
tr:hover td { background: #f8fafc; }

/* Callout */
.callout { background: #eff6ff; border-left: 3px solid #0369a1; padding: 18px 22px; border-radius: 0 6px 6px 0; margin: 20px 0; }
.callout p { color: #1e40af; font-size: 15px; }
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
details { border-bottom: 1px solid #e2e8f0; }
details:last-child { border-bottom: none; }
summary { padding: 16px 0; cursor: pointer; font-weight: 600; font-size: 15px; color: #0f172a; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::before { content: '+'; font-weight: 700; color: #0369a1; font-size: 18px; flex-shrink: 0; transition: transform 0.2s; }
details[open] summary::before { transform: rotate(45deg); }
.faq-ans { padding: 0 0 18px 26px; font-size: 15px; color: #475569; line-height: 1.7; }

/* CTA */
.cta { background: #0f172a; color: #f1f5f9; padding: 52px 32px; text-align: center; }
.cta h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); margin-bottom: 10px; letter-spacing: -0.3px; }
.cta p { color: #94a3b8; margin-bottom: 0; font-size: 16px; }
.badge-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.cta-note { font-size: 13px; color: #475569; margin-top: 8px !important; }

footer { background: #f1f5f9; border-top: 1px solid #e2e8f0; padding: 24px 32px; }
footer .inner { max-width: 900px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #64748b; }
footer a { color: #0369a1; }

@media(max-width:720px) {
  .calc-hero-inner { grid-template-columns: 1fr; }
  .calc-output { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 0 20px; }
  nav { padding: 0 20px; }
}
