/* ============ TOKENS ============ */
:root {
  --dark-green: #245f50;
  --brand-green: #4a9b7f;
  --pale-green: #e8f5f0;
  --page-bg: #f8faf9;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-2: #45524e;
  --border: #d5e5de;
  --loss: #c76b5a;
  --loss-bg: #fbeeeb;
  --maintenance: #2f7d5e;
  --maintenance-bg: #e8f5ec;
  --gain: #5b7fa6;
  --gain-bg: #eaf1f8;
  --warn: #b8790a;
  --warn-bg: #fdf4e3;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(36,95,80,.06), 0 6px 20px rgba(36,95,80,.07);
  --shadow-sm: 0 1px 3px rgba(36,95,80,.08);
  --nav-h: 66px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--dark-green); }

/* Main-content link hover effect (excludes nav, footer, breadcrumbs, buttons, cards) */
.prose p a,
.prose ul li a,
.prose ol li a,
.prose .safety-inline a,
.faq-hub-cta a {
  color: var(--dark-green);
  text-decoration: underline;
  text-decoration-color: rgba(36, 95, 80, 0.35);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .18s ease, text-decoration-color .18s ease, text-decoration-thickness .18s ease;
}
.prose p a:hover,
.prose ul li a:hover,
.prose ol li a:hover,
.prose .safety-inline a:hover,
.faq-hub-cta a:hover,
.prose p a:focus-visible,
.faq-hub-cta a:focus-visible {
  color: #1c4c40;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}
/* Don't apply the inline treatment to card/aside links inside prose */
.prose .related-questions a,
.prose .author-link {
  text-decoration: none;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* focus */
:focus-visible {
  outline: 3px solid var(--brand-green);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1200;
  background: var(--dark-green); color: #fff; padding: 10px 16px;
  border-radius: 8px; text-decoration: none; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ============ NAV ============ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--dark-green); font-weight: 700;
  flex-shrink: 0;
}
.nav-brand-text { font-size: 15px; letter-spacing: .3px; }

.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-links {
  list-style: none; display: flex; gap: 6px; margin: 0; padding: 0;
}
.nav-link {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 15px;
  transition: color .18s ease, background-color .18s ease;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--dark-green); background: var(--pale-green); }
.nav-link.active { color: var(--dark-green); background: var(--pale-green); }

/* language selector */
.lang-selector { position: relative; }
.lang-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  transition: border-color .18s ease, background-color .18s ease;
}
.lang-button:hover { border-color: var(--brand-green); background: var(--pale-green); }
.lang-caret { transition: transform .2s ease; color: var(--text-2); }
.lang-button[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.flag { border-radius: 2px; border: 1px solid rgba(0,0,0,.08); object-fit: cover; }

.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px; min-width: 190px; z-index: 1100;
}
.lang-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px; text-decoration: none;
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: background-color .15s ease;
}
.lang-list a:hover, .lang-list a:focus-visible { background: var(--pale-green); }
.lang-current { font-weight: 700; }
.lang-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--brand-green);
  background: var(--pale-green); padding: 2px 8px; border-radius: 999px;
}

/* hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 10px; cursor: pointer;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--dark-green); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ SECTIONS ============ */
section[id] { scroll-margin-top: calc(var(--nav-h) + 14px); }
.section { padding: 62px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h1, h2, h3 { color: var(--dark-green); line-height: 1.2; }
h2 { font-size: 1.9rem; margin: 0 0 .6em; }
h3 { font-size: 1.28rem; margin: 1.6em 0 .4em; color: var(--text); }
.section-lead { color: var(--text-2); max-width: 60ch; }

#motiv-heading,
#wrm-heading,
#hiw-heading,
#ext-heading,
#mbg-heading,
#fl-heading,
#faq-heading { text-align: center; }

/* ============ HERO ============ */
.hero { background: var(--pale-green); padding: 54px 0 62px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: start;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .5em; letter-spacing: -.5px;
}
.hero-intro { font-size: 1.08rem; color: var(--text-2); max-width: 54ch; }
.trust-points {
  list-style: none; margin: 22px 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 460px;
}
.trust-points li { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--text); }
.trust-points svg { color: var(--brand-green); flex-shrink: 0; }
.hero-note { font-size: 13.5px; color: var(--text-2); margin-top: 14px; }

/* buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  border: none; border-radius: 999px; padding: 14px 26px; font-size: 15.5px;
  text-decoration: none;
  transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--dark-green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #1c4c40; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }

/* calculator card */
.calc-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px;
}
.calc-title { font-size: 1.35rem; margin: 0 0 16px; text-align: center; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; color: var(--text); }
.field input, .field select {
  width: 100%; font: inherit; font-size: 16px;
  padding: 11px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text); transition: border-color .18s ease;
}
.field input:focus, .field select:focus { border-color: var(--brand-green); outline-offset: 0; }
.field input.invalid, .field select.invalid { border-color: var(--loss); background: var(--loss-bg); }
.field-error { color: #a13a29; font-size: 13.5px; font-weight: 600; margin: 6px 0 0; }
.calc-helper { font-size: 12.8px; color: var(--text-2); margin: 16px 0 0; line-height: 1.55; }

/* ============ RESULTS ============ */
.results-section { background: var(--page-bg); }
.results-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px;
}
.result-card {
  background: var(--white); border: 1px solid var(--border);
  border-top: 5px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm);
}
.result-card h3 { margin: 0 0 12px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.result-card h3::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.result-loss { border-top-color: var(--loss); }
.result-loss h3 { color: var(--loss); }
.result-loss h3::before { background: var(--loss); }
.result-maintenance { border-top-color: var(--maintenance); }
.result-maintenance h3 { color: var(--maintenance); }
.result-maintenance h3::before { background: var(--maintenance); }
.result-gain { border-top-color: var(--gain); }
.result-gain h3 { color: var(--gain); }
.result-gain h3::before { background: var(--gain); }

.result-placeholder { color: var(--text-2); font-size: 14.5px; margin: 0; }
.result-values { margin: 0; }
.result-values > div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.result-values > div:last-child { border-bottom: none; }
.result-values dt { color: var(--text-2); font-size: 14.5px; font-weight: 600; margin: 0; }
.result-values dd { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.result-warning {
  margin: 14px 0 0; padding: 10px 12px; font-size: 13px; font-weight: 600;
  background: var(--warn-bg); color: #8a5c07; border: 1px solid #f0dcb0;
  border-radius: var(--radius-sm);
}
.results-status { font-size: 0; }

/* ============ MOTIVATIONAL ============ */
.motiv-section { background: var(--white); }
.motiv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.motiv-copy p { color: var(--text-2); }
.motiv-support { font-weight: 600; color: var(--text) !important; background: var(--pale-green); padding: 14px 16px; border-radius: var(--radius-sm); border-left: 4px solid var(--brand-green); }
.motiv-copy .btn { margin-top: 10px; }
.motiv-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.motiv-images .transform-card:first-child { grid-column: 1 / -1; }
.transform-card {
  margin: 0; background: var(--page-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.transform-card img { width: 100%; height: auto; }
.transform-card figcaption { font-size: 12px; color: var(--text-2); padding: 9px 12px; text-align: center; }

/* ============ PROSE ============ */
.prose { max-width: 820px; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: .35em; font-weight: 700; color: var(--text); }
.formula {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--pale-green); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14.5px;
  color: var(--dark-green); overflow-x: auto;
}
.note-text { font-size: 14px; color: var(--text-2); font-style: italic; }

/* author */
.author-block { display: flex; gap: 26px; align-items: flex-start; margin-top: 4px; }
.author-photo { margin: 0; flex-shrink: 0; text-align: center; width: 180px; }
.author-photo img {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--pale-green); box-shadow: var(--shadow);
}
.author-photo figcaption {
  margin-top: 12px; font-weight: 700; color: var(--dark-green); font-size: 15px;
  display: flex; flex-direction: column; gap: 2px;
}
.author-photo figcaption span { font-weight: 500; color: var(--text-2); font-size: 13px; }
.author-text { flex: 1; }
.author-text p:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .author-block { flex-direction: column; align-items: center; text-align: center; }
  .author-text { text-align: left; }
  #author-heading { text-align: center; }
}

.tech-details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); margin: 1em 0; overflow: hidden;
}
.tech-details summary {
  cursor: pointer; padding: 13px 16px; font-weight: 700; color: var(--dark-green);
  background: var(--pale-green); list-style: none;
}
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details summary::after { content: " +"; float: right; }
.tech-details[open] summary::after { content: " -"; }
.tech-body { padding: 8px 16px 14px; }
.tech-body p { margin: .5em 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.macro-table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--white); }
.macro-table th, .macro-table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.macro-table thead th { background: var(--dark-green); color: #fff; font-weight: 700; }
.macro-table tbody th { color: var(--dark-green); font-weight: 700; }
.macro-table tbody tr:nth-child(even) { background: var(--page-bg); }
.macro-table tbody tr:last-child td, .macro-table tbody tr:last-child th { border-bottom: none; }

/* ============ FOOD ============ */
.food-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 8px; }
.food-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.food-card h3 { margin-top: 0; }
.food-card ul { columns: 2; column-gap: 22px; }
.food-card li { font-weight: 700; }
.food-card-warn { border-left: 4px solid var(--warn); }

