/* Print & Play, 02.10.2026. Navy #174A7E + turquoise #D2F9F6 on white. */
.pp-page {
  --pp-navy: #174A7E;
  --pp-ink: #17324D;
  --pp-turq: #D2F9F6;
  --pp-turq-soft: #EDFCFA;
  --pp-line: rgba(23, 74, 126, .16);
  --pp-content: 1400px;
  --pp-heading: var(--brand-heading-font, 'Poppins'), system-ui, sans-serif;
  color: var(--pp-ink);
  background: #fff;
}

.pp-page [hidden] { display: none !important; }
.pp-page h1, .pp-page h2, .pp-page h3, .pp-page .pp-eyebrow {
  font-family: var(--pp-heading);
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--pp-navy);
}
.pp-page h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.04; margin: 0 0 18px; }
.pp-page h2 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.06; margin: 0 0 14px; }
.pp-page h3 { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.15; margin: 0 0 8px; }
.pp-page p { margin: 0 0 12px; }
.pp-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pp-eyebrow { font-size: 15px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; color: var(--pp-navy); }
.pp-lead, .pp-sub { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--pp-ink); max-width: 30em; }
.pp-note { font-size: 16px; color: var(--pp-ink); }
.pp-wrap { width: min(var(--pp-content), 100% - 40px); margin: 0 auto; }

