/* ClearSum Calculators — shared stylesheet */
:root {
  --ink: #1b2430;
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --bg: #f6f7fb;
  --brand: #1d6f5c;
  --brand-dark: #14524450;
  --brand-dark2: #114f3f;
  --accent: #e8a33d;
  --border: #e2e5ec;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 30, 40, 0.06);
  --max: 960px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

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

a { color: var(--brand-dark2); }
a:hover { color: var(--brand); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--brand); }

nav.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.95rem;
  font-weight: 600;
}
nav.main-nav a:hover { color: var(--brand); }

/* Hero */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Tool grid on homepage */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 30px 0 50px;
}
.tool-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20,30,40,0.10);
}
.tool-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: #e9f5f1;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.tool-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Section blocks on tool pages */
main.page {
  padding: 34px 0 60px;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumb a { text-decoration: none; }

.page h1 {
  font-size: 1.9rem;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.lede {
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 28px;
  font-size: 1.02rem;
}

.calc-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 34px;
}
.calc-card h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field input, .field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fbfbfd;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark2); }

.result-box {
  margin-top: 20px;
  padding: 18px 20px;
  background: #f1f8f5;
  border: 1px dashed #bcdfd2;
  border-radius: 10px;
  display: none;
}
.result-box.show { display: block; }
.result-box .big {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-dark2);
}
.result-box .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #dcefe7;
  font-size: 0.92rem;
}
.result-box .row:last-child { border-bottom: none; }

article.content h2 {
  font-size: 1.3rem;
  margin: 34px 0 12px;
}
article.content p { margin: 0 0 14px; color: var(--ink-soft); }
article.content ul, article.content ol {
  color: var(--ink-soft);
  padding-left: 22px;
}
article.content li { margin-bottom: 6px; }

.faq-item { margin-bottom: 16px; }
.faq-item h3 {
  font-size: 1.02rem;
  margin: 0 0 6px;
}
.faq-item p { margin: 0; }

.disclaimer {
  font-size: 0.82rem;
  color: #8a94a3;
  margin-top: 18px;
}

.related {
  margin-top: 40px;
}
.related h2 { font-size: 1.15rem; }
.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-list a {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--ink);
}
.related-list a:hover { border-color: var(--brand); color: var(--brand); }

/* Footer */
footer.site-footer {
  background: #12181f;
  color: #b9c2cf;
  padding: 40px 0 26px;
  margin-top: 40px;
}
footer.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
footer.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
footer.site-footer a {
  display: block;
  color: #b9c2cf;
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
footer.site-footer a:hover { color: #fff; }
footer.site-footer .bottom {
  border-top: 1px solid #2a3340;
  padding-top: 18px;
  font-size: 0.82rem;
  color: #7d8896;
  text-align: center;
}

.static-page article { max-width: 760px; }
.static-page h1 { font-size: 1.8rem; }

@media (max-width: 600px) {
  nav.main-nav { width: 100%; display: flex; justify-content: space-between; }
  nav.main-nav a { margin-left: 0; }
}
