/* ============================================================
   SINGLE POST — "THE BRIEF, WIDE" (kind `wide`, #766)
   The template every post renders unless the editor picks another.
   The Brief's hero card across the full site container, then a
   two-row grid: the article beside a sticky "On this page" card,
   then the end matter beside Latest + Tools. Under 1040px: one
   column, sticky chapter chips. Ported from the V12 mockup
   (mockups/article-templates/_parts/v12.html) after two Council
   rounds; the reading system (one measure, one left edge, one
   spacing scale) is the #772 readability pass. Markup:
   template-parts/single/wide.php. Behaviour:
   assets/js/single-wide.js. Loads after single.css; every rule sits
   under .t-wide. Tokens only.
   ============================================================ */

/* ---------- tokens ---------- */
/* Columns. The grid is capped at cap + gap + side (--bw-max) and centred in
   the site container; its columns stay minmax(0,1fr) + side, so the article
   track shrinks first. Two right edges only: the text edge (--bw-measure,
   the default for every block) and the wide edge (the article track, for the
   whitelist under "the two edges"). The hero keeps the full container and
   pads its text in to the grid's left edge; the grid never comes closer to
   the container edge than that padding (--bw-fit), so kicker, headline and
   byline share the article's left edge at every width above 680px.
   Type. --bw-body is the body size, --bw-read the second reading size
   (callout text, takeaways, FAQ answers), --bw-lead the dek.
   Spacing. One scale, --bw-s1 … --bw-s6 = 8 · 12 · 20 · 24 · 32 · 44.
   --bw-stick: the site header, 64px + its 1px rule (the script measures it). */
.t-wide{--bw-stick:65px;
  --bw-cap:832px;--bw-gap:40px;--bw-side:320px;--bw-measure:40rem;
  --bw-max:calc(var(--bw-cap) + var(--bw-gap) + var(--bw-side));
  --bw-hpad:clamp(24px,3vw,40px);--bw-pad:max(var(--bw-hpad),calc((100% - var(--bw-max)) / 2));
  --bw-fit:min(var(--bw-max),calc(100% - 2 * var(--bw-hpad)));
  --bw-body:20px;--bw-read:18px;--bw-lead:23px;
  --bw-s1:8px;--bw-s2:12px;--bw-s3:20px;--bw-s4:24px;--bw-s5:32px;--bw-s6:44px}
@media(min-width:1441px){.t-wide{--bw-cap:848px}}
@media(min-width:1600px){.t-wide{--bw-cap:864px;--bw-gap:48px;--bw-side:336px;--bw-measure:42rem;
  --bw-body:21px;--bw-read:19px;--bw-lead:24px}}
@media(min-width:1920px){.t-wide{--bw-cap:896px;--bw-side:352px;--bw-measure:44rem;
  --bw-body:22px;--bw-read:20px;--bw-lead:25px}}
/* One column: the article alone, capped and centred. */
@media(max-width:1040px){.t-wide{--bw-cap:760px;--bw-max:var(--bw-cap)}}
/* Where the track would end within 96px of the text edge (a near miss, not
   a second edge) the cap is the measure itself: one right edge. The bands
   allow for --bw-fit, which keeps the grid --bw-hpad inside the hero. */
@media(min-width:681px) and (max-width:859px),(min-width:1041px) and (max-width:1259px){.t-wide{--bw-cap:var(--bw-measure)}}
/* Phones: full width, no measure, the shared body clamp, a tighter scale. */
@media(max-width:680px){.t-wide{--bw-max:100%;--bw-fit:100%;--bw-measure:none;--bw-pad:clamp(18px,3.2vw,48px);
  --bw-body:clamp(18px,.5vw + 17px,20px);--bw-read:17px;--bw-lead:21px;
  --bw-s4:20px;--bw-s5:24px;--bw-s6:36px}}

.t-wide.bw-art{padding-block:var(--bw-s4) clamp(44px,5.5vw,76px)}

/* ---------- hero card, full container ---------- */
/* No overflow clip: the card grows with a long headline. The scrim belongs to
   the text block, so white type sits on at least ~60% black. Its inline
   padding is --bw-pad: kicker, headline and byline start on the article's
   left edge wherever the grid is narrower than the card. */
.t-wide .bw-hero{--fade:clamp(56px,9vw,120px);position:relative;isolation:isolate;display:flex;align-items:flex-end;
  aspect-ratio:2/1;padding-top:clamp(40px,7vw,72px);border-radius:var(--r-lg);
  box-shadow:0 0 0 1px var(--border),var(--shadow);background:var(--invert-bg)}
.t-wide .bw-hero>img{position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:cover;object-position:50% 40%;border-radius:inherit}
.t-wide .bw-hero.no-img{aspect-ratio:auto;padding-top:0}
.t-wide .bw-hero .tx{width:100%;min-width:0;border-radius:inherit;
  padding:var(--fade) var(--bw-pad) clamp(18px,2.8vw,40px);
  background:linear-gradient(to bottom,transparent 0,color-mix(in srgb,black 28%,transparent) calc(var(--fade) * .5),
    color-mix(in srgb,black 62%,transparent) var(--fade),color-mix(in srgb,black 88%,transparent) 100%)}
