/* =========================================================
   WriteUpCafe — writeup-v2.css (2026-11-15 single writeup page, Stage 1)
   One reading core, six frames. Scoped under .wv2 (on .wp-wrap).
   Written to design-system/design.md (parchment reader): H1 48/800 copper-dark,
   H2 36/700 and H3 28/600, DM Sans 600 small titles, copper eyebrows, 40px / 32px pill
   buttons with orange outline, tab-chip selection, 14px cards, palette colours only.
   The options menu, action bar, comments popup and modals keep the inline styles copied
   from the old page (views/post/v2/head.php); type cards come from series-listing.css.
   ========================================================= */
.wp-wrap.wv2 {
  --v-bg: var(--wuc-parchment, #f5f0e8); --v-raised: var(--wuc-parchment-raised, #fbf7ef);
  --v-fg1: #1a0f06; --v-fg2: #3d2a18; --v-meta: #6b5a4a;
  --v-display: var(--wuc-copper-dark, #8b4513); --v-copper: var(--wuc-copper, #c17d3c);
  --v-gold: var(--wuc-gold-highlight, #f0c080); --v-orange: var(--wuc-primary, #e87a35);
  --v-line: rgba(139, 69, 19, 0.18); --v-line-strong: rgba(139, 69, 19, 0.35);
  --v-serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  background: var(--v-bg); color: var(--v-fg1);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.5;
}
/* no blanket [hidden] rule here: the comments code shows its reply boxes with an inline
   display while leaving the hidden attribute in place (found 2026-11-15) */
.wv2 a { text-decoration: none; }
.wv2 :focus-visible { outline: 3px solid rgba(232, 122, 53, 0.55); outline-offset: 2px; }
.wv2-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--v-copper); }
.wv2-meta { font-size: 13px; color: var(--v-meta); }
.wv2 .wv2-h3 { margin: 0; font-family: var(--v-serif); font-weight: 600; font-size: 28px; line-height: 1.25; letter-spacing: -0.01em; color: var(--v-display); }

/* ---------- buttons ---------- */
.wv2 .wv2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; background: transparent; font: 500 14px/1 'DM Sans', sans-serif;
  cursor: pointer; white-space: nowrap; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}
