/* ==========================================================================
   Pyrexia site: the company and news pages
   About, Contact, News (the index, the tag lists and every article), the
   legal pages (privacy, terms, the CATP policy) and the 404 page. Loaded on
   those pages only, after site.css (the pages name it with "css:" in their
   front matter; build.mjs links it on articles, tag lists and legal pages).
   Classes of its own are prefixed cn-; every other rule here refines a pg-
   pattern on these pages only, so nothing changes on another builder's page.

   Same house rules as site.css: one paper ground, ink text, violet rationed
   (a link, a mark, one rule); nothing above a headline; no numbering with a
   leading zero; dates written "6 October 2023".

   Contents
     1  Reading surfaces (nothing behind text)
     2  Page header and breadcrumb on these pages
     3  Articles
     4  The news index and tag lists
     5  Legal pages (with the contents list)
     6  About
     7  Contact
     8  The 404 page
     9  Print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1  Reading surfaces
   Nothing is painted behind text (the founder, 13 November 2026): no patch,
   halo or plate. A header's shape stays in its dock, and the thread draws
   nothing through the body of a page (site.css, "The closing").
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   2  Page header and breadcrumb on these pages
   -------------------------------------------------------------------------- */
/* Phones: a short dock on a reading page, so the words start within the first screen. */
@media (max-width: 56.24em) {
  .pg-article .pg-head__dock,
  .pg-head:has(+ .pg-sec .pg-news) .pg-head__dock {
    height: clamp(5.5rem, 26vw, 7.5rem);
  }
}

/* The breadcrumb's ellipsis on the current page is in site.css (every inner page). */

/* --------------------------------------------------------------------------
   3  Articles
   The title, then one line (First published 6 October 2023 · Updated · By),
   then the archive note. The text at a generous size and a 64-character
   measure; the opening paragraph set as a standfirst. After it: the tags and
   Back to news on one ruled line, More from Pyrexia, the closing band.
   -------------------------------------------------------------------------- */
.pg-article .pg-head__h { max-width: 16em; }
/* Phones: balanced lines split the published titles at their hyphens ("Sci- / Fi"); fill instead. */
@media (max-width: 37.49em) {
  .pg-article .pg-head__h { text-wrap: pretty; }
}
.pg-article .pg-meta__note { max-width: 36rem; margin-block-start: -0.25rem; }