.t-wide .bw-hero.no-img .tx{padding-top:clamp(28px,3.4vw,48px);background:none}
.t-wide .bw-hero .in{max-width:min(100%,58rem)}
.t-wide .bw-kick{display:inline-flex;align-items:center;min-height:26px;padding:0 12px;border-radius:var(--r-pill);
  background:var(--accent);color:var(--accent-ink);font-family:var(--font-mono);font-size:12px;font-weight:600;
  letter-spacing:.12em;text-transform:uppercase}
/* Hover keeps the --accent fill (the only fill that carries --accent-ink at
   4.5:1; --accent-bright gives 3.7:1) and answers with a ring instead. */
.t-wide a.bw-kick{text-decoration:none;transition:box-shadow .16s}
.t-wide a.bw-kick:hover{box-shadow:0 0 0 2px color-mix(in srgb,white 80%,transparent)}
.t-wide a.bw-kick:focus-visible{outline:2px solid white;outline-offset:2px}
.t-wide .bw-hero h1{font-family:var(--headline);font-weight:var(--headline-weight,500);color:white;
  font-size:clamp(26px,4.2vw,52px);line-height:1.06;letter-spacing:-.026em;margin-top:14px;
  text-wrap:balance;overflow-wrap:break-word;text-shadow:0 1px 2px color-mix(in srgb,black 45%,transparent)}
.t-wide .bw-hero h1[data-len="s"]{font-size:clamp(30px,5.2vw,62px);line-height:1.02}
.t-wide .bw-hero h1[data-len="l"]{font-size:clamp(24px,3.5vw,44px);line-height:1.08}
.t-wide .bw-hero h1[data-len="xl"]{font-size:clamp(22px,3.1vw,40px);line-height:1.1;letter-spacing:-.02em}
/* Byline on the card (dyi_byline() with dark). single.css draws one dot per
   item and the row clips its left edge, so a wrapped line never starts on a dot. */
.t-wide .bw-hero .art-byline{margin-top:14px;gap:2px 19px;clip-path:inset(-6px -6px -6px 0)}
.t-wide .bw-hero .art-byline.on-dark{color:color-mix(in srgb,var(--by-ink) 88%,transparent)}
.t-wide .bw-hero .art-byline .av{margin-right:-9px}
.t-wide .bw-hero .art-byline .by a{display:inline-block;padding-block:4px}
.t-wide .bw-hero .art-byline>:not(.av):not(.by)::before{margin-top:-1px;opacity:.6}
/* Wide screens: a letterbox with a height range, so the article starts above
   the fold on a laptop. On a short screen (1366×768) the floor is 320px, and
   the room above the text and the scrim's fade shrink so a two-line headline
   can reach it. A card with no photograph is sized by its text alone. */
@media(min-width:1041px){
  .t-wide .bw-hero{aspect-ratio:auto;min-height:clamp(360px,29vw,520px)}
  .t-wide .bw-hero.no-img{min-height:0}
}
@media(min-width:681px) and (max-height:800px){.t-wide .bw-hero{aspect-ratio:auto;min-height:320px}
  .t-wide .bw-hero.no-img{min-height:0}
  .t-wide .bw-hero:not(.no-img){--fade:72px;padding-top:var(--bw-s4)}
}
/* Big screens: the headline grows, so its box grows with it. */
@media(min-width:1600px){
  .t-wide .bw-hero .in{max-width:min(100%,66rem)}
  .t-wide .bw-hero h1{font-size:60px}
  .t-wide .bw-hero h1[data-len="s"]{font-size:70px}
  .t-wide .bw-hero h1[data-len="l"]{font-size:50px}
  .t-wide .bw-hero h1[data-len="xl"]{font-size:44px}
}
@media(max-width:680px){.t-wide .bw-hero{aspect-ratio:4/3}.t-wide .bw-hero.no-img{aspect-ratio:auto}}
/* The photograph's caption starts on the article's left edge. */
.t-wide .bw-cap{max-width:var(--bw-fit);margin:var(--bw-s1) auto 0;font-size:14px;line-height:20px;color:var(--text-muted)}

/* ---------- two rows, two columns ---------- */
/* Row 1: the article (through Sources) beside the sticky contents card, so the
   card stays pinned to the last line of reading. Row 2: tags, share, author
   and related beside Latest + Tools. */
.t-wide .bw-grid{display:grid;grid-template-columns:minmax(0,1fr) var(--bw-side);column-gap:var(--bw-gap);row-gap:0;
  grid-template-areas:"main nav" "endm more";max-width:var(--bw-fit);margin:var(--bw-s4) auto 0}
.t-wide .bw-main{grid-area:main;min-width:0}
.t-wide .bw-nav{grid-area:nav;min-width:0}
.t-wide .bw-endm{grid-area:endm;min-width:0}
.t-wide .bw-more{grid-area:more;min-width:0}
@media(max-width:1040px){.t-wide .bw-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "endm" "more"}}

/* ---------- the numbers (wide edge) ---------- */
/* Flex, not grid: the last row stretches, so 5 tiles read 3 + 2. --cols comes
   from the count and data-len from the longest value (printed by the part). */
