/* Book, shop and home additions (Oct 2026). Small and dependency-free. */
.book-hero { padding: clamp(48px, 7vw, 96px) 0; }
.book-hero-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.book-cover img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.book-hero h1 { margin: 6px 0 10px; }
.book-sub { font-style: italic; color: var(--muted, #a5b1c2); font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 18px; }
.book-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.book-meta li { padding: 6px 12px; border: 1px solid var(--stroke, rgba(255,255,255,.12)); border-radius: 999px; font-size: 14px; }
.book-meta .badge-php { background: #f5a83b; color: #1d1b45; border-color: #f5a83b; font-weight: 700; }
.book-price { font-size: 30px; font-weight: 700; margin-right: 6px; }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 8px; }
.btn.is-pending, .btn[disabled] { opacity: .65; cursor: not-allowed; filter: grayscale(.3); }
.btn.is-pending:hover::before { transform: none; }
.pending-note { font-size: 14px; color: var(--muted, #a5b1c2); margin: 6px 0 0; }
.book-contents ol { list-style: none; padding: 0; margin: 0 0 8px; counter-reset: none; }
.book-contents li { display: grid; grid-template-columns: 3ch 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stroke, rgba(255,255,255,.08)); }
.book-contents li b { color: #f5a83b; font-variant-numeric: tabular-nums; }
.book-contents li span small { display: block; color: var(--muted, #a5b1c2); font-size: 14px; margin-top: 2px; }
.book-part { margin-top: 34px; }
.book-part h3 { margin-bottom: 4px; }
.author-card { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: start; }
.author-card img { width: 140px; height: 140px; border-radius: 50%; border: 4px solid #f5a83b; display: block; }
.wrap-figure { margin: 0; }
.wrap-figure img { width: 100%; height: auto; display: block; border-radius: 6px; }
.wrap-figure figcaption { font-size: 14px; color: var(--muted, #a5b1c2); margin-top: 8px; }
.about-phpair { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; }
.about-phpair img { width: 120px; height: 120px; display: block; }
.home-free { border: 1px solid rgba(98, 247, 224, .35); border-radius: 16px; padding: clamp(22px, 4vw, 36px); background: rgba(6, 18, 30, .72); }
.home-free.has-covers { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.home-free .lead { max-width: 62ch; }
.home-free-covers { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.home-free-covers img { display: block; width: 96px; height: auto; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
@media (max-width: 760px) {
  .home-free.has-covers { grid-template-columns: 1fr; }
  .home-free-covers { order: -1; }
  .home-free-covers img { width: 72px; }
}
.coming-soon { border: 1px dashed rgba(245, 168, 59, .6); border-radius: 16px; padding: clamp(22px, 4vw, 36px); }
.plain-list { padding-left: 1.1em; }
.plain-list li { margin: 6px 0; }
@media (max-width: 760px) {
  .book-hero-grid, .author-card, .about-phpair { grid-template-columns: 1fr; }
  .book-hero-grid .book-cover { max-width: 280px; }
}

/* Readable inline links in body copy (default blue was unreadable on the dark theme). */
main p a:not(.btn),
main li a:not(.btn) { color: var(--cyan, #62f7e0); text-decoration: underline; text-underline-offset: 2px; }
main p a:not(.btn):hover,
main li a:not(.btn):hover { color: var(--gold, #ffd65a); }

/* Animated star background (restored from PHP-Air-Master: canvas#canvas + space.js). */
.has-space { position: relative; overflow: hidden; isolation: isolate; }
.has-space > #canvas { pointer-events: none; }
.has-space > .wrap { position: relative; z-index: 1; }
/* Shadow on body text only: on the gradient-clipped h1 a text-shadow shows through and greys the letters. */
.has-space .book-hero-grid > div :is(p, .eyebrow, .pending-note) { text-shadow: 0 1px 12px rgba(6, 17, 31, .8); }
.has-space .book-meta li { background: rgba(6, 17, 31, .55); }
.has-space .book-meta .badge-php { background: #f5a83b; }

/* Checkout (PayPal) and downloads. */
.checkout-box { margin: 18px 0 6px; padding: 18px 20px; border: 1px solid var(--stroke, rgba(255,255,255,.12)); border-radius: 16px; background: rgba(6, 17, 31, .55); max-width: 560px; }
.checkout-price { margin: 0 0 10px; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; margin: 0 0 14px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #f5a83b; }
.paypal-buttons { min-height: 48px; max-width: 420px; }
.checkout-msg { color: #ffd65a; font-weight: 600; margin: 10px 0 0; }
.mock-note { font-size: 14px; color: #ffd65a; margin: 0 0 10px; }
.checkout-box .note { font-size: 14px; color: var(--muted, #a5b1c2); margin: 12px 0 0; }
.free-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.free-card { padding: 22px; border: 1px solid var(--stroke, rgba(255,255,255,.12)); border-radius: 16px; background: var(--panel, rgba(10,25,43,.74)); }
.free-card h3 { margin: 0 0 8px; }
.free-card .meta { font-size: 14px; color: var(--muted, #a5b1c2); }
.offer-ends { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #f5a83b; color: #1d1b45; font-weight: 700; }
.consent a, .checkout-box a, .thank-you a:not(.btn) { color: var(--cyan, #62f7e0); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .footer-legal { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--muted, #a5b1c2); }
.free-card.has-cover { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
.free-cover { width: 140px; height: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); background: #fbf8f3; }
.free-body > :first-child { margin-top: 0; }
.free-disclaimer { font-size: 14px; color: #ffd65a; margin: 6px 0; }
.free-disclaimer.small { font-size: 13px; margin: 0 0 8px; }
.free-downloads { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke, rgba(255,255,255,.12)); }
.free-downloads ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.free-downloads li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.free-downloads .meta { font-size: 13px; }
.free-grid:has(.has-cover) { grid-template-columns: 1fr; }
@media (max-width: 560px) { .free-card.has-cover { grid-template-columns: 1fr; } .free-cover { width: 120px; } }

/* Our work: GitHub project cards (static content). */
.gh-grid { margin-top: 26px; }
@media (min-width: 900px) { .gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* 4 cards: 2 x 2, no orphan */
.gh-card { min-height: 0; }
.gh-card h3 { margin: 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.gh-tech { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gh-tech li { font-size: 12px; font-weight: 700; color: #cfe9ff; border: 1px solid rgba(85, 245, 255, .35); border-radius: 999px; padding: 4px 10px; }
.gh-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; }
.gh-links .btn { margin-top: 0; }
.gh-more { font-size: 14px; font-weight: 700; color: var(--cyan, #62f7e0); text-decoration: underline; text-underline-offset: 2px; }
.gh-note { font-size: 14px; color: var(--muted, #a5b1c2); margin: 22px 0 18px; max-width: 75ch; }
@media (max-width: 760px) { .gh-links .btn { width: 100%; justify-content: center; text-align: center; } }