/* ---------- buttons and controls: white text on navy, navy text on ghost ---------- */
.pp-page .pp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border: 2px solid var(--pp-navy); border-radius: 999px;
  background: var(--pp-navy); color: #fff; font-family: var(--pp-heading);
  font-size: 17px; font-weight: 900; text-decoration: none; cursor: pointer;
}
.pp-page .pp-btn:hover { background: #123c68; }
.pp-page .pp-btn.ghost { background: #fff; color: var(--pp-navy); }
.pp-page .pp-btn.ghost:hover { background: var(--pp-turq-soft); }
.pp-page .pp-btn.big { font-size: 19px; padding: 15px 30px; }
/* The shared portal theme paints every element with --brand-ink !important; these
   selectors outrank it so button ink stays readable on the real theme. */
:root body.pp-page main .pp-btn { color: #fff !important; }
:root body.pp-page main .pp-btn.ghost { color: #174A7E !important; background: #fff; }
/* The portal theme paints nested spans with --brand-ink; buttons must inherit
   their own ink so arrows on navy read white and ghost arrows read navy. */
:root body.pp-page main .pp-btn span,
:root body.pp-page main .pp-link span,
:root body.pp-page main .pp-more span { color: inherit !important; }
:root body.pp-page main .pp-level[aria-pressed="true"] { background: #174A7E !important; color: #fff !important; }
:root body.pp-page main .pp-thumb[aria-pressed="true"] { border-color: #174A7E !important; }
:root body.pp-page main .pp-serie[aria-pressed="true"] { background: #D2F9F6 !important; color: #174A7E !important; }
.pp-page .pp-btn:focus-visible, .pp-page .pp-clear:focus-visible, .pp-page .pp-thumb:focus-visible,
.pp-page .pp-level:focus-visible, .pp-page .pp-serie:focus-visible, .pp-page .pp-zoom:focus-visible,
.pp-page .pp-field input:focus-visible, .pp-page .pp-select select:focus-visible, .pp-page .pp-entry:focus-visible {
  outline: 3px solid #0a2540; outline-offset: 3px;
}
.pp-more, .pp-link { display: inline-block; margin-top: 12px; color: var(--pp-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pp-back { margin-top: 20px; }
.pp-back a { color: var(--pp-navy); font-weight: 600; text-decoration: none; }

.pp-search { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.pp-field { flex: 1 1 320px; display: flex; align-items: center; min-height: 52px; padding: 0 18px; border: 2px solid var(--pp-navy); border-radius: 999px; background: #fff; }
.pp-field input { flex: 1; border: 0; background: transparent; font-size: 17px; font-family: inherit; color: var(--pp-ink); min-height: 46px; }
.pp-field input::placeholder { color: #5c7794; }
.pp-select { position: relative; }
.pp-select select { appearance: none; min-height: 52px; padding: 0 44px 0 20px; border: 2px solid var(--pp-navy); border-radius: 999px; background: #fff; color: var(--pp-navy); font-size: 17px; font-weight: 600; font-family: inherit; }
.pp-select::after { content: "\25be"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--pp-navy); pointer-events: none; }
.pp-clear { min-height: 48px; padding: 10px 18px; border: 0; background: none; color: var(--pp-navy); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.pp-status { text-align: center; margin: 16px 0 0; color: var(--pp-ink); min-height: 24px; }
.pp-status:empty { display: none; }

/* ---------- hero: airy two columns, full character visible ---------- */
.pp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: clamp(12px, 2vw, 36px); }
.pp-hero-copy { padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px); max-width: 38rem; }
.pp-page .pp-hero h1 br { display: block !important; }
.pp-hero-copy .pp-lead { max-width: 22em; }
.pp-hero-art img { display: block; width: 100%; height: auto; }

.pp-browse { padding: clamp(20px, 3vw, 44px) 0 clamp(30px, 4vw, 54px); }
.pp-entry-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.2vw, 36px); padding: 0; margin: 30px 0 0; }
.pp-entry { display: block; color: var(--pp-navy); text-decoration: none; }
.pp-fan { position: relative; display: block; height: 140px; margin: 0 0 14px; }
.pp-fan img {
  position: absolute; top: 6px; left: 0; width: 96px; height: 124px; object-fit: cover; object-position: top center;
  background: #fff; border-radius: 2px; box-shadow: 0 8px 18px rgba(23, 74, 126, .16);
}
.pp-fan img:nth-child(1) { transform: rotate(-7deg); }
.pp-fan img:nth-child(2) { left: 56px; top: 0; transform: rotate(1deg); }
.pp-fan img:nth-child(3) { left: 112px; transform: rotate(7deg); }
.pp-entry strong { display: block; font-family: var(--pp-heading); font-size: 21px; font-weight: 900; }
.pp-entry-sub { display: block; font-size: 15px; color: var(--pp-ink); }
.pp-entry:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- section bands and preview strips ---------- */
.pp-band { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); align-items: center; padding: clamp(50px, 6vw, 96px) 0 clamp(18px, 2vw, 30px); }
.pp-band .pp-band-art { order: 1; }
.pp-band .pp-band-copy { order: 2; }
.pp-band.pp-band-reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.pp-band.pp-band-reverse .pp-band-copy { order: 1; }
.pp-band.pp-band-reverse .pp-band-art { order: 2; }
.pp-band-art img { display: block; width: 100%; height: auto; }
.pp-strip { padding: clamp(14px, 2vw, 26px) 0 clamp(48px, 6vw, 90px); }
.pp-section-wide .pp-head { text-align: center; max-width: 46ch; margin: 0 auto clamp(20px, 3vw, 36px); }
.pp-kicker { font-family: var(--pp-heading); font-weight: 900; color: var(--pp-navy); text-align: center; margin: 26px 0 18px; font-size: 20px; }

/* ---------- cards and results ---------- */
.pp-results, .pp-cards, .pp-catgrid, .pp-setlist { list-style: none; padding: 0; margin: 0; }
.pp-results { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pp-results li { border: 1px solid var(--pp-line); border-radius: 12px; overflow: hidden; background: #fff; }
.pp-results a { display: block; padding: 12px 14px 16px; text-decoration: none; color: var(--pp-navy); }
.pp-results img { width: 100%; height: 148px; object-fit: contain; background: var(--pp-turq-soft); }
.pp-results .pp-kind { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #4a6a8c; }
.pp-results strong { display: block; font-size: 17px; }
.pp-empty { text-align: center; padding: 24px; color: var(--pp-ink); }

.pp-cards { display: grid; gap: clamp(16px, 2.4vw, 34px); grid-template-columns: repeat(3, 1fr); }
.pp-cards-5 { grid-template-columns: repeat(5, 1fr); }
.pp-cards-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pp-card img.pp-square { aspect-ratio: 1 / 1; }
.pp-card img {
  display: block; width: 100%; height: auto; aspect-ratio: 17 / 22; object-fit: contain;
  background: #fff; box-shadow: 0 10px 24px rgba(23, 74, 126, .16);
}
.pp-card h3 { font-size: 18px; margin: 14px 0 4px; }
.pp-age { display: inline-block; background: var(--pp-turq); color: var(--pp-navy); border-radius: 999px; padding: 4px 14px; font-size: 15px; font-weight: 600; margin: 0 0 10px; }

/* ---------- paper stacks: three real pages, softly fanned ---------- */
.pp-stack { position: relative; display: block; aspect-ratio: 17 / 22; width: min(230px, 100%); }
.pp-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top center;
  border-radius: 2px; background: #fff; box-shadow: 0 12px 26px rgba(23, 74, 126, .18);
}
.pp-stack img:nth-child(1) { transform: rotate(-5deg) translate(-10px, 6px); z-index: 3; }
.pp-stack img:nth-child(2) { transform: rotate(4deg) translate(10px, -4px); z-index: 2; }
.pp-stack img:nth-child(3) { transform: rotate(-1.5deg); z-index: 1; }

.pp-catgrid { display: grid; gap: clamp(26px, 3vw, 46px); grid-template-columns: repeat(3, 1fr); }
.pp-catrow, .pp-setrow { display: grid; grid-template-columns: minmax(110px, 180px) 1fr; gap: clamp(14px, 2vw, 28px); align-items: center; }
.pp-setrow { grid-template-columns: minmax(130px, 230px) 1fr; }
.pp-catcopy h3 a, .pp-setcopy h3 a { text-decoration: none; color: var(--pp-navy); }
.pp-catset, .pp-blurb { color: var(--pp-ink); font-size: 16px; line-height: 1.5; }
.pp-skill { font-weight: 700; color: var(--pp-navy); margin: 0 0 6px; }

.pp-allworksheets { margin-top: 34px; }
.pp-allworksheets > summary { font-family: var(--pp-heading); font-weight: 900; font-size: clamp(22px, 2.2vw, 30px); color: var(--pp-navy); cursor: pointer; padding: 8px 0; min-height: 44px; }
.pp-setlist { display: grid; gap: clamp(22px, 2.6vw, 40px); grid-template-columns: repeat(2, 1fr); margin-top: 22px; }

/* ---------- category and set heads: open white, canonical character art ---------- */
.pp-head-band { padding: clamp(18px, 2.6vw, 32px) 0 clamp(22px, 3vw, 40px); background: #fff; }
.pp-head-inner { width: min(var(--pp-content), 100% - 40px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 420px); gap: clamp(18px, 3vw, 48px); align-items: center; }
/* No ch-based cap: at 76px the H1 needs the whole first column, otherwise
   words such as "Patterns" break mid-word. */
.pp-head-copy { min-width: 0; max-width: none; }
.pp-headchar { display: block; width: auto; max-width: 170px; height: auto; object-fit: contain; }
.pp-setchar { float: right; width: auto; max-width: 170px; height: auto; margin: 0 0 10px 18px; }
.pp-crumbs { width: min(var(--pp-content), 100% - 40px); margin: 0 auto 10px; font-size: 15px; color: var(--pp-ink); display: flex; flex-wrap: wrap; gap: 8px; }
.pp-crumbs a { color: var(--pp-navy); text-decoration: none; }
.pp-crumbs a:hover { text-decoration: underline; }

/* ---------- set page ---------- */
.pp-sethead { padding: clamp(18px, 2.6vw, 36px) 0 clamp(44px, 6vw, 84px); }
.pp-setgrid { display: grid; grid-template-columns: minmax(300px, 50%) 1fr; gap: clamp(22px, 4vw, 60px); align-items: start; }
.pp-preview { order: 1; }
.pp-setcopy { order: 2; }
.pp-page .pp-setcopy h1 { font-size: clamp(38px, 4vw, 58px); }
.pp-page .pp-setcopy h2 { font-size: clamp(24px, 2.2vw, 32px); margin: 18px 0 8px; }
.pp-preview figure { position: relative; margin: 0; }
.pp-preview #pp-preview-img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; background: #fff; box-shadow: 0 18px 42px rgba(23, 74, 126, .16); }
.pp-preview figcaption { margin-top: 10px; font-size: 15px; color: var(--pp-ink); text-align: center; }
.pp-zoom { position: absolute; right: max(10px, calc(50% - 270px)); bottom: 44px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--pp-navy); background: #fff; color: var(--pp-navy); font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.pp-thumbs { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; padding: 0; margin: 20px auto 0; max-width: 620px; }
.pp-thumb { display: block; width: 100%; padding: 5px; border: 2px solid var(--pp-line); border-radius: 10px; background: #fff; cursor: pointer; }
.pp-thumb[aria-pressed="true"] { border-color: var(--pp-navy); }
.pp-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 17 / 22; object-fit: contain; background: #fff; }
.pp-thumb span { display: block; margin-top: 6px; font-size: 14px; color: var(--pp-ink); text-align: center; }
.pp-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0 18px; max-width: 620px; }
.pp-level { min-height: 64px; padding: 12px 16px; border: 2px solid var(--pp-navy); border-radius: 14px; background: #fff; color: var(--pp-navy); font-family: var(--pp-heading); font-weight: 900; font-size: 18px; cursor: pointer; }
.pp-level[aria-pressed="true"] { background: var(--pp-navy); color: #fff; }
.pp-series { display: inline-flex; gap: 8px; margin: 0 0 18px; }
.pp-serie { min-height: 46px; padding: 8px 20px; border: 2px solid var(--pp-navy); border-radius: 999px; background: #fff; color: var(--pp-navy); font-weight: 700; cursor: pointer; }
.pp-serie[aria-pressed="true"] { background: var(--pp-turq); }
.pp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 6px; }
.pp-access { font-size: 15px; color: var(--pp-ink); }
.pp-tips { margin-top: 12px; border-top: 1px solid var(--pp-line); padding-top: 12px; }
.pp-tips > summary { font-family: var(--pp-heading); font-weight: 900; color: var(--pp-navy); cursor: pointer; min-height: 44px; display: flex; align-items: center; }

.pp-dialog { border: 0; border-radius: 16px; padding: 16px; width: min(92vw, 900px); max-height: 92vh; overflow: auto; }
.pp-dialog::backdrop { background: rgba(10, 37, 64, .6); }
.pp-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.pp-dialog-head h2 { font-size: 22px; margin: 0; }
.pp-dialog img { display: block; width: 100%; height: auto; }
.pp-dialog-note { text-align: center; font-size: 14px; margin-top: 10px; }

@media (max-width: 1180px) {
  .pp-cards-5 { grid-template-columns: repeat(3, 1fr); }
  .pp-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .pp-catgrid { grid-template-columns: repeat(2, 1fr); }
  .pp-entry-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pp-hero, .pp-band, .pp-band.pp-band-reverse, .pp-head-inner { grid-template-columns: 1fr; }
  .pp-hero-copy { order: 1; padding: clamp(24px, 5vw, 40px) 0 0; max-width: none; }
  .pp-hero-art { order: 2; }
  .pp-band .pp-band-copy, .pp-band.pp-band-reverse .pp-band-copy { order: 1; }
  .pp-band .pp-band-art, .pp-band.pp-band-reverse .pp-band-art { order: 2; }
  .pp-head-inner { align-items: start; }
  .pp-headchar { max-width: 170px; }
  .pp-setlist { grid-template-columns: 1fr; }
  .pp-catgrid { grid-template-columns: 1fr; }
  .pp-cards, .pp-cards-5 { grid-template-columns: repeat(2, 1fr); }
  .pp-entry-list { grid-template-columns: 1fr; }
  .pp-setgrid { grid-template-columns: minmax(0, 1fr); }
  .pp-setcopy, .pp-preview { min-width: 0; }
  .pp-setcopy { order: 1; }
  .pp-preview { order: 2; }
  .pp-preview #pp-preview-img { max-width: min(100%, 420px); }
  .pp-zoom { right: 10px; }
}
@media (max-width: 620px) {
  .pp-page h1 { font-size: clamp(38px, 11vw, 46px); }
  .pp-page h2 { font-size: clamp(28px, 8.5vw, 36px); }
  .pp-page .pp-setcopy h1 { font-size: clamp(30px, 8.6vw, 38px); }
  .pp-page .pp-setcopy h2 { font-size: clamp(22px, 6.6vw, 28px); }
  .pp-catcopy, .pp-catset, .pp-blurb, .pp-setcopy, .pp-preview, .pp-task, .pp-meta, .pp-access {
    min-width: 0; overflow-wrap: break-word;
  }
  .pp-setchar { max-width: 85px; margin: 0 0 8px 12px; }
  .pp-preview #pp-preview-img { max-width: 100%; }
  .pp-wrap, .pp-head-inner, .pp-crumbs { width: min(var(--pp-content), 100% - 32px); }
  .pp-hero-copy { padding-left: max(16px, calc((100% - min(var(--pp-content), 100% - 32px)) / 2)); }
  .pp-catrow { grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
  .pp-setrow { grid-template-columns: 118px 1fr; gap: 14px; align-items: start; }
  .pp-catrow .pp-stack, .pp-setrow .pp-stack { width: 100%; }
  .pp-catcopy .pp-btn, .pp-setcopy .pp-btn { padding: 10px 16px; font-size: 15px; min-height: 44px; }
  .pp-search .pp-btn { flex: 1 1 auto; }
  .pp-fan img { width: 84px; height: 108px; }
  .pp-fan img:nth-child(2) { left: 48px; }
  .pp-fan img:nth-child(3) { left: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-page * { transition: none !important; animation: none !important; }
}

/* ---------- Paper Friends: fold-and-glue paper nets, square previews ---------- */
#paper-friends .pp-cards { margin-top: clamp(18px, 2.4vw, 30px); }
#paper-friends .pp-card img { aspect-ratio: 1 / 1; object-fit: contain; }
#paper-friends .pp-card h3 { text-align: center; margin-top: 12px; }
#paper-friends .pp-note { text-align: center; margin: 20px auto 0; max-width: 60ch; }
#paper-friends .pp-actions { justify-content: center; }

/* Paper Friends actions, scoped fix 2026-10-02: the portal theme's global
   `body :where(*) { color: var(--brand-ink) !important }` was beating the
   shared button colour, so the A4/Letter links rendered dark-on-navy. ID
   specificity below restores white on navy (hover/focus too), keeps the ghost
   dark on white, and keeps keyboard focus visible. Contrast >= 4.5:1. */
#paper-friends .pp-actions .pp-btn { color: #fff !important; }
#paper-friends .pp-actions .pp-btn > span { color: inherit !important; }
#paper-friends .pp-actions .pp-btn:is(:hover, :focus-visible) { color: #fff !important; background: #123c68 !important; }
#paper-friends .pp-actions .pp-btn.ghost { color: var(--pp-navy) !important; background: #fff !important; }
#paper-friends .pp-actions .pp-btn.ghost:is(:hover, :focus-visible) { color: var(--pp-navy) !important; background: var(--pp-turq-soft) !important; }
#paper-friends .pp-actions .pp-btn:focus-visible { outline: 3px solid var(--pp-navy) !important; outline-offset: 3px !important; }
