/* =====================================================================
   Andrea's digital garden: DESIGN SYSTEM
   ---------------------------------------------------------------------
   1. Tokens (colours, fonts, sizes). Change a value here and it
      changes everywhere.
   2. Base and layout
   3. Shared parts: header, footer, labels, links, buttons, placeholders
   4. Front page: hero, filters, grid
   5. Tiles, one block per species
   6. Note pages: hero, chips, body, "Grows in this bed"
   7. Tool page extras: steps, guide viewer, sketches, downloads, log
   8. Article extras: the influences list
   9. Bed view
   10. About page: sections, dictionary, notes and references
   11. Tooltips
   12. Lightbox
   13. Phone adjustments

   Each bed's colour comes from content.js and is set on the element
   as --bed. Everything that uses "the bed colour" reads var(--bed).
   ===================================================================== */


/* ---------- 1. Tokens ---------- */
:root {
  /* Base colours */
  --paper: #F2EFE7;        /* page background */
  --ink: #161616;          /* text, lines, dark blocks */
  --muted: #5E5A52;        /* secondary text */
  --line: #D8D3C7;         /* soft dividers */
  --link: #1F3FD1;         /* royal blue: links */
  --lime: #C6F24E;         /* "Tending now" articles */
  --clipping: #FBF8F1;     /* scribbles, press, painting frames */
  --mat: #E9E2D3;          /* mat around paintings */
  --white: #FFFFFF;
  --on-ink: rgba(242, 239, 231, 0.7);   /* soft text on black */

  /* Placeholder colours (replaced by real images later) */
  --ph: #E4DFD3;
  --ph-alt: #DCD3EA;
  --ph-photo: #8A8378;
  --ph-photo-2: #A39C90;
  --ph-photo-3: #6F695F;
  --ph-painting: #7A6E8A;

  /* Fonts */
  --sans: 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  /* Spacing */
  --gutter: 40px;          /* space at the page edges */
  --gap: 32px;             /* space between tiles */
  --tap: 44px;             /* smallest size for anything you tap */

  /* Default bed colour, overridden per element */
  --bed: var(--line);
}


/* ---------- 2. Base and layout ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* Keeps content clear of the screen edges (and the iPhone notch). */
.wrap {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}


/* ---------- 3. Shared parts ---------- */

/* Small uppercase label used across the site */
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label--muted { color: var(--muted); }

/* Serif italic link in royal blue */
.link {
  font-family: var(--serif);
  font-style: italic;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

/* Site header */
.site-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
}
.site-head__inner {
  display: flex; justify-content: space-between; gap: 16px; width: 100%;
  border-bottom: 1px solid var(--ink);
  font-size: 14px; font-weight: 500;
}
.site-head a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 8px 0; text-decoration: none;
}

/* Site footer */
.site-foot__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 32px 48px; padding: 48px 0 64px;
  border-top: 1px solid var(--ink);
}
.site-foot__line {
  margin: 0; max-width: 640px;
  font-family: var(--serif); font-size: 32px; line-height: 1.1;
}
.site-foot__about {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); margin-top: 16px;
  font-size: 12px;
}
.site-foot__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.site-foot__contact .link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 24px; }
.email-text { user-select: all; }

/* Outlined button (Show email address etc.) */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
}
.btn--ink { background: var(--ink); color: var(--paper); }

/* Pill button (on dark heroes) */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--bed); color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
}