.pg-article__body { padding-block: clamp(2.5rem, 7svh, 4.5rem) clamp(2.5rem, 6svh, 3.5rem); }
.pg-article__body > .pg-prose {
  max-width: 42rem;
  font-size: var(--fz-body);
  line-height: 1.62;
}
.pg-article__body > .pg-prose > * + * { margin-block-start: 1.1em; }
/* The standfirst: the article's own first paragraph, one step up and in full ink. */
.pg-article__body > .pg-prose > p:first-child {
  font-size: var(--fz-lede);
  line-height: 1.45;
  letter-spacing: -0.014em;
  color: var(--fg);
}
.pg-article__body > .pg-prose h2 {
  margin-block-start: 2.2em;
  font-size: var(--fz-h-sm);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pg-article__body > .pg-prose :is(h2, h3) + * { margin-block-start: 0.55em; }
.pg-article__body > .pg-prose li + li { margin-block-start: 0.5em; }
.pg-article__body > .pg-prose blockquote { font-size: var(--fz-lede); }

/* Tables (Markdown pipe tables; build.mjs writes <div class="pg-table"><table>...). The ruled
   rows' language (.flow-spec): a hairline above the header and under every row, header cells in
   the quiet key style, the figures in tabular numerals. The table fills the column; when it is
   wider (many columns, a phone), it scrolls sideways inside its wrapper and the page never does.
   The caption stands above it in the figure caption's style, kept to the visible width and in
   view while the table scrolls. The wrapper takes focus, so a keyboard can scroll it. Articles and
   legal pages alike. */
.pg-prose .pg-table {
  container-type: inline-size;
  margin-block: 1.75em;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.pg-prose .pg-table:focus-visible { outline-offset: 4px; }
.pg-prose .pg-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fz-small);
  line-height: 1.45;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.pg-prose .pg-table caption {
  position: sticky;
  inset-inline-start: 0;
  max-width: 100cqi;
  padding-block-end: 0.875rem;
  caption-side: top;
  font-size: var(--fz-note);
  font-weight: 500;
  line-height: 1.45;
  text-align: start;
  color: var(--fg-2);
}
.pg-prose .pg-table :is(th, td) {
  min-width: 7.5rem;
  padding: 0.8rem 1.5rem 0.8rem 0;
  border-block-end: 1px solid var(--hair);
  text-align: start;
  vertical-align: top;
}
.pg-prose .pg-table :is(th, td):last-child { padding-inline-end: 0; }
.pg-prose .pg-table thead th {
  padding-block: 0.7rem;
  border-block-start: 1px solid var(--hair);
  font-size: var(--fz-small);
  font-weight: 500;
  color: var(--fg-2);
  vertical-align: bottom;
}
.pg-prose .pg-table td { color: var(--fg); }
.pg-prose .pg-table .pg-table__start { text-align: start; }
.pg-prose .pg-table .pg-table__mid { text-align: center; }
.pg-prose .pg-table .pg-table__end { text-align: end; }

.pg-article__foot { max-width: 42rem; padding-block: 1rem; }
/* "More from Pyrexia": a little less air than a landing page's section. */
.pg-related { padding-block: clamp(3rem, 8svh, 5.5rem) clamp(1rem, 3svh, 2rem); }

/* --------------------------------------------------------------------------
   4  The news index and tag lists
   A publication's contents page: the newest article leads, set larger; then
   each article on a ruled row. From 900px the date sits in a column of its
   own beside the title (never above it); below that it follows the summary.
   -------------------------------------------------------------------------- */
.pg-news .pg-post { gap: 0.625rem; padding-block: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem); }
.pg-news .pg-post__h { font-size: var(--fz-h-sm); line-height: 1.18; letter-spacing: -0.02em; }
.pg-news .pg-post__p { max-width: 40rem; font-size: var(--fz-small); line-height: 1.55; }
.pg-news .pg-post__date { font-size: var(--fz-caption); }
.pg-news .pg-post__tags { font-size: var(--fz-caption); }
/* The lead: the newest article, at the section size. */
.pg-news > .pg-post:first-child { padding-block: clamp(2rem, 1.4rem + 2vw, 3.5rem); }
.pg-news > .pg-post:first-child .pg-post__h {
  max-width: 22em;
  font-size: var(--fz-section);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.028em;
}
.pg-news > .pg-post:first-child .pg-post__p { font-size: var(--fz-body); line-height: 1.5; }
@media (min-width: 56.25em) {
  .pg-news .pg-post { grid-template-columns: 11rem minmax(0, 1fr); column-gap: clamp(1.5rem, 4vw, 4rem); }
  .pg-news .pg-post__date { padding-block-start: 0.5rem; }
  .pg-news > .pg-post:first-child .pg-post__date { padding-block-start: 1.3rem; }
}
/* Follow by RSS: a stand-alone link in the site's link style. */
.pg-feed {
  gap: 0.5em;
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
  transition: text-decoration-color var(--dur-hover) ease;
}
.pg-feed:hover { text-decoration-color: currentColor; }

/* --------------------------------------------------------------------------
   5  Legal pages
   The calmest pages of the site: the title, the policy's date as one small
   line under it, the text. No shape in the header. Long reading at the body
   size and a 66-character measure, each section opened by a hairline. The
   contents list is a <details>: closed on a phone and a tablet, so the text
   starts on the first screen; from 1100px it stands to the right of the
   text, always open, stays in view, and marks the section being read
   (js/page.js). The review notes in each file's front matter are never on
   the page.
   -------------------------------------------------------------------------- */
.pg-head--none { padding-block-start: calc(var(--nav-clear) + clamp(1.5rem, 5svh, 3.5rem)); }
.pg-meta--legal { margin-block-start: calc(-1 * var(--sp-2)); }

