/* neurova-ai.com/guides/: the ebook store.
 *
 * Loaded only on pages under /guides/ (front matter `extra_head`). Builds on
 * the tokens and components in site.css: same paper and ink, flat ink pill
 * buttons, underlined links, dashed rules. No chromatic accent here either:
 * the one highlight colour belongs inside the ebooks, never on the site.
 */

/* Store content sits in .page-body's 592px reading column. Grids and the buy
 * box break out of it to a wider, still-centred band. */
.guides-wide {
  position: relative; left: 50%; transform: translateX(-50%);
  width: min(1000px, calc(100vw - 2 * var(--gutter)));
  margin-top: 2rem; margin-bottom: 2.5rem;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------- jump links */
.guide-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.page-body .guide-jump a {
  font-family: 'Space Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em;
  border: 1px solid var(--border-ui); border-radius: 100px; padding: 0.4rem 0.9rem;
  color: var(--ink-2); text-decoration: none; transition: border-color 0.18s, color 0.18s;
}
.page-body .guide-jump a:hover { border-color: var(--ink); color: var(--ink); }

/* ------------------------------------------------------------------ shelves */
.guide-shelf { margin-top: 4.5rem; scroll-margin-top: 90px; }
.guide-shelf-head { border-top: 1px dashed var(--rule); padding-top: 2rem; }
.page-body .guide-shelf-head h2 { margin: 0.3rem 0 0.6rem; }
.page-body .guide-shelf-head h2 a { text-decoration: none; }
.page-body .guide-shelf-head h2 a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.page-body .guide-shelf-head > p:last-child { color: var(--muted); margin-bottom: 0; }
.page-body .guide-shelf-num {
  font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin: 0 !important;
}
.guide-shelf-break { margin-top: 5rem; margin-bottom: 0; }
.page-body .guide-shelf-break .section-label { margin: 0; font-size: 0.7rem; color: var(--muted); }

/* -------------------------------------------------------------------- cards */
.guide-grid, .bundle-grid {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
}
.guide-grid, .bundle-grid, .guide-trust { --cols: 1; }
.guide-grid, .bundle-grid, .page-body ul.guide-trust { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
/* Columns follow the number of cards (grid-n2, -n3, -n4), so a row is never
 * left part-empty: 3 cards sit 3 across, 4 sit 4 across or 2 by 2. */
@media (min-width: 600px) { .grid-n2, .grid-n4 { --cols: 2; } }
@media (min-width: 760px) { .grid-n3 { --cols: 3; } }
@media (min-width: 900px) { .grid-n4 { --cols: 4; } }

.guide-card, .bundle-card { background: var(--paper); padding: 1.6rem 1.5rem 1.7rem; display: flex; flex-direction: column; }
.guide-card-cover { display: block; margin-bottom: 1.3rem; }
.guide-card-body { display: flex; flex-direction: column; flex: 1; }
.page-body .guide-card-label {
  font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem !important; line-height: 1.5 !important;
}
.page-body .guide-card h3, .page-body .bundle-card h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 600;
  letter-spacing: -0.015em; line-height: 1.32; margin: 0 0 0.6rem; color: var(--ink);
}
.page-body .guide-card h3 a { text-decoration: none; }
.page-body .guide-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.page-body .guide-card-meta, .page-body .bundle-card p {
  font-size: 0.87rem; line-height: 1.6; color: var(--muted); margin: 0 0 1rem;
}
.page-body .guide-card-more { font-size: 0.84rem; margin-top: 0.9rem; align-self: flex-start; }

.bundle-card-featured { background: var(--card); }
.page-body .bundle-card .bundle-separately { font-size: 0.82rem; margin-top: auto; padding-top: 0.4rem; }

/* ---------------------------------------------------------- price and Buy */
.guide-buy { display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.6rem; }
.page-body .guide-price { margin: 0; line-height: 1.2; color: var(--ink); }
.guide-price-amount { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.guide-price-note { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.page-body a.guide-buy-btn { padding: 0.6rem 1.4rem; font-size: 0.86rem; color: var(--paper); text-decoration: none; }
.guide-soon {
  display: inline-block; font-size: 0.82rem; color: var(--muted);
  border: 1px dashed var(--border-ui); border-radius: 100px; padding: 0.55rem 1.2rem;
}
.guide-buy-large { justify-content: flex-start; gap: 1.4rem; margin: 1.6rem 0 0.9rem; padding: 0; }
.guide-buy-large .guide-price-amount { font-size: 2rem; }
.page-body .guide-buy-large a.guide-buy-btn { padding: 0.88rem 2.1rem; font-size: 0.95rem; }

/* ------------------------------------------------------------------ covers */
.guide-cover, .guide-cover-img {
  display: block; width: 100%; aspect-ratio: 210 / 297; border-radius: 3px;
  box-shadow: 0 16px 30px -22px rgba(20, 18, 15, 0.45);
}
/* Covers in cards stay modest so the promise, not the placeholder, leads. */
.guide-card-cover { max-width: 170px; }
.page-body a.guide-card-cover { text-decoration: none; }
.guide-cover-img { height: auto; object-fit: cover; background: var(--paper); border: 1px solid var(--rule); }
.guide-cover {
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-strong); padding: 1rem 1.05rem 0.95rem; position: relative; overflow: hidden;
}
/* The specimen covers carry an ambient wash; a faint one keeps the placeholder in family. */
.guide-cover::before {
  content: ""; position: absolute; width: 85%; height: 60%; right: -25%; top: 18%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--wash-rgb), 0.55), rgba(var(--wash-rgb), 0));
  filter: blur(18px);
}
.guide-cover > * { position: relative; }
.guide-cover-top, .guide-cover-note {
  font-family: 'Space Mono', monospace; font-size: 0.55rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.guide-cover-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.03em;
  font-size: 1.3rem; line-height: 1.05; margin-top: auto;
}
.guide-cover-edition {
  font-family: 'Space Mono', monospace; font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1.5; margin-top: 0.8rem; display: flex; gap: 0.5rem; align-items: baseline;
}
.guide-cover-edition::before { content: ""; flex: 0 0 1.2rem; height: 2px; background: var(--ink); transform: translateY(-0.2em); }
.guide-cover-note { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--rule-strong); opacity: 0.8; }

