/* Playbook library and playbook pages. Builds on site.css tokens.
   Glass here is smoked brick glass: blue-tinted, translucent panels with the booklet's navy keyline and a hard brick-base shadow,
   set over coloured bricks so the blur has something to bend. Not frosted white, not hairlines, not soft halos. */

/* Glass */
.glass-stage { position: relative; isolation: isolate; display: grid; place-items: center; padding: 28px; }
.glass-stage::before, .glass-stage::after { content: ""; position: absolute; z-index: -1; border: 3px solid var(--ink); border-radius: 14px;
  background-image: radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.55) 7px, rgba(6, 26, 64, 0.35) 7.6px, transparent 8.4px); background-size: 36px 36px; }
.glass-stage::before { width: 52%; height: 46%; top: 2%; right: 4%; background-color: var(--sun); rotate: 8deg; }
.glass-stage::after { width: 44%; height: 40%; bottom: 0; left: 2%; background-color: #12b5ad; rotate: -10deg; }
.glass { position: relative; background: linear-gradient(160deg, #1656b8 0%, #0b3a86 100%);
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 8px 0 rgba(6, 26, 64, 0.35); color: var(--paper); }

/* Book covers: drawn in code, one brick colour per category. */
.book { --c: var(--blue); --ct: var(--paper); container-type: inline-size; position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; gap: 8px;
  width: 100%; aspect-ratio: 3 / 4; padding: 9% 9% 9% 15%; color: var(--ct); border: 3px solid var(--ink); border-radius: 6px 16px 16px 6px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 86%, #061a40) 100%); }
/* Spine, and a band of light across the face like a translucent brick. */
.book::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8%; background: rgba(6, 26, 64, 0.22); border-right: 2px solid rgba(255, 255, 255, 0.35); }
.book::after { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, transparent 62%, rgba(255, 255, 255, 0.2) 62.5%, rgba(255, 255, 255, 0.2) 74%, transparent 74.5%); pointer-events: none; }
.book-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: max(10px, 6cqi); letter-spacing: 0.02em; }
.book-title { align-self: center; font-weight: 900; font-size: 12cqi; line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.book-brand { font-weight: 800; font-size: max(10px, 5.6cqi); line-height: 1.25; }
.book--blue { --c: #0066ff; }
.book--purple { --c: #7b4dff; }
.book--teal { --c: #12b5ad; --ct: var(--ink); }
.book--sun { --c: #ffd43b; --ct: var(--ink); }
.book--orange { --c: #ff8a1f; --ct: var(--ink); }
.book--green { --c: #1fae5b; --ct: var(--ink); }
.book--navy { --c: #24345c; }
/* The thumbnail cover keeps only its title; the number and brand line would crowd it. */
.book--sm .book-brand { display: none; }

/* Library hero: the campaign gradient, with the first playbook on a glass card. */
.lib-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.lib-hero h1 { max-width: 12ch; }
.lib-count { margin-top: 22px; font-weight: 800; font-size: 17px; color: var(--paper); }
.lib-start { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 470px; padding: 18px; text-decoration: none;
  transition: translate 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.lib-start:hover { translate: 0 -3px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 11px 0 rgba(6, 26, 64, 0.35); }
.lib-start-copy { display: grid; gap: 6px; }
.lib-start-label { justify-self: start; font-weight: 900; font-size: 13px; color: var(--ink); background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px; }
.lib-start-title { font-weight: 900; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.lib-start-sub { font-size: 15.5px; line-height: 1.45; color: var(--paper); }

/* Shelf */
.lib-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.lib-filter { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper); border: var(--key); border-radius: 999px; }
.lib-filter button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font: 800 15px/1 var(--font); color: var(--ink); cursor: pointer; }
.lib-filter button:hover { background: var(--page-2); }
.lib-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lib-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lib-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lib-card a { height: 100%; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 8px; padding: 14px 14px 16px; background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: 18px; text-decoration: none; transition: translate 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.lib-card a { box-shadow: var(--base-sm); }
.lib-card a:hover { translate: 0 -3px; box-shadow: 0 7px 0 var(--ink); }
.lib-card a:active { translate: 0 4px; box-shadow: none; }
.lib-card .book { margin-bottom: 6px; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-meta span { font-weight: 800; font-size: 12.5px; line-height: 1; color: var(--blue-600); background: var(--page-2); border-radius: 999px; padding: 5px 9px; }
.lib-title { font-weight: 900; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; }
.lib-sub { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.lib-foot { font-weight: 800; font-size: 14px; color: var(--ink-2); }
.lib-all { margin-top: 20px; }

/* Newsletter band */
.lib-news { padding: clamp(12px, 2vw, 24px); }
.glass-stage--wide::before { width: 30%; height: 70%; top: 6%; right: 6%; }
.glass-stage--wide::after { width: 26%; height: 64%; bottom: 4%; left: 4%; }
.lib-news-box { max-width: 720px; padding: clamp(24px, 3.4vw, 44px); text-align: center; display: grid; justify-items: center; gap: 16px; }
.lib-news-box .h2 { color: var(--paper); font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); }
.lib-news-box p { font-size: 18px; line-height: 1.5; max-width: 46ch; }
.lib-news-box .btn-paper { border-radius: 999px; }

/* Playbook page */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-bottom: 14px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-600); font-weight: 800; }
.pb-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.pb-cover { width: 300px; max-width: 100%; padding: 16px; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-tags span { font-weight: 800; font-size: 13.5px; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 11px; }
.pb-hero h1 { margin-top: 18px; max-width: 16ch; }
.pb-note { margin-top: 16px; font-weight: 700; font-size: 15.5px; color: var(--paper); }
.pb-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.pb-h2 { margin-top: 48px; }
.pb-outcomes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.pb-outcomes li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 18px; line-height: 1.5; }
.pb-outcomes li::before { content: ""; width: 26px; height: 18px; margin-top: 5px; background: var(--blue); border: 2.5px solid var(--ink); border-radius: 5px;
  box-shadow: inset 6px -6px 0 -4px rgba(255, 255, 255, 0.35); }
.pb-contents { position: sticky; top: 20px; background: var(--paper); border: var(--key); border-radius: 22px; padding: clamp(20px, 2.6vw, 32px); }
.pb-contents h2 { font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }
.pb-contents ol { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.pb-contents li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; font-weight: 800; font-size: 17px; line-height: 1.3; }
.pb-n { display: grid; place-items: center; width: 38px; height: 38px; background: var(--sun); border: 2.5px solid var(--ink); border-radius: 10px; font-weight: 900; }

@media (max-width: 1080px) {
  .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lib-hero, .pb-hero, .pb-body { grid-template-columns: 1fr; }
  .pb-hero .glass-stage { justify-self: center; }
  .pb-contents { position: static; }
}
@media (max-width: 760px) {
  .lib-grid, .lib-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lib-card a { padding: 10px 10px 12px; }
  .lib-title { font-size: 16.5px; }
  .lib-sub { font-size: 14px; }
  .lib-start { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .lib-start-title { font-size: 19px; }
  .book--sm .book-top { display: none; }
  .book--sm { grid-template-rows: 1fr; }
  .glass-stage { padding: 16px; }
  .pb-cover { width: 210px; }
}

/* The full playbook: one paper sheet of reading beside a sticky contents list. Each chapter ends in its kit:
   a checklist to tick, a worksheet to fill and a prompt to copy, each on a raised card. */
.pb-read { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.pb-article { min-width: 0; background: var(--grade-paper); border: var(--key); border-radius: 26px; padding: clamp(24px, 4vw, 56px); box-shadow: var(--base), var(--air); }
.pb-article p, .pb-article li { font-size: 18px; line-height: 1.65; max-width: 68ch; }
.pb-article p + p, .pb-article p + ul, .pb-article ul + p { margin-top: 14px; }
.pb-article ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.pb-intro p:first-child { font-size: 21px; line-height: 1.55; font-weight: 700; }
.pb-for { margin-top: 32px; background: var(--grade-sky); border-radius: 20px; padding: clamp(20px, 2.6vw, 30px); }
.pb-for h2 { font-weight: 900; font-size: 20px; letter-spacing: -0.01em; }
.pb-for h2 + p { margin-top: 6px; }
.pb-for p + h2 { margin-top: 20px; }
.pb-for .pb-outcomes { margin-top: 12px; }
.pb-for .pb-outcomes li { font-size: 17px; }
.pb-article .pb-outcomes { padding-left: 0; }
.pb-chapter { margin-top: 56px; padding-top: 48px; border-top: 2px solid var(--page-2); scroll-margin-top: 20px; }
.pb-chapter h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-weight: 900; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.1; letter-spacing: -0.025em; }
.pb-chapter h2 .pb-n { flex: none; box-shadow: 0 3px 0 var(--ink); }
.pb-kit { margin-top: 28px; display: grid; gap: 16px; }
.pb-box h3 { font-weight: 900; font-size: 17px; margin-bottom: 12px; }
.pb-prompt { background: linear-gradient(180deg, #0d2a5e 0%, var(--ink) 100%); color: var(--paper); box-shadow: 0 4px 0 #020b1f; }
.pb-prompt h3 { color: var(--paper); }
.pb-article .pb-prompt-text { font-size: 16px; line-height: 1.6; color: var(--blue-100); max-width: none; white-space: pre-wrap; }
.pb-sources { margin-top: 56px; padding-top: 32px; border-top: 2px solid var(--page-2); }
.pb-sources h2 { font-weight: 900; font-size: 20px; }
.pb-sources ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.pb-sources li { font-size: 15px; }
.pb-sources a { color: var(--blue-600); font-weight: 700; overflow-wrap: anywhere; }
.pb-read .pb-contents { position: sticky; top: 20px; }
.pb-read .pb-contents ol { gap: 2px; }
.pb-read .pb-contents li { display: block; }
.pb-read .pb-contents ol a { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 44px; padding: 4px 6px; border-radius: 12px; font-weight: 800; font-size: 16px; line-height: 1.25; text-decoration: none; }
.pb-read .pb-contents ol a:hover { background: var(--page-2); color: var(--blue-600); }
.pb-aside-cta { margin-top: 18px; width: 100%; justify-content: center; border-radius: 999px; }
.pb-contents { box-shadow: var(--base), var(--air); background: var(--grade-paper); }
@media (max-width: 1080px) {
  .pb-read { grid-template-columns: 1fr; }
  .pb-read .pb-contents { position: static; order: -1; }
}
@media (max-width: 760px) {
  .pb-article { border-radius: 20px; }
  .pb-article p, .pb-article li { font-size: 16.5px; }
  .pb-intro p:first-child { font-size: 19px; }
}

/* Covers: white type needs a full-strength ground, so the blue and purple covers grade darker, never lighter, and
   purple is deepened to hold 4.5:1 for the small lines. Insets are fixed per size so the type never meets the edge. */
.book { padding: 22px 18px 22px 30px; background: linear-gradient(165deg, var(--c) 0%, color-mix(in srgb, var(--c) 78%, #061a40) 100%); }
.book--purple { --c: #6a3cf0; }
.book--sm { padding: 10px 8px 10px 16px; }
.book--lg { padding: 26px 22px 26px 36px; }
@media (max-width: 760px) { .book { padding: 16px 12px 16px 22px; } }

/* The chapter prompt: the one filled block in the sheet, so it stands apart from the reading. */
.pb-kit { gap: 0; }
.pb-kit > .pb-box + .pb-box { margin-top: 28px; }
.pb-kit > .pb-prompt, .pb-kit > .pb-box + .pb-prompt { margin-top: 28px; padding: 22px 24px; border-top: 0; border-radius: 18px; background-color: var(--ink);
  background-image: linear-gradient(180deg, #0d2a5e 0%, var(--ink) 100%); box-shadow: none; }
.pb-for { padding: 26px 28px; }
@media (max-width: 760px) { .pb-for { padding: 20px; } .pb-kit > .pb-prompt { padding: 18px; } }

/* Covers with navy type grade lighter at the top instead, so the type keeps its contrast to the bottom edge. */
.book--teal, .book--sun, .book--orange, .book--green { background: linear-gradient(165deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 100%); }
/* The rule between kit sections is drawn as its own line, so the sections stay open sheets, not boxes. */
.pb-kit > .pb-box + .pb-box:not(.pb-prompt)::before { content: ""; display: block; height: 2px; margin-bottom: 26px; border-radius: 2px; background: var(--page-2); }

/* The start card ends on its action; the playbook meta row sits under the lede, never above the title. */
.lib-start-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 900; font-size: 15px; color: var(--sun); }
.lib-start-go svg { width: 18px; height: 18px; transition: translate 200ms var(--ease-out); }
.lib-start:hover .lib-start-go svg { translate: 4px 0; }
.pb-hero .pb-tags { margin-top: 18px; }
.pb-hero h1 { margin-top: 0; }

/* Phones: More playbooks shows 2 cards, so the 2 column grid never leaves 1 alone; the breadcrumb keeps only the way back. */
@media (max-width: 760px) {
  .lib-grid--related > li:nth-child(n+3) { display: none; }
  .crumbs > span { display: none; }
}

/* Back to back example lists (the sample emails) read as separate examples, with a rule between them. */
.pb-article ul + ul { margin-top: 22px; padding-top: 20px; border-top: 2px solid var(--page-2); }

/* Playbook chapters below the first screen skip layout until they near the viewport: about 2,000 words of text is
   most of a playbook's first layout on a phone. Only the block size is estimated (measured medians: 880px desktop,
   1,490px phone), and contents links jump
   instantly, so scroll anchoring keeps each chapter heading where it lands. */
.pb-chapter { content-visibility: auto; contain-intrinsic-block-size: auto 900px; }
@media (max-width: 760px) { .pb-chapter { contain-intrinsic-block-size: auto 1500px; } }
