/* SeedSync viewport-fit crop carousels / isolated visual layer.
   This stylesheet preserves the existing photo files, 5:4 image ratio,
   carousel tracks, drag handlers, buttons and dynamic crop-data IDs. */
.crop-section.seedling,
.crop-section.equipment{
  --carousel-gap:clamp(12px,1.35vw,24px);
  --carousel-top:clamp(18px,2.5vh,30px);
  --carousel-bottom:clamp(16px,2vh,25px);
  width:100%;
  min-height:calc(100svh - 78px);
  height:calc(100svh - 78px);
  padding:var(--carousel-top) var(--pad-x) var(--carousel-bottom);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:clamp(8px,1.35vh,15px);
  overflow:hidden;
  box-sizing:border-box;
  scroll-margin-top:78px
}
.crop-section.seedling{background:var(--paper);color:var(--navy)}
.crop-section.equipment{background:var(--navy);color:var(--paper)}

.crop-section .crop-head{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;
  gap:clamp(14px,2.3vw,36px);
  align-items:center;
  margin:0;
  min-width:0;
  flex:0 0 auto
}
.crop-section.equipment .crop-head{grid-template-columns:minmax(0,1fr) auto auto}
.crop-section .crop-head-title{min-width:0}
.crop-section .crop-head .section-kicker{
  width:max-content;max-width:100%;
  margin:0 0 clamp(7px,1.2vh,12px);
  padding:6px 13px;
  border:2px solid var(--navy);
  border-radius:999px;
  font-family:var(--font-display);
  font-size:clamp(14px,1vw,17px);
  line-height:1.3;
  letter-spacing:.07em;
  white-space:nowrap
}
.crop-section.equipment .crop-head .section-kicker{
  color:var(--paper);background:var(--navy);
  border-color:var(--navy);
  box-shadow:inset 0 0 0 1px rgba(245,247,244,.48)
}
.crop-section .crop-title{
  font-family:var(--font-display);
  font-size:clamp(34px,3.5vw,62px);
  line-height:1.06;
  letter-spacing:-.028em;
  color:inherit;
  word-break:keep-all;
  margin:0
}
.crop-section.seedling .crop-title-emphasis{color:var(--green)}
.crop-section.equipment .crop-title-emphasis{color:var(--blue)}
.crop-section .crop-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;gap:clamp(9px,1.1vw,22px);
  max-width:none;margin:0;
  min-width:0
}
.crop-section .crop-summary-metric{display:flex;flex-direction:column;gap:3px;min-width:0}
.crop-section .crop-summary-metric strong{
  font-family:var(--font-display);
  font-size:clamp(23px,2.1vw,36px);
  line-height:1.18;
  color:var(--navy);
  white-space:nowrap
}
.crop-section .crop-summary-metric span{
  font-size:clamp(14px,1.03vw,17px);
  line-height:1.3;
  color:var(--navy)
}
.crop-section .crop-head-note{max-width:300px;font-size:clamp(15px,1.05vw,18px);line-height:1.4;margin:0;color:var(--paper)}
.crop-section .carousel-controls,.crop-section.seedling .crop-head .seedling-carousel-controls{
  display:flex;align-items:center;gap:10px;flex:0 0 auto;
  width:auto;justify-content:flex-end;
  margin:0;min-width:0
}
.crop-section .carousel-arrow,
.crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow{
  width:48px;height:48px;min-width:48px;
  display:grid;place-items:center;padding:0;
  border:2px solid var(--navy);
  border-radius:999px;
  background:var(--paper);color:var(--navy);
  font-size:25px;line-height:1;
  transition:background .2s ease,color .2s ease,transform .2s ease
}
.crop-section .carousel-arrow:hover,.crop-section .carousel-arrow:focus-visible,
.crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow:hover,
.crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow:focus-visible{
  background:var(--blue);color:var(--navy);transform:translateY(-2px);
  outline-offset:3px
}
.crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow:hover,
.crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow:focus-visible{
  background:var(--green);color:var(--navy)
}

