/* style_v2.css: the new Decent website design (approved Nov 2026). Loaded after the old css/style.css
   by decent_v2_head (lib/pages.tcl) on every page while the new design is on. Sections: Ben's design
   tokens, our token values, then the styles. Edit this file directly. */

/* ==== Ben's tokens (was designs/inprogress/chrome-tokens.css) ==== */
/* our token set: one file, for the page (:root, imported at the top of design/style.css) and for the header and
   footer in their shadow roots (:host). R179: on :host, :root (was :host only, so the page had none of them). */
:host, :root {
  /* Colour (14) */
  --page: #fff;               /* page, header, menus, the paper band (R143: white; was #f5f4f1) */
  --alt: #f4f2ef;             /* secondary background: bands, hover fills (R143: was #eae8e3) */
  --dark: #262522;            /* footer; the cover shade is this colour, see --photo-shade */
  --surface: #fff;            /* cards, fields, text on accent and on photos */
  --text: #1e1e1c;            /* text; shadows are this colour, see-through */
  --muted: #5d5d58;           /* paragraphs, secondary text */
  --line: #e2dfda;            /* hairlines (R48: field and tab borders use --muted, 3:1 and more; R143: was #d9d6cf) */
  --accent: #a8442a;          /* primary buttons, links' arrows, numbers, ticks, current page, focus ring, the Sale tag dot */
  --accent-deep: #8a3620;     /* primary button hover */
  --on-dark: #f3f2ef;         /* text on dark bands, the footer and photos */
  --on-dark-muted: #d5d4cf;   /* secondary text on dark and on photos */
  --accent-on-dark: #f3c2ae;  /* accent on dark and on photos */
  --new: #4f7a3e;             /* the New tag dot (lighter on photos, darker as text) */
  --assist: #3e5c76;          /* R98: Derek only (the Ask Derek button and panel). R143: a muted slate (was #1f5fa8); 7.0:1 on white, white on it 7.0:1 */

  /* Bands (3): what tone-sand and tone-dark look like. For the paper look on every band:
     --tone-sand-bg: var(--page); --tone-dark-bg: var(--page); --tone-dark-scheme: light. */
  --tone-sand-bg: var(--alt);
  --tone-dark-bg: var(--dark);
  --tone-dark-scheme: dark;   /* dark: the light text set; light: the paper text set */

  /* Shadow (1); the dialog, the sticky comparison row and the phone buy bar write their own
     shadows in the same colour, --text see-through */
  --shadow: 0 18px 28px rgb(from var(--text) r g b / .08);  /* menu panels, hovered machine cards, the quick-links bar */

  /* Type (17) */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;  /* R143: Inter (was Manrope), fonts.css */
  --fs-xs: 14px;              /* fine print, counters, small labels (R179: was 13 px; nothing under 14 px) */
  --fs-base: 16px;            /* body, buttons, labels */
  --fs-lg: 18px;              /* lead text, questions, menu items on tablet; 17 px on phone */
  --fs-xl: 20px;              /* h3, card names, prices in text, status lines */
  --fs-2xl: 28px;             /* product price, dialog titles, large card names */
  --fs-h1: clamp(38px, 4.9vw, 68px);
  --fs-h2: clamp(28px, 3.1vw, 44px);
  --fs-title: clamp(32px, 3.7vw, 52px);  /* R179: page and cover titles (a cover's ## title) */
  --fs-buy: clamp(38px, 4.9vw, 64px);  /* R180: the buy block's title */
  --tracking-head: -0.02em;   /* R179: heading letter spacing */
  --tracking-caps: .06em;     /* R179: letter spacing of small capitals labels (text-transform: uppercase) */
  --underline-offset: .2em;   /* R179: the gap between a text link and its underline */
  --lh: 1.55;                 /* R179: body line height */
  --lh-tight: 1.25;           /* R179: heading and label line height */
  --fw-medium: 500;           /* menu items, small labels (body text is 400) */
  --fw-semibold: 600;         /* text links, questions, dates */
  --fw-bold: 600;             /* headings, buttons, prices (R143: Inter 600; was 650 in Manrope) */

  /* Buttons and fields (4); fields are 2 px lower than --btn-h. Compact buttons are lower
     (card action and quick-links bar 8 px, newsletter and phone buy bar 2 px, tabs and slide
     controls 8 px; never under 44 px, the minimum touch target) and the card action, bars and
     newsletter 6 px narrower at each side. Their corners are --radius. */
  --btn-h: 52px;              /* 50 px on phone */
  --btn-pad-x: 24px;          /* side padding of every button; 18 px on phone */
  --btn-pad: 13px var(--btn-pad-x);  /* top and bottom, then the sides; 12 px on phone */
  --border: 1px;              /* button and field border width (R143: was 1.5px) */

  /* Shape and space (13) */
  --radius: 6px;              /* buttons, fields, focus ring, phone comparison cells */
  --radius-img: 10px;         /* photos, dialogs, machine cards (pills use 999px) */
  --pad: 84px;                /* block padding, top and bottom */
  --wrap: 1312px;             /* content width */
  --gutter: 48px;             /* space either side of the content */
  --gap-lg: 72px;             /* between the two columns of split and faq */
  --header: 80px;
  --panel: 1080px;            /* text width of the Machines and Accessories panels */
  --cover-h: clamp(540px, 74vh, 720px);  /* R179: cover height; 510 px on phone */
  --media: 620px;             /* photos beside text (split): the full photo column at 1440; 100% where the split stacks */
  --media-sm: 360px;          /* R179: a product photo in the buy block; split with the word small */
  --col: 240px;               /* R179: a minimum card or column width */
  --icon: 18px;               /* R179: icons, ticks, arrows */

  /* Reading (2), added for the blog and docs: the line length of running text, and the width
     of a thumbnail in a feed row */
  --measure: 68ch;            /* article text column (about 70 characters a line) */
  --thumb: 176px;             /* feed row thumbnail (.55 of it on phone, about 97 px) */

  /* Photo (1): how dark the shade over every cover photo is (0 none, 1 solid --dark). At .82
     text on the photos reads at 4.5:1 or more; lower it only after checking the contrast. */
  --photo-shade: .82;

  /* Units (3), added with the head, article and feed blocks: their spaces are steps of --space,
     their hairlines --rule wide, and every link or button in them at least --tap high */
  --space: 8px;               /* one step of space inside the text blocks */
  --rule: 1px;                /* hairlines between rows */
  --tap: 44px;                /* the minimum touch target */
}
@media (max-width: 1100px) { :host, :root { --gutter: 32px; } }
@media (min-width: 761px) and (max-width: 1100px) { :host, :root { --pad: 64px; --header: 72px; } }
@media (max-width: 860px) { :host, :root { --media: 100%; } }
@media (max-width: 760px) { :host, :root { --header: 64px; --pad: 48px; --gutter: 20px; --cover-h: 510px; } }
@media (max-width: 640px) { :host, :root { --btn-h: 50px; --btn-pad-x: 18px; --btn-pad: 12px var(--btn-pad-x); --fs-lg: 17px; } }
:host, :root {
  --btn-line: color-mix(in srgb, var(--muted) 66%, var(--surface));  /* a white button's 1 px edge: #949491, 3.04:1 on white, 2.7:1 on the sand (a control's edge needs 3:1; Ben's style audit, 18 Nov: was 75%) */
  --btn-shadow: 0 1px 2px rgb(from var(--text) r g b / .10), 0 2px 6px rgb(from var(--text) r g b / .06);  /* the light shadow under every button */
  --assist-tint: color-mix(in srgb, var(--assist) 9%, var(--surface));  /* the Ask Derek button's soft tint, #eef0f3: the slate on it 6.1:1 */
  --error: #c4162a;           /* form errors, a clear red (not the rust, which is the accent): 6.0:1 on white, 5.4:1 on the sand */
}
:host { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 1px + 24px); -webkit-text-size-adjust: 100%; }

/* ==== our token values (was designs/inprogress/tokens.css) ==== */
/* Our values for Ben's tokens (chrome-tokens.css, loaded just before this file; style.css after).
   Written by the CSS Editor (/admin/css_editor): only the tokens we set differently from Ben.
   Each block uses the same media query as Ben's file, so the same widths apply. */
:root {
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --pad: 64px;
  --fw-bold: 650;               /* headings, bold text, prices, titles (Ben's style audit, 18 Nov) */
  --radius-video: 999px;        /* corners of the YouTube and bilibili link buttons */
  --hover-bg: var(--alt);       /* every control under the mouse */
  --selected-bg: color-mix(in srgb, var(--alt), var(--text) 5%);  /* every control when chosen */
}
@media (max-width: 760px) {
  :root {
    --pad: 40px;
  }
}

/* ==== styles (was designs/inprogress/style.css) ==== */

/* In progress: the styles for the reworked pages, loaded only by the In progress
   design, so the rest of the site is untouched. Two parts: the +++ colour bands and
   ```hero blocks that the converter (lib/markdown.tcl) writes, then Ben's mockup look
   (Manrope, warm browns, rust accent, his buttons) at the end. They move to
   /css/markdown.css when the live homepage switches over. The navbar is not styled
   here: Ben's navbar comes from the toolbar's MAKE LIVE. */

/* +++ colour bands (lib/markdown.tcl): each +++ line starts a <section class="band">.
   The bands alternate on their own, as in Ben's pages: the 1st, 3rd ... are
   (white), the 2nd, 4th ... light grey (#f4f2ef), as Ben's pages; so an author only says where the colour
   changes, never which colour. The colour runs edge to edge (a border-image, outset sideways only: unlike the old box-shadow + clip-path, it clips nothing, so an open drop-down can hang over the next band)
   without widening the page. */
.markdown section.band { padding: 2.2em 0 1.6em; --band: var(--alt); background: var(--band); border-image: linear-gradient(var(--band) 0 0) fill 0 / / 0 100vmax; }
.markdown section.band:nth-child(even of section.band) { --band: var(--page); }   /* (count bands only: nth-of-type also counted a page's other <section>s, so the cart's one band came out white) */
/* a line across the top of a band (where two white bands meet): set --band-line. Drawn on top, as
   the band's border-image would paint over a border-top */
.markdown section.band { position: relative; }
.markdown section.band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--band-line, transparent); pointer-events: none; }

/* ```hero: the block's first image fills the width of the window, and the heading,
   text and buttons after it sit on the photo, bottom left, over a dark fade. */
html:has(.markdown .hero), body:has(.markdown .hero) { overflow-x: clip; }
.markdown .hero {
	position: relative; isolation: isolate; overflow: hidden;
	margin: 0 calc(50% - 50vw);
	min-height: min(78vh, 760px);
	display: flex; flex-direction: column; justify-content: flex-end;
	padding: 48px max(24px, calc(50vw - 480px));
	color: var(--surface);
}
.markdown .hero > p:first-child { position: absolute; inset: 0; margin: 0; padding: 0; max-width: none; z-index: -2; pointer-events: none; }
.markdown .hero > p:first-child a { display: block; width: 100%; height: 100%; }
.markdown .hero > p:first-child img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; max-width: none; margin: 0; }
.markdown .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(from var(--dark) r g b / .62), rgb(from var(--dark) r g b / .15) 55%, rgb(from var(--dark) r g b / 0)); }
.markdown .hero h1, .markdown .hero h2 { color: var(--surface); border: 0; padding: 0; margin: 0 0 .35em; font-size: var(--fs-h1); line-height: 1.05; letter-spacing: var(--tracking-head); text-shadow: 0 2px 18px rgb(from var(--dark) r g b / .35); }
.markdown .hero h2 { font-size: var(--fs-h2); }
.markdown .hero > p:not(:first-child) { color: var(--surface); margin: 0 0 .8em; max-width: 46em; }
.markdown .hero a:not(.button) { color: var(--surface); }
@media (max-width: 736px) {
	.markdown .hero { min-height: 62vh; padding-block: 32px; }
}

/* ---- Ben's mockup look (decent-website-mockup-R07.01 styles.css) ---- */

/* Manrope, self-hosted in /fonts: one variable file per alphabet, weights 200-800. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* the page background: Ben's white */
html, body { background: var(--page); }

/* text: Manrope 16px, dark brown, paragraphs in warm grey */
.markdown, #footer { font-family: var(--font); -webkit-font-smoothing: antialiased; }
.markdown { font-size: var(--fs-base); line-height: 1.6; font-weight: 400; color: var(--text); }
.markdown p, .markdown li { color: var(--muted); }
.markdown strong, .markdown b { color: var(--text); font-weight: var(--fw-bold); }
#footer { color: var(--muted); }

/* headings: weight 650, tight, no grey line under them */
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { font-family: var(--font); color: var(--text); font-weight: var(--fw-bold); letter-spacing: -0.022em; text-wrap: balance; border: 0; padding-bottom: 0; }
.markdown h1 { font-size: var(--fs-h1); line-height: 1.04; }
.markdown h2 { font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 .6em; }
.markdown h3 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -0.01em; }
.markdown h4 { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.01em; }
.markdown h1 a, .markdown h2 a, .markdown h3 a, .markdown h4 a { color: inherit; text-decoration: none; }
.markdown h1 a:hover, .markdown h2 a:hover, .markdown h3 a:hover { color: var(--accent); }

/* links: rust, not blue */
.markdown a { color: var(--accent); }
.markdown a:hover { color: var(--accent-deep); }
/* links in running text (Ben r182): ink-coloured, normal weight, rust underline;
   our content often bolds a link (**[text](url)**), which is not shown as bold */
