/* ==========================================================================
   WordPress additions. Everything the static site didn't need.
   ========================================================================== */

/* Header stays under the WordPress toolbar when you're logged in. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Spam trap on forms: hidden from people. */
.cc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-msg a { color: inherit; font-weight: 800; }

/* Image protection for visitors. */
.cc-protect img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Ordinary blocks you add in the editor sit in the reading column. */
.cc-prose img, .cc-prose video, .cc-prose iframe { max-width: 100%; height: auto; border-radius: var(--radius); }
.cc-prose figure { margin: 0; }
.cc-prose figcaption, .cc-prose .wp-element-caption { font-family: var(--sans); font-size: 15px; color: var(--muted); margin-top: 8px; }
.cc-prose .wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.cc-prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 6px; background: var(--ink); color: var(--white); font-family: var(--sans); font-weight: 700; text-decoration: none; }
.cc-prose .wp-block-separator { border: 0; border-top: 2px solid var(--line); margin: 8px 0; }
.cc-prose .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; }
.cc-prose .has-text-align-center { text-align: center; }
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }

/* Lists of posts (category pages, search). */
.cc-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; padding-bottom: 96px; }
.cc-post-card { border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.cc-post-card h2 a { color: var(--ink); text-decoration: none; }
.cc-post-card h2 a:hover { text-decoration: underline; }
.cc-post-card p { font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--body); }
.cc-pagination .nav-links { display: flex; gap: 12px; padding-bottom: 72px; }

/* Screen-reader-only text used by WordPress. */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* "Find the book for how you learn" cards: when a card lists more covers than
   fit on one line, the covers shrink to fit instead of running off the card.
   Cards with 2–3 covers look exactly as before. */
.audience-card .covers { min-width: 0; max-width: 100%; }
.audience-card .covers img { flex: 0 1 62px; min-width: 0; }

/* If an editor turns <b> into <strong>, keep the badge looking the same. */
.badge strong { font-size: 34px; line-height: 1; font-weight: 900; font-stretch: 115%; }
.hero-art .badge strong { font-size: 46px; }
@media (max-width: 720px) { .hero-art .badge strong { font-size: 32px; } }
.book-hero-cover .badge strong { font-size: 26px; }

/* Download page for free page sets with several PDFs. */
.cc-fp-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.cc-fp-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.cc-fp-name { font-size: 18px; font-weight: 700; }
.cc-fp-done { font-size: 15px; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) { .cc-fp-item { flex-direction: column; align-items: flex-start; } }

/* Sign-up form box on a light background color. */
.signup { color: var(--white); }
.signup[data-light] { color: var(--ink); }
.signup[data-light] input { border-color: var(--ink); }
.signup[data-light] .form-msg a { color: var(--ink); }
