/*
 * style.css — techdet-theme
 * Well... How Did We Get Here? by G M Greene
 * techdet.verkkopublishing.com
 *
 * Theme Name: techdet-theme
 * Theme URI: https://techdet.verkkopublishing.com
 * Author: G M Greene / Verkko Publishing PT
 * Description: Custom theme for the Well... How Did We Get Here? book promotional site.
 * Version: 2.4
 *
 * STRUCTURE
 * ─────────────────────────────────────────────────────────
 * 1.  Shared tokens (:root)
 * 2.  Global reset & base
 * 3.  Navigation (td-nav)
 * 4.  Homepage (whdwgh-page)
 *     4a. Layout utilities
 *     4b. Typography
 *     4c. Scroll reveal
 *     4d. Hero
 *     4e. CTA buttons
 *     4f. The Question
 *     4g. About the Book
 *     4h. Pull Quote
 *     4i. Buy Now
 *     4j. What's Inside
 *     4k. About the Author
 *     4l. From the Blog
 *     4m. Responsive
 * 5.  Blog post pages (techdet-single)
 *     5a. Base
 *     5b. Article typography
 *     5c. Byline & CTA band
 *     5d. Responsive
 * ─────────────────────────────────────────────────────────
 */


/* ============================================================
   1. SHARED TOKENS
   Defined on :root so both .whdwgh-page and .techdet-single
   can inherit them. Each page scope can override locally if
   needed, but the values are identical across both templates.
   ============================================================ */
:root {
  --ink:          #15110A;
  --ink-deep:     #0B0905;
  --ink-soft:     #F0EBE3;
  --bone:         #1A1A1A;
  --bone-dim:     #444444;
  --gold:         #C99A4A;
  --gold-bright:  #E8B768;
  --rust:         #ac4220;
  --rust-dark:    #8c3015;
  --bronze:       #666666;
  --line:         rgba(0, 0, 0, 0.12);
  --line-strong:  rgba(0, 0, 0, 0.22);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-label:   'DM Sans', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.25rem;
  --text-5xl:  4.5rem;
}


/* ============================================================
   2. GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif; }
img { max-width: 100%; display: block; }


/* ============================================================
   3. NAVIGATION
   ============================================================ */
.td-nav {
  background: var(--rust);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  /* Reset inherited values so the nav renders identically on both
     page-book-promo.php and single.php regardless of their body
     font-size or line-height declarations */
  font-size: 16px;
  line-height: 1;
  box-sizing: border-box;
  margin: 0;
}
.td-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.td-nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none !important;
}
.td-nav-logo img {
  height: 28px;
  width: auto;
  display: block;
}
.td-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.td-nav-links li { margin: 0; padding: 0; }
.td-nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #FFFFFF !important;
  text-decoration: none !important;
  opacity: 0.88;
  transition: opacity 0.18s ease;
  white-space: nowrap;
}
.td-nav-links a:hover {
  opacity: 1;
  text-decoration: none !important;
}
.td-nav-links .td-nav-cta a {
  opacity: 1;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.55);
  padding: 7px 16px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.td-nav-links .td-nav-cta a:hover {
  background: rgba(255,255,255,0.12);
  border-color: #FFFFFF;
}

/* Nav mobile toggle */
.td-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.td-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.td-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.td-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.td-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .td-nav-toggle { display: flex; }
  .td-nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--rust);
    border-top: 1px solid rgba(255,255,255,0.12);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
  }
  .td-nav-links.is-open { display: flex; }
  .td-nav-links li { width: 100%; }
  .td-nav-links a {
    display: block;
    padding: 12px 28px;
    font-size: 1rem;
  }
  .td-nav-links .td-nav-cta a {
    margin: 8px 28px 0;
    display: block;
    text-align: center;
    padding: 10px 16px;
  }
}


/* ============================================================
   4. HOMEPAGE — .whdwgh-page
   ============================================================ */

