/* ── AskAncients Hub CSS ──
   Home page ("Today" landing view).
   Light, clean, journal-like aesthetic — distinct from the
   gradient-headed consultation/journal/vent pages.
   Loads after shared.css and overrides the body/layout rules
   via the .hub-body class on <body>.
*/

:root {
  --color-background-secondary: #f7f8fb;
  --color-background-primary: #ffffff;
  --color-background-tint: #fafbfd;
  --color-border-tertiary: #e6e8ee;
  --color-border-secondary: #d8dce4;
  --color-border-info: #4a6cf7;
  --color-text-primary: #1a1d23;
  --color-text-secondary: #5e6470;
  --color-text-tertiary: #98a0ad;
  --color-accent: #667eea;
  --color-accent-soft: rgba(102, 126, 234, 0.08);
  --border-radius-lg: 14px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --font-serif: Georgia, 'Times New Roman', serif;
}

/* ── Override shared body styling for hub only ── */
body.hub-body {
  /* Override tint/primary to warm transparents for parchment background */
  --color-background-tint: rgba(255, 248, 235, 0.35);
  --color-background-primary: rgba(255, 250, 240, 0.4);
  background: url('../images/hub-bg.jpg') center top / cover no-repeat fixed;
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: 0;
  color: var(--color-text-primary);
  min-height: 100vh;
}

.hub-shell {
  max-width: 1060px;
  margin: 0 auto;
  padding: 36px 32px 48px;
  text-shadow: 0 0 8px rgba(255, 248, 235, 0.6);
}

/* ── Onboarding nudge ── */
.hub-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid rgba(160, 140, 110, 0.2);
  border-radius: 12px;
  margin-bottom: 16px;
}
.hub-nudge-text {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.hub-nudge-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #5b6abf;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(91, 106, 191, 0.25);
  border-radius: 8px;
  transition: all 0.15s;
}
.hub-nudge-link:hover {
  background: rgba(91, 106, 191, 0.08);
}
.hub-nudge-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.hub-nudge-dismiss:hover {
  color: var(--color-text-secondary);
}

/* ── Header ── */
.hub-header {
  margin-bottom: 28px;
}

.hub-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.hub-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
  margin: 0;
}

.hub-streak {
  display: none;
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 600;
  padding: 4px 12px 4px 8px;
  background: var(--color-accent-soft);
  border-radius: 12px;
  white-space: nowrap;
  cursor: default;
  transition: background 0.3s, transform 0.2s;
}

.hub-streak.visible {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  animation: streakFadeIn 0.4s ease;
}

.hub-streak-fire {
  font-size: 14px;
  line-height: 1;
}

/* Milestone celebration — warm glow */
.hub-streak.hub-streak-milestone {
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.12), rgba(234, 102, 102, 0.12));
  color: #c55a11;
  animation: streakFadeIn 0.4s ease, streakPulse 2s ease-in-out 0.5s 1;
}

@keyframes streakFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hub-greeting {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ── Main column ── */
.hub-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hide slots that have no content rendered yet */
.hub-slot:empty {
  display: none;
}

/* ── Generic hub card ── */
.hub-card {
  display: block;
  background: transparent;
  border: 1px solid rgba(160, 140, 110, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.hub-card:hover {
  background: rgba(255, 250, 240, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(160, 140, 110, 0.35);
}

/* ── Get Wisdom CTA (breakout card) ── */
.hub-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 26px 30px;
  border: 1.5px solid rgba(160, 140, 110, 0.25);
  border-radius: var(--border-radius-lg);
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.hub-cta-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 250, 240, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(160, 140, 110, 0.4);
  box-shadow: 0 4px 20px rgba(120, 100, 70, 0.1);
}

.hub-cta-content {
  flex: 1;
  min-width: 0;
}

.hub-cta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-info);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}

.hub-cta-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.hub-cta-sub {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  min-height: 20px;
  transition: opacity 0.4s ease;
}

.hub-cta-sub.fade-out {
  opacity: 0;
}

/* Portrait avatar stack (left side, 5 portraits) */
.hub-cta-portraits {
  display: flex;
  flex-shrink: 0;
}

.hub-cta-portraits img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255, 250, 240, 0.7);
  margin-left: -12px;
  transition: transform 0.3s ease, opacity 0.5s ease;
  filter: saturate(0.85);
}

