/* The formalization reader (docs/ARTICLES.md, "UI"): the /articles pages and the
   summary box on the old article pages. Built only from style.css's tokens (--paper, --surface,
   --ink, --muted, --line, --line-strong, --accent, --serif and the --c-* status
   trio), so dark mode follows [data-theme] and prefers-color-scheme exactly as
   the article pages do. Status is never colour alone: every status has an icon
   and a word in the markup, and its own stroke here (solid, dashed, dotted,
   double, groove grey); the coverage bar adds fill patterns, and the status
   chips carry a swatch of each fill as its legend. */

[data-status="formalized"]     { --st: var(--c-formalized);     --st-ink: var(--c-formalized-ink);     --st-bg: var(--c-formalized-bg);     --st-line: solid; }
[data-status="statement_only"] { --st: var(--c-partial);        --st-ink: var(--c-partial-ink);        --st-bg: var(--c-partial-bg);        --st-line: dashed; }
[data-status="partial"]        { --st: var(--c-partial);        --st-ink: var(--c-partial-ink);        --st-bg: var(--c-partial-bg);        --st-line: dotted; }
[data-status="not_formalized"] { --st: var(--c-not_formalized); --st-ink: var(--c-not_formalized-ink); --st-bg: var(--c-not_formalized-bg); --st-line: double; }
[data-status="unresolved"]     { --st: var(--c-untouched);      --st-ink: var(--muted);                --st-bg: transparent;                --st-line: groove; }

.articles-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- page frame ---- */
.wl-articles { max-width: 1000px; margin: 0 auto; padding: 20px 28px 48px; color: var(--ink); line-height: 1.55; font-size: 15px; box-sizing: border-box; }
.wl-articles a, .articles-foot a { color: var(--accent); text-underline-offset: 2px; }
.wl-articles a:hover { text-decoration-thickness: 2px; }
.articles-crumbs { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.articles-h1 { font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; margin: 4px 0 6px; overflow-wrap: anywhere; }
.articles-h2 { font-family: var(--serif); font-size: 1.15rem; margin: 28px 0 8px; }
.articles-lead { color: var(--muted); max-width: 70ch; margin: 0 0 8px; }
.articles-meta { color: var(--muted); font-size: 13px; margin: 2px 0; }
.articles-muted { color: var(--muted); }
.articles-data { margin: 24px 0 0; font-size: 12px; color: var(--muted); }
.articles-data code, .articles-meta code { font-size: 11px; overflow-wrap: anywhere; }
.articles-message p { max-width: 70ch; }
.articles-foot { max-width: 1000px; margin: 8px auto 40px; padding: 12px 28px 0; box-sizing: border-box; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; line-height: 1.5; }
.articles-foot p { margin: 4px 0; }
.articles-foot a { text-decoration: underline; }
/* The data's audit status: one quiet line under the header of every articles page, never a
   banner and never on a card. It keeps its words; it does not keep the page's attention. */
.articles-notice { margin: 0; padding: 5px 28px; border-bottom: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: left; }

/* ---- the head of an article page: counts, legend-filter, folds ---- */
/* One line of counts under the title, then the legend that is also the filter. Nothing
   else: every other figure is in the "About this page" fold under them. */
.articles-counts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin: 2px 0 8px; font-size: 15px; }
.articles-counts b { font-weight: 700; }
.articles-dot { margin: 0 8px; color: var(--c-untouched); }
.articles-key { margin: 0 0 2px; }
.articles-key .articles-chip { font-size: 12.5px; }
/* The filters that are not the legend, folded away. */
.articles-filters { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.articles-filters > summary { cursor: pointer; width: max-content; max-width: 100%; }
.articles-filters > summary:hover { color: var(--accent); }
.articles-filters .articles-strip-row { margin: 6px 0 0; }
/* One "About this page" fold holds the pinned revision, the libraries searched, what an
   audit measured, the runs and how the text is shown — closed, so the article opens first. */
.articles-page-about { margin: 6px 0 14px; }
.articles-page-about > summary { font-size: 13px; }
.articles-about-body { margin: 6px 0 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.articles-about-sec + .articles-about-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.articles-about-h { font-family: var(--serif); font-size: .95rem; color: var(--ink); margin: 0 0 4px; }
.articles-about-body p { margin: 4px 0; }
.articles-about-body .articles-strip-row { margin: 6px 0 0; }
.articles-about-body .articles-prov-list { margin: 2px 0 0; }
/* What the colours mean: the legend's long form, a sample beside each word. */
.articles-meanings { list-style: none; margin: 2px 0 0; padding: 0; }
.articles-meanings li { margin: 4px 0; }
.articles-sample { padding: 0 3px; color: var(--ink); font-family: var(--serif); background: var(--st-bg); border-bottom: 1.5px var(--st-line) var(--st); }
.articles-sample[data-status="partial"] { border-bottom-width: 2px; }
.articles-sample[data-status="not_formalized"] { border-bottom-width: 3px; }

/* ---- the figures themselves: the bar, the chips and the rows that hold them ---- */
.articles-strip-lead { margin: 0 0 6px; font-size: 14px; }
.articles-strip-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0 0; }
.articles-strip-h { flex: 0 0 64px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.articles-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.articles-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; box-sizing: border-box; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; }
.articles-chip[data-status] { border: 1.5px var(--st-line) var(--st); }
.articles-chip[data-status="not_formalized"] { border-width: 3px; }
.articles-chip:hover { border-color: var(--accent); }
.articles-chip[aria-pressed="true"] { background: var(--st-bg, var(--line)); outline: 2px solid var(--accent); outline-offset: 1px; font-weight: 600; }
.articles-chip.is-static, .articles-chip.is-static[data-status] { cursor: default; border-color: transparent; background: transparent; padding-left: 2px; }
.articles-chip.is-zero { opacity: .7; }
.articles-chip.is-static:hover { border-color: transparent; }
.articles-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.articles-ico { display: inline-block; min-width: 1em; text-align: center; font-weight: 700; color: var(--st-ink, inherit); }
.articles-filter-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); min-height: 1em; }
.articles-clear { font: inherit; font-size: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent); border-radius: 6px; padding: 1px 8px; cursor: pointer; }

