/* ==========================================================
   /manual/specs/ (V85, Sprint 1) — the book part of the pre-V85
   homepage, moved verbatim with its markup. Rules copied from the
   old index.css in their original order; the V85 addition is the
   h1 heading (V99 removed the V85 edition-button row; the three
   edition buttons sit in the .book-meta sidebar).
   Global book rules (.book-section, .book-cover-wrapper, .slogan,
   .terminal-header-inline, .list-protocol ...) stay in base.css.
   ========================================================== */

/* V57: HLA summary promo, under the book cover (replaced the update-channel
   form). The spec called for a cyan terminal button; translated to the light
   console palette per standing approval. */
.hla-promo {
    margin-top: 18px;
    padding: 16px 18px;
    text-align: left;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.hla-promo-header {
    font-family: var(--font-code);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--brand-blue);
    margin: 0 0 8px 0;
}

.hla-promo-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--dark-teal);
    margin: 0 0 6px 0;
}

.hla-promo-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dim);
    margin: 0 0 14px 0;
}

.hla-promo-btn {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--brand-blue);
    background: transparent;
    border: 1px solid var(--brand-blue);
    border-radius: 4px;
    padding: 9px 14px;
    transition: color 120ms linear, background-color 120ms linear;
}

.hla-promo-btn:hover,
.hla-promo-btn:focus-visible {
    color: #ffffff;
    background: var(--brand-blue);
    text-decoration: none;
}

.hla-promo-btn:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* V64: build-metadata box under the HLA promo — ISBN registry + the
   explicit acquisition routes (the cover art links to /manual/digital/
   silently). Shares the promo's card idiom and reuses its header/desc/btn
   classes. */
.book-meta {
    margin-top: 12px;
    padding: 16px 18px;
    text-align: left;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Stacked label/value rows, NOT a two-column grid: the sticky column can
   be as narrow as ~320px and an ISBN must never line-break. */
.book-meta-list {
    margin: 0 0 12px 0;
    font-family: var(--font-code);
}

.book-meta-list dt {
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.book-meta-list dd {
    margin: 1px 0 8px 0;
    font-size: 0.88rem;
    color: var(--dark-teal);
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.book-meta-list dd:last-child { margin-bottom: 0; }

/* V85: the single "ACQUIRE VIA DEPLOYMENT CHANNELS" CTA became the edition
   buttons (same .hla-promo-btn look; V99: three, digital · audio ·
   physical, and since V99 the only edition buttons on the page — the row
   above the cover is gone). They wrap when the sticky column is narrow;
   since V88 a label never wraps (below). */
.book-meta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.book-meta-actions[hidden] { display: none; }

/* V88 (Q): the BUILD / METADATA buttons never wrap (DoD, desktop + mobile).
   "[ >_ PROCURE_PHYSICAL_BACKUP ]" at 0.72rem / .02em / 12px padding is
   ~240px — it fits the 282px box at the pinned 320px cover column and the
   ~250px of a 320px phone; the old .06em tracking would need ~254px. */
.book-meta-actions .hla-promo-btn {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 9px 12px;
    white-space: nowrap;
}

.book-description .slogan {
    text-align: left;
    margin-bottom: 0;
}

.exec-prompt { font-weight: bold; font-size: 120%; }

.stack-section { margin-top: 100px; text-align: left; }

.stack-header-main {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--mid-sepia);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .directory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .directory-grid {
        grid-template-columns: 1fr;
    }
}

.dir-title {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--brand-orange);
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(var(--brand-orange-rgb), 0.1);
}

.stack-item { margin-bottom: 10px; border-left: 2px solid #eee; padding-left: 10px; }

.stack-item .label { font-size: 0.7rem; color: var(--text-dim); display: block; }

.stack-item .name { font-size: 0.95rem; font-weight: 600; }

/* ==========================================================
   Sticky book cover split layout. Scoped to .book-section--split
   because other pages (masterclass, version-control) use base.css's
   bare .book-section. Desktop-only: below 901px base.css's
   stacked flex column remains untouched and sticky is inert.
   ========================================================== */
@media (min-width: 901px) {
    .book-section--split {
        display: grid;
        grid-template-columns: minmax(320px, 1fr) 2fr;
        gap: 4rem;
        align-items: start;
        max-width: none; /* lifts base.css 800px cap; .container still caps at 1000px */
        margin: 60px auto;
    }

    .book-section--split .book-cover-wrapper {
        position: sticky;
        top: 24px; /* no fixed chrome on this site — small offset, not a nav clearance */
        margin-bottom: 0; /* grid gap replaces base.css's 50px */
    }
}

/* ==========================================================
   Protocol list -> module card grid. CSS-only: the <ul> ships
   from dm_block('index.book_copy'), so the live DB may override
   the copy — no markup dependency beyond ul/li/strong. Scoped
   to .book-copy so version-control.php's .list-protocol keeps
   its plain "> " treatment.
   ========================================================== */
.book-copy .list-protocol {
    display: grid;
    /* min(280px, 100%) keeps the hard card minimum from forcing
       horizontal overflow on sub-320px viewports */
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.book-copy .list-protocol li {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.book-copy .list-protocol li::before {
    content: none; /* drop base.css's "> " bullet marker in card mode */
}

.book-copy .list-protocol li strong {
    display: block;
    color: var(--dark-teal);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================
   V85: the book heading is this page's only h1 (it was an h2 on
   the old homepage). It must look exactly like that h2, so it
   overrides base.css's global h1:
   display:block (in a flex h1 the whitespace between the three
   word spans collapses — "thedreammachine"), and the class beats
   base.css's 600px h1 shrink rule on specificity. Lowercase
   render keeps the wordmark idiom while markup stays as is.
   ========================================================== */
h1.book-hero-heading {
    display: block;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    margin: 0 0 5px 0;
    text-transform: lowercase;
    letter-spacing: -0.04em;
    line-height: 1.1;
    text-align: left;
}

h1.book-hero-heading[hidden] { display: none; }