/* 4a. Layout utilities */
.whdwgh-page {
  background: #FFFFFF;
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}
.whdwgh-page * { box-sizing: border-box; }
.whdwgh-page img { max-width: 100%; display: block; }
.whdwgh-wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.whdwgh-wrap--narrow { max-width: 740px; }
.whdwgh-page a { color: var(--rust); text-decoration: none; }
.whdwgh-page a:hover { text-decoration: underline; }


/* 4b. Typography */
.whdwgh-page h1,
.whdwgh-page h2,
.whdwgh-page h3,
.whdwgh-page h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--bone);
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.whdwgh-eyebrow {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 16px 0;
  display: block;
}
.whdwgh-section-sub {
  color: var(--bone-dim);
  font-size: var(--text-md);
}


/* 4c. Scroll reveal */
.whdwgh-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.js-reveal-ready .whdwgh-reveal {
  opacity: 0;
  transform: translateY(22px);
}
.js-reveal-ready .whdwgh-reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-reveal-ready .whdwgh-reveal--d1 { transition-delay: 0.08s; }
.js-reveal-ready .whdwgh-reveal--d2 { transition-delay: 0.16s; }
.js-reveal-ready .whdwgh-reveal--d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .whdwgh-reveal { opacity: 1; transform: none; transition: none; }
}


/* 4d. Hero */
.whdwgh-hero {
  position: relative;
  padding: 88px 0 64px;
  background: var(--rust);
  border-bottom: 1px solid var(--line);
}
.whdwgh-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.whdwgh-hero-cover-wrap { position: relative; }
.whdwgh-hero-cover-wrap::before {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px solid var(--line-strong);
  z-index: -1;
}
.whdwgh-hero-cover {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  box-shadow: 0 40px 80px -24px rgba(0,0,0,0.75), 0 0 0 1px rgba(201,154,74,0.18);
}
.whdwgh-hero .whdwgh-eyebrow { color: #FFFFFF; opacity: 0.85; }
.whdwgh-hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 2.85rem);
  margin-bottom: 22px;
  max-width: 560px;
  color: #FFFFFF;
}
.whdwgh-book-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: #FFFFFF;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 18px;
  margin-bottom: 28px;
  max-width: 480px;
}
.whdwgh-book-label em { color: #FFFFFF; opacity: 0.85; font-style: italic; }
.whdwgh-hero p.whdwgh-lede {
  font-size: var(--text-md);
  color: #FFFFFF;
  opacity: 0.92;
  max-width: 480px;
  margin-bottom: 34px;
}
.whdwgh-hero-byline {
  font-family: var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  color: #FFFFFF;
  opacity: 0.75;
  margin-top: 30px;
}


/* 4e. CTA Buttons */
.whdwgh-cta-row { display: flex; gap: 18px; flex-wrap: wrap; }
.whdwgh-btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding: 15px 30px;
  border-radius: 0;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.whdwgh-btn--primary,
.whdwgh-btn--primary:link,
.whdwgh-btn--primary:visited {
  background: var(--gold-bright);
  color: var(--ink-deep);
  border: 1px solid var(--gold-bright);
}
.whdwgh-btn--primary:hover,
.whdwgh-btn--primary:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-deep);
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -10px rgba(232,183,104,0.4);
}
.whdwgh-btn--ghost,
.whdwgh-btn--ghost:link,
.whdwgh-btn--ghost:visited {
  background: transparent;
  border: 1px solid #1A1A1A;
  color: #1A1A1A;
}
.whdwgh-btn--ghost:hover,
.whdwgh-btn--ghost:focus-visible {
  border-color: var(--rust);
  color: var(--rust);
  background: rgba(172,66,32,0.05);
}
.whdwgh-btn:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}
/* Ghost button override on rust hero background */
.whdwgh-hero .whdwgh-btn--ghost,
.whdwgh-hero .whdwgh-btn--ghost:link,
.whdwgh-hero .whdwgh-btn--ghost:visited {
  border-color: rgba(255,255,255,0.55);
  color: #FFFFFF;
}
.whdwgh-hero .whdwgh-btn--ghost:hover,
.whdwgh-hero .whdwgh-btn--ghost:focus-visible {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: rgba(255,255,255,0.12);
}


/* 4f. The Question */
.whdwgh-question { padding: 80px 0; text-align: center; }
.whdwgh-question h2 {
  font-size: clamp(1.9rem, 3.2vw, var(--text-3xl));
  font-style: italic;
  max-width: 760px;
  margin: 0 auto 22px;
}
.whdwgh-question p { color: var(--bone-dim); max-width: 600px; margin: 0 auto; font-size: var(--text-md); }


/* 4g. About the Book */
.whdwgh-about { padding: 64px 0; }
.whdwgh-about h2 { font-size: var(--text-3xl); margin-bottom: 28px; }
.whdwgh-about p { color: var(--bone-dim); margin-bottom: 20px; font-size: var(--text-md); }
.whdwgh-about p:last-child { margin-bottom: 0; }
.whdwgh-about strong { color: var(--bone); font-weight: 600; }
.whdwgh-about em { color: var(--gold-bright); font-style: italic; }


/* 4h. Pull Quote */
.whdwgh-pullquote {
  padding: 96px 0;
  text-align: center;
  background: #F7F3EE;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.whdwgh-pullquote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3.6vw, var(--text-4xl));
  color: var(--rust);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.38;
}
.whdwgh-pullquote cite {
  display: block;
  margin-top: 28px;
  font-family: var(--font-label);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
}


/* 4i. Buy Now */
.whdwgh-buy { padding: 88px 0; }
.whdwgh-buy h2 { font-size: var(--text-3xl); text-align: center; margin-bottom: 14px; }
.whdwgh-buy .whdwgh-section-sub { text-align: center; margin-bottom: 52px; }
.whdwgh-buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.whdwgh-buy-card {
  border: 1px solid var(--line);
  padding: 36px;
  background: #FAFAFA;
  transition: border-color 0.25s ease;
}
.whdwgh-buy-card:hover { border-color: var(--line-strong); }
.whdwgh-buy-card h3 { font-size: var(--text-xl); margin-bottom: 8px; }
.whdwgh-buy-card .whdwgh-format-note { color: var(--bronze); font-size: var(--text-sm); margin-bottom: 26px; display: block; }
.whdwgh-store-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.whdwgh-store-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1A1A1A;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.whdwgh-store-link:hover {
  text-decoration: none;
  border-color: var(--rust);
  color: var(--rust);
  background: rgba(172,66,32,0.05);
}
.whdwgh-availability-note { font-size: var(--text-sm); color: var(--bronze); font-style: italic; margin: 18px 0 0 0; }


/* 4j. What's Inside */
.whdwgh-contents {
  padding: 88px 0;
  background: #F7F3EE;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.whdwgh-contents h2 { font-size: var(--text-3xl); text-align: center; margin-bottom: 14px; }
.whdwgh-contents .whdwgh-section-sub { text-align: center; margin-bottom: 56px; }
.whdwgh-toc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; }
.whdwgh-toc-item { border-left: 2px solid var(--line); padding-left: 20px; transition: border-color 0.25s ease; }
.whdwgh-toc-item:hover { border-color: var(--rust); }
.whdwgh-toc-num { font-family: var(--font-label); font-size: var(--text-xs); letter-spacing: 0.1em; color: var(--bronze); display: block; margin-bottom: 6px; }
.whdwgh-toc-item h4 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--bone); margin: 0 0 8px 0; font-weight: 600; }
.whdwgh-toc-item p { font-size: var(--text-sm); color: var(--bone-dim); margin: 0; }


