* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a6b4a;
  --primary-dark: #0f4a33;
  --accent: #c9a227;
  --bg: #f7f8f7;
  --card: #ffffff;
  --text: #22292f;
  --muted: #5c6670;
  --border: #e2e6e4;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

header.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.brand { font-size: 22px; font-weight: 700; color: var(--primary-dark); text-decoration: none; }
.brand span { color: var(--accent); }

nav.main-nav { display: flex; align-items: center; flex-wrap: wrap; }

nav.main-nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 14.5px; }
nav.main-nav a:hover { color: var(--primary-dark); }

/* "More" dropdown keeps the flat nav readable as the calculator list grows. */
.nav-more { position: relative; margin-left: 18px; display: flex; align-items: center; }
.nav-more-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: inherit; font-size: 14.5px; color: var(--muted); line-height: inherit;
}
.nav-more-btn:hover, .nav-more:focus-within .nav-more-btn { color: var(--primary-dark); }
.nav-more-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  min-width: 250px;
  padding: 6px 0;
  z-index: 60;
}
.nav-more-menu::before { content: ""; position: absolute; top: -13px; left: 0; right: 0; height: 13px; }
.nav-more:hover .nav-more-menu, .nav-more:focus-within .nav-more-menu { display: block; }
nav.main-nav .nav-more-menu a {
  display: block; margin: 0; padding: 9px 18px;
  font-size: 14.5px; color: var(--text); white-space: nowrap;
}
nav.main-nav .nav-more-menu a:hover { background: #f3f6f4; color: var(--primary-dark); }

.hero { padding: 48px 0 32px; text-align: center; }
.hero h1 { font-size: 34px; line-height: 1.25; margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 24px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 48px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.07); transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; font-size: 18px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .icon { font-size: 26px; margin-bottom: 10px; display: block; }

.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

button.primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}
button.primary:hover { background: var(--primary-dark); }

.results { margin-top: 20px; }
.result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--muted); font-size: 14.5px; }
.result-row .value { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.result-row .value.highlight { color: var(--accent); font-size: 24px; }

.content-section { padding: 16px 0 40px; }
.content-section h2 { font-size: 24px; margin: 28px 0 12px; }
.content-section h3 { font-size: 18px; margin: 20px 0 8px; }
.content-section p { margin-bottom: 14px; color: #333a40; }
.content-section ul, .content-section ol { margin: 0 0 14px 22px; }
.content-section li { margin-bottom: 6px; }

.formula {
  background: #eef4f0; border-left: 4px solid var(--primary);
  padding: 14px 18px; border-radius: 0 8px 8px 0;
  font-family: Georgia, serif; font-size: 17px; margin: 14px 0;
}

.faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 16.5px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 15px; }

.page-title { padding: 36px 0 0; }
.page-title h1 { font-size: 30px; margin-bottom: 8px; }
.page-title p { color: var(--muted); }

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px; padding: 28px 0;
  color: var(--muted); font-size: 14px;
}
footer.site-footer a { color: var(--muted); text-decoration: none; margin-right: 16px; }
footer.site-footer a:hover { color: var(--primary-dark); }

@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  nav.main-nav a { margin-left: 12px; font-size: 13px; }
}
