:root {
  --leaf: #2f6f4e;
  --leaf-dark: #173a2c;
  --mint: #dff0df;
  --paper: #fffdf8;
  --clay: #b85838;
  --sun: #f2c15b;
  --ink: #223026;
  --muted: #68746c;
  --line: rgba(34, 48, 38, 0.14);
  --shadow: 0 18px 45px rgba(30, 49, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: #f6f3eb;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  min-height: 640px;
  background:
    linear-gradient(90deg, rgba(20, 37, 26, 0.76), rgba(20, 37, 26, 0.44) 42%, rgba(20, 37, 26, 0.12)),
    url("assets/balcony-veg-hero-wide.png") center / cover;
  color: white;
  display: flex;
  flex-direction: column;
}

.topbar {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--leaf-dark);
}

.nav-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(20, 37, 26, .36);
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
}

.hero-content {
  width: min(1160px, calc(100% - 32px));
  margin: auto auto 72px;
  padding: 42px 0 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sun);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-action,
.secondary-action,
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  background: var(--sun);
  color: var(--leaf-dark);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.dashboard {
  transform: translateY(-26px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric,
.guide-panel,
.log-form,
.log-card,
.crop-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  margin-right: 4px;
  font-size: 34px;
  color: var(--leaf);
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin-bottom: 72px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
}

.log-form,
.guide-panel {
  padding: 26px;
}

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

.log-form .section-heading,
.wide,
.checks,
.log-form button {
  grid-column: 1 / -1;
}

label,
legend {
  color: var(--leaf-dark);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.checks {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.checks label {
  font-weight: 600;
  color: var(--muted);
}

.checks input {
  width: auto;
  margin: 0 6px 0 0;
}

.care-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 16px;
}

.care-list li {
  border-left: 4px solid var(--clay);
  padding-left: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.care-list span {
  display: block;
  color: var(--leaf-dark);
  font-weight: 900;
}

.posts-section,
.crop-section,
.notes-section {
  margin-bottom: 76px;
}

.posts-section .eyebrow,
.crop-section .eyebrow,
.notes-section .eyebrow {
  color: var(--clay);
}

.note-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.note-card {
  min-height: 230px;
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.note-card span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--mint);
  color: var(--leaf-dark);
  font-size: 13px;
  font-weight: 900;
}

.note-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.filter {
  min-height: 38px;
  background: white;
  border: 1px solid var(--line);
  color: var(--leaf-dark);
}

.filter.active {
  background: var(--leaf);
  color: white;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.post-card {
  overflow: hidden;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.post-image {
  width: calc(100% + 44px);
  height: 230px;
  margin: -22px -22px 18px;
  display: block;
  object-fit: cover;
  background: var(--mint);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.post-meta span {
  color: var(--clay);
  font-weight: 800;
}

.post-meta .weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--leaf-dark);
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.post-meta .weather-pill span {
  color: inherit;
  font-weight: inherit;
}

.weather-icon {
  font-size: 16px;
  line-height: 1;
}

.post-card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}

.post-card p,
.post-content {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.post-card details {
  margin-top: 16px;
}

.post-card summary {
  cursor: pointer;
  color: var(--leaf);
  font-weight: 900;
}

.read-more,
.back-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--leaf);
  font-weight: 900;
}

.post-content {
  margin-top: 12px;
}

.single-post-page {
  background: #f6f3eb;
}

.single-post {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.single-post-article {
  margin-top: 20px;
  padding: 34px 32px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.single-post-article .post-meta {
  justify-content: center;
  gap: 12px;
  font-size: 15px;
}

.single-post-article h1 {
  max-width: 780px;
  margin: 18px auto 26px;
  text-align: center;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.single-post-image {
  width: 100%;
  max-height: none;
  display: block;
  margin: 0 0 26px;
  border-radius: 8px;
}

.single-post-content {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.95;
}

.crop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.crop-card {
  width: 100%;
  min-height: 250px;
  padding: 22px;
  box-shadow: none;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.crop-card:hover,
.crop-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 78, .38);
  box-shadow: 0 16px 34px rgba(30, 49, 40, .13);
  outline: none;
}

.crop-logo {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #eef7e9;
  border: 1px solid rgba(47, 111, 78, .14);
}

.crop-logo svg {
  width: 58px;
  height: 58px;
  display: block;
}

.crop-card h3 {
  margin: 16px 0 8px;
}

.crop-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.crop-more {
  display: inline-flex;
  margin-top: 16px;
  color: var(--leaf);
  font-size: 14px;
  font-weight: 900;
}

.crop-dialog {
  width: min(860px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.crop-dialog::backdrop {
  background: rgba(20, 37, 26, .38);
}

.crop-dialog-panel {
  position: relative;
  margin: 0;
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 34px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(20, 37, 26, .24);
}

.crop-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #edf2ea;
  color: var(--leaf-dark);
  font-size: 22px;
}

.crop-dialog-logo {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 28px;
  background: #eef7e9;
}

.crop-dialog-logo svg {
  width: 88px;
  height: 88px;
}

.crop-dialog h3 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 32px;
}

.crop-dialog-body {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.crop-dialog-intro {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--leaf-dark);
  text-align: center;
  font-size: 18px;
  line-height: 1.75;
}

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

.crop-detail-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid rgba(34, 48, 38, .1);
}

.crop-detail-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--leaf-dark);
  font-size: 15px;
  font-weight: 900;
}

.crop-detail-item h4 {
  margin: 0 0 6px;
  color: var(--leaf-dark);
  font-size: 16px;
}

.crop-detail-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 820px) {
  .hero {
    min-height: 650px;
    background-position: 62% center;
  }

  .topbar,
  .workbench {
    align-items: flex-start;
  }

  .topbar,
  .workbench,
  .log-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .hero-content {
    margin-bottom: 54px;
    padding-top: 30px;
  }

  .dashboard,
  .post-list,
  .note-grid,
  .crop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .hero h1 {
    font-size: 40px;
  }

  .dashboard,
  .post-list,
  .note-grid,
  .crop-grid,
  .crop-detail-grid {
    grid-template-columns: 1fr;
  }
}
