:root {
  --tool-lime: #78b62d;
  --tool-lime-deep: #4f821a;
  --tool-soil: #72461f;
  --tool-soil-deep: #43260f;
  --tool-cream: #fffaf0;
  --tool-cream-deep: #f4e8cf;
  --tool-ink: #21160d;
  --tool-muted: #65523e;
  --tool-line: rgba(114, 70, 31, 0.16);
  --tool-glow: 0 18px 34px rgba(90, 60, 25, 0.12);
  --tool-night: #24344e;
  --tool-night-soft: #37527b;
}

.crop-tool-shell {
  display: grid;
  gap: 24px;
}

.crop-tool-hero,
.crop-tool-panel {
  border: 1px solid var(--tool-line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 243, 226, 0.94)),
    linear-gradient(140deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 56%);
  box-shadow: var(--tool-glow);
}

.crop-tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.crop-tool-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -32% 48%;
  height: 280px;
  background: radial-gradient(circle, rgba(120, 182, 45, 0.22), rgba(120, 182, 45, 0));
  z-index: -1;
}

.crop-tool-hero-copy h1,
.crop-tool-panel-heading h2,
.crop-insight-header h3,
.crop-source-card h3 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  color: var(--tool-ink);
}

.crop-tool-kicker,
.crop-tool-eyebrow {
  margin: 0 0 8px;
  color: var(--tool-lime-deep);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crop-tool-summary,
.crop-tool-panel-heading > p,
.crop-filter-hint,
.crop-source-note {
  color: var(--tool-muted);
  line-height: 1.65;
}

.crop-tool-summary {
  margin: 14px 0 0;
  max-width: 58ch;
  font-size: 1.05rem;
}

.crop-tool-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.crop-tool-primary,
.crop-tool-secondary,
.crop-card-actions button,
.crop-stage-jump button,
.crop-results-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.crop-tool-primary {
  background: linear-gradient(180deg, #8fca3d, var(--tool-lime));
  color: #fffdf4;
  box-shadow: 0 10px 20px rgba(85, 133, 29, 0.24);
}

.crop-tool-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--tool-soil);
  box-shadow: inset 0 0 0 1px rgba(114, 70, 31, 0.12);
}

.crop-tool-primary:hover,
.crop-tool-secondary:hover,
.crop-card-actions button:hover,
.crop-stage-jump button:hover,
.crop-results-bar button:hover {
  transform: translateY(-1px);
}

.crop-tool-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.crop-tool-stat {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(114, 70, 31, 0.1);
  text-align: center;
}

.crop-tool-stat strong {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.9rem;
  line-height: 0.95;
}

.crop-tool-stat span {
  display: block;
  margin-top: 6px;
  color: var(--tool-muted);
  font-size: 0.92rem;
}

.crop-tool-source-note {
  margin: 18px 0 0;
}

.crop-tool-hero-media {
  display: grid;
  gap: 14px;
  align-self: center;
}

.crop-tool-hero-card {
  position: relative;
  margin: 0;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 235, 210, 0.96));
  border: 1px solid rgba(114, 70, 31, 0.1);
  box-shadow: 0 12px 24px rgba(90, 60, 25, 0.1);
  animation: crop-float 5.2s ease-in-out infinite;
}

.crop-tool-hero-card-night {
  animation-delay: -2.6s;
}

.crop-tool-hero-card img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.crop-tool-hero-card figcaption {
  margin-top: 10px;
  color: var(--tool-muted);
  font-size: 0.92rem;
}