.hub-cta-portraits img:first-child {
  margin-left: 0;
}

.hub-cta-card:hover .hub-cta-portraits img {
  filter: saturate(1);
}

.hub-cta-portraits img:nth-child(1) { z-index: 5; }
.hub-cta-portraits img:nth-child(2) { z-index: 4; }
.hub-cta-portraits img:nth-child(3) { z-index: 3; }
.hub-cta-portraits img:nth-child(4) { z-index: 2; }
.hub-cta-portraits img:nth-child(5) { z-index: 1; }

.hub-cta-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-border-info);
  transition: transform 0.2s;
}

.hub-cta-card:hover .hub-cta-arrow {
  transform: translateX(3px);
}

/* ── Storytime cinematic CTA card ── */
.hub-storytime-card {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 4px 0 16px;
  border-radius: var(--border-radius-lg);
  border: 1.5px solid rgba(160, 140, 110, 0.3);
  text-decoration: none;
  color: inherit;
  transition: all 0.35s ease;
  aspect-ratio: 2.5 / 1;
  max-height: 220px;
}

.hub-storytime-card:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 155, 100, 0.5);
  box-shadow: 0 8px 32px rgba(80, 60, 30, 0.2);
}

.hub-storytime-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hub-storytime-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.6s ease;
}

.hub-storytime-card:hover .hub-storytime-bg img {
  transform: scale(1.03);
}

.hub-storytime-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(30, 22, 10, 0.55) 0%,
    rgba(30, 22, 10, 0.3) 40%,
    rgba(30, 22, 10, 0.05) 100%
  );
}

.hub-storytime-content {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
  max-width: 60%;
}

.hub-storytime-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #faf3e4;
  margin-bottom: 6px;
}

.hub-storytime-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #faf3e4;
  margin-bottom: 8px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hub-storytime-sub {
  font-size: 13.5px;
  color: rgba(255, 248, 230, 0.9);
  line-height: 1.55;
  min-height: 20px;
  transition: opacity 0.4s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hub-storytime-sub.fade-out {
  opacity: 0;
}

.hub-storytime-arrow {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(180, 155, 100, 0.25);
  color: rgba(240, 230, 210, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.hub-storytime-card:hover .hub-storytime-arrow {
  background: rgba(180, 155, 100, 0.4);
  transform: translateX(3px);
}

/* ── Daily Wisdom Drop ── */
.hub-drop-card {
  padding: 22px 24px 20px;
}

.hub-drop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hub-drop-mono {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.hub-drop-meta {
  min-width: 0;
}

.hub-drop-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.hub-drop-philosopher {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.hub-drop-quote {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  margin: 0 0 14px;
  padding: 0;
  border: none;
  font-style: italic;
}

.hub-drop-prompt {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 16px;
}

.hub-drop-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-drop-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(200, 190, 170, 0.4);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 250, 240, 0.6);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-background-tint);
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.hub-drop-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.hub-drop-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.hub-drop-save {
  align-self: flex-end;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.hub-drop-save:disabled {
  opacity: 0.45;
  cursor: default;
}

.hub-drop-save:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hub-drop-reflected {
  font-size: 13px;
  font-weight: 600;
  color: #48a87c;
  padding: 8px 0 2px;
}

.hub-drop-reflected-anim {
  animation: dropFadeIn 0.35s ease;
}

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

/* ── Daily Wisdom Carousel ── */
.hub-wisdom-carousel {
  margin-bottom: 20px;
}

.wisdom-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.wisdom-carousel-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: #6b5a3e;
  margin: 0;
}

.wisdom-carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}

.wisdom-carousel-track::-webkit-scrollbar {
  display: none;
}

.wisdom-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 240px;
  min-height: 230px;
  scroll-snap-align: start;
  background: transparent;
  border: 1px solid rgba(160, 140, 110, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  align-self: flex-start;
}

.wisdom-card:hover {
  background: rgba(255, 250, 240, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(160, 140, 110, 0.35);
  box-shadow: 0 4px 16px rgba(120, 100, 70, 0.08);
  transform: translateY(-1px);
}

.wisdom-card--new {
  border-color: rgba(184, 134, 11, 0.3);
}

.wisdom-card--new:hover {
  border-color: rgba(184, 134, 11, 0.45);
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.1);
}

/* Card header */
.wisdom-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wisdom-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.wisdom-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.wisdom-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.wisdom-card-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  color: #b8860b;
  background: rgba(184, 134, 11, 0.12);
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.wisdom-card-info {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-tertiary, #999);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  position: relative;
  flex-shrink: 0;
}

.wisdom-card-info:hover {
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

/* Info tooltip */
.wisdom-info-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--color-text-primary, #2c2416);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  width: 220px;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: tooltipFadeIn 0.2s ease;
  font-weight: 400;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* First-visit descriptions */
.wisdom-card-desc {
  display: none;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(200, 190, 170, 0.2);
}

.wisdom-carousel--first-visit .wisdom-card-desc {
  display: block;
}

/* Card body (preview — collapsed) */
.wisdom-card-body {
  flex: none;
}

.wisdom-card-body--collapsed {
  height: 120px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

/* Card expanded */
.wisdom-card-expanded {
  animation: wisdomExpandIn 0.3s ease;
}

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

/* Drop content styling */
.wisdom-drop-philosopher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.wisdom-drop-portrait {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.wisdom-drop-quote {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-primary);
  margin: 0 0 10px;
  padding: 0;
  border: none;
  font-style: italic;
}

.wisdom-drop-situation,
.wisdom-drop-truth,
.wisdom-drop-tension,
.wisdom-drop-fork {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
  margin: 0 0 10px;
}

.wisdom-drop-principle,
.wisdom-drop-trap,
.wisdom-drop-why,
.wisdom-drop-framework {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 10px;
}

.wisdom-drop-move,
.wisdom-drop-reframe,
.wisdom-drop-practice,
.wisdom-drop-anchor,
.wisdom-drop-approach,
.wisdom-drop-apply,
.wisdom-drop-test {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-primary);
  margin: 0 0 10px;
}

.wisdom-drop-prompt {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 10px;
}

.wisdom-drop-name {
  font-size: 14px;
  color: #b8860b;
  margin: 0 0 8px;
}

.wisdom-drop-attribution {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-style: italic;
  margin: 4px 0 0;
}

.wisdom-drop-words blockquote {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  color: var(--color-text-primary);
  margin: 6px 0 0;
  padding: 10px 14px;
  background: rgba(160, 140, 110, 0.06);
  border-left: 3px solid rgba(160, 140, 110, 0.25);
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

/* Action bar */
.wisdom-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(160, 140, 110, 0.12);
}

.wisdom-action-expand {
  background: none;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #8b7355;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.wisdom-action-expand:hover {
  color: #6b5a3e;
}

.wisdom-action-right {
  display: flex;
  gap: 8px;
}

.wisdom-action-like,
.wisdom-action-save {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: var(--color-text-tertiary, #999);
  transition: color 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wisdom-action-like:hover,
.wisdom-action-save:hover {
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

.wisdom-action-like.liked {
  color: #b8860b;
}

.wisdom-action-like.liked svg {
  fill: #b8860b;
}

.wisdom-action-save.saved {
  color: #48a87c;
}

.wisdom-action-save.saved svg {
  fill: #48a87c;
}

/* Carousel dots */
.wisdom-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 0;
}

.wisdom-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200, 190, 170, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.wisdom-dot.active {
  background: #b8860b;
  transform: scale(1.3);
}

/* ── Mobile: 2 cards visible ── */
@media (max-width: 768px) {
  .wisdom-card {
    flex: 0 0 calc(50% - 8px);
    min-width: 160px;
    min-height: 195px;
  }

  .wisdom-card-body--collapsed {
    height: 90px;
  }

  .wisdom-card-icon {
    width: 28px;
    height: 28px;
  }

  .wisdom-card-name {
    font-size: 12px;
  }

  .wisdom-card-badge {
    font-size: 8px;
    padding: 1px 5px;
    top: 6px;
    right: 8px;
  }

  .wisdom-drop-quote {
    font-size: 13.5px;
  }

  .wisdom-drop-situation,
  .wisdom-drop-truth,
  .wisdom-drop-tension,
  .wisdom-drop-fork {
    font-size: 13px;
  }
}

/* ── Small mobile: still 2 cards but tighter ── */
@media (max-width: 420px) {
  .wisdom-carousel-track {
    gap: 10px;
  }
  
  .wisdom-card {
    flex: 0 0 calc(50% - 5px);
    min-width: 145px;
    padding: 14px 14px 10px;
  }

  .wisdom-carousel-title {
    font-size: 16px;
  }
}

/* ── Two-column row ── */
.hub-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hub-two-col .hub-slot {
  /* Each slot fills its grid cell */
  height: 100%;
}

/* When debate is the only visible slot, span full width */
.hub-two-col.hub-two-col--single .hub-slot {
  grid-column: 1 / -1;
}

/* ── Nav tiles ── */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.hub-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(160, 140, 110, 0.2);
  border-radius: var(--border-radius-md);
  padding: 16px 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  min-height: 92px;
}

.hub-tile:hover {
  background: rgba(255, 250, 240, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(160, 140, 110, 0.35);
  transform: translateY(-1px);
}

.hub-tile-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.hub-tile-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.hub-tile-stat {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
  line-height: 1.3;
}

/* ── Philosophical fingerprint card (live on the hub) ── */
.hub-fp-card {
  padding: 22px 24px;
}

.hub-fp-header {
  margin-bottom: 16px;
}

.hub-fp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 3px;
}

.hub-fp-sub {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.hub-fp-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hub-fp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-fp-label {
  flex: 0 0 110px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.hub-fp-track {
  flex: 1;
  height: 12px;
  background: var(--color-background-tint);
  border-radius: 6px;
  overflow: hidden;
}

.hub-fp-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.hub-fp-pct {
  flex: 0 0 38px;
  text-align: right;
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

/* ── The Debate ── */
.hub-debate-card {
  padding: 22px 24px 20px;
}

.hub-debate-label {
  font-size: 11px;
  font-weight: 600;
  color: #5b6abf;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.hub-debate-dilemma {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text-primary);
  margin: 0 0 18px;
}

/* VS layout */
.hub-debate-vs {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.hub-debate-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--border-radius-md);
  transition: background 0.15s;
}

.hub-debate-side:hover {
  background: var(--color-background-tint);
}

.hub-debate-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
}

.hub-debate-divider span {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hub-debate-mono {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.hub-debate-mono-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
  margin-bottom: 0;
}

.hub-debate-mono-xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
  margin-bottom: 0;
}

.hub-debate-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.hub-debate-position {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
  flex: 1;
}

/* Instruction text */
.hub-debate-instruction {
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-align: center;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}

/* Tappable monogram wrapper */
.hub-debate-mono-tap {
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  transition: transform 0.15s;
}

.hub-debate-mono-tap:hover {
  transform: scale(1.1);
}

.hub-debate-mono-tap:active {
  transform: scale(0.95);
}

/* Pulse animation on monograms */
.hub-debate-mono-pulse {
  animation: debateMonoPulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--mono-color, rgba(91, 106, 191, 0.4));
}

@keyframes debateMonoPulse {
  0% { box-shadow: 0 0 0 0 var(--mono-color, rgba(91, 106, 191, 0.4)); }
  50% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Picked state animation */
.hub-debate-mono-picked .hub-debate-mono-pulse {
  animation: debateMonoConfirm 0.3s ease forwards;
}

@keyframes debateMonoConfirm {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Vote bar (post-pick) */
.hub-debate-vote-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  animation: dropFadeIn 0.35s ease;
}

.hub-debate-vote-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.4s ease;
}

.hub-debate-vote-segment span {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hub-debate-vote-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  animation: dropFadeIn 0.35s ease;
}

.hub-debate-vote-labels span {
  font-size: 11px;
  font-weight: 600;
}

/* Legacy pick button — hidden but kept for fallback */
.hub-debate-pick-btn {
  display: none;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #5b6abf;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: #5b6abf;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.hub-debate-pick-btn:hover {
  background: rgba(91, 106, 191, 0.08);
}

/* Post-pick wrapper (inherits hub-debate-card; hook for future differentiation) */
.hub-debate-picked {}

/* Post-pick result state */
.hub-debate-pick-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(91, 106, 191, 0.06);
  border-radius: var(--border-radius-sm);
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--color-text-primary);
  animation: dropFadeIn 0.35s ease;
}

.hub-debate-school-badge {
  font-size: 11px;
  font-weight: 500;
  color: #5b6abf;
  background: rgba(91, 106, 191, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: auto;
}

.hub-debate-explore-btn {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.hub-debate-explore-btn:hover {
  border-color: var(--color-border-secondary);
  color: var(--color-text-primary);
}

/* Reveals */
.hub-debate-reveals {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: dropFadeIn 0.35s ease;
}

.hub-debate-reveal {
  padding: 14px 16px;
  border-radius: var(--border-radius-sm);
  background: var(--color-background-tint);
}

.hub-debate-reveal-chosen {
  border-left: 3px solid #5b6abf;
}

.hub-debate-reveal-other {
  border-left: 3px solid var(--color-border-tertiary);
}

.hub-debate-reveal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--color-text-primary);
}

.hub-debate-your-pick {
  font-size: 11px;
  font-weight: 500;
  color: #5b6abf;
  background: rgba(91, 106, 191, 0.08);
  padding: 1px 7px;
  border-radius: 6px;
}

.hub-debate-reveal-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Reflection area in debate */
.hub-debate-reflect-area {
  padding-top: 4px;
}

.hub-debate-reflect-prompt {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 10px;
  font-style: italic;
}

.hub-debate-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(200, 190, 170, 0.4);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 250, 240, 0.6);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-background-primary);
  resize: vertical;
  min-height: 54px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.hub-debate-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.hub-debate-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.hub-debate-reflect-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.hub-debate-reflect-save {
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.hub-debate-reflect-save:disabled {
  opacity: 0.45;
  cursor: default;
}

.hub-debate-reflect-save:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hub-debate-reflected {
  font-size: 13px;
  font-weight: 600;
  color: #48a87c;
  padding: 6px 0;
  text-align: center;
}

/* Save to Well buttons */
.hub-debate-well-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.hub-debate-well-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-debate-well-btn:hover:not(:disabled) {
  border-color: var(--color-border-secondary);
  color: var(--color-text-primary);
}

.hub-debate-well-btn.saved {
  color: #48a87c;
  border-color: rgba(72, 168, 124, 0.3);
  cursor: default;
}

/* ── Then vs. Now Replay ── */
.hub-replay-card {
  padding: 22px 24px 20px;
}

.hub-replay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hub-replay-mono {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

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

.hub-replay-label {
  font-size: 11px;
  font-weight: 600;
  color: #b07d3b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.hub-replay-philosopher {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.hub-replay-time-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #b07d3b;
  background: rgba(176, 125, 59, 0.08);
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.hub-replay-quote {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-primary);
  margin: 0 0 12px;
  padding: 0;
  border: none;
  font-style: italic;
}

.hub-replay-prompt {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 16px;
}

/* Compare view — prior reflection */
.hub-replay-compare {
  background: var(--color-background-tint);
  border-left: 3px solid var(--color-border-secondary);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.hub-replay-compare-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.hub-replay-compare-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Input area */
.hub-replay-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-replay-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(200, 190, 170, 0.4);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 250, 240, 0.6);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-background-tint);
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.hub-replay-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.hub-replay-textarea::placeholder {
  color: var(--color-text-tertiary);
}

/* Tag & mood pickers */
.hub-replay-pickers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-replay-tags,
.hub-replay-moods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hub-replay-tag-btn,
.hub-replay-mood-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--color-border-tertiary);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.hub-replay-tag-btn:hover,
.hub-replay-mood-btn:hover {
  border-color: var(--color-border-secondary);
}

.hub-replay-tag-btn.active {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hub-replay-mood-btn.active {
  background: rgba(176, 125, 59, 0.08);
  border-color: #b07d3b;
  color: #b07d3b;
}

/* Actions row */
.hub-replay-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.hub-replay-skip {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color 0.2s;
}

.hub-replay-skip:hover {
  color: var(--color-text-secondary);
}

.hub-replay-save {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  background: #b07d3b;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.hub-replay-save:disabled {
  opacity: 0.45;
  cursor: default;
}

.hub-replay-save:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Confirmed state */
.hub-replay-confirmed {
  text-align: center;
  padding: 28px 24px;
}

.hub-replay-confirmed-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: dropFadeIn 0.35s ease;
}

.hub-replay-confirmed-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(176, 125, 59, 0.1);
  color: #b07d3b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hub-replay-confirmed-title {
  font-size: 15px;
  font-weight: 600;
  color: #b07d3b;
}

.hub-replay-growth-insight {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  max-width: 380px;
  margin: 4px 0 0;
}

.hub-replay-journal-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  margin-top: 6px;
  transition: opacity 0.2s;
}

.hub-replay-journal-link:hover {
  opacity: 0.8;
}

/* ── Philosophical Challenges ── */
.hub-challenge-card {
  padding: 22px 24px 20px;
}

.hub-challenge-label {
  font-size: 11px;
  font-weight: 600;
  color: #3d8b6e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Browse CTA (compact card) */
.hub-challenge-browse-cta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-challenge-browse-text {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.hub-challenge-browse-btn {
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #3d8b6e;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: #3d8b6e;
  cursor: pointer;
  transition: all 0.15s;
}

.hub-challenge-browse-btn:hover {
  background: rgba(61, 139, 110, 0.08);
}

/* Challenge list */
.hub-challenge-list {
  padding: 22px 24px 18px;
}

.hub-challenge-list-scroll {
  max-height: 420px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 140, 110, 0.25) transparent;
}

.hub-challenge-list-scroll::-webkit-scrollbar {
  width: 5px;
}

.hub-challenge-list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.hub-challenge-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(160, 140, 110, 0.25);
  border-radius: 3px;
}

.hub-challenge-list-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 140, 110, 0.4);
}

.hub-challenge-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hub-challenge-back-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-background-tint);
  color: var(--color-text-tertiary);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.hub-challenge-back-btn:hover {
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
}

.hub-challenge-item {
  padding: 14px 0;
  border-top: 1px solid var(--color-border-tertiary);
}

.hub-challenge-item:last-child {
  padding-bottom: 0;
}

.hub-challenge-item-done {
  opacity: 0.6;
}

.hub-challenge-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hub-challenge-mono {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.hub-challenge-item-meta {
  min-width: 0;
}

.hub-challenge-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.hub-challenge-item-philosopher {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.hub-challenge-item-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 10px;
}

.hub-challenge-item-completed {
  font-size: 12px;
  font-weight: 600;
  color: #48a87c;
  padding: 2px 0;
}

.hub-challenge-start-btn {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid #3d8b6e;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: #3d8b6e;
  cursor: pointer;
  transition: all 0.15s;
}

.hub-challenge-start-btn:hover {
  background: rgba(61, 139, 110, 0.08);
}

/* Active challenge card */
.hub-challenge-active {
  padding: 22px 24px 18px;
}

.hub-challenge-active-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hub-challenge-active-meta {
  min-width: 0;
}

.hub-challenge-active-progress-text {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
  margin-top: 2px;
}

/* Progress dots */
.hub-challenge-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.hub-challenge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-tertiary);
  transition: background 0.2s, transform 0.2s;
  font-size: 0;
  overflow: hidden;
}

.hub-challenge-dot.completed {
  background: #3d8b6e;
}

.hub-challenge-dot.current {
  background: rgba(61, 139, 110, 0.35);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(61, 139, 110, 0.15);
}

/* Welcome back message */
.hub-challenge-welcome-back {
  font-size: 13px;
  color: #b07d3b;
  background: rgba(176, 125, 59, 0.06);
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 14px;
  line-height: 1.5;
  animation: dropFadeIn 0.35s ease;
}

/* Already checked in today */
.hub-challenge-checked-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(61, 139, 110, 0.05);
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  animation: dropFadeIn 0.35s ease;
}

.hub-challenge-checked-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(61, 139, 110, 0.12);
  color: #3d8b6e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.hub-challenge-checked-text {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

/* Today's prompt */
.hub-challenge-today {
  margin-bottom: 14px;
}

.hub-challenge-today-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.hub-challenge-today-prompt {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 8px;
}

.hub-challenge-today-tip {
  font-size: 12.5px;
  color: var(--color-text-tertiary);
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 12px;
}

/* Check-in area */
.hub-challenge-checkin-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-challenge-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(200, 190, 170, 0.4);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 250, 240, 0.6);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-background-tint);
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.hub-challenge-textarea:focus {
  outline: none;
  border-color: #3d8b6e;
}

.hub-challenge-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.hub-challenge-checkin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.hub-challenge-time-hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.hub-challenge-checkin-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  background: #3d8b6e;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.hub-challenge-checkin-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.hub-challenge-checkin-btn:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Quit / leave button */
.hub-challenge-quit-btn {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color 0.15s;
  text-align: center;
}

.hub-challenge-quit-btn:hover {
  color: var(--color-text-secondary);
}

/* Synthesis (completion) view */
.hub-challenge-synthesis {
  padding: 22px 24px 20px;
}

.hub-challenge-synthesis-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hub-challenge-synthesis-complete {
  font-size: 12px;
  font-weight: 600;
  color: #48a87c;
  margin-top: 2px;
}

.hub-challenge-synthesis-intro {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 18px;
}

.hub-challenge-synthesis-responses {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.hub-challenge-synthesis-day {
  padding: 12px 14px;
  background: var(--color-background-tint);
  border-left: 3px solid #3d8b6e;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.hub-challenge-synthesis-day-label {
  font-size: 12px;
  font-weight: 600;
  color: #3d8b6e;
  margin-bottom: 6px;
}

.hub-challenge-synthesis-day-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
}

.hub-challenge-synthesis-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-challenge-start-another-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #3d8b6e;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: #3d8b6e;
  cursor: pointer;
  transition: all 0.15s;
}

.hub-challenge-start-another-btn:hover {
  background: rgba(61, 139, 110, 0.08);
}

.hub-challenge-journal-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.hub-challenge-journal-link:hover {
  opacity: 0.8;
}

/* ── Cross-feature nudges ── */
.hub-nudge-link {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  font-style: normal;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.hub-nudge-link:hover {
  opacity: 0.8;
}

.hub-nudge-insight {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  padding: 10px 14px;
  background: var(--color-background-tint);
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  animation: dropFadeIn 0.35s ease;
}

.hub-nudge-link-inline {
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.hub-nudge-link-inline:hover {
  text-decoration: underline;
}

/* ── Footer ── */
.hub-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-tertiary);
  text-align: center;
}

