/* Open Learning Garden. Almanac and seed catalogue: one ink, one rust, ruled lines. */
@font-face { font-family: Vollkorn; src: url(/fonts/vollkorn-roman.woff2) format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: Vollkorn; src: url(/fonts/vollkorn-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Vollkorn SC"; src: url(/fonts/vollkorn-sc-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ground: #f4eedc;
  --leaf: #ebe2c8;
  --ink: #3a2818;
  --soil: #4a3320;
  --rust: #8a3c14;
  --rule: #a8946c;
  --hand: "Vollkorn", Georgia, "Times New Roman", serif;
  --caps: "Vollkorn SC", "Vollkorn", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0 auto;
  max-width: 70rem;
  padding: 0 1rem;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.58 var(--hand);
  overflow-wrap: break-word;
}

a { color: var(--rust); text-underline-offset: 0.14em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--soil); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--soil); color: var(--ground); padding: 0.5rem 0.9rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Masthead: name set over a double rule, like the head of a yearbook */
.masthead { text-align: center; padding: 1.4rem 0 0; }
.site-name { margin: 0; font: 600 clamp(1.7rem, 6vw, 2.9rem)/1.1 var(--caps); letter-spacing: 0.015em; }
.site-name a { color: var(--soil); text-decoration: none; }
.motto { margin: 0.2rem 0 0.8rem; font-style: italic; }
.masthead nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 1.25rem;
  border-top: 3px double var(--soil); border-bottom: 1px solid var(--soil);
  padding: 0.3rem 0;
  font: 600 1rem/1.5 var(--caps);
}
.masthead nav a { color: var(--soil); text-decoration: none; padding: 0.1rem 0; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--rust); text-decoration: underline; }

/* The sheet */
.sheet { padding: 1.5rem 0 2rem; }
.page-head { margin-bottom: 1.1rem; }
.folio { margin: 0; font: 600 0.95rem/1.3 var(--caps); color: var(--rust); }

h1, h2 { font-family: var(--caps); font-weight: 600; color: var(--soil); }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.12; margin: 0.1rem 0 0.4rem; }
h2 { font-size: 1.32rem; line-height: 1.25; margin: 1.9rem 0 0.35rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.1rem; }
h3 { font: italic 400 1.14rem/1.3 var(--hand); color: var(--soil); margin: 1.4rem 0 0.2rem; }
p { margin: 0 0 0.8rem; }
ul, ol { margin: 0 0 0.9rem; padding-left: 1.4rem; }
li { margin-bottom: 0.25rem; }
abbr { text-decoration: none; }

.sheet-soil .column > p:first-child::first-letter {
  float: left; font-size: 3.5em; line-height: 0.82; padding: 0.06em 0.09em 0 0; color: var(--rust); font-weight: 500;
}

.mind { border-left: 4px solid var(--rust); padding: 0.1rem 0 0.1rem 0.8rem; margin: 1rem 0; }