.articles-bar { display: flex; height: 12px; margin: 6px 0 4px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.articles-seg { display: block; height: 100%; box-shadow: inset -2px 0 0 var(--surface); }
.articles-seg:last-child { box-shadow: none; }
/* The swatch is the bar's legend: the same fill, inside each status chip. */
.articles-swatch { display: inline-block; width: 14px; height: 10px; flex: 0 0 14px; border: 1px solid var(--line-strong); border-radius: 2px; box-sizing: border-box; }
.articles-seg[data-status="formalized"], .articles-swatch[data-status="formalized"] { background: var(--c-formalized); }
.articles-seg[data-status="statement_only"], .articles-swatch[data-status="statement_only"] { background: repeating-linear-gradient(135deg, var(--c-partial) 0 3px, transparent 3px 6px); }
.articles-seg[data-status="partial"], .articles-swatch[data-status="partial"] { background: radial-gradient(circle, var(--c-partial) 1.4px, transparent 1.8px) 0 0 / 5px 5px; }
.articles-seg[data-status="not_formalized"], .articles-swatch[data-status="not_formalized"] { background: repeating-linear-gradient(45deg, var(--c-not_formalized) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, var(--c-not_formalized) 0 2px, transparent 2px 5px); }
/* Undecided is a visible grey vertical hatch, never an empty-looking track. */
.articles-seg[data-status="unresolved"], .articles-swatch[data-status="unresolved"] { background: repeating-linear-gradient(90deg, var(--c-untouched) 0 1.5px, transparent 1.5px 4px); }
.articles-seg[data-status="unresolved"] { box-shadow: inset 0 0 0 1px var(--c-untouched); }

/* ---- passages ---- */
.articles-passages { list-style: none; margin: 0; padding: 0; }
.articles-passage { margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 5px var(--st-line) var(--st); border-radius: 8px; scroll-margin-top: 64px; }
.articles-p-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.articles-p-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font: inherit; }
.articles-why { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
/* Decision D1: the hasPart locations a survived coverage claim names, listed under its line. */
.articles-coverage-parts { margin: 2px 0 0; padding: 0 0 0 22px; list-style: decimal; font-size: 13px; color: var(--muted); }
.articles-coverage-parts li { margin: 2px 0 0; overflow-wrap: anywhere; }
.articles-coverage-parts .articles-decl { font-size: 13px; }
.articles-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.articles-section { font-size: 12px; color: var(--muted); }
.articles-section::before { content: "§ "; }
/* The article's subject passages (prominence "subject"): a tag in the heading, an
   accent frame around the block, and a "Subject" row in the coverage strip linking them. */
.articles-passage.is-subject { box-shadow: 0 0 0 1px var(--accent); }
.articles-subject { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 8px; line-height: 1.6; }
.articles-subject-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; font-size: 13px; }
.articles-subject-list li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.articles-subject-list a { overflow-wrap: anywhere; }
.articles-subject-list .articles-pill { margin-left: 0; }
.articles-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border: 1.5px var(--st-line) var(--st); border-radius: 999px; background: var(--st-bg); color: var(--st-ink); font-size: 12px; font-weight: 700; }
.articles-pill[data-status="not_formalized"] { border-width: 3px; }
.articles-quote { margin: 8px 0 4px; padding: 0 0 0 12px; border-left: 3px solid var(--line-strong); font-family: var(--serif); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.articles-quote mark { background: var(--st-bg); color: inherit; padding: 0 2px; border-radius: 2px; }
.articles-affix { color: var(--muted); }
/* A formula in a quote, rendered once from its TeX (wiki/src/articles-math.ts): serif
   letters, italic variables, small scripts that keep the line height, stacked
   fractions and a radical with its bar. The TeX is the span's title. */
.articles-math { font-family: var(--serif); white-space: normal; }
.articles-math sub, .articles-math sup { font-size: .72em; line-height: 0; }
.articles-math .m-text { font-style: normal; }
.articles-math .m-sf { font-family: system-ui, sans-serif; }
.articles-math .m-tt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.articles-math .m-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .8em; line-height: 1.15; margin: 0 .1em; }
.articles-math .m-num { border-bottom: 1px solid currentColor; padding: 0 .15em; }
.articles-math .m-frac.is-binom .m-num { border-bottom: 0; }
.articles-math .m-den { padding: 0 .15em; }
.articles-math .m-rad { border-top: 1px solid currentColor; padding: 0 .1em; margin-left: .05em; }
.articles-math .m-root { margin-right: -.3em; }
.articles-math .m-over { border-top: 1px solid currentColor; }
.articles-math .m-under { border-bottom: 1px solid currentColor; }
.articles-math .m-cancel { text-decoration: line-through; }
/* An accent drawn over its body at a size that reads at 1x (data-mark; the combining
   mark itself is in the text, visually hidden). */
