/* Mississippi Maple shared stylesheet.
   Palette: deep spruce green #14532D, warm off-white #FAF9F6,
   charcoal #1F2937, accent amber #D97706. System fonts only. */

:root {
  --green: #14532D;
  --green-dark: #0E3B20;
  --bg: #FAF9F6;
  --ink: #1F2937;
  --amber: #D97706;
  --line: #E3DFD3;
  --panel: #FFFFFF;
  --tint: #EAF3EC;
  --muted: #5B6470;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; color: var(--green-dark); }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
p { margin: 0.5rem 0 1rem; }
a { color: var(--green); }
ul { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }
li { margin: 0.3rem 0; }

.lede { font-size: 1.08rem; color: var(--muted); max-width: 42rem; }

/* Header */
.site-header { background: var(--green); color: #fff; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem;
}
.brand {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand span { color: var(--amber); }
.brand small { display: block; font-weight: 400; font-size: 0.78rem; color: #D7E8DB; letter-spacing: 0.02em; }
.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a { color: #EAF3EC; text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a:focus { color: #fff; text-decoration: underline; }

/* Tool grid and cards */
.tool-grid {
  display: grid; gap: 1rem; margin: 1.25rem 0 2rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.1rem 1.15rem; text-decoration: none; color: var(--ink);
}
.card:hover, .card:focus { border-color: var(--green); box-shadow: 0 4px 14px rgba(20, 83, 45, 0.12); }
.card h3 { margin: 0 0 0.35rem; color: var(--green-dark); font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card .card-tag {
  display: inline-block; margin-top: 0.65rem; font-size: 0.78rem; font-weight: 600;
  color: var(--amber); text-transform: uppercase; letter-spacing: 0.05em;
}

/* Hub search */
.search-box { margin: 1.25rem 0 0.5rem; max-width: 540px; }
.search-box label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.search-box input {
  width: 100%; padding: 0.7rem 0.8rem; font-size: 1rem; color: var(--ink);
  border: 1px solid #C9CFC9; border-radius: 9px; background: #fff;
}
.search-box input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
#search-empty { color: var(--muted); margin: 1rem 0; }

/* Calculator form */
.calc-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem; margin: 1.25rem 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.field .hint { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.field input, .field select {
  width: 100%; padding: 0.6rem 0.65rem; font-size: 1rem; color: var(--ink);
  border: 1px solid #C9CFC9; border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green);
}
.field-check { display: flex; align-items: flex-start; gap: 0.55rem; }
.field-check input { width: auto; margin-top: 0.3rem; }
.field-check label { font-weight: 600; font-size: 0.92rem; }

/* Results */
.result-panel {
  background: var(--tint); border: 1px solid #CBE0D1; border-left: 5px solid var(--green);
  border-radius: 10px; padding: 1rem 1.15rem; margin: 1.25rem 0;
}
.result-panel h2 { margin-top: 0; font-size: 1.15rem; }
.result-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0; border-bottom: 1px solid #D8E7DC;
}
.result-row:last-child { border-bottom: none; }
.result-row span { color: var(--ink); }
.result-row strong { font-size: 1.05rem; white-space: nowrap; }
.result-note { font-size: 0.88rem; color: var(--muted); margin: 0.6rem 0 0; }

/* Buttons */
.btn {
  display: inline-block; background: var(--green); color: #fff; text-decoration: none;
  font-weight: 600; padding: 0.7rem 1.3rem; border-radius: 9px; border: none;
  font-size: 1rem; cursor: pointer;
}
.btn:hover, .btn:focus { background: var(--green-dark); }
.btn-accent { background: var(--amber); color: #1F2937; }
.btn-accent:hover, .btn-accent:focus { background: #B45309; color: #fff; }

/* Sections */
.section { margin: 2rem 0; }
.example-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.15rem; margin: 1rem 0;
}
.example-box h3 { margin-top: 0; }
.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #F1EFE7; border-radius: 6px; padding: 0.15rem 0.4rem; font-size: 0.92em;
}
.faq { margin: 1rem 0 2rem; }
.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 1rem; margin: 0.6rem 0;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-bottom: 0.3rem; }
.disclaimer {
  font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line);
  padding-top: 0.8rem; margin-top: 2rem;
}

/* Ad placeholder. Future AdSense slot: keep the box subtle until ads are approved. */
.ad-slot {
  border: 1.5px dashed #C9C4B4; background: #F3F1E9; color: #8A8574;
  text-align: center; padding: 1.6rem 1rem; margin: 2rem auto; max-width: 728px;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 8px;
}

/* Footer */
.site-footer {
  background: #22301F; background: var(--ink); color: #D8DCE1; margin-top: 3rem;
  padding: 1.6rem 0 2rem; font-size: 0.9rem;
}
.site-footer a { color: #EAF3EC; }
.footer-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0.4rem 0; color: #B9BEC6; }
.site-footer .fine { font-size: 0.82rem; color: #9AA1AB; }

@media (min-width: 700px) {
  h1 { font-size: 2.1rem; }
  .calc-form { padding: 1.4rem; }
}