/* ------------------------------------------------------- edition buy box */
.guide-buybox {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 3rem; align-items: start;
  margin-top: 0; padding-bottom: 2.6rem; border-bottom: 1px dashed var(--rule);
}
.guide-buybox-cover { max-width: 260px; }
.guide-buybox-cover .guide-cover-title { font-size: 1.75rem; }
.page-body .guide-buybox-outcome { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 1.1rem; }
.page-body ul.guide-includes { list-style: none; margin: 0 0 1rem; }
.page-body ul.guide-includes li { position: relative; padding-left: 1.4rem; margin-bottom: 0.4rem; font-size: 0.97rem; }
.page-body ul.guide-includes li::before { content: "\2014"; position: absolute; left: 0; color: var(--muted); }
.page-body .guide-version, .page-body .guide-fineprint { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.4rem; line-height: 1.6; }
.page-body .guide-needs { font-size: 0.92rem; line-height: 1.55; margin: 0 0 1rem; padding: 0.65rem 0.85rem; border: 1px solid var(--rule); border-radius: 6px; }
.page-body .guide-needs strong { display: block; font-family: 'Space Mono', monospace; font-size: 0.7rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.page-body .guide-version { font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 760px) {
  .guide-buybox { grid-template-columns: 1fr; gap: 1.8rem; }
  .guide-buybox-cover { max-width: 210px; }
}

/* ------------------------------------------------------------ who it's for */
.guide-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.page-body .guide-fit h3 { margin-top: 0; font-size: 1rem; }
.page-body .guide-fit ul { font-size: 0.97rem; }
@media (max-width: 600px) { .guide-fit { grid-template-columns: 1fr; } }

/* ------------------------------------------------- "what you'll build" flow */
.page-body ol.guide-flow { list-style: none; margin: 1.6rem 0 2rem; counter-reset: none; }
.page-body ol.guide-flow li {
  position: relative; margin: 0 0 1.4rem; padding: 0.95rem 1.1rem 0.95rem 3.6rem;
  border: 1px solid var(--border-ui); border-radius: 6px; background: var(--card);
  color: var(--ink); font-size: 0.97rem; line-height: 1.5;
}
.page-body ol.guide-flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.75rem; bottom: -1.45rem; height: 1.4rem;
  border-left: 1px dashed var(--border-ui);
}
.guide-flow-num {
  position: absolute; left: 1.1rem; top: 1.05rem;
  font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em;
}

