/* ==========================================================================
   Pyrexia site: the secondary care pages and the Passport page
   /secondary-care, its three offer pages, and /digital-staff-passport.
   Loaded after css/site.css (each page names it with "css:" in its front
   matter, and build.mjs links it in the <head>). Every class here is prefixed tp-. Nothing
   redefines a flow- or pg- class. The product mocks are drawn with the app UI
   kit (css/app-ui.css, classes aui-, site/flow/APP-UI.md), which the build
   links on any page that uses it; the rules here only lay a mock out in its
   frame.

   One ground: paper. Nothing stands above a headline. No numbering with a
   leading zero: ordered steps carry their name, never a number.

   Contents
     1  Header additions (lede spans, staff buttons in the Passport header)
     2  Short answers (a heading and its answer side by side)
     3  Steps (an ordered list on a line of nodes)
     4  Figures, basis lines, links, the pull line
     5  The three offers as cards (overview)
     6  Mocks: the app's own UI
     7  Mock: AI shortlisting of applications
     8  Mock: staff record
     9  Mock: document review
    10  Mock: compliance across sites
    11  Mock: invoice batch
    12  Mock: complaints
    13  Mock: the holder's passport and the app
    14  The staff way in, the close band
    15  Forced colours, print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1  Header additions
   The lede is one <p> written by the build. A second sentence, a qualifier
   or (on the Passport page) the staff buttons sit inside it as spans, so
   they stay directly under the lede and can carry their own data-confirm.
   -------------------------------------------------------------------------- */
.pg-head__lede .tp-lede-2 { display: block; margin-block-start: var(--sp-4); }
/* The overview's title (/secondary-care) wraps the same way in Satoshi and in its fallback face:
   at 15em it took four lines in Satoshi and five in the fallback, so the header moved 78px when
   Satoshi arrived (desktop CLS 0.137 on slow 4G, 19 November 2026). At 9em both faces break it
   after "Workforce and", "software", "trusts.", "trusts", as every narrower window already does. */
html:has(.tp-offers) .pg-head__h { max-width: 9em; }
.pg-head__lede:has(.tp-acts) { max-width: 40rem; }
.pg-head__lede .tp-acts { margin-block-start: var(--sp-6); }
.pg-head__lede .tp-acts .flow-btn { letter-spacing: -0.01em; }
.pg-head__lede .tp-for {
  display: block;
  margin-block-start: var(--sp-3);
  font-size: var(--fz-small);
  line-height: 1.5;
  letter-spacing: 0;
}
@media (max-width: 37.49em) {
  .pg-head__lede .tp-acts { display: grid; }
  .pg-head__lede .tp-acts .flow-btn { width: 100%; }
}

/* The side section (a heading on the left, the content on the right) is site.css .pg-side. */

/* A compound word that should not break at its hyphen in display type (back-office, NHS-scale). */
.tp-nw { white-space: nowrap; }

/* A section head that is only a heading needs no gap under it beyond its own. */
.tp-head-tight { margin-block-end: clamp(1.5rem, 3.5svh, 2.5rem); }
.tp-stack { display: grid; gap: var(--sp-5); justify-items: start; min-width: 0; }

/* --------------------------------------------------------------------------
   2  Short answers
   A question as a heading on the left, its answer on the right, ruled. For
   the one-paragraph sections of a page, so each keeps its own heading
   without a screen of air around a single sentence.
   -------------------------------------------------------------------------- */