/* Seedling data: a shallow high-contrast strip, not another tall section. */
.crop-section.seedling .crop-data-panel{
  flex:0 0 auto;
  display:grid;grid-template-columns:minmax(110px,.27fr) minmax(0,1fr);
  align-items:center;gap:clamp(14px,2.5vw,45px);
  width:100%;margin:0;padding:clamp(10px,1.5vh,16px) clamp(14px,2vw,31px);
  background:var(--navy);color:var(--paper);
  border:2px solid var(--navy);border-radius:18px
}
.crop-section.seedling .crop-data-panel .meta{
  font-family:var(--font-display);font-size:clamp(13px,.92vw,16px);
  line-height:1.25;color:var(--paper);opacity:.83
}
.crop-section.seedling .crop-data-panel h3{
  color:var(--paper);
  font-size:clamp(29px,3vw,51px);line-height:1.02;
  margin:5px 0 0
}
.crop-section.seedling .crop-data-panel dl{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(8px,1.5vw,25px);margin:0
}
.crop-section.seedling .crop-data-panel dl>div{min-width:0}
.crop-section.seedling .crop-data-panel dt{
  font-family:var(--font-display);font-size:clamp(13px,1vw,17px);
  line-height:1.25;color:var(--paper);opacity:.8
}
.crop-section.seedling .crop-data-panel dd{
  margin:5px 0 0;font-family:var(--font-display);
  font-size:clamp(17px,1.35vw,23px);
  line-height:1.23;color:var(--paper);overflow-wrap:anywhere
}

/* Keep the carousel on one screen by budgeting image height before width. */
.crop-section .crop-track{
  width:100%;min-width:0;min-height:0;max-height:100%;
  flex:0 1 auto;
  display:flex;align-items:flex-start;gap:var(--carousel-gap);
  padding:0 0 2px;
  overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;scroll-snap-type:x mandatory;touch-action:pan-y
}
.crop-section .crop-card{
  min-width:0;
  flex:0 0 min(calc((100% - 2 * var(--carousel-gap)) / 3), calc(max(210px, 100svh - 480px) * 1.25));
  scroll-snap-align:start;
  background:transparent;color:inherit;text-align:left;
  border:0;padding:0
}
.crop-section.equipment .crop-card{
  flex-basis:min(calc((100% - 2 * var(--carousel-gap)) / 3), calc(max(210px, 100svh - 285px) * 1.25))
}
.crop-section .crop-card img{
  display:block;width:100%;height:auto;aspect-ratio:5/4;
  object-fit:cover;
  border:2px solid var(--navy);border-radius:14px;
  transform:none;filter:none;
  transition:transform .25s ease
}
.crop-section.equipment .crop-card img{background:var(--paper)}
.crop-section .crop-card:not(.is-current) img{transform:none;filter:none}
.crop-section .crop-card:hover img,.crop-section .crop-card:focus-visible img{transform:translateY(-2px)}
.crop-section .crop-card .meta{
  display:block;margin:clamp(6px,.85vh,10px) 0 0;
  font-size:clamp(14px,1vw,17px);line-height:1.25;
  letter-spacing:.02em;color:inherit;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis
}
.crop-section .crop-card h4{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin:3px 0 0;
  font-family:var(--font-display);
  font-size:clamp(21px,1.65vw,30px);
  line-height:1.17;word-break:keep-all;color:inherit
}
.crop-section .crop-card h4::after{
  content:"↗";display:grid;place-items:center;flex:0 0 35px;
  width:35px;height:35px;min-width:35px;
  border:2px solid var(--navy);border-radius:50%;
  color:var(--navy);background:var(--paper);
  font-size:20px;transition:transform .2s ease,background .2s ease
}
.crop-section.seedling .crop-card:hover h4::after{background:var(--green);color:var(--navy)}
.crop-section.equipment .crop-card:hover h4::after{background:var(--blue);color:var(--navy)}
.crop-section .crop-card:hover h4::after,.crop-section .crop-card:focus-visible h4::after{
  transform:translate(2px,-2px)
}
.crop-section .carousel-footer{
  flex:0 0 auto;
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:center;gap:16px;margin:0
}
.crop-section .carousel-progress{
  height:4px;background:rgba(21,50,74,.19);border-radius:99px;overflow:hidden
}
.crop-section.equipment .carousel-progress{background:rgba(245,247,244,.23)}
.crop-section.seedling .carousel-progress-fill{height:100%;background:var(--green);border-radius:99px}
.crop-section.equipment .carousel-progress-fill{height:100%;background:var(--blue);border-radius:99px}
.crop-section .carousel-count{
  font-size:clamp(15px,1vw,18px);line-height:1.3;
  white-space:nowrap
}
.crop-section.seedling .section-actions{
  display:flex;flex-wrap:wrap;gap:10px 23px;align-items:center;
  margin:0;flex:0 0 auto
}
.crop-section.seedling .section-actions .text-link{
  display:inline-flex;align-items:center;min-height:28px;
  padding:0 0 2px;
  border-bottom:2px solid var(--navy);
  font-size:clamp(15px,1.03vw,18px);
  line-height:1.25;white-space:nowrap
}
.crop-section.equipment .crop-head-note{font-size:17px}