/* --------------------------------------------------------------- chapters */
.page-body ol.guide-chapters { list-style: none; counter-reset: ch; margin-left: 0; }
.page-body ol.guide-chapters li { counter-increment: ch; display: grid; grid-template-columns: 2.4rem 1fr; padding: 0.7rem 0; margin: 0; border-top: 1px solid var(--rule); }
.page-body ol.guide-chapters li:last-child { border-bottom: 1px solid var(--rule); }
.page-body ol.guide-chapters li::before { content: counter(ch, decimal-leading-zero); font-family: 'Space Mono', monospace; font-size: 0.72rem; color: var(--muted); padding-top: 0.32rem; }

/* ------------------------------------------------------------ sample pages */
.guide-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.guide-samples img { width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); box-shadow: 0 16px 30px -24px rgba(20, 18, 15, 0.45); }
.guide-sample-placeholder {
  aspect-ratio: 210 / 297; border: 1px dashed var(--border-ui); border-radius: 4px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  color: var(--muted); font-size: 0.85rem;
}
.guide-sample-placeholder small { font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 600px) { .guide-samples { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; } .guide-sample-placeholder { font-size: 0.7rem; } }

/* ------------------------------------------------------------- trust strip */
.page-body ul.guide-trust {
  list-style: none; margin: 0; display: grid;
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
}
.page-body ul.guide-trust li { background: var(--paper-2); margin: 0; padding: 1.3rem 1.3rem 1.4rem; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.page-body ul.guide-trust strong { display: block; color: var(--ink); font-size: 0.95rem; margin-bottom: 0.35rem; }

.guide-quote { margin-top: 3.2rem; }
.guide-faq { margin-top: 1.4rem; }

/* ------------------------------------------------------- thanks / library */
.guides-app { margin-bottom: 2rem; }
.page-body .guides-status { font-size: 1.03rem; color: var(--ink-2); }
.library-items { display: grid; gap: 1rem; margin: 1.5rem 0 1rem; }
.library-item { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 1.4rem 1.4rem 1.2rem; }
.page-body .library-item h3 { margin: 0 0 0.3rem; font-size: 1.08rem; line-height: 1.35; }
.page-body .library-item h3 a { text-decoration: none; }
.page-body .library-meta { font-family: 'Space Mono', monospace; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.page-body ul.library-files { list-style: none; margin: 0; }
.page-body ul.library-files li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.65rem 0; margin: 0; border-top: 1px solid var(--rule); }
.page-body a.library-download {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  border-radius: 100px; padding: 0.5rem 1.15rem; font-size: 0.86rem; font-weight: 500;
}
.page-body a.library-download:hover { background: #2c2822; }
.library-download.is-used { color: var(--muted); font-size: 0.9rem; }
.library-left { font-size: 0.78rem; color: var(--muted); }

.guides-resend { border-top: 1px dashed var(--rule); padding-top: 0.5rem; }
.guides-resend-form button { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.guides-resend-form button:hover { background: #2c2822; border-color: #2c2822; }

/* Bundle cards style their paragraphs; keep the small mono label on top. */
.page-body .bundle-card .guide-card-label { font-size: 0.66rem; line-height: 1.5; margin: 0 0 0.6rem; }

/* ----------------------------------------------------- catalogue filters */
/* Author display rules beat the browser's [hidden]; these put it back. */
.guide-filters[hidden], .guide-jump[hidden], .guide-shelf[hidden], .guide-shelf-break[hidden],
.guide-card[hidden], .bundle-card[hidden], .guide-filter-empty[hidden], .guide-filter-clear[hidden],
.guide-filter-panel[hidden], .guide-filter-badge[hidden] { display: none; }

/* A search box and one Filters button. The facets drop down from the button,
 * so the page stays quiet until someone asks for them. z-index lifts the panel
 * over the shelves below, which are their own stacking contexts. */
.guide-filters { z-index: 5; margin-top: 1.6rem; margin-bottom: 0.5rem; }
.guide-filter-bar { position: relative; display: flex; gap: 0.6rem; align-items: stretch; }
.guide-filter-bar .blog-search-input { flex: 1 1 auto; min-width: 0; }
.guide-filter-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem; flex: 0 0 auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--border-ui); border-radius: 100px;
  padding: 0 1.25rem; font: inherit; font-size: 0.92rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.guide-filter-toggle:hover, .guide-filter-toggle.has-active { border-color: var(--ink); }
.guide-filter-toggle[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.guide-filter-toggle svg { flex: 0 0 auto; }
.guide-filter-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem;
  padding: 0 0.35rem; border-radius: 100px; background: var(--ink); color: var(--paper);
  font-family: 'Space Mono', monospace; font-size: 0.68rem; line-height: 1;
}
.guide-filter-toggle[aria-expanded="true"] .guide-filter-badge { background: var(--paper); color: var(--ink); }

.guide-filter-panel {
  position: absolute; top: calc(100% + 0.6rem); right: 0; width: min(100%, 640px);
  display: grid; gap: 1rem; padding: 1.3rem 1.4rem 1.1rem;
  background: var(--card); border: 1px solid var(--rule-strong); border-radius: 10px;
  box-shadow: 0 28px 50px -26px rgba(20, 18, 15, 0.42);
}
.guide-filter-row { display: grid; gap: 0.5rem; }
.guide-filter-label {
  font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); line-height: 1.5;
}
.guide-filter-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.guide-filter-pills .pill { white-space: nowrap; }
.guide-filter-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1.2rem;
  border-top: 1px dashed var(--rule); padding-top: 0.95rem;
}
.guide-filter-check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-2); cursor: pointer; }
.guide-filter-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--ink); margin: 0; }
.guide-filter-done {
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 100px;
  padding: 0.5rem 1.2rem; font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer;
}
.guide-filter-done:hover { background: #2c2822; border-color: #2c2822; }

/* Under the bar: how many editions are on show, and what narrowed them. */
.guide-filter-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; margin-top: 0.8rem; min-height: 1.9rem; }
.page-body .guide-filter-count { margin: 0 0.4rem 0 0; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.guide-filter-chips { display: contents; }
/* While the panel is open its pills show the choices, so the chips and the
 * clear link step aside instead of peeking out from under it. */
.guide-filters.is-open .guide-filter-chips, .guide-filters.is-open .guide-filter-clear { display: none; }
.guide-chip {
  display: inline-flex; align-items: center; gap: 0.45rem; background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: 100px; padding: 0.22rem 0.6rem 0.22rem 0.75rem;
  font-family: 'Space Mono', monospace; font-size: 0.68rem; letter-spacing: 0.03em; cursor: pointer;
}
.guide-chip span { font-family: inherit; font-size: 0.95rem; line-height: 1; color: var(--muted); }
.guide-chip:hover { border-color: var(--ink); }
.guide-chip:hover span { color: var(--ink); }
.guide-filter-clear {
  background: none; border: 0; padding: 0; font: inherit; font-size: 0.84rem; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.2em;
}
.guide-filter-clear:hover { text-decoration-color: var(--ink); }
.page-body .guide-filter-empty { margin: 2.2rem 0 0; padding: 1.3rem 1.4rem; border: 1px dashed var(--border-ui); border-radius: 6px; color: var(--ink-2); }

/* One card left in a shelf: lay it out sideways instead of stretching it. */
@media (min-width: 600px) {
  .guide-grid.grid-n1 .guide-card { flex-direction: row; gap: 1.8rem; align-items: flex-start; }
  .guide-grid.grid-n1 .guide-card-cover { flex: 0 0 150px; margin-bottom: 0; }
  .guide-grid.grid-n1 .guide-buy { justify-content: flex-start; gap: 1.4rem; margin-top: 0.4rem; }
}

@media (max-width: 520px) {
  .guide-filter-toggle { padding: 0 1rem; }
  .guide-filter-panel { padding: 1.1rem 1rem 1rem; }
}

/* ------------------------------------------- breadcrumb trail, edition H1 */
.article-hero .crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.55rem; }
.article-hero .crumbs a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.25em; }
.article-hero .crumbs a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.crumbs-sep { opacity: 0.55; }
.guide-h1-edition {
  display: block; margin-top: 0.55rem; font-size: 0.5em; font-weight: 500;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ink-2);
}