.t-wide .bw-nums{--c:2;--g:10px;display:flex;flex-wrap:wrap;gap:var(--g);margin:0}
.t-wide .bw-nums .n{flex:1 1 calc((100% - (var(--c) - 1) * var(--g)) / var(--c) - 1px);min-width:0;
  display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:8px;padding:17px 18px 16px;
  border:1px solid var(--border);border-radius:var(--r);background:var(--surface)}
.t-wide .bw-nums dd{margin:0;font-family:var(--font-mono);font-weight:600;font-size:clamp(26px,2.6vw,34px);
  line-height:1.08;letter-spacing:-.03em;color:var(--accent-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.t-wide .bw-nums[data-len="m"] dd{font-size:clamp(22px,2vw,26px)}
.t-wide .bw-nums[data-len="l"] dd{font-size:19px;letter-spacing:-.02em;line-height:1.2}
.t-wide .bw-nums[data-len="xl"] dd{font-size:16.5px;letter-spacing:-.02em;line-height:1.25}
.t-wide .bw-nums dt{font-family:var(--font-sans);font-size:13px;line-height:1.4;color:var(--text-muted);overflow-wrap:break-word}
@media(min-width:640px){.t-wide .bw-nums{--c:var(--cols,4);--g:12px}}
@media(max-width:639px){
  .t-wide .bw-nums .n{padding:13px 14px 12px;gap:6px}
  .t-wide .bw-nums dd{font-size:clamp(22px,6vw,26px)}
  .t-wide .bw-nums[data-len="l"] dd{font-size:18px}
  .t-wide .bw-nums[data-len="xl"] dd{font-size:16px}
}

/* ---------- dek (text edge) ---------- */
/* The opening voice: the reading face one step up from the body. */
.t-wide .bw-dek{max-width:var(--bw-measure);margin-top:var(--bw-s3);font-family:var(--reading);font-weight:400;
  font-size:var(--bw-lead);line-height:1.45;letter-spacing:-.005em;color:var(--text);text-wrap:pretty}
.t-wide .bw-main>.bw-dek:first-child{margin-top:0}

/* "Jump to contents": keyboard only, wide screens only. The rail sits after the
   whole article in the tab order; this lets a keyboard reader reach it early. */
.t-wide .bw-jump{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:1040px){.t-wide .bw-jump{display:none}}
@media(min-width:1041px){
  /* Focused, it takes its place in the flow above the prose, so it never covers a line of reading. */
  .t-wide .bw-jump:focus-visible{position:static;width:fit-content;height:auto;overflow:visible;clip-path:none;
    display:flex;align-items:center;min-height:44px;margin-top:var(--bw-s3);padding:0 16px;
    border:1px solid var(--border-strong);border-radius:var(--r-pill);background:var(--surface);
    font-family:var(--font-sans);font-size:14px;font-weight:500;color:var(--text);
    outline:2px solid var(--accent-bright);outline-offset:2px}
  .t-wide .bw-main>.bw-jump:first-child:focus-visible{margin-top:0}
}

/* ---------- chapter chips: phones and tablets only ---------- */
/* In flow a ruled row; once stuck under the header the page colour is spread
   full-bleed behind it (spread shadow + clip-path, so nothing overflows). */
.t-wide .bw-chips{position:sticky;top:var(--bw-stick);z-index:120;margin-top:var(--bw-s4);
  border-block:1px solid var(--border);background:var(--bg)}
.t-wide .bw-main>.bw-jump:first-child+.bw-chips{margin-top:0}
.t-wide .bw-chips.is-stuck{border-color:transparent;clip-path:inset(0 -100vmax -1px);
  box-shadow:0 0 0 100vmax var(--bg),0 1px 0 100vmax var(--border)}
.t-wide .bw-chips ol{position:relative;list-style:none;margin:0 -4px;padding:8px 4px;display:flex;gap:8px;
  overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;counter-reset:bwc;scroll-padding-inline:52px}
.t-wide .bw-chips ol::-webkit-scrollbar{display:none}
.t-wide .bw-chips li{counter-increment:bwc;flex:none}
.t-wide .bw-chips li.end{counter-increment:none}
/* A chip never runs under both arrows: its width leaves room for the two 52px
   edge controls, so a centred long chip keeps its ellipsis in view. */
.t-wide .bw-chips a{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 15px;
  max-width:min(calc(100vw - 2 * var(--gut) - 104px),23rem);
  font-family:var(--font-sans);font-size:14px;font-weight:500;color:var(--text-muted);white-space:nowrap;
  border:1px solid var(--border);border-radius:var(--r-pill);background:var(--surface);
  transition:color .16s,border-color .16s,background .16s}
.t-wide .bw-chips a::before{content:counter(bwc,decimal-leading-zero);font-family:var(--font-mono);
  font-size:12px;color:var(--text-dim);font-variant-numeric:tabular-nums}
.t-wide .bw-chips li.end a::before{content:none}
.t-wide .bw-chips a span{overflow:hidden;text-overflow:ellipsis}
.t-wide .bw-chips a:hover{color:var(--text);border-color:var(--border-strong)}
.t-wide .bw-chips a:focus-visible{outline:2px solid var(--accent-bright);outline-offset:-2px}
.t-wide .bw-chips a[aria-current]{color:var(--accent-ink);background:var(--accent);border-color:var(--accent)}
.t-wide .bw-chips a[aria-current]::before{color:inherit}
.t-wide .bw-chips a[aria-current]:focus-visible{outline-color:var(--accent-ink)}
.t-wide .bw-chips li.end-first{margin-left:2px;padding-left:10px;border-left:1px solid var(--border-strong)}
/* The edge arrows: named buttons (the script sets aria-disabled). One shows on
   each side that has more; an arrow that holds focus stays in place, dimmed,
   when the strip reaches its end, so focus never falls to the page. */
.t-wide .bw-chips .go{position:absolute;top:0;bottom:0;right:-4px;z-index:1;width:52px;padding:0;border:0;cursor:pointer;
  display:none;align-items:center;justify-content:flex-end;color:var(--text);
  background:linear-gradient(to right,transparent,var(--bg) 58%)}
.t-wide .bw-chips .go.prev{right:auto;left:-4px;transform:scaleX(-1)}
.t-wide .bw-chips .go::after{content:"";width:8px;height:8px;margin-right:9px;border:solid currentColor;
  border-width:2px 2px 0 0;transform:rotate(45deg)}
.t-wide .bw-chips.can-r .go.next,.t-wide .bw-chips.can-l .go.prev,.t-wide .bw-chips .go:focus-visible{display:flex}
.t-wide .bw-chips .go[aria-disabled="true"]{cursor:default}
.t-wide .bw-chips .go[aria-disabled="true"]::after{opacity:.4}
.t-wide .bw-chips .go:focus-visible{outline:2px solid var(--accent-bright);outline-offset:-3px;border-radius:var(--r-sm)}
@media(min-width:1041px){.t-wide .bw-chips{display:none}}
/* A short viewport (a phone on its side, 200% zoom) has no room for a pinned row. */
@media(max-height:600px){.t-wide .bw-chips{position:relative;top:auto}}

/* ---------- body ---------- */
.t-wide .prose{margin-top:var(--bw-s4);font-size:var(--bw-body);line-height:1.6;letter-spacing:0;color:var(--text)}
.t-wide .bw-main>.prose:first-child{margin-top:0}
@media(min-width:1041px){
  /* the hidden jump link and chips do not count: the prose still opens the column */
  .t-wide .bw-main>.bw-jump:first-child:not(:focus-visible)+.bw-chips+.prose{margin-top:0}
}

/* The two edges, and the gap above every block.
   Every child of the prose ends on the text edge unless the whitelist below
   lifts it to the wide edge, and takes its top margin from one place: each
   rule further down only names the gap (--bw-g, a step of the scale) and the
   margin is that gap less the block's own transparent padding (--bw-own, the
   chart wrappers). Bottom margins are zero, so one gap wins per boundary.
   Floats keep the shared rules. */
.t-wide .prose>:where(:not(.alignleft,.alignright)){max-width:var(--bw-measure);
  --bw-g:var(--bw-s5);margin-block:calc(var(--bw-g) - var(--bw-own,0px)) 0}
/* Post bodies carry inline margins from the old theme (margin:24px 0, 1.5em 0,
   36px 0 …); !important is the only way to put those boxes on the scale. */
.t-wide .prose>[style*="margin"]:where(:not(.alignleft,.alignright)){margin-block:calc(var(--bw-g) - var(--bw-own,0px)) 0!important}

/* Wide edge: charts, figures, media, multi-column furniture, code. 100%, not
   none: a block that brings its own width still stops at the track. */
.t-wide .prose>:is([class$="-wrap"],[class*="-wrap "],figure,.wp-block-image,.wp-block-embed,
  .wp-block-gallery,.wp-block-columns,.wp-block-video,.stat-grid,.compare,.steps,pre,img,picture,video,iframe,.alignwide,.alignfull){max-width:100%}
/* Charts and comparison rows in plain inline-styled boxes are wide furniture too. */
.t-wide .prose>div:has(canvas),.t-wide .prose>div:has(>.compare-grid){max-width:100%}
/* A note sharing such a box with its chart still reads on the text measure. */
.t-wide .prose>div:has(canvas)>p{max-width:var(--bw-measure)}
/* A table is text furniture (text edge) unless it has five or more columns. */
.t-wide .prose>figure.wp-block-table{max-width:var(--bw-measure)}
.t-wide .prose>:is(table,figure,div):has(tr>:nth-child(5)){max-width:100%}
/* A centred figure is a shrink-to-fit table (core styles): without a cap a
   large image runs past the track. */
.t-wide .prose figure:where(:not(.alignleft,.alignright)){max-width:100%}
/* One left edge: an image set to "centre" that is narrower than the track
   starts on the left edge with everything else, and so does its caption. */
.t-wide .prose .aligncenter{margin-inline:0;text-align:left}
/* Core makes a centred figure display:table, and a table ignores max-width
   when its image is wider than the track (a 1980px original ran off the page).
   As a block the figure and its image stop at the track. */
.t-wide .prose figure.aligncenter{display:block}
.t-wide .prose figure.aligncenter img{height:auto}
/* A floated image floats inside the text column, not out at the wide edge. */
.t-wide .prose>.wp-block-image:has(>:is(.alignleft,.alignright)){max-width:var(--bw-measure)}
@media(min-width:761px){.t-wide .prose>.alignright{margin-right:max(0px,calc(100% - var(--bw-measure)))}}
/* The shared .alignwide is 112% wide and .alignfull bleeds to the viewport; here both stop at the track, clear of the rail. */
.t-wide .prose :is(.alignwide,.alignfull){width:auto;max-width:100%;margin-inline:0;border-radius:var(--r)}
/* A long URL, hash, seed or wallet address breaks inside its line instead of
   pushing the page sideways on a phone (reflow at 320px). break-word leaves
   table columns alone; inline code also needs anywhere to shrink in a cell. */
.t-wide :is(.prose,.bw-dek,.bw-sec){overflow-wrap:break-word}
.t-wide :is(.prose,.bw-sec) :not(pre)>code{overflow-wrap:anywhere}
/* Chart wrappers: most pad themselves 1rem top and bottom, some not at all. All
   get the same 16px, and --bw-own takes it back out of the gaps around them. */
.t-wide .prose>:is([class$="-wrap"],[class*="-wrap "]){overflow-x:auto}
/* A wrapper that paints its own card (border, shadow or fill; the script marks
   it .bw-boxed) keeps its own padding and takes the full gap, box to box. */
.t-wide .prose>:is([class$="-wrap"],[class*="-wrap "]):not(.bw-boxed){--bw-own:16px;padding-block:16px;margin-bottom:-16px}

/* The gaps (see the scale). Later rules win at equal weight, so the order is:
   text, text after a block, headings, what follows a heading, rules, first child.
   style/script/link siblings render nothing and are stepped over (a chart is
   followed by up to three scripts), and so are the blank paragraphs wpautop
   leaves around block comments. */
.t-wide .prose>p:empty{display:none}
.t-wide .prose>:is(p,ul,ol,dl){--bw-g:var(--bw-s3)}
.t-wide .prose>:not(p,ul,ol,dl,h2,h3,h4,h5,h6,hr,style,script,link,.alignleft,.alignright)+:is(p,ul,ol,dl),
.t-wide .prose>:not(p,ul,ol,dl,h2,h3,h4,h5,h6,hr,style,script,link,.alignleft,.alignright)+:is(style,script,link,p:empty)+:is(p,ul,ol,dl),
.t-wide .prose>:not(p,ul,ol,dl,h2,h3,h4,h5,h6,hr,style,script,link,.alignleft,.alignright)+:is(style,script,link,p:empty)+:is(style,script,link,p:empty)+:is(p,ul,ol,dl),
.t-wide .prose>:not(p,ul,ol,dl,h2,h3,h4,h5,h6,hr,style,script,link,.alignleft,.alignright)+:is(style,script,link,p:empty)+:is(style,script,link,p:empty)+:is(style,script,link,p:empty)+:is(p,ul,ol,dl){--bw-g:var(--bw-s5)}
.t-wide .prose>h2{--bw-g:var(--bw-s6)}
.t-wide .prose>h3{--bw-g:var(--bw-s5)}
.t-wide .prose>:is(h4,h5,h6){--bw-g:var(--bw-s4)}
.t-wide .prose>h2+*,
.t-wide .prose>h2+:is(style,script,link,p:empty)+*,
.t-wide .prose>h2+:is(style,script,link,p:empty)+:is(style,script,link,p:empty)+*{--bw-g:var(--bw-s2)}
.t-wide .prose>:is(h3,h4,h5,h6)+*,
.t-wide .prose>:is(h3,h4,h5,h6)+:is(style,script,link,p:empty)+*,
.t-wide .prose>:is(h3,h4,h5,h6)+:is(style,script,link,p:empty)+:is(style,script,link,p:empty)+*{--bw-g:var(--bw-s1)}
.t-wide .prose>hr,.t-wide .prose>hr+*{--bw-g:var(--bw-s6)}
.t-wide .prose>:first-child,
.t-wide .prose>:is(style,script,link,p:empty):first-child+*,
.t-wide .prose>:is(style,script,link,p:empty):first-child+:is(style,script,link,p:empty)+*{--bw-g:0px}
.t-wide .prose li+li{margin-top:var(--bw-s1)}
/* The accordion panels space themselves with a bottom margin; the last one must not add to the gap below. */
.t-wide .prose>.bonus-widgets details:last-child{margin-bottom:0}

/* Body type. The enlarged lead is the page's opening voice: with a dek the
   first paragraph reads as body copy, so the page opens with one voice, not
   two; without one it takes the dek's style… */
.t-wide:not(.has-dek) .prose>p:first-child{font-size:var(--bw-lead);line-height:1.45;color:var(--text);letter-spacing:-.005em}
/* …and the theme's own grey lede (single.css .prose>p:first-child) is undone. */
.t-wide.has-dek .prose>p:first-child{font-size:inherit;line-height:inherit;color:var(--text);letter-spacing:inherit}
/* Chapter headings: direct children only, sized from the body so they grow
   with it. A heading inside a box (a .key-facts label) keeps the box's style. */
.t-wide .prose>h2{position:relative;padding-top:var(--bw-s2);font-size:1.5em;line-height:1.2}
.t-wide .prose>h2::before{content:"";position:absolute;left:0;top:0;width:34px;height:3px;
  border-radius:2px;background:var(--accent)}
.t-wide .prose>h3{font-size:1.2em;line-height:1.25}
.t-wide .prose>h4{font-size:1.05em;font-weight:600;line-height:1.3}
@media(max-width:1040px){.t-wide .prose>h2{font-size:1.4em}}
@media(max-width:680px){.t-wide .prose>h2{font-size:25px}.t-wide .prose>h3{font-size:22px}}
/* A heading that opens a box or a column needs no space above it. */
.t-wide .prose :is(div,section)>:is(h2,h3,h4,h5,h6):first-child{margin-top:0}
.t-wide .prose a{color:var(--accent-text)}
.t-wide .prose blockquote{font-size:1.1em;line-height:1.45}
/* Any heading can be a link target: clear the sticky header (and the chips). */
.t-wide .prose :is(h2,h3),.t-wide .bw-sec{scroll-margin-top:calc(var(--bw-stick) + 28px)}
@media(max-width:1040px) and (min-height:601px){
  .t-wide .prose :is(h2,h3),.t-wide .bw-sec{scroll-margin-top:calc(var(--bw-stick) + 80px)}
}

/* Second reading size: callout text in the reading face and the body ink. */
.t-wide .prose :is(.key-facts,.key-takeaways) :is(ul,ol,p),
.t-wide .prose .notice p,.t-wide .prose .pro-tip{font-size:var(--bw-read);line-height:1.6;color:var(--text)}
.t-wide .prose :is(.key-facts,.key-takeaways){padding:var(--bw-s4)}
.t-wide .prose :is(.key-facts,.key-takeaways) :is(h2,h3,h4){margin-bottom:var(--bw-s2)}
.t-wide .prose :is(.notice,.pro-tip){padding:var(--bw-s3) var(--bw-s4)}
.t-wide .prose .notice :is(h3,h4){font-size:12px}
/* Sans furniture: tables, compare and step cards, captions. */
.t-wide .prose table{font-size:15px}
.t-wide .prose table th{font-size:12px;white-space:normal}
/* A bare table (no wrapper to scroll in) fills its edge from tablet width up. */
/* Not one with five or more columns: it keeps the shared display:block so it can still scroll. */
@media(min-width:681px){.t-wide .prose>table:not(:has(tr>:nth-child(5))){display:table;width:100%}}
/* Core gives block-editor tables table-layout:fixed and word-break:break-word,
   which the shared display:block used to switch off; as real tables they made
   equal columns and cut words mid-word ("Europea|n") on a phone. Columns size
   to their content and words stay whole; a table that is too wide scrolls in
   its wrapper. */
.t-wide .prose table.has-fixed-layout{table-layout:auto}
/* "table" in the selector outranks core's .wp-block-table .has-fixed-layout td, which loads later. */
.t-wide .prose table td,.t-wide .prose table th{word-break:normal}
/* A table in a plain scrolling wrapper fills it (the shared display:block
   shrinks the rows to their content and leaves the header band short). */
.t-wide .prose>:is(div,figure):not([class*="-wrap"]):has(>table){overflow-x:auto}
.t-wide .prose>:is(div,figure):not([class*="-wrap"])>table{display:table;width:100%}
.t-wide .prose .compare{padding:var(--bw-s4)}
.t-wide .prose .compare>h3{margin-bottom:var(--bw-s2)}
.t-wide .prose .cmp ul,.t-wide .prose .step p{font-size:15px;line-height:1.55;color:var(--text)}
.t-wide .prose .step h4,.t-wide .prose .stat .k{font-size:12px}
.t-wide .prose figcaption{max-width:var(--bw-measure);margin-top:var(--bw-s1);font-family:var(--font-sans);font-size:14px;
  line-height:20px;letter-spacing:0;color:var(--text-muted);text-align:left}

/* ---------- takeaways / questions / sources (text edge) ---------- */
/* Three lists on one inner edge: the FAQ row's 2px + 22px index + 16px gap,
   so every row's text starts 40px in (36px on a phone). */
.t-wide .bw-sec{margin-top:var(--bw-s6);max-width:var(--bw-measure)}
.t-wide .bw-sec>h2{font-family:var(--font-sans);font-size:12px;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--label);padding-bottom:var(--bw-s2)}
.t-wide .bw-sec ol{list-style:none;margin:0;padding:0;border-top:1px solid var(--border-strong);counter-reset:bwn}
.t-wide .bw-sec li{counter-increment:bwn;display:grid;grid-template-columns:22px minmax(0,1fr);gap:16px;
  padding:12px 2px;border-bottom:1px solid var(--border)}
.t-wide .bw-sec li::before{content:counter(bwn,decimal-leading-zero);font-family:var(--font-mono);font-size:12px;
  line-height:calc(var(--bw-read) * 1.6);color:var(--accent-text);font-variant-numeric:tabular-nums}
.t-wide .bw-take .tx{min-width:0;font-family:var(--reading);font-size:var(--bw-read);line-height:1.6;color:var(--text)}
.t-wide .bw-take .tx strong{font-weight:600}
.t-wide .bw-take .tx a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}
/* The FAQ in the reading face: the question in the body ink, the answer at the
   second reading size, under the question's text, as wide as the row. */