.markdown :is(p, li, blockquote):not(.bd-ui li) a:not(.button):not(.markdownbox):not(.imghref):not(.youtube):not(.bilibili) { color: var(--text); font-weight: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.markdown :is(p, li, blockquote):not(.bd-ui li) a:not(.button):not(.markdownbox):not(.imghref):not(.youtube):not(.bilibili):hover { color: var(--accent) !important; }
.markdown :is(p, li, blockquote) strong:has(> a:only-child) { font-weight: inherit; }
/* a video button (text like the body text, black on mouse-over), [Pitcher rinser explained (6 min)](youtube|https://youtu.be/ID)
   or (bilibili|https://www.bilibili.com/video/BV...):
   a pill with a play circle (pure red at 50% opacity), the label, and a
   lighter length */
.markdown :is(a.youtube, a.bilibili) { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: var(--border) solid var(--btn-line); border-radius: var(--radius-video); background: var(--surface); color: var(--muted); font: 400 var(--fs-base)/24px var(--font); text-decoration: none; transition: border-color .15s, color .15s; }
/* the label and the length ("Video 8 min") never wrap: the button grows to fit them (Firefox and
   iPhone Safari wrapped "8 min" inside the button).
   Laid out as inline text, not flex: Firefox sized the flex button too narrow, so "8 min" ran past its edge */
.markdown :is(a.youtube, a.bilibili) { display: inline-block; white-space: nowrap; }
.markdown :is(a.youtube, a.bilibili) .len { margin-left: 6px; } /* plus the space after "Video": the old 10px */
.markdown :is(a.youtube, a.bilibili)::before { content: ""; display: inline-block; vertical-align: middle; width: 30px; margin: -3px 10px -3px 0; flex: 0 0 30px; height: 30px; border-radius: 50%; background: rgba(255, 0, 0, 0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z' fill='%23fff'/%3E%3C/svg%3E") calc(50% + 1px) 50% / 14px no-repeat; }
.markdown :is(a.youtube, a.bilibili):hover { border-color: var(--text); color: var(--text) !important; } /* !important: the site's a:hover is !important */
.markdown :is(a.youtube, a.bilibili) .len { color: var(--muted); opacity: .75; }
/* always a paragraph's space above a video button, also straight after a heading */
.markdown p:has(> :is(a.youtube, a.bilibili)) { margin-top: 16px; }
/* the Bilibili button: same pill, Bilibili blue (#00a1d6) at 50% like the YouTube red */
.markdown a.bilibili::before { background-color: rgba(0, 161, 214, 0.5); }
/* on mouse-over the play circle goes to full colour */
.markdown a.youtube:hover::before { background-color: rgb(255, 0, 0); }
.markdown a.bilibili:hover::before { background-color: rgb(0, 161, 214); }
.markdown :is(a.youtube, a.bilibili)::before { transition: background-color .15s; }

/* images: 10px corners all round */
.markdown section.band img { border-radius: var(--radius-img); }

/* ```cards: Ben's product grid. No grey box or border: a 4:3 photo with 10px corners,
   then the name in dark brown, 20px semi-bold, left aligned, no underline. */
.markdown .columns.cards > .box { background: transparent; border: 0; border-radius: 0; padding: 0 0 8px; text-align: left; overflow: visible; color: var(--text); text-decoration: none; }
.markdown .columns.cards > .box p { padding: 0; color: var(--muted); }
/* the site's product photo shape (1486 x 960, as the photo uploader requires), so a product photo shows whole; others are cropped to it */
.markdown .columns.cards > .box img.imghref { width: 100%; aspect-ratio: 1486 / 960; object-fit: cover; border-radius: var(--radius-img); background: var(--alt); }
/* a video ([ytrow] in a card): its thumbnail in the same shape and place as a card's photo, without
   the card-link margin markdown.css gives every link in a card or the video row's own margin */
.markdown .columns.cards > .box > .columns:has(> .ytbox) { margin: 0; }
.markdown .columns.cards > .box > p:has(+ .columns > .ytbox), .markdown .columns.cards > .box > .columns:has(> .ytbox) + p:empty { display: none; } /* the empty paragraphs the converter leaves around a [ytrow] */
.markdown .columns.cards > .box .ytbox a.ytimghref { display: block; margin: 0; }
.markdown .columns.cards > .box .ytbox img.ytimghref { width: 100%; aspect-ratio: 1486 / 960; object-fit: cover; border-radius: var(--radius-img); }
/* a card's title: a plain link alone in its paragraph (not its buttons or heading links) */
.markdown .columns.cards > .box > p > a:only-child:not([class]) { display: block; margin: 16px 0 4px; font-size: var(--fs-xl); line-height: 1.3; font-weight: var(--fw-bold); letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.markdown .columns.cards > .box > p > a:only-child:not([class]):hover { color: var(--accent); }

/* buttons (the site's style.css forces button colours with !important, hence the
   !important here): the look of a.markdownbox, so the two kinds of button look alike: normal
   case, 16px semi-bold (600), --tap tall (44px), 20px sides, 6px corners, a light grey hairline
   outline (the one markdown.css gives .markdownbox). In the bands they are this light outline; in the hero the first is his rust "primary"
   button and the rest are white outlines (his secondary on a dark cover). */
.markdown a.button {
	display: inline-flex; align-items: center; justify-content: center;
	height: auto; min-height: var(--tap); padding: 10px 20px; margin: 0 6px 10px 0;
	border-radius: var(--radius); border: var(--border) solid var(--btn-line) !important; box-shadow: none;
	background: var(--surface); color: var(--text) !important;  /* Ben's secondary button: white, so the --hover-bg fill shows on a sand band too */
	font-family: var(--font); font-size: var(--fs-base) !important; font-weight: var(--fw-semibold); line-height: var(--lh-tight);
	letter-spacing: 0; text-transform: capitalize; text-decoration: none; white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}
.markdown a.button:hover { background: var(--hover-bg); color: var(--text) !important; }
.markdown a.button.small { min-height: var(--tap); padding: 10px 18px; font-size: var(--fs-base) !important; }
/* the site's markdown.css underlines every link in a card grid; its buttons and heading links are not underlined */
.markdown .columns.cards > .box :is(a.markdownbox, a.button, a:has(> :is(h2, h3, h4))) { text-decoration: none; }
/* a button in a card stays inside the card: its words wrap rather than run into the next card */
.markdown .columns.cards > .box :is(a.markdownbox, a.button) { max-width: 100%; white-space: normal; text-align: center; }
.markdown .hero a.button { border-color: var(--surface) !important; color: var(--surface) !important; }
.markdown .hero a.button:hover { background: var(--surface); color: var(--text) !important; }
.markdown .hero a.button:first-of-type { background: var(--accent); border-color: var(--accent) !important; color: var(--surface) !important; }
.markdown .hero a.button:first-of-type:hover { background: var(--accent-deep); border-color: var(--accent-deep) !important; }
/* a hero with a row of 3 or more buttons (coffee_accessories: For coffee, For milk...) is navigation, not a
   call to action: each button is sized to its words and they all look the same (John, 26 Nov) */
.markdown .hero > p:has(> a.button:nth-of-type(3)) a.button { min-width: 0; }
.markdown .hero > p:has(> a.button:nth-of-type(3)) a.button:first-of-type { background: transparent; border-color: var(--surface) !important; }
.markdown .hero > p:has(> a.button:nth-of-type(3)) a.button:first-of-type:hover { background: var(--surface); color: var(--text) !important; }

/* hero = Ben's .cover, with the values his styles.css ends up with (its later
   "shared polish" rules override the first ones): 54px above and below the text,
   his text column (the page's content column, see #one > .container below), the
   lighter warm shading, heading var(--fs-h1) at most 640px wide, and the
   buttons in a row 28px under it, 12px apart, each at least 200px wide. */
/* side padding = from the window edge to the content column (a percentage padding
   is of the column's width), so the hero text lines up with the page, scrollbar or not */
.markdown .hero { min-height: var(--cover-h); padding: 54px calc(50vw - 50%); }
.markdown .hero::after { background: linear-gradient(90deg, rgb(from var(--dark) r g b / .56), rgb(from var(--dark) r g b / .24) 48%, transparent 76%), linear-gradient(0deg, rgb(from var(--dark) r g b / .24), transparent 50%); }
.markdown .hero h1 { font-size: var(--fs-h1); line-height: 1.04; font-weight: var(--fw-bold); letter-spacing: -0.022em; color: var(--surface); max-width: 640px; margin: 0; text-shadow: none; }
.markdown .hero h2 { color: var(--surface); text-shadow: none; }
/* every heading on the hero photo is white (not only # and ##), and so is bold text */
.markdown .hero :is(h3, h4, h5, h6) { color: var(--surface); }
.markdown .hero strong { color: var(--surface); }
/* a video button on the hero photo keeps its own colours (white button, grey text), not the hero's white links */
.markdown .hero :is(a.youtube, a.bilibili) { color: var(--muted); }
.markdown .hero > p:not(:first-child) { color: var(--on-dark); font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh); max-width: 550px; margin: 20px 0 0; }
.markdown .hero > p:last-child:has(> a.button) { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; max-width: none; }
.markdown .hero a.button { min-width: 200px; margin: 0; }
.markdown .hero a.button:not(:first-of-type) { background: rgb(from var(--dark) r g b / .35); }
.markdown .hero a.button:not(:first-of-type):hover { background: var(--surface); }
/* text on a hero photo gets a soft black glow behind it so it reads on any part of the photo
   (the same treatment as the titles on the blog thumbnails in the nav menu, nav_ben.css) */
.markdown .hero :is(h3, h4, h5, h6, strong), .markdown .hero > p:not(:first-child):not(:has(> :is(a.button, a.youtube, a.bilibili))) { text-shadow: var(--dark) 0 0 10px, var(--dark) 0 0 6px, var(--dark) 0 0 3px; }
/* the hero photo is shown as it is, not darkened: the glow above keeps the text readable */
.markdown .hero::after { display: none; }
/* the big headings: the same glow scaled up to their size */
.markdown .hero :is(h1, h2) { text-shadow: var(--dark) 0 0 28px, var(--dark) 0 0 14px, var(--dark) 0 0 5px; }
/* and behind each block of hero text a soft dark oval that fades out gradually (a very wide
   text-shadow fades to almost nothing, so it cannot give a long soft edge) */
.markdown .hero :is(h1, h2), .markdown .hero > p:not(:first-child):not(:has(> :is(a.button, a.youtube, a.bilibili))) { position: relative; }
.markdown .hero :is(h1, h2)::before, .markdown .hero > p:not(:first-child):not(:has(> :is(a.button, a.youtube, a.bilibili)))::before { content: ""; position: absolute; inset: -110px -160px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgb(from var(--dark) r g b / .55) 30%, rgb(from var(--dark) r g b / .4) 55%, rgb(from var(--dark) r g b / .18) 78%, transparent); }
@media (max-width: 1100px) {
	.markdown .hero h1 { max-width: 520px; }
}
@media (max-width: 760px) {
	.markdown .hero { min-height: 470px; padding-block: 32px 28px; }
	.markdown .hero::after { background: linear-gradient(0deg, rgb(from var(--dark) r g b / .79), rgb(from var(--dark) r g b / .42) 48%, transparent 88%); }
	.markdown .hero h1 { max-width: 340px; }
	.markdown .hero > p:not(:first-child) { font-size: var(--fs-base); margin-top: 12px; }
}
@media (max-width: 640px) {
	.markdown .hero h1 { font-size: var(--fs-h1); }
	.markdown .hero > p:last-child:has(> a.button) { margin-top: 20px; gap: 10px; }
	.markdown .hero a.button { flex: 1 1 100%; min-width: 0; min-height: var(--btn-h); padding: 12px 18px; }
}

/* ---- page layout, as Ben's mockup measures (his final rules) ----
   content column: up to --wrap (1312px) with --gutter each side (48px, 32px under 1100px,
   20px under 760px); each colour band --pad above and below its content (ours: 64px,
   40px under 760px; tokens.css); 40px under a section heading; cards 24px apart, 40px
   between rows. */
#one > .container { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); max-width: none; margin-inline: auto; padding: 0; }
.markdown section.band { padding: var(--pad) 0; }
/* Ben, 13 Nov: no extra space at a band (+++) break beyond the band padding: the last item's
   margin (e.g. markdown.css's .columns margin-bottom: 40px) and each column box's own margin
   add to it. The columns' gap already spaces the boxes. */
.markdown section.band > :last-child { margin-bottom: 0; }
.markdown .columns > .box { margin-bottom: 0; }
.markdown section.band > h2 { margin: 0 0 40px; }
.markdown section.band > h2:not(:first-of-type) { margin-top: 64px; }

/* cards: even columns on a grid (2 across, or ```cards 3 / 4), Ben's gaps */
.markdown .columns.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; margin-bottom: 40px; }
.markdown .columns.cards.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.markdown .columns.cards.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.markdown .columns.cards > .box { max-width: none !important; flex: none !important; margin: 0; padding: 0; }
.markdown .columns.cards > .box > p > a:only-child:not([class]) { margin: 14px 0 0; }
.markdown .columns.cards:not(.cols3):not(.cols4) > .box > p > a:only-child:not([class]) { font-size: var(--fs-2xl); line-height: 1.3; letter-spacing: -0.01em; }
.markdown .columns.cards > .box p:not(:has(a.imghref, > img)) { margin-top: 6px; line-height: 1.6; }

/* "For milk" style group headings (### in a band) = Ben's .cards__sub: a thin line
   above, 24px, 32px to the cards under it
   (the converter wraps a ### heading in its <a name> anchor, hence "> a > h3") */
.markdown section.band > a:has(> h3) { display: block; color: inherit; }
.markdown section.band > h3, .markdown section.band > a > h3 { font-size: var(--fs-xl); line-height: 1.2; border-top: var(--rule) solid var(--line); padding-top: 16px; margin: 64px 0 32px; }
/* a row of cards after stacked heading + text sections gets the same line above it,
   so the change of format is visible */
.markdown section.band > :is(h3, a:has(> h3)) ~ :is(p, ul, ol) + .columns:not(.cards):not(:has(.ytbox, .alsoboughtbox, .buybox)) { border-top: var(--rule) solid var(--line); padding-top: 32px; margin-top: 64px; }

@media (max-width: 1100px) {
}
@media (max-width: 760px) {
	.markdown section.band > h2 { margin-bottom: 24px; }
	.markdown section.band > h3, .markdown section.band > a > h3 { margin: 48px 0 24px; font-size: var(--fs-xl); }
	.markdown .columns.cards, .markdown .columns.cards.cols3 { grid-template-columns: 1fr; gap: 32px; }
	.markdown .columns.cards.cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
	.markdown .columns.cards:not(.cols3):not(.cols4) > .box > p > a:only-child:not([class]) { font-size: var(--fs-xl); margin-top: 12px; }
}

/* ---- side-by-side blocks (adjacent ``` fences / =-=), as Ben lays them out ----
   The site draws each part as a white bordered box; Ben's pages have no boxes: text
   and photos sit on the band. Product cards ([salepage], each has a photo carousel, .dc-carousel),
   the video row (.ytbox) and "Customers also bought" (.alsoboughtbox) keep their own
   look, restyled below. */
.markdown .columns { gap: 40px 32px; }
.markdown .columns > .box { min-width: 0; } /* the site's 300px minimum wrapped three points as 2 + 1 */
.markdown .columns > .box:not(:has(.dc-carousel:not(.salecards .dc-carousel))), .markdown .columns > .box:has(.buybox) { background: transparent; border: 0; box-shadow: none; padding: 0; max-width: none; }
.markdown .columns > .box > p:first-child:has(> a > img), .markdown .columns > .box > p:first-child:has(> img) { margin: 0; }
.markdown .columns > .box img { display: block; width: 100%; height: auto; border-radius: var(--radius-img); }
/* an image with a height (Markdown "height 200", as on about_us) keeps it, so a row of portraits lines up (John, 25 Nov);
   attr() with a unit is newer: other browsers drop that line and use 200px */
.markdown .columns > .box img[height] { width: auto; max-width: 100%; height: 200px; height: attr(height px); }
/* a photo beside text (Ben's split): two equal halves, the text centred against the photo */
.markdown .columns:has(> .box:nth-child(2):last-child):has(img) { align-items: center; }
.markdown .columns:has(> .box:nth-child(2):last-child):has(img) > .box > h1:first-child,
.markdown .columns:has(> .box:nth-child(2):last-child):has(img) > .box > a:first-child > h1,
.markdown .columns:has(> .box:nth-child(2):last-child):has(img) > .box > a:first-child > h2 { margin-top: 0; }
/* four parts: two rows of two, as Ben's "Fit" */
.markdown .columns:has(> .box:nth-child(4):last-child):not(:has(.alsoboughtbox)) > .box { flex: 0 0 calc(50% - 16px); }
.markdown .columns > .box h3:first-child, .markdown .columns > .box > a:first-child > h3 { margin-top: 0; }
/* ...but a heading under a photo in a card keeps some space (tea portafilter "Black tea", "Sencha") */
.markdown .columns > .box > p:has(> a.imghref, > img) + :is(a, h2, h3, h4) :is(h2, h3, h4), .markdown .columns > .box > p:has(> a.imghref, > img) + :is(h2, h3, h4) { margin-top: 20px; }
/* rows of 5 or more points wrap 4 per row (2 per row on tablets), so the cards are
   not squeezed into one long row */
.markdown .columns:not(.cards):has(> .box:nth-child(5)):not(:has(.alsoboughtbox, .ytbox, .buybox)) { flex-wrap: wrap; }
.markdown .columns:not(.cards):has(> .box:nth-child(5)):not(:has(.alsoboughtbox, .ytbox, .buybox)) > .box { flex: 0 0 calc(25% - 24px); }
@media (max-width: 1000px) { .markdown .columns:not(.cards):has(> .box:nth-child(5)):not(:has(.alsoboughtbox, .ytbox, .buybox)) > .box { flex-basis: calc(50% - 16px); } }
/* [salepage] product cards: no frame; the white product photos sit seamlessly on white */
.markdown .columns > .box:has(.dc-carousel:not(.salecards .dc-carousel)):not(:has(.buybox)) { background: var(--surface); border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.markdown .columns:has(> .box .dc-carousel):not(:has(.buybox)) { gap: 24px; }
.markdown .columns > .box:has(.dc-carousel:not(.salecards .dc-carousel)):not(:has(.buybox)) { flex: 0 0 calc(33.333% - 16px); max-width: calc(33.333% - 16px); }
/* video row and "Customers also bought": no white frame */
.markdown .columns > .ytbox, .markdown .columns > .alsoboughtbox { background: transparent; padding: 0; }
.markdown .columns > .ytbox img, .markdown .columns > .alsoboughtbox img { border-radius: var(--radius-img); }
@media (max-width: 760px) {
	.markdown .columns { gap: 28px; }
	.markdown .columns > .box { flex-basis: 100%; }
	.markdown .columns:has(> .box:nth-child(4):last-child):not(:has(.alsoboughtbox)) > .box { flex-basis: 100%; }
	.markdown .columns > .box:has(.dc-carousel:not(.salecards .dc-carousel)):not(:has(.buybox)) { flex-basis: 100%; max-width: 100%; }
}

/* bold / italic text keeps the page font (the site's stylesheet sets <strong> to Lato) */
.markdown strong, .markdown b, .markdown em, .markdown i:not([class*="fa"]) { font-family: inherit; }

/* the shared "contact us" fragment: a small link floated right by an inline
   style="float:right" (a hard-coded exception to remove when that fragment is redone);
   here it is Ben's outline button */
.markdown a.markdownbox { float: none !important; display: inline-flex; align-items: center; min-height: var(--tap); padding: 10px 20px; margin: 6px 0 0; border: var(--border) solid var(--btn-line) !important; border-radius: var(--radius); background: var(--surface); color: var(--text) !important; font-family: var(--font); font-size: var(--fs-base); font-weight: var(--fw-semibold); letter-spacing: 0; text-transform: capitalize; text-decoration: none; box-shadow: none; }
.markdown a.markdownbox:hover { background: var(--hover-bg); color: var(--text) !important; }
/* on mouse-over the background, text and outline change together, over 0.3s (the site's
   markdown.css faded only the text, so the background changed first); same for .button */
.markdown :is(a.markdownbox, a.button) { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
/* a box whose picture links to a page (not to the picture itself): pointing at the picture shows the
   box's (first) button in its mouse-over state, so it's clear the picture can be clicked too */
.markdown .box:not(.hero *):has(a.imghref:not([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".avif" i], [href$=".webp" i], [href$=".gif" i]):hover) :is(a.markdownbox, a.button):not(:is(a.markdownbox, a.button) ~ *) { background: var(--hover-bg); color: var(--text) !important; }

/* "Contact us" on a hero photo: white outline, as Ben's secondary button on a cover */
.markdown .hero a.markdownbox { border-color: var(--surface); color: var(--surface) !important; background: rgb(from var(--dark) r g b / .35); }
.markdown .hero a.markdownbox:hover { background: var(--surface); color: var(--text) !important; }

/* photos: no outline. The site's stylesheet gives Markdown photos a 1px grey
   drop-shadow (on the photo and on its link, both class imghref; ytimghref and
   smallimghref too), which on white draws a frame round the white product photos */
.markdown img, .markdown .imghref, .markdown .ytimghref, .markdown .smallimghref,
.markdown .markdown .imghref, .markdown .markdown .ytimghref, .markdown .markdown .smallimghref { filter: none; }

/* "Customers also bought" and [salepage] product cards: always on white (their product
   photos have white backgrounds), whatever colour the band's place in the alternation gives it */
/* (see "band colours" at the end) */

/* ---- [buybox](group): Ben's buy block (buybox_markdown in lib/pages.tcl) ----
   photo left, chooser right; always on white like the product photos */

.markdown .buybox { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; margin: 0 0 24px; }
.markdown .buybox [hidden] { display: none !important; }
.markdown .buybox-photo .dc-carousel, .markdown .buybox-photo img { border-radius: var(--radius-img); }
.markdown .buybox-photo img { display: block; width: 100%; height: auto; }
.markdown .buybox-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.markdown .buybox-price { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-head); color: var(--text); line-height: 1.1; }
.markdown .buybox-name { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-medium); letter-spacing: 0; color: var(--muted); }
/* a lone product (no drop-down): the + button sits opposite its price and name;
   the added-to-cart text and the description run full width below */
.markdown .buybox-info:has(> .buybox-item) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; }
.markdown .buybox-info:has(> .buybox-item) > .buybox-row { display: contents; }
.markdown .buybox-info:has(> .buybox-item) .buybox-buy a.button:not(.small) { grid-column: 2; grid-row: 1; }
.markdown .buybox-info:has(> .buybox-item) :is(.discountoffer, .print-only, .buybox-desc) { grid-column: 1 / -1; }
.markdown .buybox-choose { width: 100%; height: var(--btn-h); padding: 0 14px; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: var(--fw-medium) var(--fs-base)/1.2 var(--font); }
.markdown .buybox-desc { margin-top: 6px; color: var(--muted); font-size: var(--fs-base); line-height: 1.6; }
@media (max-width: 760px) {
	.markdown .buybox { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.markdown .buybox-price { font-size: var(--fs-2xl); }
}

/* carousel arrows: on a device with a mouse they show only while the pointer is over
   the photo (or an arrow has keyboard focus); on touch screens they don't show (swipe, or tap a dot) */
@media (hover: hover) {
	:is(.markdown, article.box.post) .dc-carousel .dc-arrow { opacity: 0; transition: opacity .15s; }
	:is(.markdown, article.box.post) .dc-carousel:hover .dc-arrow, :is(.markdown, article.box.post) .dc-carousel .dc-arrow:focus-visible { opacity: 1; }
}
@media (hover: none) and (pointer: coarse) { :is(.markdown, article.box.post) .dc-carousel .dc-arrow { display: none; } }

/* a buy box in one half of a side-by-side block (the page intro in the other half):
   the photo, then price, name, choice, Add to cart and description under it */
.markdown .columns > .box .buybox { grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0; }
.markdown .columns:has(> .box:nth-child(2):last-child):has(.buybox) { align-items: start; }

/* space above a page that opens with ordinary content (a hero runs up to the bar) */
.markdown:not(:has(> .markdown)) > :first-child:not(.hero):not(section.band) { margin-top: 56px; } /* the innermost content wrapper */
@media (max-width: 760px) { .markdown:not(:has(> .markdown)) > :first-child:not(.hero):not(section.band) { margin-top: 32px; } }
/* the page-opening buybox sits close under the header line: 1px instead of 72px
   (desktop only; on phones it comes after the title) */
@media (min-width: 761px) { .markdown:not(:has(> .markdown)) > .columns:first-child > .box:is(:has(> .buybox:first-child), :has(> p:first-child + .buybox)) { margin-top: -71px; } }
/* (only when the buybox starts the column: not under a heading, e.g. stacky's "Our stacking porcelain cups:") */

/* ---- band colours ----
   The page opens on white, so the first band is light grey, then they alternate.
   A band holding product photos ([buybox], [salepage] cards, "Customers also bought")
   is always white; the bands after it start again (grey, white, grey...), counting
   from the nearest such band. Two product bands in a row are both white, so they
   read as one white section. (Where the count doesn't line up, a white text band can
   sit just before a product band; one +++ more or less in the page fixes that.) */
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) { --band: var(--page) !important; }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--alt); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--page); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--alt); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--page); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--alt); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--page); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--alt); }
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band: var(--page); }

