:root {
  --bg: #f3efe5;
  --surface: rgba(255, 253, 247, 0.82);
  --surface-strong: #fffdf8;
  --text: #18352b;
  --muted: #587066;
  --line: rgba(24, 53, 43, 0.12);
  --primary: #1e6a52;
  --primary-dark: #154b3a;
  --accent: #a9ca77;
  --accent-soft: rgba(169, 202, 119, 0.18);
  --shadow: 0 24px 60px rgba(24, 53, 43, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body.tool-page {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(169, 202, 119, 0.24), transparent 28%),
    linear-gradient(180deg, #ecf3e8 0%, var(--bg) 36%, #f8f4ec 100%);
}

.tool-i18n-loading body.tool-page {
  visibility: hidden;
}

body.tool-page a {
  color: inherit;
  text-decoration: none;
}

.tool-shell {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.tool-hero__copy,
.tool-hero__meta,
.tool-panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.tool-hero__copy {
  padding: 2rem;
  border-radius: 34px;
}

.tool-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.tool-backlink::before {
  content: "\2190";
}

.tool-eyebrow,
.panel-step,
.meta-label,
.field-label {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
}

.tool-hero h1,
.tool-panel h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  line-height: 1.06;
}

.tool-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  max-width: 12ch;
}

.tool-lead,
.tool-hero__meta,
.panel-copy,
.dynamic-form label,
.results-shell {
  color: var(--muted);
}

.tool-lead {
  max-width: 58ch;
  margin: 1rem 0 0;
  font-size: 1.05rem;
}

.tool-hero__meta {
  padding: 1.5rem;
  border-radius: 28px;
}

.tool-language-switch {
  display: flex;
  width: fit-content;
  gap: 0.2rem;
  margin: 0 0 1.1rem auto;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.tool-language-switch a {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.tool-language-switch a[aria-current="page"] {
  color: #fff;
  background: var(--primary);
}

.tool-hero__meta ol {
  margin: 0;
  padding-left: 1.2rem;
}

.tool-hero__meta li + li {
  margin-top: 0.55rem;
}

.tool-main {
  display: grid;
  gap: 1.5rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.5rem;
}

.tool-panel {
  border-radius: 30px;
  padding: 1.6rem;
}

.panel-head {
  margin-bottom: 1.2rem;
}

.tool-panel h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.panel-copy {
  margin: 0.7rem 0 0;
}

.selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: 1rem;
}

.selector-block {
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(249,246,238,0.88));
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.selector-block--password {
  background: linear-gradient(180deg, rgba(169, 202, 119, 0.13), rgba(255,255,255,0.82));
}

.form-select,
.form-control {
  border-radius: 16px;
  border: 1px solid rgba(24, 53, 43, 0.14);
  min-height: 52px;
  padding-inline: 1rem;
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: none !important;
}

.form-select:focus,
.form-control:focus {
  border-color: rgba(30, 106, 82, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 106, 82, 0.12) !important;
}

.dynamic-form,
.results-shell {
  min-height: 440px;
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(246,241,231,0.9));
  border: 1px dashed rgba(24, 53, 43, 0.18);
}

.dynamic-form:not(.empty-state),
.results-shell:not(.empty-state) {
  display: block;
  min-height: auto;
  padding: 1.35rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(246,241,231,0.94));
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.dynamic-form .mb-1,
.dynamic-form .mb-3,
.dynamic-form .form-check {
  margin-bottom: 1rem !important;
}

.dynamic-form .form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.dynamic-form .form-check-input {
  margin-top: 0;
  flex: 0 0 auto;
}

.dynamic-form > div[id="vnp1"],
.dynamic-form > div[id="drasbl1"] {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.dynamic-form button,
.results-shell button,
.buttonish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #2f7d63);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(30, 106, 82, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dynamic-form button:hover,
.results-shell button:hover,
.buttonish:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(30, 106, 82, 0.24);
}

.results-shell {
  font-size: 0.98rem;
  line-height: 1.7;
}

.results-shell p {
  margin-bottom: 0.8rem;
}

.results-shell br + br {
  display: block;
  content: "";
  margin-top: 0.55rem;
}

.results-shell b,
.results-shell strong {
  color: var(--primary-dark);
}

.result-body {
  display: grid;
  gap: 1rem;
}

.result-summary-card {
  padding: 1.35rem;
  border-radius: 22px;
  border: 1px solid rgba(30, 106, 82, 0.18);
  background: rgba(255, 255, 255, 0.86);
}

.result-summary-card h3 {
  margin: 0 0 0.65rem;
  font-family: "Manrope", sans-serif;
  color: var(--primary-dark);
}

.result-summary-card p {
  max-width: 760px;
  color: var(--muted);
}

.result-message-card {
  border-color: rgba(141, 61, 24, 0.18);
}

.result-notice {
  padding: 0.85rem;
  border-radius: 14px;
  margin-top: 0.75rem;
}

.result-notice ul {
  padding-left: 1.05rem;
}

.result-notice--message {
  background: rgba(141, 61, 24, 0.1);
  border: 1px solid rgba(141, 61, 24, 0.18);
}

.result-notice--warning {
  background: rgba(242, 166, 90, 0.16);
  border: 1px solid rgba(141, 61, 24, 0.16);
}

.result-notice--error {
  background: rgba(150, 45, 45, 0.1);
  border: 1px solid rgba(150, 45, 45, 0.18);
}

.result-advisory-card {
  border-color: rgba(30, 106, 82, 0.16);
  background: rgba(169, 202, 119, 0.12);
}

.result-confidence-card {
  border-color: rgba(30, 106, 82, 0.16);
}

.result-confidence-card h3 {
  color: var(--primary-dark);
}

.result-details {
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.result-details summary {
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  color: var(--primary-dark);
}

.result-details ul {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  .toggle-grid {
    grid-template-columns: 1fr;
  }
  .tool-hero,
  .tool-grid,
  .selector-grid {
    grid-template-columns: 1fr;
  }

  .dynamic-form,
  .results-shell {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .tool-shell {
    width: min(100% - 1rem, 1220px);
    padding-top: 1rem;
  }

  .tool-hero__copy,
  .tool-hero__meta,
  .tool-panel {
    padding: 1.2rem;
    border-radius: 24px;
  }

  .selector-block,
  .dynamic-form:not(.empty-state),
  .results-shell:not(.empty-state) {
    border-radius: 18px;
  }
}



.option-section {
  margin-bottom: 1.1rem;
}

.option-title {
  margin: 0 0 0.7rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.toggle-grid,
.binary-group {
  display: grid;
  gap: 0.8rem;
}

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

.toggle-item,
.binary-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 72px;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 53, 43, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.toggle-item:hover,
.binary-option:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 106, 82, 0.26);
  box-shadow: 0 10px 24px rgba(24, 53, 43, 0.08);
}

.toggle-item span,
.binary-option span {
  font-weight: 600;
  color: var(--text);
}

.toggle-item .form-check-input,
.binary-option .form-check-input {
  margin: 0;
  width: 1.2rem;
  height: 1.2rem;
}

@media (max-width: 960px) {
  .toggle-grid {
    grid-template-columns: 1fr;
  }
}

.tool-hero--compact .tool-hero__copy {
  padding-block: 1.6rem;
}

.wizard-panel {
  display: grid;
  gap: 1.25rem;
}

.wizard-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 1rem;
  align-items: start;
}

.wizard-password {
  padding: 0.9rem;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.progress-step {
  min-height: 44px;
  border: 1px solid rgba(24, 53, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-weight: 700;
}

.progress-step.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.progress-step.is-complete {
  color: var(--primary-dark);
  background: var(--accent-soft);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.wizard-alerts {
  display: grid;
  gap: 0.75rem;
}

.alert-block {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(24, 53, 43, 0.1);
  background: rgba(255, 255, 255, 0.78);
}

.alert-block ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.alert-block--error {
  color: #70221c;
  border-color: rgba(154, 52, 42, 0.25);
  background: rgba(255, 240, 237, 0.86);
}

.alert-block--warning {
  color: #6d4a0c;
  border-color: rgba(221, 139, 32, 0.28);
  background: rgba(255, 248, 226, 0.9);
}

.case-layout,
.technical-layout,
.site-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.case-option {
  min-height: 118px;
  padding: 1rem;
  text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(24, 53, 43, 0.12);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.case-option span,
.case-option small {
  display: block;
}

.case-option span {
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.case-option small {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.45;
}

.case-option.is-selected {
  border-color: rgba(30, 106, 82, 0.55);
  background: linear-gradient(180deg, rgba(169, 202, 119, 0.24), rgba(255,255,255,0.92));
  box-shadow: 0 14px 34px rgba(30, 106, 82, 0.14);
}

.case-explanation,
.field-help-panel,
.site-map-card,
.site-fields,
.review-card,
.choice-field {
  padding: 1.15rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(24, 53, 43, 0.08);
}

.case-explanation h3,
.field-help-panel h3,
.review-card h3 {
  margin: 0 0 0.75rem;
  font-family: "Manrope", sans-serif;
}

.field-help-panel h4 {
  margin: 0 0 0.75rem;
  font-family: "Manrope", sans-serif;
  color: var(--primary-dark);
}

.field-help-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.case-explanation ul,
.field-help-panel ul,
.review-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.site-map {
  min-height: 390px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(24, 53, 43, 0.12);
  background: rgba(30, 106, 82, 0.08);
}

.map-helper,
.location-summary {
  margin: 0.85rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 2px solid;
}

.legend-dot--station {
  border-color: #14543e;
  background: #a9ca77;
}

.legend-dot--runoff {
  border-color: #8d3d18;
  background: #f2a65a;
}

.legend-dot--both {
  border-color: #14543e;
  background: linear-gradient(90deg, #a9ca77 0 50%, #f2a65a 50% 100%);
}

.climate-marker {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(24, 53, 43, 0.82);
  box-shadow: 0 4px 10px rgba(24, 53, 43, 0.28);
}

.climate-marker--station {
  background: #a9ca77;
  border-color: #14543e;
}

.climate-marker--runoff {
  background: #f2a65a;
  border-color: #8d3d18;
}

.climate-marker--both {
  background: linear-gradient(90deg, #a9ca77 0 50%, #f2a65a 50% 100%);
  border-color: #14543e;
}

.climate-tooltip {
  border: 1px solid rgba(24, 53, 43, 0.12);
  border-radius: 10px;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(24, 53, 43, 0.16);
}

.map-tooltip {
  line-height: 1.45;
}

.defaults-summary {
  margin-top: 0.85rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(30, 106, 82, 0.14);
  background: rgba(169, 202, 119, 0.12);
  color: var(--muted);
  line-height: 1.5;
}

.defaults-summary--technical {
  margin-top: 1rem;
}

.defaults-title {
  margin: 0 0 0.45rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  color: var(--primary-dark);
}

.defaults-summary p,
.review-card .review-note {
  margin: 0.45rem 0 0;
}

.defaults-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.7rem 0 0;
}

.defaults-list div {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.defaults-list dt {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
}

.defaults-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.defaults-note,
.review-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.site-fields,
.context-grid,
.suitability-grid {
  display: grid;
  gap: 1rem;
}

.suitability-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 1rem;
}

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

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

.field-block {
  display: grid;
  gap: 0.35rem;
}

.choice-field {
  margin: 0;
}

.choice-field legend {
  float: none;
  width: auto;
}

.choice-field label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.55rem 0;
  color: var(--muted);
}

.technical-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
}

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

.review-card--wide {
  margin-top: 1rem;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
}

.review-table th,
.review-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(24, 53, 43, 0.1);
  vertical-align: top;
}

.review-table th {
  width: 34%;
  color: var(--primary-dark);
}

.review-ok {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(169, 202, 119, 0.16);
  color: var(--primary-dark);
  font-weight: 700;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.button-secondary {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(24, 53, 43, 0.14);
  box-shadow: none;
}

@media (max-width: 960px) {
  .wizard-topbar,
  .case-layout,
  .technical-layout,
  .suitability-layout,
  .site-grid,
  .context-grid,
  .suitability-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .wizard-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .wizard-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-map {
    min-height: 310px;
  }

  .wizard-actions {
    flex-direction: column-reverse;
  }

  .wizard-actions .buttonish {
    width: 100%;
  }
}
