/*
 * The avail on paper: the PDF (WeasyPrint, templates/buyer/avail_pdf.html) and the buyer
 * page's browser print (linked media="print"; main.css is screen-only there).
 * Hand-written plain CSS on purpose (P §Sprint 2): WeasyPrint 70 drops media-feature
 * queries, @supports, @property and color-mix(), so no Tailwind here. Hex tokens are
 * main.css's frozen palette (docs/design.md); borders are explicit. The fonts are vendored
 * copies of frontend/fonts (OFL) so CI and Fly lay out the same.
 * No italic face is vendored: font-style: italic would silently draw upright.
 */
/* One face per weight in use, each its own fixed-weight file cut from the variable one
   (scripts/pdf_fonts.py; the Avail design pass's audit, Oct 25): WeasyPrint 70 ignores a weight
   range ("100 900") and laid the variable file out at its Thin master's widths whatever the
   weight, so bold set too tight on every PDF. */
@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/PublicSans-latin-400.woff2") format("woff2");
  font-weight: 400;
}

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/PublicSans-latin-500.woff2") format("woff2");
  font-weight: 500;
}

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/PublicSans-latin-600.woff2") format("woff2");
  font-weight: 600;
}

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/PublicSans-latin-700.woff2") format("woff2");
  font-weight: 700;
}

@font-face {
  font-family: "Bitter";
  src: url("/static/fonts/Bitter-latin-700.woff2") format("woff2");
  font-weight: 700;
}

@page {
  size: letter;
  margin: 0.55in 0.5in 0.75in;

  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
    font: 8pt "Public Sans", sans-serif;
    color: #5f6b69;
  }

  /* The category a page opens in (the buyer sheet's, below): a long one that runs onto the
     next page is named there, where only the column headings repeated (the Avail proofing,
     Oct 20, item 11). Browsers ignore it. */
  @top-left {
    content: string(category, start);
    font: 600 8pt "Public Sans", sans-serif;
    color: #5f6b69;
  }
}

/* The first page opens on the grower's own header. */
@page :first {
  @top-left {
    content: none;
  }
}

