/* Headcount chart: babies born in England by ethnic group ("Of every 100"). Plain CSS for births.js.
   Reads the site's tokens (--ink, --ink-2..4, --fill-tag, --border-strong, --hairline, --callout-yellow, --yellow) and falls
   back to the same values when a token is missing, so the module also stands alone (the share cards).
   One dot is 1 in 100 babies, the same size in every row, in blocks of ten (five across, two down, filled a column at a time
   so a row's width follows its count), as chart-system 8.2 sets for faces. Ink and greys only; yellow marks the
   first-estimate tag and nothing else, and no group is ever picked out. */
.hcb{--hcb-ink:var(--ink,#1d1c1a);--hcb-ink-2:var(--ink-2,#5f5e59);--hcb-ink-3:var(--ink-3,#73726e);--hcb-ink-4:var(--ink-4,#a19e99);
  --hcb-hair:var(--hairline,rgba(42,28,0,.07));--hcb-border:var(--border,rgba(28,19,1,.11));--hcb-border-strong:var(--border-strong,rgba(27,21,0,.19));
  --hcb-tag:var(--fill-tag,rgba(42,28,0,.07));--hcb-cy:var(--callout-yellow,#f9f3dc);--hcb-cy-ink:var(--yellow-ink,#5f4b1d);
  --hcb-slot:#ebe9e5;
  --hcb-dot:12px;--hcb-gap:3px;--hcb-bgap:8px;
  container-type:inline-size;container-name:hcb;
  margin:0;font-family:var(--font,"Inter",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif);color:var(--hcb-ink)}
.hcb *,.hcb *::before,.hcb *::after{box-sizing:border-box}
.hcb-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* the key. The block has no title of its own: the page H1 is the chart's title */
.hcb-key{display:flex;flex-wrap:wrap;gap:var(--sp-2,8px) var(--sp-5,20px);margin:0;padding:0;list-style:none;font:400 14px/20px var(--font,inherit);color:var(--hcb-ink-2)}
.hcb-key li{display:inline-flex;align-items:center;gap:var(--sp-2,8px)}
.hcb-key b{font-weight:600;color:var(--hcb-ink)}
/* narrow: the key line is read by screen readers but not drawn; the unit is drawn in the column header row instead */
@container hcb (max-width:759.98px){.hcb-key{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

/* the dots */
.hcb-d{display:block;width:var(--hcb-dot);height:var(--hcb-dot);border-radius:50%;background:var(--hcb-ink)}
.hcb-d.ns{background:transparent;box-shadow:inset 0 0 0 1.5px var(--hcb-ink-3)}
.hcb-key .hcb-d{flex:none}
.hcb-dots{display:flex;flex-wrap:wrap;gap:var(--hcb-bgap);align-content:flex-start;min-width:0}
.hcb-blk{display:grid;grid-template-rows:repeat(2,var(--hcb-dot));grid-auto-columns:var(--hcb-dot);grid-auto-flow:column;gap:var(--hcb-gap)}
.hcb-slot{position:relative;width:var(--hcb-dot);height:var(--hcb-dot)}
.hcb-slot>.hcb-d{position:absolute;inset:0;width:auto;height:auto}

/* the rows. Phone first: the name and its numbers on one line, the dots under them */
.hcb-plot{margin-top:0;border-top:1px solid var(--hcb-border)}
.hcb-cols,.hcb-row,.hcb-total{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"name n p" "dots dots dots";column-gap:var(--sp-3,12px);align-items:baseline}
.hcb-cols{padding:6px 0;border-bottom:1px solid var(--hcb-hair);font:500 12px/16px var(--font,inherit);letter-spacing:.01em;color:var(--hcb-ink-3)}
.hcb-cols .hcb-c-dots,.hcb-cols .hcb-c-name{display:none}
.hcb-cols .hcb-c-key{grid-area:name;display:inline-flex;align-items:center;gap:var(--sp-2,8px);min-width:0;font:400 14px/20px var(--font,inherit);letter-spacing:0;color:var(--hcb-ink-2)}
.hcb-cols .hcb-c-key b{font-weight:600;color:var(--hcb-ink)}
.hcb-cols .hcb-c-key .hcb-d{flex:none}
.hcb-row{padding:var(--sp-2,8px) 0 var(--sp-3,12px);border-bottom:1px solid var(--hcb-hair);row-gap:var(--sp-2,8px);transition:background var(--t-fast,150ms) var(--ease,ease)}
.hcb-name{grid-area:name;min-width:0;font:600 14px/20px var(--font,inherit);color:var(--hcb-ink);text-wrap:balance}
.hcb-row.ns .hcb-name{font-weight:500;color:var(--hcb-ink-2)}
.hcb-name small{display:block;font:400 12px/16px var(--font,inherit);color:var(--hcb-ink-3)}
.hcb-dots{grid-area:dots}
.hcb-n,.hcb-p{font:400 14px/20px var(--font,inherit);font-variant-numeric:tabular-nums lining-nums;text-align:right;white-space:nowrap}
.hcb-n{grid-area:n;font-weight:600;color:var(--hcb-ink)}
.hcb-p{grid-area:p;min-width:3.4em;color:var(--hcb-ink)}
.hcb-cols .hcb-c-n{grid-area:n}.hcb-cols .hcb-c-p{grid-area:p}.hcb-cols .hcb-c-name{grid-area:name}
.hcb-cols span{text-align:right}.hcb-cols :is(.hcb-c-name,.hcb-c-key,.hcb-c-key span){text-align:left}
.hcb-total{padding:var(--sp-3,12px) 0 0;grid-template-areas:"name n p"}
.hcb-total .hcb-name{font-weight:600}
.hcb-total .hcb-dots{display:none}
@media (hover:hover){.hcb-row:hover{background:var(--hover-band,rgba(55,53,47,.06))}}

/* wide: name, count, share, then the dots, like a table with a bar column. The numbers stay beside their names and the
   dots run ragged to the right, so a row's length can be read against the others */
@container hcb (min-width:760px){
  .hcb{--hcb-dot:14px}
  .hcb-plot{max-width:960px}
  .hcb-cols,.hcb-row,.hcb-total{grid-template-columns:minmax(150px,240px) 72px 60px minmax(0,1fr);grid-template-areas:"name n p dots";column-gap:var(--sp-4,16px);align-items:center}
  .hcb-plot{margin-top:var(--sp-3,12px)}
  .hcb-cols{padding-top:var(--sp-2,8px);padding-bottom:var(--sp-2,8px)}
  .hcb-cols .hcb-c-dots{display:block;grid-area:dots;text-align:left}
  .hcb-cols .hcb-c-name{display:block}
  .hcb-cols .hcb-c-key{display:none}
  .hcb-row{padding:var(--sp-2,8px) var(--sp-2,8px) var(--sp-2,8px) 0}
  .hcb-cols{padding-right:var(--sp-2,8px)}
  .hcb-total{padding-right:var(--sp-2,8px)}
  .hcb-total .hcb-dots{display:block;font:400 14px/20px var(--font,inherit);color:var(--hcb-ink-3)}
}

/* the line that says what it shows, the year-earlier total, the notes, the source */
.hcb-says{margin:var(--sp-4,16px) 0 0;max-width:720px;font:400 16px/24px var(--font,inherit);color:var(--hcb-ink)}
.hcb-cmp{margin:var(--sp-2,8px) 0 0;max-width:720px;font:400 14px/20px var(--font,inherit);color:var(--hcb-ink-2)}
.hcb-cmp b{font-weight:600;color:var(--hcb-ink)}
.hcb-notes{margin:var(--sp-3,12px) 0 0;padding:0;max-width:720px;list-style:none;font:400 12px/18px var(--font,inherit);color:var(--hcb-ink-3)}
.hcb-notes li+li{margin-top:var(--sp-1,4px)}
.hcb-src{margin:var(--sp-3,12px) 0 0;max-width:820px;font:400 12px/18px var(--font,inherit);color:var(--hcb-ink-3)}
.hcb-src2{margin-top:var(--sp-2,8px)}
.hcb-src b{font-weight:500;color:var(--hcb-ink-2);margin-right:var(--sp-1,4px)}
/* vertical padding on the inline link makes the tap area 44px tall without moving the text */
.hcb-src a{padding:15px 0;color:var(--hcb-ink-2);text-decoration:underline;text-decoration-color:var(--hcb-border-strong);text-underline-offset:2px}
.hcb-src a:hover{color:var(--hcb-ink)}
.hcb-badges{display:inline-flex;flex-wrap:wrap;gap:var(--sp-1h,6px);vertical-align:baseline}
.hcb-badge{display:inline-flex;align-items:center;height:20px;padding:0 var(--sp-1h,6px);border-radius:var(--r-tag,4px);background:var(--hcb-tag);color:var(--hcb-ink-2);font:500 12px/16px var(--font,inherit);letter-spacing:.01em;white-space:nowrap;vertical-align:baseline}
.hcb-badge.fe{background:var(--hcb-cy);color:var(--hcb-cy-ink)}

/* See the table */
.hcb-tools{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2,8px) var(--sp-4,16px);margin-top:var(--sp-4,16px)}
.hcb-btn{display:inline-flex;align-items:center;gap:var(--sp-2,8px);height:40px;min-height:44px;padding:0 var(--sp-4,16px);border:1px solid var(--hcb-border);border-radius:var(--r-control,8px);background:var(--bg,#fff);color:var(--hcb-ink);font:500 14px/20px var(--font,inherit);cursor:pointer;transition:background var(--t-fast,150ms) var(--ease,ease),border-color var(--t-fast,150ms) var(--ease,ease)}
.hcb-btn svg{flex:none;transition:transform var(--t-fast,150ms) var(--ease,ease)}
.hcb-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.hcb-btn:focus-visible,.hcb-dl:focus-visible,.hcb-src a:focus-visible{outline:2px solid transparent;box-shadow:var(--focus-ring,0 0 0 2px #fff,0 0 0 4px #2383e2)}
@media (hover:hover){.hcb-btn:hover{background:var(--wash-hover,rgba(33,27,23,.05));border-color:var(--hcb-border-strong)}}
.hcb-btn:active{background:var(--wash-pressed,rgba(55,53,47,.1))}
.hcb-dl{display:inline-flex;align-items:center;min-height:44px;font:500 14px/20px var(--font,inherit);color:var(--hcb-ink);border-radius:var(--r-tag,4px)}
.hcb-tbl{margin-top:var(--sp-3,12px)}
.hcb-tbl[hidden]{display:none}
/* the caption sits above the tables, outside any sideways scroller */
.hcb-tcap{margin:0 0 var(--sp-3,12px);max-width:720px;font:400 12px/18px var(--font,inherit);color:var(--hcb-ink-3)}
.hcb-tlab{margin:var(--sp-5,20px) 0 var(--sp-2,8px);font:600 14px/20px var(--font,inherit);color:var(--hcb-ink);text-wrap:balance}
.hcb-tnarrow .hcb-tlab:first-child{margin-top:0}
.hcb-tw{overflow-x:auto;border:1px solid var(--hcb-border);border-radius:var(--r-card,12px);-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.hcb-t{border-collapse:separate;border-spacing:0;width:100%;font:400 14px/20px var(--font,inherit);font-variant-numeric:tabular-nums lining-nums;color:var(--hcb-ink)}
.hcb-t th,.hcb-t td{padding:var(--sp-2,8px);border-bottom:1px solid var(--hcb-hair);text-align:right;vertical-align:top}
.hcb-t :is(th,td):first-child{padding-left:var(--sp-3,12px)}
.hcb-t :is(th,td):last-child{padding-right:var(--sp-3,12px)}
.hcb-t td{white-space:nowrap}
.hcb-t thead th{background:var(--bg-soft,#f9f8f7);border-bottom:1px solid var(--hcb-border);font:500 12px/16px var(--font,inherit);color:var(--hcb-ink-2);vertical-align:bottom}
.hcb-t thead th.hcb-tg{text-align:center;color:var(--hcb-ink);border-bottom:1px solid var(--hcb-hair)}
.hcb-t th[scope="row"],.hcb-t thead th:first-child{text-align:left;font-weight:500}
.hcb-t tbody th[scope="row"]{font:500 14px/20px var(--font,inherit);color:var(--hcb-ink)}
.hcb-t tfoot :is(th,td){font-weight:600;border-bottom:0;border-top:1px solid var(--hcb-border)}
.hcb-t thead th small{display:block;font-weight:400;color:var(--hcb-ink-3)}
.hcb-tw-wide{display:none}
@container hcb (min-width:600px){
  .hcb-tw-wide{display:block}
  .hcb-tnarrow{display:none}
  .hcb-t-wide{min-width:600px}
  .hcb-t-wide :is(th,td){padding-left:var(--sp-3,12px);padding-right:var(--sp-3,12px)}
}

/* first view: the dots arrive in the 100's order, 12 ms apart (chart-system 6.9), and only once */
.hcb.hcb-wait .hcb-row .hcb-d{opacity:0;transform:scale(.35)}
.hcb.hcb-go .hcb-row .hcb-d{opacity:1;transform:none;transition:opacity .3s var(--ease,ease) calc(var(--i) * 12ms),transform .3s cubic-bezier(.2,.8,.3,1) calc(var(--i) * 12ms)}
@media (prefers-reduced-motion:reduce){.hcb.hcb-wait .hcb-row .hcb-d{opacity:1;transform:none}.hcb.hcb-go .hcb-row .hcb-d{transition:none}}

/* ---------- the share cards (births.js, mode "card"): the 4:5 and 1:1 stills and the video at 1080 wide, drawn at 1x, and
   the link card at 1200x630, drawn at 2x for 2400x1260 ---------- */
.hcb.card{box-sizing:border-box;--hcb-dot:16px;--hcb-gap:3px;--hcb-bgap:7px;container-type:normal;position:relative;width:1080px;height:var(--card-h,1350px);overflow:hidden;
  padding:64px 64px 0;background:#fff;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column}
.card .hcbc-brand{display:flex;align-items:center;gap:14px;font:700 30px/36px var(--font,inherit);letter-spacing:-.022em;color:var(--hcb-ink)}
.card .hcbc-brand svg{display:block;width:44px;height:44px;flex:none}
.card .hcbc-h{margin:0;font:700 52px/60px var(--font,inherit);letter-spacing:-.028em;color:var(--hcb-ink)}
.card .hcbc-sub{margin:14px 0 0;font:400 28px/38px var(--font,inherit);letter-spacing:-.006em;color:var(--hcb-ink-2)}
.card .hcbc-key{display:flex;gap:36px;margin:24px 0 0;font:400 26px/32px var(--font,inherit);color:var(--hcb-ink-2)}
.card .hcbc-key>span{display:inline-flex;align-items:center;gap:12px}
.card .hcbc-key b{font-weight:600;color:var(--hcb-ink)}
.card .hcbc-key .hcb-d{width:var(--hcb-dot);height:var(--hcb-dot)}
.card .hcbc-key .hcb-d.ns{box-shadow:inset 0 0 0 2.5px var(--hcb-ink-3)}
.card .hcbc-rows{position:relative;margin-top:22px;border-top:2px solid var(--hcb-border)}
/* name, count, share, dots: 400 + 110 + 92 + 290 for the dots (three blocks of 16px dots), with 20px between */
.card :is(.hcbc-row,.hcbc-tot){display:grid;grid-template-columns:400px 110px 92px minmax(0,1fr);column-gap:20px;align-items:center}
.card :is(.hcbc-row,.hcbc-tot)>*{grid-area:auto}
.card .hcbc-row{padding:9px 0;border-bottom:2px solid var(--hcb-hair)}
.card .hcbc-row .hcb-name{font:600 27px/34px var(--font,inherit);letter-spacing:-.01em;white-space:nowrap}
.card .hcbc-row.ns .hcb-name{font-weight:500;color:var(--hcb-ink-2)}
.card :is(.hcbc-row,.hcbc-tot) :is(.hcb-n,.hcb-p){font:400 27px/34px var(--font,inherit);font-variant-numeric:tabular-nums lining-nums;text-align:right}
.card .hcbc-row .hcb-n{font-weight:600}
.card .hcbc-row .hcb-d.ns{box-shadow:inset 0 0 0 2.5px var(--hcb-ink-3)}
.card .hcb-slot{background:var(--hcb-slot);border-radius:50%}
.card .hcb-slot.ns-slot{background:transparent;box-shadow:inset 0 0 0 2.5px #e2dfda}
.card .hcbc-tot{padding:14px 0 0;align-items:baseline}
.card .hcbc-tot :is(.hcb-name,.hcb-n,.hcb-p){font:600 27px/34px var(--font,inherit);letter-spacing:-.01em}
.card .hcbc-foot{margin-top:auto;padding:22px 0 48px;font:400 21px/29px var(--font,inherit);color:var(--hcb-ink-3)}
.card .hcbc-foot b{font-weight:500;color:var(--hcb-ink-2)}
.card .hcbc-foot p{margin:0}
.card .hcbc-foot .hcbc-url{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:14px;font:600 24px/32px var(--font,inherit);color:var(--hcb-ink)}
/* 1:1 is 270px shorter: a smaller head and tighter rows, the same dots */
.hcb.card.sq{--card-h:1080px;padding-top:48px}
.card.sq .hcbc-h{font-size:46px;line-height:53px}
.card.sq .hcbc-sub{margin-top:8px;font-size:26px;line-height:34px}
.card.sq .hcbc-key{margin-top:12px;font-size:23px}
.card.sq .hcbc-rows{margin-top:14px}
.card.sq .hcbc-row{padding:3px 0}
.card.sq :is(.hcbc-row,.hcbc-tot) :is(.hcb-name,.hcb-n,.hcb-p){font-size:26px;line-height:30px}
.card.sq .hcbc-tot{padding-top:10px}
.card.sq .hcbc-foot{padding:14px 0 36px;font-size:19px;line-height:26px}
.card.sq .hcbc-foot .hcbc-url{margin-top:10px;font-size:22px}
/* link card, 1200x630 at 2x: the title, sub and key in the left 40%, the rows on the right in the same order with the
   same dots, the source and address under the key */
.hcb.card.link{--card-h:630px;width:1200px;padding:44px 48px 40px;display:grid;grid-template-columns:400px minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);grid-template-areas:"head body" "foot body";column-gap:48px;--hcb-dot:10px;--hcb-gap:2px;--hcb-bgap:6px}
.card.link .hcbc-head{grid-area:head}
.card.link .hcbc-body{grid-area:body;align-self:center}
.card.link .hcbc-foot{grid-area:foot;align-self:end;margin:0;padding:0;font:400 13px/19px var(--font,inherit)}
.card.link .hcbc-h{font:700 34px/40px var(--font,inherit);letter-spacing:-.024em;text-wrap:balance}
.card.link .hcbc-sub{margin-top:12px;font:400 19px/26px var(--font,inherit);letter-spacing:-.004em}
.card.link .hcbc-key{flex-direction:column;align-items:flex-start;gap:6px;margin-top:16px;font:400 17px/24px var(--font,inherit)}
.card.link .hcbc-key>span{gap:10px}
.card.link :is(.hcbc-key,.hcbc-row) .hcb-d.ns{box-shadow:inset 0 0 0 1.5px var(--hcb-ink-3)}
.card.link .hcb-slot.ns-slot{box-shadow:inset 0 0 0 1.5px #e2dfda}
.card.link .hcbc-rows{margin-top:0;border-top-width:1px}
.card.link :is(.hcbc-row,.hcbc-tot){grid-template-columns:236px 64px 54px minmax(0,1fr);column-gap:14px}
.card.link .hcbc-row{padding:5px 0;border-bottom-width:1px}
.card.link :is(.hcbc-row,.hcbc-tot) :is(.hcb-name,.hcb-n,.hcb-p){font-size:17px;line-height:22px;letter-spacing:-.006em}
.card.link .hcbc-tot{padding-top:8px}
.card.link .hcbc-foot .hcbc-url{flex-direction:column;align-items:flex-start;gap:8px;margin-top:14px;font:600 14px/20px var(--font,inherit)}
.card.link .hcbc-brand{gap:10px;font-size:20px;line-height:26px}
.card.link .hcbc-brand svg{width:30px;height:30px}