/* 4k. About the Author */
.whdwgh-author { padding: 88px 0; }
.whdwgh-author-grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
.whdwgh-author-photo { width: 200px; height: 200px; object-fit: cover; border: 1px solid var(--line-strong); }
.whdwgh-author-photo--placeholder { width: 200px; height: 200px; border: 1px solid var(--line); background: #F0EBE3; }
.whdwgh-author h2 { font-size: var(--text-2xl); margin-bottom: 16px; }
.whdwgh-author p { color: var(--bone-dim); margin-bottom: 16px; font-size: var(--text-md); }


/* 4l. From the Blog */
.whdwgh-blog {
  padding: 88px 0 104px;
  background: var(--rust);
}
.whdwgh-blog .whdwgh-eyebrow,
.whdwgh-blog h2 {
  color: #FFFFFF;
  text-align: center;
}
.whdwgh-blog .whdwgh-section-sub {
  text-align: center;
  color: #FFFFFF;
  opacity: 0.85;
  margin-bottom: 52px;
  font-size: var(--text-md);
}
.whdwgh-blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}
.whdwgh-blog-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-soft);
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.whdwgh-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.45);
  text-decoration: none !important;
}
.whdwgh-blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #8C7A5C;
  background-size: cover;
  background-position: center;
}
.whdwgh-blog-card-body {
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.whdwgh-blog-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #5C5142;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1;
}
.whdwgh-blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none !important;
}
.whdwgh-blog-card:hover .whdwgh-blog-card-cta { color: var(--rust-dark); }
.whdwgh-blog-card-cta .whdwgh-arrow { transition: transform 0.22s ease; }
.whdwgh-blog-card:hover .whdwgh-blog-card-cta .whdwgh-arrow { transform: translateX(4px); }


/* 4m. Responsive — Homepage */
@media (max-width: 860px) {
  .whdwgh-hero-grid { grid-template-columns: 1fr; }
  .whdwgh-hero-cover-wrap { max-width: 320px; margin: 0 auto; }
  .whdwgh-buy-grid { grid-template-columns: 1fr; }
  .whdwgh-toc-list { grid-template-columns: 1fr; }
  .whdwgh-author-grid { grid-template-columns: 1fr; text-align: center; }
  .whdwgh-author-photo,
  .whdwgh-author-photo--placeholder { margin: 0 auto; }
  .whdwgh-store-list { grid-template-columns: 1fr; }
  .whdwgh-blog-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   5. BLOG POST PAGES — .techdet-single
   ============================================================ */

/* 5a. Base */
.techdet-single {
  background: #FFFFFF;
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 17px;
  margin: 0;
}
.techdet-single * { box-sizing: border-box; }
.techdet-single img { max-width: 100%; display: block; }
.techdet-single a { color: var(--rust); text-decoration: none; }
.techdet-single a:visited { color: var(--rust); }
.techdet-single a:hover { text-decoration: none; }

.techdet-article-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 28px 96px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}
/* Single column when no sidebar present */
.techdet-article-wrap:not(:has(.techdet-article-sidebar)) {
  grid-template-columns: 1fr;
}
.techdet-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 18px;
  display: block;
}
.techdet-article-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--bone);
  line-height: 1.18;
  margin: 0 0 20px 0;
}
.techdet-meta {
  font-size: 0.85rem;
  color: var(--bronze);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}


/* 5b. Article typography */
.techdet-content { font-size: 1.08rem; color: var(--bone-dim); }
.techdet-content p { margin: 0 0 22px 0; }
.techdet-content em { color: var(--rust); font-style: italic; }
.techdet-content strong { color: var(--bone); font-weight: 600; }
.techdet-content h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--bone);
  margin: 56px 0 22px 0;
  line-height: 1.25;
}
.techdet-content h3 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--bone);
  margin: 40px 0 18px 0;
}
.techdet-content hr,
.techdet-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 48px auto;
  width: 60px;
  position: relative;
}
.techdet-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  background: var(--rust);
  border-radius: 50%;
  transform: translateX(-50%);
}
/* Prose paragraph links — rust, bold, no underline, consistent across all states */
.techdet-content p a { color: var(--rust); font-weight: 700; text-decoration: none; border-bottom: none; }
.techdet-content p a:link { color: var(--rust); }
.techdet-content p a:visited { color: var(--rust); }
.techdet-content p a:hover { color: var(--rust); text-decoration: none; }
.techdet-content p a:active { color: var(--rust); }
.techdet-content blockquote {
  border-left: 2px solid var(--rust);
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  font-style: italic;
  color: var(--rust);
  font-family: var(--font-display);
  font-size: 1.6rem;
}


