@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green: #1a6b4a;
  --green-light: #e6f4ee;
  --green-mid: #2d9468;
  --green-dark: #0f4a32;
  --ink: #181c19;
  --ink-mid: #3a4040;
  --ink-soft: #6b7575;
  --bg: #f7f8f5;
  --white: #ffffff;
  --border: #dde3de;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* NAV */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--green-dark);
  text-decoration: none;
}

.back-link {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.back-link:hover { color: var(--green); }

/* PAGE HEADER */
.page-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 3rem 2rem 2.5rem;
}
.page-header-inner { max-width: 760px; margin: 0 auto; }
.page-header .breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}
.page-header .breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

/* MAIN LAYOUT */
.calc-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* CARD */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

/* FORM ELEMENTS */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-mid);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.range-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.range-field .range-value {
  font-weight: 600;
  color: var(--green);
}
.range-field input[type=range] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--green);
  padding: 0;
  border: none;
  background: none;
}

.calc-btn {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.calc-btn:hover { background: var(--green-dark); }

/* RESULTS */
.results { display: none; }
.results.show { display: block; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.result-box .label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.result-box .value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--green-dark);
}
.result-box.highlight { background: var(--green-light); }
.result-box.highlight .value { color: var(--green); }

/* TIPS & FAQ */
.tips-list { list-style: none; }
.tips-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--ink-mid);
}
.tips-list li:last-child { border-bottom: none; }
.tips-list .tip-icon { font-size: 1.1rem; flex-shrink: 0; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 1rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q:hover { color: var(--green); }
.faq-a {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
}
.faq-a.open { max-height: 300px; padding-bottom: 1rem; }

/* AD */
.ad-box {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

/* FOOTER */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 2rem;
  text-align: center;
  font-size: 0.825rem;
  margin-top: 3rem;
}
footer a { color: rgba(255,255,255,0.5); text-decoration: none; margin: 0 0.5rem; }
footer a:hover { color: white; }

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 1.25rem; }
}

/* ── EDITORIAL CONTENT ── */
.editorial { margin-top: 0; }

.editorial h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1rem;
}

.editorial p {
  font-size: 0.925rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.editorial p:last-child { margin-bottom: 0; }

.tips-editorial { list-style: none; }

.tips-editorial li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.tips-editorial li:last-child { border-bottom: none; }

.tips-editorial .tip-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tips-editorial li div { flex: 1; }

.tips-editorial strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.tips-editorial p {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.65;
}

.example-box {
  background: var(--green-light);
  border-left: 3px solid var(--green-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.example-box strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

.example-box p {
  font-size: 0.875rem;
  color: var(--ink-mid);
  margin: 0;
  line-height: 1.7;
}

.related-list {
  list-style: none;
}

.related-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.related-list li:last-child { border-bottom: none; }

.related-list a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.related-list a:hover { text-decoration: underline; }