.t-wide .bw-faq .faq-list--post{font-family:var(--reading)}
.t-wide .bw-faq .faq-list--post .faq-q{font-size:calc(var(--bw-read) * 7 / 6);color:var(--text)}
.t-wide .bw-faq .faq-list--post .a{max-width:none;padding-left:40px;font-size:var(--bw-read);line-height:1.6;color:var(--text)}
@media(max-width:640px){.t-wide .bw-sec li{gap:12px}.t-wide .bw-faq .faq-list--post .a{padding-left:36px}}
.t-wide .bw-src li::before{color:var(--text-dim);line-height:24px}
.t-wide .bw-src a{min-width:0;font-size:16px;line-height:24px;color:var(--text);overflow-wrap:break-word}
.t-wide .bw-src a:hover .t{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}
.t-wide .bw-src .pub{display:block;font-family:var(--font-mono);font-size:12px;line-height:18px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--text-dim);margin-top:4px}

/* ---------- end matter (text edge; the related band on the wide edge) ---------- */
.t-wide .bw-end{max-width:var(--bw-measure)}
.t-wide .bw-end .art-tags{padding-top:var(--bw-s4)}
.t-wide .bw-end :is(.art-tags,.art-share) .lbl,.t-wide .bw-end .art-tags .chip,
.t-wide .bw-end .author-box .k,.t-wide .bw-end .post-nav .k{font-size:12px}
.t-wide .bw-end>.art-share{margin-top:var(--bw-s3)}
.t-wide .bw-end .art-share :is(a,button){width:44px;height:44px}
/* Five 44px buttons and the label do not share a 320px row: the label takes its own line. */
@media(max-width:340px){.t-wide .bw-end .art-share .lbl{flex-basis:100%}}
.t-wide .bw-end>.author-box{margin-top:var(--bw-s5)}
.t-wide .bw-end .author-box p{font-size:15.5px;line-height:1.6}
.t-wide .bw-end>.post-nav{margin-top:var(--bw-s5);padding-top:var(--bw-s4)}
/* Whatever comes first (tags, or share on a post with none) opens the row, level with the rail cards. */
.t-wide .bw-end>:first-child{margin-top:var(--bw-s6)}
.t-wide .bw-endm .related{margin-top:var(--bw-s6);padding-top:var(--bw-s5)}
.t-wide .bw-endm .arc-grid.cols-3{grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr))}
/* The cards are narrower here than on an archive: category and age fit on one line without the read time. */
.t-wide .bw-endm .acard .ci .m>span:nth-child(n+3){display:none}
/* The shared cards and the comment form keep their design; only the type floors
   (12px labels, 13px small print) and the scale reach them. The card's meta row
   stays at its shared 11px: at 12px it breaks onto two lines in these cards.
   The form reads on the text edge. */