/* Margin column */
.margin { font-size: 0.97rem; line-height: 1.5; margin-top: 2rem; border-top: 1px solid var(--soil); padding-top: 0.6rem; }
.margin h2 { font-size: 1.08rem; margin-top: 1.1rem; }
.margin .notes > :first-child { margin-top: 0; }
.margin p { margin-bottom: 0.6rem; }
.contents ol { list-style: none; padding: 0; margin: 0; }
.contents li { margin: 0; padding: 0.14rem 0; border-bottom: 1px dotted var(--rule); }
.contents a { text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.contents a[aria-current] { color: var(--ink); font-weight: 600; }

.turn { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 0.5rem; font-style: italic; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; line-height: 1.35; }
caption { text-align: left; font-style: italic; padding-bottom: 0.3rem; }
thead th { font: 600 0.96rem/1.25 var(--caps); text-align: left; border-bottom: 2px solid var(--soil); vertical-align: bottom; }
th, td { padding: 0.28rem 0.6rem 0.28rem 0; vertical-align: top; }
tbody th { font-weight: 500; text-align: left; }
tbody tr { border-bottom: 1px dotted var(--rule); }

/* Crop pages: month strip, then the data line */
.strip { margin: 0.7rem 0 0.8rem; }
.strip table { table-layout: fixed; font-size: 0.86rem; border: 1px solid var(--soil); }
.strip caption { font-size: 0.93rem; }
.strip th, .strip td { padding: 0.1rem 0; text-align: center; border-left: 1px solid var(--rule); }
.strip thead th { font: 500 0.86rem/1.3 var(--hand); border-bottom: 0; }
.strip thead tr:last-child th { border-bottom: 2px solid var(--soil); }
.strip tr > th:first-child { width: 4.8rem; text-align: left; padding-left: 0.3rem; border-left: 0; font-style: italic; font-weight: 400; line-height: 1.2; }
.strip td.on { background: var(--soil); color: var(--ground); }
.strip tbody tr { border-bottom: 1px solid var(--rule); }

.dataline { display: flex; flex-wrap: wrap; gap: 0.15rem 1.5rem; margin: 0; padding: 0.4rem 0; border-top: 3px double var(--soil); border-bottom: 1px solid var(--soil); font-size: 0.97rem; line-height: 1.35; }
.dataline div { flex: 0 1 auto; }
.dataline dt { display: inline; font: 600 0.95rem/1.35 var(--caps); color: var(--rust); }
.dataline dt::after { content: ": "; }
.dataline dd { display: inline; margin: 0; }

/* Catalogue lists on the section pages */
.catalogue { margin: 1.2rem 0 0; }
.catalogue dt { font: 600 1.14rem/1.3 var(--caps); margin-top: 0.8rem; }
.catalogue dd { margin: 0; padding-bottom: 0.5rem; border-bottom: 1px dotted var(--rule); }

/* Home: the seasons */
.calendar-key { font-size: 0.97rem; }
.season h2 { font-size: 1.7rem; margin-top: 0.6rem; border-bottom: 3px double var(--soil); }
.season .months { font-style: italic; margin-bottom: 0.7rem; }
.season h3 { margin-top: 1rem; }
.season ul { padding-left: 1.1rem; }

/* Diagrams */
figure { margin: 1.2rem 0; }
figure svg { display: block; width: 100%; height: auto; max-width: 36rem; }
figcaption { font-size: 0.95rem; font-style: italic; margin-top: 0.3rem; }
.d-t { font: 400 13px var(--hand); fill: var(--ink); }
.d-s { font: 400 11px var(--hand); fill: var(--ink); }
.d-c { font: 600 14px var(--caps); fill: var(--soil); }
.d-l { stroke: var(--soil); stroke-width: 1.2; fill: none; }
.d-g { stroke: var(--rule); stroke-width: 0.6; fill: none; }
.d-a { fill: var(--soil); }
.d-b { fill: #8c6f4c; }
.d-c1 { fill: #c9b48c; }
.d-c2 { fill: var(--leaf); }
.d-w { fill: var(--ground); }
.d-r { fill: var(--rust); }
.d-rl { stroke: var(--rust); stroke-width: 2; fill: none; }
.d-dash { stroke: var(--soil); stroke-width: 1; stroke-dasharray: 4 3; fill: none; }

/* Tools */
.bench { border: 1px solid var(--soil); padding: 0.8rem; margin: 1rem 0; background: var(--leaf); }
.bench h2 { margin-top: 0; }
.bench label { display: block; font-weight: 500; }
.bench input, .bench select, .bench button { font: inherit; color: var(--ink); background: #fffbf0; border: 1px solid var(--soil); border-radius: 0; padding: 0.3rem 0.4rem; min-height: 2.5rem; max-width: 100%; }
.bench button { background: var(--soil); color: var(--ground); padding: 0.3rem 0.8rem; cursor: pointer; }
.bench button.quiet { background: none; color: var(--rust); border-color: var(--rust); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.fields input { width: 100%; }
.answer { margin-top: 0.8rem; border-top: 1px solid var(--soil); padding-top: 0.5rem; }
.answer .big { font: 600 1.5rem/1.2 var(--caps); color: var(--soil); margin-bottom: 0.2rem; }
.heap-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.4rem auto; gap: 0.4rem; align-items: end; margin-bottom: 0.45rem; }
.heap-row select, .heap-row input { width: 100%; }
#triangle { margin-top: 1rem; }
#triangle svg { max-width: 34rem; }
.tri { fill: transparent; stroke: var(--soil); stroke-width: 1; }
.tri.here { fill: #d9c49a; }
.pin { fill: var(--rust); stroke: var(--ground); stroke-width: 2; }
.needs-js { font-style: italic; }
.js .needs-js { display: none; }

/* Colophon */
.colophon { border-top: 3px double var(--soil); padding: 0.8rem 0 2rem; font-size: 0.97rem; line-height: 1.45; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font: 600 1rem/1.5 var(--caps); }
.colophon nav a { padding: 0.15rem 0; }

@media (min-width: 66rem) {
  .sheet { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; column-gap: 0; align-items: start; }
  .page-head { grid-column: 1 / -1; }
  .column { padding-right: 2.2rem; max-width: 45rem; }
  .sheet > .column:last-child { grid-column: 1 / -1; max-width: 45rem; }
  .margin { margin-top: 0; border-top: 0; padding: 0 0 0 1.4rem; border-left: 1px solid var(--soil); min-height: 100%; }
  .sheet-home { display: block; }
  .seasons { display: grid; grid-template-columns: 1fr 1fr; }
  .season { padding: 0 2rem 1rem 0; }
  .season:nth-child(even) { border-left: 1px solid var(--soil); padding: 0 0 1rem 2rem; }
  .home-lead { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; }
}

@media print {
  body { background: #fff; color: #000; max-width: none; font-size: 11pt; }
  .masthead nav, .colophon nav, .skip, .contents, .turn, .bench, .needs-js { display: none; }
  a { color: #000; }
  .margin { border: 0; }
  .strip td.on { background: #000; color: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  h2, h3 { break-after: avoid; }
  figure, table { break-inside: avoid; }
}

/* Glossary and bibliography */
.terms dt { font-weight: 600; margin-top: 0.7rem; }
.terms dd { margin: 0; }
.works { padding-left: 0; list-style: none; }
.works li { margin-bottom: 0.55rem; padding-left: 1.2rem; text-indent: -1.2rem; }
