/* ═══════════════════════════════════════
   COMPOUNZA — Fluid Responsive Stylesheet
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Geist+Mono:wght@400;500;600;700&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: clamp(14px, 0.875rem + 0.25vw, 16px); }

/* ── FLUID SPACING SCALE ── */
:root {
  --sp-xs:  clamp(6px,  1vw,  8px);
  --sp-sm:  clamp(10px, 2vw,  14px);
  --sp-md:  clamp(14px, 3vw,  20px);
  --sp-lg:  clamp(20px, 4vw,  32px);
  --sp-xl:  clamp(28px, 5vw,  48px);
  --sp-2xl: clamp(40px, 6vw,  72px);
  --pad:    clamp(12px, 4vw,  24px);
  --radius: clamp(10px, 2vw,  16px);
}

/* ── TOKENS ── */
[data-theme="light"] {
  --bg:          #f8f9fb;
  --surface:     #ffffff;
  --surface2:    #f2f4f7;
  --surface3:    #e8edf2;
  --border:      #e2e8f0;
  --border2:     #cbd5e0;
  --text:        #0d1117;
  --text2:       #374151;
  --text3:       #6b7280;
  --text4:       #9ca3af;
  --accent:      #0d9e6e;
  --accent-glow: rgba(13, 158, 110, 0.15);
  --accent2:     #0077cc;
  --accent3:     #d97706;
  --accent4:     #7c3aed;
  --danger:      #dc2626;
  --nav:         rgba(248, 249, 251, 0.94);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --chip-bg:     #e8f5f0;
  --chip-text:   #0d9e6e;
}
[data-theme="dark"] {
  --bg:          #080b10;
  --surface:     #0d1117;
  --surface2:    #141920;
  --surface3:    #1c232e;
  --border:      #1e2733;
  --border2:     #2a3546;
  --text:        #f0f4ff;
  --text2:       #c8d0e0;
  --text3:       #8e99b0;
  --text4:       #6b7a96;
  --accent:      #10d47e;
  --accent-glow: rgba(16, 212, 126, 0.12);
  --accent2:     #3b9eff;
  --accent3:     #f59e0b;
  --accent4:     #a78bfa;
  --danger:      #f87171;
  --nav:         rgba(8, 11, 16, 0.96);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --chip-bg:     rgba(16, 212, 126, 0.1);
  --chip-text:   #10d47e;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ══ NAV ══ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  height: clamp(52px, 8vw, 60px);
  display: flex; align-items: center;
  padding: 0 var(--pad);
  transition: background 0.3s, border-color 0.3s;
  transform: translateZ(0); isolation: isolate;
  width: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.nav-logo  { height: clamp(22px, 4vw, 28px); width: auto; }
.nav-wordmark { font-size: clamp(15px, 2.5vw, 17px); font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.nav-wordmark span { color: var(--accent); }
.nav-divider { width: 1px; height: 22px; background: var(--border); margin: 0 clamp(8px, 2vw, 16px); flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px clamp(8px, 1.5vw, 12px);
  font-size: clamp(12px, 1.5vw, 14px); font-weight: 500;
  color: var(--text3); text-decoration: none;
  border-radius: 8px; white-space: nowrap; transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--accent); background: var(--accent-glow); font-weight: 600; }
.nav-link .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; display: none; }
.nav-link.active .dot { display: block; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.theme-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: 'Geist Mono', monospace; color: var(--text3); transition: all 0.15s; white-space: nowrap;
}
.theme-btn:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }
.theme-icon { font-size: 13px; }
.hamburger { display: none; }
.mobile-menu { display: none; }

/* ══ HERO ══ */
.hero { text-align: center; padding: var(--sp-2xl) var(--pad); position: relative; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.hero-logo { display: block; margin: 0 auto var(--sp-lg); width: clamp(100px, 25vw, 180px); height: auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip-bg); color: var(--chip-text);
  border-radius: 100px; padding: 5px 14px;
  font-size: clamp(11px, 1.5vw, 13px); font-weight: 600;
  font-family: 'Geist Mono', monospace; letter-spacing: 0.04em; margin-bottom: var(--sp-md);
}
.hero h1 { font-size: clamp(26px, 6vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: var(--sp-md); }
.hero h1 .hi { color: var(--accent); }
.hero-sub { font-size: clamp(14px, 2vw, 17px); color: var(--text3); max-width: min(520px, 90%); margin: 0 auto var(--sp-lg); line-height: 1.6; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: clamp(10px, 2vw, 13px) clamp(18px, 4vw, 28px);
  border-radius: 10px; font-size: clamp(14px, 2vw, 15px); font-weight: 600;
  transition: all 0.2s; box-shadow: 0 4px 14px rgba(13,158,110,0.35);
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13,158,110,0.45); }

