.calc-hero {
  background: #203e32;
  color: #f7f8ee;
  padding: 56px 0 48px;
}

.calc-hero em {
  color: #b4d1a3;
}

.calc-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 40px;
  align-items: center;
}

.calc-hero-inner > *,
.frost-inputs > *,
.calc-toolbar > * {
  min-width: 0;
}

.calc-hero h1 {
  font-size: clamp(36px, 4.4vw, 56px);
  margin: 16px 0 16px;
}

.calc-hero .hero-lede {
  max-width: 520px;
  font-size: 16px;
}

.frost-card {
  background: #fbfcf7;
  color: #253b30;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 18px 46px rgba(16, 41, 31, 0.28);
  border: 1px solid #d5e0d0;
}

.frost-card-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #486447;
  margin: 0 0 14px;
}

.frost-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.frost-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.frost-field span {
  font-size: 12px;
  font-weight: 700;
  color: #35503b;
}

.frost-field input,
.frost-field select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #c3d1be;
  border-radius: 8px;
  background: #fff;
  color: #203e32;
  font: 600 16px/1.3 Manrope, Arial, sans-serif;
}

.frost-card-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #546c56;
}

.frost-card-note a {
  color: #2e5633;
  font-weight: 700;
  text-underline-offset: 3px;
}

.calc-workspace {
  padding: 36px 0 72px;
}

.calc-toolbar {
  background: #fff;
  border: 1px solid #d8e2d3;
  border-radius: 14px;
  padding: 18px 20px;
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.toolbar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1 1 260px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #c9d6c4;
  border-radius: 8px;
  background: #f9faf5;
  color: #203e32;
  font-size: 14px;
}

.search-wrap input::placeholder {
  color: #6a806b;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #bdcbb8;
  border-radius: 8px;
  background: #f4f7ee;
  color: #203e32;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.print-btn:hover {
  background: #e5eee0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid #d2ddd0;
  border-radius: 999px;
  background: #f9faf5;
  color: #36503b;
  font-size: 13px;
  font-weight: 700;
}

.pill-btn span {
  font-size: 11px;
  color: #677f69;
  font-weight: 600;
}

.pill-btn:hover {
  background: #edf3e7;
}

.pill-btn[aria-pressed="true"] {
  background: #203e32;
  border-color: #203e32;
  color: #f7f8ee;
}

.pill-btn[aria-pressed="true"] span {
  color: #c2d7b9;
}

.popular-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.popular-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b745d;
  margin-right: 4px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid #d5dfd0;
  border-radius: 999px;
  background: #fff;
  color: #324c38;
  font-size: 12px;
  font-weight: 650;
}

.chip-btn:hover {
  background: #eef4e8;
}

.chip-btn.is-saved {
  background: #e3eedd;
  border-color: #8eb084;
  color: #203e32;
}

.toolbar-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #e6ede2;
  padding-top: 12px;
}

.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #253b30;
  cursor: pointer;
}

.saved-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #203e32;
}

.saved-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.clear-saved-btn {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  color: #5a725c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clear-saved-btn[hidden] {
  display: none;
}

.results-summary {
  margin: 0;
  font-size: 12px;
  color: #5a725c;
  font-weight: 600;
}

.results-card {
  background: #fff;
  border: 1px solid #d8e2d3;
  border-radius: 14px;
  overflow: hidden;
}

.results-card[hidden],
.frost-free-banner[hidden] {
  display: none;
}

.frost-free-banner {
  background: #f0f4e8;
  border: 1px solid #c5d4be;
  border-radius: 14px;
  padding: 22px 24px;
  color: #203e32;
}

.frost-free-banner h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #203e32;
}

.frost-free-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #465e49;
}

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

.calc-table thead th {
  text-align: left;
  padding: 13px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #4b654c;
  background: #f3f6ee;
  border-bottom: 1px solid #dde6d8;
}

.calc-table tbody tr {
  border-bottom: 1px solid #ebf0e7;
}

.calc-table tbody tr:last-child {
  border-bottom: 0;
}

.calc-table tbody tr.is-saved {
  background: #f6faf2;
}

.calc-table td {
  padding: 13px 16px;
  vertical-align: middle;
}

