/* The home screen uses the same farm data and routes as the rest of Tilukset. */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.05;
}
.brand-mark {
  width: 37px;
  height: 43px;
  flex: none;
  color: #76a930;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.brand-tagline {
  display: none;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
}
.bottom-nav > button > span:first-child > svg {
  width: 28px;
  height: 28px;
  display: block;
}
body:has(.home-dashboard) {
  background: #f3f6ef;
  color: #17372e;
}
.wrap:has(.home-dashboard) {
  max-width: 1120px;
  padding: 0 22px calc(116px + env(safe-area-inset-bottom, 0px)) !important;
}
.wrap:has(.home-dashboard) > #title,
.wrap:has(.home-dashboard) > #intro {
  display: none;
}
.wrap:has(.home-dashboard) > #storage-note {
  margin: 0 0 10px;
  font-size: 12px;
  background: #ffffffe0;
}
.wrap:has(.home-dashboard) > #notice {
  font-size: 13px;
  margin: 0 0 10px;
}
.home-dashboard {
  --home-green: #19593e;
  --home-line: #1c4a3010;
}
.home-dashboard button {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.home-hero {
  padding: 26px 6px 17px;
}
.home-start-work {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  width: 100%;
  padding: 13px 20px;
  margin: 0;
  border: 1px solid #225b3c;
  border-radius: 15px;
  background: linear-gradient(110deg, #195a40, #205e3c);
  color: #fff;
  font-weight: 720;
  font-size: 21px;
  box-shadow: 0 7px 18px #183e2b26;
}
.home-start-work svg {
  width: 30px;
  height: 30px;
}
.home-start-work:hover {
  background: #124932;
  box-shadow: 0 7px 22px #183e2b3b;
}
.home-current {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  background: #ffffffe8;
  border-radius: 10px;
  padding: 8px 11px;
  margin-top: 8px;
}
.home-current > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #337e48;
  flex: none;
}
.home-overview {
  display: grid;
  gap: 10px;
}
.home-season {
  padding: 15px 16px 16px;
  background: #fff;
  border: 1px solid #dfe7dd;
  border-radius: 20px;
  box-shadow: 0 6px 35px #354b2b06;
}
.home-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.home-card-heading h2 {
  font-size: 18px;
  letter-spacing: -0.6px;
  color: #1f322c;
  margin: 0;
}
.home-card-heading button,
.home-season-empty button {
  display: flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  color: #2d7046;
  border: 0;
  padding: 4px 0 4px 8px;
  font-size: 12px;
  min-height: 36px;
  white-space: nowrap;
}
.home-card-heading button svg,
.home-season-empty button svg {
  width: 14px;
  height: 14px;
}
.home-season-body {
  display: grid;
  grid-template-columns: minmax(115px, 0.88fr) minmax(0, 1.25fr);
  gap: 15px;
  align-items: center;
}
.home-donut {
  position: relative;
  max-width: 176px;
  width: 100%;
  justify-self: center;
  aspect-ratio: 1;
}
.home-donut > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-width: 12;
}
.home-ring-track {
  stroke: #e9ece6;
}
.home-ring-value {
  stroke: #258451;
  stroke-linecap: round;
}
.home-donut > div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  white-space: nowrap;
}
.home-donut strong {
  font-size: 27px;
  letter-spacing: -1px;
  line-height: 1.3;
  font-weight: 780;
  color: #153e31;
}
.home-donut span {
  font-size: 12px;
  color: #365547;
}
.home-donut small {
  font-size: 10px;
  color: #5b6b60;
  margin-top: 2px;
}
.home-crops {
  list-style: none;
  padding: 0 0 0 13px;
  margin: 0;
  border-left: 1px solid #e8ece5;
}
.home-crops li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  min-height: 42px;
  border-bottom: 1px solid #edf0e9;
}
.home-crops li:last-child {
  border-bottom: 0;
}
.home-crop-icon {
  width: 24px;
  height: 27px;
  flex: none;
}
.home-crop-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.home-crop-name {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
  flex: 1;
}
.home-crop-name strong {
  font-size: 13px;
  color: #213830;
}
.home-crop-name > span {
  font-size: 11px;
  color: #4b6557;
  overflow-wrap: anywhere;
}
.home-crop-percent {
  font-size: 11px;
  color: #496254;
  white-space: nowrap;
}
.home-area-note {
  font-size: 12px;
  background: #f9edcd;
  border-radius: 9px;
  padding: 8px 10px;
  margin: 10px 0 0;
}
.home-season-empty {
  display: flex;
  gap: 14px;
  padding: 18px 4px 7px;
  align-items: flex-start;
}
.home-season-empty > svg {
  width: 36px;
  height: 40px;
  color: #648951;
  flex: none;
}
.home-season-empty strong {
  font-size: 16px;
}
.home-season-empty p {
  font-size: 13px;
  color: #647667;
  line-height: 1.5;
  margin: 6px 0;
}
.home-season-empty button {
  padding-left: 0;
  font-weight: 700;
}
.home-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}
.home-metric {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--home-line);
  border-radius: 17px;
  background: #fff;
  padding: 13px 15px;
  text-align: left;
  box-shadow: 0 3px 14px #32452a03;
  color: #123f2e;
  min-width: 0;
  margin: 0;
}
button.home-metric:hover {
  background: #f2f9ef;
  border-color: #bfd2ba;
}
.home-metric-icon {
  width: 34px;
  height: 37px;
  flex: none;
}
.home-metric-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.home-metric > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.home-metric strong {
  font-size: 22px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  font-weight: 750;
  color: #1b3028;
  overflow-wrap: anywhere;
}
.home-metric strong > span {
  font-size: 0.8em;
  letter-spacing: 0;
}
.home-metric small {
  font-size: 11px;
  font-weight: 450;
  color: #607569;
  margin-top: 4px;
  line-height: 1.3;
}
@media (min-width: 700px) {
  .home-dashboard {
    max-width: 880px;
    margin: auto;
    padding-top: 8px;
  }
  .home-hero {
    padding: 20px 0;
  }
  .home-start-work {
    max-width: none;
    min-height: 65px;
  }
  .home-current {
    max-width: 360px;
  }
  .home-overview {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }
  .home-season {
    padding: 18px 20px;
    border-radius: 23px;
  }
  .home-card-heading h2 {
    font-size: 20px;
  }
  .home-card-heading button {
    font-size: 13px;
  }
  .home-crops li {
    padding: 9px 0;
    gap: 10px;
  }
  .home-crop-name strong {
    font-size: 15px;
  }
  .home-crop-name > span,
  .home-crop-percent {
    font-size: 12px;
  }
  .home-donut small {
    font-size: 11px;
  }
  .home-donut span {
    font-size: 13px;
  }
  .home-donut strong {
    font-size: 29px;
  }
  .home-metric {
    min-height: 85px;
  }
  .home-metric strong {
    font-size: 25px;
  }
  .home-metric small {
    font-size: 12px;
  }
}
@media (max-width: 699px) {
  .home-hero {
    padding: 17px 6px 15px;
  }
  .home-start-work {
    min-height: 55px;
    font-size: 20px;
    padding: 10px 18px;
  }
  .home-season {
    padding: 11px 14px 14px;
  }
  .home-card-heading {
    margin-bottom: 0;
  }
  .home-card-heading button {
    min-height: 44px;
  }
  .home-crops li {
    min-height: 38px;
    padding: 2px 0;
  }
  .home-metric {
    gap: 10px;
    padding: 12px;
  }
  .home-metric-icon {
    width: 30px;
    height: 34px;
  }
}
@media (max-width: 370px) {
  .wrap:has(.home-dashboard) {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .home-season {
    padding: 12px;
  }
  .home-season-body {
    gap: 8px;
    grid-template-columns: minmax(102px, 0.85fr) minmax(0, 1.2fr);
  }
  .home-crops {
    padding-left: 9px;
  }
  .home-crops li {
    gap: 5px;
  }
  .home-crop-icon {
    width: 21px;
    height: 25px;
  }
  .home-donut strong {
    font-size: 24px;
  }
  .home-donut small {
    font-size: 9px;
  }
  .home-metric {
    padding: 12px 10px;
    gap: 9px;
  }
  .home-metric-icon {
    width: 28px;
    height: 33px;
  }
  .home-metric strong {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-dashboard button {
    transition: none;
  }
}

.bottom-nav button[data-tab='drive'] {
  color: #fff;
}

.home-overview {
  gap: 16px;
}
.home-dashboard {
  max-width: 760px;
  margin: auto;
}
.home-hero {
  padding-left: 0;
  padding-right: 0;
}
.home-season {
  box-shadow: none;
}
.home-metric {
  box-shadow: none;
  border-color: #dfe7dd;
}
.home-current {
  background: #e6eee2;
  color: #325b3e;
}

.home-dashboard {
  padding-top: 22px;
}
