/* paperless.media (media/media-paperless.html), after charte.css and
   landing.css (charter V4, 20/11): the site's colour (--a, the bubble of
   its mark, pmcharte/sites.go: keep the two the same), a touch only, never
   a text colour; the hero's network (.pl-net): their systems, two wires,
   the organisation, three brands, their templates and their cards, drawn
   in rules and fills, each brand's colour (--b) on its node and its
   cards; the code a sheet or an answer quotes, in the charter's monospace
   and never wider than its column; the questionnaire's columns.
   Decorations are clipped (overflow-x: clip), never the page widened.
   Motion: the wires' light (transform, opacity), a brand's colour running
   down to its cards (transition delays); none under "reduced motion". */

:root[data-pm='paperless'] { --a: #94A3B8; }
html[data-pm='paperless'] body { overflow-x: clip; }
/* the header's mark: 30 px as on every landing; a phone keeps it at 26 px
   (its « .media » still in outline), the name being longer than a .pm's */
@media (max-width: 420px) { .ld-top .ld-logo .wm { font-size: 26px; } }
@supports not (overflow-x: clip) { html[data-pm='paperless'] body { overflow-x: hidden; } }

/* ── the network ── */
.pl-hero { align-items: center; }
.pl-net { margin: 0; min-width: 0; --g: 26px; --line: var(--soft); }
.pl-grid { display: grid; grid-template-columns: 5.6em repeat(6, minmax(0, 1fr)); column-gap: 10px; row-gap: var(--g); align-items: center; }
.pl-grid > * { min-width: 0; }

/* their systems: a dashed frame, what they already have */
.pl-si { grid-column: 2 / -1; display: grid; gap: 2px; padding: 14px 18px; border: 1px dashed var(--faint); border-radius: 14px; }
.pl-si b { font-weight: 500; font-size: 15px; }
.pl-si span { font-size: 13px; color: var(--soft); }

/* the two wires: a rule from their systems to the organisation, its name
   and its header; the light runs down the API, up the webhooks */
.pl-wire { position: relative; display: grid; gap: 2px; padding: 4px 0 4px 22px; font-size: 13px; }
.pl-wire--api { grid-column: 2 / 5; }
.pl-wire--hook { grid-column: 5 / 8; }
.pl-wire > i { position: absolute; left: 6px; top: calc(-1 * var(--g)); bottom: calc(-1 * var(--g)); width: 1px; background: var(--line); overflow: hidden; }
.pl-wire > i::after { content: ""; position: absolute; left: -1px; width: 3px; height: 34%; border-radius: 2px; background: var(--ink); opacity: 0; }
.pl-wire span { font-weight: 500; color: var(--ink); }
.pl-wire code { font: 500 11.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--soft); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .pl-wire--api > i::after { animation: pl-down 2.8s cubic-bezier(.5, 0, .3, 1) infinite; }
  .pl-wire--hook > i::after { animation: pl-up 2.8s cubic-bezier(.5, 0, .3, 1) 1.4s infinite; }
}
@keyframes pl-down { 0% { transform: translateY(-110%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(300%); opacity: 0; } }
@keyframes pl-up { 0% { transform: translateY(300%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-110%); opacity: 0; } }

/* the levels, read down the left column */
.pl-lv { grid-column: 1; font-size: 12px; line-height: 1.25; color: var(--faint); overflow-wrap: anywhere; }
.pl-lv--org { grid-row: 3; }
.pl-lv--brand { grid-row: 4; }
.pl-lv--gab { grid-row: 5; }
.pl-lv--card { grid-row: 6; }

/* the organisation: one bar the brands hang from */
.pl-org { grid-column: 2 / -1; grid-row: 3; height: 12px; border-radius: 6px; background: var(--ink); }
.pl-org i { display: none; }

/* a brand: its node, its two templates, its six cards (display: contents:
   each part on its level's row, in the brand's two columns) */
.pl-br { display: contents; --b: #1f8a9c; }
.pl-br--1 { --b: #b5487f; }
.pl-br--2 { --b: #d18f2a; }
.pl-br--0 > * { grid-column: 2 / 4; }
.pl-br--1 > * { grid-column: 4 / 6; }
.pl-br--2 > * { grid-column: 6 / 8; }
.pl-bn { grid-row: 4; position: relative; justify-self: center; width: 74%; height: 26px; border-radius: 8px; background: var(--b); transition: background-color .5s ease; }
.pl-bn::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: var(--g); background: var(--line); }
.pl-gabs { grid-row: 5; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12%; padding: 0 6%; }
.pl-gabs::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--g)); width: 1px; height: calc(var(--g) / 2); background: var(--line); }
.pl-gabs::after { content: ""; position: absolute; left: calc(6% + 22%); right: calc(6% + 22%); top: calc(var(--g) / -2); height: 1px; background: var(--line); }
.pl-gabs i { position: relative; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--ink); }
.pl-gabs i::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: calc(var(--g) / 2); background: var(--line); }
.pl-cards { grid-row: 6; position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(3, auto); gap: 7px 12%; padding: 0 6%; }
.pl-cards::before, .pl-cards::after { content: ""; position: absolute; top: calc(-1 * var(--g)); width: 1px; height: var(--g); background: var(--line); }
.pl-cards::before { left: calc(6% + 22%); }
.pl-cards::after { right: calc(6% + 22%); }
/* a card: the brand's band over a sheet, a dot for the face */
.pl-cards i { position: relative; aspect-ratio: 1.6; border-radius: 5px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; --d: 0ms; }
.pl-cards i::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 38%; background-color: var(--b); transition: background-color .45s ease calc(140ms + var(--d)); }
.pl-cards i::after { content: ""; position: absolute; left: 14%; top: 24%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule); }
/* the colour runs down: the node first, then card after card */
.pl-cards i:nth-child(2) { --d: 70ms; }
.pl-cards i:nth-child(3) { --d: 140ms; }
.pl-cards i:nth-child(4) { --d: 210ms; }
.pl-cards i:nth-child(5) { --d: 280ms; }
.pl-cards i:nth-child(6) { --d: 350ms; }