html {
  color: #22272a;
  background: #fff;
  font-family: "Public Sans", sans-serif;
  font-size: 8.5pt;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

body {
  margin: 0;
}

h1,
h2 {
  font-family: "Bitter", serif;
  font-weight: 700;
  color: #02796b;
  margin: 0;
}

h1 {
  font-size: 18pt;
}

h2 {
  font-size: 10pt;
}

p {
  margin: 0;
}

a {
  color: #02796b;
  text-decoration: none;
}

small {
  font-size: inherit;
  color: #5f6b69;
}

/* The header: logo, name, address, the day and the live link. */
.avail-head {
  border-bottom: 2px solid #02796b;
  padding-bottom: 6pt;
  margin-bottom: 8pt;
}

/* The logo in the PDF header and in the page's own <header> when printed: main.css (and
   its h-16) is screen-only, so without this a big logo prints at its pixel size. */
.avail-head img,
header > img {
  display: block;
  max-height: 0.6in;
  max-width: 2.5in;
  margin-bottom: 4pt;
}

.avail-head p {
  margin-top: 2pt;
}

/* The grower's ordering info, in full under the header, and the list's footer note after the
   tables (the Avail foundation, Oct 24, M7). */
.avail-info,
.avail-note {
  max-width: 6.5in;
  white-space: normal;
}

.avail-note {
  margin-top: 10pt;
}

/* The page's Ordering info disclosure, opened for the browser's print (buyer.js): the text,
   without the summary's caret. */
details[data-kind="ordering"] [data-caret] {
  display: none;
}

/* Its paragraphs (the list's note, the grower's) a line apart, and the Updated and Printed lines
   clear of it (the Avail design pass, Oct 25: one contact line, Ordering info under it). */
details[data-kind="ordering"] {
  margin-bottom: 6pt;
}

details[data-kind="ordering"] p + p {
  margin-top: 4pt;
}

/* The page's footer (the credit alone on paper) clear of the last row. */
main > footer {
  margin-top: 12pt;
  border-top: 1px solid #e2e7e6;
  padding-top: 4pt;
}

/* The footer line rides in the bottom margin of every PDF page (position: fixed repeats). */
.avail-foot {
  position: fixed;
  bottom: -0.45in;
  left: 0;
  font-size: 8pt;
}

.terms {
  margin-top: 12pt;
  border-top: 1px solid #e2e7e6;
  padding-top: 6pt;
  break-inside: avoid-page;
}

.terms h2 {
  margin-bottom: 4pt;
}

.terms p {
  margin-bottom: 4pt;
}

/* The quote PDF (templates/buyer/quote_pdf.html, S8 part 2): Plant · Size · Qty · Price ·
   Total on the avail's rules, the totals in the table's foot, the total above a heavy rule. */
.quote-head {
  margin-bottom: 8pt;
}

.quote-head p,
.quote-after {
  margin-top: 4pt;
}

table.quote {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9.5pt;
}

table.quote col.c-size {
  width: 16%;
}

table.quote col.c-qty {
  width: 12%;
}

table.quote col.c-price,
table.quote col.c-total {
  width: 14%;
}

table.quote th,
table.quote td {
  border-bottom: 1px solid #e2e7e6;
  padding: 3pt 4pt;
  text-align: left;
  vertical-align: top;
}

table.quote thead th {
  border-bottom: 1.5px solid #22272a;
  font-size: 8pt;
}

table.quote .num {
  text-align: right;
}

table.quote tr {
  break-inside: avoid;
}

table.quote tfoot td {
  border-bottom: 0;
}

table.quote tr.total th {
  border-top: 1.5px solid #22272a;
  border-bottom: 0;
}

/* The buyer page printed from the browser: the same paper, from the page's own markup. */
main section {
  margin-top: 10pt;
}

section[data-section] h2 {
  border-bottom: 1px solid #02796b;
  padding-bottom: 2pt;
  break-after: avoid;
}

section[data-section] ul,
section.sheet ul,
details ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li.row {
  display: flex;
  gap: 8pt;
  border-bottom: 1px solid #e2e7e6;
  padding: 2pt 0;
  break-inside: avoid;
}

li.row > * {
  flex: none;
  width: 9em;
}

li.row > :first-child {
  flex: 1;
}

li.row > :last-child {
  width: 16em;
  text-align: right;
}

/* Screen controls never print: search, buttons, the no-match line, the public page's
   category jump row; nor the phone-only labels (Tailwind's md:hidden), since print is the
   desk layout. */
input,
button,
.btn,
#no-match,
[data-search],
nav[aria-label="Categories"],
.md\:hidden,
.md\:sr-only {
  display: none;
}

/* Print what the screen shows: a search hides rows and sections with the hidden attribute,
   and main.css's [hidden] rule (Tailwind preflight) is screen-only, so restate it here or
   li.row's display: flex would bring the hidden rows back. */
[hidden] {
  display: none !important;
}

footer hr {
  border: 0;
  border-top: 1px solid #e2e7e6;
  margin: 12pt 0 4pt;
}

/* The buyer sheet on paper (Sprint 24 Step 6, docs/archive/buyer-sheet-2026-10-13.md §2.6): the page
   printed from the browser and the PDF, one markup (templates/buyer/_ledger.html). The same
   rows and columns, no toolbar or index; each quantity a write-in line, "____ of 150"; a
   header row per category table (and atop each page a table runs onto); rows never split.
   Black and white, the grower's (§2.7): buyer documents ([data-surface="buyer"]) drop the
   teal and the Bitter headings the grower's own papers keep. */
[data-surface="buyer"] h1,
[data-surface="buyer"] h2 {
  font-family: "Public Sans", sans-serif;
  color: #22272a;
}

[data-surface="buyer"] h1 {
  font-size: 16pt;
}

[data-surface="buyer"] h2 {
  font-size: 11pt;
}

[data-surface="buyer"] a {
  color: #22272a;
}

[data-surface="buyer"] .avail-head {
  border-bottom: 1px solid #e2e7e6;
}

[data-surface="buyer"] header img {
  display: block;
  max-height: 0.45in;
  max-width: 2.5in;
  margin-bottom: 4pt;
}

[data-surface="buyer"] section[data-section] {
  margin-top: 10pt;
}

[data-surface="buyer"] section[data-section] h2 {
  margin-bottom: 2pt;
  border-bottom: 0;
  padding-bottom: 0;
  break-after: avoid;
  string-set: category content(text);
}

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

.toolbar,
[data-no-print],
[data-downloads],
[data-contact] [data-say],
[data-search],
[data-jump],
[data-live],
[data-print],
[data-skip] {
  display: none;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 8.5pt;
}

.ledger th,
.ledger td {
  padding: 1.5pt 4pt;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
}

.ledger thead th {
  border-bottom: 2px solid #22272a;
  color: #5f6b69;
  font-size: 7.5pt;
  font-weight: 600;
}

.ledger [data-col="size"] {
  width: 0.8in;
}

.ledger [data-col="price"] {
  width: 0.65in;
}

.ledger [data-col="qty"] {
  width: 1in;
}

/* The PDF's own columns (the Avail foundation, Oct 24, M2 and M4): Ready within 30 days, its
   number, and Order qty, a write-in line on every row that isn't sold out. */
.ledger [data-col="ready"] {
  width: 0.9in;
}

.ledger [data-col="order"] {
  width: 0.75in;
}

/* Words wrap in their column ("Ready within 30 days"), the headers of the paper's own two
   columns too; numbers never do. */
.ledger td[data-words],
.ledger thead :is([data-col="ready"], [data-col="order"]) {
  white-space: normal;
}

.ledger [data-col="total"] {
  display: none;
}

.ledger [data-num] {
  text-align: right;
  white-space: nowrap;
}

/* A unit price wraps after its "/" (the page's <wbr>, the Avail design pass's default 3), on
   paper too: nowrap ran the sod farm's prices past their column. */
.ledger td[data-col="price"] {
  white-space: normal;
}

.ledger tbody tr {
  break-inside: avoid;
}

/* A plant's sizes stay together: a later size hides the name (below), so a page that opened
   on one printed a size with no plant (the Avail proofing, Oct 20, item 10). */
.ledger tbody tr:not([data-lead]) {
  break-before: avoid;
}

.ledger tbody tr[data-lead] > *,
.ledger tbody tr > :is(td, [data-col="size"]) {
  border-top: 1px solid #e2e7e6;
}

.ledger tbody tr[data-top] > * {
  border-top: 0;
}

.ledger [data-name] strong {
  font-weight: 600;
}

.ledger [data-name] small,
.ledger th:first-child > [data-note] {
  margin-left: 0.4em;
}

/* The page, printed: the header's parts have their dots here (main.css's are a screen's). The
   PDF's lines are text, with its own. */
[data-eyebrow] > * + *::before,
[data-contact] > * + *::before {
  content: " · ";
}

/* The page, printed: as on screen its plant's name is one cell spanning the sizes, top-aligned,
   so a later size's is out of the table (Brendan's tweaks, Nov 3), and a size's note is a quiet line
   in the Plant column, "Quart · More in October", the numbers a clean grid (the avail's balance, Nov
   4, item 2). The PDF's notes stay tags; since Nov 12 its name spans a plant's sizes too (below). */
body:not([data-doc="avail"]) .ledger tbody tr:not([data-lead]) > th:first-child {
  display: none;
}

body:not([data-doc="avail"]) .ledger tbody :is(th, td) {
  vertical-align: top;
}

.ledger [data-col="size"] > [data-note] {
  display: none;
}

.ledger [data-notes] {
  display: block;
  color: #555;
  font-size: 7.5pt;
}

.ledger [data-notes] b {
  font-weight: 500;
}

/* The note is a tag on paper too, outlined, so it never reads as the common name (the Avail
   design pass, Oct 25, M3: its parentheses went). */
.ledger th:first-child > [data-note] {
  display: inline-block;
  padding: 0 2pt;
  border: 0.75pt solid #7f8b89;
  border-radius: 2pt;
}

/* Nov 6 (Brendan: a long note "would look off" in the box): a tag is short; a longer note is a
   plain line under the name. */
.ledger th:first-child > [data-note="long"] {
  display: block;
  margin-left: 0;
  padding: 0;
  border: 0;
}

/* A phone's lines under a size and its screen reader's "available" stay off paper: the page,
   printed, has the Ready within 30 days column as the PDF does, and the note is its tag (the
   Avail design pass, Oct 25, M3). */
.ledger td > [data-more],
.ledger [data-unit] {
  display: none;
}

/* A plant's later sizes keep its name for a reader, not on paper (as on screen). */
.ledger tbody tr:not([data-lead]) [data-name] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* The write-in: the page's field as a line, or the PDF's empty one, then "of 150". */
.ledger .qty input,
.ledger [data-write] {
  display: inline-block;
  width: 26pt;
  height: 10pt;
  margin: 0 3pt 0 0;
  padding: 0 2pt;
  border: 0;
  border-bottom: 0.75pt solid #555;
  border-radius: 0;
  background: none;
  font: inherit;
  text-align: left;
  vertical-align: baseline;
}

/* Sold out takes no write-in, as on the PDF (§2.6, invariant 179; the buyer pages' review, Nov 3:
   the screen's disabled box printed as a line). */
.ledger .qty[data-sold] {
  display: none;
}

.ledger .qty [data-label],
.ledger td [data-label],
.ledger td > small[data-over] {
  display: none;
}

/* The count sheet (templates/app/count_sheet.html, S6 §17): big type for a pencil in the
   yard, a heavier rule where a bed starts, and a wide blank Count column. Size, Last count
   and Count are fixed in em, so they hold "32-cell" and "3,296" on one line at any page
   width; Plant takes the rest (and Location's share when no plant has one). */
table.count {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12pt;
  line-height: 1.25;
}

table.count col.c-size {
  width: 5.5em;
}

table.count col.c-last {
  width: 9.5em;
}

table.count col.c-count {
  width: 7em;
}

table.count .nowrap {
  white-space: nowrap;
}

/* The Yard proofing (Oct 20, item 53): one line a plant (was the common name and the date each
   on a second line, 14 rows a page), with room in the Count box for a pencilled number. */
table.count th,
table.count td {
  border-bottom: 1px solid #e2e7e6;
  padding: 3pt 4pt;
  height: 20pt;
  text-align: left;
  vertical-align: middle;
}

table.count thead th {
  border-bottom: 1.5px solid #22272a;
  font-size: 9pt;
}

table.count tr {
  break-inside: avoid;
}

/* A bed's heading row (was a Location column): the Yard's name for it, kept with its first plant. */
table.count tr.bed th {
  border-top: 1.5px solid #02796b;
  padding-top: 8pt;
  font-size: 10pt;
  font-weight: 700;
}

table.count tr.bed {
  break-after: avoid;
}

table.count td.count {
  border-left: 1px solid #5f6b69;
  border-bottom: 1px solid #5f6b69;
}

table.count small {
  font-size: 9pt;
}

.sheet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16pt;
  margin-bottom: 10pt;
  font-size: 11pt;
}

