:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5d6a75;
  --line: #d9e1e7;
  --soft: #eef5f2;
  --paper: #ffffff;
  --brand: #0a7f6d;
  --brand-dark: #075d51;
  --accent: #f3b23f;
  --danger: #a43d3d;
  --shadow: 0 18px 45px rgba(17, 33, 43, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7faf9;
}

a {
  color: var(--brand);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.15rem;
}

nav {
  display: flex;
  gap: 18px;
  font-weight: 650;
}

nav a {
  text-decoration: none;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: end;
  gap: 32px;
  padding: 72px clamp(20px, 5vw, 72px) 48px;
  background:
    linear-gradient(90deg, rgba(10, 127, 109, .86), rgba(23, 33, 43, .48)),
    url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: white;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: .95;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  font-size: 1.2rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 12px;
  color: inherit;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-metrics {
  display: grid;
  gap: 10px;
}

.hero-metrics span {
  padding: 14px 16px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  font-weight: 750;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  width: min(1180px, calc(100% - 40px));
  margin: 36px auto 72px;
  align-items: start;
}

.estimate-form,
.results-card,
.report article,
.report-text,
.message-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.estimate-form {
  padding: clamp(20px, 3vw, 34px);
}

fieldset {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

legend,
.report h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 850;
}

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

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

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

input:focus,
select:focus {
  outline: 3px solid rgba(10, 127, 109, .16);
  border-color: var(--brand);
}

.hint,
.fineprint {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.map-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.map-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed #aac2b8;
  border-radius: 8px;
  text-align: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: var(--brand-dark);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  width: 100%;
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.button.small {
  min-height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  font-size: .85rem;
}

.results-card {
  position: sticky;
  top: 88px;
  padding: 28px;
}

.results-card .eyebrow {
  color: var(--brand);
}

.results-card h2 {
  margin: 0 0 22px;
  font-size: 2rem;
  line-height: 1.15;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.report,
.admin,
.message-panel {
  width: min(1120px, calc(100% - 40px));
  margin: 36px auto;
}

.report-hero {
  padding: 48px clamp(20px, 5vw, 56px);
  color: white;
  background: linear-gradient(110deg, var(--brand-dark), #22313b);
  border-radius: 8px;
}

.report-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.report article,
.report-text {
  padding: 24px;
}

.report-text p {
  color: var(--muted);
  line-height: 1.65;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-weight: 800;
  text-decoration: none;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-header h1 {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  font-size: .8rem;
  text-transform: uppercase;
}

.status-form select {
  min-width: 150px;
}

.mail-form {
  margin-top: 6px;
}

small {
  color: var(--danger);
  font-weight: 700;
}

.simple-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.message-panel {
  padding: 32px;
  text-align: center;
}

.admin-login form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  text-align: left;
}

.login-back {
  margin-top: 12px;
}

.error-text {
  color: var(--danger);
  font-weight: 800;
}

.notification-pixel {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

  .results-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two,
  .map-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 520px;
  }

  dl div {
    display: grid;
    gap: 4px;
  }

  dd {
    text-align: left;
  }
}