.t-wide .bw-endm .related .kicker,.t-wide .bw-endm .comment-form label{font-size:12px}
.t-wide .bw-endm :is(.comment-notes,.logged-in-as),.t-wide .bw-endm .comment-form-cookies-consent label{font-size:13px}
.t-wide .bw-endm .comments{max-width:var(--bw-measure);margin-top:var(--bw-s6);padding-top:var(--bw-s5)}
.t-wide .bw-endm .comment-respond{margin-top:var(--bw-s5)}
.t-wide .bw-endm .comments>.comment-respond:first-child{margin-top:0}

/* ---------- the right rail ---------- */
.t-wide .bw-more{display:flex;flex-direction:column;gap:var(--bw-s4);align-self:start;margin-top:var(--bw-s6)}
.t-wide .bw-nav .widget-title,.t-wide .bw-more .widget-title{font-size:12px}
.t-wide .bw-nav .widget-title::before,.t-wide .bw-more .widget-title::before{content:"";width:16px;height:2px;border-radius:2px;background:var(--accent);flex-shrink:0}

/* contents card */
.t-wide .bw-toc{position:sticky;top:calc(var(--bw-stick) + var(--bw-s4));
  max-height:calc(100vh - var(--bw-stick) - 2 * var(--bw-s4));display:flex;flex-direction:column;padding-bottom:10px}