/* ══ SECTION HEAD ══ */
.section-head { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad) var(--sp-md); }
.section-head h2 { font-size: clamp(18px, 3vw, 24px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.section-head p  { font-size: clamp(13px, 1.5vw, 14px); color: var(--text3); }

/* ══ CALC GRID (homepage) ══ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: clamp(10px, 2vw, 16px);
  padding: 0 var(--pad) var(--sp-2xl);
  max-width: 1200px; margin: 0 auto;
}
.calc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px); text-decoration: none; color: var(--text);
  transition: all 0.2s; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
}
.calc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--card-accent, var(--accent));
  border-radius: var(--radius) var(--radius) 0 0; opacity: 0; transition: opacity 0.2s;
}
.calc-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.15); transform: translateY(-2px); border-color: var(--border2); }
.calc-card:hover::before { opacity: 1; }
.card-icon  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.card-title { font-size: clamp(14px, 2vw, 16px); font-weight: 600; }
.card-desc  { font-size: clamp(12px, 1.5vw, 13.5px); color: var(--text3); line-height: 1.5; }
.card-arrow { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ══ INFO SECTION ══ */
.info-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--sp-2xl) var(--pad); }
.info-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--sp-xl); align-items: center;
}
.info-text h2 { font-size: clamp(20px, 3.5vw, 30px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: var(--sp-sm); }
.info-text p  { font-size: clamp(13px, 1.5vw, 15px); color: var(--text3); line-height: 1.7; margin-bottom: 10px; }
.info-stats   { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2vw, 16px); }
.stat-card    { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(14px, 2vw, 20px); }
.stat-num     { font-size: clamp(22px, 3.5vw, 28px); font-weight: 700; color: var(--accent); font-family: 'Geist Mono', monospace; }
.stat-label   { font-size: clamp(11px, 1.5vw, 13px); color: var(--text3); margin-top: 4px; }

/* ══ FOOTER ══ */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: var(--sp-xl) var(--pad); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: clamp(24px, 4vw, 48px); }
.footer-brand p { font-size: clamp(12px, 1.5vw, 13.5px); color: var(--text3); line-height: 1.6; margin-top: 10px; max-width: 280px; }
.footer-col h4  { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text4); margin-bottom: 12px; }
.footer-col a   { display: block; color: var(--text3); text-decoration: none; font-size: clamp(12px, 1.5vw, 13.5px); margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: var(--sp-lg) auto 0; padding-top: var(--sp-md); border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: clamp(11px, 1.5vw, 12.5px); color: var(--text4); }

/* ══ CALC PAGE HEADER ══ */
.calc-page-header { padding: var(--sp-xl) var(--pad) var(--sp-lg); max-width: 1200px; margin: 0 auto; border-bottom: 1px solid var(--border); }
.calc-page-header .breadcrumb { font-size: clamp(11px, 1.5vw, 12px); color: var(--text4); font-family: 'Geist Mono', monospace; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.calc-page-header .breadcrumb a { color: var(--text4); text-decoration: none; transition: color 0.15s; }
.calc-page-header .breadcrumb a:hover { color: var(--accent); }
.calc-page-header h1 { font-size: clamp(20px, 4vw, 28px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.calc-page-header p  { font-size: clamp(13px, 1.5vw, 14px); color: var(--text3); }

/* ══ CALC LAYOUT ══ */
.calc-layout {
  max-width: 1200px; margin: 0 auto;
  padding: var(--sp-lg) var(--pad) var(--sp-2xl);
  display: grid;
  grid-template-columns: clamp(260px, 30%, 360px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: start; width: 100%;
}

/* ══ INPUT PANEL ══ */
.input-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow);
  position: sticky; top: 76px; min-width: 0; width: 100%;
}
.panel-header { padding: clamp(12px, 2vw, 16px) clamp(14px, 2vw, 20px); border-bottom: 1px solid var(--border); background: var(--surface2); display: flex; align-items: center; justify-content: space-between; }
.panel-title  { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text3); font-family: 'Geist Mono', monospace; }
.fields       { padding: clamp(14px, 2.5vw, 20px); display: flex; flex-direction: column; gap: clamp(14px, 2.5vw, 20px); width: 100%; }
.field-group  { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; }
.field-label  { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.field-name   { font-size: clamp(12px, 1.8vw, 14px); font-weight: 600; color: var(--text2); }
.field-value  { font-size: clamp(12px, 1.8vw, 14px); font-weight: 700; font-family: 'Geist Mono', monospace; color: var(--text); }

.num-input-wrap {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden; transition: border-color 0.15s;
  width: 100%; min-width: 0;
}
.num-input-wrap:focus-within { border-color: var(--accent); }
.num-input-prefix, .num-input-suffix {
  padding: 0 clamp(8px, 1.5vw, 10px);
  font-size: clamp(12px, 1.8vw, 14px); font-weight: 600;
  font-family: 'Geist Mono', monospace; color: var(--text3);
  background: var(--surface2); border-right: 1px solid var(--border);
  height: clamp(36px, 5vw, 40px); display: flex; align-items: center; flex-shrink: 0;
}
.num-input-suffix { border-right: none; border-left: 1px solid var(--border); }

input[type="number"] {
  flex: 1; border: none; background: transparent;
  padding: 0 clamp(8px, 1.5vw, 12px); height: clamp(36px, 5vw, 40px);
  font-family: 'Geist Mono', monospace; font-size: clamp(13px, 2vw, 15px); font-weight: 700;
  color: var(--text); outline: none; -moz-appearance: textfield; min-width: 0; width: 100%;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ══ SLIDER ══ */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill, 0%), var(--surface3) var(--fill, 0%), var(--surface3) 100%);
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: clamp(14px, 3vw, 16px); height: clamp(14px, 3vw, 16px);
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow); cursor: pointer; transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }

.range-limits { display: flex; justify-content: space-between; font-size: clamp(10px, 1.5vw, 12px); font-family: 'Geist Mono', monospace; color: var(--text3); margin-top: 2px; }

/* ══ FREQ CHIPS ══ */
.freq-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.freq-chip {
  padding: clamp(4px, 1vw, 6px) clamp(10px, 2vw, 14px);
  background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
  font-size: clamp(11px, 1.5vw, 13px); font-weight: 600; font-family: 'Geist Mono', monospace;
  color: var(--text2); cursor: pointer; transition: all 0.15s;
}
.freq-chip:hover { border-color: var(--accent); color: var(--accent); }
.freq-chip.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* ══ OUTPUT PANEL ══ */
.output-panel { display: flex; flex-direction: column; gap: clamp(12px, 2vw, 20px); min-width: 0; }

/* ══ RESULT CARD ══ */
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.result-hero {
  background: #0d1117;
  padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 24px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; transform: translateZ(0);
}
.result-metric { padding: 0 clamp(8px, 2vw, 20px); border-right: 1px solid rgba(255,255,255,0.1); text-align: center; }
.result-metric:first-child { padding-left: 0; }
.result-metric:last-child  { border-right: none; padding-right: 0; }
.result-label { font-size: clamp(9px, 1.2vw, 11px); font-weight: 700; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.07em; font-family: 'Geist Mono', monospace; margin-bottom: 8px; }
.result-value { font-size: clamp(14px, 3.5vw, 26px); font-weight: 800; font-family: 'Geist Mono', monospace; color: #fff; letter-spacing: -0.02em; line-height: 1.1; -webkit-font-smoothing: subpixel-antialiased; }
.result-value.accent { color: var(--accent); }
.result-sub   { font-size: clamp(10px, 1.2vw, 12px); color: rgba(255,255,255,0.55); margin-top: 5px; font-family: 'Geist Mono', monospace; }

.result-extras {
  padding: clamp(14px, 2.5vw, 20px) clamp(14px, 2.5vw, 24px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr));
  gap: clamp(8px, 1.5vw, 12px); border-top: 1px solid var(--border);
}
.extra-item   { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: clamp(10px, 2vw, 14px); }
.extra-label  { font-size: clamp(10px, 1.3vw, 12px); font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Geist Mono', monospace; margin-bottom: 5px; }
.extra-val    { font-size: clamp(13px, 2vw, 16px); font-weight: 700; font-family: 'Geist Mono', monospace; color: var(--text); }
.extra-val.green { color: var(--accent); }
.extra-val.blue  { color: var(--accent2); }
.extra-val.amber { color: var(--accent3); }

/* ══ CHARTS ══ */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: clamp(10px, 2vw, 16px); }
.chart-card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(14px, 2.5vw, 20px); box-shadow: var(--card-shadow); min-width: 0; }
.chart-title { font-size: clamp(10px, 1.3vw, 13px); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-family: 'Geist Mono', monospace; margin-bottom: clamp(10px, 2vw, 16px); }
.chart-wrap      { position: relative; height: clamp(160px, 20vw, 200px); }
.chart-wrap-tall { position: relative; height: clamp(180px, 22vw, 240px); }

