:root {
  color-scheme: light;
  --paper: #fbf9f3;
  --mist: #eef4ea;
  --sage: #cfddc6;
  --leaf: #436b4f;
  --leaf-dark: #23382b;
  --moss: #71815d;
  --petal: #e8cec2;
  --clay: #a76549;
  --ink: #26302a;
  --muted: #667267;
  --line: rgba(38, 48, 42, 0.14);
  --card: rgba(255, 253, 248, 0.92);
  --shadow: 0 18px 48px rgba(48, 60, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(207, 221, 198, 0.7), rgba(251, 249, 243, 0) 360px),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 249, 243, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav,
.hero-actions,
.toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--leaf-dark);
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--paper);
  font-size: 0.75rem;
  background: radial-gradient(circle at 30% 25%, #8caf80, var(--leaf));
  box-shadow: 0 10px 24px rgba(67, 107, 79, 0.22);
}

.site-header nav {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header a,
.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.site-header a:hover,
.site-header a[aria-current],
.text-button:hover {
  color: var(--leaf-dark);
  background: var(--mist);
}

.admin-link {
  color: var(--leaf);
  font-weight: 900;
}

main {
  min-height: 70vh;
}

section {
  padding: clamp(38px, 7vw, 78px) clamp(16px, 4vw, 52px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding-top: clamp(46px, 8vw, 92px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  color: var(--leaf-dark);
  font-size: clamp(2.75rem, 10vw, 6.6rem);
  line-height: 0.96;
}

h2 {
  color: var(--leaf-dark);
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1.08;
}

h3 {
  color: var(--leaf-dark);
}

p,
li,
dd {
  color: var(--muted);
  line-height: 1.64;
}

.hero-copy > p:not(.eyebrow),
.page-title > p:not(.eyebrow) {
  max-width: 720px;
  font-size: clamp(1.03rem, 2vw, 1.22rem);
}

.hero-actions,
.toolbar {
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 26px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 17px;
  font-weight: 900;
}

.button.primary {
  color: white;
  background: var(--leaf);
  box-shadow: 0 14px 30px rgba(67, 107, 79, 0.24);
}

.button.ghost {
  color: var(--leaf-dark);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.intro-band,
.toolbar-section,
.page-title {
  background: rgba(255, 255, 255, 0.34);
}

.section-heading {
  max-width: 850px;
}

.section-heading.compact {
  max-width: 920px;
}

.plant-grid,
.note-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.plant-card,
.note-card,
.gallery-card,
.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.plant-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.heirloom-card {
  border-color: rgba(167, 101, 73, 0.45);
  box-shadow: 0 18px 52px rgba(167, 101, 73, 0.16);
}

.plant-card-body,
.note-card,
.gallery-card,
.detail-block {
  padding: 20px;
}

.plant-card h2,
.note-card h2,
.gallery-card h2,
.detail-block h2 {
  font-size: 1.32rem;
}

.common-line {
  color: var(--clay);
  font-weight: 850;
}

.plant-photo {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--leaf-dark);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(67, 107, 79, 0.14), rgba(232, 206, 194, 0.72)),
    var(--mist);
}

.plant-photo.has-photo {
  padding: 0;
  overflow: hidden;
  background: var(--mist);
}

.plant-photo img,
.photo-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.plant-photo.large {
  min-height: clamp(280px, 45vw, 440px);
}

.plant-photo span {
  display: block;
  max-width: 18ch;
  font-weight: 900;
}

.plant-photo small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.tag-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-block: 12px 16px;
}

.tag {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--mist);
}

.text-button {
  width: max-content;
  max-width: 100%;
  margin-top: 10px;
  color: var(--leaf);
  font-weight: 900;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

input,
select {
  width: min(310px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  outline: 0;
}

select option {
  color: var(--ink);
  background: var(--paper);
}

input:focus,
select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(67, 107, 79, 0.14);
}

.detail-hero {
  display: grid;
  gap: 24px;
  align-items: end;
}

.detail-title {
  max-width: 760px;
}

.detail-layout {
  padding-top: 0;
}

.detail-main {
  display: grid;
  gap: 16px;
  max-width: 960px;
}

.facts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 18px;
  margin: 0;
}

.facts-list dt {
  color: var(--leaf-dark);
  font-weight: 900;
}

.facts-list dd {
  margin: 0;
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1rem;
}

.photo-panel {
  display: grid;
  gap: 8px;
}

.photo-panel strong {
  color: var(--leaf-dark);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.photo-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
}

.photo-grid img {
  aspect-ratio: 4 / 3;
}

.photo-grid figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
}

.journal-list {
  display: grid;
  gap: 12px;
}

.journal-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.soft-note {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--leaf-dark);
  font-weight: 900;
  background: var(--petal);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

footer {
  display: grid;
  gap: 12px;
  padding: 28px clamp(16px, 4vw, 52px);
  color: var(--muted);
  background: var(--leaf-dark);
}

footer p {
  margin: 0;
  color: rgba(251, 249, 243, 0.78);
}

footer nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--paper);
}

@media (min-width: 760px) {
  .hero,
  .detail-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  }

  .hero-visual,
  .detail-hero .plant-photo {
    order: 2;
  }

  .plant-grid,
  .note-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts-list {
    grid-template-columns: minmax(170px, 0.35fr) 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .plant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header nav a {
    justify-content: center;
  }

  .site-header nav a:last-child {
    grid-column: 1 / -1;
  }

  .toolbar {
    display: grid;
  }

  input,
  select {
    width: 100%;
  }
}
