:root {
  --background: #f8fafc;
  --foreground: #071f36;
  --surface: #ffffff;
  --surface-soft: #eef8fc;
  --surface-warm: #fff3df;
  --muted: #516274;
  --line: #d9e4ee;
  --line-strong: #b6c7d8;
  --brand: #0a345a;
  --brand-mid: #11406b;
  --brand-light: #164b7a;
  --accent: #3fc0e9;
  --orange: #ff9800;
  --orange-dark: #f57c00;
  --shadow: 0 18px 55px rgba(10, 52, 90, 0.12);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 252, 0)),
    var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
}

.redirect-page {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 228, 238, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(63, 192, 233, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--brand), var(--brand-light) 68%, var(--accent));
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--foreground);
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.nav-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7fb;
  padding: 4px;
}

.nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 0 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--foreground);
}

.nav-link.is-active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 5px 18px rgba(10, 52, 90, 0.1);
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--brand), var(--brand-light) 60%, var(--accent));
}

.page-hero-inner {
  display: grid;
  max-width: 1180px;
  min-height: 248px;
  margin: 0 auto;
  padding: 44px 22px;
  align-items: center;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 4rem;
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  color: var(--foreground);
  font-size: 1.32rem;
  line-height: 1.2;
}

.hero-copy p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero-visual {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(63, 192, 233, 0.18)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(7, 31, 54, 0.22);
}

.cctv-visual {
  display: grid;
  place-items: center;
}

.camera-lens {
  position: absolute;
  left: 28px;
  top: 34px;
  width: 84px;
  height: 84px;
  border: 14px solid #ffffff;
  border-radius: 50%;
  background: #071f36;
  box-shadow:
    inset 0 0 0 10px var(--brand-light),
    inset 0 0 0 17px var(--accent),
    0 18px 26px rgba(7, 31, 54, 0.25);
}

.drive-stack {
  position: absolute;
  right: 28px;
  bottom: 26px;
  display: grid;
  width: 150px;
  gap: 10px;
}

.drive-stack span {
  display: block;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 42px 0 0 rgba(63, 192, 233, 0.22);
}

.signal-lines {
  position: absolute;
  left: 106px;
  right: 150px;
  top: 82px;
  display: grid;
  gap: 14px;
}

.signal-lines span {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--orange);
}

.signal-lines span:nth-child(2) {
  width: 78%;
}

.signal-lines span:nth-child(3) {
  width: 58%;
}

.solar-visual {
  min-height: 205px;
}

.sun-disc {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 14px rgba(255, 152, 0, 0.2);
}

.panel-grid {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: grid;
  width: 168px;
  transform: skewY(-8deg);
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
}

.panel-grid span {
  display: block;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  background: var(--brand-mid);
  box-shadow: inset 0 -14px 0 rgba(255, 255, 255, 0.09);
}

.receipt-lines {
  position: absolute;
  right: 28px;
  bottom: 30px;
  display: grid;
  width: 132px;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px 14px;
}

.receipt-lines span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}

.receipt-lines span:first-child {
  width: 70%;
  background: var(--accent);
}

.tool-workspace {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 56px;
}

.workspace-grid {
  display: grid;
  align-items: start;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel,
.result-panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  margin-bottom: 22px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.input-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--foreground);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.input-shell {
  display: grid;
  min-width: 0;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  grid-template-columns: minmax(0, 1fr) auto;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--foreground);
  outline: none;
  padding: 0 12px;
}

.input-shell input {
  border: 0;
}

.input-shell small {
  padding-right: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.input-shell.compact input {
  min-height: 42px;
  padding-left: 10px;
}

.bimester-list {
  display: grid;
  gap: 8px;
}

.bimester-header,
.bimester-row {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: 116px minmax(0, 1fr) minmax(0, 1fr);
}

.bimester-header {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.bimester-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.bimester-row strong {
  color: var(--brand);
  font-size: 0.9rem;
}

.bimester-header.solar-simple-row,
.bimester-row.solar-simple-row {
  grid-template-columns: 116px minmax(0, 1fr);
}

input:focus,
select:focus,
.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 192, 233, 0.18);
}

input[type="range"] {
  height: 6px;
  min-height: 6px;
  accent-color: var(--accent);
  padding: 0;
}

.range-row {
  display: grid;
  align-items: center;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 64px;
}

.range-row strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 0.92rem;
}

.result-panel {
  position: sticky;
  top: 92px;
}

.result-main {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.result-main h2 {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 4rem;
  line-height: 1;
}

.result-main p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.result-main strong {
  color: var(--foreground);
}

.metric-list {
  display: grid;
  margin-top: 6px;
}

.metric-row {
  display: grid;
  padding: 16px 0;
  gap: 4px 16px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
}

.metric-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-row strong {
  color: var(--foreground);
  font-size: 1.02rem;
  text-align: right;
}

.metric-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.note-band {
  display: grid;
  margin-top: 18px;
  gap: 6px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: var(--surface-warm);
  padding: 14px 16px;
}

.note-band strong {
  color: #6b4000;
}

.note-band span {
  color: #6b4b16;
  font-size: 0.9rem;
  line-height: 1.45;
}

.solar-note {
  border-left-color: var(--accent);
  background: #eaf8fd;
}

.solar-note strong,
.solar-note span {
  color: var(--brand);
}

.primary-action {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.small-action {
  max-width: 180px;
  text-align: center;
}

.primary-action span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  line-height: 1;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--orange-dark);
  outline: none;
}

.solar-simple-result .result-main {
  border-bottom: 0;
  padding-bottom: 8px;
}

.solar-result-note {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #eaf8fd;
  padding: 16px;
}

.solar-result-note strong {
  color: var(--brand);
}

.solar-result-note span {
  color: var(--muted);
  line-height: 1.5;
}

.contact-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

a.primary-action {
  text-decoration: none;
}

.primary-action.whatsapp-action {
  background: #25d366;
}

.primary-action.whatsapp-action:hover,
.primary-action.whatsapp-action:focus-visible {
  background: #1da851;
}

.primary-action.email-action {
  background: var(--brand);
}

.primary-action.email-action:hover,
.primary-action.email-action:focus-visible {
  background: var(--accent);
  color: var(--brand);
}

@media (max-width: 900px) {
  .page-hero-inner,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-inner {
    padding-top: 34px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .hero-visual {
    min-height: 170px;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-link {
    flex: 1 1 0;
    padding: 0 8px;
    white-space: normal;
  }

  .page-hero-inner,
  .tool-workspace {
    padding-right: 16px;
    padding-left: 16px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .result-main h2 {
    font-size: 2.5rem;
  }

  .input-panel,
  .result-panel {
    padding: 18px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .range-row {
    grid-template-columns: 1fr;
  }

  .range-row strong {
    justify-content: flex-start;
    padding-left: 12px;
  }

  .bimester-header {
    display: none;
  }

  .bimester-row {
    grid-template-columns: 1fr;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric-row strong {
    text-align: left;
  }

  .camera-lens {
    left: 18px;
    width: 72px;
    height: 72px;
  }

  .drive-stack {
    right: 18px;
    width: 128px;
  }

  .signal-lines {
    left: 86px;
    right: 118px;
  }
}
