/* The Almanac — a farm journal. One column of numbered entries, a sticky index
   beside it, monospace for anything that is a measurement. */

:root {
  --paper: #eae6da;
  --paper-2: #e2ddce;
  --card: #f4f1e8;
  --ink: #22241e;
  --ink-2: #5d6055;
  --olive: #5f6b4a;
  --rust: #8a5a3b;
  --line: #cbc5b2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.75 "Source Serif 4", Georgia, serif;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: .75rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.meta, .issue, .head nav, .entry-no, .stat .u, .colophon, label span, button, .chips li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- head ---------- */

.head {
  display: grid; gap: .5rem 2rem; align-items: baseline;
  grid-template-columns: 1fr;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 56rem) { .head { grid-template-columns: auto 1fr auto; } }

.mark { font-family: "Bogart", Fraunces, Georgia, serif; font-weight: 500; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }
.issue { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.head nav { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; }
.head nav a { text-decoration: none; color: var(--ink-2); }
.head nav a:hover, .head nav a[aria-current] { color: var(--rust); }

/* ---------- page shell: sticky index + column ---------- */

.sheet {
  display: grid; gap: 0;
  max-width: 82rem; margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
@media (min-width: 62rem) { .sheet { grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); } }

.index { padding: 2.5rem 0 0 1.5rem; position: relative; color: var(--rust); border-left: 1px solid var(--line); }
@media (min-width: 62rem) { .index { position: sticky; top: 1.5rem; align-self: start; } }
.index p.meta { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin: 0 0 1rem; }
.index ol { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.index li { border-top: 1px solid var(--line); }
.index a { display: block; padding: .6rem 0; text-decoration: none; color: var(--ink-2); }
.index a:hover { color: var(--ink); }
.index .n { font-family: "IBM Plex Mono", monospace; font-size: .72rem; color: var(--rust); margin-right: .6rem; }

.column { padding: 2.5rem 0 4rem; }

/* ---------- opening ---------- */

.opening { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.opening h1 {
  font-family: "Bogart", Fraunces, Georgia, serif; font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.06; letter-spacing: -0.02em;
  margin: 0 0 1.2rem; max-width: 18ch;
}
.opening .lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 46ch; margin: 0; }

/* ---------- entries ---------- */

.entry { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); }
.entry-no {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--rust); margin: 0 0 .9rem;
}
.entry h2 {
  font-family: "Bogart", Fraunces, Georgia, serif; font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 1rem; max-width: 20ch;
}
.entry h3 { font-family: "Bogart", Fraunces, Georgia, serif; font-weight: 500; font-size: 1.1rem; margin: 0 0 .5rem; }
.entry p { margin: 0 0 1.1rem; max-width: 40rem; }
.entry p:last-child { margin-bottom: 0; }

.entry figure { margin: 1.8rem 0 0; }
.entry figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.entry figcaption {
  font-family: "IBM Plex Mono", monospace; font-size: .72rem; line-height: 1.6;
  color: var(--ink-2); margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .5rem;
}

.pair { display: grid; gap: 1.5rem; margin-top: 1.8rem; }
@media (min-width: 44rem) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; }

/* ---------- stats ---------- */

.stats { list-style: none; margin: 1.8rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.stats li { display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.stats .v { font-family: "Bogart", Fraunces, Georgia, serif; font-weight: 300; font-size: 1.4rem; line-height: 1; }
.stats .u { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin-top: .35rem; }
.stats .k { color: var(--ink-2); }

.note { background: var(--card); border-left: 3px solid var(--rust); padding: 1.4rem 1.5rem; margin-top: 1.8rem; }
.note p:last-child { margin-bottom: 0; }

.chips { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--card); border: 1px solid var(--line); padding: .3rem .8rem; font-size: .74rem; }

/* ---------- forms ---------- */

form { max-width: 34rem; margin-top: 1.8rem; }
label { display: block; margin-bottom: 1.2rem; }
label span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin-bottom: .45rem; }
input, textarea {
  width: 100%; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  padding: .75rem .85rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, textarea:focus { border-color: var(--rust); }
button {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .16em;
  background: var(--ink); color: var(--paper); border: 0;
  padding: .9rem 2rem; cursor: pointer;
}
button:hover { background: var(--rust); }
.sent { margin-top: 1rem; color: var(--rust); }

.contact-list { list-style: none; margin: 1.8rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.contact-list li { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.contact-list small { font-family: "IBM Plex Mono", monospace; display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin-bottom: .25rem; }
.contact-list a { text-decoration: none; font-size: 1.05rem; }
.contact-list a:hover { color: var(--rust); }

.link-more { display: inline-block; margin-top: .8rem; font-family: "IBM Plex Mono", monospace; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--rust); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .2rem; }

/* ---------- footer ---------- */

.foot {
  border-top: 2px solid var(--ink); background: var(--paper-2);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) 2rem;
}
.foot-grid { display: grid; gap: 2rem; max-width: 82rem; margin: 0 auto; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
.foot p { margin: 0 0 .4rem; font-size: .92rem; max-width: 34ch; }
.foot .meta { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); margin-bottom: .7rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--rust); }
.colophon { max-width: 82rem; margin: 2.5rem auto 0; font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }

/* current entry, tracked from scroll position */
.index a.is-current { color: var(--rust); }
.index a.is-current .n { font-weight: 500; }

.mark img { height: 40px; width: auto; }

/* three-slot sensory block — REFERENCES.md §3 */
.tasting { margin: 1.8rem 0 0; border-top: 1px solid var(--ink); max-width: 40rem; }
.tasting div { display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.tasting dt { font-family: "IBM Plex Mono", monospace; font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); padding-top: .35rem; }
.tasting dd { margin: 0; }
