/* The playground kit's styles: everything a paper playground needs beyond Designsystemet's
   components. Tokens only: colours, type, spacing and radii come from --ds-* variables.
   Markup for each piece is documented next to its rules. */
/* Third-party CSS goes in a sublayer of pp, so every pp.* rule below can override it. */
@import url('/vendor/uplot/uPlot.min.css') layer(pp.vendor);

@layer pp.playground {
  /* ================================================================ layout
     <main id="main" class="pp-bar pp-grid pp-grid-rail pp-layout">
       <nav class="pp-contents" aria-label="Contents">…</nav>
       <article class="pp-article">…</article>
     </main>
     On the page frame (chrome.css). From 80rem the body splits into the contents (rail) and the article
     (main), and margin notes float into the right rail. Below that the article fills the body up to its
     reading width and notes sit between paragraphs. */
  .pp-layout {
    padding-block: var(--ds-size-8) 0;
  }

  .pp-article {
    max-width: var(--pp-main);
    width: 100%;
  }

  .pp-contents {
    display: none;
  }

  @media (min-width: 80rem) {
    .pp-contents {
      display: block;
      grid-column: rail;
      grid-row: 1;
      position: sticky;
      top: var(--ds-size-6);
      align-self: start;
      max-height: calc(100vh - var(--ds-size-12));
      overflow-y: auto;
    }
  }

  /* ---- contents ----
     <nav class="pp-contents" aria-label="Contents"><p class="pp-contents-title">Contents</p>
       <ul><li><a href="#sec-1">…</a></li></ul></nav> */
  .pp-contents-title {
    margin: 0 0 var(--ds-size-2);
    padding-inline-start: var(--ds-size-4);
    font-weight: var(--ds-font-weight-semibold);
  }

  /* The article's typeface, colour and weight, one step smaller (16 px against 18 px body text), as
     secondary navigation should be: it reads as part of the document without competing with it. */
  .pp-contents {
    font-size: var(--ds-font-size-3);
    line-height: var(--ds-line-height-sm);
  }

  .pp-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-inline-start: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
  }

  .pp-contents a {
    display: block;
    margin-inline-start: calc(-1 * var(--ds-border-width-default));
    padding: var(--ds-size-1) var(--ds-size-4); /* about 29 px per entry: above the 24 px WCAG 2.2 target */
    border-inline-start: var(--ds-border-width-focus) solid transparent;
    color: var(--ds-color-neutral-text-default);
    text-decoration: none;
  }

  .pp-contents a:hover {
    text-decoration: underline;
  }

  .pp-contents a[aria-current] {
    border-inline-start-color: var(--ds-color-brand-base-default);
  }

  .pp-contents a:focus-visible {
    outline: var(--dsc-focus-outline);
  }

  /* ================================================================ article text
     Plain HTML inside .pp-article gets Designsystemet's type, so prose needs no classes. */
  .pp-article {
    font-size: var(--ds-font-size-4);
    line-height: var(--ds-line-height-lg);
  }

  /* Running text: paragraphs and plain lists. A list with a class (.pp-beyond, .ds-list) or inside a nav
     (breadcrumbs) styles itself. */
  .pp-article :where(p, ol:not(nav *), ul:not(nav *)) {
    margin: var(--ds-size-3) 0;
  }

  .pp-article :where(ol, ul):not([class], nav *) {
    padding-inline-start: var(--ds-size-6);
  }

  .pp-article :where(ol, ul):not([class], nav *) > li + li {
    margin-block-start: var(--ds-size-2);
  }

  .pp-article a:not([class]) {
    color: var(--ds-color-accent-text-subtle);
    text-underline-offset: 0.2em;
  }

  .pp-article code {
    font-family: inherit;
    font-style: italic;
    white-space: nowrap;
  }

  .pp-small {
    font-size: var(--ds-font-size-3);
    line-height: var(--ds-line-height-md);
  }

  .pp-subtle {
    color: var(--ds-color-neutral-text-subtle);
  }

  /* ---- article header: the opening (playgrounds/README.md, section 4) ----
     Title, the paper's byline (reference, abstract), our lead, the way in:
     <header class="pp-article-header">
       <h1 class="ds-heading" data-size="xl">…</h1>
       <!--#include citation -->
       <details class="ds-details pp-abstract" data-color="neutral"><summary>Abstract, as published</summary>
         <div><blockquote cite="https://doi.org/…"><p>…</p></blockquote></div></details>
       <p class="ds-paragraph pp-lead" data-size="lg"><strong>The hook.</strong> The rest of the lead.</p>
       <a class="ds-button pp-start" data-variant="secondary" href="#sec-model">Start with the model <span aria-hidden="true">↓</span></a>
     </header>
     A sub-page of a playground (one listed under Beyond this page) starts with <!--#include breadcrumbs --> above
     its h1, then the reference and a one-sentence lead (.pp-lead, no hook); no abstract, no way in. */
  .pp-article-header {
    padding-block-end: var(--ds-size-8);
  }

  .pp-breadcrumbs {
    margin-block-end: var(--ds-size-3);
  }

  .pp-citation {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-size-2);
    margin-block-start: var(--ds-size-4);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-3);
    line-height: var(--ds-line-height-md);
  }

  .pp-abstract {
    margin-block-start: var(--ds-size-4);
  }

  /* The lead stands on its own: space above it, the hook in the heading colour and weight. */
  .pp-lead {
    margin-block: var(--ds-size-10) var(--ds-size-6);
  }

  .pp-lead > strong:first-child {
    font-weight: var(--ds-font-weight-semibold);
  }

  /* The way in: one secondary button, a plain link to the first section. */
  .pp-start {
    margin-block-end: var(--ds-size-2);
  }

  /* The title is the paper's full title: one size down on a phone, so the lead and the way in reach the screen. */
  @media (max-width: 40rem) {
    .pp-article-header > h1.ds-heading[data-size="xl"] {
      font-size: var(--ds-heading-lg-font-size);
      line-height: var(--ds-heading-lg-line-height);
    }
  }

  .pp-abstract blockquote {
    margin: 0;
    padding-inline-start: var(--ds-size-4);
    border-inline-start: var(--ds-border-width-focus) solid var(--ds-color-neutral-border-subtle);
  }

  .pp-abstract blockquote > p:first-child {
    margin-block-start: 0;
  }

  .pp-citation pp-copy-button {
    flex: none;
    margin-block-start: calc(-1 * var(--ds-size-1));
  }

  /* The copy button points at what it copies: the reference text is highlighted (like a text marker,
     line by line) in the same colour as the button's own hover state. */
  .pp-citation > span {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background 0.15s;
  }

  .pp-citation:has(pp-copy-button:hover, pp-copy-button:focus-within) > span {
    background: var(--ds-color-accent-surface-hover);
  }

  /* ---- sections ----
     <section class="pp-section" id="sec-1" aria-labelledby="sec-1-title">
       <h2 class="ds-heading" data-size="md" id="sec-1-title"><span class="pp-section-number">1</span>…</h2> */
  .pp-section {
    padding-block: var(--ds-size-8) var(--ds-size-2);
    border-block-start: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    scroll-margin-top: var(--ds-size-6);
  }

  .pp-section > h2 {
    margin-block-end: var(--ds-size-3);
  }

  .pp-section h3 {
    margin-block: var(--ds-size-8) var(--ds-size-2);
  }

  .pp-section-number {
    margin-inline-end: var(--ds-size-3);
    color: var(--ds-color-neutral-text-subtle);
    font-weight: var(--ds-font-weight-regular);
  }

  /* ---- Beyond this page: the last section; .pp-beyond is its list of the playground's sub-pages ----
     <ul class="pp-beyond"><li><a class="ds-link" href="how-we-made-this/">How we made this</a><p>One line.</p></li></ul> */
  .pp-beyond {
    margin: var(--ds-size-4) 0 0;
    padding: 0;
    list-style: none;
  }

  .pp-beyond > li + li {
    margin-block-start: var(--ds-size-4);
  }

  .pp-beyond a {
    font-weight: var(--ds-font-weight-semibold);
  }

  .pp-beyond p {
    margin: var(--ds-size-1) 0 0;
    color: var(--ds-color-neutral-text-subtle);
  }

  /* ================================================================ figures, equations, math */
  .pp-article figure {
    margin: var(--ds-size-6) 0;
  }

  .pp-article figcaption {
    margin-block-start: var(--ds-size-3);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-3);
    line-height: var(--ds-line-height-md);
  }

  .pp-article figcaption b {
    color: var(--ds-color-neutral-text-default);
    font-weight: var(--ds-font-weight-semibold);
  }

  .pp-hint {
    margin-block-start: var(--ds-size-2);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-2);
  }

  /* <div class="pp-equation"><span class="pp-equation-number">(1)</span><span class="pp-math-display">TeX</span></div> */
  .pp-equation {
    display: flex;
    align-items: center;
    gap: var(--ds-size-3);
    margin: var(--ds-size-4) 0;
  }

  .pp-equation > .pp-math-display {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .pp-equation .katex-display {
    margin: var(--ds-size-1) 0;
  }

  .pp-equation-number {
    order: 2;
    flex: none;
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-2);
  }

  .pp-math-display {
    display: block;
  }

  /* A diagram drawn as inline SVG: use these classes instead of colours in attributes. */
  .pp-diagram {
    display: block;
    width: 100%;
    height: auto;
    padding: var(--ds-size-2);
    box-sizing: border-box;
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    border-radius: var(--ds-border-radius-lg);
    color: var(--ds-color-neutral-text-default);
  }

  .pp-diagram .d-box { fill: var(--ds-color-neutral-background-default); stroke: var(--ds-color-neutral-border-default); }
  .pp-diagram .d-box-strong { fill: var(--ds-color-neutral-background-default); stroke: var(--ds-color-neutral-text-default); }
  .pp-diagram .d-area { fill: var(--ds-color-neutral-background-tinted); stroke: var(--ds-color-neutral-text-default); }
  .pp-diagram .d-highlight { fill: var(--ds-color-brand-surface-tinted); stroke: var(--ds-color-brand-base-default); }
  .pp-diagram .d-title { fill: var(--ds-color-neutral-text-default); font-weight: var(--ds-font-weight-semibold); }
  .pp-diagram .d-text { fill: var(--ds-color-neutral-text-subtle); }
  .pp-diagram .d-label { fill: var(--ds-color-neutral-text-subtle); font-style: italic; }
  .pp-diagram .d-strong { fill: var(--ds-color-neutral-text-default); }
  .pp-diagram .d-line { stroke: var(--ds-color-neutral-text-default); }
  .pp-diagram .d-arrowhead { fill: var(--ds-color-neutral-text-default); }

  /* ================================================================ margin notes
     A note stands directly before the element that holds its anchor (several notes may stand in a row): it floats
     where it stands, so anywhere else it points at the wrong text. make check enforces this (checkNotes).
     kind: interpretation | discrepancy | caveat
     <aside class="pp-note" data-kind="discrepancy" data-note="a-c2">
       <strong class="pp-note-label">Text and figures differ</strong> …</aside>
     <p>… <mark class="pp-anchor" data-note="a-c2">the annotated phrase</mark> …</p>
     From 80rem the notes float into the right rail; below that they sit between paragraphs. */
  .pp-note {
    --pp-note-color: var(--ds-color-info-border-default);
    --pp-note-surface: var(--ds-color-info-surface-tinted);
    --pp-note-label: var(--ds-color-info-text-subtle);
    margin: var(--ds-size-4) 0;
    padding: var(--ds-size-3);
    border-radius: var(--ds-border-radius-md);
    background: var(--pp-note-surface);
    color: var(--ds-color-neutral-text-default);
    font-size: var(--ds-font-size-2);
    line-height: var(--ds-line-height-md);
    transition: box-shadow 0.15s;
  }

  .pp-note p {
    margin: var(--ds-size-2) 0 0;
  }

  .pp-note-label {
    display: block;
    margin-block-end: var(--ds-size-1);
    color: var(--pp-note-label);
    font-size: var(--ds-font-size-1);
    font-weight: var(--ds-font-weight-semibold);
  }

  .pp-note.pp-highlight {
    box-shadow: 0 0 0 var(--ds-border-width-default) var(--pp-note-color);
  }

  .pp-anchor {
    --pp-note-color: var(--ds-color-info-border-default);
    --pp-note-surface: var(--ds-color-info-surface-tinted);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background: none;
    color: inherit;
    padding: 0 1px;
    border-block-end: 2px solid var(--pp-note-color);
    transition: background 0.15s;
  }

  :is(.pp-note, .pp-anchor)[data-kind='discrepancy'] {
    --pp-note-color: var(--ds-color-danger-border-default);
    --pp-note-surface: var(--ds-color-danger-surface-tinted);
    --pp-note-label: var(--ds-color-danger-text-subtle);
  }

  :is(.pp-note, .pp-anchor)[data-kind='caveat'] {
    --pp-note-color: var(--ds-color-warning-border-default);
    --pp-note-surface: var(--ds-color-warning-surface-tinted);
    --pp-note-label: var(--ds-color-warning-text-subtle);
  }

  /* A highlighted anchor takes its note's background, so the pair reads as one. */
  .pp-anchor.pp-highlight {
    background: var(--pp-note-surface);
  }

  @media (min-width: 80rem) {
    .pp-note {
      --pp-note-gap: var(--pp-column-gap); /* the right rail of the page grid (chrome.css) */
      float: right;
      clear: right;
      position: relative;
      width: var(--pp-aside);
      box-sizing: border-box;
      margin: var(--ds-size-1) calc(-1 * var(--pp-aside) - var(--pp-note-gap)) var(--ds-size-3) 0;
    }

    /* A dotted connector across the gap, clear of the text on both ends. */
    .pp-note::before {
      content: '';
      position: absolute;
      inset-inline-start: calc(var(--ds-size-2) - var(--pp-note-gap));
      top: var(--ds-size-4);
      width: calc(var(--pp-note-gap) - var(--ds-size-4));
      border-block-start: var(--ds-border-width-focus) dotted var(--pp-note-color);
    }
  }

  /* ================================================================ controls
     Sliders: <div class="pp-slider"><label for="f1v">Speed <i>v</i></label>
                <input type="range" id="f1v" …><output id="f1vVal" for="f1v"></output></div> */
  .pp-slider {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) 6rem;
    gap: var(--ds-size-3);
    align-items: center;
    margin: var(--ds-size-2) 0;
    font-size: var(--ds-font-size-2);
    line-height: var(--ds-line-height-sm);
  }

  .pp-slider label {
    color: var(--ds-color-neutral-text-subtle);
  }

  .pp-slider input[type='range'] {
    width: 100%;
    margin: 0;
    accent-color: var(--ds-color-accent-base-default);
  }

  .pp-slider input[type='range']:focus-visible {
    outline: var(--dsc-focus-outline);
    outline-offset: 2px;
  }

  .pp-slider output {
    text-align: end;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  @media (max-width: 40rem) {
    .pp-slider {
      grid-template-columns: 6.5rem minmax(0, 1fr) 5rem;
      gap: var(--ds-size-2);
    }
  }

  /* A row of controls: fields, buttons and toggle groups that wrap. */
  .pp-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: var(--ds-size-3) var(--ds-size-5);
    margin: var(--ds-size-4) 0;
  }

  .pp-controls > .ds-field {
    margin: 0;
  }

  .pp-controls .ds-input[type='number'] {
    width: 7rem;
  }

  .pp-controls .ds-toggle-group {
    flex-wrap: wrap;
  }

  /* A settings panel that applies to the whole page: a tinted .ds-details. */
  .pp-settings {
    margin: var(--ds-size-6) 0 var(--ds-size-2);
  }

  .pp-settings > summary {
    font-size: var(--ds-font-size-3);
  }

  .pp-settings > div > :first-child {
    margin-block-start: 0;
  }

  /* ================================================================ stat tiles
     <div class="pp-stats" id="f1Readout"></div> filled with ui.js statTiles([[label, value], …]) */
  .pp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: var(--ds-size-2);
    margin: var(--ds-size-4) 0;
  }

  .pp-stat {
    padding: var(--ds-size-2) var(--ds-size-3);
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    border-radius: var(--ds-border-radius-md);
    background: var(--ds-color-neutral-surface-default);
  }

  .pp-stat-label {
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
    line-height: var(--ds-line-height-sm);
  }

  .pp-stat-value {
    margin-block-start: var(--ds-size-1);
    font-size: var(--ds-font-size-4);
    font-weight: var(--ds-font-weight-semibold);
    font-variant-numeric: tabular-nums;
    line-height: var(--ds-line-height-sm);
  }

  .pp-stat-value small {
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
    font-weight: var(--ds-font-weight-regular);
  }

  .pp-stat.pp-stat-main .pp-stat-value {
    font-size: var(--ds-font-size-5);
  }

  .pp-stat.pp-stat-stale .pp-stat-value {
    color: var(--ds-color-neutral-text-subtle);
  }

  .pp-flag {
    margin-inline-start: var(--ds-size-1);
    color: var(--ds-color-warning-text-subtle);
    font-size: var(--ds-font-size-1);
    font-weight: var(--ds-font-weight-medium);
  }

  /* ================================================================ tables */
  .pp-table-scroll {
    overflow-x: auto;
    margin: var(--ds-size-4) 0;
  }

  .pp-table-scroll .ds-table {
    width: 100%;
  }

  .pp-article .ds-table {
    font-size: var(--ds-font-size-2);
    line-height: var(--ds-line-height-sm);
  }

  .pp-article .ds-table caption {
    caption-side: bottom;
    padding-block-start: var(--ds-size-2);
    color: var(--ds-color-neutral-text-subtle);
    text-align: start;
  }

  .pp-num {
    text-align: end;
    font-variant-numeric: tabular-nums;
  }

  /* ================================================================ plots (see charts.js) */
  .pp-plot {
    position: relative;
    margin: var(--ds-size-4) 0 0;
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    border-radius: var(--ds-border-radius-lg);
    background: var(--ds-color-neutral-background-default);
    overflow: hidden;
    font-size: var(--ds-font-size-2);
    line-height: var(--ds-line-height-sm);
  }

  .pp-plot + .pp-plot {
    margin-block-start: var(--ds-size-3);
  }

  .pp-plot-head,
  .pp-plot-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: var(--ds-size-2) var(--ds-size-3);
    background: var(--ds-color-neutral-background-tinted);
  }

  .pp-plot-head {
    justify-content: space-between;
    gap: var(--ds-size-3);
    border-block-end: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
  }

  .pp-plot-title {
    color: var(--ds-color-neutral-text-default);
    font-weight: var(--ds-font-weight-medium);
  }

  .pp-plot-foot {
    gap: var(--ds-size-1) var(--ds-size-6);
    min-height: var(--ds-size-10);
    border-block-start: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
  }

  .pp-plot-body {
    position: relative;
    height: 340px;
    padding: var(--ds-size-2);
  }

  .pp-plot-foot .u-legend {
    margin: 0;
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
    text-align: start;
  }

  .pp-plot-foot .u-legend .u-series {
    display: inline-flex;
    align-items: center;
    margin-inline-end: var(--ds-size-5);
    padding: 0;
    vertical-align: middle;
    cursor: default;
  }

  /* A series without a label is left out of the legend (charts.js sets hidden; display above would undo it). */
  .pp-plot-foot .u-legend .u-series[hidden] {
    display: none;
  }

  .pp-plot-foot .u-legend .u-series:first-child .u-marker {
    display: none;
  }

  .pp-plot-foot .u-legend th {
    font-weight: var(--ds-font-weight-regular);
  }

  .pp-plot-foot .u-legend .u-value {
    color: var(--ds-color-neutral-text-default);
    font-variant-numeric: tabular-nums;
  }

  .pp-legend-extra {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-size-1) var(--ds-size-5);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
  }

  .pp-legend-extra > span {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-size-2);
    white-space: nowrap;
  }

  /* Legend swatches (charts.js): an SVG drawn from the series, 1 viewBox unit = 1 CSS px, so dash patterns
     and widths match the plot. Size in tokens: --ds-size-6 by --ds-size-3 (24 by 12 at the default scale). */
  .pp-legend-swatch {
    display: inline-block;
    flex-shrink: 0;
    width: var(--ds-size-6);
    height: var(--ds-size-3);
    overflow: visible;
    vertical-align: middle;
  }

  .pp-plot-foot .u-legend .u-marker.pp-legend-marker {
    display: inline-flex;
    width: auto;
    height: auto;
    margin-inline-end: var(--ds-size-2);
    border: 0;
    background: none;
  }

  .pp-legend-glyph {
    font-size: var(--ds-font-size-2);
  }

  /* Fullscreen: a CSS state, so it also works on iOS. */
  .pp-plot.pp-plot-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .pp-plot.pp-plot-fullscreen .pp-plot-body {
    flex: 1 1 0;
    min-height: 0;
    height: auto !important; /* overrides the inline height of the normal view */
    overflow: hidden;
  }

  .pp-plot.pp-plot-fullscreen > :not(.pp-plot-body) {
    flex: 0 0 auto;
  }

  :root.pp-no-scroll {
    overflow: hidden;
  }

  /* Extra content shown only in fullscreen, such as fit results and controls: <div class="pp-plot-extra"> */
  .pp-plot-extra {
    display: none;
    flex-direction: column;
    gap: var(--ds-size-2);
    padding: var(--ds-size-2) var(--ds-size-3);
    border-block-end: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
  }

  .pp-plot-fullscreen .pp-plot-extra {
    display: flex;
  }

  .pp-plot-extra .pp-stats {
    margin: 0;
  }

  /* Busy badge over a plot: <div class="pp-busy" role="status" hidden>spinner + text</div> */
  .pp-busy {
    position: absolute;
    top: var(--ds-size-3);
    inset-inline-end: var(--ds-size-4);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: var(--ds-size-2);
    padding: var(--ds-size-1) var(--ds-size-3);
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    border-radius: var(--ds-border-radius-full);
    background: var(--ds-color-neutral-background-default);
    box-shadow: var(--ds-shadow-xs);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
    pointer-events: none;
  }

  .pp-busy[hidden] {
    display: none;
  }

  .pp-busy progress {
    width: 4.5rem;
    height: 4px;
    accent-color: var(--ds-color-brand-base-default);
  }

  .pp-dim {
    opacity: 0.45;
    transition: opacity 0.15s;
  }

  /* ================================================================ details with the original figure */
  .pp-original {
    margin-block-start: var(--ds-size-2);
  }

  .pp-original img {
    display: block;
    width: 100%;
    height: auto;
    margin-block-start: var(--ds-size-2);
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
    background: #fff; /* scanned figures have a white background; keep it in dark mode */
  }
}
