/* Flower meanings: the hub (/plants/), the birth-flower chart (/plants/birth-flowers/) and the
   twelve month pages under it. Generated by tools/website/plants/build.mjs; builds on the page kit
   in site.css. */

/* ---------- shared ---------- */
.page-head h1 { text-wrap: balance; }
.byline { margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.byline span + span::before { content: '\00B7'; margin: 0 8px; }
.notice strong { font-weight: 600; }

/* a rubber stamp in plain ink, for labels that have nothing to do with rarity */
.s-ink { --c: var(--ink); }

/* ---------- article with a contents card ---------- */
.bf-layout > .bf-toc { grid-column: 2; grid-row: 1; }
.bf-layout > article { grid-column: 1; grid-row: 1; }
.bf-toc { padding: 22px 24px 24px; }
.bf-toc h2 { font-size: 22px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.bf-toc ol { margin-top: 10px; counter-reset: toc; }
.bf-toc li { counter-increment: toc; display: grid; grid-template-columns: 26px 1fr; font-size: 15px; line-height: 1.35; padding: 4px 0; }
.bf-toc li::before { content: counter(toc); font-family: var(--display); font-style: italic; font-variation-settings: 'opsz' 14, 'SOFT' 100; color: var(--forest); }
.bf-toc a { color: var(--ink); text-decoration: none; }
.bf-toc a:hover { text-decoration: underline; text-decoration-color: var(--leaf); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bf-glance { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
.bf-glance dt { font-family: var(--display); font-weight: 600; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 18px; line-height: 1.2; }
.bf-glance dd { font-size: 15px; color: var(--ink-2); line-height: 1.4; }

.bf-article { max-width: 46rem; }
.bf-sec { scroll-margin-top: 24px; }
.bf-article > .bf-sec:first-child > h2 { margin-top: 0; }
.prose .bf-sec > * + * { margin-top: 1.1em; }
.prose .bf-sec > h2 { margin-top: 1.9em; }
.prose a { color: var(--ink); }

/* ---------- the flower photo, mounted like a pressed specimen ---------- */
.bf-fig { margin: 22px 0 8px; }
.bf-mount { background: var(--paper-hi); padding: 10px; border: 1px solid #E4DACA; box-shadow: 0 18px 34px -16px rgba(70, 52, 20, 0.35); transform: rotate(-0.8deg); }
.bf-sec:nth-of-type(odd) .bf-mount { transform: rotate(0.7deg); }
.bf-mount img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sand-lo); }
.bf-fig figcaption { margin-top: 16px; }
.bf-credit { display: block; margin-top: 2px; font-family: var(--ui); font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.bf-credit a { color: var(--ink-2); text-decoration-color: var(--rule); text-underline-offset: 2px; }

/* ---------- tables: colors, the birth-flower chart, the A-Z ---------- */
.bf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose .bf-table { margin-top: 0; font-size: 15.5px; background: var(--paper-hi); border: 1px solid var(--rule); }
.prose .bf-table thead th { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); background: var(--sand-lo); }
.prose .bf-table tbody th { font-weight: 600; white-space: nowrap; }
.prose .bf-table td, .prose .bf-table th { padding: 11px 14px; }
.bf-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 9px; vertical-align: -1px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(26, 26, 46, 0.25); }
.bf-table-note { font-size: 14px; color: var(--ink-2); }
.prose .bf-chart tbody th a, .prose .bf-meanings td a { font-weight: 600; text-decoration-color: var(--leaf); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose .bf-chart tbody th { font-family: var(--display); font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 18px; font-weight: 560; }
.prose .bf-chart td:nth-child(2) { font-weight: 500; white-space: nowrap; }
.prose .bf-chart td:last-child { color: var(--ink-2); }
.prose .bf-meanings td:nth-child(2) { color: var(--ink-2); }

/* ---------- facts: herbarium labels ---------- */
.bf-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.bf-label { position: relative; background: var(--paper-hi); border: 1px solid #E4DACA; padding: 18px 20px 16px; box-shadow: 0 10px 22px -18px rgba(70, 52, 20, 0.5); }
.bf-label::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--rule); pointer-events: none; }
.bf-label-name { font-family: var(--display); font-weight: 600; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 21px; line-height: 1.2; }
.bf-label-sci { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.bf-label-sci i { font-family: var(--display); font-variation-settings: 'opsz' 14, 'SOFT' 100; color: var(--ink); }
.bf-label dl { margin-top: 12px; border-top: 1px solid var(--rule); }
.bf-label dl > div { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.bf-label dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.bf-label dt { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--forest); }
.bf-label dd { margin-top: 2px; font-size: 15px; line-height: 1.5; }
.bf-source-note { font-size: 14px; color: var(--ink-2); }

/* ---------- pull quote from the old books ---------- */
.bf-quote { margin: 26px 0 22px; }
.bf-quote p { font-family: var(--display); font-style: italic; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 22px; line-height: 1.35; }
.bf-quote footer { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ---------- sources ---------- */
.prose .bf-sources { margin-top: 3.2em; padding-top: 18px; border-top: 1.5px solid var(--ink); scroll-margin-top: 24px; }
.prose .bf-sources h2 { margin-top: 0; font-family: var(--ui); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.prose .bf-sources ul { margin-top: 10px; padding-left: 0; display: grid; gap: 6px; }
.prose .bf-sources li { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); padding-left: 0; }
.prose .bf-sources li::before { content: none; }
.prose .bf-sources li + li { margin-top: 0; }
.prose .bf-sources a { color: var(--ink-2); text-decoration-color: var(--rule); text-decoration-thickness: 1px; }

/* ---------- the end of a page: pager, notice, App Store band ---------- */
.bf-end { margin-top: 72px; }
.bf-end .notice { max-width: 52rem; margin-top: 40px; }
.bf-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 16px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 18px 0; }
.bf-pager a { color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.35; }
.bf-pager span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--forest); margin-bottom: 3px; }
.bf-prev span::before { content: '\2190  '; }
.bf-next { text-align: right; }
.bf-next span::after { content: '  \2192'; }
.bf-all { align-self: center; font-weight: 600; text-decoration: underline !important; text-decoration-color: var(--leaf) !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; }
.bf-pager a:hover { text-decoration: underline; text-decoration-color: var(--leaf); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- hubs: the month cards ---------- */
.prose .bf-months { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 20px; }
.prose .bf-months li { margin: 0; }
.prose .bf-months li::before { content: none; }
.bf-month { display: block; background: var(--paper-hi); border: 1px solid #E4DACA; padding: 8px 8px 0; text-decoration: none; color: var(--ink); box-shadow: 0 12px 24px -18px rgba(70, 52, 20, 0.45); transition: transform .15s ease, box-shadow .15s ease; }
.bf-month:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 18px 30px -18px rgba(70, 52, 20, 0.5); }
.bf-month-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-lo); }
.bf-month-photo img { width: 100%; height: 100%; object-fit: cover; }
.bf-month-body { display: grid; gap: 8px; padding: 12px 4px 14px; }
.bf-month .stamp { font-size: 11px; }
.bf-month-names { font-family: var(--display); font-weight: 560; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 18px; line-height: 1.2; }