/* --------------------------------------- edition tags and the free article */
.page-body ul.guide-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.page-body ul.guide-tags li { margin: 0; }
.page-body ul.guide-tags a {
  display: inline-block; font-family: 'Space Mono', monospace; font-size: 0.68rem; letter-spacing: 0.04em;
  border: 1px solid var(--border-ui); border-radius: 100px; padding: 0.28rem 0.75rem;
  color: var(--ink-2); text-decoration: none; transition: border-color 0.18s, color 0.18s;
}
.page-body ul.guide-tags a:hover { border-color: var(--ink); color: var(--ink); }
.page-body .guide-article { margin-top: 2rem; padding: 0.9rem 1.1rem; background: var(--paper-2); border-radius: 6px; font-size: 0.97rem; }
.page-body .guide-samples-soon { font-size: 0.92rem; color: var(--muted); }
.guide-samples:empty { display: none; }
/* Finished and waiting for the shop to open: a solid outline, a step up from "Coming soon". */
.guide-soon-ready { border-style: solid; color: var(--ink); }

/* ------------------------------------------- closing buy block, phone bar */
.guide-closing {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center;
  margin-top: 3.2rem; padding: 2rem 2.2rem; background: var(--card);
  border: 1px solid var(--rule); border-radius: 6px;
}
.page-body .guide-closing h2 { margin: 0 0 0.5rem; }
.page-body .guide-closing-text p { margin: 0; color: var(--ink-2); }
.guide-closing .guide-buy-large { margin: 0 0 0.7rem; }
.page-body .guide-closing .guide-fineprint { margin: 0; }
@media (max-width: 760px) { .guide-closing { grid-template-columns: 1fr; padding: 1.5rem 1.3rem; } }