.tp-qa { display: grid; border-block-end: 1px solid var(--hair); }
.tp-qa__item {
  display: grid;
  gap: var(--sp-4) var(--col-gap);
  padding-block: clamp(1.75rem, 4svh, 2.75rem);
  border-block-start: 1px solid var(--hair);
}
.tp-qa__h { max-width: 18em; scroll-margin-top: var(--nav-clear); }
.tp-qa__a { display: grid; gap: var(--sp-4); justify-items: start; min-width: 0; }
.tp-qa__a > p { max-width: 36rem; font-size: var(--fz-body); line-height: 1.5; text-wrap: pretty; }
@media (min-width: 56.25em) {
  .tp-qa__item { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .tp-qa__h { padding-block-start: 0.1em; }
}

/* --------------------------------------------------------------------------
   3  Steps
   An ordered list. Each item starts with its name; no numeral is shown (the
   names are the markers, as on the home page). A hairline joins the nodes:
   down the left on a phone, across the top from 900px.
     <ol class="tp-steps tp-steps--3">, or tp-steps--v for a longer list
   -------------------------------------------------------------------------- */
.tp-steps {
  --node: 0.75rem;
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tp-step {
  position: relative;
  display: grid;
  gap: 0.375rem;
  align-content: start;
  min-width: 0;
  padding: 0 0 var(--sp-6) 2rem;
}
.tp-step:last-child { padding-block-end: 0; }
/* the line, then the node on it */
.tp-step::before {
  content: "";
  position: absolute;
  inset-block: 0.55em 0;
  inset-inline-start: calc(var(--node) / 2 - 0.5px);
  border-inline-start: 1px solid var(--hair-2);
}
.tp-step:last-child::before { display: none; }
.tp-step::after {
  content: "";
  position: absolute;
  inset-block-start: 0.45em;
  inset-inline-start: 0;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: var(--ground);
  box-shadow: inset 0 0 0 1.5px var(--fg);
}
.tp-step:last-child::after { background: var(--c-violet); box-shadow: none; }
.tp-step__t {
  font-size: var(--fz-h-sm);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.tp-step__p { max-width: 30rem; font-size: var(--fz-small); line-height: 1.55; text-wrap: pretty; }

/* Three steps lie across the column from 900px. A longer list (tp-steps--v) stays a vertical line
   at every width: it sits in a split, beside the record it fills. */
@media (min-width: 56.25em) {
  .tp-steps--3 { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: var(--col-gap); }
  .tp-steps--3 > .tp-step { padding: 2rem 0 0 0; }
  .tp-steps--3 > .tp-step::before {
    display: block;
    inset-block: calc(var(--node) / 2 - 0.5px) auto;
    inset-inline: 0 calc(-1 * var(--col-gap));
    border-inline-start: 0;
    border-block-start: 1px solid var(--hair-2);
  }
  .tp-steps--3 > .tp-step:last-child::before { display: block; inset-inline-end: 0; border-block-start-color: var(--hair); }
  .tp-steps--3 > .tp-step::after { inset-block-start: 0; }
}
.tp-steps--v > .tp-step { padding-block-end: var(--sp-5); }
.tp-steps--v > .tp-step:last-child { padding-block-end: 0; }
.tp-steps--v .tp-step__t { font-size: var(--fz-body); }
.tp-steps--v .tp-step__p { font-size: var(--fz-small); max-width: 32rem; }

/* --------------------------------------------------------------------------
   4  Figures, basis lines, links, the pull line
   -------------------------------------------------------------------------- */
/* Ruled rows of flagged facts: the key is a plain word, the sentence is ink. */
.tp-facts dd { max-width: 38rem; font-size: var(--fz-body); line-height: 1.5; }
.tp-facts dd p + p { margin-block-start: 0.5rem; }
/* Where a figure came from: visible, small, under the figures. */
.tp-basis { max-width: 36rem; margin-block-start: var(--sp-4); font-size: var(--fz-caption); line-height: 1.5; color: var(--fg-2); }
.tp-basis--tight { margin-block-start: 0; }

/* A row of plain text links (privacy, the DSPT register, an email). */
.tp-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--sp-6);
  margin: var(--sp-5) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fz-small);
}
/* A link straight under a basis note (the pilot's write-up): close to the note it continues. */
.tp-basis + .tp-links { margin-block-start: var(--sp-2); }