.t-wide .bw-toc .widget-title{margin-bottom:12px}
.t-wide .bw-toc .meter{display:flex;align-items:center;gap:12px;margin:0 0 6px;font-family:var(--font-mono);
  font-size:12px;letter-spacing:.05em;color:var(--text-dim);font-variant-numeric:tabular-nums}
.t-wide .bw-toc .meter b{color:var(--text);font-weight:600}
.t-wide .bw-toc .meter .bar{flex:1;height:3px;border-radius:2px;background:var(--border);overflow:hidden}
.t-wide .bw-toc .meter .bar i{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;transition:width .15s linear}
.t-wide .bw-toc ol{list-style:none;margin:0 -6px;padding:0 6px;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent;counter-reset:bwt}
/* A list taller than the card fades at its foot until it is scrolled to the
   end, so a cut-off last row reads as "more below"; not while it has focus. */
.t-wide .bw-toc ol.is-clipped{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 40px),transparent);
  mask-image:linear-gradient(to bottom,#000 calc(100% - 40px),transparent)}
.t-wide .bw-toc ol.is-clipped:focus-within{-webkit-mask-image:none;mask-image:none}
.t-wide .bw-toc li{counter-increment:bwt;border-bottom:1px solid var(--border)}
.t-wide .bw-toc li:last-child{border-bottom:0}
.t-wide .bw-toc li.end{counter-increment:none}
.t-wide .bw-toc li.end-first{border-top:1px solid var(--border-strong)}
.t-wide .bw-toc a{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);gap:6px;align-items:baseline;
  padding:11px 6px;margin-inline:-6px;font-family:var(--font-sans);font-weight:450;font-size:15px;line-height:1.45;color:var(--text-muted);
  letter-spacing:0;transition:color .16s}