/* ============ NOTICE ============ */
.notice-box {
  background: var(--warn-bg); border: 1px solid #f0dcb0; border-left: 5px solid var(--warn);
  border-radius: var(--radius); padding: 22px 24px;
}
.notice-box p:last-child { margin-bottom: 0; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--dark-green);
  font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--brand-green); flex-shrink: 0; }
.faq-item[open] summary::after { content: "-"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 4px 20px 18px; }
.faq-answer p { margin: 12px 0 0; color: var(--text-2); }

/* ============ FOOTER ============ */
.site-footer { background: var(--dark-green); color: #dcece6; padding: 44px 0 40px; margin-top: 20px; }
.footer-primary { font-weight: 600; color: #fff; margin: 0 0 24px; text-align: center; }
.footer-heading { color: #fff; font-size: 1.05rem; margin: 0 0 12px; text-align: center; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 0 0 22px; padding: 0; }
.footer-links li { display: flex; align-items: center; }
.footer-links li:not(:last-child)::after { content: "\00B7"; color: #7fae9f; margin-left: 14px; font-weight: 700; }
.footer-links a { color: #bfe0d5; text-decoration: none; font-size: 14.5px; font-weight: 600; border-bottom: 1px solid transparent; }
.footer-links a:hover { color: #fff; border-bottom-color: #fff; }
.footer-note { font-size: 13.5px; color: #a9cabf; margin: 0 auto 8px; max-width: 80ch; text-align: center; }
.footer-privacy { font-weight: 700; color: #cfe6dd; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .motiv-grid { grid-template-columns: 1fr; gap: 30px; }
  .food-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 20px 20px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-link { padding: 13px 12px; font-size: 16px; }
  .lang-selector { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
  .lang-button { width: 100%; justify-content: flex-start; }
  .lang-list { position: static; box-shadow: none; margin-top: 8px; width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 46px 0; }
  h2 { font-size: 1.55rem; }
  .nav-brand-text { font-size: 12.5px; }
  .trust-points { grid-template-columns: 1fr; }
  .motiv-images { grid-template-columns: 1fr; }
  .motiv-images .transform-card:first-child { grid-column: auto; }
  .food-card ul { columns: 1; }
  .calc-card { padding: 22px 18px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============ FAQ SILO ============ */
.breadcrumbs { padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 13.5px; color: var(--text-2); }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li:not(:last-child)::after { content: "\203A"; color: var(--brand-green); }
.breadcrumbs a { color: var(--dark-green); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text-2); }

.hero-illustration { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--white); }
.hero-illustration img { width: 100%; height: auto; display: block; }

.faq-hub-list { margin-top: 10px; }
.faq-cat-label { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-green); margin: 30px 0 6px; font-weight: 700; }
.faq-rows { border-top: 1px solid var(--border); }
.faq-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; padding: 14px 6px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.02rem;
  transition: background-color .16s ease, padding-left .16s ease, color .16s ease;
}
.faq-row:hover, .faq-row:focus-visible { background: var(--pale-green); padding-left: 14px; color: var(--dark-green); outline-offset: -2px; }
.faq-row .faq-chevron { flex-shrink: 0; color: var(--brand-green); transition: transform .16s ease; }
.faq-row:hover .faq-chevron { transform: translateX(3px); }

.direct-answer { font-size: 1.12rem; line-height: 1.6; color: var(--text); border-left: 4px solid var(--brand-green); background: var(--pale-green); padding: 18px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 6px 0 20px; }
.safety-inline { background: var(--warn-bg); border: 1px solid #f0dcb0; border-left: 5px solid var(--warn); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; font-size: 14.5px; }

.author-box { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin: 34px 0 24px; box-shadow: var(--shadow-sm); }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--pale-green); flex-shrink: 0; }
.author-box .author-name { font-weight: 700; color: var(--dark-green); margin: 0; }
.author-box .author-role { font-size: 13px; color: var(--text-2); margin: 2px 0 8px; }
.author-box p.author-note { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.author-box .author-link { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--dark-green); }

.related-questions { margin: 8px 0 0; }
.related-questions h2 { font-size: 1.3rem; }
.related-questions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related-questions a { display: block; padding: 13px 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--dark-green); font-weight: 600; transition: background-color .16s ease; }
.related-questions a:hover { background: var(--pale-green); }

@media (max-width: 640px) {
  .author-box { flex-direction: column; align-items: center; text-align: center; }
  .author-box .author-text { text-align: left; }
}