.guide-buybar { display: none; }
@media (max-width: 760px) {
  .guide-buybar:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 0.7rem 1.1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-top: 1px solid var(--rule-strong);
    box-shadow: 0 -10px 24px -18px rgba(20, 18, 15, 0.5);
  }
  .guide-buybar-text { margin: 0; min-width: 0; line-height: 1.3; }
  .guide-buybar-text strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .guide-buybar-text span { font-size: 0.78rem; color: var(--muted); }
  a.guide-buybar .guide-buy-btn, .guide-buybar a.guide-buy-btn { flex: 0 0 auto; padding: 0.65rem 1.7rem; font-size: 0.92rem; color: var(--paper); text-decoration: none; }
  /* Keep the footer's last lines clear of the bar. */
  body.has-buybar { padding-bottom: 4.6rem; }
}

/* Sample pages open at full size. */
.guide-samples a { display: block; border-radius: 4px; }
.guide-samples a:hover img, .guide-samples a:focus-visible img { border-color: var(--ink); }
.page-body .guide-samples-hint { font-size: 0.84rem; color: var(--muted); margin-top: -1.4rem; }

/* Contrast: these two fell under 4.5:1 in Lighthouse. */
.crumbs-sep { opacity: 1; color: var(--muted); }
.guide-cover-note { opacity: 1; }