/* Grey box that stands in for an image until a real one is added */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px;
  background: var(--ph); color: var(--muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.ph--alt { background: var(--ph-alt); }
.ph--photo { background: var(--ph-photo); color: rgba(255, 255, 255, 0.75); }
.ph--painting { background: var(--ph-painting); color: rgba(255, 255, 255, 0.8); }

/* Small circle in the bed colour */
.dot {
  flex: none; display: inline-block;
  width: 8px; height: 8px; margin-right: 8px; border-radius: 50%;
  background: var(--bed);
  box-shadow: 0 0 0 1px currentColor;
}

.icon { flex: none; width: 16px; height: 16px; }


/* ---------- 4. Front page ---------- */
.home-hero { padding-top: 80px; padding-bottom: 64px; }
.display {
  margin: 0;
  font-weight: 500; font-size: clamp(52px, 9vw, 112px);
  line-height: 0.9; letter-spacing: -0.045em;
}
.home-hero__sub {
  margin: 28px 0 0; max-width: 900px;
  font-size: clamp(24px, 3.2vw, 38px); line-height: 1.1; letter-spacing: -0.02em;
}
.home-hero__sub .link { font-size: 1.16em; letter-spacing: 0; text-underline-offset: 6px; }
.home-hero__intro {
  margin: 24px 0 0; max-width: 620px;
  font-size: 18px; line-height: 1.5; color: var(--muted);
}
.home-hero__intro .link { white-space: nowrap; font-size: 21px; }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px;
  margin-bottom: 40px;
}
.field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.field__box { position: relative; display: block; }
.control {
  appearance: none; -webkit-appearance: none;
  min-height: var(--tap); min-width: 220px; width: 100%;
  padding: 0 44px 0 14px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; text-align: left;
  cursor: pointer;
}
.field__chev { position: absolute; right: 16px; top: 15px; width: 14px; height: 14px; pointer-events: none; color: var(--ink); }
.field__clear {
  position: absolute; right: 0; top: 0;
  display: flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border: 0;
  background: var(--ink); color: var(--paper); cursor: pointer;
}
.tags-pop {
  position: absolute; top: 48px; left: 0; z-index: 30;
  width: min(280px, calc(100vw - 32px)); padding: 8px 0;
  background: var(--paper); border: 1px solid var(--ink);
}
.tags-pop label {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px;
  font-size: 15px; color: var(--ink); cursor: pointer;
}
.tags-pop input { width: 18px; height: 18px; margin: 0; accent-color: var(--link); }
.tags-pop__n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tags-pop .btn { width: calc(100% - 28px); margin: 8px 14px 4px; justify-content: center; }
.filters__count { min-height: var(--tap); display: inline-flex; align-items: center; color: var(--muted); }

.empty { margin: 0 0 96px; font-family: var(--serif); font-style: italic; font-size: 32px; }

/* The grid: a masonry layout made with CSS columns.
   Columns are at least 240px wide, at most 4. */
.grid { columns: 4 240px; column-gap: var(--gap); padding-bottom: 64px; }
.grid--bed { columns: 3 220px; padding-top: 40px; }


/* ---------- 5. Tiles ----------
   Every tile has class "tile" plus "tile--<species>".
   The bottom row (.tile-meta) shows a dot in the bed colour,
   the species and the bed. */
