:root {
  --bg: #eef3f1;
  --ink: #16201c;
  --muted: #64736c;
  --panel: #ffffff;
  --line: #d6e0dc;
  --green: #176b5f;
  --green-dark: #0f4c44;
  --blue: #245d91;
  --yellow: #f5c84b;
  --red: #a94732;
  --soft-green: #e4f2ee;
  --soft-blue: #e7eef6;
  --shadow: 0 16px 40px rgba(22, 32, 28, 0.08);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(23, 107, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(245, 200, 75, 0.12), transparent 28%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 22px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(9, 43, 38, 0.86), rgba(9, 43, 38, 0.28)),
    url("https://kae.tec.br/wp-content/uploads/2025/02/instalacao-de-wallbox-para-BYD-Mini-Dolphin.jpg") center/cover;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: #d5f5ea;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 1.05rem;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.metric,
.panel,
.result-card,
.fuel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.metric span,
.result-card span,
.fuel-card span,
label,
small,
.sentence,
.notes {
  color: var(--muted);
}

.metric strong,
.result-card strong,
.fuel-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.controls {
  position: sticky;
  top: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 13px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus {
  outline: 3px solid rgba(23, 107, 95, 0.18);
  border-color: var(--green);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button.ghost {
  color: var(--green);
  background: var(--soft-green);
}

a.kae {
    display: inline-block;
    padding: 10px 18px;
    background: #2f5c12;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

a.kae:hover {
    background: #5edf36;
    text-decoration: none;
    color: #000;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.field-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.results {
  display: grid;
  gap: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.result-card,
.fuel-card {
  padding: 14px;
}

.result-card.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.result-card.primary span {
  color: #d5f5ea;
}

.sentence {
  margin-top: 14px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--soft-blue);
  font-weight: 700;
}

.fuel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.fuel-card.electric {
  border-color: rgba(23, 107, 95, 0.35);
  background: var(--soft-green);
}

.notes {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  line-height: 1.45;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .result-grid,
  .fuel-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    min-height: 520px;
    padding: 18px;
    align-items: end;
    background:
      linear-gradient(0deg, rgba(9, 43, 38, 0.92), rgba(9, 43, 38, 0.2)),
      url("https://kae.tec.br/wp-content/uploads/2025/02/instalacao-de-wallbox-para-BYD-Mini-Dolphin.jpg") center/cover;
  }

  h1 {
    font-size: 2.15rem;
  }

  .field-grid,
  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }
}


.sentence {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #16a34a;
  border-radius: 8px;
  line-height: 1.6;
}