/* "Customers also bought" is always white; when the band above it is white too
   (a product band, an even number of bands after one, an even band with no
   product band before it, or the white opening block),
   a line separates them */
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:has(.alsoboughtbox),
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:has(.alsoboughtbox),
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:has(.alsoboughtbox),
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:has(.alsoboughtbox),
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:not(:has(.buybox)):not(:has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) + section.band:has(.alsoboughtbox),
.markdown section.band:nth-child(even of section.band):not(section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox))):not(section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"])), :has(.alsoboughtbox)) ~ section.band) + section.band:has(.alsoboughtbox),
/* the portafilter builder ([pairbox]) is a buy widget too: its band is white like the others */
.markdown section.band:has(.pairbox) { --band: var(--page) !important; }
.markdown section.band:has(.pairbox) + section.band:not(:has(.alsoboughtbox)) { --band: var(--alt) !important; }
.markdown :not(section.band) + section.band:has(.alsoboughtbox) { --band-line: var(--line); padding-top: 20px !important; }
/* two buy bands in a row (a buy box or product carousel makes a band white) look like one band: put
   the same line between them */
.markdown section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))) + section.band:is(:has(.buybox), :has(.dc-carousel:not(.salecards .dc-carousel), [id^="buy_"]:not(.salecards [id^="buy_"]))):not(:has(.alsoboughtbox)) { --band-line: var(--line); }

/* the buy box's choice row: the drop-down with the shop's button beside it. The
   button is just a "+" while it says "add: $99" (the words stay for screen readers);
   after a tap it shows the shop's "ADDED! 1 X $99", sized to its text. The shop's
   offer line and "view shopping cart" go on their own line under the row, so they
   never squeeze the drop-down. The button is black on a light brown (#e6d5c1),
   a little darker on hover. */
.markdown .buybox-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.markdown .buybox-row .buybox-choose { flex: 1 1 260px; min-width: 0; }
/* the listbox built from the drop-down (buybox_list in js/shopping.js): each
   product's small photo to the left of its name and price */
.markdown .buybox-row .buybox-list { position: relative; flex: 1 1 260px; min-width: 0; }
.markdown .buybox-list .buybox-list-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; margin: 0; padding: 0 36px 0 14px; text-align: left; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; position: relative; }
.markdown .buybox-list .buybox-list-btn::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: rotate(45deg); }
.markdown .buybox-list .buybox-list-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.markdown .buybox-list img, .markdown .buybox-list .buybox-list-noimg { flex: 0 0 55px; width: 55px; height: 36px; object-fit: contain; margin: 0; }
.markdown .buybox-list img { mix-blend-mode: darken; } /* only the photo's white (and anything lighter than the row fill) takes the row fill; the product itself keeps its colours. darken, not multiply: multiply darkened the whole photo on --hover-bg and --selected-bg */
.markdown .buybox-list-items { position: absolute; z-index: 20; left: 0; width: max-content; min-width: 100%; max-width: var(--room, 100%); top: calc(100% + 4px); max-height: 360px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: var(--rule) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.markdown .buybox-list-items:focus { outline: none; }
.markdown .buybox-list-items li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 8px; border-radius: 4px; cursor: pointer; font: var(--fw-medium) var(--fs-base)/1.3 var(--font); color: var(--text); }
.markdown .buybox-list-items li:hover { background: var(--hover-bg); }
.markdown .buybox-list-items li[aria-selected="true"] { background: var(--selected-bg); }
/* the list is as wide as its longest name, but stops 16px short of the window's
   right side (--room, set by buybox_list when it opens); longer names wrap */
.markdown .buybox-buy, .markdown .buybox-buy div:not(.discountoffer, .discountoffer *, .print-only) { display: contents !important; } /* the shop's wrappers (one has an inline display:inline) */
.markdown .buybox-buy a.button:not(.small) { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: var(--btn-h); margin: 0; padding: 0 20px; white-space: nowrap; font-size: var(--fs-base); background: var(--accent) !important; border-color: var(--accent) !important; color: var(--surface) !important; box-shadow: var(--btn-shadow); }
.markdown .buybox-buy a.button:not(.small):hover { background: var(--accent-deep) !important; border-color: var(--accent-deep) !important; }
.markdown .buybox-buy a.button.fa-plus-circle { font-size: 0 !important; width: var(--btn-h); padding: 0 !important; }
.markdown .buybox-buy a.button.fa-plus-circle::before { content: "+" !important; font: 400 30px/1 var(--font) !important; margin: 0 !important; }
.markdown .buybox-buy .discountoffer { display: block !important; flex: 1 1 100%; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.markdown .buybox-buy .discountoffer br { display: none; }
.markdown .buybox-buy .discountoffer a.button.small { display: inline-flex; width: auto; align-items: center; min-height: var(--tap); margin: 10px 0 0; padding: 8px 16px; border: var(--border) solid var(--btn-line) !important; border-radius: var(--radius); background: transparent !important; color: var(--text) !important; font-size: var(--fs-xs); white-space: nowrap; }
.markdown .buybox-buy .discountoffer a.button.small:hover { background: var(--hover-bg) !important; color: var(--text) !important; }

/* every product's photo keeps the same shape while it loads (a product with one photo
   is a lazy-loaded <img> with no size, which jumped the row under it) */
.markdown .buybox-photo img { aspect-ratio: 879 / 568; object-fit: contain; margin: 0; } /* .image.fit has 32px margins */

/* ---- [pairbox] (pairbox_markdown, pages.tcl; pairbox_init, shopping.js): pick a product in
   step 1 (a portafilter head), then one in step 2 (a handle), shown together in one picture.
   The two white-background product photos are blended (darken, so the white disappears);
   the head sits flush left and the handle flush right, as photographed (not flipped). --pb-* place the two photos.
   Selected state: the chosen one is filled with --selected-bg, stands up (the button shadow, a dark 1 px edge; the photo keeps its size) and has dark words; the other tiles are flat with grey words. The sizes are two separate buttons, with a thin line under them. Tokens only (chrome-tokens.css). */
.markdown .pairbox { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; margin: 0 0 24px;
	--pb-handle-w: 60%; --pb-handle-y: 31%; --pb-head-w: 56%; --pb-head-y: 6%; }
.markdown .pairbox-pic { position: sticky; top: 24px; aspect-ratio: 3 / 2; background: var(--surface); border-radius: var(--radius-img); overflow: hidden; isolation: isolate; }
.markdown .pairbox-pic img { position: absolute; height: auto; max-width: none; mix-blend-mode: darken; border-radius: 0; }
.markdown .pairbox-pic-2 { width: var(--pb-handle-w); right: 0; top: var(--pb-handle-y); }
.markdown .pairbox-pic-1 { width: var(--pb-head-w); left: 0; top: var(--pb-head-y); }
.markdown .pairbox-step + .pairbox-step { margin-top: 28px; }
.markdown .pairbox-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: var(--fs-lg); line-height: var(--lh-tight); }
/* the step numbers: the accent, as the design's numbers and ticks */
.markdown .pairbox-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--surface); font-size: var(--fs-xs); font-weight: var(--fw-bold); }

/* the handle sizes: two separate buttons with a gap (--space) between them, each with its own 1 px edge and --radius
   corners. As the tiles: the one not chosen is flat (no shadow) with a --btn-line edge and grey words (--muted); the
   chosen one stands up: --selected-bg fill, the button shadow, a dark 1 px edge (--text), dark semi-bold words. They sit side by
   side while each name fits in two lines (9.75em, 136.5 px: "14cm portafilter handle" in semi-bold needs 136 px); in a narrower column they stack, each the full width */
/* a thin line (--rule, --line: the same hairline as above the total) under the size buttons, across the full width of
   the tiles, so the sizes read as a choice of their own and not as one more row of tiles. 16 px (--space x 2) above and below
   the line, twice the 8 px gap between tiles. Step 1 has no size buttons (no .pairbox-tabs), so it has no line */
.markdown .pairbox-tabs { display: flex; flex-wrap: wrap; gap: var(--space); margin: 0 0 calc(var(--space) * 2); padding: 0 0 calc(var(--space) * 2); border: 0; border-bottom: var(--rule) solid var(--line); border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.markdown .pairbox-tab { flex: 1 1 9.75em; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); margin: 0; padding: 6px 14px; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); box-shadow: none; color: var(--muted); font: var(--fw-medium) var(--fs-xs)/var(--lh-tight) var(--font); text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.markdown .pairbox-tab:hover { background: var(--hover-bg); }
.markdown .pairbox-tab[aria-selected="true"] { background: var(--selected-bg); border-color: var(--text); box-shadow: var(--btn-shadow); color: var(--text); font-weight: var(--fw-bold); text-decoration: none; }
.markdown .pairbox-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--space); }
.markdown .pairbox-tiles[hidden] { display: none; }
.markdown .pairbox-tile { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: var(--tap); padding: 6px 6px var(--space); border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--btn-shadow); color: var(--text); font: 400 13px/1.3 var(--font); text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
/* the tiles not chosen step back: flat (no shadow), the name in --muted (6.6:1 on white) */
.markdown .pairbox-tile:not([aria-checked="true"]) { box-shadow: none; color: var(--muted); }
.markdown .pairbox-tile:hover { border-color: var(--muted); background: var(--hover-bg); }
.markdown .pairbox-tile img, .markdown .pairbox-noimg { display: block; width: 100%; aspect-ratio: 1486 / 960; object-fit: contain; margin: 0 0 4px; border-radius: 0; }
.markdown .pairbox-tile img { mix-blend-mode: darken; } /* only the white photo background takes the tile's colour; the handle or head keeps its own colours (multiply darkened them too) */
.markdown .pairbox-tile-name { font-weight: var(--fw-medium); }
/* the "None" choice: a tile like the others. Its picture area has no fill of its own (it takes the tile's
   colour, so it is white until it is chosen) and shows an empty circle with a line through it (the sign for
   "empty"), drawn thin in --muted, where the photo would be */
.markdown .pairbox-none .pairbox-noimg { display: grid; place-items: center; background: none; }
.markdown .pairbox-none .pairbox-noimg::after { content: ""; width: calc(var(--icon) * 2); aspect-ratio: 1; border: var(--border) solid var(--muted); border-radius: 50%;
	background: linear-gradient(135deg, transparent calc(50% - .5px), var(--muted) calc(50% - .5px), var(--muted) calc(50% + .5px), transparent calc(50% + .5px)); }
.markdown .pairbox-tile-price { color: var(--muted); }
/* the chosen tile stands up: --selected-bg fill, the button shadow, a dark 1 px edge (--text), the name in --text semi-bold. The photo
   keeps its size (the same as in a tile not chosen). "None" gets the same marks (its picture area has no fill, so it takes the --selected-bg fill too). Hover and chosen fills: --hover-bg and --selected-bg (tokens.css) */
.markdown .pairbox-tile[aria-checked="true"] { background: var(--selected-bg); border-color: var(--text); box-shadow: var(--btn-shadow); color: var(--text); }
.markdown .pairbox-tile[aria-checked="true"] .pairbox-tile-name { font-weight: var(--fw-semibold); }
.markdown :is(.pairbox-tile, .pairbox-tab, .pairbox-add):focus { outline: none; }
.markdown :is(.pairbox-tile, .pairbox-tab, .pairbox-add):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.markdown .pairbox-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; margin-top: 28px; padding-top: 20px; border-top: var(--rule) solid var(--line); }
.markdown .pairbox-names { grid-column: 1; grid-row: 2; font-weight: var(--fw-medium); line-height: var(--lh-tight); }
.markdown .pairbox-names i { font-style: normal; color: var(--muted); margin: 0 6px; }
.markdown .pairbox-total { grid-column: 1; grid-row: 1; font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-head); line-height: 1.1; white-space: nowrap; }
/* the add button: the design's primary button (rust, white words, --btn-h high, --radius corners, the
   light button shadow), as the footer's subscribe button. Its words ("Add to cart", set by
   pairbox_init from data-one / data-both) now show; the + stays in front of them. The site's style.css forces .button
   colours, size and capitals with !important, hence the !important here. */