.tile {
  position: relative; display: block;
  break-inside: avoid; margin: 0 0 var(--gap);
  color: var(--ink); text-decoration: none;
}
a.tile { cursor: pointer; }
.tile-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 18px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
}
.tile-meta__left { display: inline-flex; align-items: center; min-width: 0; }
.tile-meta__right { display: inline-flex; align-items: center; gap: 6px; text-align: right; }
.tile__title-sans { font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.tile__italic { font-family: var(--serif); font-style: italic; }
.tile__expand { position: absolute; top: 14px; right: 14px; color: var(--white); }

/* Project: full bed colour, logo, title, text */
.tile--project {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  min-height: 340px; padding: 20px; background: var(--bed);
}
.tile--project .tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tile__logo {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.tile--project .tile__title-sans { font-size: 46px; line-height: 0.95; letter-spacing: -0.04em; }
.tile--project p { margin: 14px 0 0; font-size: 15px; line-height: 1.45; }
.tile--project .dot { box-shadow: 0 0 0 1px var(--ink); }

/* Article: outlined, big title, italic serif text.
   Variants: is-tending (lime), is-ink (black). */
.tile--article {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 320px; padding: 20px;
  border: 1px solid var(--ink); background: var(--paper);
}
.tile--article .tile__title-sans { font-size: 34px; }
.tile--article p { margin: 24px 0 0; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.2; }
.tile--article.is-tending { background: var(--lime); }
.tile--article.is-ink { background: var(--ink); color: var(--paper); }

/* Quote: bed colour, big quotation mark */
.tile--quote {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 340px; padding: 20px; background: var(--bed);
}
.tile--quote .tile__mark { font-family: var(--serif); font-size: 72px; line-height: 0.6; height: 36px; }
.tile--quote blockquote { margin: 0; font-family: var(--serif); font-size: 40px; line-height: 1.02; }
.tile--quote .tile__source { margin: 20px 0 0; font-size: 15px; line-height: 1.4; }
.tile--quote .tile-meta { margin-top: 14px; }
.tile--quote .dot { box-shadow: 0 0 0 1px var(--ink); }

/* Tool: black, with a pill in the bed colour */
.tile--tool {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 340px; padding: 20px; background: var(--ink); color: var(--paper);
}
.tile--tool .tile__title-sans { font-size: 44px; line-height: 0.95; letter-spacing: -0.04em; }
.tile--tool p { margin: 12px 0 0; font-size: 15px; line-height: 1.45; opacity: 0.85; }
.tile--tool .tile__pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 8px 14px; border-radius: 999px; background: var(--bed); color: var(--ink);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* Publication: double rule on top, links out */
.tile--publication { padding: 20px; border: 1px solid var(--ink); border-top: 6px double var(--ink); background: var(--paper); }
.tile--publication .tile__source { color: var(--muted); }
.tile--publication .tile__title { margin-top: 36px; font-family: var(--serif); font-size: 32px; line-height: 1.04; }
.tile--publication .link { display: inline-block; margin-top: 16px; font-size: 19px; text-underline-offset: 4px; }
.tile--publication .tile-meta { margin-top: 22px; }

/* Scribble: a slightly crooked paper clipping with tape */
.tile--scribble { padding: 14px 6px 6px; }
.tile--scribble .tile__paper {
  position: relative; padding: 26px 20px 20px;
  transform: rotate(-1.5deg);
  border: 1px solid var(--ink); background: var(--clipping);
}
.tile--scribble .tile__tape {
  position: absolute; top: -11px; left: 50%; width: 84px; height: 22px; margin-left: -42px;
  transform: rotate(2deg); background: rgba(255, 255, 255, 0.65); border: 1px solid var(--line);
}
.tile--scribble .tile__title { font-family: var(--serif); font-size: 28px; line-height: 1.05; }
.tile--scribble p { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3; }

/* Press: newspaper clipping, links out */
.tile--press { padding: 18px 20px 20px; border: 1px solid var(--ink); background: var(--clipping); }
.tile--press .tile__masthead {
  display: flex; justify-content: space-between; padding: 6px 0;
  border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink);
}
.tile--press .tile__title { margin-top: 18px; font-family: var(--serif); font-size: 30px; line-height: 1.02; }
.tile--press p { margin: 10px 0 0; font-size: 14px; line-height: 1.45; }

/* Photo: image with caption on a dark fade */
.tile--photo { overflow: hidden; background: var(--ph-photo); color: var(--white); }
.tile--photo .tile__img { aspect-ratio: var(--ratio, 1 / 1); }
.tile--photo .tile__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 56px 18px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
.tile--photo .tile__italic { font-size: 26px; line-height: 1.05; }
.tile--photo .tile-meta { margin-top: 10px; }

/* Gallery: collage, links out to the album */
.tile--gallery { border: 1px solid var(--ink); background: var(--paper); }
.tile--gallery .tile__collage {
  position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  aspect-ratio: 4 / 3; border-bottom: 1px solid var(--ink);
}
.tile--gallery .tile__collage > :first-child { grid-row: span 2; }
.tile--gallery .tile__collage > :nth-child(2) { background: var(--ph-photo-2); }
.tile--gallery .tile__collage > :nth-child(3) { background: var(--ph-photo-3); }
.tile--gallery .tile__badge {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; background: var(--paper);
}
.tile--gallery .tile__body { padding: 16px 18px; }
.tile--gallery .tile__italic { font-size: 26px; line-height: 1.05; }
.tile--gallery p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.tile--gallery .tile-meta { margin-top: 16px; }

/* Painting: framed, with a mat */
.tile--painting { padding: 22px 22px 18px; border: 1px solid var(--ink); background: var(--clipping); }
.tile--painting .tile__img { position: relative; aspect-ratio: var(--ratio, 3 / 4); box-shadow: 0 0 0 6px var(--mat); }
.tile--painting .tile__expand { top: 10px; right: 10px; }
.tile--painting .tile__italic { margin-top: 22px; font-size: 24px; line-height: 1.05; }
.tile--painting .tile__sub { margin-top: 4px; color: var(--muted); }
.tile--painting .tile-meta { margin-top: 14px; }

/* Video: black with a play button */
.tile--video { aspect-ratio: var(--ratio, 16 / 10); background: var(--ink); color: var(--white); }
.tile--video .tile__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tile--video .tile__caption { position: absolute; left: 18px; right: 18px; bottom: 16px; }
.tile--video .tile__italic { font-size: 26px; line-height: 1.05; }
.tile--video .tile-meta { margin-top: 8px; }

/* Link: outlined, links out */
.tile--link { padding: 18px 20px; border: 1px solid var(--ink); background: var(--paper); }
.tile--link .tile__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile--link .tile__title-sans { font-size: 26px; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.tile--link p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.tile--link .tile-meta { margin-top: 14px; }

/* Hover: lift linked tiles a little */
@media (hover: hover) {
  a.tile { transition: transform 0.15s ease; }
  a.tile:hover { transform: translateY(-3px); }
}


/* ---------- 6. Note pages ---------- */
.page-hero {
  margin-top: 32px;
  padding: 32px 40px 48px;
  background: var(--ink); color: var(--paper);
}
.back {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--on-ink); text-decoration: none;
}
.page-hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 48px; }
.chip-species {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
  border: 1px solid rgba(242, 239, 231, 0.6); border-radius: 999px;
}
.chip-bed {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px;
  border-radius: 999px; background: var(--bed); color: var(--ink);
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.chip-status {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px;
  color: var(--lime);
}
.chip-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.page-title {
  margin: 20px 0 0; max-width: 1040px;
  font-weight: 500; font-size: clamp(46px, 8.5vw, 104px); line-height: 0.92; letter-spacing: -0.045em;
  overflow-wrap: break-word;
}
.page-lede {
  margin: 24px 0 0; max-width: 760px;
  font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); line-height: 1.1; opacity: 0.9;
}
.page-dates { margin: 28px 0 0; color: var(--on-ink); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.page-actions .link { color: var(--paper); font-size: 22px; display: inline-flex; align-items: center; min-height: var(--tap); }

.page-image .ph { aspect-ratio: 16 / 7; }

.page-body {
  display: flex; flex-wrap: wrap; gap: 40px 64px;
  padding-top: 56px; padding-bottom: 88px;
}
.page-body__aside { flex: 1 1 220px; }
.page-body__main { flex: 3 1 560px; min-width: 0; max-width: 720px; }

.meta-list { margin: 0; display: grid; gap: 20px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 6px 0 0; font-size: 16px; line-height: 1.4; }

/* Running text on note pages */
.prose { font-size: 19px; line-height: 1.6; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 20px 0 0; }
.prose h2 {
  margin: 64px 0 0;
  font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.08;
}
.prose h2 + p, .prose h2 + ol, .prose h2 + div { margin-top: 16px; }
.prose a { color: var(--link); text-underline-offset: 3px; }
.prose blockquote {
  margin: 40px 0; padding: 0 0 0 24px; border-left: 3px solid var(--bed);
  font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1.15;
}
.prose figure { margin: 40px 0 0; }
.prose figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.prose .small { font-size: 16px; color: var(--muted); }
.prose .aside { font-style: italic; color: var(--muted); }

/* "Grows in this bed" box at the bottom of a note page */
.grows {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 88px; padding: 28px; background: var(--bed);
}
.grows__name { margin-top: 12px; font-weight: 500; font-size: 48px; line-height: 0.95; letter-spacing: -0.04em; }
.grows p { margin: 12px 0 0; max-width: 520px; font-size: 16px; line-height: 1.45; }
.grows .link { color: var(--ink); font-size: 26px; display: inline-flex; align-items: center; min-height: var(--tap); }


/* ---------- 7. Tool page extras ---------- */
.steps { list-style: none; margin: 20px 0 0; padding: 0; border-bottom: 1px solid var(--line); counter-reset: step; }
.steps li { display: flex; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: '0' counter(step); flex: none; padding-top: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.steps strong { font-weight: 500; }

/* Guide viewer: one slide at a time */
.deck { margin-top: 24px; border: 1px solid var(--ink); }
.deck .ph { aspect-ratio: 16 / 9; }
.deck__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px; border-top: 1px solid var(--ink);
}
.deck__btn {
  display: flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border: 1px solid var(--ink); background: var(--paper); cursor: pointer;
}
.deck__btn:disabled { opacity: 0.3; cursor: default; }

.sketches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 24px; }
.sketches .ph { aspect-ratio: 4 / 3; }