/* The Passport pledge: Pyrexia's own two sentences, set large behind a violet rule. */
.tp-pull {
  max-width: 40rem;
  margin-block-start: clamp(2rem, 5svh, 3.25rem);
  padding-inline-start: 1.25rem;
  border-inline-start: 2px solid var(--c-violet);
}
.tp-pull p {
  font-size: var(--fz-h-sm);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* A short list of plain points beside a paragraph (recruitment, invoice automation, the app). */
.tp-ticks { max-width: 38rem; }
.tp-ticks li { font-size: var(--fz-small); }

/* --------------------------------------------------------------------------
   5  The three offers (overview)
   site.css .pg-cards: three columns on hairlines, each a title that is the
   link and one sentence. No box, no icon.
   -------------------------------------------------------------------------- */
.tp-offers .pg-card__p { max-width: 30rem; }

/* --------------------------------------------------------------------------
   6  Mocks: the app's own UI
   Every product mock is drawn with the app UI kit (../css/app-ui.css, classes
   aui-, read site/flow/APP-UI.md): one .aui root inside the site's
   .flow-artefact__frame, which keeps the white card, its shadow and the
   "Example data" caption. The build links app-ui.css on any page that uses
   it. The rules here only lay a mock out in its frame: they never restyle
   an aui- part beyond what a narrow frame needs. app-ui.css is linked after
   this file, so a rule here that must win over one of its own carries one
   more class.
   -------------------------------------------------------------------------- */
.tp-fig { width: 100%; min-width: 0; }
.tp-fig--wide { margin-block-start: clamp(2rem, 5svh, 3rem); }
/* The frame is a container: a mock drawn as a page alone (header and body, no
   sidebar) takes the app's phone spacing when the frame is narrow. */
.tp-ui { container: tp-ui / inline-size; }
@container tp-ui (max-width: 34rem) {
  .tp-ui .aui-head { padding: calc(16em / 12) calc(16em / 12) 0; }
  .tp-ui .aui-head__toggle { display: none; }
  .tp-ui .aui-head__actions { margin-inline-start: 0; }
  .tp-ui .aui-body { padding: calc(16em / 12); }
}
/* A lens (the passport overlay) drawn flat in the frame: the frame is its edge. */
.tp-ui .tp-lens { border-radius: 0; box-shadow: none; }
.tp-ui .tp-lens__pad { gap: calc(12em / 12); padding: calc(12em / 12) calc(16em / 12) calc(24em / 12); }
/* A card footer's words on the left, its buttons on the right. */
.tp-foot__l { margin-inline-end: auto; }
/* A heading inside a card (the app's 14px/500). */
.tp-h { font-size: calc(14em / 12); line-height: calc(20 / 14); font-weight: 500; }

/* --------------------------------------------------------------------------
   7  Mock: AI shortlisting of applications (workforce)
   The stage page (Advert, Longlisting, Shortlisting, Decisions) and its
   person table. Narrow: the stage that is over, the criteria and the status
   columns give way, and the status takes the second line under the name (in
   place of the date applied), so the AI's first pass and the decision stay
   in view.
   -------------------------------------------------------------------------- */
.tp-st { white-space: nowrap; }
.tp-ui .tp-narrow { display: none; }
@container tp-ui (max-width: 34rem) {
  .tp-ui .tp-ltab-opt, .tp-ui .tp-col-crit, .tp-ui .tp-col-st, .tp-ui .tp-wide { display: none; }
  .tp-ui .tp-narrow { display: block; }
  .tp-ui .aui-table .aui-status { white-space: normal; align-items: flex-start; }
  .tp-ui .aui-table .aui-status > .aui-i { margin-block-start: calc(1em / 12); }
}

/* --------------------------------------------------------------------------
   8  Mock: staff record (workforce onboarding)
   The organisation's passport view of a new starter (sections and their
   percentages) beside the onboarding journey. Narrow: the lens stacks, and
   the sections sit above the journey in a compact grid (two or three to a
   line), so every width shows what the description says.
   -------------------------------------------------------------------------- */
@container aui-lens (max-width: 44em) {
  .tp-ui .tp-lens__secs .aui-secrows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(148em / 12), 1fr));
    padding: calc(4em / 12);
  }
  .tp-ui .tp-lens__secs .aui-secrow { min-height: calc(32em / 12); padding: calc(6em / 12) calc(12em / 12); border-radius: calc(10.4em / 12); }
}

