.water-chemistry-page-shell {
  padding-bottom: 50px;
}

.water-chemistry-tool {
  color: #22313f;
  margin: 35px 0 50px;
}

.water-chemistry-tool h1,
.water-chemistry-tool h2 {
  font-family: "Merriweather", Georgia, serif;
  color: #1d2a38;
}

.water-chemistry-hero {
  background: linear-gradient(135deg, #fffef9 0%, #fbf8ef 100%);
  border: 1px solid #e3d6b4;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(18, 33, 51, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 28px 30px;
}

.water-chemistry-hero-compact {
  margin-top: 20px;
  padding: 22px 24px;
}

.water-chemistry-hero-copy {
  flex: 1 1 620px;
}

.water-chemistry-hero-copy h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 12px;
}

.water-chemistry-lead {
  color: #34495e;
  font-size: 21px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.water-chemistry-subtle {
  color: #5f7083;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.water-chemistry-hero-note {
  align-self: flex-start;
  background: rgba(255, 255, 252, 0.96);
  border: 1px solid #e1d2aa;
  border-radius: 14px;
  color: #51606f;
  flex: 0 0 330px;
  line-height: 1.65;
  padding: 18px 20px;
}

.water-chemistry-section-header h2 {
  font-size: 30px;
  margin: 0 0 8px;
}

.water-chemistry-section-header p {
  color: #607181;
  line-height: 1.6;
  margin: 0 0 18px;
}

.water-chemistry-feedback .alert {
  border-radius: 14px;
  margin-bottom: 20px;
}

.water-chemistry-feedback-list {
  margin: 0;
  padding-left: 18px;
}

.water-chemistry-preset-panel,
.water-chemistry-card,
.water-chemistry-summary-card,
.water-chemistry-tip {
  background: #fff;
  border: 1px solid #e1e7ef;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(19, 34, 50, 0.06);
  margin-bottom: 24px;
  padding: 24px;
}

.water-chemistry-card-select {
  border-bottom: 1px solid #edf1f5;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.water-chemistry-card-soft {
  background: linear-gradient(180deg, #fffdfa 0%, #faf6ee 100%);
  border-color: #e2d7bd;
}

.water-chemistry-card-highlight {
  background: linear-gradient(180deg, #fffefb 0%, #fbf6e8 100%);
  border-color: #ddc98d;
}

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

.water-chemistry-preset-card {
  background: #fff;
  border: 1px solid #e4d6b0;
  border-radius: 14px;
  color: #304255;
  min-height: 94px;
  padding: 16px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.water-chemistry-preset-card:hover,
.water-chemistry-preset-card:focus,
.water-chemistry-preset-card.active {
  border-color: #c99a2b;
  box-shadow: 0 10px 20px rgba(171, 120, 10, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.water-chemistry-preset-title {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.water-chemistry-preset-meta {
  color: #6f7d8b;
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.water-chemistry-card-row {
  margin-bottom: 0;
}

.water-chemistry-main-layout {
  align-items: flex-start;
}

.water-chemistry-main-layout + .water-chemistry-card-row {
  margin-top: 20px;
}

.water-chemistry-main-left .water-chemistry-card:last-child,
.water-chemistry-results-column .water-chemistry-card:last-child {
  margin-bottom: 0;
}

.water-chemistry-results-column .water-chemistry-card-highlight {
  position: sticky;
  top: 20px;
}

.water-chemistry-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.water-chemistry-batch-columns {
  margin-left: -10px;
  margin-right: -10px;
}

.water-chemistry-batch-columns > [class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
}

.water-chemistry-batch-columns .water-chemistry-field:last-child {
  margin-bottom: 0;
}

.water-chemistry-field {
  flex: 1 1 150px;
  margin-bottom: 16px;
}

.water-chemistry-field-full {
  flex-basis: 100%;
}

.water-chemistry-target-picker-wide {
  margin-top: 18px;
}

.water-chemistry-field label {
  color: #314658;
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.water-chemistry-field .form-control,
.water-chemistry-grain-table .form-control {
  border: 1px solid #cdd7e3;
  border-radius: 12px;
  box-shadow: none;
  color: #22313f;
  font-size: 16px;
  height: 48px;
  max-width: 100%;
  padding: 10px 14px;
}

.water-chemistry-field .form-control:focus,
.water-chemistry-grain-table .form-control:focus {
  border-color: #c89323;
  box-shadow: 0 0 0 3px rgba(200, 147, 35, 0.13);
}

.water-chemistry-field-help {
  color: #718191;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 6px;
}

.water-chemistry-field-help-placeholder {
  opacity: 0;
  pointer-events: none;
}

.water-chemistry-batch-columns .water-chemistry-field-help {
  min-height: 40px;
}

.water-chemistry-grain-table th {
  border-top: none !important;
  color: #415363;
  font-size: 13px;
  text-transform: uppercase;
}

.water-chemistry-grain-table td {
  border-top: 1px solid #edf1f5 !important;
  vertical-align: middle !important;
}

.water-chemistry-grain-table th:last-child,
.water-chemistry-grain-table td:last-child {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.water-chemistry-grain-color {
  display: flex;
  gap: 10px;
}

.water-chemistry-actions-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.water-chemistry-ion-table th,
.water-chemistry-ion-table td {
  border-top: 1px solid #edf1f5 !important;
  text-align: center;
  vertical-align: middle !important;
}

.water-chemistry-ion-table thead th {
  border-top: none !important;
  color: #3a4c5d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.water-chemistry-ion-table tbody th {
  color: #314658;
  font-size: 15px;
  min-width: 110px;
  text-align: left;
}

.water-chemistry-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 16px;
}

.water-chemistry-status-card {
  background: #f7f9fb;
  border: 1px solid #e6ebf1;
  border-radius: 14px;
  padding: 14px;
}

.water-chemistry-status-title {
  color: #395063;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.water-chemistry-status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  text-transform: uppercase;
}

.water-chemistry-status-pill.status-low {
  background: #edf3fb;
  color: #3d6fb1;
}

.water-chemistry-status-pill.status-recommended {
  background: #ebf7ef;
  color: #258248;
}

.water-chemistry-status-pill.status-high {
  background: #fff3e3;
  color: #b56a16;
}

.water-chemistry-metric-list {
  border-top: 1px solid #e5d9b8;
  margin-top: 4px;
}

.water-chemistry-metric {
  align-items: center;
  border-bottom: 1px solid #e5d9b8;
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
}

.water-chemistry-metric span {
  color: #506171;
}

.water-chemistry-metric strong,
.water-chemistry-ratio-value,
.water-chemistry-acid-values strong {
  color: #b67e12;
  font-size: 19px;
  font-weight: 700;
}

.water-chemistry-ratio-card,
.water-chemistry-acid-card {
  background: rgba(255, 254, 249, 0.94);
  border: 1px solid #e3d4ac;
  border-radius: 16px;
  margin-top: 20px;
  padding: 20px;
}

.water-chemistry-ratio-title,
.water-chemistry-acid-title {
  color: #2d4052;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.water-chemistry-ratio-value {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}

.water-chemistry-ratio-label {
  color: #47596a;
  font-size: 18px;
  margin-bottom: 14px;
}

.water-chemistry-ratio-scale {
  align-items: center;
  color: #6c7d8c;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
}

.water-chemistry-ratio-track {
  background: linear-gradient(90deg, #c79a48 0%, #ecd993 48%, #b9d484 100%);
  border-radius: 999px;
  height: 12px;
  position: relative;
}

.water-chemistry-ratio-marker {
  background: #22313f;
  border-radius: 999px;
  height: 18px;
  left: 50%;
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  width: 6px;
}

.water-chemistry-acid-values > div {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.water-chemistry-acid-values span {
  color: #516272;
  padding-right: 12px;
}

.water-chemistry-actions .btn,
.water-chemistry-actions-inline .btn {
  background: #b2292e;
  border: 1px solid #a12227;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
}

.water-chemistry-actions .btn:hover,
.water-chemistry-actions .btn:focus,
.water-chemistry-actions-inline .btn:hover,
.water-chemistry-actions-inline .btn:focus {
  background: #9f2227;
  color: #fff;
}

.water-chemistry-actions {
  margin-top: 18px;
}

.water-chemistry-calc-note {
  color: #718191;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 10px;
  text-align: center;
}

.water-chemistry-remove-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  color: #6f7f8f;
  display: inline-flex;
  font-size: 28px;
  height: 46px;
  justify-content: center;
  line-height: 1;
  min-width: 46px;
  padding: 0;
}

.water-chemistry-remove-row:hover,
.water-chemistry-remove-row:focus {
  background: #fff4f4;
  border-color: #d56a6d;
  color: #b2292e;
}

.water-chemistry-summary-text {
  border-radius: 14px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  resize: vertical;
}

.water-chemistry-info-card {
  min-height: 100%;
}

.water-chemistry-info-list,
.water-chemistry-style-list {
  margin: 0;
  padding: 0;
}

.water-chemistry-style-group {
  margin-bottom: 18px;
}

.water-chemistry-style-group:last-child {
  margin-bottom: 0;
}

.water-chemistry-style-group h3 {
  color: #a96f0d;
  font-family: "Bree Serif", Georgia, serif;
  font-size: 22px;
  margin: 0 0 6px;
}

.water-chemistry-info-list li {
  color: #45586a;
  line-height: 1.7;
  list-style: none;
  margin-bottom: 14px;
}

.water-chemistry-style-item {
  border-bottom: 1px solid #edf1f5;
  color: #4c5f70;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
}

.water-chemistry-style-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.water-chemistry-style-item strong {
  color: #1f3143;
  font-size: 21px;
  font-weight: 700;
}

.water-chemistry-style-item small {
  color: #738392;
  font-size: 14px;
}

.water-chemistry-tip {
  background: linear-gradient(135deg, #fffdf4 0%, #faf3dd 100%);
  border-color: #e0cf99;
  color: #516170;
  font-size: 18px;
  line-height: 1.7;
}

.water-chemistry-tip strong {
  color: #a96f0d;
}

.water-chemistry-iframe-body {
  background: #fff;
}

.water-chemistry-page-shell-iframe .water-chemistry-tool {
  margin-top: 20px;
}

.water-chemistry-page-shell-iframe .water-chemistry-hero-copy h1 {
  font-size: 32px;
}

@media (max-width: 1199px) {
  .water-chemistry-preset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .water-chemistry-hero-copy h1 {
    font-size: 36px;
  }

  .water-chemistry-lead {
    font-size: 19px;
  }
}

@media (max-width: 991px) {
  .water-chemistry-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .water-chemistry-results-column .water-chemistry-card-highlight {
    position: static;
  }

  .water-chemistry-tool {
    margin-top: 20px;
  }

  .water-chemistry-hero,
  .water-chemistry-preset-panel,
  .water-chemistry-card,
  .water-chemistry-summary-card,
  .water-chemistry-tip {
    padding: 20px;
  }

  .water-chemistry-ratio-value {
    font-size: 34px;
  }
}

@media (max-width: 767px) {
  .water-chemistry-preset-grid {
    grid-template-columns: 1fr;
  }

  .water-chemistry-hero-copy h1 {
    font-size: 30px;
  }

  .water-chemistry-lead {
    font-size: 18px;
  }

  .water-chemistry-inline-fields {
    display: block;
  }

  .water-chemistry-batch-columns {
    margin-left: -15px;
    margin-right: -15px;
  }

  .water-chemistry-grain-color {
    flex-direction: column;
  }

  .water-chemistry-preset-title {
    font-size: 19px;
  }

  .water-chemistry-style-item strong {
    font-size: 18px;
  }

  .water-chemistry-tip {
    font-size: 16px;
  }
}

@media print {
  .headerDiv,
  #webfooter,
  .water-chemistry-preset-panel,
  .water-chemistry-actions,
  .water-chemistry-actions-inline,
  .water-chemistry-info-card,
  .water-chemistry-tip,
  .row.marginTop20.marginBottom10,
  .row.marginTop20.marginBottom20 {
    display: none !important;
  }

  .water-chemistry-tool,
  .water-chemistry-page-shell {
    margin: 0 !important;
    padding: 0 !important;
  }

  .water-chemistry-card,
  .water-chemistry-summary-card {
    border: 1px solid #d8dde5 !important;
    box-shadow: none !important;
    margin-bottom: 16px !important;
  }
}
