:root {
  color-scheme: light;
  --paper: #f7f5ea;
  --ink: #223a2d;
  --green: #284d38;
  --muted: #506053;
  --olive: #5d673b;
  --line: #d9dcc9;
  --gold: #f1cc65;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #aa650e; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; }
h1 em, h2 em { color: var(--olive); }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; left: 1rem; top: 1rem; transform: translateY(-180%); padding: .65rem 1rem; background: white; }
.skip:focus { transform: none; }

.top { border-bottom: 1px solid var(--line); }
.top-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font: 700 1.09rem/1.14 var(--serif); }
.brand img { flex: none; }
.brand small { display: block; margin-top: .3rem; font: 750 .61rem/1 var(--sans); letter-spacing: .16em; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 2.9vw, 2.4rem); font-size: .89rem; font-weight: 650; }
nav a { text-decoration: none; padding-block: .55rem; }
nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.nav-weather { border: 1px solid #a9b49e; border-radius: 2rem; padding: .44rem .9rem; }
.nav-weather span { margin-left: .22rem; }
.hero { display: grid; grid-template-columns: .98fr 1.02fr; align-items: center; gap: clamp(1.4rem, 5vw, 5rem); padding-block: clamp(2.8rem, 6vw, 5.65rem) clamp(3.3rem, 6vw, 5.4rem); }
.eyebrow { display: flex; align-items: center; gap: .62rem; font: 750 .72rem/1.45 var(--sans); letter-spacing: .145em; }
.eyebrow i, .photo-dot { display: inline-block; flex: 0 0 8px; height: 8px; border-radius: 50%; background: #a16b20; }
.hero-copy { container-type: inline-size; }
.hero .eyebrow { margin-bottom: 1.25rem; }
h1 { font-size: clamp(3.25rem, 16.6cqw, 7.05rem); letter-spacing: -.075em; line-height: .94; }
.intro { color: var(--muted); max-width: 40ch; margin-top: 1.65rem; font-size: clamp(1rem, 1.4vw, 1.13rem); }
.actions { display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65em; padding: .63rem 1rem; border: 1px solid transparent; border-radius: 2rem; font: 700 .88rem/1.5 var(--sans); text-decoration: none; }
.primary { background: var(--green); color: #fffdf2; padding: .85rem 1.22rem; }
.primary:hover { background: #1b3929; }
.secondary { background: transparent; border-color: #9eaa97; color: var(--ink); }
.secondary:hover { background: #e9ecdc; }
button:disabled { opacity: .7; cursor: wait; }
.text-link { display: inline-flex; align-items: center; gap: .42em; font-size: .9rem; font-weight: 750; text-decoration: none; }
.hero-frame { position: relative; margin-right: .6rem; padding: .65rem; background: #fffef7; border: 1px solid #dfdfcb; box-shadow: .62rem .62rem 0 #e4e5d0; }
.hero-frame > img { width: 100%; height: auto; aspect-ratio: 1.28; object-fit: cover; }
.hero-frame figcaption { display: flex; align-items: center; gap: .55rem; padding: .66rem .28rem .14rem; font-size: .62rem; letter-spacing: .12em; font-weight: 800; }
.hero-frame figcaption > span:last-child { margin-left: auto; color: var(--muted); }
.flower-stamp { position: absolute; width: clamp(58px, 8vw, 96px); right: -1.55rem; top: -1.1rem; transform: rotate(10deg); filter: drop-shadow(0 2px 1px #122d2126); }

.pollination { background: #e9eddb; border-block: 1px solid #d7dec7; }
.pollination-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; padding-block: 1.35rem; }
.pollination-inner > p:nth-child(2) { font-size: .92rem; line-height: 1.55; max-width: 75ch; }
.pollination .text-link { white-space: nowrap; }
.section { padding-block: clamp(3.4rem, 6.4vw, 6.2rem); }
section[id] { scroll-margin-top: .5rem; }
.section-head { margin-bottom: 1.85rem; }
.section-head h2 { margin-block: .72rem .65rem; font-size: clamp(2.75rem, 5.6vw, 5rem); letter-spacing: -.055em; }
.section-head > p:last-child { max-width: 64ch; color: var(--muted); }
.phase-controls { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; margin-bottom: .85rem; }
.phase-controls button { text-align: left; display: flex; align-items: baseline; gap: .56em; border: 1px solid var(--line); border-radius: .55rem; padding: .8rem .75rem; background: #fdfbf1; color: var(--ink); font-weight: 700; }
.phase-controls button span { font-size: .65em; letter-spacing: .08em; }
.phase-controls button:hover { border-color: var(--green); }
.phase-controls button[aria-selected="true"] { background: var(--green); color: white; border-color: var(--green); }
.phase-controls button[aria-selected="true"] span { color: var(--gold); }
.phase { display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; background: #fffdf4; border: 1px solid var(--line); border-radius: .8rem; margin-bottom: .8rem; }
.phase > img { width: 100%; height: 100%; min-height: 270px; aspect-ratio: 1.65; object-fit: cover; }
.phase > div { padding: clamp(1.1rem, 3vw, 2.65rem); }
.phase h3 { font-size: clamp(1.9rem, 3.1vw, 3rem); margin: .55rem 0 .75rem; letter-spacing: -.035em; }
.phase p:not(.eyebrow) { color: var(--muted); }
.field-note { background: #edf0df; border-left: 3px solid #8a9561; padding: .72rem .85rem; margin-top: .9rem; font-size: .9rem; }
.field-note strong { color: var(--ink); }

.journal { background: #eeebdd; border-block: 1px solid #e1dfd0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-card { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; background: #fdfbf1; border: 1px solid #dedbc9; border-radius: .68rem; text-decoration: none; }
.gallery-card:hover { border-color: #768667; }
.gallery-card img { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 1.8; object-fit: cover; background: #e4e7d4; }
.gallery-card > span { display: grid; padding: .75rem .95rem .85rem; gap: .25rem; }
.gallery-card time { font-size: .66rem; letter-spacing: .13em; font-weight: 800; color: var(--muted); }
.gallery-card strong { font: 400 clamp(1.2rem, 2vw, 1.55rem)/1.16 var(--serif); }
.gallery-card b { margin-right: .9rem; width: 1.9rem; height: 1.9rem; border: 1px solid #cdd4bc; border-radius: 50%; display: grid; place-items: center; }
.gallery-card:hover b { background: var(--green); color: white; }

.lab { background: #203f30; color: #f7f5e7; }
.lab .section-head > p:last-child { color: #dbe5d6; }
.lab .section-head em, .lab > .wrap > .section-head > .eyebrow { color: #f1ce70; }
.lab .eyebrow i { background: var(--gold); }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.instruments, .sim { border: 1px solid #55725e; border-radius: .8rem; padding: clamp(1.15rem, 3vw, 2.25rem); }
.instruments h3, .sim h3 { font-size: clamp(1.65rem, 2.8vw, 2.45rem); letter-spacing: -.035em; }
.instruments dl { margin: 1rem 0 .85rem; }
.instruments dl > div { position: relative; padding: .64rem 0 .64rem 1.6rem; border-top: 1px solid #55725e; }
.sensor-index { position: absolute; left: 0; top: .87rem; font-size: .72rem; color: var(--gold); }
.instruments dt { font-weight: 700; }
.instruments dt small { display: inline-block; font-size: .57rem; letter-spacing: .08em; padding: .1rem .38rem; margin-left: .25rem; border: 1px solid #79917b; color: #fbdfa1; border-radius: .25rem; }
.instruments dd { margin: .16rem 0 0; color: #dbe5d6; font-size: .89rem; }
.lab-note { color: #dbe5d6; font-size: .83rem; }
.sim { background: #faf5e5; color: var(--ink); }
.sim h3 { margin: .44rem 0 .55rem; }
.sim > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
#sim-form { margin-top: 1rem; }
.moisture-label, .scale { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.moisture-label { font-weight: 750; font-size: .92rem; }
.moisture-label output { flex: none; font-variant-numeric: tabular-nums; }
#moisture { width: 100%; height: 1.5rem; margin: .45rem 0 .1rem; accent-color: var(--green); }
.scale { font-size: .7rem; color: var(--muted); }
.rain-label { display: flex; align-items: center; gap: .55rem; min-height: 2.75rem; margin: .35rem 0; font-size: .9rem; }
.rain-label input { width: 1.12rem; height: 1.12rem; accent-color: var(--green); margin: 0; }
.sim-status { display: grid; gap: .1rem; background: #e6edd9; border-left: 3px solid #658047; padding: .62rem .8rem; min-height: 4.6rem; font-size: .87rem; }
.sim-status[data-state="rain"] { background: #e1eceb; border-color: #42756f; }
.sim-status[data-state="water"] { background: #f4e4ae; border-color: #96731b; }
.sim-note { margin-top: .65rem; }
.cycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin: 1rem 0 0; list-style: none; padding: 0; }
.cycle li { display: flex; gap: .58rem; border-top: 1px solid #55725e; padding: .75rem .15rem .1rem; font-size: .82rem; color: #dbe5d6; }
.cycle strong { display: block; color: white; font-size: .94rem; }
.cycle b { color: var(--gold); }

.weather-card { background: #fffcf2; border: 1px solid var(--line); border-radius: .8rem; padding: clamp(1rem, 3vw, 2rem); }
.weather-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.weather-top strong { font: 400 1.55rem/1.15 var(--serif); }
.weather-values { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1rem 0; gap: .55rem; }
.weather-values div { padding: .7rem .9rem; background: #edf0df; border-radius: .55rem; }
.weather-values dt { font-size: .86rem; color: var(--muted); }
.weather-values dd { margin: .3rem 0 0; font: 400 clamp(1.7rem, 4.2vw, 2.8rem)/1.1 var(--serif); }
.weather-status, .weather-source { color: var(--muted); font-size: .82rem; }
.weather-source { margin-top: .3rem; }
.footer { background: #e9eddb; border-top: 1px solid #d7dec7; }

dialog { border: 1px solid var(--line); border-radius: .8rem; padding: 1rem; width: min(850px, calc(100% - 1.3rem)); max-height: calc(100% - 1.3rem); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #11281ee8; }
.dialog-top, .dialog-controls { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dialog-top { margin-bottom: .7rem; }
.dialog-top h2 { font-size: clamp(1.15rem, 3vw, 1.8rem); }
.dialog-controls { margin-top: .7rem; font-size: .85rem; }
#photo-full { width: 100%; height: min(62vh, 620px); object-fit: contain; background: #e6e9d9; border-radius: .35rem; }

@media (max-width: 920px) {
  .pollination-inner { grid-template-columns: 1fr auto; gap: .45rem 1rem; }
  .pollination-inner .eyebrow { grid-column: 1 / -1; }
  .phase > img { min-height: 320px; }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .hero { gap: 1.55rem; }
  .flower-stamp { right: -.95rem; top: -.85rem; }
  .lab-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .phase-controls button { flex-direction: column; gap: .1rem; font-size: .85rem; }
}
@media (max-width: 600px) {
  .top-inner { align-items: flex-start; flex-direction: column; gap: .5rem; padding-block: .7rem .46rem; }
  nav { width: 100%; justify-content: space-between; gap: .4rem; font-size: .82rem; }
  .nav-weather { padding: .35rem .65rem; }
  .hero { grid-template-columns: 1fr; padding-block: 2.4rem 2.6rem; gap: 1.9rem; }
  h1 { font-size: clamp(2.9rem, 16.6cqw, 5.1rem); }
  .intro { margin-top: 1.1rem; }
  .actions { margin-top: 1.2rem; }
  .hero-frame > img { aspect-ratio: 1.42; }
  .pollination-inner { grid-template-columns: 1fr; gap: .55rem; padding-block: 1.1rem; }
  .phase { grid-template-columns: 1fr; }
  .phase > img { min-height: 0; height: auto; }
  .phase-controls { grid-template-columns: repeat(3, 1fr); }
  .phase-controls button { flex-direction: row; gap: .35rem; padding: .62rem .45rem; }
  .cycle { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .weather-values { grid-template-columns: repeat(2, 1fr); }
  .weather-values div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 375px) {
  .wrap { width: calc(100% - 28px); }
  .gallery { gap: .55rem; }
  .gallery-card > span { padding: .6rem; }
  .gallery-card b { margin-right: .4rem; width: 1.5rem; height: 1.5rem; }
  .footer .brand img { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }




