/* ==========================================================================
   Notebook paper.

   Everything vertical is locked to a 28px ruled grid. Two rules make that
   work, and breaking either one visibly knocks the text off the lines:

   1. Every block consumes a whole number of 28px rules
      (padding-top + content height + margin-bottom, borders included).
   2. Every block's first baseline sits 19.736px below its own box top.

   19.736px is not a guess. For a line box of height L at font-size F the
   baseline sits at  L/2 + (ascent − descent)/2 × F.  Montserrat reports
   ascent 0.968em and descent 0.251em (hhea, and OS/2 typo metrics agree with
   USE_TYPO_METRICS set, so every engine uses the same numbers), giving:

        baseline = L/2 + 0.3585 × F

   At the body's 16px on a 28px rule that is 14 + 5.736 = 19.736px, which is
   where the ruling is drawn. Any element at a different size has its own
   natural baseline, so it carries a padding-top "shim" that pushes it down
   onto the next rule, and a matching margin-bottom that keeps the block a
   whole number of rules tall:

        shim   = (19.736 − (14 + 0.3585 × F)) mod 28
        margin = 28 − shim

     font-size   natural   shim      margin-bottom
        13px     18.660     1.076       26.924
        14px     19.019     0.717       27.283
        16px     19.736     0.000       28.000   body, h3
        18px     20.453    27.283        0.717   h2
        21px     21.529    26.207        1.793   h1

   Change a font-size and you must recompute its pair. There is a checker in
   the repo notes; the numbers above are its output.
   ========================================================================== */

:root {
  --rule: 28px;
  --baseline: 19.736px;     /* where text rests inside each rule */
  --paper: #f7f2e6;
  --ink: #202020;
  --ink-soft: rgba(32, 32, 32, 0.62);
  --accent: #15616d;
  --margin-line: rgba(183, 96, 84, 0.4);
  /* Faint enough to read as paper, dark enough to see. */
  --rule-ink: rgba(32, 32, 32, 0.13);
  /* One number drives both dimensions of a note, so square stays square. */
  --postit-size: 392px;
}

html {
  background-color: var(--paper);
}

/* --------------------------------------------------------------------------
   The page. Padding-top is a whole number of rules so the content starts in
   phase with the ruling painted from the padding box's top edge.
   -------------------------------------------------------------------------- */

body {
  font-family: Montserrat, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 56px 84px 96px;     /* 2 rules top, 3 bottom */
  font-size: 16px;
  line-height: var(--rule);
  position: relative;

  /* The ruling itself: a 1px line whose TOP edge is the baseline, so letters
     sit on it the way they do on paper. */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent var(--baseline),
    var(--rule-ink) var(--baseline),
    var(--rule-ink) calc(var(--baseline) + 1px),
    transparent calc(var(--baseline) + 1px),
    transparent var(--rule)
  );
}

/* The red margin rule. */
body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 66px;
  width: 2px;
  background: var(--margin-line);
}

/* Punch holes down the margin, spaced 11 rules apart so they sit level with
   the ruling rather than drifting against it. */
body::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  width: 9px;
  background-image:
    linear-gradient(var(--paper), var(--paper)),
    radial-gradient(circle 4.5px at 4.5px 4.5px, #1c1c1c 96%, transparent 100%);
  background-size: 9px 70px, 9px 308px;    /* 308 = 11 rules */
  background-position: 0 0, 0 70px;
  background-repeat: no-repeat, repeat-y;
}

/* --------------------------------------------------------------------------
   Headings. Sizes are deliberately few — every extra size is another shim to
   keep in step. Headings carry no underline: the rule beneath them already
   draws one, and a border would add height and push everything off the grid.
   -------------------------------------------------------------------------- */

/* Headings sit close to body size on purpose. Nobody writing in a notebook
   switches to a much larger hand for a heading — they write the same size and
   lean on weight. Big display sizes were reading as typography rather than
   handwriting, so the ladder is deliberately shallow: 21 / 18 / 16 against
   the body's 16. */

h1,
header h1,
main h1 {
  font-weight: 700;
  font-size: 21px;
  line-height: var(--rule);
  color: var(--ink);
  padding-top: 26.207px;
  margin: 0 0 1.793px;
  border: none;
  display: block;
}

h2 {
  font-weight: 600;
  font-size: 18px;
  line-height: var(--rule);
  color: var(--ink);
  padding-top: 27.283px;
  margin: 0 0 0.717px;
  border: none;
  display: block;
}

/* At body size, weight is the only thing marking an h3 as a heading — which
   is exactly how it works on paper. */
h3 {
  font-weight: 700;
  font-size: 16px;
  line-height: var(--rule);
  padding-top: 0;
  margin: 0 0 var(--rule);
}

/* A raised inline box can grow the line box beyond 28px and shove every line
   below it off the ruling. Zero line-height keeps the superscript from
   contributing any height at all. */
sup,
sub {
  font-size: 12px;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup { top: -0.45em; }
sub { bottom: -0.2em; }

/* Images sit in a frame a whole number of rules tall. Left at their natural
   height an image would be some arbitrary number of pixels, and every line
   below it would sit off the ruling for the rest of the page.

   object-fit: contain rather than cover, so nothing is cropped — the picture
   sits inside its frame with paper showing around it, the way a photo taped
   onto a ruled page would. */
img {
  display: block;
  /* Height is fixed to a whole number of rules; width follows the picture's
     own proportions, so the box hugs the photograph rather than leaving empty
     frame beside a portrait one. A very wide panorama hits max-width instead,
     and object-fit keeps it from stretching when it does. */
  height: 336px;                  /* 12 rules */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 0 var(--rule);
}

/* Markdown wraps an image in a paragraph, which already supplies the rule of
   space beneath it. Two margins would put the following text a rule too low. */
p > img {
  margin: 0;
}

.img-small { height: 168px; }     /* 6 rules  */
.img-tall  { height: 560px; }     /* 20 rules */

/* --------------------------------------------------------------------------
   Photographs, taped in.

   The paragraph Markdown wraps around an image is the thing the tape hangs
   off — an <img> is a replaced element and cannot carry pseudo-elements of
   its own. The wrapper shrinks to fit the picture so the tape lands on the
   photo's own corners rather than floating out in the margin beside a
   portrait one.

   The tilt is on the wrapper, so photo and tape lean together as one taped
   object. Transforms do not affect layout, so none of this moves anything on
   the ruled grid.
   -------------------------------------------------------------------------- */

p:has(> img) {
  position: relative;
  width: fit-content;
  max-width: 100%;
  transform: rotate(-0.9deg);
}

/* Photos need not all hang off the left margin. These shift a frame across
   the page and vary its lean, so a run of them reads as things stuck in by
   hand rather than a column of illustrations. Horizontal placement and
   rotation only — neither affects the vertical rhythm, so the ruling is
   untouched. Written as <p class="photo-right"><img ...></p>.

   The tilts are deliberately uneven and none is a round number: matching
   angles look like a repeated element rather than separate acts of sticking
   something down. */

p.photo-indent {
  margin-left: 11%;
  transform: rotate(0.7deg);
}

p.photo-right {
  margin-left: auto;
  margin-right: 0;
  transform: rotate(1.2deg);
}

p.photo-centre {
  margin-left: auto;
  margin-right: auto;
  transform: rotate(-0.5deg);
}

/* --------------------------------------------------------------------------
   A caption beside the frame rather than under it.

   A frame is only as wide as its picture, so a square or portrait photo
   leaves most of the column empty while its caption sits underneath reading
   as another line of body text. Side by side, the note reads as written
   against the photo and the empty half of the row is used.

   The footprint is unchanged and is still the frame's own: the picture keeps
   its 336px and the paragraph around it keeps the rule beneath, 364px and 13
   whole rules, and the caption is shorter than that so it never sets the
   height. Nothing is moved to the row itself — a margin here and a zeroed one
   on the frame would be two numbers to keep in step, and the checker reads
   the frame's.

   The caption's padding-top is two whole rules, so its first baseline still
   lands on the ruling at 56 + 19.736 below the row's top. Any whole number of
   rules would hold the grid; two drops the note far enough down the photo to
   read as written beside it rather than as a heading level with its top edge.
   -------------------------------------------------------------------------- */

.photo-aside {
  display: flex;
  align-items: flex-start;
  column-gap: var(--rule);
  margin: 0;
}

/* The frame keeps the width the picture gives it rather than being squeezed by
   the caption beside it, exactly as the homepage photo does. */
.photo-aside > p:has(> img) {
  flex: 0 0 auto;
}

.photo-caption {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-top: 56px;
  font-style: italic;
}

/* A column of ordinary prose beside a frame rather than a caption — the About
   page, where the photo sits to the right of the text. Put the text first and
   the frame second and the frame lands on the right without needing the
   reversed order below.

   The prose keeps body size, so every paragraph in it needs no shim and sits
   on the ruling as usual. The row takes the taller column, which is the text,
   and the frame's own 13 rules sit inside that. */
.photo-aside-text {
  flex: 1 1 0;
  min-width: 0;
}

/* A frame with its own caption beneath it, used as one column of the row —
   the About page, where the prose takes the other column and the picture and
   its caption travel together on the right.

   The width is stated rather than derived. Left to itself a block flex item
   takes its max-content width, and that is the caption set as one unbroken
   line — about 640px, which swallows the text column. `width: min-content`
   was the obvious fix and is wrong: the picture's intrinsic contribution does
   not win against the caption's longest word, so the column collapsed to the
   width of "occasionally", about 103px, leaving a tall thin sliver of frame
   with the photo letterboxed inside it and the caption breaking one word to
   a line.

   So: the frame's own width, stated. The picture is 3072 x 4080, and at the
   standard 336px frame height that is 336 x 3072 / 4080 = 253px. Recompute it
   if the photo is ever replaced with one of a different shape.

   The caption is an ordinary italic paragraph rather than .photo-caption:
   that class exists for a caption sitting BESIDE a frame and carries the two
   rules of padding that push it down the picture. Underneath, a plain <p> is
   both correct and one less thing for the checkers to model. */
.photo-aside-figure {
  flex: 0 0 auto;
  width: 253px;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   The About page: two columns, each a note wide.

   The prose, the two notes and the photo will not balance as one text column
   with everything stacked beside it. The right-hand side came to 952px
   against 840px of prose, so the row was as tall as the photo and the facts
   note sat below the lot, with a hole in the middle of the page.

   Two equal columns instead: prose then the facts note down the left, the
   name note then the photo down the right. 392 + 20 + 392 is 804, wider than
   the 748px column, so the pair reaches 12px into the left margin and 44px
   into the right, the same trick .postit-pair uses — clear of the red rule at
   66px and of the paper edge at 900px.

   It also gives the prose 392px instead of 328px, which is a better measure
   than it had squeezed beside a note.

   Left comes to about 1176px and right to 952px, both whole rules, so the row
   is 42 rules and what slack there is falls at the bottom of the right-hand
   column where the page ends anyway, rather than in the middle.
   -------------------------------------------------------------------------- */
.about-columns {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-left: -12px;
  margin-right: -44px;
}

.about-col {
  flex: 0 0 var(--postit-size);
  min-width: 0;
  max-width: 100%;
}

/* The frame is 253px in a 392px column, so left to itself it sits under the
   left edge of the note above it with a strip of paper down its right. An
   auto left margin pushes it across to line up with the note's right edge
   instead. Horizontal only, so the ruling is untouched — and scoped to the
   column, since the same class is a flex item elsewhere where an auto margin
   would eat the free space. */
.about-col > .photo-aside-figure {
  margin-left: auto;
}

/* A note can be a column of one of these rows too: the About page sets the
   name note beside the prose, and the facts note beside the photo. A note is
   a fixed 392px, so it must be neither stretched nor squeezed by whatever
   shares the row. Written as a child selector so neither checker reads it as
   a box of its own — the note's footprint still resolves from .postit. */
.photo-aside > .postit {
  flex: 0 0 auto;
}

/* The mirror image: frame to the right, note to its left. Only the order
   changes, so the footprint is identical — but a run of captioned photos still
   reads as stuck in by hand rather than set in a column. The lean is restated
   because the placement classes that normally vary it (photo-right and the
   rest) set a margin, and an auto margin inside a flex row eats the free space
   the caption needs. */
.photo-aside-right {
  flex-direction: row-reverse;
}

.photo-aside-right > p:has(> img) {
  transform: rotate(1.2deg);
}

/* The homepage photo, where the note used to be. It sits in the .home-top flex
   row, so flex-shrink is off: the frame keeps the width the picture gives it
   rather than being squeezed by the Latest column beside it. The margin is
   stated rather than inherited so the footprint is obvious — 336px of frame
   plus a rule beneath is 364px, 13 whole rules. Placement and lean only, like
   the other photo classes, so the ruling is untouched. */
/* Photo and caption travel together, the caption to the right of the frame
   rather than under it. The pair is a single flex item inside .home-top, so it
   wraps below Latest as a unit instead of splitting across two lines. The
   bottom margin lives on the pair, not the frame, so the footprint is stated
   once: 336px of picture plus a rule is 364px, 13 whole rules. */
/* Photo with its caption to the right, the pair sitting right of Latest.

   The basis is stated rather than left to auto because flex-wrap breaks lines
   BEFORE flex-shrink runs: an auto basis would be the caption's full unwrapped
   width, and the browser would bump the whole pair onto a line of its own below
   Latest. 320px is small enough to stay on the row; flex-grow then hands it the
   leftover space and the caption wraps inside that.

   Pulled up one rule, and NOT trimmed at the bottom. A negative bottom margin
   let the column hang past the biro line, which drew the line straight through
   the last line of the caption. -28 + 168 + 0 = 140px of flow, 5 whole rules. */
.home-aside {
  display: flex;
  align-items: flex-start;
  column-gap: 28px;
  flex: 1 1 320px;
  min-width: 0;
  margin: -28px 0 0;
}

.home-photo {
  flex: 0 0 auto;
  margin: 0;
  transform: rotate(1.1deg);
}

/* Body size and line-height, so the caption sits on the ruling like any other
   text. The padding drops it two rules down the photo rather than starting
   level with the top edge; two whole rules, so the first baseline still lands
   on the ruling at 56 + 19.736 below the box top. */
/* Tags are labels, not buttons. The page allows three lines — the ruling, the
   red margin rule and the footnote separator — so a bordered or filled tag
   would be a fourth. Smaller and letter-spaced is enough to read as a label,
   and being links they inherit the weight-on-hover signal the rest of the site
   uses rather than taking a colour of their own.

   Inline only, and line-height is inherited rather than set, so a tag can never
   grow the line box it sits in and nothing leaves the ruling. */
.tag-label {
  font-size: 13px;
  /* line-height: 0 for the same reason `sup` carries it. An inline box's height
     is its line-height, but it is placed on the parent's baseline — so a 13px
     tag inheriting the 28px line-height sits with 6.07px of half-leading under
     a 3.26px descender and reaches 9.34px below the baseline, where the 16px
     text around it reaches only 8.26px. The line box grows to 29.08px and every
     item carrying a tag pushes the page 1.08px off the ruling. Zeroing the
     line-height collapses the inline box so it can never grow the line; the
     highlighter stroke is unaffected, since a background paints over the
     content and padding box, which is font-size based. */
  line-height: 0;
  letter-spacing: 0.06em;
}

/* The brackets live here rather than in the templates so they are written once
   and always sit inside the highlighter stroke. */
.tag-label::before { content: "["; }
.tag-label::after  { content: "]"; }

/* One pen per tag. Each has its own wobble for the same reason the pink and
   mint do: the same shape in two colours reads as a repeated graphic rather
   than two strokes of a pen. Blog reuses the pink pen already on the page. */
.highlight-review {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3.4%2C8.2%20C50%2C2.8%2096%2C7.8%20138%2C3.4%20C174%2C0.8%20208%2C6.4%20236.4%2C2.8%20C239%2C12.4%20238%2C28.6%20236.2%2C39%20C194%2C43%20148%2C37.8%20104%2C41%20C72%2C43.2%2036%2C38.6%204.8%2C42%20C1.8%2C32.6%202.6%2C18%203.4%2C8.2%20Z%22%20fill%3D%22%23bcd9ee%22%2F%3E%3Cpath%20d%3D%22M10%2C11.6%20C56%2C6.8%20106%2C11.8%20156%2C8.2%20C186%2C6.4%20216%2C10%20233.6%2C6.8%20C235%2C15.4%20234.6%2C25.6%20233%2C33.4%20C188%2C36.4%20144%2C31.4%20102%2C33.6%20C68%2C35.2%2044%2C32.4%2012.6%2C35.4%20C10.4%2C27.6%209.8%2C18.8%2010%2C11.6%20Z%22%20fill%3D%22%2394c0e0%22%20opacity%3D%220.44%22%2F%3E%3C%2Fsvg%3E");
}

.highlight-take {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M2.6%2C6.8%20C40%2C2.4%2088%2C7.4%20130%2C3.6%20C168%2C0.6%20206%2C6.2%20237.4%2C3%20C239.6%2C12%20238%2C30.4%20236%2C40.2%20C198%2C43.4%20150%2C38.6%20106%2C41.4%20C70%2C43.6%2036%2C39.4%204.2%2C42.4%20C1.2%2C32%201.8%2C16.4%202.6%2C6.8%20Z%22%20fill%3D%22%23f8d0a0%22%2F%3E%3Cpath%20d%3D%22M12%2C10.4%20C62%2C6.2%20112%2C11.2%20162%2C7.2%20C190%2C5%20218%2C9.6%20232.4%2C6%20C234%2C15%20233.4%2C26%20231.8%2C33.8%20C186%2C36.6%20142%2C31.8%20100%2C34%20C68%2C35.6%2040%2C33.2%2014%2C35.6%20C11.4%2C27.8%2011.6%2C17.8%2012%2C10.4%20Z%22%20fill%3D%22%23eeb066%22%20opacity%3D%220.44%22%2F%3E%3C%2Fsvg%3E");
}

.highlight-recipe {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M2.6%2C5.6%20C40%2C10%2088%2C4.2%20132%2C7.4%20C168%2C10%20206%2C3.8%20237.4%2C6.8%20C238.6%2C15.6%20237.2%2C27.4%20236%2C38.2%20C198%2C35.4%20150%2C41.2%20106%2C38.6%20C72%2C36.6%2040%2C42.4%204.2%2C39.4%20C2%2C29.8%202.2%2C15.4%202.6%2C5.6%20Z%22%20fill%3D%22%23c3e8d5%22%2F%3E%3Cpath%20d%3D%22M13%2C9.6%20C56%2C13.2%20106%2C8.4%20154%2C11%20C188%2C12.8%20214%2C7.6%20232%2C9.8%20C233%2C16.4%20232.4%2C26%20231.4%2C31.8%20C192%2C29.6%20148%2C34.6%20106%2C32.4%20C74%2C30.8%2046%2C35.4%2014.6%2C33.2%20C12.8%2C26.4%2012.8%2C16.4%2013%2C9.6%20Z%22%20fill%3D%22%23a5dbc3%22%20opacity%3D%220.44%22%2F%3E%3C%2Fsvg%3E");
}

.highlight-blog {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2C7.5%20C46%2C3.2%2092%2C6.8%20134%2C4.2%20C170%2C1.8%20204%2C5.6%20237%2C2.4%20C239%2C11%20238.4%2C29%20236.6%2C39.6%20C196%2C42.6%20152%2C38.4%20108%2C40.8%20C74%2C42.6%2038%2C39%204.6%2C41.8%20C1.6%2C31.4%202.4%2C17.2%203%2C7.5%20Z%22%20fill%3D%22%23f4cbe9%22%2F%3E%3Cpath%20d%3D%22M11%2C11%20C58%2C7.4%20108%2C10.6%20158%2C7.8%20C188%2C6.2%20214%2C9%20233%2C6.4%20C234.4%2C14.6%20234%2C25%20232.6%2C33%20C190%2C35.8%20146%2C32.2%20104%2C34.2%20C70%2C35.8%2042%2C32.8%2013.4%2C35%20C11%2C27.4%2010.8%2C18.4%2011%2C11%20Z%22%20fill%3D%22%23eab5e0%22%20opacity%3D%220.42%22%2F%3E%3C%2Fsvg%3E");
}

.tag-meta {
  font-size: 13px;
  line-height: 0;                 /* same trap as .tag-label above */
  color: var(--ink-soft);
}

/* Body size, so it needs no shim: the browse line sits on the ruling like any
   other paragraph. Only the colour changes. */
.tag-browse {
  color: var(--ink-soft);
}

.home-caption {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-top: 56px;
  font-style: italic;
}

p:has(> img) > img {
  /* A print rather than a bare picture: white edge, and a shadow lifting it
     off the paper. box-sizing keeps the border inside the frame height, so
     the whole thing is still a whole number of rules — without it the 6px
     edge is added to the 336px, making 348 and dropping everything below the
     photo 12px off the ruling. */
  box-sizing: border-box;
  border: 6px solid #fdfdfb;
  background: #fdfdfb;
  box-shadow:
    0 1px 2px rgba(32, 32, 32, 0.14),
    0 8px 18px -10px rgba(32, 32, 32, 0.4);
}

/* Four strips, one per corner. A paragraph has only two pseudo-elements, so
   each one is a transparent overlay carrying two strips as background layers
   — ::before takes the top pair, ::after the bottom. The overlay is inset
   negatively so the tape overhangs the photo's edges the way real tape does.

   Each strip is an SVG with its angle baked in, since a background layer
   cannot be rotated on its own: torn ends, a milky translucent body and a
   lighter band of sheen down the middle. */

p:has(> img)::before,
p:has(> img)::after {
  content: "";
  position: absolute;
  inset: -30px;
  background-repeat: no-repeat;
  background-size: 104px 104px;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(32, 32, 32, 0.16));
}

p:has(> img)::before {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20104%20104%22%3E%3Cg%20transform%3D%22rotate%28-34%2052.0%2052.0%29%22%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22rgba%28236%2C233%2C222%2C0.62%29%22%2F%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M6%2C50%20L96%2C50%20L96%2C58%20L6%2C58%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.28%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20104%20104%22%3E%3Cg%20transform%3D%22rotate%2834%2052.0%2052.0%29%22%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22rgba%28236%2C233%2C222%2C0.62%29%22%2F%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M6%2C50%20L96%2C50%20L96%2C58%20L6%2C58%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.28%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-position: top left, top right;
}

p:has(> img)::after {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20104%20104%22%3E%3Cg%20transform%3D%22rotate%2834%2052.0%2052.0%29%22%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22rgba%28236%2C233%2C222%2C0.62%29%22%2F%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M6%2C50%20L96%2C50%20L96%2C58%20L6%2C58%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.28%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20104%20104%22%3E%3Cg%20transform%3D%22rotate%28-34%2052.0%2052.0%29%22%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22rgba%28236%2C233%2C222%2C0.62%29%22%2F%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M6%2C50%20L96%2C50%20L96%2C58%20L6%2C58%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.28%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-position: bottom left, bottom right;
}

/* One strip across the top instead of four corners, for photos that want to
   look more casually stuck up. Written as:
       <p class="tape-top"><img src="/images/x.jpg" alt="..."></p> */
p.tape-top:has(> img)::before {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20104%20104%22%3E%3Cg%20transform%3D%22rotate%28-2%2052.0%2052.0%29%22%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22rgba%28236%2C233%2C222%2C0.62%29%22%2F%3E%3Cpath%20d%3D%22M6%2C44%20L14%2C38%20L21%2C45%20L30%2C39%20L38%2C46%20L96%2C44%20L98%2C58%20L96%2C72%20L38%2C70%20L30%2C77%20L21%2C71%20L14%2C78%20L6%2C72%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M6%2C50%20L96%2C50%20L96%2C58%20L6%2C58%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.28%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-position: top center;
}

p.tape-top:has(> img)::after {
  background-image: none;
}


/* --------------------------------------------------------------------------
   Body copy. At 16px the shim is zero, so these are the simple ones: a whole
   number of lines, then one clear rule before whatever follows.
   -------------------------------------------------------------------------- */

p,
ul,
ol,
blockquote {
  margin: 0 0 var(--rule);
  padding-top: 0;
}

li {
  line-height: var(--rule);
  margin: 0;
}

/* Quotes are indented and nothing else: no border, no size change, no italic.
   A border would be a fourth line on a page that allows three, and a size
   change would need its own shim. padding-left is horizontal, so it costs the
   grid nothing. 24px matches the list indent above, so a quote and a list line
   up. */
blockquote {
  padding-left: 24px;
}

ul,
ol {
  padding-left: 24px;
}

/* Nested lists must not add a blank rule, or the parent list drifts. */
li > ul,
li > ol {
  margin-bottom: 0;
}

header p {
  color: var(--ink-soft);
  margin: 0 0 var(--rule);
}

/* `display: flow-root` on every container is load-bearing, not tidiness.
   Headings carry fractional bottom margins (an h2's is 1.793px). If one of
   those collapsed through a parent's 28px margin the block would end up
   82.207px tall — not a whole rule — and every line below it would sit off
   the ruling. flow-root stops child margins escaping. */
main,
section,
article,
header,
.categories,
.contact-form-card {
  display: flow-root;
}

main {
  padding-top: 0;
  margin: 0;
}

section {
  margin: 0 0 var(--rule);
}

article {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Navigation. A clear rule above it does the separating that a border used to.
   -------------------------------------------------------------------------- */

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  line-height: var(--rule);
  padding-top: 28px;
  margin: 0 0 0;
}

/* --------------------------------------------------------------------------
   Links. Deliberately indistinguishable from body text: no underline, and the
   same ink in every state, including visited. Weight is the only thing that
   moves, and only on hover — so links are found by exploring rather than by
   being advertised.
   -------------------------------------------------------------------------- */

a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
  color: var(--ink);
  text-decoration: none;
}

nav a {
  font-weight: 500;
  line-height: var(--rule);
}

a:hover {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Small text — 14px, shim 0.717.
   -------------------------------------------------------------------------- */

.footnote,
.post-back,
.see-all,
.category-more,
.page-tagline,
.review-meta {
  font-size: 14px;
  line-height: var(--rule);
}

.footnote {
  color: rgba(32, 32, 32, 0.65);
  padding-top: 0.717px;
  margin: 0 0 27.283px;
}

/* --------------------------------------------------------------------------
   Footnotes, as emitted by markdown-it-footnote.

   The separator is a deliberate third line on the page, alongside the ruling
   and the red margin rule. Its whole footprint is one rule — 1px of border
   plus 13 and 14 of margin — because anything else drops every note below it
   off the ruling. The default <hr> came to 10px and did exactly that.
   -------------------------------------------------------------------------- */

.footnotes-sep {
  /* The height carries the space above the line rather than a top margin,
     which would collapse into the preceding paragraph's 28px instead of
     adding to it. 13 + 1 + 14 = one rule. */
  border: 0;
  border-bottom: 1px solid rgba(32, 32, 32, 0.25);
  height: 13px;
  margin: 0 0 14px;
}

.post-back {
  display: block;
  color: var(--ink);
  padding-top: 0.717px;
  margin: 0 0 27.283px;
}

.see-all,
.category-more {
  display: inline-block;
  color: var(--ink);
  font-weight: 500;
  /* An inline-block sits on the parent's baseline, and its own baseline is its
     last line's. At 14px in a 28px line that puts its underside 8.98px below
     the baseline where the surrounding 16px text reaches only 8.26px, so the
     line box grew to 28.72px and each of the three category blocks pushed the
     homepage 0.72px off the ruling. Aligning to the top of the line box takes
     the baseline out of it: the box is already exactly one rule tall, so it
     lines up with the strut and nothing grows. */
  vertical-align: top;
}

.page-tagline {
  color: rgba(32, 32, 32, 0.65);
  padding-top: 0.717px;
  margin: 0 0 27.283px;
}

/* --------------------------------------------------------------------------
   Reviews. Each entry is its own file; this page assembles them, grouped by
   type. Spacing is in whole rules like everything else on the ruled page.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Highlighter pen.

   A drawn stroke rather than a background colour: a flat fill reads as a
   printed box. Each stroke's edges wander, its ends are slanted like a chisel
   tip, and a second denser pass overlaps part of it as though gone back over.
   The two colours use different wobbles on purpose — the same shape twice
   would read as a repeated graphic rather than two passes of a pen.

   mix-blend-mode: multiply is what sells it: the ink darkens what is beneath
   rather than covering it, so the page's ruling shows straight through the
   highlight exactly as it would on paper.

   Put it on an inline element — a link, or a span inside a heading. On a
   block it would run the full width of the line, which no highlighter does.
   -------------------------------------------------------------------------- */

.highlight {
  background-repeat: no-repeat;
  background-size: 100% 100%;
  mix-blend-mode: multiply;
  /* Generous overshoot on all four sides, the way a real stroke carries well
     past the words. Vertical padding on an inline box does not change the
     line height, so the extra ink spills toward neighbouring lines without
     moving anything on the grid. */
  padding: 0.3em 0.55em 0.34em;
  margin: 0 -0.45em;
  /* A wrapped phrase gets a stroke per line rather than one box stretched
     behind both. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.highlight-pink {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2C7.5%20C46%2C3.2%2092%2C6.8%20134%2C4.2%20C170%2C1.8%20204%2C5.6%20237%2C2.4%20C239%2C11%20238.4%2C29%20236.6%2C39.6%20C196%2C42.6%20152%2C38.4%20108%2C40.8%20C74%2C42.6%2038%2C39%204.6%2C41.8%20C1.6%2C31.4%202.4%2C17.2%203%2C7.5%20Z%22%20fill%3D%22%23f4cbe9%22%2F%3E%3Cpath%20d%3D%22M11%2C11%20C58%2C7.4%20108%2C10.6%20158%2C7.8%20C188%2C6.2%20214%2C9%20233%2C6.4%20C234.4%2C14.6%20234%2C25%20232.6%2C33%20C190%2C35.8%20146%2C32.2%20104%2C34.2%20C70%2C35.8%2042%2C32.8%2013.4%2C35%20C11%2C27.4%2010.8%2C18.4%2011%2C11%20Z%22%20fill%3D%22%23eab5e0%22%20opacity%3D%220.42%22%2F%3E%3C%2Fsvg%3E");
}

.highlight-mint {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2044%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M2.6%2C5.6%20C40%2C10%2088%2C4.2%20132%2C7.4%20C168%2C10%20206%2C3.8%20237.4%2C6.8%20C238.6%2C15.6%20237.2%2C27.4%20236%2C38.2%20C198%2C35.4%20150%2C41.2%20106%2C38.6%20C72%2C36.6%2040%2C42.4%204.2%2C39.4%20C2%2C29.8%202.2%2C15.4%202.6%2C5.6%20Z%22%20fill%3D%22%23c3e8d5%22%2F%3E%3Cpath%20d%3D%22M13%2C9.6%20C56%2C13.2%20106%2C8.4%20154%2C11%20C188%2C12.8%20214%2C7.6%20232%2C9.8%20C233%2C16.4%20232.4%2C26%20231.4%2C31.8%20C192%2C29.6%20148%2C34.6%20106%2C32.4%20C74%2C30.8%2046%2C35.4%2014.6%2C33.2%20C12.8%2C26.4%2012.8%2C16.4%2013%2C9.6%20Z%22%20fill%3D%22%23a5dbc3%22%20opacity%3D%220.44%22%2F%3E%3C%2Fsvg%3E");
}

/* Review titles sit at body size and weight — the highlighter does the work a
   larger size would otherwise do. */
.review h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: var(--rule);
  padding-top: 0;
  margin: 0;
}


/* flow-root so the last paragraph's margin cannot collapse into this one —
   without it consecutive reviews would sit a single rule apart, the same gap
   as two paragraphs, and stop reading as separate entries. */
.review {
  display: flow-root;
  margin: 0 0 var(--rule);
}

.review-meta {
  color: rgba(32, 32, 32, 0.65);
  padding-top: 0.717px;
  margin: 0 0 27.283px;
}

.review-jump {
  color: rgba(32, 32, 32, 0.65);
}

/* --------------------------------------------------------------------------
   Homepage.

   Latest sits beside a note, then a drawn line, then the categories: Animal
   and Vegetable side by side with Miscellaneal across the full width beneath.

   The two side-by-side arrangements are flex and grid rows. Each column is
   itself a whole number of rules tall, and a row takes the height of its
   tallest column, so the ruling survives underneath them.
   -------------------------------------------------------------------------- */

/* The note sits just past the list rather than being pushed to the far edge,
   which lands it near the middle of the page. */
.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  /* Two rules rather than three: Latest, the photo and its caption all have to
     sit on one line inside 748px of content, and the wider gap pushed the photo
     onto a line of its own. */
  column-gap: 56px;
  row-gap: 28px;
  flex-wrap: wrap;
}

/* Fixed width, not auto. Sized to its content, the column would grow when a
   link weights on hover and shove the note sideways — the note is stuck to
   the page, and things stuck to a page do not move when you point at
   something else.

   No bottom margin: inside the row it would only add dead space beneath the
   list, since the row is as tall as its tallest column anyway. */
.home-top .latest {
  flex: 0 0 16rem;
  margin: 0;
}

/* A line drawn with a biro rather than a border: it wanders, it is gone over
   twice, and the ink pools where the pen was set down. Two rules tall so the
   text below it still lands on the ruling. */
.biro-rule {
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20900%2024%22%20preserveAspectRatio%3D%22none%22%3E%20%3Cpath%20d%3D%22M6%2C13.5%20C120%2C9.5%20210%2C15.5%20322%2C12.2%20C440%2C8.8%20520%2C15.8%20636%2C12.6%20C726%2C10.1%20812%2C14.6%20894%2C10.8%22%20fill%3D%22none%22%20stroke%3D%22%232f3a6b%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.72%22%2F%3E%20%3Cpath%20d%3D%22M14%2C15.2%20C132%2C11.6%20214%2C17%20330%2C13.6%20C452%2C10.2%20528%2C17.2%20640%2C14%20C730%2C11.6%20818%2C15.8%20886%2C12.4%22%20fill%3D%22none%22%20stroke%3D%22%232f3a6b%22%20stroke-width%3D%221.1%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.34%22%2F%3E%20%3Cpath%20d%3D%22M6%2C13.5%20C30%2C12.6%2046%2C13.9%2062%2C13.1%22%20fill%3D%22none%22%20stroke%3D%22%232f3a6b%22%20stroke-width%3D%222.6%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.5%22%2F%3E%20%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 24px;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0 40px;
}

/* --------------------------------------------------------------------------
   Homepage categories. Separated by a clear ruled line rather than a border.
   -------------------------------------------------------------------------- */

.categories {
  margin: 0;
}

/* A section of separate links, not one link around the block. Wrapping the
   whole category meant a hover anywhere weighted every word in it at once. */
.category {
  display: flow-root;
  padding-top: 28px;      /* a clear rule between entries */
  margin: 0;
}

.categories .category:last-child {
  margin-bottom: 28px;
}

.category .tagline {
  color: rgba(32, 32, 32, 0.65);
  margin: 0 0 var(--rule);
}

.category-more {
  display: inline-block;
}

.category ul {
  margin: 0 0 var(--rule);
}



/* --------------------------------------------------------------------------
   Contact: a post-it stuck on top of the page.

   The note is opaque, so it hides the ruling underneath rather than fighting
   it — which is the whole point of it floating. That also frees its contents
   from the baseline grid: nothing inside needs to land on a line, because no
   lines show through. It works because the note is the last thing on the
   page, so its height cannot push any ruled prose out of step.
   -------------------------------------------------------------------------- */

/* Both notes are square and identical, whether or not there is enough in
   them to fill it, because a post-it is a fixed piece of paper. Width and
   height both come from --postit-size, so the two cannot fall out of step.

   392px holds the blue note's contents, which come to 363px: 38 padding +
   34 heading + 291 form (55 for each of the name and email labels, 151 for
   the six-line message box, 30 for send). Every element in there sets its own
   line-height, so that is arithmetic rather than an estimate, and the
   remaining 29px is headroom. Seven rows would fit too, with only 9px spare;
   six leaves room to breathe.

   min-height is a floor, not a fixed height, so anything making the contents
   exceed it grows that note alone and the pair stop matching. That is why the
   message box cannot be dragged. If the form ever needs more room, raise
   --postit-size rather than letting it push through. */
.postit {
  position: relative;
  box-sizing: border-box;
  width: var(--postit-size);
  max-width: 100%;
  min-height: var(--postit-size);
  margin: 28px 0 56px;      /* 28 + 392 + 56 = 476 = 17 rules */
  padding: 18px 20px 20px;
  color: var(--ink);
  box-shadow:
    0 1px 1px rgba(32, 32, 32, 0.10),
    0 12px 24px -12px rgba(32, 32, 32, 0.45);
}

/* Both notes are close in value to the paper — enough to read as separate
   objects, not enough to shout. Paper leans, and a note stuck on by hand
   never sits square, so each is tilted a little, and in opposite directions
   so they do not look printed. Transform does not affect layout, so the tilt
   costs nothing below it. */

.postit-blue {
  background: linear-gradient(170deg, #dcebf3 0%, #cfe1ed 62%, #c7dbe9 100%);
  transform: rotate(-1.15deg);
}

/* Every note on the site is the same size, out of the same imaginary pack.
   This one is therefore taller than the column it sits beside, so its
   footprint is trimmed with a negative margin: it takes 336px of flow — 12
   whole rules — and the remaining 56px hangs past, over the biro line and the
   categories' top padding, stopping short of their text.

   z-index because it is stuck on top of the page: without it the note would
   be painted under the line and the sections that come after it in the
   markup. */
.postit.postit-note {
  /* Pulled up two rules so it starts on the blank line above the nav, and
     trimmed by two at the bottom: -56 + 392 - 56 = 280px of flow, 10 whole
     rules, with the rest hanging past the biro line. */
  margin: -56px 0 -56px;
  /* Writing sits well down from the top edge, the way it would on a note you
     had actually written on — nobody starts hard against the gummed strip. */
  padding: 52px 24px 24px;
  font-size: 15px;
  line-height: 22px;
  flex: 0 0 auto;
  z-index: 2;
}

.postit-note p {
  margin: 0;
}

/* A clear line between the label and the message — 22px is the note's own
   line height, so it reads as one blank line rather than an arbitrary gap.
   The label is marked with the highlighter rather than weight, so it looks
   gone over by hand like the review titles do. */
.postit-note .note-heading {
  text-align: center;
  margin: 0 0 22px;
}

.postit-pink {
  background: linear-gradient(168deg, #f7e3e7 0%, #f0d5db 62%, #ead0d6 100%);
  transform: rotate(1.4deg);
  /* No margin of its own. It used to carry 56/56 and a 30px nudge from being
     the second note on the contact page; paired with the blue note on About
     those would set it a rule lower than its neighbour and push the pair too
     wide. Inheriting .postit's 28/56 keeps both notes level and both
     footprints at 476px, 17 whole rules. */
}

/* --------------------------------------------------------------------------
   Appendix notes. A reference list on a note rather than a run of paragraphs
   down the page: the lists are lookups, not reading.

   A note's contents are exempt from the ruling — it is opaque and floats
   above the page, so there is nothing showing through for the text to line up
   with. That is what buys the smaller type here. The note's OUTER footprint
   is untouched and still the standard 28 + 392 + 56 = 476, 17 whole rules:
   nothing below declares a margin or a height, so resolve_floating_box in
   simulate-layout.py still reads those off .postit.

   THE THING TO WATCH: min-height is a floor, not a ceiling. Content that
   overruns 392px grows that note alone, its footprint stops being 17 rules,
   and everything below it leaves the ruling — and neither checker will say
   so, because both read the height from this stylesheet rather than from what
   is actually in the note. The four notes were each measured to fit with room
   to spare; if you add entries, look at the page.

   At 13px over 17px there are 20 lines inside the 354px of usable height.
   -------------------------------------------------------------------------- */
.postit-list {
  font-size: 13px;
  line-height: 17px;
}

.postit-list h2 {
  font-size: 13px;
  line-height: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 17px;
  padding-top: 0;
}

.postit-list p {
  margin: 0 0 8px;
}

.postit-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.postit-list li {
  line-height: 17px;
  margin: 0;
}

/* A sub-heading within a note's list — the groups inside the protein notes. */
.postit-list .group {
  font-weight: 600;
  margin: 0;
}

/* The group after the first wants a blank line above it. :not(:first-child)
   rather than a margin on every group, so the list does not start with a gap
   it has no room for. */
.postit-list .group:not(:first-child) {
  margin-top: 17px;
}

/* Short entries run in two columns; the long ones in the carbohydrate note
   stay single, because a 166px column breaks them into shreds. */
.postit-columns ul {
  columns: 2;
  column-gap: 20px;
}

/* Keep a group's heading with at least some of its items. */
.postit-columns .group {
  break-after: avoid;
}

.postit-columns li {
  break-inside: avoid;
}

/* Two notes side by side, for an appendix that needed splitting in half.

   392 + 392 does not fit the 748px column, and shrinking them would break the
   one-pack rule every other note on the site keeps. So the pair reaches into
   the right margin instead: content starts 96px in, the pair is 792px wide,
   and 96 + 792 = 888 on a 900px page. Both notes stay on the paper and the
   left margin with its red rule is not touched. The lean throws a corner
   about 7px further out, which is still inside the 12px that is left.

   The gap is 20px, not the 8px it started at. Two notes lean in opposite
   directions, so a corner of each swings about 4px towards its neighbour and
   an 8px gap closed to almost nothing in the middle. The extra 12px comes off
   the left rather than the right: the pair already ends 12px short of the
   paper edge, while on the left there is clear paper between the red rule at
   66px and the content edge at 96px. Boxes now run 84 to 888, corners 79 to
   892, clear of the rule at one end and the paper edge at the other.

   No margin-bottom: each note keeps its 28/56, the row takes the taller
   of the two, and the footprint is 28 + 392 + 56 = 476, 17 whole rules.
   Both margins here are horizontal, so none of this touches the ruling. The
   note's top margin no longer collapses into the paragraph above — flex items
   do not collapse — so the pair sits one rule lower than a single note would.
   That is a whole rule, so the ruling is unaffected.

   simulate-layout.py has postit-pair in PARALLEL, and measures a floating
   panel inside a parallel container side by side rather than stacked. Without
   that it counted this pair as 952px, twice its real height. */
.postit-pair {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-left: -12px;
  margin-right: -44px;
}

/* Two more from the same pack. Background and lean only — no margin and no
   height, so the footprint stays .postit's. */
.postit-yellow {
  background: linear-gradient(172deg, #f6f0d8 0%, #f0e8c8 62%, #ebe2bd 100%);
  transform: rotate(-0.85deg);
}

.postit-green {
  background: linear-gradient(166deg, #e2eedd 0%, #d5e5cf 62%, #cde0c6 100%);
  transform: rotate(1.05deg);
}

/* The gummed strip across the top, where a real one is stuck down. */
.postit-blue::before,
.postit-pink::before,
.postit-yellow::before,
.postit-green::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.06)
  );
  pointer-events: none;
}

/* The bottom edge lifting very slightly away from the page. */
.postit-blue::after,
.postit-pink::after,
.postit-yellow::after,
.postit-green::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -3px;
  height: 10px;
  border-radius: 50%;
  background: rgba(32, 32, 32, 0.16);
  filter: blur(5px);
  z-index: -1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   The two notes on the About page, side by side in a .postit-pair.

   14px over 20px. At body size the name note runs to roughly 368px of text
   inside 354px of room; at 15/22 with the Reddit clause added it came to
   about 342px, which is under a line of headroom and too close to call by
   arithmetic alone. A note that outgrows 392px stops being 17 rules and takes
   everything below it off the ruling, and neither checker reads the content,
   so it would not be reported. At 14/20 the name note is about 296px and the
   facts note about 192px, which leaves room to be wrong by a line or two.
   -------------------------------------------------------------------------- */
.postit-about {
  font-size: 14px;
  line-height: 20px;
}

.postit-about li {
  line-height: 20px;
}

.postit-about p {
  margin: 0 0 12px;
}

.postit-about p:last-child {
  margin-bottom: 0;
}

/* The facts note carries little text for its size, so the list is spaced out
   — but by a stated amount, not by stretching to fill.

   It used to be a flex column with space-between, which handed the whole 160px
   of slack to five gaps: 32px between one-line bullets, and the last fact
   shoved flush against the bottom edge. Beside the name note, set solid, it
   read as stretched rather than spaced.

   12px between facts instead — the same gap the name note puts between its
   paragraphs, so the two read as one pair rather than two rhythms.

   It was a full line-height until the zoo fact grew to four lines, which took
   the note to about 352px inside 354px of room. Tightening the gaps gives
   back 40px, so the note sits near 312px with a couple of lines to spare. If
   a fact is ever added or lengthened, check the note has not pushed open:
   past 392px its footprint stops being 17 rules and the page below leaves the
   ruling, and neither checker looks inside a note. */
.postit-facts li + li {
  margin-top: 12px;
}

/* A list is the last thing in a note often enough, and its trailing rule of
   margin is wasted: the note's own 20px of bottom padding already closes it.
   Worth reclaiming rather than leaving, because a note is a fixed-height box
   where running out of room is the dangerous failure — the note grows, its
   footprint stops being a whole number of rules, and neither checker notices.
   The contact note ends in a form, so it is untouched. */
.postit ul:last-child {
  margin-bottom: 0;
}

/* Inside the note the page grid does not apply, so the heading drops the
   padding shim it needs out on the ruled page. */
.postit h2 {
  position: relative;
  font-size: 15px;
  line-height: 20px;
  padding-top: 0;
  margin: 0 0 12px;
}

.contact-form label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(32, 32, 32, 0.62);
  line-height: 16px;
  margin: 0 0 11px;
}

