:root {
  --ink: #142b23;
  --muted: #53685e;
  --bg: #f0f5f0;
  --line: #dce7dd;
  --lime: #d4f76b;
}
body { font-family: system-ui, sans-serif; }
[hidden] { display: none !important; }
.header { height: 72px; background: #142b23; color: #fff; }
.header .brand-light { color: var(--lime); }
.header nav a { color: #d4e2d6; font-size: 13px; }
.header nav a.active, .header nav a:hover { color: var(--lime); }
.header nav a.active:after { background: var(--lime); }
.site-install { color: #142b23; background: var(--lime); border-radius: 30px; padding: 10px 16px; font-weight: 750; }
.workspace { height: calc(100dvh - 72px); grid-template-columns: clamp(345px, 29vw, 425px) minmax(0, 1fr); }
.sidebar { background: #fdfefd; }
.sidebar .intro h1 { letter-spacing: -.055em; line-height: 1; }
.sidebar .intro p { color: var(--muted); font-size: 13px; }
.map-summary { box-shadow: 0 12px 40px #142b2333; }
.portal, .news-index { padding-block: 32px 68px; }
.portal-hero, .news-hero {
  background: radial-gradient(ellipse at top right, #325f44, transparent 68%), #142b23;
  color: #fff; padding: clamp(26px, 6vw, 76px); border-radius: 26px; margin: 15px 0 26px;
}
.portal-hero h1, .news-hero h1 { font-size: clamp(34px, 6vw, 64px); margin: 0 0 12px; line-height: 1.03; }
.portal-hero p, .news-hero p { color: #deecdf; max-width: 60ch; font-size: 17px; line-height: 1.6; margin: 0; }
.tool-card, .news-card, .calculator, .portal-copy {
  border: 1px solid var(--line); border-radius: 20px; background: #fff;
}
.tool-card { min-height: 170px; }
.tool-card span { display: grid; place-items: center; width: 40px; height: 40px; background: var(--lime); border-radius: 12px; font-size: 24px; margin-bottom: 15px; }
.page-card p, .portal-copy p { color: var(--muted); line-height: 1.65; }
.tool-card:hover, .news-card:hover { border-color: #73966d; }
.portal-copy, .calculator { padding: clamp(20px, 4vw, 40px); margin-top: 22px; }
.portal-copy p { max-width: 72ch; font-size: 16px; }
.oil-quote strong { font-size: 35px; }
.calc-grid, .calc-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.calc-grid label { display: grid; gap: 8px; align-content: start; font-weight: 650; }
.calc-grid input:not([type=checkbox]) { width: 100%; border: 1px solid #b8cbbd; border-radius: 10px; padding: 12px; font-size: 16px; }
.calc-grid .calc-check { display: flex; align-items: center; }
.calculator button, .calc-results { margin-top: 22px; }
.calc-results > div { background: #eaf3e4; padding: 14px; border-radius: 12px; }
.calc-results strong { display: block; margin-top: 6px; font-size: clamp(19px, 3vw, 29px); }
.news-grid { gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-card { display: flex; flex-direction: column; padding: 0; gap: 0; overflow: hidden; }
.news-card img { display: block; border-radius: 0; margin: 0; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-body h3 { font-size: 19px; margin: 10px 0 3px; }
.news-card-body small, .article-byline { color: #426354; }
.news-card-body span { margin-top: auto; font-weight: 700; }
.content.news-article { max-width: 870px; }
.news-article h1 { font-size: clamp(30px, 5vw, 56px); line-height: 1.05; }
.news-article > p, .news-article > ul { font-size: 17px; line-height: 1.75; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 20px; }
.share-row a { padding: 10px 14px; border: 1px solid #8dac95; border-radius: 30px; font-weight: 700; }
@media (max-width: 950px) {
  .calc-grid, .calc-results, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .header { height: 60px; padding: 0 16px; }
  .header nav { gap: 12px; }
  .header nav a { display: none !important; }
  .header nav a[data-mobile] { display: flex !important; font-size: 13px; }
  .site-install { display: none; }
  .workspace { height: calc(100dvh - 60px); }
  .sidebar { inset: 8px 8px calc(65px + env(safe-area-inset-bottom)); width: auto; max-width: none; border-radius: 19px; }
  .map-summary { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .detail-panel { bottom: calc(72px + env(safe-area-inset-bottom)); max-height: min(68dvh, 560px); }
  .mobile-nav { position: absolute; gap: 5px; padding: 8px 9px calc(8px + env(safe-area-inset-bottom)); background: #142b23; color: #fff; }
  .mobile-nav button, .mobile-nav a { display: grid; place-items: center; min-height: 44px; padding: 5px; flex: 1; background: #294237; color: #fff; font-size: 11px; font-weight: 700; border-radius: 12px; text-align: center; }
  .mobile-nav button:first-child { background: var(--lime); color: #142b23; flex: 1.5; }
  .app { position: relative; }
  .portal, .news-index { padding-inline: 16px; }
}
@media (max-width: 490px) {
  .news-grid { grid-template-columns: 1fr; }
}

.mobile-fuel { display: none; }
@media (max-width: 740px) {
  .map-top { justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 8px; }
  .map-label { display: none; }
  .mobile-fuel {
    display: block; font-size: 16px; font-weight: 700; color: #142b23;
    border-radius: 14px; min-height: 44px; padding: 7px 12px;
    background: #fff; border: 1px solid #cadbd0; box-shadow: 0 4px 12px #142b232d;
  }
}
.calc-grid select { width: 100%; border: 1px solid #b8cbbd; background: #fff; border-radius: 10px; padding: 12px; font-size: 16px; }
#ev-map { height: clamp(290px, 50vh, 480px); border-radius: 16px; background: #e1ebe1; margin-bottom: 16px; }
.ev-results h2 { font-size: 17px; }
.ev-results a, .source-credit a { text-decoration: underline; text-underline-offset: 3px; }
.source-credit { font-size: 12px; color: #426354; }
@media (max-width: 740px) {
  .header { height: calc(60px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .workspace { height: calc(100dvh - 60px - env(safe-area-inset-top)); }
  .map-area .leaflet-bottom {
    bottom: calc(59px + env(safe-area-inset-bottom));
  }
}