/* Donut */
.donut-wrap       { display: flex; align-items: center; gap: clamp(12px, 2vw, 20px); flex-wrap: wrap; padding: 6px 0; }
.donut-canvas-wrap { flex-shrink: 0; }
.donut-legend     { flex: 1; min-width: 110px; display: flex; flex-direction: column; gap: 10px; }
.donut-item       { display: flex; align-items: center; gap: 8px; }
.donut-dot        { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.donut-item-label { font-size: clamp(12px, 1.5vw, 14px); color: var(--text2); font-weight: 500; }
.donut-item-val   { font-size: clamp(12px, 1.5vw, 14px); font-weight: 700; font-family: 'Geist Mono', monospace; color: var(--text); margin-left: auto; }

/* ══ TABLE ══ */
.table-card    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.table-header  { padding: clamp(12px, 2vw, 16px) clamp(14px, 2.5vw, 20px); border-bottom: 1px solid var(--border); background: var(--surface2); display: flex; align-items: center; justify-content: space-between; }
.table-header h3 { font-size: clamp(12px, 1.8vw, 14px); font-weight: 700; color: var(--text); }
.table-scroll  { overflow-x: auto; max-height: clamp(240px, 35vw, 320px); overflow-y: auto; }
.table-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; }
thead { position: sticky; top: 0; z-index: 1; }
thead tr { background: var(--surface2); }
th {
  padding: clamp(8px, 1.5vw, 11px) clamp(8px, 1.5vw, 16px); text-align: right;
  font-size: clamp(10px, 1.3vw, 12px); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3); font-family: 'Geist Mono', monospace; border-bottom: 1px solid var(--border); white-space: nowrap;
}
th:first-child { text-align: left; }
td {
  padding: clamp(8px, 1.5vw, 11px) clamp(8px, 1.5vw, 16px); text-align: right;
  font-size: clamp(11px, 1.5vw, 13.5px); font-family: 'Geist Mono', monospace;
  color: var(--text2); font-weight: 500; border-bottom: 1px solid var(--border);
}
td:first-child { text-align: left; font-weight: 700; color: var(--text); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
.td-green { color: var(--accent)  !important; }
.td-blue  { color: var(--accent2) !important; }
.td-amber { color: var(--accent3) !important; }
.td-red   { color: var(--danger)  !important; }

/* ══ ABOUT ══ */
.about-section { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad) var(--sp-2xl); }
.about-card    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--card-shadow); }
.about-card h2 { font-size: clamp(17px, 2.5vw, 20px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.about-card p  { font-size: clamp(13px, 1.5vw, 15px); color: var(--text2); line-height: 1.7; margin-bottom: 12px; }
.formula-box   { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: clamp(12px, 2vw, 16px) clamp(14px, 2.5vw, 20px); font-family: 'Geist Mono', monospace; font-size: clamp(11px, 1.5vw, 14px); color: var(--text); margin: 14px 0; line-height: 1.6; word-break: break-word; }

/* ══ RESPONSIVE: stack at ≤768px ══ */
@media (max-width: 768px) {
  .calc-layout {
    grid-template-columns: 1fr;
    padding: var(--sp-md) var(--pad) var(--sp-2xl);
  }
  .input-panel { position: static; }
  .nav-links   { display: none; }
  .nav-divider { display: none; }
  .hamburger {
    display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 10px; cursor: pointer; color: var(--text); font-size: 18px; margin-left: 8px;
  }
  .mobile-menu {
    display: none; position: fixed;
    top: clamp(52px, 8vw, 60px); left: 0; right: 0; bottom: 0;
    background: var(--bg); z-index: 99; padding: var(--pad); overflow-y: auto;
    flex-direction: column; gap: 4px;
  }
  .mobile-menu.open { display: flex; }
  .mobile-link {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-radius: 10px;
    text-decoration: none; color: var(--text); font-size: 15px; font-weight: 500; transition: background 0.15s;
  }
  .mobile-link:hover, .mobile-link.active { background: var(--surface2); color: var(--accent); }
  .result-hero { grid-template-columns: 1fr; }
  .result-metric {
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 14px 0; display: flex; align-items: center; justify-content: space-between; text-align: left;
  }
  .result-metric:first-child { padding-top: 0; }
  .result-metric:last-child  { border-bottom: none; padding-bottom: 0; }
  .result-label { margin-bottom: 0; }
  .result-sub   { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ══ ANIMATIONS ══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.anim    { animation: fadeUp 0.3s ease both; }
.anim-d1 { animation-delay: 0.05s; }
.anim-d2 { animation-delay: 0.10s; }
.anim-d3 { animation-delay: 0.15s; }
.anim-d4 { animation-delay: 0.20s; }

/* ══ SHARP MONO ══ */
.field-value, .num-input-prefix, .num-input-suffix, input[type="number"],
.range-limits, .freq-chip, .extra-label, .extra-val, .chart-title,
.donut-item-label, .donut-item-val, th, td, .result-label, .result-value,
.result-sub, .panel-title, .formula-box, .table-header h3 {
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

/* ══ UTILITY ══ */
.mono { font-family: 'Geist Mono', monospace; }
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-accent3 { color: var(--accent3); }
.text-muted   { color: var(--text3); }