.wv2 .wv2-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.wv2 .wv2-btn--primary { background: var(--v-orange); border-color: var(--v-orange); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.wv2 .wv2-btn--primary:hover { background: #f08a45; border-color: #f08a45; }
.wv2 .wv2-btn--outline { border-color: var(--v-orange); color: var(--v-orange); }
.wv2 .wv2-btn--outline:hover { background: rgba(232, 122, 53, 0.08); }
.wv2 .wv2-btn--ondark { border-color: rgba(193, 125, 60, 0.45); color: #e8ddd0; }
.wv2 .wv2-btn--ondark:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(193, 125, 60, 0.7); }
.wv2 .wv2-btn[disabled] { opacity: .6; cursor: default; }
.wv2-f-on { display: none; }
.wv2-btn.is-following .wv2-f-off { display: none; }
.wv2-btn.is-following .wv2-f-on { display: inline; }
.wv2 .wv2-btn--outline.is-following, .wv2 .wv2-followauthor.following { border-color: var(--v-line-strong); color: var(--v-fg2); }
.wv2 .wv2-btn--primary.is-following { background: transparent; border-color: var(--v-line-strong); color: var(--v-fg2); box-shadow: none; }
.wv2 .wv2-btn--ondark.is-following { border-color: rgba(193, 125, 60, 0.45); color: #e8ddd0; }
.wv2 .wv2-followauthor svg { width: 14px; height: 14px; }
.wv2 .wv2-ibtn {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--v-line-strong); color: var(--v-fg2);
  display: inline-flex; align-items: center; justify-content: center;
}
.wv2 a.wv2-ibtn:hover { border-color: var(--v-orange); color: var(--v-orange); }
.wv2 .wv2-ibtn.is-off { opacity: .35; }

/* ---------- top bars (book / collection / playbook) ---------- */
.wv2-bar { background: var(--v-raised); border-bottom: 1px solid var(--v-line); }
.wv2-bar--book { position: sticky; top: 64px; z-index: 60; }
.wv2-bar__in { max-width: 1200px; margin: 0 auto; padding: 10px 40px; display: flex; align-items: center; gap: 14px; }
.wv2-bar__in--stack { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 40px; }
.wv2-bar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.wv2-bar__line { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--v-fg2); }
.wv2 .wv2-bar__name { font-family: var(--v-serif); font-weight: 700; font-size: 17px; color: var(--v-display); }
.wv2-bar__meta { font-size: 14px; color: var(--v-fg2); }
.wv2-bar__nav { display: inline-flex; align-items: center; gap: 8px; }
.wv2-bar__nav--dark .wv2-ibtn { border-color: rgba(193, 125, 60, 0.45); color: #e8ddd0; }
.wv2-bar__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wv2 .wv2-bar__title a { font-family: var(--v-serif); font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--v-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv2-bar__title span { font-size: 12px; color: var(--v-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv2-minicover {
  flex: 0 0 30px; width: 30px; height: 44px; border-radius: 2px 5px 5px 2px; background: var(--bk, #8b4513);
  border-left: 4px solid rgba(0, 0, 0, 0.3); box-shadow: 0 4px 10px rgba(26, 15, 6, 0.25); overflow: hidden;
}
.wv2-minicover--img { border-left: 0; }
.wv2-minicover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wv2-bar__progress { height: 3px; background: var(--v-line); }
.wv2-bar__progress span { display: block; height: 100%; background: var(--v-copper); }

/* chapter picker */
.wv2-picker { position: relative; }
.wv2-picker__btn {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--v-line-strong); color: var(--v-fg1); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; max-width: 420px;
}
.wv2-picker__btn::-webkit-details-marker { display: none; }
.wv2-picker__long { overflow: hidden; text-overflow: ellipsis; }
.wv2-picker__short { display: none; }
.wv2-picker[open] .wv2-picker__btn { border-color: var(--v-orange); }
.wv2-picker__menu {
  position: absolute; right: 0; top: 46px; z-index: 5; width: min(380px, 86vw); max-height: 60vh; overflow: auto; padding: 8px;
  border-radius: 14px; border: 1px solid var(--v-line-strong); background: var(--v-raised); box-shadow: 0 18px 40px rgba(26, 15, 6, 0.22);
  display: flex; flex-direction: column;
}
.wv2 .wv2-picker__menu a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--v-fg1); font-size: 14px; line-height: 1.4; }
.wv2 .wv2-picker__menu a:hover { background: rgba(26, 15, 6, 0.04); }
.wv2 .wv2-picker__menu a.is-now { background: rgba(232, 122, 53, 0.12); color: var(--v-display); font-weight: 600; }
.wv2-picker__menu a span { flex: 0 0 22px; color: var(--v-copper); font-weight: 600; }

/* playbook steps strip */
.wv2-steps { display: flex; gap: 6px; }
.wv2 .wv2-steps__b {
  flex: 1 1 0; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--v-line-strong);
  background: var(--v-bg); color: var(--v-fg2); display: flex; flex-direction: column; gap: 2px;
}
.wv2-steps__b span:first-child { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv2-steps__b span:last-child { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv2 .wv2-steps__b.is-past { background: var(--v-display); border-color: var(--v-display); color: #ffffff; }
.wv2 .wv2-steps__b.is-now { background: var(--v-orange); border-color: var(--v-orange); color: #ffffff; }
.wv2 a.wv2-steps__b:hover { border-color: var(--v-orange); }

/* ---------- layout ---------- */
.wv2-layout { max-width: 1200px; margin: 0 auto; padding: 40px 40px 0; display: flex; gap: 56px; align-items: flex-start; }
.wv2-layout--left { gap: 48px; }
.wv2-layout--centre { display: block; padding-top: 32px; }
.wv2-article { flex: 1 1 0; min-width: 0; max-width: 740px; display: flex; flex-direction: column; gap: 24px; }
.wv2-layout--centre .wv2-article { max-width: 660px; margin: 0 auto; gap: 26px; }
.wv2-rail { flex: 0 0 300px; width: 300px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.wv2-railcard { padding: 20px; border-radius: 14px; border: 1px solid var(--v-line); background: var(--v-raised); display: flex; flex-direction: column; gap: 12px; }

/* ---------- article head ---------- */
.wv2-head { display: flex; flex-direction: column; gap: 16px; }
.wv2-topicsline { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wv2 .wv2-topicsline a { color: var(--v-copper); }
.wv2 .wv2-topicsline a:hover { color: var(--v-display); }
.wv2 .wv2-title {
  margin: 0; font-family: var(--v-serif); font-style: normal; font-weight: 800; font-size: 48px; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--v-display); text-wrap: balance; overflow-wrap: anywhere;
}
.wv2-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wv2 .wv2-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 999px; overflow: hidden; background: var(--v-display); color: #f5f0e8;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px;
}
.wv2 .wv2-avatar--lg { flex-basis: 56px; width: 56px; height: 56px; font-size: 20px; }
.wv2-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wv2-byline__text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.wv2-byline__name { font-size: 15px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.wv2-byline__role { color: var(--v-meta); }
.wv2 .wv2-byline__name a { font-weight: 700; color: var(--v-fg1); }
.wv2 .wv2-byline__name a:hover { color: var(--v-display); }
.wv2-byline__meta { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 13px; color: var(--v-meta); }
.wv2-byline__meta > span + span::before { content: '·'; margin-right: 6px; }
.wv2-byline__meta .wp-read-time { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--v-meta); }
.wv2-byline__meta .wp-read-time svg { display: none; }
.wv2 .wp-author-bar-right { margin-left: 0; display: inline-flex; align-items: center; gap: 8px; }
.wv2-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }

/* centred kinds (book, collection): opener */
.wv2--centred .wv2-head { align-items: center; text-align: center; gap: 14px; padding-top: 16px; }
.wv2--centred .wv2-byline { justify-content: center; }
.wv2--centred .wv2-byline__text { flex: 0 1 auto; text-align: left; }
.wv2-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; }
.wv2-ornament i { width: 56px; height: 1px; background: var(--v-copper); }
.wv2-ornament b { width: 7px; height: 7px; transform: rotate(45deg); background: var(--v-copper); }

/* ---------- body ---------- */
.wv2 .wp-body { max-width: none; }
.wv2 .wp-body p { font-size: 18px; line-height: 1.75; color: var(--v-fg1); }
.wv2 .wp-body h2 { font-family: var(--v-serif); font-weight: 700; font-size: 32px; line-height: 1.2; letter-spacing: -0.015em; color: var(--v-display); scroll-margin-top: 96px; }
.wv2 .wp-body h3 { font-family: var(--v-serif); font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--v-display); }
.wv2 .wp-body > p:first-child::first-letter { color: var(--v-display); }
.wv2--centred .wp-body p { font-size: 19px; line-height: 1.85; }
.wv2--book .wp-body > p:first-child::first-letter { font-size: 72px; line-height: 0.85; margin: 6px 10px 0 0; }
.wv2-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wv2 .wv2-tag {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--v-orange);
  color: var(--v-orange); font-weight: 500; font-size: 13px;
}
.wv2 .wv2-tag:hover { background: rgba(232, 122, 53, 0.08); }
.wv2--centred .wv2-tags { justify-content: center; }

/* ---------- series strip ---------- */
.wv2-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border-radius: 14px; background: #1a0f06; color: #e8ddd0; }
.wv2-strip__text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wv2 .wv2-strip__name { font-weight: 600; font-size: 18px; line-height: 1.35; color: var(--v-gold); }

/* ---------- end of text: next / previous ---------- */
.wv2-end { display: flex; flex-direction: column; gap: 14px; }
.wv2 .wv2-next, .wv2-finish {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px;
  border-radius: 14px; background: #1a0f06; color: #e8ddd0;
}
.wv2-next__text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wv2-next__title, .wv2-finish__title { font-family: var(--v-serif); font-weight: 600; font-size: 28px; line-height: 1.25; color: var(--v-gold); overflow-wrap: anywhere; }
.wv2-next__sub { font-size: 14px; color: #ddd0c0; }
.wv2 .wv2-next:hover .wv2-btn--primary { background: #f08a45; border-color: #f08a45; }
.wv2-finish { flex-direction: column; align-items: flex-start; gap: 8px; }
.wv2-finish__row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.wv2 .wv2-prev { font-size: 14px; font-weight: 600; color: var(--v-display); }
.wv2 .wv2-prev:hover { color: var(--v-copper); }

/* ---------- author box ---------- */
.wv2-author { padding: 24px; border-radius: 14px; border: 1px solid var(--v-line); background: var(--v-raised); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.wv2-author__text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wv2 .wv2-author__name { font-weight: 600; font-size: 18px; color: var(--v-fg1); }
.wv2-author__bio { font-size: 14px; color: var(--v-fg2); }

/* ---------- rail: contents, parts, where you are ---------- */
.wv2-toc, .wv2-parts { display: flex; flex-direction: column; }
.wv2 .wv2-toc a { padding: 6px 0 6px 12px; border-left: 2px solid var(--v-line); font-size: 14px; line-height: 1.4; color: var(--v-fg2); }
.wv2 .wv2-toc a:hover { color: var(--v-display); }
.wv2 .wv2-toc a.is-active { border-left-color: var(--v-orange); color: var(--v-display); font-weight: 600; }
.wv2 .wv2-parts a { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--v-line); font-size: 14px; line-height: 1.4; color: var(--v-fg2); }
.wv2 .wv2-parts a:first-child { border-top: 0; padding-top: 0; }
.wv2-parts a span:first-child { flex: 0 0 22px; color: var(--v-copper); font-weight: 600; }
.wv2 .wv2-parts a.is-now { color: var(--v-display); font-weight: 600; }
.wv2 .wv2-parts a:hover { color: var(--v-display); }
.wv2 .wv2-parts .wv2-parts__all { font-weight: 600; color: var(--v-display); }
.wv2-where { font-family: var(--v-serif); font-weight: 700; font-size: 36px; line-height: 1; color: var(--v-display); }
.wv2-segs { display: flex; gap: 4px; }
.wv2-segs i { flex: 1; height: 6px; border-radius: 999px; background: var(--v-line); }
.wv2-segs i.is-past { background: var(--v-display); }
.wv2-segs i.is-now { background: var(--v-orange); }

/* ---------- course: lesson list ---------- */
.wv2-lessons {
  flex: 0 0 320px; width: 320px; padding: 20px; border-radius: 14px; border: 1px solid var(--v-line); background: var(--v-raised);
  display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px;
}
.wv2-lessons__head { display: flex; flex-direction: column; gap: 4px; }
.wv2 .wv2-lessons__name { font-weight: 600; font-size: 18px; line-height: 1.35; color: var(--v-fg1); }
.wv2-progress { display: flex; flex-direction: column; gap: 6px; }
.wv2-progress__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--v-fg2); }
.wv2-progress__row strong { font-weight: 600; color: var(--v-display); }
.wv2-progress__bar { height: 6px; border-radius: 999px; background: var(--v-line); overflow: hidden; }
.wv2-progress__bar span { display: block; height: 100%; border-radius: 999px; background: var(--v-copper); }
.wv2-lessons__list { display: flex; flex-direction: column; gap: 4px; }
.wv2 .wv2-lesson { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; color: var(--v-fg1); font-size: 14px; line-height: 1.4; }
.wv2 .wv2-lesson:hover { background: rgba(26, 15, 6, 0.04); }
.wv2 .wv2-lesson.is-now { background: rgba(232, 122, 53, 0.12); border-color: rgba(232, 122, 53, 0.35); font-weight: 600; }
.wv2-lesson__dot {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--v-line-strong); color: var(--v-meta);
  font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.wv2-lesson.is-now .wv2-lesson__dot { border-color: var(--v-orange); color: var(--v-orange); }
.wv2-lesson.is-done .wv2-lesson__dot { background: var(--v-display); border-color: var(--v-display); color: #ffffff; }

/* ---------- after the text ---------- */
.wv2-after { max-width: 1200px; margin: 0 auto; padding: 48px 40px 120px; display: flex; flex-direction: column; gap: 48px; }
.wv2-after:empty { padding-top: 0; }
.wv2-sec { display: flex; flex-direction: column; gap: 18px; }
.wv2-sec--narrow { max-width: 660px; width: 100%; margin: 0 auto; }
.wv2-after--centre > .wv2-sec:not(.wv2-sec--narrow) { max-width: 900px; width: 100%; margin: 0 auto; }
.wv2-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--v-line); }
.wv2 .wv2-more { font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--v-display); }
.wv2 .wv2-more:hover { color: var(--v-copper); }
.wv2 .wp-cards-row { margin: 0; }
.wv2 .wp-card-title { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 18px; line-height: 1.35; color: var(--v-fg1); }

