/* ── WorthX Calculators – Shared Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg: #f5f0e8;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e0d8ca;
  --accent: #2d6a4f;
  --accent-light: #d8f3dc;
  --accent2: #b5451b;
  --card: rgba(255,255,255,0.88);
  --shadow: 0 4px 24px rgba(26,26,46,0.08);
  --shadow-lg: 0 12px 40px rgba(26,26,46,0.13);
  --success: #1b4332;
  --success-bg: #d8f3dc;
  --danger: #7f1d1d;
  --danger-bg: #fee2e2;
  --warn: #78350f;
  --warn-bg: #fef3c7;
  font-family: 'Sora', system-ui, sans-serif;
  line-height: 1.6;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(45,106,79,0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(181,69,27,0.06) 0%, transparent 45%);
}

/* ══════════════════════════════════════════════
   RESPONSIVE NAV v4 — Clean two-row desktop +
   fully scrollable mobile drawer
   ══════════════════════════════════════════════ */

/* ── Wrapper ── */
.site-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
}

/* ── ROW 1: Logo + hamburger ── */
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;   /* centered on desktop */
  gap: 12px;
}
.nav-logo {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

/* Mobile: logo left, hamburger right */
@media (max-width: 700px) {
  .nav-inner { justify-content: space-between; }
}

/* ── Hamburger button ── */
.nav-hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 150ms;
  /* shown/hidden via media query */
  display: none;
}
.nav-hamburger:hover { background: var(--accent-light); }
.nav-hamburger .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 280ms ease, opacity 200ms ease;
  transform-origin: center;
}
.nav-hamburger.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open .bar:nth-child(2) { opacity: 0; }
.nav-hamburger.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── ROW 2: Link strip (desktop) ── */
.nav-links {
  background: #f8f5f0;
  border-top: 1px solid var(--border);
  /* hidden/shown via media query */
  display: block;
}
.nav-links-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 150ms, color 150ms;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── Mobile drawer ── */
.nav-drawer {
  /* Fixed below the 52px nav bar, fills rest of screen */
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: 490;
  /* SCROLLABLE */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 16px 80px;
  border-top: 1px solid var(--border);
  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 0ms linear 240ms;
}
.nav-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 240ms ease, transform 240ms ease, visibility 0ms linear 0ms;
}

/* Category groups in drawer */
.nav-group { margin-bottom: 24px; }
.nav-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.nav-group-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.nav-group-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  background: #f8f5f0;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background 150ms, border-color 150ms;
}
.nav-group-links a:hover,
.nav-group-links a.active {
  background: var(--accent-light);
  border-color: rgba(45,106,79,0.3);
  color: var(--accent);
}
.nav-group-links a .nav-icon { font-size: 18px; flex-shrink: 0; }

/* ── Overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.4);
  z-index: 480;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 0ms linear 240ms;
}
.nav-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms ease, visibility 0ms linear 0ms;
}

/* ══ RESPONSIVE BREAKPOINTS ══════════════════ */

/* Mobile: hamburger only, hide link strip */
@media (max-width: 700px) {
  .nav-hamburger { display: flex !important; }
  .nav-links     { display: none !important; }
}

/* Desktop: link strip, no hamburger, no drawer */
@media (min-width: 701px) {
  .nav-hamburger { display: none !important; }
  .nav-links     { display: block !important; }
  .nav-drawer,
  .nav-overlay   {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* ── Layout ── */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 24px; }

/* ── Typography ── */
.page-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-sub {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.prose {
  font-family: 'Lora', serif;
  font-size: 15px;
  color: #374151;
  line-height: 1.8;
}
.prose p { margin-bottom: 12px; }
.prose p:last-child { margin-bottom: 0; }

/* ── Form elements ── */
.field-group { display: grid; gap: 14px; }
.row-2 { display: grid; gap: 12px; }
@media (min-width: 580px) { .row-2 { grid-template-columns: repeat(2, 1fr); } }
.row-3 { display: grid; gap: 12px; }
@media (min-width: 640px) { .row-3 { grid-template-columns: repeat(3, 1fr); } }

label.field {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
input.inp, select.inp {
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: 'Sora', sans-serif;
  background: #fff;
  color: var(--text);
  transition: border-color 150ms, box-shadow 150ms;
  width: 100%;
}
input.inp:focus, select.inp:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 8px 20px rgba(26,26,46,0.18);
  letter-spacing: 0.01em;
  margin-top: 4px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(26,26,46,0.22); }
.btn-primary:active { transform: translateY(0); }

/* ── Result rows ── */
.result-list { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row strong { font-weight: 700; font-size: 15px; }
.result-row .label { color: var(--muted); }

.verdict {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid transparent;
  margin-top: 14px;
  text-align: center;
  animation: fadeUp 0.3s ease both;
}
.verdict.good  { color: var(--success); background: var(--success-bg); border-color: rgba(27,67,50,0.25); }
.verdict.bad   { color: var(--danger);  background: var(--danger-bg);  border-color: rgba(127,29,29,0.2); }
.verdict.warn  { color: var(--warn);    background: var(--warn-bg);    border-color: rgba(120,53,15,0.2); }

/* ── Badges ── */
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(45,106,79,0.2);
  letter-spacing: 0.02em;
}

/* ── Tip grid ── */
.tip-grid { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 580px) { .tip-grid { grid-template-columns: repeat(2, 1fr); } }
.tip-card {
  background: #f8f5f0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.tip-card .tip-icon { font-size: 24px; margin-bottom: 8px; }
.tip-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.tip-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q {
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  user-select: none;
  gap: 12px;
}
.faq-q::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform 200ms; flex-shrink: 0; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  font-family: 'Lora', serif;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.75;
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 200ms ease;
}
.faq-item.open .faq-a { max-height: 400px; padding-top: 10px; }

/* ── Formula box ── */
.formula-box {
  background: #f8f5f0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  font-family: 'Sora', monospace;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.9;
}

/* ── Ad slot ── */
.ad-slot {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  margin: 24px 0;
  overflow: hidden;
}

/* ── Footer ── */
.site-footer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; }

/* ── Disclaimer ── */
.disclaimer {
  font-size: 11.5px;
  color: var(--muted);
  background: #f8f5f0;
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  margin-top: 14px;
  line-height: 1.6;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.45s ease both; }
.fade-up-2 { animation: fadeUp 0.45s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.45s 0.2s ease both; }

/* ── Range slider ── */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  outline: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(45,106,79,0.3);
}

/* ── Progress bar ── */
.progress-wrap { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden; margin-top: 4px; }
.progress-bar  { height: 100%; border-radius: 999px; background: var(--accent); transition: width 400ms ease; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.data-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(45,106,79,0.04); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }
