/* ═══════════════════════════════════════════
   HOME PAGE STYLES — index.html only
   Shared base styles: styles.css
═══════════════════════════════════════════ */

/* ===== WELCOME OVERLAY ===== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: var(--background);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  overflow: hidden;
  animation: welcomeFadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.welcome-overlay.closing {
  animation: welcomeFadeOut 0.5s ease forwards;
  pointer-events: none;
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes welcomeFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  width: 100%;
  animation: welcomeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes welcomeSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-logo {
  width: 120px;
  height: auto;
  margin-bottom: var(--space-8);
  opacity: 0.9;
  filter: brightness(0);
  transition: all 0.3s ease;
}

.welcome-logo:active {
  transform: scale(1.04);
}

@media (hover: hover) and (any-pointer: fine) {
  .welcome-logo:hover {
    transform: scale(1.04);
  }
}

.welcome-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--dark-blue);
  margin-bottom: var(--space-6);
}

.welcome-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  font-size: var(--fs-2xl);
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: var(--space-6);
  white-space: nowrap;
}

.welcome-title em {
  color: var(--dark-blue);
  font-style: normal;
}

.welcome-divider {
  width: 56px;
  height: 1px;
  background: var(--border);
  margin: 0 auto var(--space-6);
}

.welcome-description {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--primary);
  margin-bottom: var(--space-11);
  max-width: 50ch;
}

.welcome-btn {
  background: var(--ink-panel);
  color: var(--text-on-dark);
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-4) var(--space-10);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

@media (max-width: 480px) {
  .welcome-logo {
    width: 56px;
    margin-bottom: var(--space-6);
  }

  .welcome-description {
    font-size: var(--fs-xs);
    margin-bottom: var(--space-9);
  }

  .welcome-btn {
    padding: var(--space-3) var(--space-8);
  }

  .welcome-title {
    font-size: var(--fs-xl);
    white-space: normal;
  }
}

/* ===== BASE LAYOUT ===== */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ===== HEADER ===== */
header {
  color: var(--text-on-dark);
  padding: var(--space-4) var(--space-12);
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);

  flex-wrap: nowrap;

  background-color: var(--ink-panel);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}
.header-right-row,
.header-right-icons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }
}

/* ── PAGE WATERMARK ── */
header::before {
  content: "Reflections & Insights";
  font-size: var(--fs-watermark);
}

/* ===== PREFACE OVERLAY ===== */
.preface-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preface-overlay.visible {
  display: flex;
  opacity: 1;
}

.preface-overlay.hidden {
  display: none;
}

.preface-modal {
  background: var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--space-11);
  position: relative;
  box-shadow: var(--bs-modal);
  box-sizing: border-box;
}

.preface-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: var(--icon-sm);
  color: var(--muted);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.preface-close:active {
  background: rgba(0, 0, 0, 0.06);
  color: var(--primary);
}

@media (hover: hover) and (any-pointer: fine) {
  .preface-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--primary);
  }
}

html[data-theme="dark"] .preface-close:active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
@media (hover: hover) and (any-pointer: fine) {
  html[data-theme="dark"] .preface-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
  }
}

.preface-label {
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-wider);
  color: var(--dark-blue);
  font-weight: 600;
  margin: 0 0 var(--space-4);
}

.preface-quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--primary);
  border: none;
  margin: 0 0 var(--space-7) 0;
  padding: 0 0 var(--space-6) 0;
  border-bottom: 1px dashed var(--border-light);
}

.preface-body p {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.preface-body p:last-child {
  margin-bottom: 0;
}

.preface-emphasis {
  font-weight: 600;
  color: var(--primary);
}

.preface-body .preface-highlight {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-base);
  color: var(--primary);
  line-height: 1.6;
  border-left: 2px solid var(--border);
  padding-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.preface-body .preface-section-intro {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.preface-body .preface-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.preface-body .preface-section {
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.preface-body .preface-section:last-child {
  border-bottom: none;
}

.preface-body .preface-section h3 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.preface-body .preface-section p {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: 0;
}

.preface-body .preface-authors-intro {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px dashed var(--border);
}
.preface-body .preface-author-name,
.preface-body .preface-author-role {
  display: block;
}
.preface-body .preface-author-name {
  font-weight: 600;
  color: var(--primary);
}
.preface-body .preface-author-role {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.6;
}

.preface-body .preface-outcomes {
  padding-left: var(--space-6);
  margin: 0 0 var(--space-6);
}
.preface-body .preface-outcomes li {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: var(--space-2);
}
.preface-body .preface-outcomes li::marker {
  color: var(--primary);
  font-weight: 600;
}

.preface-body .preface-closing {
  font-style: italic;
  color: var(--primary);
  opacity: 0.8;
  margin-top: var(--space-6);
}

.preface-body .preface-authors {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  text-align: right;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-light);
}

.preface-body .preface-signature {
  text-align: right;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px dashed var(--border-light);
}

.preface-body .preface-signature-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--primary);
  letter-spacing: var(--ls-tight);
  line-height: 1.4;
  margin-bottom: var(--space-1);
}

.preface-body .preface-signature-title {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--muted);
  opacity: 0.85;
  line-height: 1.6;
}

/* ===== PREFACE TRIGGER BUTTON ===== */
.preface-trigger {
  display: inline-flex;
  align-items: center;
  background: var(--background);
  color: var(--primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  border: none;
  outline: none;
  box-shadow: none;
  transition: all 0.15s;
  pointer-events: all;
  text-decoration: none;
}

.preface-trigger:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.header-icon-btn,
.preface-trigger.search-trigger {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-border);
  color: var(--text-on-dark);
}

.header-icon-btn {
  display: flex;
  align-items: center;
}
.header-icon-btn i {
  font-size: var(--icon-sm);
}

button.header-icon-btn {
  cursor: pointer;
  font: inherit;
  transition: background 0.15s;
}

.header-icon-btn .header-icon-letters {
  font-family: var(--font-display);
  font-size: var(--icon-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.header-icon-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (hover: hover) and (any-pointer: fine) {
  .header-icon-btn:hover,
  .preface-trigger.search-trigger:hover {
    transform: none;
    background: var(--on-dark-fill-hover);
  }
}

/* ===== GLOBAL HTML SETTINGS ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ===== SERIES INTRO ===== */
.series-intro {
  text-align: center;
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
}

.series-intro--compact {
  margin-bottom: 0;
  padding-bottom: 0;
}

.landing-intro-toggle {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-3);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  overflow: hidden;
  border-left-width: 4px; /* bundle.css's .btc-toggle default is 3px — a touch bolder here, since this bar is the whole page's entry point, not a mid-chapter aside */
  transition: background var(--dur, 150ms) var(--ease, ease);
}

@media (hover: hover) and (any-pointer: fine) {
  .landing-intro-toggle:hover {
    background: var(--border-light);
  }
}
.landing-intro-toggle:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: -2px;
}

.landing-intro-toggle .btc-toggle-hint {
  background: color-mix(in srgb, var(--accent-navy) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent-navy) 30%, transparent);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  color: var(--accent-navy);
  font-weight: 500;
}

.landing-intro-toggle .btc-toggle-hint i {
  font-style: normal;
  width: 0.4em;
  height: 0.4em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
}
.landing-intro-toggle[aria-expanded="true"] .btc-toggle-hint i {
  transform: rotate(225deg);
  margin-top: 2px;
}
.landing-intro-content {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}
.landing-intro-content > .reminder-box,
.landing-intro-content > .ref-table-block {
  max-width: none;
}

.landing-intro-content .ref-table-block .ref-table {
  min-width: 0;
  table-layout: fixed;
}
.landing-intro-content .ref-table-block .ref-table td:first-child {
  width: 32%;
}
@media (max-width: 480px) {
  .landing-intro-content .ref-table-block .ref-table td:first-child {
    width: 38%;
  }
}

.series-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.series-intro .kicker {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  line-height: 2;
  color: var(--primary);
  margin-bottom: var(--space-4);
  display: block;
}

.series-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--accent-navy);
  letter-spacing: var(--ls-tighter);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.series-intro p {
  max-width: 40ch;
  letter-spacing: var(--ls-widest);
  margin: var(--space-4) auto 0;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

/* ===== EARN IT BEFORE YOU EVERYTHING ===== */
.earn-it-feature {
  text-align: center;
  max-width: 720px;
  margin: var(--space-10) auto;
  padding: var(--space-10) var(--space-8);
  background: var(--ink-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--bs-medium);
}

.earn-it-kicker {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-4);
}

.earn-it-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--text-on-dark);
  letter-spacing: var(--ls-tighter);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

.earn-it-subtitle {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-on-dark-soft);
  line-height: 1.5;
  max-width: 48ch;
  margin: 0 auto var(--space-5);
}

.earn-it-feature .earn-it-btn {
  font-size: var(--fs-xs);
  padding: var(--space-4) var(--space-8);
  background: var(--paper);
  color: var(--primary);
}

/* ===== SECTIONS GRID ===== */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 380px));
  justify-content: center;
  gap: var(--space-4) var(--space-8);
  margin-top: var(--space-8);
  margin-bottom: var(--space-12);
}

/* ===== REFLECT CTA (capstone reflection, kept out of the 2x2 grid) ===== */
.reflect-cta {
  display: flex;
  justify-content: center;
  margin-top: -1.5rem;
  margin-bottom: var(--space-12);
}
.reflect-cta-btn {
  font-size: var(--fs-base);
  padding: var(--space-4) var(--space-8);
}

/* ===== SECTION CARD ===== */
.section-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--bs-medium);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  user-select: none;
}

.section-card:active {
  box-shadow: var(--bs-heavy);
  transform: translateY(-2px);
}

@media (hover: hover) and (any-pointer: fine) {
  .section-card:hover {
    box-shadow: var(--bs-heavy);
    transform: translateY(-2px);
  }
}

.section-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ── Card header band ── */
.sc-header {
  padding: var(--space-5) var(--space-6) var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--paper);
}

.sc-num {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  line-height: 1;
  opacity: 0.28;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

.sc-meta {
  flex: 1;
  min-width: 0;
}

.sc-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-1);
  letter-spacing: var(--ls-tight);
}

.sc-desc {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 400;
}

/* ── Topic list ── */
.sc-topic-list {
  padding: var(--space-2) var(--space-6) var(--space-3);
  flex: 1;
  background: var(--paper);
}

.sc-topic-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.sc-topic-item:last-child {
  border-bottom: none;
}

.sc-topic-arrow {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
  opacity: 0.4;
  line-height: 1;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.sc-topic-item:active .sc-topic-arrow {
  opacity: 1;
  transform: translateX(3px);
}

@media (hover: hover) and (any-pointer: fine) {
  .sc-topic-item:hover .sc-topic-arrow {
    opacity: 1;
    transform: translateX(3px);
  }
}

.sc-topic-name {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.4;
  font-weight: 400;
  transition: color 0.15s ease;
}

.sc-topic-item:active .sc-topic-name {
  color: var(--accent-navy);
}

@media (hover: hover) and (any-pointer: fine) {
  .sc-topic-item:hover .sc-topic-name {
    color: var(--accent-navy);
  }
}

/* ── Visited indicator ── */
.sc-topic-visited {
  display: none;
  margin-left: auto;
  padding-left: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--accent-navy);
  opacity: 0.55;
  flex-shrink: 0;
  line-height: 1;
}

.sc-topic-item.visited .sc-topic-visited {
  display: inline;
}

.sc-topic-item.visited .sc-topic-name {
  color: var(--text-secondary);
}

/* ===== FLOATING TOPIC TOOLTIP ===== */
.topic-tooltip {
  position: fixed;
  width: 260px;
  background: var(--background);
  color: var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
  box-shadow: var(--bs-veryheavy);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translateX(-8px) translateY(-5px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.topic-tooltip.visible {
  opacity: 1;
  transform: translateX(0) translateY(-5px);
}

.topic-tooltip.caret-left::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 6px 6px 0;
  border-color: transparent;
}

.topic-tooltip.caret-right::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent;
}

.tt-title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--dark-blue);
  line-height: 1.3;
  margin-bottom: var(--space-2);
  letter-spacing: var(--ls-tight);
}

.tt-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-dark);
  line-height: 1.5;
  font-weight: 400;
}

/* ===== TOPIC OVERLAY (touch devices) ===== */
.topic-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--scrim-soft);
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.topic-overlay.visible .topic-overlay-panel {
  transform: translateY(0);
  opacity: 1;
}

.topic-overlay-panel {
  background: var(--paper);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-8) var(--space-7) var(--space-10);
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease;
  box-shadow: var(--bs-sheet);
}

.topic-overlay-panel::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border);
  margin: 0 auto var(--space-6);
}

.topic-overlay-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--background);
  border: none;
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}

.topic-overlay-close:active {
  background: var(--border-light);
}

@media (hover: hover) and (any-pointer: fine) {
  .topic-overlay-close:hover {
    background: var(--border-light);
  }
}

.to-meta {
  margin-bottom: var(--space-4);
}

.to-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--primary);
  line-height: 1.25;
  margin: 0 0 var(--space-2);
}

.to-subtitle {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.to-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--ink-panel);
  color: var(--text-on-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  min-height: 44px;
}

/* ===== BUTTON HOVER / PRESS ===== */
.welcome-btn:active,
.to-explore-btn:active {
  background: var(--text-on-dark);
  color: var(--ink-panel);
}
.preface-trigger:not(.search-trigger):active {
  background: var(--primary);
  color: var(--background);
}
.earn-it-feature .earn-it-btn:active {
  background: var(--primary);
  color: var(--paper);
}
@media (hover: hover) and (any-pointer: fine) {
  .welcome-btn:hover,
  .to-explore-btn:hover {
    background: var(--text-on-dark);
    color: var(--ink-panel);
  }
  .preface-trigger:not(.search-trigger):hover {
    background: var(--primary);
    color: var(--background);
  }
  .earn-it-feature .earn-it-btn:hover {
    background: var(--primary);
    color: var(--paper);
  }
}

@media (hover: hover) and (pointer: fine) and (any-pointer: fine) {
  .topic-overlay {
    display: none !important;
  }
}

@media (any-pointer: coarse) {
  .topic-tooltip {
    display: none;
  }
}

/* ===== RESPONSIVE — layout only, not interaction ===== */
@media (max-width: 950px) {
  .container {
    padding: 0 var(--space-6);
  }
}

@media (max-width: 700px) {
  .container {
    padding: 0 var(--space-5);
  }

  header h1 {
    font-size: var(--fs-xl);
    line-height: 1.2;
  }

  .series-intro h2 {
    font-size: var(--fs-xl);
    font-weight: 600;
  }
}

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

@media (max-width: 700px) {
  .sections-grid,
  .reflect-cta {
    margin-bottom: var(--space-7);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }

  header h1 {
    font-size: var(--fs-lg);
  }

  .series-intro h2 {
    font-size: var(--fs-xl);
    font-weight: 600;
  }

  .series-intro .kicker {
    font-size: var(--fs-xs);
  }

  footer p {
    font-size: var(--fs-xs);
  }
}

/* Touch screens (phones and tablets alike), not a width */
@media (hover: none) {
  .section-card {
    -webkit-tap-highlight-color: rgba(26, 82, 118, 0.1);
  }
}