/* 5c. Byline & CTA band */
.techdet-byline {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--bone-dim);
}
.techdet-byline em { color: var(--bone); font-style: italic; }
.techdet-cta-band {
  background: #F7F3EE;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 64px 28px;
  text-align: center;
}
.techdet-cta-band-inner { max-width: 560px; margin: 0 auto; }
.techdet-cta-band h3 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--bone);
  margin: 0 0 14px 0;
}
.techdet-cta-band p { color: var(--bone-dim); margin: 0 0 26px 0; }
.techdet-cta-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 15px 32px;
  background: var(--rust);
  color: #FFFFFF !important;
  border: 1px solid var(--rust);
  text-decoration: none !important;
  transition: background 0.18s ease, transform 0.18s ease;
}
.techdet-cta-btn:hover {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
  transform: translateY(-2px);
  text-decoration: none !important;
}
.techdet-cta-btn:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}


/* 5d. Responsive — Blog posts */
@media (max-width: 600px) {
  .techdet-article-wrap { padding: 48px 20px 64px; }
}


/* ============================================================
   6. ARTICLES ARCHIVE PAGE — .td-archive-page
   ============================================================ */

.td-archive-page {
  background: #FFFFFF;
  color: var(--bone);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* Archive header */
.td-archive-header {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.td-archive-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}
.td-archive-eyebrow {
  display: block;
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 16px;
}
.td-archive-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, var(--text-4xl));
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 20px 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* Archive main */
.td-archive-main {
  padding: 72px 0 96px;
}

/* Post grid — three columns matching homepage blog grid */
.td-archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
}

/* Post card */
.td-archive-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.td-archive-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px -12px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}
.td-archive-card-link {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-decoration: none !important;
  color: inherit;
}
.td-archive-card-link:hover { text-decoration: none !important; }

/* Card image */
.td-archive-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #F0EBE3;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Card body */
.td-archive-card-body {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.td-archive-card-meta {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--bronze);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.td-archive-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--bone);
  line-height: 1.22;
  margin: 0 0 14px 0;
  flex-shrink: 0;
}
.td-archive-card:hover .td-archive-card-title { color: var(--rust); }
.td-archive-card-excerpt {
  font-size: 0.95rem;
  color: var(--bone-dim);
  line-height: 1.65;
  margin: 0 0 22px 0;
  flex-grow: 1;
}
.td-archive-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none !important;
  margin-top: auto;
}
.td-archive-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.td-archive-card:hover .td-archive-arrow { transform: translateX(4px); }

/* Empty state */
.td-archive-empty {
  color: var(--bone-dim);
  font-size: var(--text-md);
  text-align: center;
  padding: 48px 0;
}

/* Responsive */
@media (max-width: 860px) {
  .td-archive-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .td-archive-grid { grid-template-columns: 1fr; }
  .td-archive-header { padding: 48px 0 40px; }
  .td-archive-main { padding: 48px 0 64px; }
}

/* Blog section footer — View all Articles link */
.whdwgh-blog-footer {
  text-align: center;
  margin-top: 52px;
}
/* Ghost button on rust background needs white border/text */
.whdwgh-blog .whdwgh-btn--ghost,
.whdwgh-blog .whdwgh-btn--ghost:link,
.whdwgh-blog .whdwgh-btn--ghost:visited {
  border-color: rgba(255,255,255,0.55);
  color: #FFFFFF;
}
.whdwgh-blog .whdwgh-btn--ghost:hover,
.whdwgh-blog .whdwgh-btn--ghost:focus-visible {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: rgba(255,255,255,0.12);
}

/* Archive header intro body text */
.td-archive-intro {
  width: 100%;
}
/* Override WordPress block editor's own max-width constraints
   which fire via global-styles-inline-css on Gutenberg blocks */