/* Print is a real button (it was a link that printed): screen controls hide everywhere on this
   sheet, print.css being its only stylesheet, so the nav's own comes back. */
.sheet-nav button {
  display: inline;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* On screen the sheet is the paper with a margin; printed, the nav goes. A phone draws the sheet
   at 720px wide, scaled to about half: the nav's links grow there so a thumb still gets 44px
   (the Yard proofing, item 29). Nested in screen, which WeasyPrint skips whole: it reads media
   types only and would log (and drop) a pointer query of its own. */
@media screen {
  body:has(.sheet-nav) {
    margin: 16px;
  }

  @media screen and (pointer: coarse) {
    .sheet-nav a,
    .sheet-nav button {
      display: inline-flex;
      align-items: center;
      min-height: 88px;
      font-size: 18pt;
    }
  }
}

@media print {
  .sheet-nav {
    display: none;
  }
}

/* The letter campaign's letter page (Sprint 22, templates/letters/preview_letter.html): its own
   named page, wider margins and no page counter; letter-size type; the QR code at 1.5in square
   with its quiet zone, so the code itself prints over an inch. A placeholder is dashed and
   muted until Brendan's wording replaces it. */
@page letter {
  margin: 0.9in 1in;

  @bottom-right {
    content: none;
  }
}

.letter {
  page: letter;
  font-size: 11pt;
  line-height: 1.45;
  font-variant-numeric: proportional-nums; /* Oct 28: a letter's figures, not a ledger's columns */
}

/* Nov 12 (Brendan's test print on his letterhead: "the date is really close to the letter head"):
   the prospect demo's letter prints on it, its logo in the top inch, so the page starts 1.4in down,
   half an inch under the logo; the gaps to the address and the greeting give 0.2in of that back,
   so the letter keeps its one page. */
@page letterhead {
  margin: 1.4in 1in 0.9in;

  @bottom-right {
    content: none;
  }
}

.letter[data-paper="letterhead"] {
  page: letterhead;
}

.letter[data-paper="letterhead"] .letter-to {
  margin-top: 0.35in;
}

.letter[data-paper="letterhead"] .letter-body {
  margin-top: 0.3in;
}

.letter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.letter-mark {
  font-family: "Bitter", serif;
  font-weight: 700;
  font-size: 16pt;
  color: #02796b; /* Oct 29: the wordmark's one green, the site's accent */
}

.letter-to {
  margin-top: 0.45in;
}

.letter-body {
  margin-top: 0.4in;
}

.letter-body > * + * {
  margin-top: 0.9em;
}

/* Room written in pen (Oct 28, Brendan's draft): the greeting ("Tom,") above the body, and the
   signature above the printed name. */
.letter-pen {
  height: 0.3in;
}

.letter-signature {
  padding-top: 0.5in;
}

.letter-placeholder {
  padding: 0.12in 0.15in;
  border: 1px dashed #7f8b89;
  color: #5f6b69;
}

.letter-placeholder > p + p {
  margin-top: 0.6em;
}

.letter-qr {
  display: flex;
  align-items: center;
  gap: 0.3in;
  margin-top: 0.45in;
}

.letter-qr img {
  width: 1.5in;
  height: 1.5in;
}

.letter-url {
  margin-top: 0.4em;
  font-size: 8pt;
  color: #5f6b69;
  overflow-wrap: anywhere;
}


/* ---------------------------------------------------------------------------------------
   The avail PDF (the Avail design pass, Oct 25, docs/archive/sprint-avail-design-2026-10-25.md M8,
   defaults 2 and 9; templates/buyer/avail_pdf.html, body[data-doc="avail"]): Letter, 0.5in
   margins, 10pt type (12pt took the sample from 11 pages to 17), grays only. Page 1's header in
   the web's order with the QR code on the right; how to order under it; the tables' own columns
   (Plant | Size | Price | Available | Ready within 30 days | Order); Ordering info the last page;
   every page's foot a running element with the page count and the credit. Scoped to the avail
   PDF: the quote PDF, the count sheet, the letter and the page's own print keep their rules. */
@page avail {
  margin: 0.5in 0.5in 0.75in;

  @bottom-left {
    content: element(foot);
    width: 100%;
    vertical-align: top;
    padding-top: 10pt;
  }

  @bottom-right {
    content: none;
  }
}

[data-doc="avail"] {
  page: avail;
  font-size: 10pt;
  line-height: 1.25;
}

[data-doc="avail"] .avail-foot {
  position: running(foot);
  bottom: auto; /* the quote PDF's fixed footer's offset (above) */
  left: auto;
  display: flex;
  justify-content: space-between;
  gap: 12pt;
  padding-top: 3pt;
  border-top: 0.5pt solid #7f8b89;
  color: #5f6b69;
  font-size: 7.5pt;
  line-height: 1.33;
}

[data-doc="avail"] .avail-foot a {
  color: #5f6b69;
}

[data-doc="avail"] [data-pages]::before {
  content: "Page " counter(page) " of " counter(pages);
}

/* The letter's copy of page 1 (Oct 29): it travels alone, so no "of 3". */
[data-doc="avail"] [data-pages="one"]::before {
  content: "Page " counter(page);
}

[data-doc="avail"] .avail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16pt;
  margin-bottom: 9pt;
  padding-bottom: 12pt;
  border-bottom: 0.5pt solid #7f8b89;
}