.hub-footer p {
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.hub-footer-fineprint {
  font-size: 11px;
  opacity: 0.85;
}

.hub-footer-feedback {
  margin-top: 10px;
}

/* The shared feedback widget styles (link, form, categories, textarea, success)
   live in shared.css and apply on the hub as well. Force the link to inherit
   the hub's lighter palette. */
.hub-footer .feedback-link {
  color: var(--color-text-tertiary);
}

.hub-footer .feedback-link:hover {
  color: var(--color-accent);
}

/* ── Mobile responsive ── */
@media (max-width: 640px) {
  .hub-shell {
    padding: 24px 16px 40px;
  }

  .hub-two-col {
    grid-template-columns: 1fr;
  }

  .hub-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hub-tile {
    padding: 14px 10px;
    min-height: 82px;
  }

  .hub-tile-label {
    font-size: 12px;
  }

  .hub-tile-stat {
    font-size: 11px;
  }

  .hub-cta-card {
    max-width: 100%;
    padding: 20px 18px;
    gap: 12px;
  }

  .hub-cta-title {
    font-size: 18px;
  }

  .hub-cta-sub {
    font-size: 12.5px;
  }

  .hub-storytime-card {
    aspect-ratio: 2.5 / 1;
    max-height: none;
  }

  .hub-storytime-content {
    padding: 20px 18px;
    max-width: 75%;
  }

  .hub-storytime-title {
    font-size: 22px;
  }

  .hub-storytime-sub {
    font-size: 12.5px;
  }

  .hub-storytime-overlay {
    background: linear-gradient(
      to right,
      rgba(30, 22, 10, 0.65) 0%,
      rgba(30, 22, 10, 0.4) 50%,
      rgba(30, 22, 10, 0.1) 100%
    );
  }

  .hub-storytime-arrow {
    right: 16px;
    bottom: 16px;
    width: 36px;
    height: 36px;
  }

  .hub-cta-portraits img {
    width: 38px;
    height: 38px;
    margin-left: -10px;
  }

  .hub-cta-arrow {
    width: 36px;
    height: 36px;
  }

  .hub-drop-card {
    padding: 18px 18px 16px;
  }

  .hub-drop-quote {
    font-size: 15px;
  }

  .hub-fp-card {
    padding: 18px 18px;
  }

  .hub-fp-label {
    flex: 0 0 90px;
    font-size: 12px;
  }

  .hub-fp-pct {
    flex: 0 0 34px;
    font-size: 11px;
  }

  .hub-replay-card {
    padding: 18px 18px 16px;
  }

  .hub-replay-quote {
    font-size: 14px;
  }

  .hub-replay-time-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .hub-debate-card {
    padding: 18px 16px 16px;
  }

  .hub-debate-dilemma {
    font-size: 15px;
  }

  .hub-debate-vs {
    flex-direction: column;
    gap: 0;
  }

  .hub-debate-divider {
    width: auto;
    height: 24px;
    padding: 0;
  }

  .hub-debate-side {
    padding: 12px 8px;
  }

  .hub-debate-position {
    font-size: 12px;
  }

  .hub-debate-mono {
    width: 52px;
    height: 52px;
    font-size: 16px;
  }

  .hub-debate-mono-tap {
    margin-bottom: 4px;
  }

  .hub-debate-vote-labels {
    flex-direction: column;
    gap: 2px;
    align-items: center;
  }

  .hub-debate-well-actions {
    flex-direction: column;
  }

  .hub-debate-well-btn {
    padding: 10px 12px;
    min-height: 44px;
    font-size: 12px;
  }

  .hub-debate-explore-btn {
    min-height: 44px;
  }

  .hub-debate-reflect-save {
    min-height: 44px;
    padding: 10px 20px;
  }

  .hub-challenge-card {
    padding: 18px 16px 16px;
  }

  .hub-challenge-list {
    padding: 18px 16px 14px;
  }

  .hub-challenge-list-scroll {
    max-height: 360px;
  }

  .hub-challenge-active {
    padding: 18px 16px 14px;
  }

  .hub-challenge-synthesis {
    padding: 18px 16px 16px;
  }

  .hub-challenge-item-title {
    font-size: 13px;
  }

  .hub-challenge-item-desc {
    font-size: 12.5px;
  }

  .hub-challenge-synthesis-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Touch targets: ensure ≥44px on all interactive elements */
  .hub-replay-tag-btn,
  .hub-replay-mood-btn {
    padding: 8px 12px;
    font-size: 12.5px;
    min-height: 36px;
  }

  .hub-replay-skip,
  .hub-replay-save {
    min-height: 44px;
    padding: 10px 20px;
  }

  .hub-challenge-browse-btn,
  .hub-challenge-start-btn,
  .hub-challenge-checkin-btn,
  .hub-challenge-start-another-btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  .hub-challenge-quit-btn {
    min-height: 44px;
    padding: 12px 8px;
  }

  .hub-drop-save {
    min-height: 44px;
    padding: 10px 22px;
  }

  .hub-tile {
    min-height: 88px;
  }

  .hub-cta-card {
    min-height: 72px;
    padding: 18px 16px;
  }

  .hub-nudge-insight {
    font-size: 12px;
  }
}

.hub-tagline {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-primary);
  opacity: 0.6;
  margin: 2px 0 0;
  letter-spacing: -0.1px;
}