/* what each card carries: .pm in service, short logos side by side */
.pl-media { grid-column: 1 / -1; grid-row: 7; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--faint); }
.pl-wms { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pl-wms .wm { font-size: 16px; }
.pl-wms .wm > svg { margin-top: -6px; }

.pl-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 24px 0 0; font-size: 14px; color: var(--soft); }
.pl-change[hidden] { display: none; }
.pl-change { min-height: 40px; padding: 8px 16px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
@media (hover: hover) { .pl-change:hover { border-color: var(--ink); background: var(--zone); } }
.pl-change:active { transform: scale(.97); }

@media (max-width: 640px) {
  .pl-net.ld-proof { padding: 26px 18px; --g: 22px; }
  .pl-grid { grid-template-columns: 4.4em repeat(6, minmax(0, 1fr)); column-gap: 6px; }
  .pl-lv { font-size: 11px; }
  .pl-wire { padding-left: 16px; font-size: 12px; }
  .pl-wire > i { left: 4px; }
  .pl-wire code { font-size: 10.5px; }
  .pl-si { padding: 12px 14px; }
  .pl-bn { height: 20px; }
  .pl-gabs i { height: 12px; }
  .pl-cards { gap: 5px 12%; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-wire > i::after { animation: none; opacity: 0; }
  .pl-bn, .pl-cards i::before { transition: none; }
}

/* ── the plan and the questionnaire ── */
:is(.ld-legend, .pl-q) code { font: 500 .86em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; }
.ld-legend .ld-fine { margin-top: 10px; }
.ld-legend .ld-fine a { color: var(--soft); text-underline-offset: 4px; text-decoration-color: var(--rule); }

.pl-q table { table-layout: fixed; }
.pl-q th:nth-child(1) { width: 8em; }
.pl-q th:nth-child(2) { width: 28%; }
.pl-q th:nth-child(4) { width: 15em; }
.pl-q td a { color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--rule); overflow-wrap: anywhere; }
.pl-q td b { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .pl-q table { table-layout: auto; } }

/* the plan's elements inside a tab's panel: ld-legend's own sizes, not the panel's */
.ld-panel .ld-legend .ld-label { margin: 0 0 2px; color: var(--faint); font-size: 12px; }
.ld-panel .ld-legend h3 { font-size: 20px; margin: 0 0 6px; }
.ld-panel .ld-legend p { font-size: 15px; max-width: 52ch; }
.ld-panel .ld-legend .ld-fine { font-size: 13px; }