/* Width adaptation, while keeping the 5:4 photos and controls. */
@media(max-width:1200px){
  .crop-section .crop-head{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:15px}
  .crop-section .crop-title{font-size:clamp(30px,3.5vw,51px)}
  .crop-section .crop-summary{gap:8px}
  .crop-section .crop-summary-metric strong{font-size:clamp(23px,2.3vw,31px)}
  .crop-section .crop-summary-metric span{font-size:14px}
  .crop-section .crop-card{
    flex-basis:min(calc((100% - 2 * var(--carousel-gap)) / 3), calc(max(190px, 100svh - 480px) * 1.25))
  }
  .crop-section.equipment .crop-card{
    flex-basis:calc((100% - 2 * var(--carousel-gap)) / 3)
  }
}
@media(max-width:900px){
  .crop-section.seedling,.crop-section.equipment{padding-inline:24px}
  .crop-section .crop-head{grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .crop-section .crop-head-title{grid-column:1}
  .crop-section .crop-summary{grid-column:1/-1;grid-row:2}
  .crop-section.seedling .crop-head .seedling-carousel-controls{grid-column:2;grid-row:1}
  .crop-section.equipment .crop-head-note{display:none}
  .crop-section .crop-card{flex-basis:min(39vw,calc(max(175px, 100svh - 495px) * 1.25))}
  .crop-section.equipment .crop-card{flex-basis:min(39vw,calc(max(185px, 100svh - 320px) * 1.25))}
  .crop-section.seedling .crop-data-panel{grid-template-columns:minmax(80px,.24fr) minmax(0,1fr);padding:12px 15px}
}
@media(max-width:600px){
  .crop-section.seedling,.crop-section.equipment{
    min-height:calc(100svh - 68px);height:calc(100svh - 68px);
    padding:14px 18px 16px;
    gap:7px;scroll-margin-top:68px
  }
  .crop-section .crop-head{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .crop-section .crop-head .section-kicker{font-size:12px;padding:4px 10px;margin-bottom:5px}
  .crop-section .crop-title{font-size:clamp(26px,6.7vw,38px);line-height:1.06}
  .crop-section .crop-summary{grid-column:1/-1;grid-row:2;gap:5px}
  .crop-section .crop-summary-metric strong{font-size:20px}
  .crop-section .crop-summary-metric span{font-size:12px;line-height:1.12}
  .crop-section .carousel-arrow,
  .crop-section.seedling .crop-head .seedling-carousel-controls .carousel-arrow{
    width:38px;height:38px;min-width:38px;font-size:20px;border-width:2px
  }
  .crop-section .carousel-controls,.crop-section.seedling .crop-head .seedling-carousel-controls{
    width:auto;gap:7px;margin:0;justify-content:flex-end
  }
  .crop-section.seedling .crop-data-panel{
    grid-template-columns:minmax(0,1fr);
    gap:6px;padding:9px 12px;border-radius:12px
  }
  .crop-section.seedling .crop-data-panel>div:first-child{
    display:flex;align-items:baseline;gap:12px;min-width:0
  }
  .crop-section.seedling .crop-data-panel .meta{font-size:11px}
  .crop-section.seedling .crop-data-panel h3{font-size:24px;margin:0}
  .crop-section.seedling .crop-data-panel dl{
    grid-template-columns:repeat(4,minmax(0,1fr));gap:6px
  }
  .crop-section.seedling .crop-data-panel dt{font-size:11px}
  .crop-section.seedling .crop-data-panel dd{font-size:clamp(11px,2.7vw,14px);line-height:1.2;margin:3px 0 0}
  .crop-section .crop-track{padding:0}
  .crop-section .crop-card{flex-basis:min(72vw,calc(max(175px, 100svh - 480px) * 1.25))}
  .crop-section.equipment .crop-card{flex-basis:min(76vw,calc(max(185px, 100svh - 315px) * 1.25))}
  .crop-section .crop-card img{border-radius:10px}
  .crop-section .crop-card .meta{font-size:12px;margin-top:6px}
  .crop-section .crop-card h4{font-size:20px}
  .crop-section .crop-card h4::after{width:30px;height:30px;flex-basis:30px;font-size:17px}
  .crop-section .carousel-footer{gap:8px}
  .crop-section .carousel-count{font-size:13px}
  .crop-section.seedling .section-actions{gap:7px 15px}
  .crop-section.seedling .section-actions .text-link{font-size:13px;min-height:22px}
}
@media(max-height:720px) and (min-width:601px){
  .crop-section.seedling,.crop-section.equipment{padding-block:14px 15px;gap:6px}
  .crop-section .crop-head .section-kicker{margin-bottom:5px;padding:4px 10px}
  .crop-section .crop-title{font-size:clamp(31px,3vw,49px)}
  .crop-section.seedling .crop-data-panel{padding-block:7px}
  .crop-section.seedling .crop-data-panel h3{font-size:32px}
  .crop-section .crop-card h4{font-size:22px}
  .crop-section .crop-card h4::after{width:31px;height:31px;flex-basis:31px}
  .crop-section .crop-card{flex-basis:min(calc((100% - 2 * var(--carousel-gap))/3),calc(max(180px,100svh - 485px)*1.25))}
  .crop-section.equipment .crop-card{flex-basis:min(calc((100% - 2 * var(--carousel-gap))/3),calc(max(210px,100svh - 300px)*1.25))}
}
@media(max-height:650px) and (max-width:600px){
  .crop-section.seedling,.crop-section.equipment{height:auto;min-height:calc(100svh - 68px);overflow:visible}
  .crop-section .crop-track{overflow-y:hidden}
}
@media(prefers-reduced-motion:reduce){
  .crop-section .crop-card img,.crop-section .crop-card h4::after,.crop-section .carousel-arrow{transition:none}
}


/* SeedSync carousel refinement: three-photo framing, active state, one-screen spacing */
/* Photography, carousel controls and JS hooks are unchanged. */
@media(min-width:1101px){
  .crop-section.seedling,
  .crop-section.equipment{
    --carousel-visible:3;
    --carousel-card-width:min(
      calc((100vw - var(--pad-x) * 2 - var(--carousel-gap) * 2) / 3),
      calc(max(172px, 100svh - 370px) * 1.25)
    );
  }
  .crop-section.equipment{
    --carousel-card-width:min(
      calc((100vw - var(--pad-x) * 2 - var(--carousel-gap) * 2) / 3),
      calc(max(205px, 100svh - 240px) * 1.25)
    );
  }
  .crop-section .crop-track{
    width:min(100%,calc(var(--carousel-card-width) * 3 + var(--carousel-gap) * 2));
    max-width:100%;
    flex:0 1 auto;
    margin-inline:0;
  }
  .crop-section .crop-card{flex:0 0 var(--carousel-card-width)}
  .crop-section.equipment .crop-card{flex:0 0 var(--carousel-card-width)}
}
.crop-section.seedling,
.crop-section.equipment{
  justify-content:flex-start;
  gap:clamp(7px,1.15vh,13px);
  padding-bottom:clamp(24px,3.3vh,37px);
}
.crop-section .crop-head{
  align-items:center;
  column-gap:clamp(17px,2.4vw,38px);
}
.crop-section .crop-head-title{min-width:0}
.crop-section .crop-title{
  font-size:clamp(32px,3.25vw,59px);
  line-height:1.07;
}
.crop-section .crop-head .section-kicker{
  margin-bottom:clamp(5px,.8vh,9px);
  padding:5px 12px;
}
.crop-section.seedling .crop-summary{
  gap:clamp(8px,1.35vw,22px);
  grid-template-columns:1fr 1fr 1.18fr;
}
.crop-section.seedling .crop-summary-metric strong{
  font-size:clamp(22px,1.73vw,31px);
  line-height:1.13
}
.crop-section.seedling .crop-summary-metric:last-child strong{
  font-size:clamp(20px,1.55vw,27px)
}
.crop-section.seedling .crop-summary-metric span{
  font-size:clamp(14px,.97vw,17px);
  line-height:1.32
}
.crop-section.seedling .crop-summary-metric:last-child{
  opacity:.82
}
.crop-section.seedling .crop-data-panel{
  padding-block:clamp(9px,1.3vh,14px);
  margin:0;
  gap:clamp(14px,2.2vw,35px);
}
.crop-section.seedling .crop-data-panel h3{
  font-size:clamp(29px,2.45vw,44px);
  line-height:1.05
}
.crop-section.seedling .crop-data-panel dd{
  font-size:clamp(16px,1.21vw,21px);
  line-height:1.22
}
.crop-section .crop-card img{
  aspect-ratio:5/4;
  border-radius:14px;
  outline:3px solid transparent;
  outline-offset:-4px;
  transition:outline-color .18s ease,transform .25s ease;
}
.crop-section.seedling .crop-card.is-current img{
  outline-color:var(--green);
}
.crop-section.seedling .crop-card.is-current .meta{
  font-weight:700;
  color:var(--navy);
}
.crop-section .crop-card .meta{
  font-size:clamp(13px,.88vw,15px);
  line-height:1.22;
  margin-top:clamp(6px,.75vh,9px)
}
.crop-section .crop-card h4{
  font-size:clamp(22px,1.64vw,29px);
  margin-top:4px;
  line-height:1.16;
}
.crop-section .crop-card h4::after{
  width:35px;height:35px;
  flex-basis:35px;
}
.crop-section .carousel-footer{
  width:100%;
  margin-top:auto;
  flex:0 0 auto;
  padding-top:2px;
}
.crop-section .carousel-count{
  font-size:clamp(14px,.99vw,17px)
}
.crop-section.seedling .section-actions{
  margin-top:0;
  gap:8px 23px;
}
.crop-section.seedling .section-actions .text-link{
  min-height:25px;
  font-size:clamp(15px,1vw,17px)
}
.crop-section.equipment .crop-head{
  grid-template-columns:minmax(0,1fr) minmax(190px,255px) auto;
  align-items:center;
}
.crop-section.equipment .crop-head-note{
  justify-self:end;
  max-width:255px;
  font-size:clamp(15px,1vw,17px);
  line-height:1.4;
}
.crop-section.equipment .carousel-controls{
  justify-self:end;
}
.crop-section.equipment .crop-track{
  margin-top:clamp(9px,1.55vh,20px);
}
.crop-section.equipment .crop-card .meta{
  opacity:.87;
}

/* Two fully visible photos on tablet, without revealing extra cards. */
@media(min-width:701px) and (max-width:1100px){
  .crop-section.seedling,.crop-section.equipment{
    --carousel-card-width:min(
      calc((100vw - 48px - var(--carousel-gap)) / 2),
      calc(max(165px,100svh - 400px) * 1.25)
    );
  }
  .crop-section.equipment{
    --carousel-card-width:min(
      calc((100vw - 48px - var(--carousel-gap)) / 2),
      calc(max(190px,100svh - 285px) * 1.25)
    );
  }
  .crop-section .crop-track{
    width:min(100%,calc(var(--carousel-card-width) * 2 + var(--carousel-gap)));
    max-width:100%;
  }
  .crop-section .crop-card,
  .crop-section.equipment .crop-card{
    flex:0 0 var(--carousel-card-width);
  }
  .crop-section.equipment .crop-head{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .crop-section.equipment .crop-head-note{display:none}
}
@media(max-width:900px){
  .crop-section.seedling .crop-summary-metric strong{font-size:clamp(20px,2.8vw,28px)}
  .crop-section.seedling .crop-summary-metric:last-child strong{font-size:clamp(19px,2.5vw,24px)}
  .crop-section .crop-title{font-size:clamp(30px,4.2vw,47px)}
  .crop-section.seedling .crop-data-panel{
    padding:10px 14px;
    gap:12px;
  }
  .crop-section.seedling .crop-data-panel h3{font-size:clamp(27px,3.7vw,39px)}
}
@media(max-width:700px){
  .crop-section .crop-title{font-size:clamp(25px,6.7vw,37px)}
  .crop-section .crop-track{width:100%}
  .crop-section .crop-card,
  .crop-section.equipment .crop-card{
    flex:0 0 min(78vw,calc(max(165px,100svh - 380px) * 1.25));
  }
  .crop-section.seedling .crop-summary{
    grid-template-columns:1fr 1fr 1.05fr;
  }
  .crop-section.seedling .crop-summary-metric strong{font-size:20px}
  .crop-section.seedling .crop-summary-metric:last-child strong{font-size:18px}
  .crop-section .crop-card .meta{font-size:13px}
  .crop-section .crop-card h4{font-size:21px}
  .crop-section.equipment .crop-head{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .crop-section.equipment .crop-head-note{display:none}
  .crop-section.equipment .crop-card{
    flex-basis:min(78vw,calc(max(185px,100svh - 275px) * 1.25));
  }
  .crop-section.equipment .crop-track{margin-top:5px}
}
@media(max-height:715px) and (min-width:701px){
  .crop-section.seedling,.crop-section.equipment{
    padding-top:13px;padding-bottom:20px;
    gap:6px
  }
  .crop-section .crop-head .section-kicker{padding-block:4px;margin-bottom:4px}
  .crop-section .crop-title{font-size:clamp(30px,2.7vw,47px)}
  .crop-section.seedling .crop-data-panel{padding-block:7px}
  .crop-section .crop-card h4::after{width:30px;height:30px;flex-basis:30px}
  .crop-section.equipment .crop-track{margin-top:5px}
}
@media(max-height:620px){
  .crop-section.seedling,.crop-section.equipment{
    height:auto;
    min-height:calc(100svh - 78px);
    overflow:visible
  }
}
@media(max-height:620px) and (max-width:600px){
  .crop-section.seedling,.crop-section.equipment{
    min-height:calc(100svh - 68px)
  }
}
@media(prefers-reduced-motion:reduce){
  .crop-section .crop-card img{transition:none}
}