.pg-legal { padding-block-start: clamp(2rem, 5svh, 3.5rem); }
.pg-legal__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4svh, 2.5rem);
  align-items: start;
}
.pg-legal__in > .pg-prose { max-width: 41rem; font-size: var(--fz-body); line-height: 1.6; }
.pg-legal__in > .pg-prose h2 {
  margin-block-start: 2em;
  padding-block-start: 1.5em;
  border-block-start: 1px solid var(--hair);
  font-size: var(--fz-h-sm);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pg-legal__in > .pg-prose h2 + * { margin-block-start: 0.75em; }
.pg-legal__in > .pg-prose > h2:first-child { margin-block-start: 0; }
.pg-legal__in > .pg-prose li + li { margin-block-start: 0.6em; }
/* The address block at the end of the policy (three short lines) reads as one block. */
.pg-legal__in > .pg-prose h2[id="contact-us"] ~ p + p { margin-block-start: 0.3em; }
.pg-legal__address { margin-block-start: 0.75em; font-style: normal; }

/* The contents list. */
.pg-toc { border-block: 1px solid var(--hair); }
.pg-toc__h {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
}
.pg-toc__h::-webkit-details-marker { display: none; }
.pg-toc__n { color: var(--fg-2); font-weight: 400; }
.pg-toc__h::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  margin-inline-start: auto;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  transition: transform var(--dur-hover) ease;
}
.pg-toc[open] > .pg-toc__h::after { transform: translateY(0.15rem) rotate(-135deg); }
.pg-toc__list { display: grid; margin: 0; padding: 0 0 0.5rem; list-style: none; }
.pg-toc__list a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.375rem;
  font-size: var(--fz-small);
  line-height: 1.35;
  color: var(--fg);
  text-decoration: none;
  text-wrap: pretty;
}
.pg-toc__list a:hover,
.pg-toc__list a:focus-visible {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.24em;
}
@media (min-width: 68.75em) {
  .pg-legal__in {
    grid-template-columns: minmax(0, 41rem) minmax(14rem, 17rem);
    justify-content: space-between;
    column-gap: clamp(3rem, 6vw, 6rem);
  }
  .pg-legal__in > .pg-prose { grid-column: 1; grid-row: 1; }
  .pg-toc {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: var(--nav-clear);
    max-height: calc(100svh - var(--nav-clear) - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-start: 1.5rem;
    border-block: 0;
    box-shadow: inset 1px 0 0 var(--hair);
  }
  /* Always open here, whatever the element's state (and without a script). */
  .pg-toc::details-content { content-visibility: visible; block-size: auto; }
  .pg-toc__h { min-height: 2.5rem; font-size: var(--fz-caption); color: var(--fg-2); cursor: default; pointer-events: none; }
  .pg-toc__h::after, .pg-toc__n { display: none; }
  .pg-toc__list a { min-height: 2.5rem; font-size: var(--fz-caption); font-weight: 500; color: var(--fg-2); }
  .pg-toc__list a:hover, .pg-toc__list a:focus-visible { color: var(--link); }
  /* The section being read: ink, with the dots' violet as its mark. */
  .pg-toc__list a { position: relative; }
  .pg-toc__list a[aria-current] { color: var(--fg); }
  .pg-toc__list a[aria-current]::before { content: ""; position: absolute; inset-block: 0.5rem; inset-inline-start: -1.5rem; width: 2px; background: var(--c-violet); }
}

/* --------------------------------------------------------------------------
   6  About
   -------------------------------------------------------------------------- */
/* The founders (13 November 2026, the founder's brief): below the first screen, one row each, the
   portrait and the profile alternating sides from 900px with generous space between the rows. Each
   profile: the name, the role, a stand-out line at the section size, the highlights on hairlines, and
   the whole profile behind "Read more". The portrait is a particle portrait (js/founders.js), 264px
   at 1440 (the founder asked for smaller than the 616px of October). On a phone the portrait stands
   above the words, 152px. Nothing is painted behind the words. */
.cn-founders { overflow-x: clip; }      /* the portraits' dust may pass the column's edge: never a sideways scroll */
.cn-founders__head { margin-block-end: clamp(3rem, 9svh, 5.5rem); }
.cn-people {
  --orb: clamp(9.5rem, 5rem + 9.5vw, 16.5rem);
  display: grid;
  row-gap: clamp(4.5rem, 13svh, 8.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cn-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--sp-6);
  align-items: start;
  min-width: 0;
  scroll-margin-top: calc(var(--nav-clear) + 1rem);
}
@media (min-width: 56.25em) {
  .cn-person { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2.5rem, 6vw, 6.5rem); }
  .cn-person > .cn-orb { justify-self: center; margin-block-start: var(--sp-2); }
  /* the second founder: the words on the left, the portrait on the right */
  .cn-person:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .cn-person:nth-child(even) > .cn-orb { grid-column: 2; grid-row: 1; }
  .cn-person:nth-child(even) > .cn-person__text { grid-column: 1; grid-row: 1; }
}
/* The portrait's place is held before a dot is drawn, so nothing moves when it starts. The canvas is
   larger than the circle (the dust and the turn need room), sits under the words and never takes the
   pointer. */
