/* Reading-page components added 2026-11 (top pages refresh): code window, interactive checklist, spec table, figure caption.
   Text stays real HTML so readers, search engines and AI agents read the same content. Gold only on the checked state. */

/* Code window: every <pre> in a post gets a window bar (three neutral dots) in the style of carbon.now.sh. */
.bp-prose pre { position: relative; padding-top: calc(var(--sp-5) + var(--sp-6)); font-family: var(--font-mono); line-height: 1.6; box-shadow: var(--shadow-hero); white-space: pre-wrap; }
.bp-prose pre::before { content: ""; position: absolute; top: var(--sp-4); left: var(--sp-5); width: 10px; height: 10px; border-radius: 50%; background: var(--gray-mid); box-shadow: 16px 0 0 var(--gray-mid), 32px 0 0 var(--gray-mid); }
.bp-copy { position: absolute; top: var(--sp-2); right: var(--sp-2); padding: var(--sp-1) var(--sp-3); border: 1px solid var(--gray-mid); border-radius: var(--r-chip); background: transparent; color: var(--line-soft); font: 600 13px/1.5 var(--font-body); cursor: pointer; }
.bp-copy:hover, .bp-copy:focus-visible { background: var(--gray-mid); color: var(--text-light); }

/* Interactive checklist: dark window, one row per item, click to tick. Progress counter in the bar. */
.bp-checklist { margin: var(--sp-7) 0; border-radius: var(--r-card); background: var(--dark); color: var(--line-soft); box-shadow: var(--shadow-hero); overflow: hidden; }
.bp-checklist__bar { position: relative; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); padding-left: calc(var(--sp-5) + 48px); border-bottom: 1px solid var(--gray-mid); font: 600 14px/1.5 var(--font-mono); color: var(--text-light); }
.bp-checklist__bar::before { content: ""; position: absolute; left: var(--sp-5); top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--gray-mid); box-shadow: 16px 0 0 var(--gray-mid), 32px 0 0 var(--gray-mid); }
.bp-checklist__count { margin-left: auto; color: var(--line); font-weight: 500; }
.bp-checklist .bp-copy { position: static; }
.bp-checklist__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.bp-prose .bp-checklist__group { margin: var(--sp-4) 0 var(--sp-2); font: 700 15px/1.5 var(--font-heading); color: var(--text-light); }
.bp-prose .bp-checklist__group:first-child { margin-top: 0; }
.bp-prose .bp-checklist ul { list-style: none; margin: 0; padding: 0; }
.bp-prose .bp-checklist li { position: relative; margin: 0; padding: var(--sp-2) 0 var(--sp-2) var(--sp-7); font: 400 15px/1.6 var(--font-body); color: var(--line-soft); cursor: pointer; border-radius: var(--r-chip); }
.bp-prose .bp-checklist li::before { content: ""; position: absolute; left: var(--sp-2); top: calc(var(--sp-2) + 3px); width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: var(--r-chip); }
.bp-prose .bp-checklist li[aria-checked="true"] { color: var(--line); text-decoration: line-through; }
.bp-prose .bp-checklist li[aria-checked="true"]::before { content: "✓"; background: var(--y); border-color: var(--y); color: var(--ink); font: 800 13px/18px var(--font-body); text-align: center; }
.bp-prose .bp-checklist li:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }

/* Block tables: drop the core black grid, keep hairlines; the figure carries the vertical rhythm, not the table. */
.bp-prose figure.wp-block-table { margin: var(--sp-6) 0; }
.bp-prose figure.wp-block-table table { margin: 0; }
.bp-prose .wp-block-table thead { border: 0; }
.bp-prose .wp-block-table :is(th, td) { border: 0; border-bottom: 1px solid var(--line-soft); }

/* Spec table: short summary grid (plans x tiers). Numbers in mono with tabular figures. */
.bp-prose table.bp-spec { display: table; border: 1px solid var(--line-soft); border-radius: var(--r-card); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.bp-prose table.bp-spec :is(th, td) { min-width: 0; width: 20%; }
.bp-prose table.bp-spec :is(th, td):first-child { width: 40%; }
.bp-prose table.bp-spec thead th { background: var(--dark); color: var(--text-light); font-weight: 700; }
.bp-prose table.bp-spec td:first-child { font-weight: 600; }
.bp-prose table.bp-spec td:not(:first-child) { font: 700 20px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.bp-prose table.bp-spec td small { display: block; font: 400 13px/1.5 var(--font-body); color: var(--gray); }
.bp-prose table.bp-spec tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .bp-prose table.bp-spec { display: block; } .bp-prose table.bp-spec td:not(:first-child) { font-size: 16px; } }

/* Figures: screenshot or diagram with a caption under it. */
.bp-prose figure.wp-block-image img { border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-body); }
.bp-prose figure.wp-block-image figcaption { margin-top: var(--sp-3); font: 400 14px/1.5 var(--font-body); color: var(--gray); text-align: left; }
.bp-prose details.bp-more { margin: var(--sp-5) 0; }
.bp-prose details.bp-more > summary { cursor: pointer; font-weight: 600; color: var(--ink); }

@media print { .bp-copy { display: none; } .bp-checklist { background: none; color: var(--ink); box-shadow: none; border: 1px solid var(--line); } }