[data-doc="avail"] [data-identity] {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 10pt;
}

[data-doc="avail"] [data-identity] img {
  max-height: 0.5in;
  max-width: 1.75in;
  margin: 0;
}

[data-doc="avail"] [data-eyebrow],
[data-doc="avail"] [data-dates] {
  color: #5f6b69;
  font-size: 8pt;
  line-height: 1.4;
}

[data-doc="avail"] [data-eyebrow] {
  font-weight: 500;
}

[data-doc="avail"] h1 {
  margin: 1pt 0 2pt;
  font-size: 16pt;
  line-height: 1.2;
}

[data-doc="avail"] [data-contact] {
  color: #5f6b69;
  font-size: 8.75pt;
}

/* The QR code (default 9): about 0.9in, a link to the live list, its words, then the link
   itself for anyone without a camera. */
[data-doc="avail"] [data-qr] {
  flex: none;
  width: 1.1in;
  color: #5f6b69;
  font-size: 7pt;
  line-height: 1.3;
  text-align: center;
}

[data-doc="avail"] [data-qr] a:not([data-url]) {
  display: block;
  padding-top: calc(0.9in + 3pt);
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 0.9in 0.9in;
  color: #5f6b69;
}

[data-doc="avail"] [data-qr] > span {
  display: block;
}

