/* mcmaster-epg protocol page (protocol.html). Loaded after style.css, whose tokens,
   fonts, top bar, badges, buttons and footer it uses. Prose is set in Source Serif 4,
   labels and tables in IBM Plex Sans, program text in IBM Plex Mono. Teal marks the
   procedure (steps, links, figures), ochre stays reserved for uncertainty as on the
   main page. The figure classes at the end are written by build_protocol.py. */

/* ------------------------------------------------------------------ helpers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.protocol-page [id] {
  scroll-margin-top: 1.25rem;
}

/* the skip link moves the focus to main, which needs no ring of its own */
.p-main:focus {
  outline: none;
}

/* ------------------------------------------------------------------ top bar */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.brand-sub {
  margin-left: 0.7rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}

.tb-button {
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.tb-button:hover {
  border-color: var(--rule-strong);
}

@media (max-width: 40rem) {
  .brand-sub {
    display: none;
  }
}

/* ------------------------------------------------------------------ hero */
.p-hero {
  border-bottom: 1px solid var(--rule);
}

.p-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
  gap: 2rem clamp(2rem, 4vw, 4rem);
  align-items: start;
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.p-hero h1 {
  font-size: clamp(1.85rem, 1.15rem + 2.3vw, 3.05rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 23em;
}

.p-authors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
  margin: 0 0 0.6rem;
  padding: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.p-authors li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.p-author {
  font-weight: 600;
}

.p-authors sup {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--muted);
}

.p-role {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.orcid {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -12px -10px;
}

.orcid-mark {
  width: 1.05rem;
  height: 1.05rem;
}

.orcid-bg {
  fill: #a6ce39;
}

.orcid-fg {
  fill: #ffffff;
}

.p-affils {
  margin: 0 0 1.4rem;
  padding-left: 1.1rem;
  max-width: 72ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.p-affils li::marker {
  font-size: 0.75rem;
}

.p-badges {
  margin: 0;
}

.badge-strong {
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* cite box */
.p-cite {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-m);
  padding: 1.1rem 1.25rem 1rem;
  box-shadow: var(--shadow);
}

.p-cite-title {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.p-cite-text {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 0.975rem;
  line-height: 1.5;
  color: var(--ink);
}

.p-cite-label {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.p-cite-small {
  font-size: 0.875rem;
  color: var(--ink-2);
}

.p-cite-actions {
  margin: 0;
}

.p-cite-actions button {
  font-size: 0.875rem;
}

/* procedure at a glance: the sections A to G as one track */
.p-glance {
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.glance {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

.glance li {
  position: relative;
}

.glance li::before {
  content: "";
  position: absolute;
  top: 1.45rem;
  left: 2.9rem;
  right: 0.25rem;
  height: 2px;
  background: var(--rule);
}

.glance li:last-child::before {
  display: none;
}

.glance a {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 0.25rem 0.9rem 0.25rem 0;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.glance-letter {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.glance a:hover .glance-letter,
.glance a:focus-visible .glance-letter {
  background: var(--accent);
  color: var(--accent-ink);
}

.glance-title {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
}

.glance a:hover .glance-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.glance-count {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 64rem) {
  .p-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-cite {
    max-width: 40rem;
  }
  .glance {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 1.25rem;
  }
  .glance li:nth-child(4)::before {
    display: none;
  }
}

@media (max-width: 40rem) {
  .glance {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
  .glance li::before {
    top: 2.75rem;
    bottom: -0.25rem;
    left: 1.2rem;
    right: auto;
    width: 2px;
    height: auto;
    display: block;
  }
  .glance li:nth-child(4)::before {
    display: block;
  }
  .glance li:last-child::before {
    display: none;
  }
  .glance a {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.85rem;
    row-gap: 0;
    padding: 0.4rem 0;
  }
  .glance-letter {
    grid-row: 1 / span 2;
  }
}

/* ------------------------------------------------------------------ layout */
.p-layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.p-toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 0.875rem;
}

.toc-box {
  border: 0;
}

.toc-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.toc,
.toc-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-sub {
  margin: 0.1rem 0 0.4rem 0.9rem;
  border-left: 1px solid var(--rule);
}

.toc a {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  align-items: baseline;
  padding: 0.28rem 0.5rem 0.28rem 0.4rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.3;
}

.toc-sub a {
  margin-left: -1px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.toc a:hover {
  color: var(--accent-text);
  background: var(--surface);
}

.toc a[aria-current="true"] {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.toc-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent-text);
}

.toc-sub .toc-num {
  font-weight: 500;
}

@media (max-width: 63.99rem) {
  .p-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    padding-top: 1.5rem;
  }
  .p-toc {
    position: static;
    max-height: none;
    overflow: visible;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-m);
    padding: 0 1rem;
  }
  .toc-box[open] {
    padding-bottom: 0.75rem;
  }
  .toc a {
    min-height: 44px;
    align-items: center;
  }
}

/* ------------------------------------------------------------------ text */
.p-main {
  min-width: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-optical-sizing: auto;
}

.p-main p,
.p-main li,
.p-main dd {
  max-width: 72ch;
}

.p-main p {
  margin: 0 0 1rem;
}

.p-main code {
  font-size: 0.84em;
  padding: 0.06em 0.3em;
  border-radius: 4px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}

.p-main pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
}

.p-section {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.p-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.p-section > h2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
}

.sec-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.55rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent-text);
}

.p-procedure > h2 .sec-num {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.p-sub {
  margin-top: 2.25rem;
}

.p-sub > h3 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

.sub-num {
  flex: none;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.par {
  border-bottom: 1px dotted var(--rule-strong);
}

.src {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.sourced {
  padding-left: 1.2rem;
}

.sourced li {
  margin: 0 0 0.6rem;
}

.cite {
  font-family: var(--sans);
  font-size: 0.8em;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.cite:hover {
  text-decoration: underline;
}

/* definitions */
.defs {
  margin: 1.25rem 0;
}

.defs > div {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 0.35rem 1.5rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.defs > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.defs dt {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  padding-top: 0.15rem;
}

.defs dd {
  margin: 0;
}

.defs dd > :last-child {
  margin-bottom: 0;
}

/* before start */
.checklist {
  list-style: none;
  counter-reset: chk;
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0;
}

.checklist li {
  position: relative;
  counter-increment: chk;
  padding: 0.95rem 1.1rem 0.95rem 3.4rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
}

.checklist li::before {
  content: counter(chk);
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-text);
}

.check-head {
  margin-bottom: 0.2rem;
}

.check-title {
  font-family: var(--sans);
  font-size: 0.975rem;
}

.check-id {
  margin-right: 0.5rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent-text);
}

.checklist p {
  margin: 0;
}

/* alerts */
.alert {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: var(--accent-soft);
}

.alert-warning {
  border-left-color: var(--error);
  background: var(--error-soft);
}

.alert-label {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
}

.alert > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ steps */
.step {
  margin: 1.75rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
}

.step-lab {
  border-left-color: var(--rule-strong);
}

.step-head {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 1rem 1.25rem 0.9rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.step-id {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-text);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
}

.step-lab .step-id {
  color: var(--ink-2);
}

.step-head h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
}

.step-kind {
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.step-fields {
  margin: 0;
  padding: 0.25rem 1.25rem 0.5rem 1.1rem;
}

.sf {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.sf:first-child {
  border-top: 0;
}

.sf dt {
  padding-top: 0.2rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
}

.sf dd {
  margin: 0;
  min-width: 0;
}

.sf dd > :first-child {
  margin-top: 0;
}

.sf dd > :last-child {
  margin-bottom: 0;
}

.sf-note dt {
  color: var(--accent-text);
}

.sf-warning {
  margin: 0 -1.25rem 0 -1.1rem;
  padding-left: 1.1rem;
  padding-right: 1.25rem;
  background: var(--error-soft);
  border-top-color: transparent;
}

.sf-warning dt {
  color: var(--error);
}

.sf-warning + .sf {
  border-top-color: transparent;
}

.sf-source dd {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.step-app {
  margin: 0;
  padding: 0.35rem 1.25rem 0.5rem 1.1rem;
  border-top: 1px solid var(--rule);
}

.app-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
}

.step > .plate {
  margin: 0.5rem 1.25rem 1.25rem 1.1rem;
}

@media (max-width: 45rem) {
  .step-head {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.9rem 1rem 0.8rem;
  }
  .step-id {
    grid-column: 1;
    font-size: 1.5rem;
  }
  .step-kind {
    grid-column: 2;
    grid-row: 1;
  }
  .step-head h3 {
    grid-column: 1 / -1;
  }
  .step-fields {
    padding: 0.25rem 1rem 0.5rem;
  }
  .sf {
    grid-template-columns: minmax(0, 1fr);
  }
  .sf-warning {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .step-app {
    padding: 0.35rem 1rem 0.5rem;
  }
  .step > .plate {
    margin: 0.5rem 0 1rem;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .plate-art {
    padding: 0.25rem 0;
  }
  .defs > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* commands and program output */
/* A command wraps inside its box; the Copy button has its own column (its own row on
   narrow screens), so no part of a command is ever under it. */
.cmd {
  display: flex;
  align-items: flex-start;
  margin: 0.15rem 0 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-s);
}

.cmd pre {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  .cmd {
    flex-direction: column;
  }
  .cmd pre {
    align-self: stretch;
    padding-top: 0.35rem;
  }
  .copy-cmd {
    order: -1;
    align-self: flex-end;
  }
}

.p-main .cmd code {
  font-size: inherit;
  overflow-wrap: anywhere;
}

.cmd .tok {
  display: inline-block;
  max-width: 100%;
}

.copy {
  font-family: var(--sans);
  font-size: 0.8125rem;
}

.copy-cmd {
  flex: none;
  margin: 0.3rem;
  min-height: 36px;
  padding: 0.2rem 0.75rem;
  background: var(--surface);
  color: var(--accent-text);
  border-color: var(--rule-strong);
}

.copy-cmd:hover {
  border-color: var(--accent);
}

.output {
  margin: 0.9rem 0 1.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-s);
  background: var(--paper);
  overflow: hidden;
}

.output figcaption,
.output summary {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.output summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.output-long:not([open]) summary {
  border-bottom: 0;
}

.out-lines {
  margin-left: 0.5rem;
  color: var(--muted);
}

.output pre {
  max-height: 34rem;
  padding: 0.75rem 0.9rem;
  overflow: auto;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink);
}

.output pre:focus-visible,
.cmd pre:focus-visible,
.table-wrap:focus-visible {
  outline-offset: -3px;
}

/* ------------------------------------------------------------------ figures */
.plate {
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
  overflow: hidden;
}

/* The layout of a figure follows the width of its plate: the wide drawing from 760 px,
   the narrow one below (at most 600 px wide), so that figure text is at least 12 px. */
.plate-art {
  container-type: inline-size;
  padding: clamp(0.4rem, 1.5vw, 1rem);
}

.fig-svg {
  display: block;
  width: 100%;
  height: auto;
}

.fig-narrow {
  display: none;
}

@container (max-width: 759.98px) {
  .fig-wide {
    display: none;
  }
  .fig-narrow {
    display: block;
    max-width: 600px;
    margin: 0 auto;
  }
}

.plate figcaption {
  padding: 0.95rem 1.25rem 1.1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.plate-num {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.plate-title {
  font-weight: 600;
  color: var(--ink);
}

.plate-file {
  font-family: var(--sans);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ tables */
.table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.45;
}

.table-wide table {
  min-width: 46rem;
}

.table-wrap caption {
  caption-side: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-family: var(--serif);
  font-size: 0.97rem;
  color: var(--ink-2);
}

.tbl-num {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.table-wrap th,
.table-wrap td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.table-wrap thead th {
  background: var(--surface-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.table-wrap tbody th {
  font-weight: 550;
  color: var(--ink);
}

.table-wrap td {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.table-wrap tbody tr:last-child > * {
  border-bottom: 0;
}

.table-wrap code {
  font-size: 0.8rem;
}

.cell-range {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.table-notes {
  margin: -0.5rem 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.notes-label {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.table-notes ol {
  margin: 0;
  padding-left: 1.3rem;
}

.table-notes li {
  margin-bottom: 0.35rem;
}

/* ------------------------------------------------------------------ references */
.refs {
  margin: 1rem 0;
  padding-left: 2.2rem;
}

.refs li {
  margin: 0 0 0.85rem;
  padding-left: 0.3rem;
}

.refs li::marker {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-text);
}

.refs a {
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.ref-why {
  display: block;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
}

/* ------------------------------------------------------------------ print */
@media print {
  .skip-link,
  .topbar,
  .p-toc,
  .p-glance,
  .copy,
  .p-cite-actions,
  .plate-file,
  .step-app {
    display: none !important;
  }

  .p-hero-grid {
    display: block;
    padding-top: 0;
  }

  .p-cite {
    margin-top: 1rem;
    box-shadow: none;
    break-inside: avoid;
  }

  .p-layout {
    display: block;
    padding: 0;
  }

  .p-main {
    font-size: 10.5pt;
  }

  .p-main p,
  .p-main li,
  .p-main dd {
    max-width: none;
  }

  .p-section {
    break-before: page;
    border-top: 0;
    margin-top: 0;
  }

  .p-section:first-child {
    break-before: auto;
  }

  .step,
  .plate,
  .table-wrap {
    box-shadow: none;
  }

  .plate,
  .output,
  .step-head,
  .checklist li,
  .defs > div {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  .fig-wide {
    display: block !important;
  }

  .fig-narrow {
    display: none !important;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wide table {
    min-width: 0;
  }

  .output pre,
  .cmd pre {
    max-height: none;
    overflow: visible;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* the address of every link whose text is not the address itself */
  .p-main a[href^="http"]:not(.u)::after,
  .p-hero a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--sans);
    font-size: 0.8em;
    color: #444444;
    overflow-wrap: anywhere;
  }

  .p-main a[href^="index.html"]::after {
    content: " (https://maciejkochanowski.github.io/mcmaster-epg/" attr(href) ")";
    font-family: var(--sans);
    font-size: 0.8em;
    color: #444444;
    overflow-wrap: anywhere;
  }

  .refs a::after,
  .p-main .refs a[href^="http"]::after {
    content: none;
  }

  .site-footer {
    display: none;
  }
}

/* figure classes: begin (written by docs/protocol/tools/build_protocol.py) */
.fig-svg{font-family:var(--sans)}
.fig-svg .fg-h{font-family:var(--serif)}
.fig-svg .fg-mono{font-family:var(--mono)}
.fig-svg .fg-bg{fill:var(--surface)}
.fig-svg .fg-lane{fill:var(--paper);stroke:var(--rule);stroke-width:1}
.fig-svg .fg-box{fill:var(--surface);stroke:var(--rule-strong);stroke-width:1.5}
.fig-svg .fg-box-soft{fill:var(--surface-2);stroke:var(--rule);stroke-width:1}
.fig-svg .fg-box-acc{fill:var(--accent-soft);stroke:var(--accent);stroke-width:1.5}
.fig-svg .fg-box-sig{fill:var(--signal-soft);stroke:var(--signal);stroke-width:1.5}
.fig-svg .fg-box-ex{fill:var(--surface);stroke:var(--signal);stroke-width:1.5}
.fig-svg .fg-box-dash{fill:var(--surface);stroke:var(--rule-strong);stroke-width:1.5;stroke-dasharray:6 4}
.fig-svg .fg-fill-acc{fill:var(--accent)}
.fig-svg .fg-tag{fill:var(--surface);stroke:var(--accent);stroke-width:1.2}
.fig-svg .fg-t{fill:var(--ink)}
.fig-svg .fg-t2{fill:var(--ink-2)}
.fig-svg .fg-tm{fill:var(--muted)}
.fig-svg .fg-ta{fill:var(--accent-text)}
.fig-svg .fg-ts{fill:var(--signal-text)}
.fig-svg .fg-ton{fill:var(--accent-ink)}
.fig-svg .fg-flow{fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fig-svg .fg-head{fill:var(--accent)}
.fig-svg .fg-line{fill:none;stroke:var(--ink-2);stroke-width:1.5}
.fig-svg .fg-thin{fill:none;stroke:var(--rule-strong);stroke-width:1}
.fig-svg .fg-dim{fill:none;stroke:var(--muted);stroke-width:1.2}
.fig-svg .fg-grid{fill:none;stroke:var(--rule);stroke-width:1}
.fig-svg .fg-axis{fill:none;stroke:var(--rule-strong);stroke-width:1.2}
.fig-svg .fg-ci{fill:none;stroke:var(--signal);stroke-width:3.5;stroke-linecap:butt}
.fig-svg .fg-cap{fill:none;stroke:var(--signal);stroke-width:2}
.fig-svg .fg-pt{fill:var(--accent);stroke:var(--surface);stroke-width:2}
.fig-svg .fg-pt-open{fill:var(--surface);stroke:var(--accent);stroke-width:2.5}
.fig-svg .fg-curve{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round}
.fig-svg .fg-mark{fill:var(--surface);stroke:var(--ink-2);stroke-width:2}
.fig-svg .fg-mark-fill{fill:var(--ink-2);stroke:var(--surface);stroke-width:1.5}
.fig-svg .fg-ref1{fill:none;stroke:var(--ink-2);stroke-width:1.5;stroke-dasharray:2 4}
.fig-svg .fg-ref2{fill:none;stroke:var(--ink-2);stroke-width:1.5;stroke-dasharray:9 5}
.fig-svg .fg-band-bg{fill:var(--signal-soft)}
.fig-svg .fg-hatch{stroke:var(--signal);stroke-opacity:0.6;stroke-width:1.2}
.fig-svg .fg-band{fill:none;stroke:var(--signal);stroke-width:1.2;stroke-dasharray:5 3}
.fig-svg .fg-open{fill:var(--signal)}
.fig-svg .fg-s1{fill:var(--stage-1)}
.fig-svg .fg-s2{fill:var(--stage-2)}
.fig-svg .fg-s3{fill:var(--stage-3)}
.fig-svg .fg-neg{fill:var(--surface-2);stroke:var(--rule-strong);stroke-width:1;stroke-dasharray:3 2}
.fig-svg .fg-ts1{fill:var(--stage-1-ink)}
.fig-svg .fg-ts2{fill:var(--stage-2-ink)}
.fig-svg .fg-ts3{fill:var(--stage-3-ink)}
.fig-svg .fg-gap{fill:none;stroke:var(--surface);stroke-width:2}
.fig-svg .fg-slide{fill:var(--surface);stroke:var(--rule-strong);stroke-width:1.5}
.fig-svg .fg-field{fill:var(--surface-2);stroke:var(--ink-2);stroke-width:1.5}
.fig-svg .fg-grid-fill{fill:var(--accent);fill-opacity:0.2;stroke:var(--accent);stroke-width:1.8}
.fig-svg .fg-engr{fill:none;stroke:var(--accent);stroke-width:1;stroke-opacity:0.8}
.fig-svg .fg-read{fill:var(--accent);fill-opacity:0.42;stroke:var(--accent);stroke-width:2.5}
.fig-svg .fg-unread{fill:var(--surface);stroke:var(--rule-strong);stroke-width:1.2;stroke-dasharray:4 3}
.fig-svg .fg-liquid{fill:var(--accent-soft);stroke:none}
.fig-svg .fg-glass{fill:none;stroke:var(--ink-2);stroke-width:2.2;stroke-linejoin:round}
.fig-svg .fg-slip{fill:var(--surface);stroke:var(--ink-2);stroke-width:1.8}
.fig-svg .fg-egg{fill:var(--signal-soft);stroke:var(--signal);stroke-width:1.4}
.fig-svg .fg-halo{paint-order:stroke;stroke:var(--surface);stroke-width:5px;stroke-linejoin:round}
.fig-svg .fg-halo-paper{paint-order:stroke;stroke:var(--paper);stroke-width:5px;stroke-linejoin:round}
/* figure classes: end */