.cn-orb {
  position: relative;
  width: min(var(--orb), 100%);
  aspect-ratio: 1;
}
.cn-orb__dots {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* The halftone, framed as the portrait: without a script, or if the dots cannot load. Its square is the
   generator's frame; the portrait's circle sits at (0.5, 0.452) of it with a radius of 0.47. */
.cn-orb__still {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 84%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 84%, transparent 100%);
}
.cn-orb__still img { position: absolute; inset-block-start: 1.9%; inset-inline-start: -3.2%; width: 106.4%; max-width: none; height: auto; }
.cn-orb.is-drawn .cn-orb__still { display: none; }
.cn-person__text { position: relative; display: grid; justify-items: start; align-content: start; min-width: 0; max-width: 40rem; }
.cn-person__name {
  font-size: var(--fz-h-sm);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cn-person__role { margin-block-start: var(--sp-1); font-size: var(--fz-small); font-weight: 500; color: var(--fg-2); }
/* The title (the founder, 14 November 2026: "GP and NIA Fellow", "Paediatrician and software engineer"):
   one quiet line under the role, at the role's size, in ink (the founder asked for it simpler; at the
   section size it was twice the size of the name). The name stays the largest line of the block. */
.cn-person__line {
  margin-block-start: 0.125rem;
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
  text-wrap: balance;
}
/* The summary: two sentences in the founder's words, in view without opening Read more. */
.cn-person__sum {
  max-width: 36rem;
  margin-block-start: var(--sp-4);
  font-size: var(--fz-lede);
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: pretty;
}
/* The highlights: ruled rows, as the site's other lists of facts. */
.cn-person__facts {
  justify-self: stretch;
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--hair);
}
.cn-person__facts > li {
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--hair);
  font-size: var(--fz-body);
  line-height: 1.45;
  color: var(--fg);
  text-wrap: pretty;
}
/* Read more: a native disclosure (open without a script, in print, and to find-in-page). */
.cn-more { justify-self: stretch; margin-block-start: var(--sp-3); }
.cn-more__s {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 2.75rem;
  font-size: var(--fz-small);
  font-weight: 500;
  color: var(--link);
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
  transition: text-decoration-color var(--dur-hover) ease;
}
.cn-more__s::-webkit-details-marker { display: none; }
.cn-more__s:hover { text-decoration-color: currentColor; }
.cn-more__s::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  transition: transform var(--dur-hover) ease;
}
.cn-more[open] > .cn-more__s::after { transform: translateY(0.1rem) rotate(-135deg); }
.cn-more__body { display: grid; gap: 1em; max-width: 40rem; padding-block: var(--sp-3) var(--sp-4); font-size: var(--fz-body); line-height: 1.6; color: var(--fg); }
.cn-more__body p { text-wrap: pretty; }
.cn-person__link { margin-block-start: var(--sp-2); font-size: var(--fz-small); }
@media (max-width: 56.24em) {
  .cn-people { --orb: 9.5rem; }
  .cn-person { row-gap: var(--sp-5); }
}