/* --------------------------------------------------------------------------
   9  Mock: document review (workforce compliance)
   The analysed file (the committed upload row), then the record Pyrexia
   found, waiting for the team.
   -------------------------------------------------------------------------- */
.tp-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(4em / 12) calc(12em / 12);
  padding: calc(10em / 12) calc(12em / 12);
  border: 1px solid var(--aui-border);
  border-radius: calc(14em / 12);
}
.tp-file__name { display: inline-flex; align-items: center; gap: calc(8em / 12); min-width: 0; font-weight: 500; }
.tp-file__name > .aui-i { color: var(--aui-muted-fg); }
.tp-file__desc { grid-column: 1 / -1; color: var(--aui-muted-fg); }
.tp-recrow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(8em / 12) calc(12em / 12);
  padding: calc(8em / 12) calc(12em / 12);
  border: 1px solid var(--aui-border);
  border-radius: calc(11.2em / 12);
}
.tp-recrow__main { display: flex; flex-direction: column; min-width: 0; }
.tp-recrow__t { display: inline-flex; align-items: center; gap: calc(6em / 12); font-weight: 500; }
.tp-recrow__d { color: var(--aui-muted-fg); }
@container tp-ui (max-width: 34rem) {
  .tp-file { grid-template-columns: minmax(0, 1fr); }
  .tp-ui .tp-foot__l { flex-basis: 100%; }
}

/* --------------------------------------------------------------------------
   10  Mock: compliance across sites (workforce)
   The Compliance summary, read as a table: the frame is not an image, the
   table has a caption, and the header and toolbar are hidden from screen
   readers. Each name is a row header, drawn as the app draws its first
   column (a th of normal weight, on the row's own rule). Narrow: the
   reminder column gives way and the table scrolls inside its card, the name
   pinned.
   -------------------------------------------------------------------------- */
.tp-ui .aui-table tbody th {
  height: auto;
  padding: calc(8em / 12) calc(8em / 12) calc(8em / 12) calc(16em / 12);
  border-bottom: 1px solid var(--aui-border);
  box-shadow: none;
  font-weight: 400;
}
.tp-ui .aui-table tbody tr:last-child th { border-bottom: 0; }
/* The scroller is focusable (tabindex, a named region), so a keyboard can reach the columns past the
   edge; its focus ring sits inside the card. */
.tp-ui .aui-tscroll[tabindex] { overscroll-behavior-x: contain; }
.tp-ui .aui-tscroll[tabindex]:focus-visible { outline: 2px solid var(--aui-primary); outline-offset: -2px; }
@container tp-ui (max-width: 34rem) {
  .tp-ui .tp-col-rem { display: none; }
}

/* --------------------------------------------------------------------------
   11  Mock: invoice batch (timesheets and invoicing)
   The counts as filter tiles, the invoice rows (ref, the week, amount, the
   include switch, status) and the submit button as the page's action.
   Display only. Narrow: the week and the amount give way.
   -------------------------------------------------------------------------- */
.tp-ui .tp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-ui .tp-tiles .aui-tile__label { align-items: flex-start; }
.tp-ui .tp-tiles .aui-tile__label > .aui-dot { margin-block-start: calc(5.75em / 12); }
@container tp-ui (max-width: 34rem) {
  .tp-ui .tp-col-wk, .tp-ui .tp-col-amt { display: none; }
}

/* --------------------------------------------------------------------------
   12  Mock: complaints (complaints management)
   A case list (filter chips, then each complaint: what it is about and its
   state, where it came from and who answers, the categories the AI found)
   beside the key issues across all complaints.
   -------------------------------------------------------------------------- */
