/* Samsung Knox vs iOS: side by side comparison table 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 layer). Only one of the two is
   displayed, so screen readers never get the content twice. The text says
   which platform each cell is about, so nothing depends on colour. The
   icons carry their own light tile, so they read the same in a light or a
   dark OS colour scheme (the site itself has one light theme). */

.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: 9rem; }
.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; }

/* Official logos (Samsung wordmark, Apple logo) from Wikimedia Commons,
   unaltered: small and next to the name, decorative (alt="" + aria-hidden,
   the name is text), never taller than the name beside it. */
.blog-post-body .brand-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.45rem; }
.blog-post-body .brand-logo { display: inline-block; flex: none; object-fit: contain; border: 0; border-radius: 0; margin: 0; }
.blog-post-body .brand-logo-samsung { width: 78px; height: 12px; }
.blog-post-body .brand-logo-apple { width: 20px; height: 24px; }
.blog-post-body .logo-credits { list-style: none; padding-left: 0; font-size: 0.9rem; }
.blog-post-body .logo-credits li { margin: 0 0 0.45rem; }
.blog-post-body .logo-credits .brand-logo { vertical-align: middle; margin-right: 0.45rem; }
/* In the table's column headings the logo sits on its own line above the
   name, so the heading never wraps inside a flex row. */
.blog-post-body .compare-table th .brand-name { display: block; }
.blog-post-body .compare-table th .brand-logo { display: block; margin: 0.15rem 0 0.35rem; }

/* Structure figure (simplified overview; the table is the full text). The
   SVG carries its own light background, so it reads the same in a light or
   dark OS colour scheme. */
.blog-post-body .structure-figure { clear: both; }
.blog-post-body .structure-figure img { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; border: 0; }
/* Below 700px the figure's text would shrink to about 9.5px; the table is
   shown there as stacked cards with the same content at full size, so the
   figure is left out (display: none also hides it from screen readers). */
@media (max-width: 699px) {
  .blog-post-body .structure-figure { display: none; }
}
