/* Garden System Digital Companion V1 — G3 */
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2933;
  background: #f7f7f4;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  background: #f7f7f4;
}

main {
  max-width: 720px;
  margin: 0 auto;
}

.home-page {
  padding-bottom: 40px;
}

.home-nav {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.home-nav a {
  display: block;
  padding: 14px 16px;
  color: #315c45;
  text-decoration: none;
  font-weight: 700;
  background: #fff;
  border: 1px solid #e2e5e2;
  border-radius: 10px;
}

.g3-page {
  padding-bottom: 40px;
}

.back-link {
  display: inline-block;
  padding: 8px 0;
  color: #315c45;
  text-decoration: none;
  font-weight: 600;
}

.page-header {
  margin: 20px 0 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #65736a;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  line-height: 1.15;
}

.page-header > p:last-child {
  margin-bottom: 0;
  color: #53605a;
}

form,
.form-section,
.result-section {
  width: 100%;
}

.form-section {
  margin-bottom: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e2e5e2;
  border-radius: 12px;
}

.form-section h2,
.result-section > h2 {
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.field + .field {
  margin-top: 16px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  min-height: 48px;
  width: 100%;
  border: 1px solid #bfc7c1;
  border-radius: 8px;
  background: #fff;
  color: #1f2933;
}

input {
  padding: 10px 12px;
}

select {
  padding: 10px 38px 10px 12px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 92, 69, 0.22);
  outline-offset: 2px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.model-fields[hidden] {
  display: none;
}

.field-error,
.form-error {
  min-height: 1.2em;
  margin: 5px 0 0;
  color: #a43c35;
  font-size: 0.88rem;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 9px;
  background: #315c45;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(1px);
}

.result-section {
  margin-top: 28px;
}

.result-card {
  margin-bottom: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e2e5e2;
  border-radius: 12px;
}

.result-card h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.result-details {
  margin: 0;
}

.result-details > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #edf0ed;
}

.result-details > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.result-details dt {
  color: #65736a;
  font-weight: 600;
}

.result-details dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.result-number {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}

.status-text {
  margin-bottom: 6px;
  font-size: 1.25rem;
  font-weight: 800;
}

.secondary-result {
  margin-bottom: 0;
  font-weight: 700;
}

@media (min-width: 600px) {
  body {
    padding: 28px;
  }

  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid .field + .field {
    margin-top: 0;
  }
}