.articles-math .m-acc { position: relative; display: inline-block; }
.articles-math .m-acc::after { content: attr(data-mark); position: absolute; left: 0; right: 0; top: -.16em; text-align: center; font-style: normal; font-weight: 700; font-size: 1em; line-height: 1; pointer-events: none; }
.articles-math .m-acc.is-it::after { left: .2em; }
.articles-math .m-acc.is-arrow::after { top: -.62em; font-size: .7em; font-weight: 400; }
/* Matrices, cases and aligned rows (articles-math envHtml): an inline table of rows and
   columns between delimiters that stretch over the rows. */
.articles-math .m-env { display: inline-flex; align-items: stretch; vertical-align: middle; max-width: 100%; margin: .05em .1em; padding: .2em 0; overflow-x: auto; overflow-y: hidden; }
.articles-math-display:focus-visible, .articles-math .m-env:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.articles-math .m-env.is-small { font-size: .8em; }
.articles-math .m-table { display: inline-table; border-collapse: collapse; min-width: 0; }
.articles-math .m-row { display: table-row; }
.articles-math .m-cell { display: table-cell; padding: .08em 0; vertical-align: baseline; text-align: center; overflow-wrap: normal; line-height: 1.35; white-space: nowrap; }
.articles-math .m-cell .m-text { white-space: normal; }
.articles-math .m-cell + .m-cell { padding-left: .9em; }
.articles-math .m-cell[data-a="l"] { text-align: left; }
.articles-math .m-cell[data-a="r"] { text-align: right; }
.articles-math .m-env[data-layout="cases"] .m-cell + .m-cell { padding-left: 1.4em; }
.articles-math .m-env[data-layout="align"] .m-cell + .m-cell { padding-left: 1.6em; }
.articles-math .m-env[data-layout="align"] .m-cell.is-tight { padding-left: .28em; }
.articles-math .m-delim { flex: none; display: flex; align-items: center; justify-content: center; position: relative; }
.articles-math .m-delim[data-d="paren"] { width: .4em; }
.articles-math .m-delim[data-d="paren"][data-side="l"] { border-left: .09em solid currentColor; border-radius: .45em 0 0 .45em / 50% 0 0 50%; margin-right: .12em; }
.articles-math .m-delim[data-d="paren"][data-side="r"] { border-right: .09em solid currentColor; border-radius: 0 .45em .45em 0 / 0 50% 50% 0; margin-left: .12em; }
.articles-math .m-delim[data-d="brack"] { width: .25em; border: .08em solid currentColor; }
.articles-math .m-delim[data-d="brack"][data-side="l"] { border-right: 0; margin-right: .2em; }
.articles-math .m-delim[data-d="brack"][data-side="r"] { border-left: 0; margin-left: .2em; }
.articles-math .m-delim[data-d="vert"] { width: 0; border-left: .08em solid currentColor; margin: 0 .25em; }
.articles-math .m-delim[data-d="dvert"] { width: 0; border-left: 3px double currentColor; margin: 0 .25em; }
.articles-math .m-delim[data-d="brace"] { width: .55em; }
.articles-math .m-dglyph { display: inline-block; line-height: 1; transform: scaleY(calc(var(--m-rows, 1) * 1.45)); font-weight: 300; }
/* A base with both a sub- and a superscript stacks them, as TeX does (∑ from i = 0 to n − 1). */
.articles-math .m-ss { display: inline-flex; flex-direction: column; vertical-align: -.45em; font-size: .72em; line-height: 1.05; margin-left: .05em; }
.articles-math .m-ss.is-limits { align-items: center; }
.articles-math .m-ss > span { display: block; }
/* A display formula breaks after a relation, never inside a term unless one term is
   wider than the line. */