.t-wide .bw-toc a::before{content:counter(bwt,decimal-leading-zero);font-family:var(--font-mono);font-size:12px;
  color:var(--text-dim);font-variant-numeric:tabular-nums}
.t-wide .bw-toc li.end a{font-size:14px}
.t-wide .bw-toc li.end a::before{content:"\2014"}
.t-wide .bw-toc a:hover{color:var(--text);padding-left:6px}
.t-wide .bw-toc a.is-read::before{color:var(--accent-text)}
.t-wide .bw-toc a[aria-current]{color:var(--text);font-weight:600}
.t-wide .bw-toc a[aria-current]::before{color:var(--accent-text)}
/* Drawn inside the link: the list scrolls, so an outer ring would be clipped. */
.t-wide .bw-toc a:focus-visible{outline:2px solid var(--accent-bright);outline-offset:-2px;border-radius:4px}

/* latest */
.t-wide .bw-latest ul{list-style:none;margin:0;padding:0}
.t-wide .bw-latest li{border-bottom:1px solid var(--border)}
.t-wide .bw-latest li:last-child{border-bottom:0}
.t-wide .bw-latest a{display:grid;grid-template-columns:80px minmax(0,1fr);gap:14px;align-items:start;padding:12px 0}
.t-wide .bw-latest li:first-child a{padding-top:2px}
.t-wide .bw-latest li:last-child a{padding-bottom:2px}
.t-wide .bw-latest .ph{position:relative;display:block;aspect-ratio:16/10;border-radius:calc(var(--r) - 2px);overflow:hidden;background:var(--surface-2,var(--border))}
.t-wide .bw-latest .ph img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s}
.t-wide .bw-latest .ph-fb .g{font-size:22px}
.t-wide .bw-latest .t{display:block;font-family:var(--headline);font-weight:500;font-size:16px;line-height:1.3;
  letter-spacing:-.006em;color:var(--text);text-wrap:pretty}