[data-doc="avail"] [data-qr] [data-url] {
  display: block;
  margin-top: 1pt;
  color: #5f6b69;
  font-size: 6pt;
  overflow-wrap: anywhere;
}

[data-doc="avail"] [data-howto] {
  margin-bottom: 4pt;
  font-size: 8.75pt;
}

[data-doc="avail"] section[data-section] {
  margin-top: 0;
}

[data-doc="avail"] section[data-section] h2 {
  margin: 12pt 0 4pt;
  font-size: 11.25pt;
  line-height: 1.33;
}

[data-doc="avail"] .ledger {
  font-size: 10pt;
}

[data-doc="avail"] .ledger th,
[data-doc="avail"] .ledger td {
  padding: 1pt 6pt;
  vertical-align: top;
}

[data-doc="avail"] .ledger :is(th, td):first-child {
  padding-left: 0;
}

[data-doc="avail"] .ledger :is(th, td):last-child {
  padding-right: 0;
}

[data-doc="avail"] .ledger thead :is(th, td) {
  padding-bottom: 3pt;
  color: #5f6b69;
  font-size: 7.5pt;
  line-height: 1.25;
  vertical-align: bottom;
}

[data-doc="avail"] .ledger [data-col="size"] {
  width: 0.67in;
}

[data-doc="avail"] .ledger [data-col="price"] {
  width: 0.83in;
}