.articles-math-display .m-chunk { display: inline-block; max-width: 100%; }
/* A highlighted passage highlights its display formulas and tables too (an inline mark
   paints only the line boxes it holds). */
.articles-quote mark .articles-math-display { background: var(--st-bg); border-radius: 2px; }
/* An inline table taller than its line: the highlight over the passage's own surface,
   opaque, so the mark's band across its middle row does not show through twice. */
.articles-quote mark > .articles-math > .m-env { background: linear-gradient(var(--st-bg), var(--st-bg)), var(--surface); border-radius: 2px; }
.articles-context { margin: 2px 0 0; font-size: 12px; }
/* A passage in full (build_store --passage-text): the revision's own words, a display
   formula on a line of its own, citation markers small and quiet. */
.articles-text { color: var(--ink); }
.articles-math-display { display: block; margin: 6px 0; text-align: center; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.articles-ref { font-size: .68em; line-height: 0; color: var(--muted); font-family: system-ui, -apple-system, sans-serif; }
/* Inside a highlighted passage a citation marker takes the passage's ink, for contrast on the highlight. */
.articles-quote mark .articles-ref { color: inherit; }

/* The declaration's Lean header (build_store --signatures), under its name: monospace,
   flowed at the card's width with a four-column continuation indent (Mathlib's), each
   binder and each hypothesis kept on one line unless it alone is wider than the card. */
.articles-sig { margin: 4px 0; padding: 6px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word; tab-size: 4; }
.articles-sig code { display: block; font: inherit; color: inherit; background: none; padding: 0 0 0 4ch; text-indent: -4ch; }
.articles-sig-u { display: inline-block; max-width: 100%; text-indent: 0; vertical-align: top; }
.articles-nowrap { white-space: nowrap; }
.articles-sig-full { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.articles-sig-full > summary { cursor: pointer; width: max-content; max-width: 100%; }
.articles-deprecated { margin: 2px 0 4px; font-size: 12px; color: var(--c-partial-ink); overflow-wrap: anywhere; }
.articles-deprecated .articles-decl { font-size: 12px; }

.articles-cards { display: grid; gap: 10px; margin: 10px 0 0; }
.articles-card { padding: 9px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.articles-cards.is-related .articles-card { border-style: dashed; }
/* Under the Lean code: library, commit, relation, proof status, source link. */
.articles-card-top { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 6px 0 0; font-size: 12px; }
.articles-lib { padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); background: var(--surface); }
.articles-commit { font-size: 11px; color: var(--muted); }
/* The relation: a badge beside the declaration, its stroke by strength (solid for
   exact and close, dashed for more general, special case and part, dotted grey
   for related), and the same badges in the legend under the Passages heading. */
.articles-rel { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); font: 700 12px/1.55 system-ui, -apple-system, sans-serif; white-space: nowrap; vertical-align: 1px; }
.articles-rel[data-relation="broadMatch"], .articles-rel[data-relation="narrowMatch"], .articles-rel[data-relation="hasPart"] { border-style: dashed; }
.articles-rel[data-relation="relatedMatch"] { border-style: dotted; border-color: var(--line-strong); color: var(--muted); }
.articles-legend-rel { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.articles-legend-rel > summary { cursor: pointer; width: max-content; max-width: 100%; }
.articles-legend-rel > summary:hover { color: var(--accent); }
.articles-legend-rel ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); }
.articles-legend-rel .articles-rel { margin: 0 4px 0 0; }
.articles-ps { font-size: 11px; color: var(--muted); }
/* An unfinished proof is the statement-only amber with its dashed stroke, not
   the not-formalized red: the declaration exists, its proof does not. */