.tp-ui .tp-cmp-grid { align-items: start; }
.tp-queue__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(8em / 12);
  padding: calc(12em / 12);
  border-bottom: 1px solid var(--aui-border);
}
.tp-case__top { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(4em / 12) calc(12em / 12); }
.tp-case__top > .aui-badge { flex: none; }
.tp-case__top + .aui-row__desc { margin-block-start: calc(4em / 12); }
.tp-case__tags { display: flex; flex-wrap: wrap; align-items: center; gap: calc(4em / 12); margin-block-start: calc(8em / 12); }
.tp-case__tags > .aui-status { margin-inline-end: calc(4em / 12); }
.tp-ui .tp-issues .aui-type__label { text-decoration: none; }
/* Counts are a chart series in the app (chart-3, as its login and learning bars), not progress. */
.tp-ui .tp-issues .aui-bar__fill { background: var(--aui-chart-3); }

/* --------------------------------------------------------------------------
   13  Mock: the holder's passport and the app (the Passport page)
   -------------------------------------------------------------------------- */
.tp-passfig { justify-items: start; }
.tp-passfig > .flow-artefact__cap, .tp-ui--pass { width: min(100%, 38rem); }
.tp-ready { display: flex; align-items: center; gap: calc(12em / 12); }
.tp-ready__t { font-size: calc(14em / 12); line-height: calc(20 / 14); font-weight: 500; }
.tp-ok { display: flex; align-items: flex-start; gap: calc(6em / 12); color: var(--aui-success-text); font-weight: 500; }
.tp-ok > .aui-i { margin-block-start: calc(2.75em / 12); color: var(--aui-success); }
.tp-shared { display: flex; flex-direction: column; align-items: flex-start; gap: calc(4em / 12); }

/* The phone: the staff home at 390px in its device outline. On a phone it is
   set at 10px a point, so the whole phone fits 22rem; from 480px it takes the
   app's 12px, like the passport above it, in a 26rem frame. The device has a
   height in its own em (so it scales), a little more than its content, so the
   crop's fade falls below the passport card, not on its last row. */
.tp-appfig { justify-items: center; }
.tp-appfig > .flow-artefact__cap { width: min(100%, 22rem); }
.tp-app__frame { display: grid; justify-items: center; width: min(100%, 22rem); }
.aui.tp-appui { width: 100%; font-size: 0.625rem; }
.tp-appui .aui-device { height: 50em; overflow: hidden; }
.tp-appui .aui-device__screen { flex: 1 0 auto; }
/* Under 360px the phone is scaled to the column (it is 34.1em wide at its own size), so a 320px
   window does not scroll sideways. */
@media (max-width: 22.49em) { .aui.tp-appui { font-size: calc((100vw - 2 * var(--pad-x, 1rem)) / 34.4); } }
/* Until the Google Play address is known, Android is a line of text under the App Store button. */
.tp-play { margin-block-start: var(--sp-3); color: var(--fg); }
@media (min-width: 30em) {
  .tp-appfig > .flow-artefact__cap, .tp-app__frame { width: min(100%, 26rem); }
  .aui.tp-appui { font-size: 0.75rem; }
}

/* --------------------------------------------------------------------------
   14  The staff way in, the close band
   -------------------------------------------------------------------------- */
/* The staff way in: the app and the web, ring buttons (never the ink "Book a demo"). */
.tp-staff {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
  max-width: 38rem;
  margin-block-start: var(--sp-2);
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--hair);
}
.tp-staff__l { font-size: var(--fz-lede); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
@media (max-width: 37.49em) {
  .tp-staff .flow-actions { display: grid; }
  .tp-staff .flow-btn { width: 100%; }
}


/* --------------------------------------------------------------------------
   15  Forced colours, print
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .tp-step::after { forced-color-adjust: none; background: CanvasText; }
  .tp-file, .tp-recrow { border: 1px solid CanvasText; }
}
@media print {
  .tp-staff, .tp-acts { display: none !important; }
}