/* ------------------------------------------------------- buyer reviews */
/* Edition pages (_includes/guides/reviews.html). Nothing renders without an approved review. */
.guide-stars { letter-spacing: 0.08em; color: var(--ink); }
.page-body .guide-rating { margin: 0 0 0.9rem; font-size: 0.88rem; color: var(--ink-2); }
.page-body .guide-rating a { color: inherit; text-decoration: none; }
.page-body .guide-rating a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--ink); }
.page-body .guide-rating-big { font-size: 1rem; }
.page-body .guide-rating-big .guide-stars { font-size: 1.15rem; }
.page-body ul.guide-review-list { list-style: none; margin: 1.2rem 0 1rem; padding: 0; }
.page-body ul.guide-review-list li.guide-review { margin: 0; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.page-body .guide-review-head { margin: 0 0 0.45rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; }
.page-body .guide-review-head strong { color: var(--ink); }
.page-body .guide-review-meta { font-size: 0.78rem; color: var(--muted); }
.page-body .guide-review-body { margin: 0; }
.page-body .guide-reviews-how { font-size: 0.84rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 1rem; }

/* Library page: the review form under each guide. */
.library-review { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }
.page-body .library-review > p { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 0.6rem; }
.library-review-toggle, .library-review-form button[type="submit"] {
  font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer; border-radius: 100px; padding: 0.5rem 1.15rem;
}
.library-review-toggle { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.library-review-toggle:hover { background: var(--ink); color: var(--paper); }
.library-review-form { display: grid; gap: 0.9rem; margin-top: 0.4rem; }
.library-review-form[hidden] { display: none; }
.library-review-form fieldset { border: 0; margin: 0; padding: 0; }
.page-body .library-review-form legend, .page-body .library-review-form label.library-review-label {
  font-family: inherit; font-size: 0.86rem; font-weight: 600; letter-spacing: normal; text-transform: none;
  color: var(--ink); margin: 0 0 0.35rem; padding: 0; display: block;
}
.library-stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; }
.library-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.library-stars label { font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--rule-strong); padding: 0 0.05rem; }
.library-stars label::before { content: '★'; }
.library-stars input:checked ~ label, .library-stars label:hover, .library-stars label:hover ~ label { color: var(--ink); }
.library-stars input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.library-review-form textarea, .library-review-form input[type="text"] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--border-ui); border-radius: 6px; padding: 0.6rem 0.75rem;
}
.library-review-form textarea { min-height: 7.5rem; resize: vertical; }
.library-review-form .library-review-check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.88rem; color: var(--ink-2); }
.library-review-form .library-review-check input { margin-top: 0.25rem; }
.library-review-form button[type="submit"] { justify-self: start; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.library-review-form button[type="submit"]:hover { background: #2c2822; }
.page-body .library-review-note { font-size: 0.8rem; color: var(--muted); margin: 0; }
.page-body .library-review-msg { font-size: 0.88rem; color: var(--ink); margin: 0; min-height: 1.2em; }

/* Launch promo line (_includes/guides/promo.html). */
.guide-promo {
  margin: 0 0 1.6rem; padding: 0.7rem 1rem; border-left: 3px solid #b4532f;
  background: rgba(180, 83, 47, 0.07); border-radius: 0 6px 6px 0; font-size: 0.95rem; color: var(--ink);
}
.guide-promo code {
  font-family: 'Space Mono', monospace; font-size: 0.86rem; letter-spacing: 0.06em;
  padding: 0.1rem 0.4rem; background: var(--card, #fff); border: 1px dashed rgba(180, 83, 47, 0.6); border-radius: 4px;
}
.guide-buybox-body .guide-promo { margin: 0.9rem 0 0.4rem; font-size: 0.88rem; }

/* Language of a translated edition: a small tag on its card, and the link to
   the same edition in the other language in the buy box. */
.guide-lang {
  display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.35rem; border: 1px solid var(--rule, #d8d4ca);
  border-radius: 3px; font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.08em; vertical-align: 1px;
}
.guide-twin { margin: 0.5rem 0 0; font-size: 0.88rem; }