.td-archive-intro > *,
.td-archive-intro .wp-block-paragraph,
.td-archive-intro .wp-block-heading,
.td-archive-intro .wp-block-group,
.td-archive-intro .wp-block-group__inner-container,
.td-archive-intro .is-layout-constrained > *,
.td-archive-intro .is-layout-flow > * {
  max-width: 100% !important;
  width: 100% !important;
}
.td-archive-intro p {
  font-size: var(--text-md);
  color: var(--bone-dim);
  line-height: 1.7;
  margin: 0 0 18px 0;
}
.td-archive-intro p:last-child { margin-bottom: 0; }
.td-archive-intro em { color: var(--bone); font-style: italic; }
.td-archive-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  color: var(--bone);
  line-height: 1.3;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}

/* ============================================================
   BLOG POST SIDEBAR LAYOUT
   Two-column layout: main content + sidebar CTA
   Used on posts with .techdet-article-main + .techdet-article-sidebar
   ============================================================ */

.techdet-article-main { min-width: 0; }

.techdet-article-sidebar { position: sticky; top: 88px; }

.techdet-sidebar-cta {
  border: 1px solid var(--line);
  padding: 24px;
  background: #FAFAFA;
}
.techdet-sidebar-cta img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 18px;
}
.techdet-sidebar-cta h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 10px 0;
  line-height: 1.2;
}
.techdet-sidebar-cta p {
  font-size: 0.9rem;
  color: var(--bone-dim);
  margin: 0 0 18px 0;
  line-height: 1.55;
}
.techdet-buy-button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--rust);
  color: #FFFFFF !important;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  border: 1px solid var(--rust);
  transition: background 0.18s ease;
}
.techdet-buy-button:hover {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
  text-decoration: none !important;
}

/* ============ SIDEBAR SUBSCRIBE BOX ============ */
.techdet-sidebar-subscribe {
  border: 1px solid var(--line);
  padding: 24px;
  background: #FAFAFA;
  margin-top: 16px;
}
.techdet-sidebar-subscribe h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 10px 0;
  line-height: 1.2;
}
.techdet-sidebar-subscribe p {
  font-size: 0.9rem;
  color: var(--bone-dim);
  margin: 0 0 16px 0;
  line-height: 1.55;
}
.techdet-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.techdet-subscribe-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--bone);
  outline: none;
  transition: border-color 0.18s ease;
}
.techdet-subscribe-input::placeholder {
  color: var(--bronze);
}
.techdet-subscribe-input:focus {
  border-color: var(--rust);
}
.techdet-subscribe-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--rust);
  color: #FFFFFF;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--rust);
  cursor: pointer;
  transition: background 0.18s ease;
}
.techdet-subscribe-btn:hover {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
}

@media (max-width: 860px) {
  .techdet-article-wrap {
    grid-template-columns: 1fr;
  }
  .techdet-article-sidebar {
    position: static;
  }
}

/* ============================================================
   7. WHERE TO BUY PAGE — .whtb-page
   ============================================================ */

.whtb-page {
  background: #FFFFFF;
  color: var(--bone);
  font-family: var(--font-body);
}

.whtb-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Page header */
.whtb-header {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.whtb-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, var(--text-4xl));
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 16px 0;
  line-height: 1.12;
}
.whtb-intro {
  font-size: var(--text-md);
  color: var(--bone-dim);
  max-width: 640px;
  margin: 0;
}

/* Book cover section */
.whtb-book-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
  background: #F7F3EE;
}
.whtb-book-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}
.whtb-cover-wrap img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.2);
}
.whtb-book-meta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, var(--text-2xl));
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 8px 0;
}
.whtb-author {
  font-size: var(--text-md);
  color: var(--bone-dim);
  margin: 0 0 8px 0;
}
.whtb-isbn {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  color: var(--bronze);
  letter-spacing: 0.04em;
  margin: 0 0 20px 0;
}
.whtb-description {
  font-size: var(--text-md);
  color: var(--bone-dim);
  line-height: 1.65;
  margin: 0 0 28px 0;
  max-width: 560px;
}

