/* Staying healthy in cold and hot weather: comparison table, figures and
   numbered footnotes.
   The table is a real table on wide screens; below 700px each row is shown
   as a stacked card instead (dl per row). Only one of the two is displayed,
   so screen readers never get the content twice. Every cell says in text
   whether it is about cold or heat, so nothing depends on colour. */

.blog-post-body .compare-table { display: table; width: 100%; overflow: visible; font-size: 0.88rem; border-collapse: collapse; table-layout: fixed; }
.blog-post-body .compare-table caption { caption-side: top; text-align: left; font-size: 0.88rem; color: var(--color-text-muted); padding: 0 0 0.5rem; }
.blog-post-body .compare-table th, .blog-post-body .compare-table td { vertical-align: top; overflow-wrap: break-word; }
.blog-post-body .compare-table th[scope="row"] { white-space: normal; width: 8.5rem; }
.blog-post-body .compare-cards { display: none; }
@media (max-width: 699px) {
  .blog-post-body .compare-wide { display: none; }
  .blog-post-body .compare-cards { display: block; }
}
.blog-post-body .compare-card {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); margin: 0 0 0.85rem; padding: 0.6rem 0.85rem 0.75rem;
}
.blog-post-body .compare-card-title {
  font-size: 1.05rem; margin: 0 0 0.5rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--color-border);
}
.blog-post-body .compare-card dl { margin: 0; }
.blog-post-body .compare-card dt { font-weight: 700; color: var(--color-primary); font-size: 0.85rem; margin: 0.55rem 0 0.15rem; }
.blog-post-body .compare-card dt:first-child { margin-top: 0; }
.blog-post-body .compare-card dd { margin: 0; font-size: 0.92rem; overflow-wrap: break-word; }

/* Footnotes (role doc-noteref / doc-backlink / doc-endnotes).
   Every footnote link has a target of at least 24 x 24px: an invisible
   ::after square centred on the link, so the hit area grows without
   changing the line height. The focus ring is a 3px outline in the primary
   colour (8.6:1 on the page background). */
.blog-post-body .fn-ref { font-size: 0.75em; line-height: 0; vertical-align: super; margin-left: 0.1em; }
.blog-post-body .fn-ref a, .blog-post-body .fn-back { position: relative; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.blog-post-body .fn-ref a::after, .blog-post-body .fn-back::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 24px; height: 24px; min-width: 100%; transform: translate(-50%, -50%);
}
.blog-post-body .fn-back { display: inline-block; min-width: 24px; min-height: 24px; text-align: center; text-decoration: none; }
.blog-post-body .fn-ref a:focus-visible, .blog-post-body .fn-back:focus-visible,
.blog-post-body .footnotes a:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }
.blog-post-body .fn-ref a { scroll-margin-top: 5rem; }
/* Adjacent references ("4, 5"): room after the comma so their 24px
   targets never overlap. */
.blog-post-body .fn-ref span[aria-hidden="true"] { margin-right: 0.75em; }

/* Footnote list: long URLs and titles wrap instead of scrolling sideways. */
.blog-post-body .footnotes ol { font-size: 0.9rem; padding-left: 2rem; overflow-wrap: anywhere; }
.blog-post-body .footnotes li { margin: 0 0 0.4rem; scroll-margin-top: 5rem; }
.blog-post-body .footnotes li:target { background: var(--color-accent-soft); outline: 2px solid var(--color-accent); border-radius: 3px; }

/* Figures (simplified overviews; the text and the table are the full
   content, and the alt text only names the figure). Each SVG carries its
   own solid light tile, so it reads the same in a light or dark OS colour
   scheme. The SVGs are 360 units wide with 15 to 22 unit text, so at a
   390px viewport the text stays at about 14px or more: no need to hide
   them, and width: 100% means no sideways scrolling. */
.blog-post-body .wh-figure { clear: both; margin: 1.5rem auto; max-width: 420px; }
.blog-post-body .wh-figure img { display: block; width: 100%; height: auto; margin: 0 auto; border: 0; border-radius: 0; }
.blog-post-body .wh-figure figcaption { font-size: 0.88rem; color: var(--color-text-muted); text-align: center; margin-top: 0.5rem; }
