:root {
  --bg: #f6f7f3;
  --panel: #ffffff;
  --ink: #152016;
  --muted: #647067;
  --line: #dce2d8;
  --green: #166534;
  --green-soft: #e8f5ec;
  --amber: #9a5b00;
  --amber-soft: #fff3d8;
  --red: #9f1239;
  --red-soft: #ffe4e9;
  --shadow: 0 18px 50px rgba(20, 32, 22, 0.1);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: end;
  padding: 30px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 101, 52, 0.1), transparent 54%),
    var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-verdict {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-verdict span,
.summary-grid span,
.station-meta span,
.saving-row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-verdict strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
}

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

.controls {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

select,
input {
  min-height: 44px;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.input-unit {
  position: relative;
}

.input-unit input {
  padding-right: 44px;
}

.input-unit span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  transform: translateY(-50%);
}

.summary-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.results,
.notes,
.test-log {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

button,
.map-link {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.station-list {
  display: grid;
  gap: 12px;
}

.station-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.station-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.station-title h3 {
  margin: 0;
  font-size: 1.12rem;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.badge.maybe {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.bad {
  background: var(--red-soft);
  color: var(--red);
}

.station-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.station-address {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.station-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
}

.saving-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.saving-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saving-row strong {
  font-size: 1.02rem;
}

.saving-row.net strong {
  color: var(--green);
  font-size: 1.25rem;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.notes ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.test-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.wide-label {
  margin-top: 14px;
}

.log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.log-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.log-entry {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.log-entry strong {
  display: block;
  margin-bottom: 4px;
}

.log-entry p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .hero,
  .station-card {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .controls,
  .summary-grid,
  .station-meta,
  .test-form {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