[data-doc="avail"] .ledger [data-col="qty"] {
  width: 0.83in;
}

[data-doc="avail"] .ledger[data-counts="off"] [data-col="qty"] {
  width: 1.75in;
}

[data-doc="avail"] .ledger [data-col="ready"] {
  width: 0.96in;
}

[data-doc="avail"] .ledger [data-col="order"] {
  width: 0.75in;
}

/* A hairline over each plant, none between its sizes; a plant's first size 5pt under it, its
   last 5pt over the next. */
[data-doc="avail"] .ledger tbody tr > td {
  border-top: 0;
}

[data-doc="avail"] .ledger tbody tr[data-lead] > * {
  padding-top: 4pt;
  border-top: 0.5pt solid #7f8b89;
}

[data-doc="avail"] .ledger tbody tr[data-top] > * {
  border-top: 0;
}

[data-doc="avail"] .ledger tbody tr[data-end] > * {
  padding-bottom: 4pt;
}

/* Nov 12 (the avail's sixth amendment): a plant's name spans its sizes, so a later size's row
   starts with its size, a header: the size column's padding, and no line between sizes. */
[data-doc="avail"] .ledger tbody tr:not([data-lead]) > [data-col="size"] {
  padding-left: 6pt;
  border-top: 0;
}

/* The common name after the botanical's own space (no margin: a wrapped one would indent). */
[data-doc="avail"] .ledger [data-name] small {
  display: inline-block; /* moves down whole rather than "Purple / Coneflower" (Nov 9, D23) */
  margin-left: 0;
  font-size: 8.75pt;
}

[data-doc="avail"] .ledger th > [data-note] {
  font-size: 7.5pt;
}

[data-doc="avail"] .ledger tr[data-state="low"] td[data-col="qty"] [data-cell] {
  font-weight: 600;
}

[data-doc="avail"] .ledger tr[data-state="sold_out"] td[data-col="qty"] [data-cell],
[data-doc="avail"] .ledger [data-dash] {
  color: #5f6b69;
}

/* The write-in: a 0.67in line, its foot muted, on every row that isn't sold out. */
[data-doc="avail"] .ledger [data-write] {
  width: 0.67in;
  height: 11pt;
  margin: 0;
  border-bottom: 0.75pt solid #5f6b69;
}

/* Ordering info, the last page (M8): the list's note first, the grower's paragraphs and line
   breaks kept, together on one page. */
[data-doc="avail"] [data-ordering] {
  break-before: page;
  break-inside: avoid;
  font-size: 8.75pt;
}

[data-doc="avail"] [data-ordering] h2 {
  margin-bottom: 6pt;
  font-size: 11.25pt;
  string-set: category ""; /* its page names no category in the top margin */
}

[data-doc="avail"] [data-ordering] p + p {
  margin-top: 6pt;
}
