/* Accessible PDF Export for Confluence: the app's documentation page. A how-to sheet: what the app makes, then the steps in
   the order a site administrator meets them, then the terms the Marketplace listing points to. The object is the listing's
   own: a page whose parts leave it as PDF tags. */
.ape { padding: var(--wp-12) 0 var(--wp-16); }
.ape :where(h1, h2, h3) { text-wrap: wrap; }
.ape-top { display: grid; gap: var(--wp-8); grid-template-columns: minmax(0, 1fr); align-items: start; }
.ape-kicker { font: 500 var(--wp-text-cite)/1.3 var(--wp-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wp-muted); margin: 0 0 var(--wp-3); }
.ape h1 { font-family: var(--wp-font-display); font-weight: 600; font-size: clamp(2.25rem, 4.4vw, 3.75rem); line-height: 1; letter-spacing: -.015em; margin: 0 0 var(--wp-6); max-width: 14ch; }
.ape-lede { font-size: var(--wp-text-lede); line-height: 1.5; max-width: 34rem; margin: 0 0 var(--wp-4); }
.ape-intro > p:last-child { max-width: 34rem; margin: 0; }

/* The object: the page and its tag tree (the listing banner's drawing, on paper) */
.ape-object { max-width: 12.5rem; }
.ape-object svg { display: block; width: 100%; height: auto; overflow: visible; }
.ape-o-sheet { fill: var(--wp-panel); stroke: var(--wp-ink); stroke-width: 2; }
.ape-o-fold { fill: var(--wp-hair); stroke: var(--wp-ink); stroke-width: 2; stroke-linejoin: round; }
.ape-o-ink { fill: var(--wp-ink); }
.ape-o-grey { fill: var(--wp-muted); }
.ape-o-img { fill: var(--wp-hair); }
.ape-o-hill { fill: var(--wp-muted); }
.ape-o-table { fill: none; stroke: var(--wp-ink); stroke-width: 2; }
.ape-o-lead { fill: none; stroke: var(--oa-blue-deep); stroke-width: 2; stroke-dasharray: 3 5; }
.ape-o-tree { fill: none; stroke: var(--oa-blue-deep); stroke-width: 3; }
.ape-o-node { fill: var(--oa-blue-deep); }
.ape-o-tag { font: 500 15px/1 var(--wp-font-mono); fill: var(--wp-ink); }

/* On this page */
.ape-toc { margin-top: var(--wp-12); border-top: var(--wp-rule-strong) solid var(--wp-ink); padding-top: var(--wp-4); }
.ape-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--wp-6); }
.ape-toc li { margin: 0; border-bottom: var(--wp-rule) solid var(--wp-hair); }
.ape-toc a { display: flex; align-items: center; min-height: 48px; padding: var(--wp-1) 0; color: var(--wp-ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* Sections */
.ape-section { margin-top: var(--wp-16); }
.ape-section > h2 { font-family: var(--wp-font-display); font-weight: 600; font-size: var(--wp-text-title); line-height: 1.04; border-top: var(--wp-rule-strong) solid var(--wp-ink); padding-top: var(--wp-6); margin: 0 0 var(--wp-6); scroll-margin-top: var(--wp-6); }
.ape h3 { font-family: var(--wp-font-body); font-weight: 600; font-size: var(--wp-text-h3); line-height: 1.3; margin: var(--wp-8) 0 var(--wp-3); scroll-margin-top: var(--wp-6); }
.ape p, .ape li { max-width: var(--wp-measure); }
.ape code { font: 500 var(--wp-text-ledger)/1.4 var(--wp-font-mono); background: var(--wp-cited); padding: 1px 5px; overflow-wrap: anywhere; }
.ape-chars { font: 500 var(--wp-text-ledger)/1.4 var(--wp-font-mono); white-space: nowrap; background: var(--wp-cited); padding: 1px 5px; }

/* Numbered steps: the number in the margin, mono, so a reader can say "step 3" */
.ape .ape-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; max-width: var(--wp-measure); }
.ape-steps > li { counter-increment: s; position: relative; padding-left: 2.5rem; }
.ape-steps code { overflow-wrap: normal; }
.ape-steps > li + li { margin-top: var(--wp-6); }
.ape-steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; font: 500 var(--wp-text-ledger)/1 var(--wp-font-mono); color: var(--wp-paper); background: var(--wp-ink); }
.ape-as-you { margin-top: var(--wp-8); border-left: var(--wp-rule-strong) solid var(--oa-blue-deep); padding: var(--wp-1) 0 var(--wp-1) var(--wp-4); }

/* Screenshots: in-product views, framed as screenshots */
.ape-shot { display: block; margin: var(--wp-4) 0 var(--wp-2); }
.ape-shot picture { display: block; }
/* never wider than the shot's own 1x size: a stretched UI reads as a blown-up toy */
.ape-shot img { display: block; max-width: 100%; height: auto; border: var(--wp-rule-strong) solid var(--wp-ink); background: var(--wp-paper); box-shadow: 8px 8px 0 var(--wp-cited); }
.ape-shot--todo { aspect-ratio: 16 / 10; display: grid; place-items: center; border: 2px dashed var(--wp-rust); color: var(--wp-rust); font: 500 var(--wp-text-cite)/1.4 var(--wp-font-mono); text-transform: uppercase; letter-spacing: .04em; padding: var(--wp-4); text-align: center; }

.ape .ape-list { padding-left: 1.25rem; margin: 0; }
.ape-list li + li { margin-top: var(--wp-3); }

.ape-split { display: grid; gap: var(--wp-6); grid-template-columns: minmax(0, 1fr); }
.ape-split p { margin: 0; }
.ape-not { background: var(--wp-panel); border: var(--wp-rule-strong) solid var(--wp-ink); padding: var(--wp-6); align-self: start; }

/* Terms the listing points to: label and value, one ruled row each */
.ape-legal > p { max-width: var(--wp-measure); }
.ape-terms { margin: 0; max-width: 52rem; border-top: var(--wp-rule-strong) solid var(--wp-ink); }
.ape-terms > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--wp-1) var(--wp-6); padding: var(--wp-3) 0; border-bottom: var(--wp-rule) solid var(--wp-hair); }
/* the labels are the agreement's defined terms (Bonterms: "Main Agreement", "DPA Effective Date"): set in their own case, full size */
.ape-terms dt { font: 600 var(--wp-text-body)/1.4 var(--wp-font-body); }
.ape-terms dd { margin: 0; max-width: var(--wp-measure); overflow-wrap: anywhere; }
/* links in a sentence stay inline so a long one wraps with its words; the padding widens the hit area without moving a line */
.ape-terms dd a, .ape-section p a[href^="mailto"] { padding: 12px 0; }
.ape-todo { color: var(--wp-rust); font-weight: 600; }

@container page (min-width: 40rem) {
  .ape-object { max-width: 19rem; }
  .ape-terms > div { grid-template-columns: 13rem minmax(0, 1fr); }
}
@container page (min-width: 56rem) {
  .ape { padding-top: var(--wp-16); }
  .ape-top { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--wp-16); }
  .ape-object { padding-top: var(--wp-8); justify-self: end; width: 100%; max-width: 19rem; }
  .ape-toc ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ape-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--wp-12); }
}