.articles-ps.is-alert { padding: 0 6px; border: 1.5px dashed var(--c-partial); border-radius: 4px; background: var(--c-partial-bg); color: var(--c-partial-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.articles-src { margin-left: auto; }
.articles-src.is-none { color: var(--muted); }
.articles-decl-line { margin: 6px 0 2px; overflow-wrap: anywhere; }
.articles-card > .articles-decl-line:first-child { margin-top: 0; }
.articles-decl { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--ink); }
.articles-ns { color: var(--muted); }
.articles-decl b { font-weight: 700; }
.articles-module { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.articles-note { margin: 6px 0 0; font-size: 13px; }
.articles-k { font-weight: 700; }
.articles-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
/* Provenance, closed by default (the display rule): a quiet fold under the card. */
.articles-prov, .articles-about { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.articles-prov > summary, .articles-about > summary { cursor: pointer; width: max-content; max-width: 100%; color: var(--muted); }
.articles-prov > summary:hover, .articles-about > summary:hover { color: var(--accent); }
.articles-prov-list { margin: 4px 0 0; padding-left: 18px; line-height: 1.45; }
.articles-prov-list code { font-size: 11px; overflow-wrap: anywhere; }
.articles-about { margin: 4px 0 10px; }
.articles-conjuncts { margin: 2px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.articles-fb { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.articles-fb-btn { min-height: 28px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.articles-fb-btn:hover { border-color: var(--accent); color: var(--accent); }
.articles-fb-btn[aria-pressed="true"] { border: 2px solid var(--accent); color: var(--accent); font-weight: 700; }
.articles-fb-btn:disabled { opacity: .6; cursor: progress; }
.articles-fb-msg { color: var(--muted); }
.articles-fb-form { display: grid; gap: 6px; width: 100%; margin: 6px 0 0; }
.articles-fb-form textarea { width: 100%; box-sizing: border-box; min-height: 56px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.articles-fb-form .articles-fb-actions { display: flex; gap: 6px; }
.articles-fb-signin { font-size: 12px; }
.articles-fb-help { font-size: 12px; max-width: 75ch; }

.articles-absence { margin: 10px 0 0; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.articles-absence { border: 3px double var(--c-not_formalized); }
.articles-absence > .articles-ico { color: var(--c-not_formalized-ink); margin-right: 4px; }
.articles-absence .articles-muted { display: block; margin-top: 2px; font-size: 12px; }
.articles-related-h { margin: 12px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.articles-libtag { display: inline-block; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ---- tables and search (dashboard, universe) ---- */
.articles-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.articles-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; }
.articles-table th, .articles-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.articles-table thead th { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* The articles list: one row per article — its name, a bar of its statuses, how many
   passages it has and how many libraries hold a match. Four columns, not eleven. */
.articles-list th, .articles-list td { padding: 7px 8px; vertical-align: middle; }
.articles-list thead th.num { white-space: normal; min-width: 4em; }
.articles-list .articles-cov { width: 34%; min-width: 120px; }
.articles-list .articles-cov .articles-bar { margin: 0; }
.articles-list .articles-libtag { margin: 0 0 2px; }
/* A sortable column head: plain text without the script, a button with it
   (articles.js wraps the head's words), and an arrow for the column in force. */
.articles-sort { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
.articles-sort:hover { color: var(--accent); }
.articles-sort .articles-sort-mark { visibility: hidden; font-size: 10px; }
[aria-sort] .articles-sort .articles-sort-mark { visibility: visible; }
[aria-sort] .articles-sort { color: var(--ink); }
.articles-table tbody th { font-weight: 600; }
.articles-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.articles-table code { font-size: 11.5px; overflow-wrap: anywhere; }
.articles-table code.articles-sha { white-space: nowrap; overflow-wrap: normal; }
.articles-search { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 0 0 6px; }
.articles-search label { font-size: 13px; font-weight: 600; }
.articles-search input { flex: 1 1 220px; max-width: 420px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.articles-search button { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.articles-count { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.articles-excluded { padding-left: 1.2em; }

/* ---- the summary box on article pages ---- */
.wl-articles-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; max-width: 1000px; margin: 0 auto; padding: 9px 28px; box-sizing: border-box; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; line-height: 1.5; }
.wl-articles-box-h { font-family: var(--serif); font-weight: 700; }
.wl-articles-box-counts { color: var(--muted); }
.wl-articles-box-rev { white-space: nowrap; }
.articles-mini { white-space: nowrap; color: var(--st-ink); font-weight: 600; }
.articles-mini + .articles-mini { margin-left: 8px; }
.articles-mini .articles-ico { min-width: 0; margin-right: 2px; }
.wl-articles-box-link { margin-left: auto; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 720px) {
  .wl-articles { padding: 16px 16px 40px; font-size: 14px; }
  .articles-foot { padding: 12px 16px 0; }
  .articles-notice { padding: 6px 16px; text-align: left; }
  .wl-articles-box { padding: 8px 16px; }
  .wl-articles-box-link { margin-left: 0; }
  .articles-passage { padding: 10px 12px; }
  .articles-pill { margin-left: 0; }
  .articles-src { margin-left: 0; flex-basis: 100%; }
  .articles-strip-h { flex-basis: 100%; }
  .articles-search input { font-size: 16px; max-width: none; }
  .articles-fb-form textarea { font-size: 16px; }
  .articles-sig { font-size: 11.5px; padding: 5px 7px; line-height: 1.45; }
  .articles-sig code { padding-left: 2ch; text-indent: -2ch; }
  /* An environment of many columns (alignedat) is wider than a phone: its rows stay
     stacked, each row's cells flowing as a line. */
  .articles-math .m-env[data-wide] .m-table, .articles-math .m-env[data-wide] .m-row { display: block; }
  .articles-math .m-env[data-wide] .m-cell { display: inline; white-space: normal; padding: 0; }
  .articles-math .m-env[data-wide] .m-cell + .m-cell:not(.is-tight) { padding-left: .5em; }
  /* The phone header wraps to about 106px. */
  .articles-passage { scroll-margin-top: 120px; }
  /* A wide table scrolls sideways inside its region; the row label stays put. */
  .articles-table tbody th, .articles-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
}

@media (prefers-contrast: more) {
  .articles-passage, .articles-card, .articles-chip, .articles-table { border-color: var(--ink); }
  .articles-muted, .articles-meta, .articles-ns, .articles-module, .articles-coverage-parts, .articles-prov, .articles-about,
  .articles-prov > summary, .articles-about > summary, .articles-ref, .articles-sig-full { color: var(--ink); }
  .articles-sig { border-color: var(--ink); }
}

/* ---- the community overlay (docs/ARTICLES.md, "Community tags") -------------
   Release R1's one new write: a passage can be tagged, a link changed, and a
   wrong link removed. A community card is visually distinct from a pipeline
   one — a left rule and a badge — because it carries the same authority and
   must not be mistaken for the sealed record. Status is never colour alone
   here either: the badge carries its word. */
.articles-overlay-switch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.articles-overlay-switch a { color: var(--accent); text-decoration: none; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; }
.articles-overlay-switch a[aria-current="page"] { background: var(--line); color: var(--ink); font-weight: 600; }
.articles-overlay-count { margin-left: auto; }

.articles-card.is-community { border-left: 3px solid var(--accent); }
.articles-card.is-removed { opacity: .72; }
.articles-card.is-removed .articles-decl-line { text-decoration: line-through; }
.articles-community { display: inline-block; padding: 0 6px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.articles-community.is-agent { border-color: var(--line-strong); color: var(--muted); }
.articles-overlay-line { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.articles-overlay-line.is-removed { color: var(--ink); }
.articles-overlay-line a { color: var(--accent); }

.articles-removed { margin-top: 10px; font-size: 13px; }
.articles-removed > summary { cursor: pointer; color: var(--muted); }

.articles-tag { margin-top: 12px; }
.articles-tag-signin { margin: 10px 0 0; font-size: 13px; }
.articles-tag-open { font: inherit; font-size: 13px; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--accent); cursor: pointer; }
.articles-tag-open:hover { border-color: var(--accent); }
.articles-tag-form, .articles-card-form { margin: 10px 0 0; }
.articles-tag-form fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.articles-tag-form legend { padding: 0 4px; font-weight: 700; font-size: 13px; }
.articles-tag-form label, .articles-card-form label { display: block; margin: 8px 0 2px; font-size: 12px; font-weight: 600; }
.articles-tag-form input, .articles-tag-form select, .articles-tag-form textarea,
.articles-card-form select, .articles-card-form textarea { font: inherit; font-size: 13px; width: min(100%, 460px); box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink); }
.articles-tag-decl-note { font-size: 11.5px; margin: 3px 0 0; }
.articles-tag-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.articles-tag-btn { font: inherit; font-size: 12px; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--accent); cursor: pointer; }
.articles-tag-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); font-weight: 600; }
.articles-tag-btn:disabled { opacity: .55; cursor: default; }
.articles-tag-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.articles-tag-msg { font-size: 12px; color: var(--muted); margin: 0; }

/* A community coverage bundle (issue #173): one group under the cards it is
   made of, not a card of its own — the parts are the cards above it. A
   withdrawn one, and one whose parts no longer state the passage together, are
   both greyed, and each says so in words beside the grey. */
.articles-bundle { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 8px; }
.articles-bundle .articles-overlay-line { margin: 0 0 2px; }
.articles-bundle .articles-tag-actions { margin-top: 8px; }
.articles-bundle[data-counts="false"], .articles-bundle.is-removed { border-left-color: var(--line-strong); opacity: .75; }
.articles-bundle.is-removed .articles-coverage-parts { text-decoration: line-through; }
.articles-bundle-new { margin: 10px 0 0; }
.articles-bundle-form { margin: 10px 0 0; }
.articles-bundle-form fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.articles-bundle-form legend { padding: 0 4px; font-weight: 700; font-size: 13px; }
.articles-bundle-form label { display: block; margin: 8px 0 2px; font-size: 12px; font-weight: 600; }
.articles-bundle-form select, .articles-bundle-form input[type="text"] { font: inherit; font-size: 13px; width: min(100%, 460px); box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink); }
.articles-bundle-parts { list-style: none; margin: 6px 0 0; padding: 0; }
.articles-bundle-parts li { margin: 0 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.articles-bundle-parts label[for^="bundlepart-"] { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.articles-bundle-parts input[type="checkbox"] { margin: 0; }

.articles-cc0 { margin: 14px 0 18px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); }
.articles-cc0 label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.articles-cc0 .cf-turnstile { margin: 10px 0 0; }

@media (max-width: 720px) {
  .articles-tag-form input, .articles-tag-form select, .articles-tag-form textarea,
  .articles-bundle-form input[type="text"], .articles-bundle-form select,
  .articles-card-form select, .articles-card-form textarea { font-size: 16px; }
  .articles-overlay-count { margin-left: 0; flex-basis: 100%; }
}

@media (prefers-contrast: more) {
  .articles-card.is-community, .articles-community, .articles-cc0, .articles-bundle { border-color: var(--ink); }
  .articles-overlay-line, .articles-tag-msg { color: var(--ink); }
  .articles-bundle[data-counts="false"], .articles-bundle.is-removed { opacity: 1; }
}