/* The team: one sentence, no names and no count, with a quiet group of small balls of dots beside it
   (js/founders.js, data-orb-team; decoration only). Words first (on a phone the balls follow the
   sentence); from 900px, in the founders' rhythm, the balls take the portrait's side of the next row. Without a script the balls are not there and the sentence stands
   alone. */
.cn-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: center;
  margin-block-start: clamp(4.5rem, 13svh, 8.5rem);
}
.cn-team__orbs { position: relative; width: min(100%, 21rem); height: 7.5rem; }
.cn-team__dots { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); pointer-events: none; }
html:not(.ui-js) .cn-team__orbs { display: none; }
html:not(.ui-js) .cn-team__p { grid-column: 1 / -1; }   /* no balls without a script: the sentence takes the row */
.cn-team__p { position: relative; max-width: 36rem; font-size: var(--fz-lede); line-height: 1.42; letter-spacing: -0.01em; color: var(--fg); text-wrap: pretty; }
@media (min-width: 56.25em) {
  .cn-team { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2.5rem, 6vw, 6.5rem); }
  .cn-team__orbs { grid-column: 1; grid-row: 1; justify-self: center; }
  .cn-team__p { grid-column: 2; grid-row: 1; }
}
@media (max-width: 56.24em) {
  .cn-team__orbs { height: 6rem; width: min(100%, 17rem); }
}

/* Ruled rows on these pages: a key column wide enough for "NHS Data Security and Protection
   Toolkit" without crowding the sentence. */
.cn-spec dd { max-width: 38rem; line-height: 1.5; }
.cn-spec dd .mono { font-size: 0.95em; }
/* A row whose value is a single link (Email, LinkedIn): a 44px target, without a taller row. */
.cn-spec dd > a:only-child { display: inline-flex; align-items: center; min-height: 2.75rem; margin-block: -0.625rem; }
@media (min-width: 37.5em) {
  .cn-spec > div { grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr); }
}
@media (min-width: 37.5em) {
  .cn-spec--compact > div { grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); }
}
.cn-after { margin-block-start: var(--sp-5); max-width: 40rem; }

/* --------------------------------------------------------------------------
   7  Contact
   Two ways in, side by side on one hairline and not in boxes: book a demo,
   and the address written out. Then the company details as ruled rows.
   -------------------------------------------------------------------------- */
.cn-contact { padding-block-start: clamp(1rem, 3svh, 2rem); }
.cn-ways {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 var(--col-gap);
}
@media (min-width: 45em) {
  .cn-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cn-way {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--sp-3);
  min-width: 0;
  padding-block: 1.5rem 2.5rem;
  border-block-start: 1px solid var(--hair-2);
}
.cn-way__act { margin-block: var(--sp-3) var(--sp-2); }
.cn-way__note { max-width: 28rem; color: var(--fg-2); }
/* The address, written out and linked (a mailto link alone does nothing in some browsers). The
   same height as the button beside it. */
.cn-way__p { margin-block: var(--sp-3) var(--sp-2); }
.cn-email {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  max-width: 100%;
  font-size: var(--fz-lede);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
  transition: color var(--dur-hover) ease;
}
.cn-email:hover { color: var(--link); }

/* --------------------------------------------------------------------------
   8  The 404 page
   -------------------------------------------------------------------------- */
.pg-head--mark + .pg-sec .pg-links { max-width: 40rem; }

/* --------------------------------------------------------------------------
   9  Print
   -------------------------------------------------------------------------- */
@media print {
  .pg-toc { display: none !important; }
  .cn-more::details-content { content-visibility: visible; block-size: auto; }
  .cn-more__s { display: none; }
  .pg-legal__in { display: block; }
  .pg-prose .pg-table { overflow: visible; }
  .pg-prose .pg-table caption { position: static; max-width: none; }
}
