/* zfs-outlink.css: out-link icon, out-link anchor, citation link and the Sources block.
   The portal's copy of sources_registry/specimen/zfs-outlink.css, which is normative (specification
   docs/EXTERNAL_SOURCES_SCHEMA_AND_OUTLINK_DESIGN_2026-10-13.md, sections 12.1-12.8 and 12.11). Linked after each
   page's own <style> (reader.html, wiki.html, map.html, sources.html). Uses only the custom properties and fonts of
   ../shared.css (both palettes: the default and [data-theme="matte"]); no colour literal.
   Changes to the specimen's rules, each from the specification:
     - the focus rule adds '.figblock a.zfs-x' (section 12.10: '.figblock a:focus-visible', injected by portal.js
       after the page's links, ties with 'a.zfs-x:focus-visible' and wins by order);
     - the Sources page's controls keep the focus style of the portal's listings (open decision 12, taken: the
       listings' own label and focus style), so '.sp-page' is not in the focus rule;
     - a Sources entry reached by its address (#src-<key>) stands 1rem below the top of the window. */

/* the portal has one colour scheme: native controls (select lists, search field) take dark parts */
:root { color-scheme: dark; }

/* 12.1 icon: one sprite per page (inserted by PORTAL.nav), one <use> per link */
.zfs-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.zfs-i { display: inline-block; width: .875em; height: .875em; margin-inline-start: .2em; vertical-align: -.08em; }

/* 12.2 out-link: underlined (shared.css removes the underline from every link), icon in currentColor */
a.zfs-x { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; overflow-wrap: anywhere; }
a.zfs-x:hover { color: var(--ink); }
.zfs-nb { white-space: nowrap; }
a.zfs-x .mono { font-family: "IBM Plex Mono", monospace; font-size: .9em; }

/* 12.4 citation link and the 'Used here' links: internal, told from the text by a dotted underline */
a.zfs-cite, .zfs-here a { color: var(--accent); text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .15em; }
a.zfs-cite:hover, .zfs-here a:hover { color: var(--ink); }

/* 12.8 one focus style for every control the display adds */
a.zfs-x:focus-visible, a.zfs-cite:focus-visible, .zfs-here a:focus-visible,
.figblock a.zfs-x:focus-visible,
.zfs-src :is(button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 12.5 Sources block */
.zfs-src { max-width: 860px; margin-block-start: 3rem; padding: 1rem 1.25rem; background: var(--bg-soft); border-block-start: 1px solid var(--rule); border-block-end: 0; }
.zfs-src h2 { font-family: "Crimson Pro", serif; font-weight: 400; font-size: 1.5rem; color: var(--ink); border: 0; margin: 0 0 .25rem; padding: 0; }
.zfs-src p { margin: 0; }
.zfs-list { padding-inline-start: 1.5rem; margin-block: .75rem 0; }
.zfs-list > li + li { margin-block-start: 1rem; padding-block-start: 1rem; border-block-start: 1px solid var(--rule); }
.zfs-list > li { scroll-margin-top: 1rem; }
.zfs-who { font-family: "Instrument Sans", sans-serif; font-size: .875em; color: var(--ink-soft); }
.zfs-what { font-family: "Crimson Pro", serif; color: var(--ink); overflow-wrap: anywhere; }
.zfs-what cite { font-style: normal; }
.zfs-count, .zfs-check, .zfs-read, .zfs-here { font-family: "Instrument Sans", sans-serif; color: var(--ink-soft); font-size: .875em; }
.zfs-links { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 0; margin-block: .35rem; }
.zfs-links a, .zfs-here a { display: inline-block; min-height: 24px; padding-block: 2px; }
.zfs-check[data-state="partial"], .zfs-check[data-state="blocked"], .zfs-check[data-state="unreachable"], .zfs-check[data-state="unchecked"] { border-inline-start: 3px solid var(--amber); padding-inline-start: .5em; }
.zfs-check[data-state="mismatch"], .zfs-check[data-state="not-found"] { border-inline-start: 3px solid var(--hot); padding-inline-start: .5em; }

@media (max-width: 640px) {
  .zfs-src { padding-inline: 0; background: none; }
  .zfs-links { display: block; }
  .zfs-links li { display: block; }
}

/* forced colours: the icon follows the link through currentColor; the state bars are borders and the underlines
   text decorations, which the system colours keep; no rule is needed */
@media print {
  .zfs-src { background: none; }
  .zfs-i { display: none; }
}
