.fgs-simulator {
  --fgs-surface: #fff;
  --fgs-alt: #f5f6f6;
  --fgs-ink: #171b1d;
  --fgs-muted: #59666b;
  --fgs-line: #d7dddf;
  --fgs-copper: #b94a22;
  --fgs-diesel: #a94c15;
  --fgs-diesel-soft: #f3ddd0;
  --fgs-electric: #087568;
  --fgs-electric-soft: #d2ebe5;
  --fgs-carbon: #171b1d;
  --fgs-danger: #a52d27;
  color: var(--fgs-ink);
  font-size: 16px;
  line-height: 1.5;
  max-width: 1160px;
  margin-inline: auto;
}
.fgs-simulator * { box-sizing: border-box; }
.fgs-simulator [hidden] { display: none !important; }
.fgs-simulator button, .fgs-simulator input, .fgs-simulator select { font: inherit; }
.fgs-intro { max-width: 760px; font-size: 1.06rem; color: var(--fgs-muted); }
.fgs-accuracy { margin: 18px 0 22px; padding: 14px 16px; border: 1px solid #d7c3b6; border-left: 4px solid var(--fgs-copper); background: #fffaf7; border-radius: 8px; }
.fgs-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 22px; align-items: start; }
.fgs-card { background: var(--fgs-surface); border: 1px solid var(--fgs-line); border-radius: 12px; box-shadow: 0 12px 34px rgba(17, 23, 25, .09); }
.fgs-inputs { padding: 20px; position: sticky; top: 18px; background: linear-gradient(180deg, #fff 0%, #fbf7f4 100%); }
.fgs-results { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.fgs-simulator h2 { margin: 0 0 14px; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fgs-muted); }
.fgs-group { min-width: 0; margin: 16px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--fgs-line); }
.fgs-group legend { padding: 0; margin-bottom: 10px; font-size: .85rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--fgs-muted); }
.fgs-group--diesel legend { color: var(--fgs-diesel); }
.fgs-group--electric legend { color: var(--fgs-electric); }
.fgs-group label { display: block; margin-bottom: 14px; font-size: .9rem; font-weight: 650; }
.fgs-group label em { font-weight: 400; font-style: normal; }
.fgs-group label small { display: block; margin-top: 5px; color: var(--fgs-muted); font-size: .76rem; font-weight: 400; }
.fgs-control { display: flex; margin-top: 5px; border: 1px solid #bac3c6; border-radius: 6px; background: var(--fgs-alt); overflow: hidden; }
.fgs-control:focus-within { outline: 3px solid rgba(21, 102, 190, .2); border-color: #1566be; }
.fgs-control input { flex: 1; min-width: 0; width: 100%; padding: 10px 11px; border: 0; outline: 0; background: transparent; color: var(--fgs-ink); }
.fgs-control select { width: 100%; padding: 10px 38px 10px 11px; border: 0; outline: 0; background: transparent; color: var(--fgs-ink); }
.fgs-control--select { position: relative; }
.fgs-control > span { display: flex; align-items: center; padding-inline: 10px; border-left: 1px solid var(--fgs-line); color: var(--fgs-muted); font-size: .78rem; white-space: nowrap; }
.fgs-control.fgs-invalid { border-color: var(--fgs-danger); }
.fgs-group details { margin-bottom: 14px; }
.fgs-group summary { cursor: pointer; font-size: .86rem; font-weight: 650; }
.fgs-group details label { margin-top: 12px; }
.fgs-help { margin: 10px 0 14px; padding: 12px 14px; border-left: 3px solid var(--fgs-copper); background: rgba(185, 89, 47, .07); color: var(--fgs-muted); font-size: .82rem; }
.fgs-help p { margin: 0 0 9px; }
.fgs-help p:last-child { margin-bottom: 0; }
.fgs-annual-hours { margin: 0 0 14px; padding: 10px 12px; border-radius: 6px; background: #eef1f2; color: var(--fgs-muted); font-size: .84rem; }
.fgs-annual-hours strong { color: var(--fgs-ink); }
.fgs-error { margin: 0 0 10px; color: var(--fgs-danger); font-size: .84rem; font-weight: 700; }
.fgs-input-actions { display: grid; gap: 9px; margin-top: 18px; }
.fgs-battery-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fgs-battery-metrics > div { padding: 15px 16px; border: 1px solid #9fcfc6; border-radius: 10px; background: linear-gradient(135deg, #e7f5f2 0%, #d6ece7 100%); }
.fgs-battery-metrics span { display: block; color: var(--fgs-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.fgs-battery-metrics strong { display: block; margin-top: 4px; color: var(--fgs-electric); font-size: 1.45rem; }
.fgs-hero { display: grid; grid-template-columns: 1.2fr 1fr 1fr; overflow: hidden; }
.fgs-metric { padding: 18px; border-right: 1px solid var(--fgs-line); }
.fgs-metric:last-child { border-right: 0; }
.fgs-metric > span { display: block; margin-bottom: 5px; color: var(--fgs-muted); font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.fgs-metric > strong { display: block; font-size: clamp(1.85rem, 4vw, 2.7rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.fgs-metric > small { display: block; margin-top: 5px; color: var(--fgs-muted); font-size: .78rem; }
.fgs-metric--primary { background: linear-gradient(135deg, #087568 0%, #07594f 100%); color: #fff; }
.fgs-metric--primary > span, .fgs-metric--primary > small { color: rgba(255,255,255,.82); }
.fgs-metric--primary strong { color: #fff; }
.fgs-metric--electric { background: var(--fgs-electric-soft); }
.fgs-metric--electric strong { color: var(--fgs-electric); }
.fgs-metric--primary.fgs-negative { background: var(--fgs-diesel-soft); }
.fgs-metric--primary.fgs-negative strong { color: var(--fgs-danger); }
.fgs-metric--diesel { background: var(--fgs-diesel-soft); }
.fgs-metric--diesel strong { color: var(--fgs-diesel); }
.fgs-periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--fgs-line); border-radius: 10px; overflow: hidden; background: var(--fgs-line); }
.fgs-periods > div { padding: 15px 16px; background: #edf6f4; border-top: 4px solid var(--fgs-electric); }
.fgs-periods > div:nth-child(2) { background: #e5f1ef; }
.fgs-periods > div:nth-child(3) { background: #dbece8; }
.fgs-periods span { display: block; color: var(--fgs-muted); font-size: .77rem; }
.fgs-periods strong { display: block; margin-top: 3px; color: var(--fgs-electric); font-size: 1.45rem; }
.fgs-periods .fgs-negative strong { color: var(--fgs-danger); }
.fgs-section { padding: 20px; }
.fgs-preview { overflow: hidden; border-color: #b9ceca; background: linear-gradient(180deg, #fff 0%, #f3f9f7 100%); }
.fgs-results--pending .fgs-preview { border-color: #cbd3d5; }
.fgs-results--pending .fgs-legend { opacity: .32; }
.fgs-chart .empty-title { fill: var(--fgs-ink); font-size: 19px; font-weight: 750; }
.fgs-chart .empty-copy { fill: var(--fgs-muted); font-size: 13px; }
.fgs-preview__cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 12px -20px -20px; padding: 18px 20px; background: var(--fgs-carbon); color: #fff; }
.fgs-preview__cta p { margin: 0; max-width: 610px; color: #eef2f2; }
.fgs-preview__cta .fgs-button { flex: 0 0 auto; border-color: var(--fgs-copper); background: var(--fgs-copper); }
.fgs-section h2 small { display: block; margin-top: 3px; font-size: .65rem; font-weight: 600; letter-spacing: .03em; text-transform: none; }
.fgs-investment { padding: 22px; border-color: var(--fgs-carbon); background: linear-gradient(145deg, #171b1d 0%, #273034 100%); color: #fff; }
.fgs-investment__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.fgs-investment__header > div > span { color: #d99576; font-size: .74rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.fgs-investment h2 { margin-top: 3px; color: #fff; }
.fgs-investment__header > strong { max-width: 240px; color: #7ad8c5; font-size: 1.05rem; text-align: right; }
.fgs-investment__note { max-width: 800px; margin: 0 0 18px; color: #c8d0d2; font-size: .86rem; }
.fgs-investment__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fgs-investment__metrics > div { padding: 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: rgba(255,255,255,.07); }
.fgs-investment__metrics span { display: block; color: #c8d0d2; font-size: .74rem; }
.fgs-investment__metrics strong { display: block; margin-top: 4px; color: #7ad8c5; font-size: 1.45rem; }
.fgs-investment__metrics > div:first-child strong { color: #e4a184; }
.fgs-investment__metrics .fgs-negative strong { color: #f1a076; }
.fgs-investment__table { margin-top: 18px; }
.fgs-investment table { min-width: 700px; }
.fgs-investment th, .fgs-investment td { border-color: rgba(255,255,255,.16); color: #f5f7f7; }
.fgs-investment th { color: #c8d0d2; }
.fgs-investment td.fgs-s { color: #7ad8c5; }
.fgs-investment td.fgs-s.fgs-negative { color: #f1a076; }
.fgs-legend { display: flex; gap: 18px; margin-bottom: 8px; color: var(--fgs-muted); font-size: .8rem; }
.fgs-legend span { display: inline-flex; gap: 7px; align-items: center; }
.fgs-legend i { width: 18px; height: 4px; border-radius: 3px; }
.fgs-diesel-key { background: var(--fgs-diesel); }
.fgs-electric-key { background: var(--fgs-electric); }
.fgs-chart svg { display: block; width: 100%; height: auto; }
.fgs-chart text { fill: var(--fgs-muted); font-size: 12px; }
.fgs-chart .grid { stroke: var(--fgs-line); stroke-width: 1; }
.fgs-chart .line-d { stroke: var(--fgs-diesel); }
.fgs-chart .line-e { stroke: var(--fgs-electric); }
.fgs-chart .gap { fill: var(--fgs-electric); fill-opacity: .1; }
.fgs-chart .gap.fgs-negative { fill: var(--fgs-diesel); }
.fgs-chart .dot-d { fill: var(--fgs-diesel); }
.fgs-chart .dot-e { fill: var(--fgs-electric); }
.fgs-chart .value-d { fill: var(--fgs-diesel); font-weight: 700; }
.fgs-chart .value-e { fill: var(--fgs-electric); font-weight: 700; }
.fgs-table-wrap { overflow-x: auto; }
.fgs-simulator table { width: 100%; min-width: 560px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fgs-simulator th, .fgs-simulator td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--fgs-line); white-space: nowrap; }
.fgs-simulator th:first-child, .fgs-simulator td:first-child { text-align: left; }
.fgs-simulator th { color: var(--fgs-muted); font-size: .78rem; text-transform: uppercase; }
.fgs-simulator td.fgs-d { color: var(--fgs-diesel); }
.fgs-simulator td.fgs-e { color: var(--fgs-electric); }
.fgs-simulator td.fgs-s { color: var(--fgs-electric); font-weight: 700; }
.fgs-simulator td.fgs-s.fgs-negative { color: var(--fgs-danger); }
.fgs-simulator td small { display: block; color: var(--fgs-muted); font-size: .7rem; }
.fgs-section details { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--fgs-line); }
.fgs-section summary { cursor: pointer; font-weight: 650; }
.fgs-section ul { color: var(--fgs-muted); font-size: .84rem; }
.fgs-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fgs-button { min-height: 44px; padding: 10px 16px; border: 1px solid #111719; border-radius: 6px; background: #111719; color: #fff; cursor: pointer; font-weight: 700; }
.fgs-button--secondary { border-color: #abb6b9; background: #fff; color: var(--fgs-ink); }
.fgs-button:hover { filter: brightness(.95); }
.fgs-button:focus-visible { outline: 3px solid rgba(21,102,190,.35); outline-offset: 2px; }
.fgs-status { min-height: 1.4em; margin: -12px 0 0; color: var(--fgs-muted); font-size: .8rem; }
.fgs-disclaimer { margin: 0; color: var(--fgs-muted); font-size: .78rem; }
.fgs-modal-open { overflow: hidden; }
.fgs-modal { position: fixed; z-index: 99999; inset: 0; display: grid; place-items: center; padding: 18px; }
.fgs-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 14, 15, .78); backdrop-filter: blur(3px); }
.fgs-modal__panel { position: relative; z-index: 1; width: min(100%, 520px); max-height: calc(100vh - 36px); overflow-y: auto; padding: 28px; border-radius: 14px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.fgs-modal__panel h2 { margin-right: 38px; color: var(--fgs-ink); }
.fgs-modal__panel > p { color: var(--fgs-muted); }
.fgs-modal__panel label { display: block; margin: 15px 0; font-weight: 700; }
.fgs-modal__panel .fgs-control input { padding: 12px; }
.fgs-modal__close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--fgs-ink); cursor: pointer; font-size: 2rem; line-height: 1; }
.fgs-privacy { color: var(--fgs-muted); font-size: .78rem; }
.fgs-privacy a { color: var(--fgs-electric); }
.fgs-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.fgs-modal__status { min-height: 1.5em; margin: 12px 0 0; color: var(--fgs-electric); font-size: .84rem; font-weight: 700; }
.fgs-button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 860px) {
  .fgs-layout { grid-template-columns: 1fr; }
  .fgs-inputs { position: static; }
  .fgs-results { order: -1; }
}
@media (max-width: 620px) {
  .fgs-simulator { font-size: 15px; }
  .fgs-card { border-radius: 10px; }
  .fgs-inputs, .fgs-section, .fgs-investment { padding: 16px; }
  .fgs-hero { grid-template-columns: 1fr; }
  .fgs-metric { border-right: 0; border-bottom: 1px solid var(--fgs-line); }
  .fgs-metric:last-child { border-bottom: 0; }
  .fgs-metric--primary { grid-column: auto; }
  .fgs-periods { grid-template-columns: 1fr; }
  .fgs-battery-metrics { grid-template-columns: 1fr; }
  .fgs-investment__header { display: block; }
  .fgs-investment__header > strong { display: block; max-width: none; margin: 0 0 14px; text-align: left; }
  .fgs-investment__metrics { grid-template-columns: 1fr; }
  .fgs-actions { flex-direction: column; }
  .fgs-actions .fgs-button { width: 100%; }
  .fgs-preview__cta { display: block; margin: 12px -16px -16px; }
  .fgs-preview__cta .fgs-button { width: 100%; margin-top: 14px; }
  .fgs-modal { padding: 10px; }
  .fgs-modal__panel { max-height: calc(100vh - 20px); padding: 22px 18px; border-radius: 10px; }
}
@media print {
  .fgs-simulator .fgs-inputs, .fgs-simulator .fgs-actions { display: none !important; }
  .fgs-simulator .fgs-layout { display: block; }
  .fgs-simulator .fgs-card { box-shadow: none; break-inside: avoid; }
}