.downloads { margin-top: 24px; border-top: 1px solid var(--ink); }
.download {
  display: flex; align-items: center; gap: 16px; padding: 18px 0;
  border-bottom: 1px solid var(--ink); text-decoration: none; color: var(--ink);
}
.download__kind {
  flex: none; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--bed); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
}
.download__text { flex: 1; min-width: 0; }
.download__name { font-size: 18px; font-weight: 500; }
.download__desc { margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.download__side { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.download.is-soon { opacity: 0.55; }
.download.is-soon .download__kind { background: var(--ph); }

.log { margin: 24px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.log > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.log dt { padding-top: 5px; color: var(--muted); }
.log dd { margin: 0; font-size: 17px; line-height: 1.5; }
.log .is-next dt { color: var(--link); }
.log .is-next dd { font-style: italic; }


/* ---------- 8. Article extras: the influences list ---------- */
.influences { margin-top: 56px; display: grid; gap: 64px; }
.influence { display: grid; grid-template-columns: 200px 1fr; gap: 28px; }
.influence .ph { aspect-ratio: 1 / 1; }
.influence h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; }
.influence h3 em { color: var(--muted); }
.influence .prose { font-size: 18px; }
.influence .prose p:first-child { margin-top: 14px; }


/* ---------- 9. Bed view ---------- */
.bed-hero { margin-top: 32px; padding: 32px 40px 48px; background: var(--ink); color: var(--paper); }
.bed-hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 48px; }
.bed-hero__text { flex: 1 1 560px; min-width: 0; }
.bed-hero__kind { display: flex; align-items: center; }
.bed-hero__kind .dot { width: 10px; height: 10px; margin-right: 10px; box-shadow: none; }
.bed-hero__logo {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 140px; height: 140px; border-radius: 50%; background: var(--bed); color: var(--ink);
}


/* ---------- 10. About page ---------- */
.about-hero { padding-top: 72px; padding-bottom: 48px; }
.about-hero .back { color: var(--muted); }
.about-hero h1 { margin-top: 24px; }
.about-hero p {
  margin: 28px 0 0; max-width: 820px;
  font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08;
}
.about-section {
  display: flex; flex-wrap: wrap; gap: 16px 64px;
  padding-top: 40px; padding-bottom: 56px;
}
.about-section__inner { display: contents; }
.about-section__label { flex: 1 1 220px; padding-top: 6px; }
.about-section__body { flex: 3 1 560px; min-width: 0; max-width: 720px; }
.about-section + .about-section { border-top: 0; }

.dictionary { margin: 0; display: grid; gap: 28px; }
.dictionary dt { font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
.dictionary dd { margin: 6px 0 0; font-size: 18px; line-height: 1.5; }
.dictionary .link { font-size: 20px; text-underline-offset: 4px; }
.dictionary > div:target dt { background: var(--lime); }

.notes-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.notes-list li { display: flex; gap: 14px; font-size: 16px; line-height: 1.5; }
.notes-list__n { flex: none; padding-top: 3px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.notes-list a { color: var(--link); }
.notes-list .back-ref { text-decoration: none; margin-left: 4px; }
.notes-list li.is-flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--lime); } 100% { background: transparent; } }


