:root {
  --paper: #f3eee6;
  --ink: #241c16;
  --muted: #5e554c;
  --wine: #6f2432;
  --moss: #3d4e3f;
  --line: #d9d0c3;
  --card: #faf6f0;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  --measure: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

.mast {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 1rem;
  border-bottom: 1px solid var(--line);
}

.mark {
  width: 5.5rem;
  height: auto;
  flex: none;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem;
}

.mast-text { min-width: 0; }

.kicker {
  margin: 0 0 0.2rem;
  color: var(--wine);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw + 1rem, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.where {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero { margin: 0; }

.hero img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
  object-position: center 62%;
}

.hero figcaption,
.pair figcaption {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.55rem var(--gutter) 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
}

.lead {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.2rem, 1.1rem + 1.1vw, 1.55rem);
  line-height: 1.45;
  max-width: none;
  width: 100%;
  text-wrap: pretty;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.15rem, 2.5vw, 1.75rem);
  align-items: center;
  margin: 2rem 0 2.5rem;
}

.split img {
  width: 100%;
  border: 1px solid var(--line);
}

h2 {
  margin: 0 0 0.55rem;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.55rem);
  color: var(--moss);
  text-wrap: balance;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0 0 2.5rem;
}

.notes article {
  background: var(--card);
  border-top: 3px solid var(--wine);
  padding: 1rem 1rem 1.15rem;
  min-width: 0;
}

.notes p,
.split p,
.close p,
.further p,
.plant p {
  margin: 0 0 0.8rem;
  text-wrap: pretty;
}

.notes p:last-child,
.split p:last-child,
.close p:last-child,
.further p:last-child,
.plant p:last-child { margin-bottom: 0; }

.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 1.15rem 0 0.25rem;
}

.kinds a {
  color: var(--wine);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.kinds a:hover { border-bottom-color: var(--wine); }

.kinds a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

.plant {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1.15rem, 2.5vw, 1.75rem);
  align-items: center;
  margin: 0 0 2.35rem;
  scroll-margin-top: 1rem;
}

.plant.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }

.plant.flip figure { order: 2; }

.plant figure { margin: 0; min-width: 0; }

.plant img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
}

.plant figcaption {
  margin: 0.45rem 0 0;
  padding: 0;
  max-width: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.latin {
  margin: 0 0 0.3rem;
  color: var(--wine);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#king,
#sugarbush,
#compacta,
#longifolia,
#pincushion,
#others { scroll-margin-top: 1rem; }

.further {
  max-width: none;
  margin: 0.25rem 0 1.35rem;
}

.close {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  max-width: none;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: start;
  margin: 0 0 2.5rem;
}

.pair figure { margin: 0; min-width: 0; }

.pair img { width: 100%; border: 1px solid var(--line); }

.pair figcaption {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.1rem var(--gutter) 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0.15rem auto; max-width: var(--measure); }

.fine { letter-spacing: 0.08em; }

@media (max-width: 1040px) {
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .split,
  .pair,
  .plant,
  .plant.flip { grid-template-columns: 1fr; }

  .plant.flip figure { order: 0; }

  .mast { align-items: flex-start; }

  .mark { width: 4.25rem; }

  .hero img {
    max-height: 58vh;
    min-height: 14rem;
  }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }

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

  .mast {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero img {
    max-height: 48vh;
    min-height: 13rem;
  }

  main { padding-bottom: 2.25rem; }

  .kicker { letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