.crop-tool-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crop-tool-anchor-nav a {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(114, 70, 31, 0.1);
  color: var(--tool-soil);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.crop-tool-panel {
  padding: clamp(20px, 2.5vw, 28px);
}

.crop-tool-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.crop-tool-panel-heading > p {
  margin: 0;
  max-width: 50ch;
}

.crop-tool-control-grid,
.crop-tool-split,
.crop-stage-layout,
.crop-source-grid {
  display: grid;
  gap: 18px;
}

.crop-tool-control-grid,
.crop-tool-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crop-filter-panel,
.crop-insight-panel,
.planner-summary,
.crop-empty-state,
.crop-source-card,
.crop-stage-spotlight,
.crop-stage-sheet-stack figure,
.crop-stage-strip button,
.crop-card,
.crop-compare-card {
  border: 1px solid rgba(114, 70, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 18px rgba(90, 60, 25, 0.06);
}

.crop-filter-panel,
.crop-stage-controls {
  display: grid;
  gap: 14px;
}

.crop-field {
  display: grid;
  gap: 8px;
}

.crop-field span {
  color: var(--tool-ink);
  font-weight: 800;
}

.crop-field input,
.crop-field select {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(114, 70, 31, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--tool-ink);
  font: inherit;
}

.crop-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crop-segmented button {
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(243, 231, 205, 0.92);
  color: var(--tool-soil);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.crop-segmented button.is-active {
  background: linear-gradient(180deg, #8dca3d, var(--tool-lime));
  color: #fffef6;
}

.crop-segmented button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.crop-water-toggle button {
  flex: 1 1 120px;
}

.crop-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tool-ink);
  font-weight: 700;
}

.crop-check input {
  width: 18px;
  height: 18px;
}

.crop-filter-hint {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(245, 234, 211, 0.9);
  font-size: 0.94rem;
}

.crop-toggle-note {
  margin: 0;
  color: var(--tool-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.crop-insight-panel,
.planner-summary,
.crop-source-card {
  padding: 18px;
}

.crop-insight-header {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.crop-insight-grid,
.crop-card-grid,
.crop-compare-grid,
.crop-source-grid {
  display: grid;
  gap: 14px;
}

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

.crop-insight-card,
.crop-empty-state {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(114, 70, 31, 0.1);
}

.crop-insight-card strong,
.crop-empty-state strong {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.15rem;
}

.crop-insight-card span,
.crop-empty-state span {
  display: block;
  margin-top: 4px;
  color: var(--tool-muted);
  line-height: 1.45;
}

.crop-insight-card small {
  display: block;
  margin-top: 10px;
  color: var(--tool-lime-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crop-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.crop-results-bar p {
  margin: 0;
  color: var(--tool-muted);
}

.crop-results-bar button {
  background: rgba(255, 255, 255, 0.88);
  color: var(--tool-soil);
  box-shadow: inset 0 0 0 1px rgba(114, 70, 31, 0.12);
}

.crop-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.crop-card,
.crop-compare-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crop-card:hover,
.crop-compare-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(90, 60, 25, 0.1);
}

.crop-card.is-selected {
  border-color: rgba(120, 182, 45, 0.5);
  box-shadow: 0 18px 30px rgba(98, 146, 42, 0.16);
}

.crop-card-header {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.crop-card-art,
.crop-stage-art-wrap {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 249, 235, 0.9), rgba(240, 226, 194, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 50%);
}

.crop-card-art {
  min-height: 78px;
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.crop-card-art img,
.crop-stage-art-wrap img,
.crop-stage-strip img {
  image-rendering: pixelated;
}

.crop-card-art img {
  width: 64px;
  height: 64px;
}

.crop-card-title p,
.crop-card-title h3,
.crop-card-note,
.crop-stage-meta p,
.crop-source-card li,
.crop-compare-card li,
.planner-summary li {
  margin: 0;
}

.crop-card-title p {
  color: var(--tool-lime-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crop-card-title h3 {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.55rem;
  line-height: 0.96;
}

.crop-card-title h3 span {
  display: block;
  margin-top: 4px;
  color: var(--tool-muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.crop-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crop-badge {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(243, 231, 205, 0.94);
  color: var(--tool-soil);
  font-size: 0.84rem;
  font-weight: 800;
}

.crop-badge.is-renewable {
  background: rgba(120, 182, 45, 0.14);
  color: var(--tool-lime-deep);
}

.crop-card-stats,
.crop-stage-meta dl,
.crop-compare-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.crop-card-stats div,
.crop-stage-meta dl div,
.crop-compare-card dl div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.crop-card-stats dt,
.crop-stage-meta dt,
.crop-compare-card dt {
  color: var(--tool-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.crop-card-stats dd,
.crop-stage-meta dd,
.crop-compare-card dd {
  margin: 4px 0 0;
  color: var(--tool-ink);
  font-weight: 800;
}

.crop-card-note {
  color: var(--tool-muted);
  line-height: 1.55;
}

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

.crop-card-actions button {
  flex: 1 1 120px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tool-soil);
  box-shadow: inset 0 0 0 1px rgba(114, 70, 31, 0.12);
}

.crop-card-actions button.is-primary {
  background: linear-gradient(180deg, #8fca3d, var(--tool-lime));
  color: #fffef4;
  box-shadow: 0 10px 20px rgba(85, 133, 29, 0.2);
}

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

.planner-summary {
  margin-top: 16px;
}

.planner-summary h3,
.crop-stage-meta h3 {
  margin: 0 0 12px;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.35rem;
}

.planner-summary ul,
.crop-source-card ul,
.crop-source-card ol,
.crop-compare-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--tool-muted);
  line-height: 1.7;
}

.planner-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.planner-highlight {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(243, 231, 205, 0.8);
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.planner-highlight strong {
  display: block;
  font-size: 1.35rem;
}

.planner-highlight span {
  display: block;
  margin-top: 4px;
  color: var(--tool-muted);
}

.planner-timeline {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.planner-day {
  min-height: 68px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(114, 70, 31, 0.08);
  display: grid;
  gap: 5px;
}

.planner-day strong {
  font-size: 0.88rem;
}

.planner-day span {
  color: var(--tool-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.planner-day.is-plant {
  background: rgba(120, 182, 45, 0.13);
}

.planner-day.is-harvest {
  background: rgba(231, 182, 72, 0.18);
}

.planner-day.is-both {
  background: linear-gradient(180deg, rgba(120, 182, 45, 0.14), rgba(231, 182, 72, 0.18));
}

.crop-compare-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.crop-compare-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.crop-compare-card header h3 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.4rem;
  line-height: 0.96;
}

.crop-compare-card header h3 span {
  display: block;
  margin-top: 5px;
  color: var(--tool-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.crop-compare-card button {
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tool-soil);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(114, 70, 31, 0.12);
}

.crop-stage-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.crop-stage-preview {
  display: grid;
  gap: 16px;
}

.crop-stage-spotlight {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.crop-stage-art-wrap {
  min-height: 200px;
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.crop-stage-art-wrap img {
  width: 156px;
  height: 156px;
}

.crop-stage-meta dl,
.crop-compare-card dl {
  margin: 0;
}

.crop-stage-sheet-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.crop-stage-sheet-stack figure {
  margin: 0;
  padding: 14px;
}

.crop-stage-sheet-stack img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(114, 70, 31, 0.08);
}

.crop-stage-sheet-stack figcaption {
  margin-top: 10px;
  color: var(--tool-muted);
  font-size: 0.9rem;
}

.crop-range-field strong {
  color: var(--tool-lime-deep);
}

.crop-stage-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crop-stage-jump button {
  flex: 1 1 88px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tool-soil);
  box-shadow: inset 0 0 0 1px rgba(114, 70, 31, 0.12);
}

.crop-stage-jump button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.crop-stage-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.crop-stage-strip button {
  display: grid;
  gap: 8px;
  padding: 12px 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.crop-stage-strip button.is-active {
  border-color: rgba(120, 182, 45, 0.5);
}

.crop-stage-strip img {
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.crop-stage-strip strong {
  font-size: 0.88rem;
}

.crop-stage-strip span {
  color: var(--tool-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

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

.crop-source-card a {
  color: var(--tool-lime-deep);
  font-weight: 800;
}

@keyframes crop-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 1220px) {
  .crop-tool-control-grid,
  .crop-tool-split,
  .crop-stage-layout,
  .crop-source-grid {
    grid-template-columns: 1fr;
  }

  .crop-stage-strip {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
}

@media (max-width: 980px) {
  .crop-tool-hero {
    grid-template-columns: 1fr;
  }

  .crop-tool-panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .crop-tool-stat-strip,
  .crop-insight-grid,
  .crop-stage-sheet-stack,
  .crop-planner-form,
  .planner-highlight-grid,
  .crop-card-stats,
  .crop-stage-meta dl,
  .crop-compare-card dl {
    grid-template-columns: 1fr 1fr;
  }

  .crop-stage-spotlight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .crop-tool-stat-strip,
  .crop-insight-grid,
  .crop-stage-sheet-stack,
  .crop-planner-form,
  .planner-highlight-grid,
  .crop-card-stats,
  .crop-stage-meta dl,
  .crop-compare-card dl {
    grid-template-columns: 1fr;
  }

  .crop-card-header {
    grid-template-columns: 1fr;
  }

  .crop-card-art {
    width: 92px;
  }

  .crop-results-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