/* Retailer grid */
.whtb-retailers { padding: 72px 0 88px; }
.whtb-section-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--bone);
  margin: 0 0 40px 0;
}
.whtb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.whtb-card {
  border: 1px solid var(--line);
  padding: 28px 24px;
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.whtb-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.1);
}
.whtb-card-top {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.whtb-card-flag,
.whtb-card-type {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.whtb-card-flag {
  background: var(--rust);
  color: #FFFFFF;
}
.whtb-card-type {
  background: var(--line);
  color: var(--bone-dim);
}
.whtb-card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bone);
  margin: 0 0 10px 0;
  line-height: 1.2;
}
.whtb-card-note {
  font-size: 0.875rem;
  color: var(--bronze);
  margin: 0 0 20px 0;
  line-height: 1.5;
  flex-grow: 1;
}
.whtb-card-btn {
  display: inline-block;
  padding: 11px 20px;
  background: var(--rust);
  color: #FFFFFF !important;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid var(--rust);
  transition: background 0.18s ease;
  text-align: center;
  margin-top: auto;
}
.whtb-card-btn:hover {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
}

/* Local bookshop note */
.whtb-local {
  background: #F7F3EE;
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.whtb-local p {
  font-size: var(--text-md);
  color: var(--bone-dim);
  max-width: 720px;
  margin: 0;
  line-height: 1.65;
}
.whtb-local strong { color: var(--bone); }

/* Responsive */
@media (max-width: 860px) {
  .whtb-book-grid { grid-template-columns: 1fr; }
  .whtb-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .whtb-grid { grid-template-columns: 1fr; }
  .whtb-header { padding: 48px 0 40px; }
}


/* ============================================================
   SITE FOOTER — .td-footer
   Output by site-footer.php — rust band matching the nav
   ============================================================ */
.td-footer {
  background: var(--rust);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 0;
  width: 100%;
  margin-top: auto;
}
.td-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.td-footer-copy {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #FFFFFF;
  opacity: 0.85;
  margin: 0;
}
.td-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}
.td-footer-links li { margin: 0; padding: 0; }
.td-footer-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #FFFFFF !important;
  opacity: 0.85;
  text-decoration: none !important;
  transition: opacity 0.18s ease;
}
.td-footer-links a:hover { opacity: 1; }

@media (max-width: 600px) {
  .td-footer-inner { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   POST NAVIGATION — .techdet-post-nav
   Previous / Next article links on single.php
   ============================================================ */
.techdet-post-nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #F7F3EE;
}
.techdet-post-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.techdet-post-nav-link {
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  text-decoration: none !important;
  max-width: 48%;
  transition: color 0.18s ease;
}
.techdet-post-nav-link:hover { text-decoration: none !important; }
.techdet-post-nav-prev { align-items: flex-start; }
.techdet-post-nav-next { align-items: flex-end; text-align: right; }
.techdet-post-nav-label {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 8px;
  display: block;
}
.techdet-post-nav-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bone);
  line-height: 1.25;
  display: block;
}
.techdet-post-nav-link:hover .techdet-post-nav-title {
  color: var(--rust);
}
.techdet-post-nav-empty { display: block; padding: 28px 0; }

@media (max-width: 600px) {
  .techdet-post-nav-inner { flex-direction: column; gap: 0; }
  .techdet-post-nav-link { max-width: 100%; }
  .techdet-post-nav-next { align-items: flex-start; text-align: left; }
}


/* ============================================================
   ARTICLES PAGE INTRO TOGGLE
   Clamps the intro text and reveals a Read More button.
   JavaScript in home.php toggles .is-expanded on the wrap.
   ============================================================ */
.td-archive-intro-wrap {
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.4s ease;
  position: relative;
}
.td-archive-intro-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #FFFFFF 100%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.td-archive-intro-wrap.is-expanded {
  max-height: 1200px;
}
.td-archive-intro-wrap.is-expanded::after {
  opacity: 0;
}
.td-archive-intro-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--rust);
  letter-spacing: 0.02em;
}
.td-archive-intro-toggle:hover { text-decoration: underline; }
.td-archive-intro-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.td-archive-intro-wrap.is-expanded ~ .td-archive-intro-toggle .td-archive-intro-arrow {
  transform: rotate(180deg);
}