/* Article layout for the generated pages (tools/build-pages.mjs). Uses the colours of style.css. */
.top .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.langsw a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; border-radius: 99px; font-size: .85rem; font-weight: 650; color: var(--muted); text-decoration: none; }
.langsw a.on { background: var(--ink); color: var(--bg); }
.langsw { display: inline-flex; gap: 2px; }
main.page { max-width: 760px; gap: 22px; }
main.page article { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.page article > section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.page h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
.page h2 { font-size: 1.35rem; margin-top: 4px; }
.page h3 { font-size: 1.05rem; }
.page h4 { font-size: .95rem; font-family: var(--body); font-weight: 650; margin: 0 0 4px; }
.page p, .page li { overflow-wrap: anywhere; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.page .meta { color: var(--muted); font-size: .85rem; margin-top: -10px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-s); padding: 16px 18px; box-shadow: var(--shadow); }
.answer .lead { font-size: 1.12rem; line-height: 1.5; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { font-size: .78rem; font-weight: 650; color: var(--muted); background: var(--sunk); white-space: normal; position: sticky; top: 0; }
tbody th { font-weight: 600; min-width: 130px; position: sticky; left: 0; background: var(--surface); }
.mx td { text-align: center; font-variant-numeric: tabular-nums; font-weight: 650; min-width: 44px; }
.mx td.u, .mx td.na { color: var(--muted); font-weight: 400; }
.mx td.r1 { background: var(--accent-soft); }
.mx td.r2 { background: var(--sunk); }
.mx td.r3 { background: var(--moss-soft); }
.mx td.r4 { background: color-mix(in srgb, var(--moss) 38%, var(--surface)); }
.mx td.r5 { background: color-mix(in srgb, var(--moss) 55%, var(--surface)); }
.mx.cmp td, .mx.cmp th:last-child { text-align: center; }
.page ul.plain, .page .rel ul, .page .srcs ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.page ul.big { gap: 12px; }
.page ul.farms { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.farm { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; }
.rung { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rung .more { color: var(--muted); font-size: .95rem; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
dl.rl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
dl.rl dt { font-weight: 650; margin-top: 10px; }
dl.rl dd { margin: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.scale summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 32px; }
.scale ol { margin: 8px 0 0; padding-left: 1.3em; }
.vgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.vcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.vcard img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-s); background: var(--sunk); }
.vcard .vt { font-weight: 600; line-height: 1.3; }
.vcard .vm { font-size: .8rem; color: var(--muted); }
.srcs ul { font-size: .9rem; }
.cta { background: var(--moss-soft); border-radius: var(--r); padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.cta h2 { font-size: 1.3rem; }
.pfoot { max-width: 760px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pfoot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; }
.mx td.wide { text-align: left; font-weight: 400; min-width: 180px; }
.mx td.wide b { margin-right: 4px; }
.plhero { display: flex; align-items: center; gap: 14px; }
.plhero h1 { margin: 0; }
.page .sprout { flex: none; width: 56px; height: 56px; color: var(--moss); }
.page h3 { margin-top: 6px; }


/* plant pages: drawn type cards, comparison strip, chains, notes */
.tcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tcards { grid-template-columns: 1fr 1fr; } }
.tcard { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tcard .ticon { flex: none; width: 68px; height: 68px; color: var(--moss); margin-top: 2px; }
.tbody { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tbody h3 { margin: 0 0 1px; font-size: 1.12rem; }
.tbody p { margin: 0; font-size: .92rem; line-height: 1.45; }
.trow .tl { display: block; font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tprot { margin-top: 3px !important; }
.pill { display: inline-block; background: var(--moss-soft); color: var(--moss-deep); border-radius: 99px; padding: 3px 11px; font-size: .8rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.cmp { margin-top: 6px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cmphead { display: flex; align-items: center; gap: 14px; }
.cmphead p { margin: 0; }
.cmp .canim { flex: none; width: 64px; height: 64px; color: var(--accent); }
.cmp .cname { font-size: .95rem; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(84px, 36%) 1fr 5.6em; align-items: center; gap: 7px 10px; font-size: .8rem; }
.bars li { display: contents; }
.bn { color: var(--muted); overflow-wrap: break-word; hyphens: auto; line-height: 1.25; }
.bt { display: flex; height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bt i { display: block; height: 100%; background: var(--moss); }
.bt i.ext { background: var(--moss); opacity: .35; }
.bars .ba .bt i { background: var(--accent); }
.bv { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; white-space: nowrap; }
.chains { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .chains { grid-template-columns: 1fr 1fr; } }
.chain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; min-width: 0; }
.chain h3 { margin: 0 0 6px; font-size: 1.02rem; }
.chain ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chain li { padding: 7px 0; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.chain li:first-child { border-top: 0; }
.notes, .stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li, .stats li { position: relative; padding: 10px 14px 10px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); line-height: 1.45; }
.notes li::before, .stats li::before { content: ""; position: absolute; left: 14px; top: 17px; width: 9px; height: 9px; border-radius: 99px; background: var(--moss); }
.stats li { background: var(--moss-soft); border-color: transparent; font-variant-numeric: tabular-nums; }
.stats li::before { background: var(--moss-deep); }
.tprot { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tnote { line-height: 1.35; }
@media (min-width: 640px) { .tcards > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* narrow phones: the header must fit 320 px (the page header uses an img logo and links, style.css only shrinks svg and buttons) */
@media (max-width: 370px) {
  .brand img { width: 30px; height: 30px; flex: none; }
  .langsw a { min-width: 38px; }
}
