/* Scan result and the upload screen. */

.breadcrumb { margin-bottom: 16px; }
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--loam);
  font-weight: 600;
  font-size: 14px;
}
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Result ---------- */
.scan-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.scan-photo-col {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: grid;
  gap: 16px;
}
@media (max-width: 900px) {
  /* Stacked, with the visitor's sign-up card after the result rather than
     above the name. display:contents lets the photo and the cards below it be
     ordered separately. */
  .scan-layout { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
  .scan-photo-col { display: contents; }
  .scan-photo { order: 1; }
  .scan-actions { order: 2; }
  .scan-body { order: 3; }
  .scan-actions--visitor { order: 4; }
}

.scan-photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--card-sunk);
}
.scan-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 900px) {
  .scan-photo img { aspect-ratio: 16 / 10; }
}
.scan-match {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  justify-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: #15201A;
  backdrop-filter: blur(10px);
}
.scan-match strong {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: #16704A;
}
.scan-match small { font-size: 11px; color: #5F6B63; }

.scan-actions { display: grid; gap: 10px; }
.scan-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.scan-cta { text-align: center; display: grid; gap: 10px; justify-items: center; }
.scan-cta .brand-mark { border-radius: 12px; }
.scan-cta h3 { font-size: 20px; }
.scan-cta .btn { width: 100%; }

.scan-head { margin-bottom: 20px; }
.scan-sci {
  font-style: italic;
  color: var(--loam);
  font-size: 18px;
  margin-top: 4px;
}
.scan-aka {
  color: var(--loam-soft);
  font-size: 15px;
  margin-top: 6px;
}
.scan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.scan-hint-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--loam);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scan-head .notice { margin-top: 14px; }

.scan-sections { display: grid; gap: 16px; }

/* Weed warning */
.weed-card {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--weed-soft);
  border: 1px solid var(--weed-line);
}
.weed-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.weed-card-head h3 { font-size: 19px; }
.weed-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--weed) 22%, transparent);
  color: var(--weed);
}
.weed-card p { color: var(--loam); }
.weed-card-sub {
  margin-top: 16px;
  font-weight: 700;
  color: var(--ink) !important;
}
.weed-card .fix-steps { margin-top: 10px; }

.fix-steps {
  list-style: none;
  counter-reset: fix;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.fix-steps li {
  counter-increment: fix;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
}
.fix-steps li::before {
  content: counter(fix);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: color-mix(in srgb, var(--weed) 20%, transparent);
  color: var(--weed-ink);
}
.fix-steps--plain li::before {
  background: var(--card-sunk);
  color: var(--loam);
  border: 1px solid var(--hairline);
}

/* Health */
.health-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.health-ring {
  --score: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), var(--card-sunk) 0);
  --ring-color: var(--turf);
}
.health-ring--fair { --ring-color: var(--weed); }
.health-ring--poor { --ring-color: var(--danger); }
.health-ring span {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.health-status { font-weight: 600; }
.health-status--good { color: var(--turf-ink); }
.health-status--fair { color: var(--weed-ink); }
.health-status--poor { color: var(--danger-ink); }
.health-summary { color: var(--loam); }

.issue-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.issue {
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--card-sunk);
  border: 1px solid var(--hairline);
}
.issue--high { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.issue--medium { background: var(--weed-soft); border-color: var(--weed-line); }
.issue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.issue p { color: var(--loam); }
.issue .fix-steps { margin-top: 10px; }

/* Facts */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}
.fact-grid--wide { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fact-grid > div {
  padding: 12px 14px;
  border-radius: var(--radius-tile);
  background: var(--card-sunk);
  border: 1px solid var(--hairline);
}
.fact-grid dt {
  font-size: 13px;
  color: var(--loam);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fact-grid dt i { color: var(--turf); width: 14px; }
.fact-grid dd { margin: 4px 0 0; font-weight: 600; }

.tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tick-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}
.tick-list i {
  margin-top: 4px;
  color: var(--turf);
  font-size: 13px;
}

.alt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.alt-list li {
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--card-sunk);
  border: 1px solid var(--hairline);
}
.alt-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.alt-list em { color: var(--loam); font-size: 14px; }
.alt-list p { margin-top: 8px; color: var(--loam); }

/* Reference photos */
.reference-lede { margin-bottom: 14px; }
.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.reference-grid figure { margin: 0; }
.reference-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-tile);
}
.reference-grid figcaption {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--loam-soft);
}
.reference-source {
  margin-top: 14px;
  font-size: 13px;
  color: var(--loam);
}

/* Care sections */
.care-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.care-section-head h3 { font-size: 19px; flex: 1; }
.care-rows { margin: 0; display: grid; gap: 10px; }
.care-rows > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.care-rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.care-rows dt { color: var(--loam); font-size: 14px; }
.care-rows dd { margin: 0; }
@media (max-width: 560px) {
  .care-rows > div { grid-template-columns: 1fr; gap: 2px; }
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.season {
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--card-sunk);
  border: 1px solid var(--hairline);
}
.season-name {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.season-name i { color: var(--turf); }
.season p { color: var(--loam); font-size: 15px; }

.problem-list { margin: 0; display: grid; gap: 14px; }
.problem-list dt {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.problem-list dt i { color: var(--weed); }
.problem-list dd { margin: 4px 0 0 26px; color: var(--loam); }

/* The jobs a care guide says a plant will ask for */
.job-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.job-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.job-list-main { display: grid; gap: 2px; min-width: 0; }
.job-list-main span { font-size: 14px; }

.care-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.care-log li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
}
.care-log i { color: var(--turf); }

/* ---------- Upload ---------- */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 24px;
  border-radius: var(--radius-card);
  border: 2px dashed var(--hairline-strong);
  background: var(--card-sunk);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.dropzone:hover,
.dropzone.is-over {
  border-color: var(--turf);
  background: var(--sprout);
}
.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--turf);
  color: #FFFFFF;
  font-size: 22px;
}
.dropzone-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.dropzone-hint { color: var(--loam); font-size: 14px; }

.upload-preview { margin: 0; display: grid; gap: 8px; }
.upload-preview img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius-card);
}
.upload-preview figcaption { font-size: 13px; color: var(--loam); }

.upload-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}

.tips {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 8px;
  color: var(--loam);
  font-size: 15px;
}
.tips li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.tips i { color: var(--turf); margin-top: 4px; font-size: 13px; }

.upload-working { text-align: center; }
.working-visual {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 20px;
}
.working-visual img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}
.working-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: #7CF2B9;
  box-shadow: 0 0 18px 5px rgba(124, 242, 185, 0.7);
  animation: working-sweep 2.4s ease-in-out infinite alternate;
}
@keyframes working-sweep {
  from { transform: translateY(0); }
  to { transform: translateY(300px); }
}
.working-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--card-sunk);
  overflow: hidden;
}
.working-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--turf);
  transition: width 0.5s var(--ease);
}
.working-stage {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.upload-failed { text-align: center; }
.upload-failed h3 { font-size: 22px; margin-bottom: 6px; }
.upload-failed .empty-state-icon {
  margin: 0 auto 14px;
  background: var(--weed-soft);
  color: var(--weed);
}