/* ---------- /plants/: a strip of specimens under the header ---------- */
.bf-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; margin-bottom: 56px; }
.bf-strip li { background: var(--paper-hi); border: 1px solid #E4DACA; padding: 6px 6px 0; box-shadow: 0 10px 20px -16px rgba(70, 52, 20, 0.5); }
.bf-strip li:nth-child(odd) { transform: rotate(-1.2deg); }
.bf-strip li:nth-child(even) { transform: rotate(1deg) translateY(6px); }
.bf-strip img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--sand-lo); }
.bf-strip span { display: block; padding: 7px 2px 8px; font-family: var(--display); font-weight: 560; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 14px; line-height: 1.2; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .bf-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bf-strip li:nth-child(n+7) { display: none; }
}
@media (max-width: 980px) {
  .bf-layout { grid-template-columns: minmax(0, 1fr); }   /* 1fr would let a wide table stretch the page */
  .bf-layout > .bf-toc, .bf-layout > article { grid-column: 1; grid-row: auto; }
  .bf-toc ol { columns: 2; column-gap: 24px; }
  .bf-toc li { break-inside: avoid; }
  .bf-glance { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .prose .bf-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bf-toc ol { columns: 1; }
  .bf-glance { grid-template-columns: 1fr; }
  .bf-mount { padding: 7px; }
  .prose .bf-table { font-size: 14.5px; }
  .prose .bf-table td, .prose .bf-table th { padding: 9px 10px; }
  .prose .bf-meanings td, .prose .bf-meanings th { padding: 9px 7px; }
  .prose .bf-chart th:nth-child(2), .prose .bf-chart td:nth-child(2) { display: none; }   /* the meaning column names the flowers */
  .prose .bf-chart tbody th { font-size: 16px; }
  .prose .bf-months { gap: 18px 12px; }
  .bf-month { padding: 6px 6px 0; }
  .bf-month-names { font-size: 15px; }
  .bf-month .stamp { font-size: 9.5px; letter-spacing: 0.1em; padding: 5px 5px 4px 6px; }
  .bf-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 40px; }
  .bf-strip li:nth-child(n+4) { display: none; }
  .bf-pager { grid-template-columns: 1fr 1fr; }
  .bf-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .bf-pager a { font-size: 15px; }
}