.contact-form input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 3px 2px;
  border: none;
  border-bottom: 1px solid rgba(32, 32, 32, 0.3);
  border-radius: 0;
  background: transparent;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink);
  box-sizing: border-box;
}

.contact-form input:focus {
  outline: none;
  border-bottom-color: rgba(32, 32, 32, 0.7);
}

/* Faint ruling in the message box only — it reads as somewhere to write,
   and echoes the page without repeating it. */
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0 2px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 15px,
    rgba(32, 32, 32, 0.16) 15px,
    rgba(32, 32, 32, 0.16) 16px,
    transparent 16px,
    transparent 20px
  );
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink);
  /* Not resizable: dragging it taller would grow this note past the height
     the pink one is pinned to. Nine lines covers most messages, and anything
     longer scrolls inside the box without losing a word. */
  resize: none;
  box-sizing: border-box;
}

.contact-form textarea:focus {
  outline: none;
}

/* Nothing here is a button. They are written links like every other link on
   the site: ink, no border, no fill, no underline — weight on hover is the
   only thing that ever changes. */

.contact-options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.contact-link,
button.contact-link {
  display: inline;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

a.contact-link:hover,
button.contact-link:hover {
  font-weight: 700;
}

button.contact-send {
  cursor: pointer;
  margin-top: 10px;
}

/* Not a link yet, so it does not behave like one. */
.contact-link-pending {
  opacity: 0.5;
}

.contact-link-pending span {
  font-size: 12px;
  font-weight: 400;
}

/* The placeholder note keeps its dashed box — it is a reminder to yourself,
   not part of the design. */
.todo-note {
  border: 1px dashed rgba(32, 32, 32, 0.35);
  background: rgba(32, 32, 32, 0.03);
  border-radius: 4px;
  padding: 13px 16px;
  font-style: italic;
  color: rgba(32, 32, 32, 0.7);
  margin: 0 0 var(--rule);
  line-height: var(--rule);
}

/* --------------------------------------------------------------------------
   Small screens. Only horizontal values change — touching anything vertical
   would take the text off the ruling.
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
  body {
    padding-left: 58px;
    padding-right: 22px;
  }
  /* A 392px square will not fit a phone. Rather than leave a tall thin strip,
     the notes size to their contents at this width, and the homepage note
     drops its negative margins so it stops overlapping what follows. */
  .postit {
    min-height: 0;
  }
  .postit.postit-note {
    margin: 0 0 28px;
  }
  .postit-pink {
    margin-left: 0;
  }
  /* A frame and a caption side by side do not fit a phone: the picture is
     most of the column already. They stack, and the caption gives back the
     rule beneath that the padding was standing in for on the wider layout.

     Written as a descendant selector on purpose. check-baseline-grid.py reads
     rules inside a media block as though they were top-level and merges them
     into the selector's box, so a bare `.photo-caption` here would overwrite
     the 56px shim the desktop layout is actually checked against. A compound
     selector is skipped by that parser, which is what we want: the simulator
     lays out one width, and this is not it. */
  .about-columns {
    display: block;
    margin-left: 0;
    margin-right: 0;
  }
  .photo-aside {
    display: block;
  }
  .photo-aside > .photo-caption {
    padding-top: 0;
    margin: 0 0 var(--rule);
  }
  body::before {
    left: 40px;
  }
  body::after {
    left: 14px;
  }
}