/* book: contents + about */
.wv2-contents { display: flex; flex-direction: column; margin-top: -18px; }
.wv2 .wv2-contents a { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--v-line); color: var(--v-fg1); }
.wv2 .wv2-contents a:hover .wv2-contents__t { color: var(--v-display); }
.wv2-contents__mark { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--v-line-strong); display: inline-flex; align-items: center; justify-content: center; color: #ffffff; }
.wv2-contents a.is-done .wv2-contents__mark { background: var(--v-display); border-color: var(--v-display); }
.wv2-contents a.is-now .wv2-contents__mark { border-color: var(--v-orange); }
.wv2-contents__n { flex: 0 0 28px; font-family: var(--v-serif); font-weight: 600; font-size: 20px; color: var(--v-copper); }
.wv2-contents__t { flex: 1; min-width: 0; font-weight: 500; font-size: 17px; }
.wv2-contents a.is-now .wv2-contents__t { font-weight: 600; }
.wv2-contents__s { font-size: 13px; color: var(--v-meta); white-space: nowrap; }
.wv2-contents a.is-now .wv2-contents__s { color: var(--v-orange); }
.wv2-about { padding: 28px; border-radius: 14px; border: 1px solid var(--v-line); background: var(--v-raised); display: flex; gap: 24px; align-items: flex-start; }
.wv2 .wv2-about__cover {
  flex: 0 0 120px; width: 120px; height: 176px; aspect-ratio: auto; padding: 14px 12px; display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 3px 8px 8px 3px; background: var(--bk, #8b4513); border-left: 7px solid rgba(0, 0, 0, 0.3); color: var(--bk-ink, #f5f0e8);
  box-shadow: 0 12px 24px rgba(26, 15, 6, 0.25);
}
.wv2 .wv2-about__cover.slv-book__cover--img { padding: 0; border-left: 0; overflow: hidden; }
.wv2-about__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wv2-about__cover span { font-size: 8px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; overflow-wrap: anywhere; }
.wv2-about__cover strong { font-family: var(--v-serif); font-weight: 700; font-size: 15px; line-height: 1.1; color: var(--bk-title, #f0c080); padding-bottom: 6px; border-bottom: 2px solid var(--bk-rule, #f0c080); overflow-wrap: anywhere; }
.wv2-about__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wv2 .wv2-about__name { font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--v-fg1); }
.wv2-about__by { font-size: 14px; color: var(--v-fg2); }
.wv2 .wv2-about__by a { font-weight: 700; color: var(--v-display); }
.wv2-about__text p { margin: 0; font-size: 15px; color: var(--v-fg2); }
.wv2-about__row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

/* collection: other pieces */
.wv2-pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wv2 .wv2-piece { padding: 22px; border-radius: 14px; border: 1px solid var(--v-line); background: var(--v-raised); display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--v-fg1); }
.wv2 .wv2-piece:hover { border-color: var(--v-orange); }
.wv2-piece__title { font-weight: 600; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }

/* suggestion cards: the listing block without its page chrome */
.wv2 .wv2-slv { background: transparent; min-height: 0; }
.wv2 .wv2-slv .slv-eyebrow { align-self: flex-start; }
.wv2 .wv2-slv .slv-list--series .slv-row:first-child { border-top: 0; padding-top: 4px; }

/* book: phone bottom bar */
.wv2-bottombar { display: none; }

/* the floating action bar sits above the phone bottom bar */
@media (max-width: 640px) { .wv2--book .wp-meta-bar { bottom: 72px; } }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .wv2-layout { flex-direction: column; padding: 32px 32px 0; gap: 32px; }
  .wv2-layout--centre { display: block; }
  .wv2-article { max-width: none; width: 100%; }
  .wv2-rail, .wv2-lessons { position: static; flex: 0 0 auto; width: 100%; }
  .wv2-rail { flex-direction: row; flex-wrap: wrap; }
  .wv2-rail > * { flex: 1 1 280px; }
  .wv2-after { padding: 40px 32px 120px; }
  .wv2-bar__in { padding-left: 32px; padding-right: 32px; }
}
/* ---------- phone ---------- */
@media (max-width: 640px) {
  .wv2-layout { padding: 24px 16px 0; }
  .wv2-after { padding: 36px 16px 140px; gap: 36px; }
  .wv2-bar__in { padding: 10px 16px; gap: 10px; }
  .wv2-bar__in--stack { padding: 12px 16px; }
  .wv2 .wv2-title { font-size: 34px; }
  .wv2 .wv2-h3 { font-size: 22px; }
  .wv2 .wp-body p { font-size: 17px; }
  .wv2--centred .wp-body p { font-size: 17px; line-height: 1.8; }
  .wv2--book .wp-body > p:first-child::first-letter { font-size: 58px; }
  .wv2 .wp-body h2 { font-size: 26px; }
  .wv2-next__title, .wv2-finish__title { font-size: 22px; }
  .wv2 .wv2-next { padding: 20px; }
  .wv2-picker__long { display: none; }
  .wv2-picker__short { display: inline; }
  .wv2-bar--book .wv2-bar__nav { display: none; }
  .wv2-steps { overflow-x: auto; scrollbar-width: none; }
  .wv2-steps::-webkit-scrollbar { display: none; }
  .wv2 .wv2-steps__b { flex: 0 0 150px; }
  .wv2-about { padding: 20px; gap: 16px; }
  .wv2 .wv2-about__cover { flex-basis: 96px; width: 96px; height: 140px; }
  .wv2-pieces { grid-template-columns: minmax(0, 1fr); }
  .wv2 .wv2-slv .slv-list--book { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wv2-bottombar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #1a0f06;
  }
  .wv2 .wv2-bottombar a { display: inline-flex; align-items: center; gap: 6px; height: 44px; color: #e8ddd0; font-weight: 500; font-size: 14px; }
  .wv2 .wv2-bottombar a.wv2-bottombar__mid { color: var(--v-gold); }
  .wv2-bottombar span { width: 60px; }
}
.wv2 .wv2-about__cover strong { font-style: normal; }

/* =========================================================
   Stage 2 — discussion side panel (2026-11-15)
   The comments popup markup (#wpCommentModal.wp-cmodal-overlay > .wp-cmodal) laid out as a
   panel on the right; a sheet from the bottom on phones. Same ids and handlers as before.
   ========================================================= */
.comment__badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e87a35; color: #ffffff;
  font: 500 11px/1.6 'DM Sans', sans-serif; vertical-align: 1px;
}
.wp-cmodal-overlay.wv2-panel {
  inset: 64px 0 0 auto; width: 420px; max-width: 100vw; padding: 0; z-index: 95;
  background: transparent; backdrop-filter: none; align-items: stretch; justify-content: flex-end; pointer-events: none;
}
.wv2-panel .wp-cmodal {
  pointer-events: auto; width: 100%; max-width: none; max-height: none; height: 100%; border-radius: 0;
  background: var(--wuc-parchment-raised, #fbf7ef); border-left: 1px solid rgba(139, 69, 19, 0.35);
  box-shadow: -18px 0 40px rgba(26, 15, 6, 0.14); animation: wv2PanelIn .22s ease-out; outline: none;
}
@keyframes wv2PanelIn { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.wv2-panel .wp-cmodal-header { padding: 18px 22px 12px; border-bottom: 0; }
.wv2-panel .wp-cmodal-header h3 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 22px; line-height: 1.25; color: #8b4513; }
.wv2-panel .wp-cmodal-header h3 span { display: block; font-size: 13px; color: #6b5a4a; }
.wv2-panel .wp-cmodal-close {
  flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 999px;
  border: 1px solid rgba(139, 69, 19, 0.35); color: #3d2a18; padding: 0;
}
.wv2-panel .wp-cmodal-close:hover { background: rgba(26, 15, 6, 0.04); border-color: #e87a35; color: #e87a35; }
.wv2-panel__grip { display: none; }
.wv2-panel__sort { display: flex; gap: 6px; padding: 0 22px 12px; border-bottom: 1px solid rgba(139, 69, 19, 0.18); }
.wv2-panel__chip {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: #1a0f06;
  font: 500 13px 'DM Sans', sans-serif; cursor: pointer;
}
.wv2-panel__chip:hover { background: rgba(26, 15, 6, 0.04); }
.wv2-panel__chip.is-active { background: rgba(232, 122, 53, 0.12); border-color: rgba(232, 122, 53, 0.35); color: #e87a35; }
.wv2-panel .wp-cmodal-body { padding: 18px 22px 28px; display: flex; flex-direction: column; }
.wv2-panel .bp2-cmt-header { display: none; }
.wv2-panel .comment-composer { margin-bottom: 8px; }
.wv2-panel .comment-textarea { border-radius: 10px; border: 1px solid rgba(139, 69, 19, 0.35); background: #ffffff; font: 400 14px/1.5 'DM Sans', sans-serif; color: #1a0f06; }
.wv2-panel .comment-textarea:focus { outline: none; border-color: #e87a35; box-shadow: 0 0 0 3px rgba(232, 122, 53, 0.25); }
.wv2-panel .comment { padding: 16px 0; border-bottom: 1px solid rgba(139, 69, 19, 0.18); }
.wv2-panel .comment .comment { padding: 12px 0 0; border-bottom: 0; }
.wv2-panel .comment__author { font-size: 13px; font-weight: 700; color: #1a0f06; }
.wv2-panel .comment__timestamp { font-size: 13px; color: #6b5a4a; }
.wv2-panel .comment__body { font-size: 14px; line-height: 1.55; color: #1a0f06; }
.wv2-panel .comment__replies { margin: 12px 0 0 6px; padding-left: 14px; border-left: 2px solid rgba(139, 69, 19, 0.18); }
.wv2-panel .comment.is-target > .comment__header, .wv2-panel .comment.is-target > .comment__body { animation: wv2Target 2.4s ease-out; }
@keyframes wv2Target { from { background: rgba(232, 122, 53, 0.22); } to { background: transparent; } }
.wv2-panel .comment-thread.is-reversed { display: flex; flex-direction: column-reverse; }
.wv2-panel .comment-thread.is-reversed > .comment:first-child { border-bottom: 0; }
.wv2-panel .comment-thread.is-reversed > .comment:last-child { border-bottom: 1px solid rgba(139, 69, 19, 0.18); }

/* wide screens: the page makes room so the text stays readable beside the panel */
@media (min-width: 1100px) {
  .wv2.is-panel-open .wv2-layout, .wv2.is-panel-open .wv2-after, .wv2.is-panel-open .wv2-bar__in { margin-right: 420px; max-width: none; }
  .wv2.is-panel-open .wv2-layout { padding-left: 40px; padding-right: 40px; }
  .wv2.is-panel-open .wv2-rail, .wv2.is-panel-open .wv2-lessons { display: none; }
  .wv2.is-panel-open .wv2-article { margin: 0 auto; }
  .wv2.is-panel-open .wp-meta-bar { left: calc((100vw - 420px) / 2); }
  .wv2.is-panel-open .wv2-pieces, .wv2.is-panel-open .wp-cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* between phone and wide: the panel lies over the page with a light scrim */
@media (min-width: 641px) and (max-width: 1099px) {
  .wp-cmodal-overlay.wv2-panel { inset: 64px 0 0 0; width: auto; background: rgba(26, 15, 6, 0.3); pointer-events: auto; }
  .wv2-panel .wp-cmodal { width: 420px; }
}
/* phone: a sheet from the bottom, comment box pinned at its foot */
@media (max-width: 640px) {
  .wp-cmodal-overlay.wv2-panel { inset: 0; width: auto; z-index: 200; background: rgba(26, 15, 6, 0.45); pointer-events: auto; align-items: flex-end; justify-content: stretch; }
  .wv2-panel .wp-cmodal { height: 82vh; border-left: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 40px rgba(26, 15, 6, 0.2); animation: wv2SheetIn .24s ease-out; }
  @keyframes wv2SheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .wv2-panel__grip { display: block; align-self: center; width: 40px; height: 4px; margin-top: 10px; border-radius: 999px; background: rgba(139, 69, 19, 0.35); }
  .wv2-panel .wp-cmodal-header { padding: 10px 16px 10px; }
  .wv2-panel__sort { padding: 0 16px 10px; }
  .wv2-panel .wp-cmodal-body { padding: 14px 16px 0; }
  .wv2-panel .comment-thread { order: 1; flex: 1 0 auto; padding-bottom: 14px; }
  .wv2-panel .comment-composer {
    order: 2; position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--wuc-parchment-raised, #fbf7ef); border-top: 1px solid rgba(139, 69, 19, 0.18);
  }
  .wv2-panel .comment-composer .comment__avatar { display: none; }
  .wv2-panel .comment-composer .comment-textarea { min-height: 44px; }
}

/* the site chat bubble steps aside while the discussion is open (it sat on the Post button) */
.wv2-panel-on #cbTrigger { display: none !important; }
@media (max-width: 640px) {
  .wv2-panel .comment-composer .comment-textarea { height: 48px; min-height: 48px; transition: height .15s ease-out; }
  .wv2-panel .comment-composer .comment-textarea:focus { height: 104px; }
  .wv2-panel .comment-composer .comment-form__actions { margin-top: 8px; }
}