.markdown .pairbox-add { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; gap: var(--space); width: auto; height: auto; min-height: var(--btn-h); margin: 0; padding: 0 var(--btn-pad-x) !important; border: var(--border) solid var(--accent) !important; border-radius: var(--radius); background: var(--accent) !important; color: var(--surface) !important; box-shadow: var(--btn-shadow); font: var(--fw-bold) var(--fs-base)/var(--lh-tight) var(--font) !important; letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s; }
.markdown .pairbox-add::before { content: "+" / ""; font-size: var(--fs-xl); font-weight: 400; line-height: 1; }
.markdown .pairbox-add:not(:disabled):hover { background: var(--accent-deep) !important; border-color: var(--accent-deep) !important; }
.markdown .pairbox-add:disabled { opacity: .4; cursor: default; }
.markdown .pairbox-added { grid-column: 1 / -1; grid-row: 3; color: var(--muted); font-size: var(--fs-xs); min-height: 1em; }
/* the picture stays in view while the handles are chosen; on phones it scrolls with the page,
   and the add button takes the full width under the total */
@media (max-width: 760px) { .markdown .pairbox { grid-template-columns: minmax(0, 1fr); gap: 24px; } .markdown .pairbox-pic { position: relative; top: 0; } }
@media (max-width: 640px) { .markdown .pairbox-sum { grid-template-columns: minmax(0, 1fr); } .markdown .pairbox-add { grid-column: 1; grid-row: 3; width: 100%; margin-top: 12px; } .markdown .pairbox-added { grid-row: 4; } }

/* ---- [salecards] (salecards_markdown, pages.tcl; salecards_init, shopping.js): a row of product
   cards, one per product family; a family's products are pill buttons. The buy button is the buy
   box's (.buybox-buy), so the + button looks the same. */
/* auto-fill, not auto-fit: a row of 1 or 2 cards keeps the same card width as a full row (John, 25 Nov: customize DE1XL wand) */
.markdown .salecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin: 24px 0; }
/* [salecards](group | wide): wide cards, 2 per row (1 on phones), as on de1_sale (John, 25 Nov) */
.markdown .salecards-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* always 2 across, so 2 cards fill the width on a wide screen too */
@media (max-width: 640px) { .markdown .salecards-wide { grid-template-columns: minmax(0, 1fr); } }
/* each card is a bordered box: the product photos and the band are both white */
.markdown .salecard { display: flex; flex-direction: column; min-width: 0; padding: 16px 20px 20px; border: var(--rule) solid var(--line); border-radius: var(--radius-img); background: var(--surface); }
.markdown .salecard [hidden] { display: none !important; }
/* a family's photos, names and descriptions are stacked in one place, the size of the largest, so
   choosing another product does not move the text below (the others are invisible, not removed) */
.markdown .salecard :is(.salecard-photos, .salecard-name, .salecard-descs) { display: grid; }
.markdown .salecard :is(.salecard-photos, .salecard-name, .salecard-descs) > * { grid-area: 1 / 1; display: block; }
.markdown .salecard :is(.salecard-photos, .salecard-name, .salecard-descs) > [hidden] { display: block !important; visibility: hidden; }
.markdown .salecard-photo img, .markdown .salecard-photo .dc-carousel { border-radius: var(--radius-img); }
.markdown .salecard-name { margin: 16px 0 4px; font-size: var(--fs-xl); line-height: 1.3; }
.markdown .salecard-desc { color: var(--muted); font-size: var(--fs-base); line-height: var(--lh); }
.markdown .salecard-desc a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }
/* the release date on the "new" cards (salecards_markdown_do, pages.tcl), above the description */
.markdown .salecard-date { margin: 0 0 6px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.markdown .salecard-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.markdown .salecard-pill { min-height: var(--tap); padding: 6px 14px; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: var(--fw-medium) var(--fs-xs)/1.2 var(--font); cursor: pointer; }
.markdown .salecard-pill:hover { border-color: var(--muted); background: var(--hover-bg); }
/* the chosen pill: a slightly darker sand than the sand band, with a dark outline (solid black was too strong) */
.markdown .salecard-pill[aria-checked="true"] { background: var(--selected-bg); border-color: var(--text); color: var(--text); box-shadow: var(--btn-shadow); font-weight: var(--fw-semibold); }
.markdown .salecard-select { margin: 14px 0 0; max-width: 100%; }
/* the card drop-down as a list with small photos (buybox_list, shopping.js): opens under its button */
.markdown .salecard .buybox-list { position: relative; margin: 14px 0 0; }
.markdown .salecard-buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 16px; }
.markdown .salecard-buy { flex-wrap: wrap; }
.markdown .salecard-buy .buybox-buy { display: flex; flex-wrap: wrap; justify-content: flex-end; }
/* after adding: the cart button and offer go on their own line under the price and button */
.markdown .salecard-buy:has(.discountoffer) .buybox-buy { flex: 1 1 100%; justify-content: flex-start; }
.markdown .salecard-price { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-head); line-height: 1.1; }

/* the footer (Ben's): the editable "footer ben" fragment in a dark band (newsite::ben_footer).
   Its four ``` blocks are the logo, Shop, Owners and Community + newsletter columns; the
   photo credits and the licence line sit under a thin rule. */
