:root {
  --ink: #17201b;
  --muted: #65736d;
  --line: #dce5df;
  --paper: #fbfdfb;
  --panel: #ffffff;
  --field: #f4f8f5;
  --green: #1f8f62;
  --green-2: #0f6f4d;
  --blue: #2f6fed;
  --amber: #d28718;
  --red: #c44536;
  --shadow: 0 24px 60px rgba(26, 51, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(47, 111, 237, 0.08), transparent 28rem),
    linear-gradient(180deg, #f5faf7 0%, #fbfdfb 42%, #eef5f0 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 229, 223, 0.85);
  background: rgba(251, 253, 251, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.actions,
.input-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.nav {
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.language-switch {
  display: flex;
  width: auto;
  min-width: 168px;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-switch select {
  min-height: 36px;
  max-width: 132px;
  padding: 7px 9px;
  background: #fff;
  font-size: 13px;
}

.nav a:hover {
  color: var(--ink);
}

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

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 34px;
  align-items: stretch;
  min-height: 360px;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.lede {
  max-width: 670px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.site-visual {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 239, 0.82)),
    url("data:image/svg+xml,%3Csvg width='920' height='680' viewBox='0 0 920 680' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c8d7ce' stroke-width='1'%3E%3Cpath d='M0 520h920M0 560h920M0 600h920M0 640h920M80 0v680M200 0v680M320 0v680M440 0v680M560 0v680M680 0v680M800 0v680'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.sun-disc {
  position: absolute;
  top: 38px;
  right: 46px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #f5b43c;
  box-shadow: 0 0 0 18px rgba(245, 180, 60, 0.16);
}

.panel-field {
  position: absolute;
  right: 70px;
  bottom: 60px;
  display: grid;
  grid-template-columns: repeat(4, 58px);
  gap: 10px;
  transform: perspective(560px) rotateX(58deg) rotateZ(-7deg);
}

.panel-field span {
  height: 96px;
  border: 1px solid rgba(47, 111, 237, 0.4);
  border-radius: 4px;
  background: linear-gradient(145deg, #17345c, #2f6fed 58%, #17345c);
}

.asset-node {
  position: absolute;
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(21, 44, 32, 0.1);
}

.factory {
  left: 42px;
  bottom: 82px;
}

.storage {
  left: 190px;
  top: 90px;
}

.pump {
  left: 70px;
  top: 178px;
}

.energy-line {
  position: absolute;
  height: 3px;
  transform-origin: left center;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.line-a {
  left: 166px;
  top: 130px;
  width: 190px;
  transform: rotate(18deg);
}

.line-b {
  left: 158px;
  top: 220px;
  width: 240px;
  transform: rotate(-12deg);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: 22px;
  margin-top: 24px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(26, 51, 38, 0.08);
}

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

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

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.full {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(47, 111, 237, 0.2);
  outline-offset: 2px;
}

.input-row {
  gap: 8px;
}

.input-row select {
  max-width: 96px;
}

.unit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.file-preview {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
}

.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

button,
.primary-link,
.link-button {
  cursor: pointer;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button,
.link-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 0 18px;
  font-size: 15px;
}

.primary-button:hover,
.link-button:hover {
  background: var(--green-2);
}

.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.primary-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(31, 143, 98, 0.28);
  background: rgba(31, 143, 98, 0.1);
  color: var(--green-2);
  padding: 0 14px;
  font-size: 14px;
}

.link-button-light {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--ink);
}

.actions {
  gap: 10px;
}

.score-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f1f8f3, #edf5ff);
}

.score-card > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.score-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

#scoreValue {
  font-size: 54px;
  line-height: 1;
}

#scoreRating {
  font-weight: 850;
}

.score-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 32, 27, 0.12);
}

.score-meter span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

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

.metric {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: 22px;
  line-height: 1.15;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-grid article,
.risk-list {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-grid p,
.risk-list li {
  color: var(--muted);
  line-height: 1.52;
}

.risk-list {
  margin-top: 14px;
}

.ai-notes {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(47, 111, 237, 0.22);
  border-radius: 8px;
  background: #f4f8ff;
}

.ai-notes p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.risk-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  align-items: start;
  gap: 24px;
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17201b;
  color: #fff;
}

.contact-band .eyebrow {
  color: #82dfae;
}

.contact-band h2 {
  max-width: 720px;
}

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

.lead-form input {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lead-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.lead-form button,
.lead-status {
  grid-column: 1 / -1;
}

.lead-status {
  min-height: 20px;
  margin: 0;
  color: #bce9cf;
  font-size: 13px;
}

@media (max-width: 960px) {
  .intro,
  .workspace,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .site-visual {
    min-height: 300px;
  }

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

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav,
  .language-switch {
    width: 100%;
    justify-content: space-between;
  }

  .language-switch select {
    max-width: 190px;
  }

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

  .contact-band {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 42px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .intro,
  .form-panel,
  .contact-band,
  .actions {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
    margin: 0;
  }

  .result-panel {
    border: 0;
    box-shadow: none;
    padding: 18mm;
  }

  .metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