.crop-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.crop-glyph {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 3px;
  border-radius: 8px;
  background: #f4f7ee;
  border: 1px solid #e1e9dc;
}

.crop-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.crop-meta strong {
  font-size: 15px;
  font-weight: 700;
  color: #203e32;
  line-height: 1.3;
}

.crop-meta span {
  font-size: 12px;
  color: #637965;
}

.cell-date strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  color: #203e32;
  line-height: 1.35;
}

.cell-date strong.is-direct {
  color: #5b745d;
  font-weight: 650;
}

.cell-date small {
  display: block;
  font-size: 11px;
  color: #647b66;
  margin-top: 2px;
}

.cell-action {
  text-align: right;
  white-space: nowrap;
}

.save-btn {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #cbd7c6;
  border-radius: 999px;
  background: #fff;
  color: #294732;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.save-btn:hover {
  background: #eef4e8;
}

.save-btn.is-saved {
  background: #203e32;
  border-color: #203e32;
  color: #f7f8ee;
}

.mobile-save-btn {
  display: none;
  margin-left: auto;
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: #4f6652;
  font-size: 14px;
}

.reset-filters-btn {
  margin-top: 10px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #203e32;
  background: #203e32;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.calc-disclaimer {
  margin: 16px 4px 0;
  font-size: 12px;
  line-height: 1.65;
  color: #5b725d;
}

.print-only-header {
  display: none;
}

@media (max-width: 900px) {
  .calc-hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 760px) {
  .calc-hero {
    padding: 32px 0 30px;
  }

  .calc-hero h1 {
    font-size: clamp(32px, 9.5vw, 44px);
    margin: 12px 0 12px;
  }

  .frost-card {
    padding: 16px;
  }

  .frost-inputs {
    grid-template-columns: 1fr;
  }

  .calc-workspace {
    padding: 20px 0 54px;
  }

  .calc-toolbar {
    padding: 14px;
  }

  .search-wrap {
    flex: 1 1 100%;
  }

  .print-btn {
    width: 100%;
    justify-content: center;
  }

  .results-card {
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .calc-table,
  .calc-table tbody {
    display: block;
  }

  .calc-table thead {
    display: none;
  }

  .calc-table tbody tr.crop-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
    background: #fff;
    border: 1px solid #d8e2d3;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
  }

  .calc-table tbody tr.crop-row.is-saved {
    background: #f6faf2;
    border-color: #9cb993;
  }

  .calc-table tbody tr.empty-row,
  .calc-table tbody tr.empty-row td {
    display: block;
    background: #fff;
    border: 1px solid #d8e2d3;
    border-radius: 12px;
  }

  .calc-table td {
    padding: 0;
  }

  .cell-crop {
    grid-column: 1 / -1;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #ebf0e7;
  }

  .mobile-save-btn {
    display: inline-flex;
    align-items: center;
  }

  .cell-action {
    display: none;
  }

  .cell-date::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #5b745d;
    margin-bottom: 3px;
  }

  .cell-date strong {
    font-size: 13px;
  }

  .cell-date small {
    font-size: 10px;
    line-height: 1.35;
  }
}

@media print {
  .site-header,
  .calc-hero,
  .calc-toolbar,
  .closing,
  .site-footer,
  .cell-action,
  .mobile-save-btn,
  .calc-table thead th:last-child {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .wrap {
    width: 100% !important;
    margin: 0 !important;
  }

  .calc-workspace {
    padding: 0 !important;
  }

  .print-only-header {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #203e32;
  }

  .print-only-header h2 {
    font-size: 20px;
    margin: 0 0 4px;
    color: #203e32;
  }

  .print-only-header p {
    margin: 0;
    font-size: 12px;
    color: #444;
  }

  .results-card {
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
  }

  .calc-table {
    display: table !important;
  }

  .calc-table thead {
    display: table-header-group !important;
  }

  .calc-table tbody {
    display: table-row-group !important;
  }

  .calc-table tbody tr.crop-row {
    display: table-row !important;
    break-inside: avoid;
  }

  .results-card[data-has-saved="true"] .calc-table tbody tr.crop-row:not(.is-saved) {
    display: none !important;
  }

  .calc-table td,
  .calc-table th {
    padding: 7px 10px !important;
  }
}