.bn-footer { background: var(--dark); color: var(--on-dark); padding: 56px 0 28px; font-family: var(--font); font-size: var(--fs-xs); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.bn-footer-in { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; }
.bn-footer .markdown { display: contents; }
.bn-footer .columns { flex: 1 1 100%; display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.3fr; gap: 40px; align-items: start; margin: 0 0 14px !important; padding: 0 0 36px; border-bottom: var(--rule) solid color-mix(in srgb, var(--on-dark) 20%, var(--dark)); }
.bn-footer .columns > .box { width: auto; max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }
.bn-footer .columns > .box br { display: none; }
.bn-footer .columns > .box:first-child img { width: 104px; height: auto; border-radius: 0; opacity: .3; transition: opacity .15s; }
.bn-footer .columns > .box:first-child a:hover img { opacity: .8; }
.bn-footer .columns p { color: var(--on-dark-muted); margin: 18px 0 0; max-width: 260px; }
.bn-footer .columns > .box:first-child p { margin: 0; }
.bn-footer h2 { font-family: var(--font); font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: 1.3; letter-spacing: 0; color: var(--on-dark); margin: 0 0 8px; }
.bn-footer .box > a[name] { pointer-events: none; text-decoration: none; }
.bn-footer li { display: block; list-style: none; margin: 0 !important; padding: 0; color: inherit; }
.bn-footer li a { display: flex; align-items: center; min-height: var(--tap); color: var(--on-dark-muted) !important; text-decoration: none !important; font-weight: 400; }
.bn-footer li a:hover { text-decoration: underline !important; text-underline-offset: 4px; }
/* Community: the links wrap side by side */
.bn-footer .columns > .box:last-child li { display: inline-flex; margin-right: 18px !important; }
/* newsletter */
.bn-footer #newsletter { margin-top: 28px; }
.bn-footer #newsletter form { display: flex; gap: 8px; margin: 0; font-size: 0; }
.bn-footer #newsletter input { flex: 1; min-width: 0; min-height: var(--btn-h); padding: 10px 14px; margin: 0; border-radius: var(--radius); border: var(--border) solid color-mix(in srgb, var(--on-dark-muted) 50%, var(--dark)); background: transparent; color: var(--surface); font: 400 var(--fs-base) var(--font); text-align: left !important; box-shadow: none; }
.bn-footer #newsletter input::placeholder { color: var(--on-dark-muted) !important; opacity: 1; }
.bn-footer #newsletter .button { display: inline-flex; align-items: center; min-height: var(--btn-h); height: auto; padding: 0 18px; margin: 0; border: 0 !important; border-radius: var(--radius); background: var(--accent); color: var(--surface) !important; font: var(--fw-bold) var(--fs-base) var(--font); font-size: var(--fs-base) !important; flex: none; width: auto !important; text-transform: none; letter-spacing: 0; box-shadow: none; }
.bn-footer #newsletter .button:hover { background: var(--accent-deep); }
/* the bottom line: photo credits, licence */
.bn-footer-in > .markdown > .markdown > p, .bn-footer-license { font-size: var(--fs-xs); color: var(--on-dark-muted); margin: 0; }
.bn-footer-in p a { color: inherit !important; text-decoration: underline !important; text-decoration-color: currentColor !important; text-underline-offset: 3px; }
@media (max-width: 1100px) {
  .bn-footer .columns { grid-template-columns: 1fr 1fr 1.3fr; gap: 24px; }
  .bn-footer .columns > .box:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .bn-footer { padding: 40px 0 24px; }
  .bn-footer .columns { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-bottom: 24px; }
  .bn-footer .columns > .box:first-child, .bn-footer .columns > .box:last-child { grid-column: 1 / -1; }
  .bn-footer-in { display: grid; }
}
/* skel's empty layer wrapper sits after the page as a viewport-tall blank; the Ben nav doesn't use it */
#skel-layers-hiddenWrapper:empty { display: none; }

/* models & prices (/price, /model): the configurator driven by shopping.js calc_sku_v2(),
   laid out like a modern buy page (John's work for the old "story" design, 2026-11):
   options as pills on the left, the rotating 360° clip on the right on its own #f2f2f2
   background, one clear add-to-cart button */
.markdown .columns:has(#de1_buy) { display: grid !important; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.3fr) !important; gap: clamp(28px, 5vw, 80px) !important; align-items: start; margin-top: 1.5rem; }
.markdown .columns:has(#de1_buy) > .box { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; border: 0 !important; background: none !important; }
.markdown .columns:has(#de1_buy) > .box:has(#de1_video) { position: sticky; top: calc(var(--header) + 24px); text-align: center !important; }
.markdown .columns:has(#de1_buy) > .box:has(#de1_video) > p { margin-top: 0 !important; text-align: center !important; }
.markdown #de1_video, .markdown #de1_video a { display: block; }
.markdown #de1_video > div { background: #f2f2f2; }
.markdown #de1_video img { width: 100%; height: auto; border-radius: 0; }
.markdown #de1_model { display: block; font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: -.015em; color: var(--text); margin-top: .6rem; }
.markdown #de1_model a { color: inherit !important; text-decoration: none !important; }
/* "customization: gold" on its own line under the model name, quiet grey */
.markdown #de1_model br { display: initial !important; }
.markdown #de1_model font { display: block; margin-top: .25rem; font-size: .62em; font-weight: 500; letter-spacing: 0; color: var(--muted) !important; }
.markdown #sale_available:empty { display: none; }
.markdown #sale_available .button { margin: .6rem auto 0 !important; }
/* option groups: small caps headings, options as pills */
.markdown .columns:has(#de1_buy) > .box:has(#de1_buy) > a[name]:has(> h3) { border-top: 0 !important; padding-top: 0 !important; margin: 1.6rem 0 .6rem !important; display: block; }
.markdown .columns:has(#de1_buy) > .box:has(#de1_buy) > a[name]:first-child { margin-top: 0 !important; }
.markdown .columns:has(#de1_buy) h3 { font-size: var(--fs-xs) !important; font-weight: var(--fw-semibold); letter-spacing: .12em; text-transform: uppercase; color: var(--muted) !important; margin: 0 !important; }
.markdown .columns:has(#de1_buy) > .box > p:has(input[type=radio]) { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 !important; }
.markdown .columns:has(#de1_buy) > .box > p > span:has(input) { display: contents !important; }
.markdown .columns:has(#de1_buy) > .box > p > span[style*="display: none"], .markdown .columns:has(#de1_buy) > .box > p > span[style*="display:none"] { display: none !important; }
.markdown .columns:has(#de1_buy) > .box > p br { display: none; }
.markdown .columns:has(#de1_buy) input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.markdown .columns:has(#de1_buy) input[type=radio] + label {
	display: inline-flex !important; align-items: center; gap: .55em; min-width: 7.5rem; justify-content: center;
	padding: .8em 1.15em !important; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
	font: var(--fw-medium) var(--fs-base) var(--font) !important; color: var(--text) !important; transition: border-color .15s, box-shadow .15s;
}
.markdown .columns:has(#de1_buy) input[type=radio] + label::before, .markdown .columns:has(#de1_buy) input[type=radio] + label::after { display: none !important; }
.markdown .columns:has(#de1_buy) input[type=radio] + label:hover { border-color: var(--muted); background: var(--hover-bg); }
.markdown .columns:has(#de1_buy) input[type=radio]:checked + label { background: var(--selected-bg); border-color: var(--text); box-shadow: var(--btn-shadow); font-weight: var(--fw-semibold) !important; }
.markdown .columns:has(#de1_buy) input[type=radio]:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
/* colour swatches: the fragment's <font style="background-color"> blocks become dots */
.markdown .columns:has(#de1_buy) label font[style*="background-color"] { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; font-size: 0; box-shadow: inset 0 0 0 1px rgb(from var(--dark) r g b / .18); }
/* add-to-cart: one wide button */
.markdown #de1_buy { margin: 1.8rem 0 0 !important; }
.markdown #de1_buy .button, .markdown #de1_buy a { display: flex !important; width: 100%; justify-content: center; padding: 1em 1.4em !important; font-size: var(--fs-base) !important; margin: 0 !important;
	background: var(--accent) !important; color: var(--surface) !important; border-color: var(--accent) !important; border-radius: var(--radius) !important; box-shadow: var(--btn-shadow); }
.markdown #de1_buy .button:hover, .markdown #de1_buy a:hover { background: var(--accent-deep) !important; }
.markdown #de1_buy .shipdate, .markdown #de1_buy i[style*="color"] { display: block; margin-top: .8rem; text-align: center; font-size: var(--fs-xs); color: var(--muted) !important; }
.markdown #de1_buy br { display: none; }
/* country / currency */
.markdown .columns:has(#de1_buy) > .box > p:has(#country_dropdown) { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem !important; }
.markdown #country_dropdown select, .markdown #currency_dropdown select { height: var(--tap); border-radius: var(--radius); border: var(--border) solid var(--btn-line); padding: 0 .9em; font-size: var(--fs-base); background: var(--surface); }
/* "Customize your DE1" (shopping.js builds it with an inline grey style): a warm, clearly noticeable button */
.markdown a.button[href*="customize_de1"] {
	display: inline-flex !important; align-items: center; gap: .6em; padding: .9em 1.5em !important; margin: .8rem 0 .2rem !important;
	background: var(--surface) !important; border: var(--border) solid var(--btn-line) !important; border-radius: var(--radius) !important;
	color: var(--text) !important; font-size: var(--fs-base) !important; font-weight: var(--fw-semibold); box-shadow: var(--btn-shadow) !important;
}
.markdown a.button[href*="customize_de1"]::before { content: "\f1de"; font-family: "Font Awesome 7 Pro", "Font Awesome 7 Free"; font-weight: 900; }
.markdown a.button[href*="customize_de1"]:hover { background: var(--hover-bg) !important; transform: translateY(-1px); }
.markdown a.button[href*="customize_de1"] font { color: var(--text) !important; }
/* the page takes the clip's own #f2f2f2 background, so the machine floats */
html:has(#de1_buy), body:has(#de1_buy), body:has(#de1_buy) section.band, body:has(#de1_buy) #one { background: #f2f2f2 !important; }
body:has(#de1_buy) .markdown p:empty { display: none; }
body:has(#de1_buy) .markdown h1 { margin: .4em 0 .3em !important; }
@media (max-width: 860px) {
	.markdown .columns:has(#de1_buy) { grid-template-columns: minmax(0, 1fr) !important; }
	.markdown .columns:has(#de1_buy) > .box:has(#de1_video) { position: static; order: -1; }
}

/* comparison tables (Markdown pipe tables, e.g. /compare): fixed columns so successive
   tables line up, a narrower label column, the design's hairlines; on phones the table
   keeps a readable width and scrolls sideways with the label column pinned */
.markdown .md-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: var(--fs-base); line-height: 1.5; background: var(--surface); }
.markdown .md-table th, .markdown .md-table td { border: var(--rule) solid var(--line); padding: .7rem .9rem; color: var(--muted); }
.markdown .md-table th:first-child, .markdown .md-table td:first-child { width: 20%; }
.markdown .md-table thead th { background: var(--surface); color: var(--text); font-weight: var(--fw-bold); }
.markdown .md-table td strong { color: var(--text); font-weight: var(--fw-bold); }
.markdown .md-table tbody tr:nth-child(even) td { background: var(--surface); }
@media (max-width: 760px) {
  .markdown .md-table { min-width: 620px; font-size: var(--fs-xs); }
  .markdown .md-table th:first-child, .markdown .md-table td:first-child { position: sticky; left: 0; z-index: 1; width: 120px; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
}

/* the site search form ([searchbox]() on /search): a full-width field and a primary button */
.markdown form#main_application { display: flex; flex-wrap: wrap; gap: 8px; max-width: 640px; margin: 8px 0 24px; }
.markdown form#main_application #filter { flex: 1 1 260px; min-width: 0; min-height: var(--btn-h); padding: 10px 14px; margin: 0; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: 400 var(--fs-base) var(--font); text-align: left !important; box-shadow: none; }
.markdown form#main_application #filter:focus { border-color: var(--text); outline: none; }
.markdown form#main_application input[type=submit] { min-height: var(--btn-h); height: auto; padding: 0 22px; margin: 0; border: 0 !important; border-radius: var(--radius); background: var(--accent); color: var(--surface) !important; font: var(--fw-bold) var(--fs-base) var(--font); text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer; }
.markdown form#main_application input[type=submit]:hover { background: var(--accent-deep); }
.markdown form#main_application .site-search-types { flex-basis: 100%; }

/* a video row with a single video: no wider than a two-video row's tile, instead of a
   page-wide thumbnail */
.markdown .columns:has(> .ytbox:only-child) > .ytbox { flex: 0 1 calc(50% - 16px); max-width: calc(50% - 16px); }
@media (max-width: 736px) { .markdown .columns:has(> .ytbox:only-child) > .ytbox { flex-basis: 100%; max-width: 100%; } }

/* buttons side by side in a paragraph (button rows, a video button next to other buttons,
   "Onshape: DE1PRO DE1XL Bengle"): a consistent gap between them and between wrapped rows */
.markdown p > :is(a.button, a.markdownbox, a.youtube, a.bilibili):not(.hero *) { margin-top: 6px; margin-bottom: 6px; }
.markdown p > :is(a.button, a.markdownbox, a.youtube, a.bilibili):not(:last-child):not(.hero *) { margin-right: 10px; }
/* ...but a single video inside a box or card fills that box (the half-width cap is only for
   a video row that spans the band) */
.markdown .columns > .box .columns:has(> .ytbox:only-child) > .ytbox { flex-basis: 100%; max-width: 100%; }
/* phones: a row of three videos shows one big video, then two side by side (not 2 + a lone 1) */
@media (max-width: 736px) { .markdown .columns:has(> .ytbox:nth-child(3):last-child) > .ytbox:first-child { flex-basis: 100%; max-width: 100%; } }

/* ==================================================================================
   Blog, docs and support pages (newsite::render_live / live_post / render_live_support,
   lib/newsite.tcl, lib/blogdocs.tcl). Every rule is scoped to their own markup (.bd-*,
   .ns-article, or body:has(#maintable) for the support pages), so the product and info
   pages are untouched.
   ================================================================================== */

/* ---- a blog post or document (/blog/x, /docs/x): one reading column (--measure, about
   70 characters) in the middle of the page; the date small and quiet above the title;
   18px text, the design's heading sizes, photos to the column's width ---- */
.ns-article { max-width: var(--measure); margin: 56px auto var(--pad); font-size: var(--fs-lg); }
.ns-article .ns-article-head { margin: 0 0 32px; }
.ns-article .ns-article-head time { display: block; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); margin: 0 0 12px; }
.markdown .ns-article .ns-article-head h1 { margin: 0; font-size: var(--fs-title); line-height: 1.08; letter-spacing: var(--tracking-head); }
.ns-article .markdown { font-size: var(--fs-lg); line-height: 1.65; color: var(--text); }
.ns-article .markdown:not(:has(> .markdown)) > :first-child:not(.hero):not(section.band) { margin-top: 0; }
.ns-article .markdown :is(p, li) { color: var(--text); font-size: inherit; line-height: inherit; }
.ns-article .markdown p { margin: 0 0 1.1em; }
.ns-article .markdown :is(ul, ol) { margin: 0 0 1.1em; padding-left: 1.4em; }
.ns-article .markdown li { margin: 0 0 .4em; }
.ns-article .markdown li > :is(ul, ol) { margin: .4em 0 0; }
.ns-article .markdown h2 { font-size: var(--fs-2xl); line-height: 1.2; margin: 1.8em 0 .6em; }
.ns-article .markdown h3 { font-size: var(--fs-xl); line-height: 1.3; margin: 1.6em 0 .5em; }
.ns-article .markdown h4 { font-size: var(--fs-lg); line-height: 1.35; margin: 1.4em 0 .4em; }
.ns-article .markdown :is(h2, h3, h4):first-child { margin-top: 0; }
.ns-article .markdown hr { border: 0; border-top: var(--rule) solid var(--line); margin: 2em 0; }
/* quotes on the site's pages (reviews and the like; John's pick C, 24 Nov): dark upright 20 px text between large rust
   opening and closing quote marks, no bar (was small italic brownish-red with a 12 px pale bar). Blog and docs posts too. */
.markdown blockquote { position: relative; margin: 0; padding: 34px 0 40px; border: 0; background: none;
	color: var(--text); font-style: normal; font-size: var(--fs-xl); line-height: 1.45; font-weight: 500; }
.markdown blockquote::before, .markdown blockquote::after {
	position: absolute; font-size: 72px; line-height: 1; color: var(--accent); font-weight: 700; font-style: normal; }
.markdown blockquote::before { content: "\201C"; top: -16px; left: -4px; }
.markdown blockquote::after { content: "\201D"; right: 0; bottom: -28px; }
.markdown blockquote :is(p, em, i) { font-style: normal; color: inherit; }
.ns-article .markdown blockquote { margin: 0 0 1.4em; }   /* blog and docs posts use the same quote (C), with room after it */
/* photos: the column's width at most, 10px corners, on their own line */
.ns-article .markdown img { max-width: 100%; height: auto; }
.ns-article .markdown :is(img.imghref, a.imghref > img, figure img) { display: block; border-radius: var(--radius-img); margin: .4em 0 1.1em; }
.ns-article .markdown .columns img { margin: 0; }
.ns-article .markdown figure { margin: 0 0 1.1em; }
.ns-article .markdown figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }
.ns-article .markdown iframe { max-width: 100%; }
/* code */
.ns-article .markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--alt); color: var(--text); padding: .12em .36em; border-radius: 4px; border: 0; }
.ns-article .markdown pre { background: var(--alt); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 1.1em; overflow-x: auto; font-size: var(--fs-xs); line-height: 1.55; }
.ns-article .markdown pre code { background: none; padding: 0; font-size: inherit; }
/* tables (not the comparison tables, .md-table, which have their own style): hairlines,
   left aligned, scroll sideways inside the column when too wide */
.ns-article .markdown table:not(.md-table) { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; border: 0; margin: 0 0 1.4em; font-size: var(--fs-base); line-height: 1.45; background: none; }
.ns-article .markdown table:not(.md-table) :is(th, td) { padding: 10px 14px 10px 0; border: 0; border-bottom: var(--rule) solid var(--line); text-align: left; vertical-align: top; background: none; color: var(--text); }
.ns-article .markdown table:not(.md-table) th { font-weight: var(--fw-bold); border-bottom-color: var(--text); }
.ns-article .markdown table:not(.md-table) tr { background: none !important; border: 0; }
@media (max-width: 760px) {
  .ns-article { margin-top: 32px; font-size: var(--fs-base); }
  .ns-article .markdown { font-size: var(--fs-lg); }
  .ns-article .markdown h2 { font-size: var(--fs-xl); }
}

/* ---- support pages (/support/*: the real .adp in the old template, decent_template_top.adp):
   the old 70% white table on grey becomes the design's content column, centred; old forms
   and buttons take the design's fields (as the search box) and buttons ---- */
body:has(#maintable) #main.wrapper { background: var(--page); padding: 56px 0 var(--pad); font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; }
body:has(#maintable) #main > .container { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); max-width: none; margin: 0 auto; padding: 0; background: none; border-radius: 0; box-shadow: none; }
body:has(#maintable) table#maintable { width: 100% !important; margin: 0 !important; line-height: var(--lh) !important; background: none; border: 0; box-shadow: none; font-size: var(--fs-base); color: var(--text); }
body:has(#maintable) #maintable :is(td, th) { padding: 0; }
body:has(#maintable) #maintable table { background: none; border: 0; }
body:has(#maintable) #main :is(p, li, td, label, font) { font-family: var(--font); }
body:has(#maintable) #main p { color: var(--muted); }
body:has(#maintable) #main :is(h1, h2, h3, h4) { font-family: var(--font); color: var(--text); font-weight: var(--fw-bold); letter-spacing: -0.01em; text-align: left; text-transform: none; }
body:has(#maintable) #main h3 { font-size: var(--fs-xl); line-height: 1.3; margin: 1.6em 0 .5em; }
body:has(#maintable) #main b, body:has(#maintable) #main strong { color: var(--text); font-weight: var(--fw-bold); }
/* the title row (the page's name, a "home" button opposite) */
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child h3 { font-size: var(--fs-title); line-height: 1.08; letter-spacing: var(--tracking-head); margin: 0; }
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child td { vertical-align: middle; }
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child table { margin: 0; }
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child br { display: none; }   /* no line breaks after a subtitle (ambassadors) before the title's line */   /* a button's own small table (read_emails' home) has no margin, so it centres with the title */
body:has(#maintable) #maintable hr { border: 0; border-top: var(--rule) solid var(--line); margin: 28px 0 !important; }
body:has(#maintable) #maintable hr.minor { margin: 24px 0 8px !important; }
body:has(#maintable) #maintable hr.minor + br, body:has(#maintable) #maintable hr.minor + br + br, body:has(#maintable) #maintable hr.minor + br + br + br { display: none; }
body:has(#maintable) #maintable font[size] { font-size: inherit; }
body:has(#maintable) #maintable font[size="1"], body:has(#maintable) #maintable font[size="2"] { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
body:has(#maintable) #main a:not(.button):not(.sre-send-btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; border: 0; }
body:has(#maintable) #main a:not(.button):not(.sre-send-btn):hover { color: var(--accent) !important; }
body:has(#maintable) #main img { max-width: 100%; height: auto; }
/* read_emails: the sender's cartoon keeps its 40 px height (the rule above would show it at its full 490 px),
   and the thread uses the content column's width, not its own 760 px cap */
body:has(#maintable) #main img.sre-av { width: auto; height: 40px; }
body:has(#maintable) #main .sre-thread { max-width: none; padding: 0; }
/* read_emails: an automatic message (details.sre-auto) is a closed row that clearly opens: a hairline box,
   a chevron that turns down when open, the subject in the text colour and "automatic message" muted */
body:has(#maintable) #main .sre-auto { margin: 8px 0; border: var(--border) solid var(--line); border-radius: var(--radius); background: var(--surface); }
body:has(#maintable) #main .sre-auto > summary { display: flex; align-items: baseline; gap: var(--space); padding: 12px 16px; cursor: pointer; list-style: none; color: var(--text); font-size: var(--fs-xs); }
body:has(#maintable) #main .sre-auto > summary::-webkit-details-marker { display: none; }
body:has(#maintable) #main .sre-auto > summary::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform .15s; }
body:has(#maintable) #main .sre-auto[open] > summary::before { transform: translateY(-4px) rotate(45deg); }
body:has(#maintable) #main .sre-auto > summary:hover { background: var(--hover-bg); }
body:has(#maintable) #main .sre-auto[open] > summary { border-bottom: var(--border) solid var(--line); }
body:has(#maintable) #main .sre-auto-subj { font-weight: var(--fw-semibold); }
body:has(#maintable) #main .sre-auto-tag { display: none; }   /* the chevron shows it opens: no "automatic message (click to open)" (John, 24 Nov) */
body:has(#maintable) #main .sre-auto > .sre-msg { margin: 12px; }
/* links in an email (a.button.special inside .sre-body) are white outlined buttons, not rust ones */
body:has(#maintable) #main #maintable .sre-body a.button.special { background: var(--surface); border-color: var(--btn-line) !important; color: var(--text) !important; }
body:has(#maintable) #main #maintable .sre-body a.button.special:hover { background: var(--hover-bg); border-color: var(--btn-line) !important; color: var(--text) !important; }
/* the title row's buttons (read_emails: Reply, then home) sit together at the right */
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child td:last-child > table { width: auto !important; margin-left: auto; }

/* fields: as the site search box (white, a 1.5px warm grey edge, 6px corners, 48px high) */
body:has(#maintable) #main :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=url], input[type=date], input[type=datetime-local], input[type=time], input:not([type]), select, textarea) {
  display: block; width: 100%; max-width: 520px; min-height: var(--btn-h); height: auto; margin: 6px 0 8px; padding: 10px 14px;
  border: var(--border) solid var(--btn-line); border-radius: var(--radius); background-color: var(--surface); box-shadow: none;
  color: var(--text); font: 400 var(--fs-base)/1.4 var(--font); text-align: left;
}
body:has(#maintable) #main textarea { max-width: 100%; min-height: 160px; resize: vertical; }
body:has(#maintable) #main select:not([multiple]) { padding-right: 40px; appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e1e1c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center; }
body:has(#maintable) #main :is(input, select, textarea):focus { border-color: var(--text); box-shadow: none; outline: none; }
body:has(#maintable) #main ::placeholder { color: var(--muted); opacity: .8; }
/* buttons: links styled as buttons are Ben's dark-outline secondary button; a form's
   submit is his rust primary button. Normal case, 16px semi-bold, at least the touch size,
   without the old icons (the site's style.css forces colours with !important). The Markdown
   editor's own buttons (Toast UI: its toolbar icons are background images) and the help video's
   (.svid: the thumbnail and its round X) keep their own look */
body:has(#maintable) #main :is(a.button, button:not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit], input[type=button], input[type=reset]) {
  display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; min-height: var(--tap); margin: 4px 6px 4px 0; padding: 10px 20px;
  border: var(--border) solid var(--btn-line) !important; border-radius: var(--radius); background: transparent; color: var(--text) !important; box-shadow: none;
  font: var(--fw-bold) var(--fs-base)/var(--lh-tight) var(--font); letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap; overflow: visible; cursor: pointer; vertical-align: middle;
}
body:has(#maintable) #main :is(a.button, button:not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit], input[type=button], input[type=reset]):hover { background: var(--hover-bg); color: var(--text) !important; }
body:has(#maintable) #main :is(button[type=submit]:not(.toastui-editor-defaultUI button):not(.svid button), button:not([type]):not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit], .button.special) { background: var(--accent); border-color: var(--accent) !important; color: var(--surface) !important; }
body:has(#maintable) #main :is(button[type=submit]:not(.toastui-editor-defaultUI button):not(.svid button), button:not([type]):not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit], .button.special):hover { background: var(--accent-deep); border-color: var(--accent-deep) !important; color: var(--surface) !important; }
body:has(#maintable) #main .button.icon::before { margin-right: 8px; color: inherit; }   /* the old Font Awesome icons stay in the buttons (John, 24 Nov) */
body:has(#maintable) #main :is(a.button, button:not(.toastui-editor-defaultUI button):not(.svid button)).icon { padding-left: 20px; padding-right: 20px; }
/* the email form page (support/submit): its title row is the From: line, not a page name, so body size */
body:has(#maintable .sre-reply) #maintable > tbody > tr:first-child > td > table:first-child h3 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: 0; }
/* support pages built from a fragment (support/decentscale and the like): their menu (a table.white of
   .button.special links, as decent_menu_item makes on /support/) gets the /support/ menu buttons: rust,
   white words, 16 px bold, the touch height, with their icons */
.markdown table.white a.button.special { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); height: auto; margin: 4px 0; padding: 10px 20px;
	border: var(--border) solid var(--accent) !important; border-radius: var(--radius); background: var(--accent) !important; color: var(--surface) !important; box-shadow: none;
	font: var(--fw-bold) var(--fs-base)/var(--lh-tight) var(--font) !important; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap; }
.markdown table.white a.button.special:hover { background: var(--accent-deep) !important; border-color: var(--accent-deep) !important; color: var(--surface) !important; }
.markdown table.white a.button.special.icon::before { margin-right: 8px; color: inherit; }
/* the footer on the white support pages: white too, a hairline above it, and the dark footer's colours
   swapped for the light ones (its rules read --dark, --on-dark and --on-dark-muted) */
body:has(#maintable) .bn-footer { --dark: var(--surface); --on-dark: var(--text); --on-dark-muted: var(--muted); border-top: var(--rule) solid var(--line); }
body:has(#maintable) .bn-footer #newsletter input { color: var(--text); border-color: var(--btn-line); }
body:has(#maintable) .bn-footer .columns > .box:first-child img { filter: brightness(0); opacity: .3; }   /* the white logo, made dark grey */
body:has(#maintable) .bn-footer a { border-bottom: 0 !important; }   /* no dotted underline from the old template */
/* orders: "stop shipment" (pale pink with white words, set inline in lib/sales.tcl) is a warning button:
   white, with the error red for its words and edge (6.0:1 on white) */
body:has(#maintable) #main button#stop { background: var(--surface) !important; border-color: var(--error) !important; color: var(--error) !important; }
body:has(#maintable) #main button#stop:hover { background: color-mix(in srgb, var(--error) 8%, var(--surface)) !important; color: var(--error) !important; }
/* a form's save button sits just under its last field (orders: the address and the notes): no stray line breaks
   (after each address field, before the button) and no row padding between the notes and their button */
body:has(#maintable) #main .row > div > :is(input, select, .select-wrapper) + br:last-child,
body:has(#maintable) #main br:has(+ .submitbtn) { display: none; }
body:has(#maintable) #maintable td table tr:has(+ tr > td > .submitbtn) > td { padding-bottom: 0; }
/* ...and half the gap above them (John, 24 Nov): the form ends just above its button, so its 32 px bottom margin shrinks */
body:has(#maintable) #main form:has(input[name$=city]) { margin-bottom: 10px; }
body:has(#maintable) #main form:has(textarea[name=customer_notes]) { margin-bottom: 12px; }
body:has(#maintable) #maintable td table tr:has(> td > .submitbtn) > td { padding-top: 0; }
/* machine_logs: log lines close together */
body:has(#maintable) #maintable table.data :is(td, th) { padding-top: 2px !important; padding-bottom: 2px !important; }
/* machine_logs (#emc-main) sets its own 97% width: back to the content column, as the other support pages */
body:has(#maintable) #main:has(#emc-main) > .container { width: min(var(--wrap), calc(100% - 2 * var(--gutter))) !important; }
body:has(#maintable) #main:has(#emc-main) #content { padding-left: 0 !important; padding-right: 0 !important; }
/* appointment: each question (a label straight in the form or a step) starts 32 px below the answer above it */
body:has(#maintable) #main form > label:not(:first-child), body:has(#maintable) #main form .step > label:not(:first-child) { margin-top: 32px; }
body:has(#maintable) #main form > .step > label:first-child { margin-top: 32px; }
/* appointment: a day button shows its date with its times on a second line, and the chosen day or time is dark */
body:has(#maintable) #main .appt .tzbox { max-width: 520px; }   /* as wide as the field, so the arrow sits inside it */
body:has(#maintable) #main .appt .tzbox #tz_q { padding-right: 40px; }
body:has(#maintable) #main .appt .days button { flex-direction: column; align-items: flex-start; white-space: normal; }
body:has(#maintable) #main .appt :is(.days, .times) button.on, body:has(#maintable) #main .appt :is(.days, .times) button.on:is(:hover, :focus) { background: var(--text) !important; border-color: var(--text) !important; color: var(--surface) !important; }   /* hover too: the button hover rule would turn the words dark */
body:has(#maintable) #main .appt :is(.days, .times) button.on :is(b, strong, span) { color: inherit !important; }   /* the date (bold, which support pages paint dark) follows the white */
/* tables of rows (orders, payments, carts): readable */
body:has(#maintable) #maintable td table:not(:first-child) :is(td, th) { padding: 8px 12px 8px 0; border-bottom: 0; vertical-align: top; }
/* fewer lines (John, 24 Nov): no hairline under every row and no minor <hr>s */
body:has(#maintable) #maintable hr.minor { display: none; }
body:has(#maintable) #maintable tr { border: 0; }   /* the old template draws a line under every table row (machine_logs' log lines) */
/* carts and orders (they hold a #myTable): no section rules at all; the section headings carry the breaks */
body:has(#maintable #myTable) #maintable hr { display: none; }
body:has(#maintable) #maintable .no-print > hr:first-child:has(+ b) { display: block !important; }   /* ...except the line above checkout's "Your notes about this purchase:" (John, 24 Nov) */
/* ...but the line under a page's title row stays (John, 24 Nov) */
body:has(#maintable) #maintable > tbody > tr:first-child > td > table:first-child + hr { display: block !important; }
/* support/decentscale (a fragment page with a menu): the same line under its title row */
.markdown .mdheadrow:has(~ table.white a.button.special) { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: var(--rule) solid var(--line); }
.markdown .mdheadbtns a.button:is([href="/support"], [href="/support/"])::before { content: "\f015"; font-family: FontAwesome; font-weight: 400; margin-right: 8px; }   /* a fragment page's Home button gets the home icon, as the other support pages' */
.markdown .mdheadrow:has(~ table.white a.button.special) h1 { margin: 0; font-size: var(--fs-title); line-height: 1.08; letter-spacing: var(--tracking-head); }
.markdown .mdheadrow:has(~ table.white a.button.special) .mdheadbtns { position: static !important; }   /* markdown.css places it absolutely, off the title's line */
/* support home: room above the help video, under the title's line */
body:has(#maintable) #main .svid { margin-top: 24px; }   /* the title's own 48/14 px margins would push it off the Home button's line */
/* payments: each payment's empty detail table (with its 32 px margin) and the blank row after it take no room */
body:has(#maintable) #maintable td table tr:has(> td:only-child > table:empty),
body:has(#maintable) #maintable td table tr:has(> td:only-child > table:empty) + tr:has(> td:only-child) { display: none; }
body:has(#maintable) #maintable #myTable { border-top: var(--rule) solid var(--line); border-bottom: var(--rule) solid var(--line); margin: 16px 0; }   /* the invoice (cart lines and total) between two lines, none inside it (John, 24 Nov) */
/* the old template's own arrow on .select-wrapper floats beside the narrower select: the select draws its own */
body:has(#maintable) #main .select-wrapper::before, body:has(#maintable) #main .select-wrapper::after { display: none; }
/* ...but a menu (a table.white of .button.special links: /support/'s menu) is laid out as on support/decentscale:
   button and words, tight rows, no hairlines */
body:has(#maintable) #maintable table.white:has(a.button.special) :is(td, th) { padding: .15em !important; border-bottom: 0; }
@media (max-width: 760px) {
  body:has(#maintable) #main.wrapper { padding-top: 32px; }
  body:has(#maintable) #main :is(a.button, button:not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit]) { white-space: normal; }
}
/* phones: the admin templates' style-admin-mobile.css (!important, max-width 736px) stacks every
   button full width in small type and pads every cell and the container; undo that here */
@media screen and (max-width: 736px) {
  body:has(#maintable) #main.wrapper { padding: 32px 0 var(--pad) !important; }
  body:has(#maintable) #main > .container { padding: 0 !important; margin: 0 auto !important; }
  body:has(#maintable) #maintable :is(td, th) { padding: 0 !important; }
  body:has(#maintable) #maintable td table:not(:first-child) :is(td, th) { padding: 8px 10px 8px 0 !important; }
  body:has(#maintable) #main :is(a.button, button:not(.toastui-editor-defaultUI button):not(.svid button), input[type=submit], input[type=button], input[type=reset]) { display: inline-flex !important; width: auto !important; height: auto !important; padding: 10px 18px !important; margin: 4px 6px 4px 0 !important; font-size: var(--fs-base) !important; }
  body:has(#maintable) #main :is(input, select, textarea) { font-size: var(--fs-base) !important; }
}
/* article extras: a single video fills the reading column (not the half-width cap of a band);
   a # heading inside a post (the manual's chapters) is a size under the post's title */
.ns-article .markdown .columns:has(> .ytbox:only-child) > .ytbox { flex-basis: 100%; max-width: 100%; }
.ns-article .markdown h1 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: var(--tracking-head); margin: 1.6em 0 .5em; }
/* a long document's contents panel (the manual's .md-toc, its own inline style): the design's
   sand and hairline, links as plain text */
.ns-article .markdown .md-toc a { color: var(--text); text-decoration: none; }
.ns-article .markdown .md-toc a:hover { color: var(--accent) !important; }
html.md-book .ns-article .markdown .md-toc { background: var(--alt); border-right-color: var(--line); font-family: var(--font); }
/* ```step cards and ```tip/note/warning callouts (markdown.css) in the design's colours:
   sand boxes with 10px corners, no icons; a warning has the error red down its side */
.ns-article .markdown .step { background: var(--alt); border: 0; border-radius: var(--radius-img); }
.ns-article .markdown .step-num { background: var(--text); color: var(--surface); font-weight: var(--fw-bold); }
.ns-article .markdown .step-fig figcaption { color: var(--muted); }
.ns-article .markdown .callout { background: var(--alt); border-left: 3px solid var(--muted); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 0 0 1.4em; }
.ns-article .markdown .callout::before { content: none; }
.ns-article .markdown .callout-warning { border-left-color: var(--error); }
.ns-article .markdown .callout-tip { border-left-color: var(--new); }
.ns-article .markdown .md-toc :is(p, li) a:not(.button):not(.markdownbox):not(.imghref):not(.youtube):not(.bilibili) { color: var(--text); text-decoration: none; }
/* support: code as in the articles; a short page still puts the footer at the window's bottom */
body:has(#maintable) #main code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--alt); color: var(--text); padding: .12em .36em; border: 0; border-radius: 4px; }
body:has(#maintable) :has(> #main.wrapper) { display: flex; flex-direction: column; min-height: 100vh; } /* body, or skel's #skel-layers-parent around the page */
body:has(#maintable) #main.wrapper { flex: 1 0 auto; }
/* ...and on phones, style-admin-mobile.css also stretches the footer's subscribe button */
@media screen and (max-width: 736px) {
  body:has(#maintable) .bn-footer #newsletter .button { display: inline-flex !important; width: auto !important; height: auto !important; min-height: var(--btn-h); margin: 0 !important; padding: 0 18px !important; font-size: var(--fs-base) !important; }
  body:has(#maintable) .bn-footer #newsletter input { width: auto !important; }
}

/* ==================================================================================
   Blog and docs, after Ben's r190 package (lib/blogdocs.tcl): the lists, a post or doc
   with its side column, and the book layout for pages with a [toc]() line.
   ================================================================================== */

/* the page starts with its sand head band, straight under the header */
.markdown > .bd-page:first-child { margin-top: 0; }

/* the head band: sand from edge to edge (as the +++ bands), breadcrumbs, title, a line of intro */
.bd-head { --band: var(--alt); background: var(--band); border-image: linear-gradient(var(--band) 0 0) fill 0 / / 0 100vmax; padding: calc(var(--space) * 9) 0 calc(var(--space) * 5); }
.bd-crumbs { margin: 0 0 calc(var(--space) * 2); font-size: var(--fs-xs); color: var(--muted); }
.bd-crumbs a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: var(--underline-offset); }
.bd-crumbs a:hover { color: var(--accent); }
.markdown .bd-head h1 { margin: 0; font-size: var(--fs-title); line-height: 1.08; letter-spacing: var(--tracking-head); }
.markdown .bd-head .bd-intro { max-width: var(--measure); margin: calc(var(--space) * 2) 0 0; font-size: var(--fs-lg); color: var(--muted); }
.markdown .bd-head .bd-date { margin: calc(var(--space) * 1.5) 0 0; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); }

/* ---- the lists: the controls (Year or Group, Sort, Search) ---- */
.bd-list { padding: calc(var(--space) * 5) 0 var(--pad); }
.bd-controls { display: flex; flex-wrap: wrap; align-items: end; gap: calc(var(--space) * 2); margin: 0 0 calc(var(--space) * 3); }
.bd-field { display: flex; flex-direction: column; gap: var(--space); min-width: 0; margin: 0; font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text); }
.bd-field.bd-query { flex: 1; min-width: min(100%, calc(var(--col) * 1.5)); }
.markdown .bd-field :is(select, input) { box-sizing: border-box; width: 100%; height: auto; min-height: var(--tap); margin: 0; padding: var(--space) calc(var(--space) * 2); border: var(--border) solid var(--btn-line); border-radius: var(--radius); background-color: var(--surface); color: var(--text); font: 400 var(--fs-base)/var(--lh-tight) var(--font); box-shadow: none; }
.markdown .bd-field select { padding-right: calc(var(--space) * 5); appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e1e1c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right calc(var(--space) * 2) center; }
.markdown .bd-field :is(select, input):focus { border-color: var(--text); outline: none; }
.markdown .bd-field :is(select, input):focus-visible { outline: calc(var(--rule) * 2) solid var(--accent); outline-offset: var(--rule); }
.markdown p.bd-count { margin: 0 0 var(--space); font-size: var(--fs-xs); color: var(--muted); }

/* ---- the cards: two columns of rows, the text beside the picture; a hairline above each ---- */
.markdown ol.bd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(var(--space) * 4); margin: 0; padding: 0; list-style: none; }
.markdown ol.bd-cards > li.bd-card { margin: 0; padding: 0; border-top: var(--rule) solid var(--line); list-style: none; }
.markdown ol.bd-cards > li.bd-card::before { content: none; }
.bd-card > a { display: grid; grid-template-columns: minmax(0, 1fr) var(--thumb); column-gap: calc(var(--space) * 3.5); align-items: start; height: 100%; padding: calc(var(--space) * 3) 0; color: var(--text); text-decoration: none; }
.bd-card > a:not(:has(.bd-pic)) { grid-template-columns: minmax(0, 1fr); }
.bd-card-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; height: 100%; }
.bd-card .bd-date { margin: 0 0 calc(var(--space) / 2); font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--accent); }
.bd-card .bd-title { margin: 0 0 var(--space); font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--text); text-wrap: balance; }
.bd-card .bd-sum { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: var(--fs-base); line-height: var(--lh); color: var(--muted); }
.bd-card .bd-pic img { display: block; width: var(--thumb); height: calc(var(--thumb) * .75); max-width: none; margin: 0; object-fit: cover; border-radius: var(--radius); background: var(--alt); }
.bd-card > a:hover .bd-title { color: var(--accent); }
/* "Read": the design's outline button, at the foot of the card */
.markdown .bd-read { display: inline-flex; text-transform: none; letter-spacing: 0; align-items: center; margin-top: auto; min-height: var(--tap); padding: var(--space) calc(var(--space) * 2.5); border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: var(--lh-tight); transition: background-color .15s; }
.bd-card .bd-sum + .bd-read { margin-top: calc(var(--space) * 2); }
.bd-card-text > .bd-read { align-self: flex-start; }
.bd-card > a:hover .bd-read { background: var(--hover-bg); }
.markdown .bd-read.special { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.bd-card > a:hover .bd-read.special { border-color: var(--accent-deep); background: var(--accent-deep); }

/* the newest post as the feature: the whole row, a large picture on the left */
.markdown ol.bd-cards > li.bd-feature { grid-column: 1 / -1; border-top: 0; }
.bd-feature > a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: calc(var(--space) * 9); align-items: center; padding: 0 0 calc(var(--space) * 5); }
.bd-feature .bd-card-text { order: 2; height: auto; }
.bd-feature .bd-pic { order: 1; }
.bd-feature .bd-pic img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-img); }
.bd-feature .bd-title { margin-bottom: calc(var(--space) * 1.5); font-size: var(--fs-2xl); }
.bd-feature .bd-sum { -webkit-line-clamp: 4; line-clamp: 4; font-size: var(--fs-lg); }

/* Previous / Page 2 of 44 / Next */
.bd-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space); margin-top: var(--space); padding-top: calc(var(--space) * 3); border-top: var(--rule) solid var(--line); }
.bd-pager > span:not(.button) { font-weight: var(--fw-semibold); color: var(--text); }
.markdown .bd-pager .button { margin: 0; }
.markdown .bd-pager span.button { display: inline-flex; align-items: center; min-height: var(--tap); padding: 10px 20px; border: var(--border) solid var(--line); border-radius: var(--radius); color: var(--muted); font-weight: var(--fw-semibold); }
/* while the next page loads (app.js) */
.bd-results { transition: opacity .15s; }
.bd-list.is-loading .bd-results { opacity: .5; }

@media (max-width: 860px) {
  .markdown ol.bd-cards { grid-template-columns: minmax(0, 1fr); }
  .bd-feature > a { grid-template-columns: minmax(0, 1fr); row-gap: calc(var(--space) * 3); }
}
@media (max-width: 640px) {
  .bd-head { padding: calc(var(--space) * 5) 0 calc(var(--space) * 4); }
  .bd-field:not(.bd-query) { flex: 1; }
  .bd-field.bd-query { flex-basis: 100%; }
  .bd-card > a { grid-template-columns: minmax(0, 1fr) calc(var(--thumb) / 2); column-gap: calc(var(--space) * 2); padding: calc(var(--space) * 2) 0; }
  .bd-card .bd-pic img { width: calc(var(--thumb) / 2); height: calc(var(--thumb) * .375); }
  .bd-card .bd-title { font-size: var(--fs-lg); }
  .bd-card:not(.bd-feature) .bd-read { display: none; }
  .bd-feature > a { grid-template-columns: minmax(0, 1fr); }
  .bd-feature .bd-pic img { width: 100%; height: auto; }
  .bd-feature .bd-title { font-size: var(--fs-xl); }
}

/* ---- a post or doc: over 1100 px the text centred in the space left of a 300 px side column ---- */
.bd-cols { display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--col) * 1.25); align-items: start; padding: calc(var(--space) * 6) 0 var(--pad); }
.bd-cols > .ns-article { width: 100%; max-width: min(var(--measure), calc(100% - var(--gap-lg) * 2)); margin: 0; justify-self: center; }
.bd-side { min-width: 0; top: calc(var(--header) + var(--space) * 3); }
.bd-side.bd-fits { position: sticky; }
.markdown .bd-side h2 { margin: 0 0 var(--space); font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: var(--lh); letter-spacing: 0; color: var(--muted); }
/* the related cards: one column, a small picture, the title as the link */
.markdown .bd-side ol.bd-cards { grid-template-columns: minmax(0, 1fr); }
.bd-side .bd-card > a { grid-template-columns: minmax(0, 1fr) calc(var(--thumb) / 2); column-gap: calc(var(--space) * 2); padding: calc(var(--space) * 2) 0; }
.bd-side .bd-card .bd-pic img { width: calc(var(--thumb) / 2); height: calc(var(--thumb) * .375); }
.bd-side .bd-card .bd-date { font-size: var(--fs-xs); }
.bd-side .bd-card .bd-title { margin: 0; font-size: var(--fs-lg); }
.bd-side .bd-card :is(.bd-sum, .bd-read) { display: none; }
/* newer / older (previous / next doc): one under the other */
.bd-pn { display: flex; flex-direction: column; border-top: var(--rule) solid var(--line); }
.bd-pn a, .bd-chnav a:not(.bd-chtop) { display: flex; flex-direction: column; gap: calc(var(--space) / 2); padding: calc(var(--space) * 2) 0; color: var(--text); text-decoration: none; }
.bd-pn a + a { border-top: var(--rule) solid var(--line); }
.bd-pn-k { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); }
.bd-pn-t { font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.bd-pn-d { font-size: var(--fs-xs); color: var(--muted); }
.bd-pn a:hover .bd-pn-t, .bd-chnav a:hover .bd-pn-t { color: var(--accent); }
/* a doc's contents: closed under one "Contents" line above the text */
.markdown .bd-toc { margin: 0 0 calc(var(--space) * 4); padding: 0 calc(var(--space) * 2); border: var(--rule) solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bd-toc summary { display: flex; justify-content: space-between; align-items: center; min-height: calc(var(--space) * 6); font-weight: var(--fw-bold); color: var(--text); cursor: pointer; list-style: none; }
.bd-toc summary::-webkit-details-marker { display: none; }
.bd-toc summary::after { content: "+"; color: var(--accent); font-size: var(--fs-xl); font-weight: 400; }
.bd-toc[open] summary::after { content: "\00d7"; }
.markdown .bd-toc ol { margin: 0 0 calc(var(--space) * 2); padding: 0; list-style: none; }
.markdown .bd-toc li { margin: 0; padding: 0; font-size: var(--fs-base); }
.markdown .bd-toc li::before { content: none; }
.markdown .bd-toc li.bd-toc-l2 { padding-left: calc(var(--space) * 2); }
.markdown .bd-toc li.bd-toc-l3 { padding-left: calc(var(--space) * 4); }
.markdown .bd-toc a { display: flex; align-items: center; min-height: var(--tap); color: var(--text); text-decoration: none; }
.markdown .bd-toc a:hover { color: var(--accent); }
.markdown .bd-foot { margin: calc(var(--space) * 6) 0 0; padding-top: calc(var(--space) * 3); border-top: var(--rule) solid var(--line); }
@media (max-width: 1100px) {
  .bd-cols { grid-template-columns: minmax(0, 1fr); row-gap: calc(var(--space) * 6); }
  .bd-cols > .ns-article { max-width: var(--measure); }
  .bd-side { width: 100%; max-width: var(--measure); justify-self: center; padding-top: calc(var(--space) * 4); border-top: var(--rule) solid var(--line); }
  .bd-side.bd-fits { position: static; }
}
@media (max-width: 760px) { .bd-cols { padding-top: calc(var(--space) * 4); } }

/* ---- a book (a page with [toc]()): the cover on sand, the contents rail on the left ---- */
.bd-cover-in { display: grid; grid-template-columns: minmax(0, calc(var(--col) * 1.5)) minmax(0, 1fr); column-gap: var(--gap-lg); align-items: center; }
.bd-cover-in:not(:has(.bd-cover-pic)) { grid-template-columns: minmax(0, 1fr); }
.bd-cover-pic img { display: block; width: 100%; height: auto; margin: 0; border-radius: var(--radius-img); }
.markdown .bd-credits { max-width: var(--measure); margin-top: calc(var(--space) * 2); }
.markdown .bd-credits :is(p, li) { color: var(--muted); }
.bd-book { display: grid; grid-template-columns: calc(var(--col) * 1.15) minmax(0, 1fr); column-gap: var(--gap-lg); align-items: start; padding: calc(var(--space) * 6) 0 var(--pad); }
.bd-book > .bd-book-text { width: 100%; max-width: var(--measure); margin: 0; }
.bd-rail { position: sticky; top: calc(var(--header) + var(--space) * 3); max-height: calc(100vh - var(--header) - var(--space) * 6); overflow-y: auto; overscroll-behavior: contain; padding-right: var(--space); font-size: var(--fs-xs); }
.markdown p.bd-rail-head { margin: 0 0 var(--space); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); }
.markdown .bd-rail ol { margin: 0; padding: 0; list-style: none; }
.markdown .bd-rail li { margin: 0; padding: 0; font-size: var(--fs-xs); line-height: var(--lh-tight); color: var(--text); }
.markdown .bd-rail li::before { content: none; }
.bd-rail-ch { position: relative; border-top: var(--rule) solid var(--line); }
.markdown .bd-rail a { display: flex; align-items: center; min-height: calc(var(--space) * 5); padding: calc(var(--space) / 2) 0; color: var(--text); text-decoration: none; }
.markdown .bd-rail-ch > a { padding-right: calc(var(--space) * 5); font-weight: var(--fw-semibold); }
.markdown .bd-rail-ch > ol { display: none; padding: 0 0 var(--space) calc(var(--space) * 1.5); }
.markdown .bd-rail-ch.is-open > ol { display: block; }
.markdown .bd-rail a:hover { color: var(--accent); }
.markdown .bd-rail a.is-cur { color: var(--accent); box-shadow: inset calc(var(--rule) * 2) 0 var(--accent); padding-left: var(--space); }
.bd-rail-tg { position: absolute; top: 0; right: 0; width: calc(var(--space) * 5); height: calc(var(--space) * 5); padding: 0; border: 0; background: none; color: var(--accent); font: 400 var(--fs-xl)/1 var(--font); cursor: pointer; }
.bd-rail-tg::after { content: "+"; }
.bd-rail-tg[aria-expanded="true"]::after { content: "\2212"; }
.markdown a.bd-rail-back { margin-top: var(--space); border-top: var(--rule) solid var(--line); font-weight: var(--fw-semibold); }
.bd-chnum { color: var(--accent); }
/* the end of a chapter: previous / next, and back to the top */
.markdown .bd-chnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 calc(var(--space) * 3); margin: calc(var(--space) * 6) 0; border-top: var(--rule) solid var(--line); border-bottom: var(--rule) solid var(--line); }
.bd-chnav a.bd-chnext { margin-left: auto; text-align: end; align-items: flex-end; }
.markdown .bd-chnav a.bd-chtop { flex-basis: 100%; display: flex; align-items: center; min-height: var(--tap); border-top: var(--rule) solid var(--line); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); text-decoration: none; }
.bd-chnav a.bd-chtop:hover { color: var(--accent); }
/* the chapters' headings stop under the header, not behind it */
.bd-book-text :is(h1, h2, h3, h4), .bd-book-text a[id] { scroll-margin-top: calc(var(--header) + var(--space) * 8); }
/* phones and tablets: a "Contents" bar under the header; a tap opens the contents as a panel */
.bd-railbar { display: none; }
@media (max-width: 980px) {
  .bd-cover-in { grid-template-columns: minmax(0, 1fr); row-gap: calc(var(--space) * 3); }
  .bd-cover-pic { max-width: var(--col); }
  .bd-book { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--space) * 3); }
  .bd-book > .bd-book-text { justify-self: center; }
  .bd-railbar { position: sticky; top: var(--header); z-index: 5; display: flex; align-items: center; gap: var(--space); width: 100%; min-height: calc(var(--space) * 6); margin: 0; padding: 0 var(--space); border: 0; border-bottom: var(--rule) solid var(--line); background: var(--page); color: var(--text); font: var(--fw-semibold) var(--fs-base)/var(--lh-tight) var(--font); text-align: start; cursor: pointer; }
  .bd-railbar::after { content: "+"; margin-left: auto; color: var(--accent); font-size: var(--fs-xl); font-weight: 400; }
  .bd-railbar[aria-expanded="true"]::after { content: "\00d7"; }
  .bd-railbar-cur { overflow: hidden; color: var(--muted); font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
  .bd-rail { display: none; position: fixed; z-index: 6; top: calc(var(--header) + var(--space) * 6); left: 0; right: 0; max-height: 70vh; padding: var(--space) var(--gutter) calc(var(--space) * 2); background: var(--page); box-shadow: var(--shadow); font-size: var(--fs-base); }
  .bd-page-book.rail-open .bd-rail { display: block; }
  .markdown .bd-rail li { font-size: var(--fs-base); }
  .markdown .bd-rail a { min-height: var(--tap); }
}

/* buttons with long words (and longer translations) wrap inside the button, in balanced
   lines, never wider than their column (John, 19 Nov: option A) */
.markdown :is(a.button, a.markdownbox) { max-width: 100%; white-space: normal; text-wrap: balance; text-align: start; }

/* ---- the blog list, laid out as the live /blog/ page (bd_blog_list_html): the title with
   Sort, RSS and Search on its right, then two cards a row in widths 8+4, 5+7 of 12 ---- */
.bd-blog .bd-list { padding-top: calc(var(--space) * 6); }
.bd-bhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: calc(var(--space) * 2); margin: 0 0 calc(var(--space) * 4); padding-bottom: calc(var(--space) * 3); border-bottom: var(--rule) solid var(--line); }
.markdown .bd-bhead h1 { margin: 0; font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: var(--tracking-head); }
.bd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space); }
.markdown .bd-tools .button { margin: 0; }
.bd-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bd-sort { margin: 0; }
.markdown .bd-bhead :is(select, input) { box-sizing: border-box; height: auto; min-height: var(--btn-h); margin: 0; padding: var(--space) calc(var(--space) * 2); border: var(--border) solid var(--btn-line); border-radius: var(--radius); background-color: var(--surface); color: var(--text); font: var(--fw-semibold) var(--fs-base)/var(--lh-tight) var(--font); box-shadow: none; }
.markdown .bd-bhead select { padding-right: calc(var(--space) * 5); appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e1e1c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right calc(var(--space) * 2) center; }
.markdown .bd-bhead :is(select, input):focus-visible { outline: calc(var(--rule) * 2) solid var(--accent); outline-offset: var(--rule); }
.bd-searchrow { flex: 1 0 100%; }
.bd-searchrow[hidden] { display: none; }
.markdown .bd-searchrow input { width: 100%; font-weight: 400; }
.markdown .bd-searchbtn[aria-expanded='true'] { background: var(--hover-bg); }

.markdown ol.bd-bgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: calc(var(--space) * 4); margin: 0; padding: 0; list-style: none; }
.markdown ol.bd-bgrid > li.bd-bcard { display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; border: var(--rule) solid var(--line); border-radius: var(--radius-img); background: var(--surface); list-style: none; }
.markdown ol.bd-bgrid > li.bd-bcard::before { content: none; }
.bd-w8 { grid-column: span 8; } .bd-w4 { grid-column: span 4; } .bd-w5 { grid-column: span 5; } .bd-w7 { grid-column: span 7; }
.bd-bpic { display: block; }
.markdown .bd-bpic img { display: block; width: 100%; height: auto; max-width: none; margin: 0; aspect-ratio: 16 / 9; object-fit: cover; background: var(--alt); border-radius: 0; }
.bd-btext { padding: calc(var(--space) * 3); }
.markdown .bd-btext .bd-bdate { float: right; margin: 0 0 var(--space) calc(var(--space) * 2); font-size: var(--fs-xs); color: var(--muted); }
.markdown .bd-btext h3 { margin: 0 0 var(--space); font-size: var(--fs-lg); line-height: var(--lh-tight); text-wrap: balance; }
.markdown .bd-btext h3 a { color: var(--text); text-decoration: none; }
.markdown .bd-btext h3 a:hover { color: var(--accent); }
.markdown .bd-btext p:not(.bd-bdate) { margin: 0; font-size: var(--fs-base); color: var(--muted); }
.markdown .bd-btext p a { color: var(--accent); }

@media (max-width: 980px) { .bd-w8, .bd-w4, .bd-w5, .bd-w7 { grid-column: span 6; } }
@media (max-width: 640px) {
  .bd-w8, .bd-w4, .bd-w5, .bd-w7 { grid-column: 1 / -1; }
  .bd-bhead { align-items: flex-start; }
}
/* Sort, RSS and Search: one height and one lettering (the Search <button> would otherwise get the form-button capitals) */
.markdown .bd-tools :is(.button, select) { box-sizing: border-box; height: var(--btn-h); min-height: 0; padding-top: 0; padding-bottom: 0; font-size: var(--fs-base); font-weight: var(--fw-semibold); letter-spacing: 0; text-transform: none; line-height: 1; }
.markdown .bd-tools .button { display: inline-flex; align-items: center; }
/* a short card ends where its text ends, as on the live page */
.markdown ol.bd-bgrid > li.bd-bcard { align-self: start; }
/* the next batch's link: the script loads it as the reader nears it (infinite scroll) */
.markdown p.bd-morebox { margin: calc(var(--space) * 5) 0 0; text-align: center; }
.markdown .bd-more[aria-busy='true'] { opacity: .5; pointer-events: none; }

/* a post's or doc's head band lines up with the text below it: the same two columns as
   .bd-cols (the text column centred, the side column's width beside it), and the same width */
/* --measure is in em: worked out once at the article text's size, so every line of the
   band (small crumbs, large title) gets the article's width */
@property --bd-measure { syntax: '<length>'; inherits: true; initial-value: 0px; }
.bd-head-post { display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--col) * 1.25); font-size: var(--fs-lg); --bd-measure: var(--measure); }
.bd-head-post > * { grid-column: 1; box-sizing: border-box; width: 100%; max-width: min(var(--bd-measure), calc(100% - var(--gap-lg) * 2)); justify-self: center; }
@media (max-width: 1100px) {
  .bd-head-post { grid-template-columns: minmax(0, 1fr); }
  .bd-head-post > * { max-width: var(--bd-measure); }
}

/* ---- a picture beside its text: ![alt](/img/... align=right) (or align=left). The picture
   sits at that side of its box at a third of the width, and the text flows around it.
   Boxes ( ``` blocks back to back) holding such pictures become cards, two to a row ---- */
.markdown p:has(> a.imghref:only-child > img[align=right]) { float: right; width: 33%; max-width: calc(var(--thumb) * .8); margin: 0 0 var(--space) calc(var(--space) * 2); }
.markdown p:has(> a.imghref:only-child > img[align=left]) { float: left; width: 33%; max-width: calc(var(--thumb) * .8); margin: 0 calc(var(--space) * 2) var(--space) 0; }
.markdown p > a.imghref:only-child > img[align] { display: block; float: none; width: 100%; height: auto; margin: 0; border-radius: var(--radius); }
.markdown :is(.box, .ns-article .markdown) :has(> a.imghref > img[align]) + p { margin-top: 0; }
.markdown .box:has(a.imghref > img[align]) { display: flow-root; }
.markdown .columns:has(> .box a.imghref > img[align]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: calc(var(--space) * 3); margin: 0 0 calc(var(--space) * 4); }
/* (the doubled classes outrank the plain-box reset above: .columns > .box:not(:has(...))) */
.markdown .columns.columns:has(> .box a.imghref > img[align]) > .box.box.box { max-width: none; flex: none; margin: 0; padding: calc(var(--space) * 3); border: var(--rule) solid var(--line); border-radius: var(--radius-img); background: var(--surface); text-align: left; }
.markdown .columns:has(> .box a.imghref > img[align]) > .box p:last-child { margin-bottom: 0; }
/* the contents rail still scrolls (and follows the reader), without a scroll bar */
.bd-rail { scrollbar-width: none; }
.bd-rail::-webkit-scrollbar { display: none; }
.markdown .columns:has(> .box a.imghref > img[align]) > .box:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* "Contents" with its + / - (open or close every chapter), in line with the chapters' own + / - */
.markdown p.bd-rail-head { min-height: calc(var(--space) * 5); }
/* the whole "Contents" row is the button: the word and the + / - both open or close every chapter */
.bd-rail-all { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: calc(var(--space) * 5); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bd-rail-all::after { content: "+"; flex: none; width: calc(var(--space) * 5); text-align: center; color: var(--accent); font: 400 var(--fs-xl)/1 var(--font); }
.bd-rail-all:hover > span { color: var(--accent); }
.bd-rail-all[aria-expanded="true"]::after { content: "\2212"; }
/* the side column's related page names: the body text size, a step under the article's
   own headings (they were --fs-lg) */
.bd-side .bd-card .bd-title { font-size: var(--fs-base); }
/* the icons before Related, Previous and Next (John's pick, 19 Nov: link, arrow-left / arrow-right) */
/* the icons hang in the margin to the left, so the words line up with the rest of the column */
.markdown .bd-side h2, .bd-pn-k { position: relative; display: block; }
.bd-side h2 > i, .bd-pn-k > i { position: absolute; top: 50%; right: calc(100% + var(--space)); width: 1em; transform: translateY(-50%); color: var(--accent); font-size: .95em; text-align: center; }
/* the blog and docs lists start right under the header: only a small gap above the title row */
.markdown:not(:has(> .markdown)) > .bd-page.bd-blog.bd-blog:first-child { margin-top: 0; } /* beats the 56px first-block margin */
.bd-blog .bd-list { padding-top: calc(var(--space) * 3); }

/* a book's cover: at the top of the text column, above the first chapter (no band of its own) */
.bd-bookhead { margin: 0 0 calc(var(--space) * 5); }
.bd-bookhead .bd-cover-pic { max-width: none; margin: 0 0 calc(var(--space) * 3); }
.markdown .bd-bookhead h1 { margin: 0; font-size: var(--fs-title); line-height: 1.08; letter-spacing: var(--tracking-head); text-wrap: balance; }
.markdown .bd-bookhead .bd-date { margin: calc(var(--space) * 1.5) 0 0; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); }
.bd-bookhead .bd-credits { margin-top: calc(var(--space) * 2); font-size: var(--fs-xs); color: var(--muted); }
.markdown .bd-page-book .bd-book { padding-top: calc(var(--space) * 3); }
.markdown:not(:has(> .markdown)) > .bd-page.bd-page-book.bd-page-book:first-child { margin-top: 0; } /* beats the 56px first-block margin */
@media (max-width: 760px) {
  /* no margin to hang them in on phones: the icons sit in line, before their words */
  .bd-side h2 > i, .bd-pn-k > i { position: static; transform: none; margin-right: var(--space); }
}
/* visited links keep the design's colours here (markdown.css paints every a:visited #3498db) */
.markdown :is(.bd-side, .bd-pn, .bd-bgrid, .bd-cards, .bd-chnav, .bd-rail, .bd-crumbs) a:visited { color: var(--text); }
.markdown .bd-crumbs a:visited { color: var(--muted); }
.markdown .bd-btext p a:visited { color: var(--accent); }

/* ---- boxes ( ``` blocks back to back) in a blog post or doc: outlined cards, two to a row,
   as on the live site. (The design's product-page .columns rules strip the outline and squeeze
   every box into one row, which in the article column made four narrow columns.) Video rows
   and ```cards keep their own layouts. ---- */
.markdown .ns-article .markdown .columns.columns:not(.cards):not(:has(> .ytbox)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: calc(var(--space) * 3); margin: 0 0 calc(var(--space) * 4); }
.markdown .ns-article .markdown .columns.columns:not(.cards):not(:has(> .ytbox)) > .box.box.box { display: flow-root; max-width: none; flex: none; margin: 0; padding: calc(var(--space) * 3); border: var(--rule) solid var(--line); border-radius: var(--radius-img); background: var(--surface); text-align: left; }
.markdown .ns-article .markdown .columns.columns:not(.cards):not(:has(> .ytbox)) > .box:last-child:nth-child(odd) { grid-column: 1 / -1; }
.markdown .ns-article .markdown .columns:not(.cards) > .box > :first-child { margin-top: 0; }
.markdown .ns-article .markdown .columns:not(.cards) > .box > :last-child { margin-bottom: 0; }
.markdown .ns-article .markdown .columns:not(.cards) > .box img { border-radius: var(--radius); }
/* a related post's date: under its title, small and grey, as under Previous / Next (.bd-pn-d) */
.bd-side .bd-card .bd-date { order: 2; margin: calc(var(--space) / 2) 0 0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); }
/* the post or doc title starts with the text but runs on to where the side column starts
   (half the space left over beside the centred text column, plus the text column) */
@media (min-width: 1101px) {
  .bd-head-post > h1 { justify-self: end; width: calc(50% + min(var(--bd-measure), 100% - var(--gap-lg) * 2) / 2); max-width: none; text-wrap: pretty; }
}
/* a post or doc page: the sand band starts right under the header, with half the old space
   (128px) above the breadcrumbs */
.markdown:not(:has(> .markdown)) > .bd-page.bd-page-post.bd-page-post:first-child { margin-top: 0; }
.bd-head.bd-head-post { padding-top: calc(var(--space) * 5); } /* the same as the space below (padding-bottom) */
/* Previous / Next with the page's picture on the right, the same size and place as on the related cards */
.bd-pn a { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: calc(var(--space) * 2); align-items: start; }
.bd-pn a:has(> .bd-pic) { grid-template-columns: minmax(0, 1fr) calc(var(--thumb) / 2); }
.bd-pn-text { display: flex; flex-direction: column; gap: calc(var(--space) / 2); min-width: 0; }
.bd-pn .bd-pic img { display: block; width: calc(var(--thumb) / 2); height: calc(var(--thumb) * .375); max-width: none; margin: 0; object-fit: cover; border-radius: var(--radius); background: var(--alt); }

/* ---- photo dots (Ben, 19 Nov; app.js adds them): at most 5 small dots, 10 px above the lower edge of a
   slide show with 2 or more photos. No fade: the dots take the colour that shows best on each photo. app.js
   reads the photo under the dot row and sets .dc-dots-on-light (dark dots: the current one --text, the others
   --text at 28 %) or .dc-dots-on-dark (white dots: --surface, the others at 60 %); dark before it decides.
   6 px dots, 12 px apart; an end dot is 4 px when there are more photos past it. Clicking a dot goes to its
   photo; a hidden live text says "Photo 3 of 10". */
:is(.markdown, article.box.post) .dc-carousel { --dc-on: var(--text); --dc-off: color-mix(in srgb, var(--text) 28%, transparent); }
:is(.markdown, article.box.post) .dc-carousel.dc-dots-on-dark { --dc-on: var(--surface); --dc-off: color-mix(in srgb, var(--surface) 60%, transparent); }
:is(.markdown, article.box.post) .dc-dots { --dc-dot: 6px; --dc-small: 4px; --dc-pitch: 12px;
	position: absolute; left: 50%; z-index: 2; width: calc(var(--dc-pitch) * var(--dc-slots, 5)); height: var(--dc-dot);
	transform: translateX(-50%); box-sizing: content-box; overflow: clip; padding: 11px 0; bottom: -1px; cursor: pointer; }   /* 28 px high click area, the dots still 10 px above the edge */
:is(.markdown, article.box.post) .dc-dots-track { position: absolute; inset: 0 auto 0 0; display: flex; transition: transform .25s ease; }
:is(.markdown, article.box.post) .dc-dot { display: grid; place-items: center; flex: 0 0 var(--dc-pitch); width: var(--dc-pitch); height: 100%; }
:is(.markdown, article.box.post) .dc-dot:not([data-current]):hover::before { background: var(--dc-on); }
:is(.markdown, article.box.post) .dc-dot::before { content: ""; width: var(--dc-dot); height: var(--dc-dot); border-radius: 50%;
	background: var(--dc-off); transition: background-color .15s, width .25s ease, height .25s ease; }
:is(.markdown, article.box.post) .dc-dot[data-size="small"]::before { width: var(--dc-small); height: var(--dc-small); }
:is(.markdown, article.box.post) .dc-dot[data-current]::before { background: var(--dc-on); }
:is(.markdown, article.box.post) .dc-slide-img:not([src]) { visibility: hidden; }   /* the second layer before it has a photo: no alt text in the frame */
:is(.markdown, article.box.post) .dc-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:is(.markdown, article.box.post) .dc-carousel[tabindex]:focus { outline: none; }
:is(.markdown, article.box.post) .dc-carousel[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:is(.markdown, article.box.post) .dc-carousel:focus-visible .dc-arrow { opacity: 1; }
@media (prefers-reduced-motion: reduce) { :is(.markdown, article.box.post) .dc-dots-track, :is(.markdown, article.box.post) .dc-dot::before { transition: none; } }
@media print { :is(.markdown, article.box.post) .dc-dots { display: none; } }


/* ---- ```row: pictures side by side, all the same width, in one line (markdown.tcl writes a .columns
   of .smallbox, one per picture, with empty paragraphs between them) ---- */
.markdown .columns:has(> .smallbox) { display: flex; gap: 12px; align-items: flex-start; margin: 1em 0; }
.markdown .columns:has(> .smallbox) > p:empty { display: none; }
.markdown .columns > .smallbox { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.markdown .smallbox img.rowitem { display: block; width: 100%; height: auto; margin: 0; border-radius: var(--radius-img); }

/* ---- the older product choice cards (customize_de1 and other [salepage] pages: an article.box.post with a photo
   and radio buttons, sale_page_do in lib/pages.tcl), styled like the v2 product cards (.salecard): a white card
   with a hairline frame, the photo on top, the chosen product as its name, the other choices as a list. The
   cards of a row line up in an even grid, all as tall as the tallest (John, 26 Nov) ---- */
.row:has(> * > article.box.post > input[type="radio"]) { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin: 24px 0 !important; }
.row:has(> * > article.box.post > input[type="radio"]) > * { width: auto !important; float: none !important; padding: 0 !important; margin: 0 !important; }
article.box.post:has(> input[type="radio"]) { display: flex; flex-direction: column; height: 100%; margin: 0 !important; padding: 16px 20px 20px !important;
	border: var(--rule) solid var(--line) !important; border-radius: var(--radius-img) !important; background: var(--surface) !important; box-shadow: none !important; font: 400 var(--fs-xs)/1.4 var(--font); color: var(--text); }
article.box.post:has(> input[type="radio"]) > div:first-child :is(a.image, img) { display: block; width: 100% !important; max-width: 100%; margin: 0 !important; }
/* the photo area: 2px from the card's frame at the top and sides, the product photos' shape (1486:960) in
   every card (a photo or a slide show), so the names line up */
article.box.post:has(> input[type="radio"]) > div:first-child { margin: -14px -18px 12px; overflow: hidden; border-radius: calc(var(--radius-img) - 2px); }
article.box.post:has(> input[type="radio"]) > div:first-child img { aspect-ratio: 1486 / 960; height: auto; object-fit: cover; border-radius: calc(var(--radius-img) - 2px); margin: 0 !important; }
/* the chosen product (the first choice) reads as the card's name */
article.box.post:has(> input[type="radio"]) > input[type="radio"]:first-of-type + label { font-size: var(--fs-lg) !important; font-weight: var(--fw-semibold); line-height: 1.3; margin: 4px 0 10px; }
article.box.post:has(> input[type="radio"]) label { display: block; position: relative; margin: 0 !important; padding: 5px 0 5px 38px !important; line-height: 1.35; color: var(--text); cursor: pointer; }
article.box.post:has(> input[type="radio"]) label font { color: var(--muted); }
article.box.post:has(> input[type="radio"]) label b, article.box.post:has(> input[type="radio"]) label strong { color: var(--muted); font-weight: var(--fw-medium); }
article.box.post:has(> input[type="radio"]) br { display: none; }
/* (the old grid's clearfix would take the first cell) */
.row:has(> * > article.box.post > input[type="radio"])::before, .row:has(> * > article.box.post > input[type="radio"])::after { display: none !important; }

/* ---- the photos page (/photos/<sku>, morephotos_direct_tailwind in lib/direct.tcl): the product's name as the
   page title, a v2 "Go back" button, the photos in a grid with the design's corners, the licence line small
   underneath (John, 26 Nov) ---- */
body:has(.masonry-grid) #three { padding: 0 !important; background: var(--page) !important; }
body:has(.masonry-grid) #three .container { max-width: var(--maxw, 1200px); margin: 0 auto; padding: 40px var(--gutter, 24px) 56px !important; font: 400 var(--fs-base)/var(--lh) var(--font); color: var(--text); }
body:has(.masonry-grid) #three h3 { margin: 0 0 28px; font: var(--fw-bold) var(--fs-h2)/1.1 var(--font); letter-spacing: var(--tracking-head); color: var(--text); text-transform: none; text-align: left; }
body:has(.masonry-grid) .masonry-grid { column-gap: 24px; }
body:has(.masonry-grid) .masonry-item { margin-bottom: 24px; }
body:has(.masonry-grid) .masonry-item img { display: block; width: 100%; height: auto; border-radius: var(--radius-img); }
body:has(.masonry-grid) #three .container > a:last-child { display: block; margin-top: 8px; color: var(--muted); font-size: var(--fs-xs); text-align: left; border: 0 !important; text-decoration: underline; text-decoration-color: var(--line); }   /* (the old CSS draws links with a dotted bottom border) */
body:has(.masonry-grid) header.major > br { display: none; }
/* with the drop-down in place (decent_v2.js), the radio buttons and their labels are not shown */
article.box.post.v2-choices > input[type="radio"], article.box.post.v2-choices > input[type="radio"] + label,
article.box.post.v2-choices xhr input[type="radio"], article.box.post.v2-choices xhr label { display: none !important; }
article.box.post.v2-choices .salecard-name { margin: 4px 0 12px; font: var(--fw-semibold) var(--fs-lg)/1.3 var(--font); color: var(--text); }
article.box.post.v2-choices .v2-choice { display: flex; flex-direction: column; flex: 1; }
article.box.post.v2-choices .buybox-list { position: relative; margin-top: auto; }
article.box.post.v2-choices select[hidden] { display: none !important; }   /* (the old CSS shows every select) */

/* ---- the older pages' buttons (customize_de1's Cart, the photos page's Go back, info, tamping...: a.button outside
   the v2 content, the menu and the footer) look like the v2 buttons; the support pages keep their own. (:is(#v2, body)
   weighs as an id, so it beats the old pages' #banner / #one button rules; no element has that id) ---- */
:is(#v2, body):not(:has(#maintable)) a.button:not(.markdown a, .bn-header a, .bn-footer a) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: auto; min-height: var(--tap); padding: 8px 18px;
	border: var(--border) solid var(--btn-line) !important; border-radius: var(--radius) !important; background: var(--surface) !important; color: var(--text) !important; box-shadow: none !important;
	font: var(--fw-medium) var(--fs-base)/1.2 var(--font) !important; text-transform: none !important; letter-spacing: 0 !important; text-shadow: none !important; }
:is(#v2, body):not(:has(#maintable)) a.button:not(.markdown a, .bn-header a, .bn-footer a):hover { background: var(--hover-bg) !important; }
:is(#v2, body):not(:has(#maintable)) a.button:not(.markdown a, .bn-header a, .bn-footer a)::before { margin: 0 !important; font-size: .95em; }

/* ---- the "All tags" page (/blog/hashtags_<lang>, write_hashtag_pages_for_language in lib/staticsite.tcl): the
   heading in the v2 type, every tag as a small pill (John, 26 Nov) ---- */
body:has(.bd-taglist) #one { padding: 0 !important; background: var(--page) !important; }
body:has(.bd-taglist) #one .container { max-width: var(--maxw, 1200px); margin: 0 auto; padding: 40px var(--gutter, 24px) 56px !important; }
body:has(.bd-taglist) #one h3 { margin: 0 0 24px; font: var(--fw-bold) var(--fs-h2)/1.1 var(--font); letter-spacing: var(--tracking-head); color: var(--text); text-transform: none; }
.bd-taglist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bd-taglist li { margin: 0; padding: 0; }
.bd-taglist li::before { content: none !important; }
.bd-taglist a { display: inline-block; padding: 6px 12px; border: var(--border) solid var(--btn-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: var(--fw-medium) var(--fs-xs)/1.2 var(--font); text-decoration: none; }
.bd-taglist a:hover { background: var(--hover-bg); }

/* the menu's cart: a very small photo of each product, left of its name (cartmenu_submenu_html, js/shopping.js) */
.bn-header #cartmenu .cartmenu-name { display: flex; align-items: center; gap: 10px; }
.bn-header #cartmenu .cartmenu-thumb { flex: none; width: 28px; height: 28px; object-fit: contain; margin: 0; border-radius: 4px; background: var(--surface); }

/* the product cards' photo, 2px from the card's frame at the top and sides (John, 26 Nov) */
.markdown .salecard .salecard-photos { margin: -14px -18px 0; }
.markdown .salecard .salecard-photo img, .markdown .salecard .salecard-photo .dc-carousel { border-radius: calc(var(--radius-img) - 2px); }
/* (a card's lone photo is an img.image.fit, which the old CSS gives a 32px top margin) */
.markdown .salecard .salecard-photo img.image { margin: 0 !important; }
/* the total line shows just the amount (and the empty-cart x) at the right; "Total:" stays for screen readers (John, 26 Nov) */
.bn-header #cartmenu .cartmenu-total > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bn-header #cartmenu .cartmenu-total .cartmenu-amount { margin-left: auto; }
/* a + or - the item can't have (a customization) keeps its place, unseen, so the quantities line up */
.bn-header #cartmenu .cartmenu-off { visibility: hidden; pointer-events: none; }

/* ---- a small page of its own (decent_v2_page in lib/pages.tcl: the password reset, the Diaspora e-mail
   unsubscribe pages): the title and a few lines, centred in a narrow column, the button the design's own ---- */
.markdown.v2-simple { max-width: 560px; margin: 0 auto; padding: 64px 0 80px; text-align: center; }
.markdown.v2-simple h1 { margin: 0 0 20px; }
.markdown.v2-simple button.button { min-height: var(--tap); padding: 10px 22px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--surface); font: var(--fw-semibold) var(--fs-base)/1.2 var(--font); cursor: pointer; }
.markdown.v2-simple button.button:hover { background: var(--accent-deep); }