/* ---------- 11. Tooltips ----------
   Used for note numbers [1] and the "?" next to garden words. */
.tip-wrap { position: relative; display: inline; }
.ref {
  font-family: var(--mono); font-size: 0.6em; vertical-align: super; line-height: 0;
  color: var(--link); text-decoration: none; padding: 0 1px; cursor: pointer;
}
.qmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; margin: 0 2px; vertical-align: 0.35em;
  border: 1px solid currentColor; border-radius: 50%; background: none;
  font-family: var(--mono); font-size: 12px; line-height: 1; cursor: pointer;
}
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 50;
  width: min(320px, calc(100vw - 32px)); transform: translateX(-50%);
  padding: 16px 18px;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-style: normal; font-size: 15px; line-height: 1.45; letter-spacing: 0; text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.tip[hidden] { display: none; }
.tip__label { display: block; margin-bottom: 6px; color: var(--on-ink); }
.tip__word { display: block; margin-bottom: 4px; font-weight: 500; font-size: 18px; }
.tip a { color: var(--lime); }
.tip__more { display: block; margin-top: 10px; }


/* ---------- 12. Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background: var(--ink); color: var(--white);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lightbox[hidden] { display: none; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lightbox__count { color: rgba(255, 255, 255, 0.7); }
.lightbox__btn {
  display: flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4); background: none; color: var(--white); cursor: pointer;
}
.lightbox__btn--round { width: 52px; height: 52px; border-radius: 50%; }
.lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 16px 0; }
.lightbox__media { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lightbox__media .ph { width: 100%; height: 100%; }
/* --r is the image's width / height as a number, set by garden.js */
.lightbox__media.is-photo { aspect-ratio: var(--ratio, 1 / 1); width: min(100%, calc(62vh * var(--r, 1))); }
.lightbox__media.is-painting { aspect-ratio: var(--ratio, 3 / 4); width: min(calc(100% - 40px), calc(56vh * var(--r, 0.75))); box-shadow: 0 0 0 18px var(--mat), 0 0 0 19px var(--ink); }
.lightbox__media.is-video { aspect-ratio: 16 / 9; width: min(100%, 900px); background: #000; position: relative; }
.lightbox__caption { text-align: center; padding-bottom: 8px; }
.lightbox__title { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.05; }
.lightbox__sub { margin-top: 8px; color: rgba(255, 255, 255, 0.7); }
.lightbox__chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; }
.lightbox__chips .chip-species { border-color: rgba(255, 255, 255, 0.5); }
.lightbox__text { max-width: 560px; margin: 12px auto 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.8); }
.lightbox__dates { margin-top: 10px; color: rgba(255, 255, 255, 0.6); }
body.has-lightbox { overflow: hidden; }


/* ---------- 13. Phone adjustments ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; --gap: 20px; }
  .home-hero { padding-top: 48px; padding-bottom: 40px; }
  .filters { flex-direction: column; align-items: stretch; }
  .control { min-width: 0; }
  .page-hero, .bed-hero { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); margin-top: 16px; padding: 20px var(--gutter) 36px; }
  .page-hero__chips, .bed-hero__row { margin-top: 28px; }
  .bed-hero__logo { width: 96px; height: 96px; }
  .page-body { padding-top: 36px; padding-bottom: 56px; }
  .prose { font-size: 18px; }
  .prose blockquote { font-size: 26px; }
  .grows { margin-bottom: 56px; padding: 22px; }
  .grows__name { font-size: 38px; }
  .influence { grid-template-columns: 1fr; gap: 16px; }
  .influence .ph { aspect-ratio: 16 / 9; }
  .log > div { grid-template-columns: 1fr; gap: 4px; }
  .site-foot__line { font-size: 26px; }
  .tile--project .tile__title-sans { font-size: 40px; }
  .lightbox__btn--round { display: none; }
  .tip { left: 0; transform: none; }
}

/* Download rows sit inside running text: keep them ink, not link blue */
.prose .download { color: var(--ink); text-decoration: none; }