/* Category and date as two items (font-size:0 drops the literal middot): the
   date draws its own dot in the gap to its left and the row clips its left
   edge, so when the date wraps it starts a clean line and is never cut in two. */
.t-wide .bw-latest .m{display:flex;flex-wrap:wrap;margin:6px 0 0 -17px;font-size:0;color:var(--text-dim);clip-path:inset(0 0 0 17px)}
.t-wide .bw-latest .m :is(b,time){position:relative;margin-left:17px;font-family:var(--font-mono);font-size:12px;line-height:18px;
  letter-spacing:.06em;text-transform:uppercase;white-space:nowrap}
.t-wide .bw-latest .m b{font-weight:600;color:var(--accent-text)}
.t-wide .bw-latest .m time::before{content:"";position:absolute;left:-10px;top:50%;width:3px;height:3px;margin-top:-1.5px;
  border-radius:50%;background:currentColor;opacity:.6}
.t-wide .bw-latest a:hover{padding-left:0}
.t-wide .bw-latest a:hover .t{color:var(--accent-text)}
.t-wide .bw-latest a:hover img{transform:scale(1.04)}

/* tools */
.t-wide .bw-tools ul{list-style:none;margin:0;padding:0}
.t-wide .bw-tools li{border-bottom:1px solid var(--border)}
.t-wide .bw-tools li:last-child{border-bottom:0}
.t-wide .bw-tools a{display:flex;align-items:center;gap:12px;min-height:46px;padding:8px 0;font-family:var(--font-sans);
  font-size:15px;font-weight:500;line-height:1.35;letter-spacing:0;color:var(--text)}
.t-wide .bw-tools a .i{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:8px;
  background:var(--accent-soft);color:var(--accent-text);font-family:var(--font-mono);font-size:12px;font-weight:700}
.t-wide .bw-tools a .s{display:block;font-size:13px;font-weight:400;color:var(--text-dim);margin-top:1px}
.t-wide .bw-tools a .ar{margin-left:auto;color:var(--text-dim);transition:transform .16s,color .16s}
.t-wide .bw-tools a:hover{color:var(--accent-text);padding-left:0}
.t-wide .bw-tools a:hover .ar{color:var(--accent-text);transform:translateX(3px)}

@media(max-width:1040px){
  .t-wide .bw-nav{display:none}
  .t-wide .bw-more{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:start}
}

@media(prefers-reduced-motion:reduce){.t-wide a.bw-kick{transition:none}
  .t-wide .bw-chips a,.t-wide .bw-toc a,.t-wide .bw-latest img,.t-wide .bw-tools .ar,.t-wide .bw-toc .meter i{transition:none}
  .t-wide .bw-latest a:hover img,.t-wide .bw-tools a:hover .ar{transform:none}
}
