/**
 * DESIGN-029 v3.7 · production + staging surfaces
 * Linked from production HTML (body.v3-overhaul) and *-dev.html staging mirrors.
 * Visual SSOT: prototypes/v3-design-overhaul/v3-fidelity.html
 */

:root {
  --v3-pink: #ec4899;
  --v3-streak-daily: #ec4899;
  --v3-streak-weekly: #6b24b8;
  --v3-streak-callout-shadow: 0 4px 16px rgba(40, 18, 81, 0.09);
  --v3-nav-offset: calc(var(--nav-bottom-anchor, 64px) + var(--vv-bottom-inset, 0px));
  /* Fixed bottom chrome clearance only — body already pads for --nav-bottom-anchor */
  --v3-journal-nav-lift: 1.25rem;
  --v3-thumb-zone-bottom: calc(var(--v3-nav-offset) + var(--v3-journal-nav-lift));
  --v3-fab-bar-clearance: calc(var(--v3-journal-nav-lift) + 2.55rem + var(--space-2));
  --v3-contact-cta-clearance: calc(2.55rem + var(--v3-journal-nav-lift) + var(--space-2));
  --v3-metric-num-size: 2.55rem;
  --v3-metric-num-slot-h: 2.65rem;
  --v3-metric-label-size: 0.72rem;
  --v3-metric-label-lh: 1.25;
  --v3-metric-label-row-h: calc(var(--v3-metric-label-size) * var(--v3-metric-label-lh));
  --v3-panel-pad-y: 0.55rem;
  --v3-panel-pad-x: 0.65rem;
  --v3-row-gap-tight: 0.25rem;
  /* Light defaults — DEFAULT_THEME is light; dark overrides below */
  --v3-paper: #f6f2ff;
  --v3-tint: rgba(78, 26, 154, 0.06);
  --v3-ink-muted: rgba(43, 26, 74, 0.58);
  --v3-card-surface: #ffffff;
  --v3-card-shadow: 0 2px 10px rgba(40, 18, 81, 0.04);
  --v3-card-shadow-lg: 0 4px 18px rgba(40, 18, 81, 0.09);
  --v3-canvas-vignette: radial-gradient(900px 420px at 8% -8%, rgba(196, 181, 253, 0.28), transparent 60%);
  --v3-seg-active: #ffffff;
  --v3-chrome-rgb: 246, 242, 255;
  --v3-chrome-header: rgba(var(--v3-chrome-rgb), 0.82);
  --v3-chrome-nav: rgba(var(--v3-chrome-rgb), 0.86);
  --v3-chrome-menu: rgba(var(--v3-chrome-rgb), 0.94);
  --v3-notif-read-bg: rgba(255, 255, 255, 0.92);
  --v3-notif-read-title: var(--color-text-muted);
  --v3-notif-read-body: color-mix(in srgb, var(--color-text-muted) 78%, transparent);
  --v3-notif-read-action-bg: rgba(78, 26, 154, 0.12);
  --v3-hero-grad: linear-gradient(125deg, #4e1a9a 0%, #390f74 55%, #6b24b8 120%);
  --v3-guest-about-grad: linear-gradient(135deg, #e9e0ff, #c4b5fd 55%, #ddd0ff);
  --v3-guest-about-ink: #390f74;
  --v3-bento-hero-grad: linear-gradient(145deg, #2a1848 0%, #390f74 55%, #4e1a9a 100%);
  --insights-v3-card: var(--v3-card-surface);
  --insights-v3-inset: #f5f4f7;
  --insights-v3-shadow: var(--v3-card-shadow-lg);
}

:root[data-theme='dark'] {
  --v3-paper: var(--color-bg-dark, #1a0638);
  --v3-tint: rgba(255, 255, 255, 0.06);
  --v3-ink-muted: rgba(255, 255, 255, 0.65);
  --v3-card-surface: #2a1848;
  --v3-card-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
  --v3-card-shadow-lg: 0 4px 18px rgba(0, 0, 0, 0.28);
  --v3-canvas-vignette: radial-gradient(900px 420px at 8% -8%, rgba(107, 36, 184, 0.32), transparent 58%);
  --v3-seg-active: rgba(255, 255, 255, 0.14);
  --insights-v3-inset: rgba(255, 255, 255, 0.05);
  --v3-chrome-rgb: 26, 6, 56;
  --v3-chrome-header: rgba(var(--v3-chrome-rgb), 0.88);
  --v3-chrome-nav: rgba(var(--v3-chrome-rgb), 0.72);
  --v3-chrome-menu: rgba(var(--v3-chrome-rgb), 0.94);
  --v3-streak-callout-bg: linear-gradient(155deg, #422a72 0%, #2f1d58 48%, #362464 100%);
  --v3-streak-callout-border: rgba(196, 181, 253, 0.24);
  --v3-streak-callout-shadow: 0 4px 22px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(139, 92, 246, 0.14) inset;
  --v3-streak-callout-num: #e9e0ff;
  /* Purple → mid-lavender — avoid var(--color-primary) (#c4b5fd in dark) washing white copy */
  --v3-hero-grad: linear-gradient(125deg, #390f74 0%, #4e1a9a 35%, #6b24b8 68%, #8b5cf6 100%);
  --v3-guest-about-grad: linear-gradient(135deg, rgba(196, 181, 253, 0.42), rgba(139, 92, 246, 0.32) 55%, rgba(221, 208, 255, 0.28));
  --v3-guest-about-ink: #e9e0ff;
  --v3-streak-weekly: #c4b5fd;
  --v3-notif-read-bg: rgba(255, 255, 255, 0.05);
  --v3-notif-read-title: rgba(255, 255, 255, 0.72);
  --v3-notif-read-body: rgba(255, 255, 255, 0.55);
  --v3-notif-read-action-bg: rgba(255, 255, 255, 0.08);
}

/* v3 canvas — near-paper + soft top vignette (replaces prod lavender wash on -dev) */
html:has(body.v3-overhaul) {
  background-color: var(--v3-paper);
}

body.v3-overhaul {
  background:
    var(--v3-canvas-vignette),
    var(--v3-paper) !important;
  background-attachment: fixed;
}

/*
 * v3 -dev nav chrome — translucent glass tinted to v3 paper (not opaque / not prod #390F74).
 */
html:has(body.v3-overhaul) .mobile-header,
html:has(body.v3-overhaul) .nav-top {
  background: var(--v3-chrome-header) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-color: var(--color-border-light) !important;
}

html:has(body.v3-overhaul) .nav-bottom {
  background: var(--v3-chrome-nav) !important;
  backdrop-filter: blur(var(--glass-blur-2)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur-2)) !important;
  border-top-color: var(--color-border-light) !important;
  box-shadow:
    0 -2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
}

:root[data-theme='light'] html:has(body.v3-overhaul) .nav-bottom {
  box-shadow:
    0 -2px 10px rgba(40, 18, 81, 0.1),
    0 0 0 1px rgba(78, 26, 154, 0.06) inset !important;
}

html:has(body.v3-overhaul) .more-menu-content {
  background: var(--v3-chrome-menu) !important;
  backdrop-filter: blur(var(--glass-blur-2)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur-2)) !important;
  border-color: var(--color-border-light) !important;
  box-shadow: var(--glass-elevation-2, var(--v3-card-shadow)) !important;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  html:has(body.v3-overhaul) .nav-bottom {
    background: var(--v3-chrome-nav) !important;
    backdrop-filter: blur(var(--glass-blur-2)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur-2)) !important;
  }
}

/* Dev preview ribbon */
.v3-dev-banner {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  color: var(--color-primary-contrast);
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.v3-dev-banner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Metric parity — streak panels + metric tiles share one horizon */
.v3-overhaul .streak-panel,
.v3-overhaul .metric-tile {
  margin: 0;
  padding: var(--v3-panel-pad-y) var(--v3-panel-pad-x);
  position: relative;
  display: grid;
  grid-template-rows: var(--v3-metric-num-slot-h) var(--v3-metric-label-row-h);
  row-gap: var(--v3-row-gap-tight);
  min-height: calc(
    var(--v3-panel-pad-y) * 2 + var(--v3-metric-num-slot-h) + var(--v3-row-gap-tight) +
      var(--v3-metric-label-row-h)
  );
  background: var(--v3-card-surface);
  border: 1px solid var(--glass-border-1, rgba(78, 26, 154, 0.12));
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
}

.v3-overhaul .streak-panel .streak-icon {
  position: absolute;
  top: var(--v3-panel-pad-y);
  right: var(--v3-panel-pad-x);
  color: var(--color-primary);
  opacity: 0.85;
  line-height: 0;
  width: auto;
  height: auto;
  max-width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3-overhaul .streak-panel .streak-icon-svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.v3-overhaul .brand-mark--streak {
  font-size: 0.48rem;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.v3-overhaul .brand-mark--streak .brand-mark__rule {
  min-height: 1px;
  max-height: 1.5px;
  margin: 0.08rem 0;
}

.v3-overhaul .metric-num {
  font-size: var(--v3-metric-num-size);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--color-primary);
  margin: 0;
  align-self: end;
  padding-right: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.v3-overhaul .metric-label {
  font-size: var(--v3-metric-label-size);
  line-height: var(--v3-metric-label-lh);
  color: var(--color-text-muted);
  margin: 0;
  align-self: start;
}

.v3-overhaul .is-expandable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.v3-overhaul .is-expandable:active {
  transform: scale(0.985);
}

/* Home twin streak bento */
.v3-overhaul .home-bento {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  transition: grid-template-columns 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul .home-bento.is-collapsed {
  grid-template-columns: 1fr 1fr;
}

.v3-overhaul .home-bento.is-exp-visit {
  grid-template-columns: 1.65fr 0.85fr;
}

.v3-overhaul .home-bento.is-exp-journal {
  grid-template-columns: 0.85fr 1.65fr;
}

.v3-overhaul .home-bento .streak-panel .expand-body {
  display: none;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  grid-row: 3;
  grid-column: 1 / -1;
}

.v3-overhaul .home-bento.is-exp-visit .streak-panel:first-child .expand-body,
.v3-overhaul .home-bento.is-exp-journal .streak-panel:last-child .expand-body {
  display: block;
  grid-row: 3;
  grid-column: 1 / -1;
}

/* Home streak callouts — parity with light white tiles popping on paper */
.v3-overhaul .home-bento .card.streak-panel {
  margin-bottom: 0;
  padding: var(--v3-panel-pad-y) var(--v3-panel-pad-x);
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--v3-streak-callout-shadow);
}

:root[data-theme='light'] .v3-overhaul .home-bento .card.streak-panel {
  background: #ffffff;
  border-color: rgba(78, 26, 154, 0.12);
  box-shadow: 0 4px 18px rgba(40, 18, 81, 0.08);
}

:root[data-theme='dark'] .v3-overhaul .home-bento .card.streak-panel {
  background: var(--v3-streak-callout-bg);
  border-color: var(--v3-streak-callout-border);
  box-shadow: var(--v3-streak-callout-shadow);
}

:root[data-theme='dark'] .v3-overhaul .home-bento .card.streak-panel .metric-num {
  color: var(--v3-streak-callout-num);
}

:root[data-theme='dark'] .v3-overhaul .home-bento .card.streak-panel .metric-label {
  color: rgba(255, 255, 255, 0.84);
}

:root[data-theme='dark'] .v3-overhaul .home-bento .card.streak-panel .streak-icon,
:root[data-theme='dark'] .v3-overhaul .home-bento .card.streak-panel .brand-mark--streak {
  color: #c4b5fd;
  opacity: 0.95;
}

.v3-overhaul .home-bento.is-exp-visit .streak-panel:first-child,
.v3-overhaul .home-bento.is-exp-journal .streak-panel:last-child {
  grid-template-rows: var(--v3-metric-num-slot-h) var(--v3-metric-label-row-h) auto;
}

.v3-overhaul .home-bento .streak-panel .expand-body .erow {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
}

.v3-overhaul .home-bento .streak-panel .expand-body .erow strong {
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

/* Insights bento streak mosaic */
.v3-overhaul .bento-streaks {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  min-height: 168px;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul .bento-tile {
  border-radius: var(--radius-lg, 18px);
  padding: 0.7rem 0.75rem;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.v3-overhaul .bento-tile.hero {
  background: var(--v3-bento-hero-grad);
  color: #fff;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--v3-card-shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}

.v3-overhaul .bento-tile.hero .bento-h {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.v3-overhaul .bento-tile.hero .bento-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
  line-height: 1.35;
  margin: 0;
}

.v3-overhaul .bento-tile.hero .bento-num {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 0.2rem;
  font-variant-numeric: tabular-nums;
}

.v3-overhaul .bento-tile.soft {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
  min-height: 0;
}

.v3-overhaul .bento-tile.soft .bento-stack {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.v3-overhaul .bento-tile.soft .bento-k {
  font-size: 0.62rem;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.v3-overhaul .bento-tile.soft .bento-k strong {
  color: var(--color-text);
  font-weight: 700;
}

.v3-overhaul .bento-tile.soft .bento-num {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.v3-overhaul .bento-tile.soft .bento-unit {
  font-size: 0.62rem;
  font-weight: 650;
  text-align: right;
  margin-top: 0.08rem;
}

.v3-overhaul .bento-tile.soft .bento-num.pink,
.v3-overhaul .bento-tile.soft .bento-unit.pink {
  color: var(--v3-streak-daily);
}

.v3-overhaul .bento-tile.soft .bento-num.lilac,
.v3-overhaul .bento-tile.soft .bento-unit.lilac {
  color: var(--v3-streak-weekly);
}

.v3-overhaul .bento-tile.soft .bento-num.ink,
.v3-overhaul .bento-tile.soft .bento-unit.ink {
  color: var(--color-text);
}

.v3-overhaul .bento-tile .bento-date {
  font-size: 0.58rem;
  color: var(--color-text-muted);
  margin: 0;
}

.v3-overhaul .bento-tile.expanded-detail {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.7rem;
  height: 100%;
  box-sizing: border-box;
}

.v3-overhaul .bento-split {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.v3-overhaul .bento-split .half {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.55rem 0;
}

.v3-overhaul .bento-split .half + .half {
  border-top: 1px solid var(--color-border-light);
}

.v3-overhaul .bento-split .half-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
}

.v3-overhaul .bento-split .half-top .bento-val {
  text-align: right;
  flex-shrink: 0;
}

.v3-overhaul .bento-streaks.is-collapsed {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.v3-overhaul .bento-streaks.is-collapsed .bento-hero {
  grid-column: 1;
  grid-row: 1 / 3;
}

.v3-overhaul .bento-streaks.is-collapsed .bento-a {
  grid-column: 2;
  grid-row: 1;
}

.v3-overhaul .bento-streaks.is-collapsed .bento-b {
  grid-column: 2;
  grid-row: 2;
}

.v3-overhaul .bento-streaks.is-exp-current {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.35fr auto;
  min-height: 220px;
}

.v3-overhaul .bento-streaks.is-exp-current .bento-hero {
  grid-column: 1 / 3;
  grid-row: 1;
}

.v3-overhaul .bento-streaks.is-exp-current .bento-a {
  grid-column: 1;
  grid-row: 2;
}

.v3-overhaul .bento-streaks.is-exp-current .bento-b {
  grid-column: 2;
  grid-row: 2;
}

.v3-overhaul .bento-streaks.is-exp-daily {
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: 1fr 1fr;
  min-height: 220px;
}

.v3-overhaul .bento-streaks.is-exp-daily .bento-hero {
  grid-column: 1;
  grid-row: 1;
}

.v3-overhaul .bento-streaks.is-exp-daily .bento-b {
  grid-column: 1;
  grid-row: 2;
}

.v3-overhaul .bento-streaks.is-exp-daily .bento-a {
  grid-column: 2;
  grid-row: 1 / 3;
}

.v3-overhaul .bento-streaks.is-exp-weekly {
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: auto 1fr;
  min-height: 220px;
}

.v3-overhaul .bento-streaks.is-exp-weekly .bento-a {
  grid-column: 1;
  grid-row: 1;
}

.v3-overhaul .bento-streaks.is-exp-weekly .bento-hero {
  grid-column: 1;
  grid-row: 2;
}

.v3-overhaul .bento-streaks.is-exp-weekly .bento-b {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* Expanded soft tiles: avoid cram/overlap — header carries value + dates; inset is supplemental */
.v3-overhaul.insights-v3 .bento-streaks .bento-tile.expanded-detail {
  overflow-y: auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.v3-overhaul.insights-v3 .bento-streaks .expanded-detail .bento-split .half {
  justify-content: flex-start;
  gap: 0.2rem;
  padding: 0.4rem 0;
}

.v3-overhaul.insights-v3 .bento-streaks .expanded-detail .bento-split .half-top .bento-num {
  font-size: 1.25rem;
  line-height: 1.1;
}

.v3-overhaul.insights-v3 .bento-streaks .expanded-detail .expand-body--inset {
  border-top: 1px solid var(--color-border-light);
  margin-top: 0.15rem;
  padding-top: 0.3rem;
  width: 100%;
}

/* Unified guest dock — About left · Join right */
.v3-overhaul .guest-dock {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(var(--v3-nav-offset) + var(--space-2));
  z-index: 1997;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

.v3-overhaul .guest-dock a {
  pointer-events: auto;
  text-decoration: none;
}

.v3-overhaul .guest-dock button,
.v3-overhaul button.guest-about,
.v3-overhaul button.guest-join {
  pointer-events: auto;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.v3-overhaul button.guest-join.is-disabled,
.v3-overhaul button.guest-join:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Join funnel: keep disabled CTAs tappable so validateStep can explain blockers */
body.v3-overhaul.join-v3 .join-v3-dock button.guest-join.is-disabled {
  pointer-events: auto;
  cursor: pointer;
}

.v3-overhaul .guest-about {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0 var(--space-4);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--v3-guest-about-ink, #390f74);
  background: var(--v3-guest-about-grad);
  border: 1px solid rgba(78, 26, 154, 0.16);
  box-shadow: 0 4px 14px rgba(78, 26, 154, 0.12);
}

:root[data-theme='dark'] .v3-overhaul .guest-about {
  border-color: rgba(196, 181, 253, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.v3-overhaul .guest-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  min-width: 7.5rem;
  padding: 0 var(--space-5);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: #ffffff;
  background: var(--v3-hero-grad);
  border: none;
  box-shadow: 0 6px 18px rgba(57, 15, 116, 0.3);
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

:root[data-theme='dark'] .v3-overhaul .guest-join {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.v3-overhaul .guest-join:hover,
.v3-overhaul button.guest-join:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(57, 15, 116, 0.34);
}

:root[data-theme='dark'] .v3-overhaul .guest-join:hover,
:root[data-theme='dark'] .v3-overhaul button.guest-join:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.v3-overhaul .guest-join:active,
.v3-overhaul button.guest-join:active {
  transform: scale(0.98);
  filter: brightness(0.98);
}

/* Header Sign In — compact guest-join (guest mode, all pages); height matches .header-theme-toggle (36px) */
.header-login-btn.guest-join {
  min-width: auto;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-size: 0.78rem;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22);
}

:root[data-theme='dark'] .header-login-btn.guest-join {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
}

.header-login-btn.guest-join:hover {
  box-shadow: 0 5px 14px rgba(57, 15, 116, 0.28);
}

:root[data-theme='dark'] .header-login-btn.guest-join:hover {
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
}

/* Join funnel reuses guest dock geometry (fixed thumb zone, no wrapper card) */
.v3-overhaul .join-v3-dock {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(var(--v3-nav-offset) + var(--space-2));
  z-index: 1999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

.v3-overhaul .join-v3-dock.single-action {
  justify-content: flex-end;
}

.v3-overhaul .join-v3-dock button {
  pointer-events: auto;
}

.v3-overhaul .guest-container--v3 {
  padding-bottom: calc(var(--nav-height-bottom, 64px) + 4.5rem);
}

.v3-overhaul .guest-home-scroll {
  padding-bottom: calc(var(--nav-height-bottom, 64px) + 4.5rem);
}

/* Guest home v3 shell owns bottom clearance — avoid stacking with .guest-home-scroll */
.v3-overhaul.guest-home-v3 .guest-home-scroll {
  padding-bottom: 0;
}

/* ── Guest home v3 (DESIGN-029) — editorial rows, flat cards, shared dock ─ */
.v3-overhaul.guest-home-v3 .guest-home-v3-shell {
  max-width: 600px;
  margin: 0 auto;
  /* Body already pads for bottom nav; reserve guest-dock pill height + small gap only */
  padding: var(--space-4) var(--space-4) calc(2.55rem + var(--space-3));
  text-align: left;
}

.v3-overhaul.guest-home-v3 .guest-hero {
  text-align: left;
  margin-bottom: 0.85rem;
}

.v3-overhaul.guest-home-v3 .guest-hero h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.v3-overhaul.guest-home-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.45;
  margin: 0;
}

.v3-overhaul.guest-home-v3 .section-label--flush {
  margin-top: 0;
}

.v3-overhaul.guest-home-v3 .guest-section-desc {
  font-size: 0.74rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.4;
  margin: -0.15rem 0 0.55rem;
  text-align: left;
}

.v3-overhaul.guest-home-v3 .persona-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  background: var(--v3-card-surface);
  border-radius: 14px;
  padding: 0.65rem 0.7rem;
  box-shadow: var(--v3-card-shadow);
  margin-bottom: 0.45rem;
  border: 1px solid var(--color-border-light);
}

.v3-overhaul.guest-home-v3 .persona-row .pi {
  color: var(--color-primary);
  flex-shrink: 0;
  line-height: 0;
}

.v3-overhaul.guest-home-v3 .persona-row h3 {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.v3-overhaul.guest-home-v3 .persona-row p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.35;
}

.v3-overhaul.guest-home-v3 .sec-personas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0.45rem 0 0.75rem;
}

.v3-overhaul.guest-home-v3 .sec-persona {
  background: var(--v3-tint);
  border-radius: 12px;
  padding: 0.55rem;
  text-align: center;
  color: var(--color-primary);
}

.v3-overhaul.guest-home-v3 .sec-persona-icon {
  display: inline-flex;
  line-height: 0;
}

.v3-overhaul.guest-home-v3 .sec-persona h4 {
  margin: 0.25rem 0 0.1rem;
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 600;
}

.v3-overhaul.guest-home-v3 .sec-persona p {
  margin: 0;
  font-size: 0.62rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.35;
}

.v3-overhaul.guest-home-v3 .how-step {
  background: var(--v3-card-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border-light);
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.45rem;
  box-shadow: var(--v3-card-shadow);
}

.v3-overhaul.guest-home-v3 .how-step .n {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--v3-guest-about-grad);
  color: var(--v3-guest-about-ink, #390f74);
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

:root[data-theme='dark'] .v3-overhaul.guest-home-v3 .how-step .n {
  background: var(--color-primary);
  color: #ffffff;
}

.v3-overhaul.guest-home-v3 .how-step h3 {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  font-weight: 700;
  line-height: 1.2;
}

.v3-overhaul.guest-home-v3 .how-step p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.4;
}

.v3-overhaul.guest-home-v3 .guest-trust {
  margin: 0.7rem 0 var(--space-5);
  text-align: center;
}

.v3-overhaul.guest-home-v3 .guest-trust h2 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
}

.v3-overhaul.guest-home-v3 .guest-trust p {
  font-size: 0.74rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0;
  line-height: 1.4;
}

.v3-overhaul.guest-home-v3 .guest-cta-card {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 0.85rem 0.75rem;
  margin: var(--space-4) 0 0.55rem;
  text-align: center;
  box-shadow: var(--v3-card-shadow);
}

.v3-overhaul.guest-home-v3 .guest-cta-card h2 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
}

.v3-overhaul.guest-home-v3 .guest-cta-card p {
  font-size: 0.74rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0;
  line-height: 1.4;
}

.v3-overhaul.guest-home-v3 .guest-footer-tag {
  text-align: center;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0.45rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border-light);
}

/* Contact CTA — thumb zone bottom-right (About + Contact only); lift clears Journal FAB */
.v3-overhaul.about-v3 .contact-cta-bar,
.v3-overhaul.contact-v3 .contact-cta-bar {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--v3-thumb-zone-bottom);
  z-index: 1997;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
}

.v3-overhaul.about-v3 .contact-cta-bar .btn,
.v3-overhaul.about-v3 .contact-cta-bar button,
.v3-overhaul.contact-v3 .contact-cta-bar .btn,
.v3-overhaul.contact-v3 .contact-cta-bar button {
  pointer-events: auto;
  width: auto;
  display: inline-flex;
  margin: 0;
  min-height: 2.55rem;
  padding: 0 var(--space-5);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(57, 15, 116, 0.3);
}

.v3-overhaul .contact-content--v3 {
  padding-bottom: calc(var(--nav-height-bottom, 64px) + 4.5rem);
}

/* ── About + Legal v3.7 (DESIGN-029) — editorial list, flat surfaces ─────── */
.v3-overhaul.about-v3 .about-v3-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--v3-contact-cta-clearance);
  text-align: left;
}

.v3-overhaul.legal-v3 .legal-v3-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-4);
  text-align: left;
}

.v3-overhaul.about-v3 .page-title,
.v3-overhaul.legal-v3 .page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-primary);
  margin: 0.1rem 0 0.35rem;
}

.v3-overhaul.about-v3 .page-lede,
.v3-overhaul.legal-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0 0 var(--space-4);
  line-height: 1.45;
  max-width: 34rem;
}

.v3-overhaul.about-v3 .ed-h,
.v3-overhaul.legal-v3 .ed-h {
  font-weight: 750;
  font-size: 0.95rem;
  margin: 0.85rem 0 0.35rem;
  color: var(--color-text);
}

.v3-overhaul.about-v3 .ed-p,
.v3-overhaul.legal-v3 .ed-p {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
  max-width: 36rem;
}

.v3-overhaul.about-v3 .ed-rule,
.v3-overhaul.legal-v3 .ed-rule {
  border-top: 1px solid var(--color-border-light);
  padding: 0.7rem 0;
}

.v3-overhaul.about-v3 .ed-rule:first-of-type,
.v3-overhaul.legal-v3 .ed-rule:first-of-type {
  border-top: none;
  padding-top: 0.15rem;
}

.v3-overhaul.about-v3 .ed-strong,
.v3-overhaul.legal-v3 .ed-strong {
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.v3-overhaul.about-v3 .ed-rule .whisper,
.v3-overhaul.legal-v3 .ed-rule .whisper,
.v3-overhaul.legal-v3 .whisper {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0;
}

.v3-overhaul.about-v3 .section-label,
.v3-overhaul.legal-v3 .section-label {
  margin-top: var(--space-5);
}

.v3-overhaul.legal-v3 .legal-v3-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 36rem;
}

.v3-overhaul.legal-v3 .legal-v3-list li {
  margin-bottom: 0.35rem;
}

.v3-overhaul.legal-v3 .legal-v3-list li:last-child {
  margin-bottom: 0;
}

.v3-overhaul.legal-v3 .legal-v3-meta {
  font-size: 0.72rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0 0 var(--space-3);
}

.v3-overhaul.legal-v3 .legal-v3-meta .legal-tbd {
  font-style: italic;
  opacity: 0.92;
}

.v3-overhaul.legal-v3 a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.v3-overhaul.legal-v3 a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Consent Center v3 — grouped flat cards (profile pattern) */
.v3-overhaul.consent-v3 .legal-v3-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.v3-overhaul.consent-v3 .legal-v3-group.grouped {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--v3-card-shadow);
}

.v3-overhaul.consent-v3 .legal-v3-group .cell {
  padding: 0.85rem 1rem;
}

.v3-overhaul.consent-v3 .legal-v3-group .cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.v3-overhaul.consent-v3 .legal-v3-group .cell-title {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--color-text);
}

.v3-overhaul.consent-v3 .consent-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 0.65rem 0;
  border-top: 1px solid var(--color-border-light);
}

.v3-overhaul.consent-v3 .consent-row .toggle-switch {
  flex-shrink: 0;
  align-self: start;
  margin-top: 0.1rem;
}

.v3-overhaul.consent-v3 .toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.v3-overhaul.consent-v3 .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.v3-overhaul.consent-v3 .toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-border-light);
  transition: background 0.2s ease;
  border-radius: 24px;
}

.v3-overhaul.consent-v3 .toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--color-surface, #fff);
  transition: transform 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.v3-overhaul.consent-v3 .toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.v3-overhaul.consent-v3 .toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.v3-overhaul.consent-v3 .toggle-switch input:disabled + .toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

.v3-overhaul.consent-v3 .consent-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.v3-overhaul.consent-v3 .consent-copy strong {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.v3-overhaul.consent-v3 .consent-copy span {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.consent-v3 .consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: 0.55rem;
}

.v3-overhaul.consent-v3 .consent-actions .btn-primary {
  background: var(--v3-hero-grad);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22);
}

.v3-overhaul.consent-v3 .consent-actions .btn-secondary {
  border-radius: 999px;
}

.v3-overhaul.consent-v3 .consent-actions .data-control-link,
.v3-overhaul.consent-v3 .consent-center-note a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.78rem;
}

.v3-overhaul.consent-v3 .consent-actions .data-control-link:hover,
.v3-overhaul.consent-v3 .consent-center-note a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.v3-overhaul.consent-v3 .consent-center-note {
  margin-top: 0.55rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.consent-v3 .consent-delete-status {
  margin-top: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  border: 1px solid var(--color-border-light);
  font-size: 0.78rem;
  color: var(--color-text);
}

.v3-overhaul.consent-v3 .legal-v3-signin.grouped {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  box-shadow: var(--v3-card-shadow);
}

.v3-overhaul.consent-v3 .legal-v3-signin h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.45rem;
}

.v3-overhaul.consent-v3 .legal-v3-signin p {
  font-size: 0.82rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0 0 var(--space-3);
  line-height: 1.45;
}

.v3-overhaul.consent-v3 .legal-v3-signin .guest-join {
  display: inline-flex;
  min-height: 2.55rem;
  padding: 0 var(--space-5);
  border-radius: 999px;
  text-decoration: none;
}

.v3-overhaul.about-v3 .about-v3-touch {
  font-size: 0.76rem;
  text-align: left;
  margin: 0;
}

.v3-overhaul.about-v3 .about-v3-touch a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.v3-overhaul.about-v3 .about-v3-touch a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal footer — same muted link row as former More menu footer */
.v3-overhaul.about-v3 .about-v3-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-1);
  margin-top: var(--space-3);
}

.v3-overhaul.about-v3 .about-v3-legal a {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  text-decoration: none;
}

.v3-overhaul.about-v3 .about-v3-legal a:hover {
  color: var(--color-text);
}

.v3-overhaul.about-v3 .contact-cta-bar .btn.v3-cta-grad,
.v3-overhaul.about-v3 .contact-cta-bar button.v3-cta-grad,
.v3-overhaul.contact-v3 .contact-cta-bar .btn.v3-cta-grad,
.v3-overhaul.contact-v3 .contact-cta-bar button.v3-cta-grad {
  border: none;
  color: #fff;
  background: var(--v3-hero-grad);
}

/* ── Contact v3.7 (DESIGN-029) — editorial header + grouped method tiles ─ */
.v3-overhaul.contact-v3 .contact-v3-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) 0;
  text-align: left;
}

.v3-overhaul.contact-v3 .page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-primary);
  margin: 0.1rem 0 0.35rem;
}

.v3-overhaul.contact-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0 0 var(--space-4);
  line-height: 1.45;
  max-width: 34rem;
}

.v3-overhaul.contact-v3 .section-label {
  margin-top: 0;
}

.v3-overhaul.contact-v3 .contact-v3-methods.grouped {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: var(--space-4);
  box-shadow: var(--v3-card-shadow);
}

.v3-overhaul.contact-v3 .contact-v3-method-cell {
  display: block;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell:last-child {
  border-bottom: none;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell:hover,
.v3-overhaul.contact-v3 .contact-v3-method-cell:focus-visible {
  background: var(--v3-tint, rgba(78, 26, 154, 0.06));
  outline: none;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell .cell-title {
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell .cell-title [data-icon],
.v3-overhaul.contact-v3 .contact-v3-method-cell .cell-title svg {
  color: var(--color-primary);
  flex-shrink: 0;
  display: inline-flex;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell .whisper {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0;
}

.v3-overhaul.contact-v3 .contact-v3-method-cell .whisper strong {
  font-weight: 600;
  color: var(--color-primary);
}

/* Contact form modal — flat v3 surface on -dev (functional parity with prod) */
.v3-overhaul.contact-v3 .contact-form-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.v3-overhaul.contact-v3 .contact-form-modal.open {
  display: flex;
}

.v3-overhaul.contact-v3 .contact-form {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: var(--space-5);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--v3-card-shadow-lg);
}

.v3-overhaul.contact-v3 .contact-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.v3-overhaul.contact-v3 .contact-form h2 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.v3-overhaul.contact-v3 .close-modal-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.v3-overhaul.contact-v3 .close-modal-btn:hover {
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
}

.v3-overhaul.contact-v3 .contact-form .form-group {
  margin-bottom: var(--space-4);
  position: relative;
}

.v3-overhaul.contact-v3 .contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.v3-overhaul.contact-v3 .contact-form .form-row .form-group {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .v3-overhaul.contact-v3 .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .v3-overhaul.contact-v3 .contact-form {
    padding: var(--space-4);
    max-height: 95vh;
  }
}

.v3-overhaul.contact-v3 .contact-form .form-field-error {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  z-index: 10;
  color: #fff;
  background: rgba(var(--color-primary-rgb), 0.25);
  border: 1px solid rgba(var(--color-primary-rgb), 0.5);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: var(--font-size-sm);
}

.v3-overhaul.contact-v3 .contact-form .form-field-error span:first-child {
  margin-right: 0.5rem;
}

.v3-overhaul.contact-v3 .contact-form .required {
  color: var(--color-accent);
}

.v3-overhaul.contact-v3 .contact-form .submit-btn {
  width: 100%;
  margin-top: var(--space-2);
  border-radius: 999px;
  background: var(--v3-hero-grad);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22);
}

.v3-overhaul.contact-v3 .contact-form .submit-btn:hover {
  filter: brightness(1.06);
}

.v3-overhaul.contact-v3 .contact-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Join compare — portrait side by side */
.v3-overhaul .join-phones {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  margin: var(--space-4) 0;
  justify-items: center;
}

@media (min-width: 780px) {
  .v3-overhaul .join-phones {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.v3-overhaul .join-phone-cap {
  text-align: center;
  margin: 0 0 var(--space-3);
  max-width: 360px;
}

.v3-overhaul .join-phone-frame {
  width: min(100%, 360px);
  margin: 0 auto;
  border-radius: 36px;
  padding: 11px;
  background: #0f0a1a;
  box-shadow: var(--shadow-lg);
}

.v3-overhaul .join-phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: var(--color-background);
  min-height: 520px;
  padding: var(--space-4);
}

.v3-overhaul .join-mock-card {
  background: var(--glass-bg-1);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.v3-overhaul .join-progress {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin: var(--space-3) 0;
  flex-wrap: wrap;
}

.v3-overhaul .join-progress span {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted);
}

.v3-overhaul .join-progress span.on {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-color: var(--color-primary);
}

.v3-overhaul .join-progress.quiet span {
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.65rem;
  font-weight: var(--font-weight-semibold);
}

.v3-overhaul .jpill,
.v3-overhaul .jrow {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.v3-overhaul .jrow {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.v3-overhaul .section-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  margin: var(--space-4) 0 var(--space-2);
}

.v3-overhaul .home-header-v3 {
  padding: var(--space-4) var(--space-4) 0;
  text-align: left;
}

.v3-overhaul .home-date-v3 {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.v3-overhaul .home-greeting-v3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
  margin: 0 0 var(--space-2);
}

.v3-overhaul .home-greeting-sub-v3 {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  max-width: 36rem;
}

.v3-overhaul .home-sections-v3 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-2);
  max-width: 600px;
  margin: 0 auto;
}

/* Home bottom pad — body already reserves --nav-bottom-anchor (no double clearance) */
.v3-overhaul #home-dashboard .home-sections,
.v3-overhaul .home-sections.home-sections--v3 {
  padding-bottom: var(--space-2);
}

.v3-overhaul .card-hero-v3,
.v3-overhaul .card.hero,
.v3-overhaul .v3-hero-card,
.v3-overhaul .v3-cta-grad,
.v3-overhaul.about-v3 .contact-cta-bar .btn.v3-cta-grad,
.v3-overhaul.contact-v3 .contact-cta-bar .btn.v3-cta-grad,
.v3-overhaul.education-hub-v3 .v3-prog-cta,
.v3-overhaul.education-hub-v3 .v3-guide-cta {
  background: var(--v3-hero-grad);
  color: #fff;
}

.v3-overhaul .card-hero-v3 {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 12px 28px rgba(57, 15, 116, 0.28);
}

.v3-overhaul .card-hero-v3 .hero-title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
}

.v3-overhaul .card-hero-v3 .sub {
  opacity: 0.88;
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

.v3-overhaul .v3-expand-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin: var(--space-2) 0 0;
}

/* v3 cards — row links, hero, flat */
.v3-overhaul .card {
  background: var(--v3-card-surface);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  padding: var(--space-4);
  margin-bottom: 0;
  border: 1px solid var(--glass-border-1, rgba(78, 26, 154, 0.12));
}

.v3-overhaul .card.flat,
.v3-overhaul .card.flat.row-link,
.v3-overhaul .v3-row-link {
  box-shadow: none;
  background: var(--v3-tint);
  border: none;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0;
}

.v3-overhaul .card.hero,
.v3-overhaul .v3-hero-card {
  border: none;
  box-shadow: 0 12px 28px rgba(57, 15, 116, 0.28);
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 0.75rem 0.9rem;
}

.v3-overhaul .card.hero .hero-row,
.v3-overhaul .v3-hero-card .hero-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.v3-overhaul .card.hero .hero-row-icon,
.v3-overhaul .v3-hero-card .hero-row-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.95;
  width: 18px;
  height: 18px;
  display: block;
}

.v3-overhaul .card.hero .hero-title,
.v3-overhaul .v3-hero-card .hero-title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
}

.v3-overhaul .card.hero .sub,
.v3-overhaul .v3-hero-card .sub {
  opacity: 0.92;
  font-size: 0.76rem;
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(26, 6, 56, 0.35);
}

.v3-overhaul .v3-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.v3-overhaul .v3-row-link .row-left {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: var(--color-primary);
  min-width: 0;
  flex: 1;
}

.v3-overhaul .v3-row-link .v3-row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.v3-overhaul .v3-row-link .v3-row-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.v3-overhaul .v3-row-link .row-copy {
  min-width: 0;
  flex: 1;
}

.v3-overhaul .v3-row-link .row-title {
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.25;
}

.v3-overhaul .v3-row-link .whisper {
  font-size: var(--v3-metric-label-size);
  line-height: var(--v3-metric-label-lh);
  color: var(--v3-ink-muted);
  margin-top: 0.15rem;
}

.v3-overhaul .v3-row-link .chev {
  color: var(--v3-ink-muted);
  opacity: 0.65;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: block;
}

.v3-overhaul .stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  align-items: end;
  padding: var(--space-2) 0 var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul .stat-strip.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Stat strip uses its own scale — do not inherit streak-panel 2.55rem metric-num */
.v3-overhaul .stat-strip .stat-cell {
  display: grid;
  grid-template-rows: 1.85rem var(--v3-metric-label-row-h);
  row-gap: 0.08rem;
  justify-items: center;
  text-align: center;
  min-width: 0;
}

.v3-overhaul .stat-strip .metric-num {
  padding: 0 !important;
  margin: 0;
  align-self: end;
  justify-self: center;
  width: 100%;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.v3-overhaul .stat-strip .metric-num.stat-hero {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary);
}

.v3-overhaul .stat-strip .metric-num.mid {
  font-size: 1.05rem;
  color: var(--color-primary);
}

.v3-overhaul .stat-strip .metric-num.muted {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

/* Guest feature landings (journal/stash/circles/insights) — flat v3 fidelity */
.v3-overhaul .guest-container.guest-landing {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) 0;
  text-align: center;
}

.v3-overhaul .guest-landing {
  padding: var(--space-2) 0 0;
  text-align: center;
}

.v3-overhaul .guest-page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin: 0 0 0.45rem;
}

.v3-overhaul .guest-page-icon,
.v3-overhaul .guest-page-title svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  opacity: 0.88;
  flex-shrink: 0;
}

.v3-overhaul .guest-lede {
  font-size: 0.86rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  line-height: 1.45;
  margin: 0 auto 0.95rem;
  max-width: 28ch;
}

.v3-overhaul .guest-features-card {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  margin-bottom: var(--space-4);
  text-align: left;
  box-shadow: var(--v3-card-shadow);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.v3-overhaul .guest-features-card h3 {
  font-size: 0.9rem;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.v3-overhaul .guest-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.v3-overhaul .guest-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.52rem 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.76rem;
  color: var(--color-text);
  line-height: 1.35;
}

.v3-overhaul .guest-feature-list li:last-child {
  border-bottom: none;
}

.v3-overhaul .guest-feature-icon,
.v3-overhaul .guest-feature-list svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.08rem;
  line-height: 1;
}

.v3-overhaul .journal-bottom-bar,
.v3-overhaul .stash-bottom-bar,
.v3-overhaul .circles-search-bar {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--v3-thumb-zone-bottom);
  z-index: 1997;
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.v3-overhaul .effect-label,
.v3-overhaul .entry-card .effect-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.v3-overhaul .home-sections--v3 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.v3-overhaul .home-sections--v3 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.v3-overhaul .home-sections--v3 .feed-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.v3-overhaul .circle-card {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.v3-overhaul .circle-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.v3-overhaul .grouped,
.v3-overhaul .profile-section-card {
  background: var(--v3-card-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.v3-overhaul .profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-2) 0 var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul .stash-page__list .stash-row,
.v3-overhaul .product-list-item {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul .join-phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.v3-overhaul .join-phone-frame {
  border: 1px solid var(--color-border-light);
  border-radius: 24px;
  padding: var(--space-3);
  background: var(--color-surface-1);
}

.v3-overhaul .join-mock-card .jrow {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  background: var(--color-surface-2);
}

.v3-overhaul .join-progress.quiet span {
  font-size: var(--font-size-xs);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  color: var(--color-text-muted);
}

.v3-overhaul .join-progress.quiet span.on {
  background: rgba(78, 26, 154, 0.12);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* ── Education Hub v3.7 (DESIGN-029) ───────────────────────────────────── */
.v3-overhaul.education-hub-v3 .edu-header {
  margin-bottom: 0.9rem;
}

.v3-overhaul.education-hub-v3 .page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-primary, #390f74);
  margin: 0.1rem 0 0.25rem;
}

.v3-overhaul.education-hub-v3 .page-lede {
  font-size: 0.82rem;
  color: var(--v3-ink-muted);
  margin: 0 0 0.9rem;
  max-width: none;
}

.v3-overhaul.education-hub-v3 .edu-quick-start {
  display: none !important;
}

.v3-overhaul.education-hub-v3 .filter-quiet {
  font-size: 0.75rem;
  color: var(--v3-ink-muted);
  margin-bottom: 0.7rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  position: static;
  padding: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
}

.v3-overhaul.education-hub-v3 .filter-quiet .edu-filter-summary {
  flex: 1;
  min-width: 0;
}

.v3-overhaul.education-hub-v3 .filter-quiet .btn-text {
  background: none;
  border: none;
  color: var(--color-primary, #4e1a9a);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  margin-left: auto;
}

.v3-overhaul.education-hub-v3 .programs-section .section-header,
.v3-overhaul.education-hub-v3 .guides-section .section-header {
  display: none !important;
}

.v3-overhaul.education-hub-v3 .section-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--v3-ink-muted);
  margin: 0.75rem 0 0.4rem;
}

.v3-overhaul.education-hub-v3 .programs-grid {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
  gap: 0.55rem !important;
}

.v3-overhaul.education-hub-v3 .guides-grid {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
  gap: 0.45rem !important;
}

.v3-overhaul.education-hub-v3 .prog-card.program-card,
.v3-overhaul.education-hub-v3 .hub-guide-tile.guide-card {
  background: var(--v3-card-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 18px !important;
  box-shadow: 0 3px 14px rgba(40, 18, 81, 0.05) !important;
  padding: 0 !important;
  overflow: hidden;
}

.v3-overhaul.education-hub-v3 .prog-card.program-card:hover,
.v3-overhaul.education-hub-v3 .hub-guide-tile.guide-card:hover {
  transform: none !important;
  box-shadow: 0 3px 14px rgba(40, 18, 81, 0.05) !important;
  border-color: transparent !important;
}

.v3-overhaul.education-hub-v3 .hub-tile .art-band {
  height: 88px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg, #e9e0ff, #c4b5fd 60%, #ddd0ff);
  display: grid;
  place-items: center;
  color: var(--color-primary, #390f74);
  overflow: hidden;
  position: relative;
}

.v3-overhaul.education-hub-v3 .hub-tile .art-band-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  grid-area: 1 / 1;
}

.v3-overhaul.education-hub-v3 .hub-tile .art-band-icon {
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
}

.v3-overhaul.education-hub-v3 .prog-card .body {
  padding: 0.85rem 0.95rem 1rem;
}

.v3-overhaul.education-hub-v3 .prog-card .prog-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.12rem;
  margin-bottom: 0.15rem;
}

.v3-overhaul.education-hub-v3 .chip-soft {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-primary, #4e1a9a);
  background: rgba(78, 26, 154, 0.08);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.v3-overhaul.education-hub-v3 .chip-soft.ghost {
  background: transparent;
  color: var(--v3-ink-muted);
}

.v3-overhaul.education-hub-v3 .prog-title {
  font-weight: 750;
  font-size: 1.08rem;
  margin: 0.5rem 0 0.25rem;
  color: var(--color-primary, #390f74);
}

.v3-overhaul.education-hub-v3 .whisper {
  font-size: 0.72rem;
  color: var(--v3-ink-muted);
  line-height: 1.25;
}

.v3-overhaul.education-hub-v3 .meta-line {
  margin-top: 0.35rem;
}

.v3-overhaul.education-hub-v3 .prog-card .v3-prog-cta {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  margin-top: 0.55rem !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(57, 15, 116, 0.28) !important;
  cursor: pointer;
  font-family: inherit;
}

.v3-overhaul.education-hub-v3 .prog-card .v3-prog-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Hub accordion tiles — collapsed row + expanded prog/guide body */
.v3-overhaul.education-hub-v3 .hub-tile {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.22s ease;
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-collapsed {
  padding: 0 !important;
}

.v3-overhaul.education-hub-v3 .hub-tile.has-hub-action {
  cursor: default;
}

.v3-overhaul.education-hub-v3 .hub-tile-collapsed {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
}

.v3-overhaul.education-hub-v3 .hub-tile-collapsed-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.v3-overhaul.education-hub-v3 .hub-tile-collapsed-main:focus-visible,
.v3-overhaul.education-hub-v3 .hub-tile-chev-btn:focus-visible {
  outline: 2px solid rgba(78, 26, 154, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

.v3-overhaul.education-hub-v3 .hub-tile-chev-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--v3-ink-muted);
  -webkit-tap-highlight-color: transparent;
}

.v3-overhaul.education-hub-v3 .hub-tile-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e9e0ff, #c4b5fd 60%, #ddd0ff);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  color: var(--color-primary, #390f74);
}

.v3-overhaul.education-hub-v3 .hub-tile-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  grid-area: 1 / 1;
}

.v3-overhaul.education-hub-v3 .hub-tile-thumb-icon {
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
}

.v3-overhaul.education-hub-v3 .hub-tile-collapsed-copy {
  flex: 1;
  min-width: 0;
}

.v3-overhaul.education-hub-v3 .hub-tile-collapsed-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text, #2b1a4a);
  line-height: 1.25;
}

.v3-overhaul.education-hub-v3 .hub-tile-status {
  margin-top: 0.12rem;
  font-size: 0.68rem;
}

.v3-overhaul.education-hub-v3 .hub-tile-status.is-completed .hub-status-complete {
  color: var(--color-primary, #4e1a9a);
  font-weight: 600;
}

.v3-overhaul.education-hub-v3 .hub-tile-status.is-completed .hub-status-review {
  color: var(--v3-ink-muted);
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-completed .hub-tile-thumb {
  box-shadow: inset 0 0 0 2px rgba(78, 26, 154, 0.22);
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-completed .hub-tile-collapsed-title,
.v3-overhaul.education-hub-v3 .hub-tile.is-hub-completed .prog-title {
  font-weight: 400;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.education-hub-v3 .hub-tile-chev {
  flex-shrink: 0;
  color: var(--v3-ink-muted);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-expanded .hub-tile-chev {
  transform: rotate(180deg);
}

.v3-overhaul.education-hub-v3 .hub-tile-expanded {
  display: none;
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-expanded .hub-tile-collapsed {
  display: none;
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-expanded .hub-tile-expanded {
  display: block;
}

.v3-overhaul.education-hub-v3 .hub-tile.is-hub-expanded.hub-guide-tile .body,
.v3-overhaul.education-hub-v3 .hub-tile.is-hub-expanded.prog-card .body {
  padding: 0.85rem 0.95rem 1rem;
}

.v3-overhaul.education-hub-v3 .hub-guide-tile .v3-guide-cta {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  margin-top: 0.55rem !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(57, 15, 116, 0.28) !important;
  cursor: pointer;
  font-family: inherit;
}

/* ── Education detail (guides + program lessons) — DESIGN-029 ─────────────── */
.v3-overhaul.education-detail-v3 #education-detail-content.content {
  max-width: 680px;
  padding-bottom: calc(var(--space-8) + var(--v3-nav-offset, 5.5rem) + env(safe-area-inset-bottom, 0px));
}

.v3-overhaul.education-detail-v3 #education-detail-content .detail-top-bar {
  background: var(--v3-chrome-header) !important;
  border-bottom-color: var(--color-border-light) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 rgba(40, 18, 81, 0.06);
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-primary);
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-section,
.v3-overhaul.education-detail-v3 #education-detail-content .content-section--prose,
.v3-overhaul.education-detail-v3 #education-detail-content .program-progress,
.v3-overhaul.education-detail-v3 #education-detail-content .guest-cta-card,
.v3-overhaul.education-detail-v3 #education-detail-content .practice-prompt {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: var(--v3-card-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-section h2,
.v3-overhaul.education-detail-v3 #education-detail-content .lesson-day-head h2 {
  color: var(--color-primary);
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-section p,
.v3-overhaul.education-detail-v3 #education-detail-content .content-section li,
.v3-overhaul.education-detail-v3 #education-detail-content .content-meta,
.v3-overhaul.education-detail-v3 #education-detail-content .program-progress,
.v3-overhaul.education-detail-v3 #education-detail-content .keep-unread,
.v3-overhaul.education-detail-v3 #education-detail-content .practice-prompt p,
.v3-overhaul.education-detail-v3 #education-detail-content .guest-cta-card p {
  color: var(--color-text-muted) !important;
  opacity: 1 !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-section strong,
.v3-overhaul.education-detail-v3 #education-detail-content .content-section h3 {
  color: var(--color-text) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .content-section code {
  background: var(--v3-tint) !important;
  color: var(--color-text) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .practice-prompt {
  background: color-mix(in srgb, var(--v3-card-surface) 88%, var(--color-primary)) !important;
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border-light)) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .lesson-navigation {
  border-top-color: var(--color-border-light) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .lesson-nav-btn {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
  border-radius: 999px !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .program-progress-bar {
  background: var(--v3-tint) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .program-progress-fill {
  background: var(--v3-hero-grad) !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .program-actions .btn-primary,
.v3-overhaul.education-detail-v3 #education-detail-content .practice-prompt .btn-primary {
  background: var(--v3-hero-grad) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 999px !important;
}

.v3-overhaul.education-detail-v3 #education-detail-content .program-actions .btn-secondary,
.v3-overhaul.education-detail-v3 #education-detail-content .detail-top-bar .btn-secondary {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
  border-radius: 999px !important;
}

/* ── Journal v3.7 (DESIGN-029) ───────────────────────────────────────────── */
.v3-overhaul.journal-v3 .journal-header {
  padding: var(--space-4) var(--space-4) 0;
  margin-bottom: 0.15rem;
}

.v3-overhaul.journal-v3 .page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-primary, #390f74);
  margin: 0.1rem 0 0.25rem;
}

.v3-overhaul.journal-v3 .page-lede {
  font-size: 0.82rem;
  color: var(--v3-ink-muted);
  margin: 0;
  line-height: 1.3;
}

.v3-overhaul.journal-v3 .journal-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0 !important;
}

.v3-overhaul.journal-v3 .stat-strip .metric-num.mid {
  font-size: 1.05rem;
  color: var(--color-primary, #4e1a9a);
  font-weight: 700;
}

.v3-overhaul.journal-v3 .stat-strip .metric-num.muted {
  font-size: 1.05rem;
  color: var(--v3-ink-muted);
  font-weight: 700;
}

.v3-overhaul.journal-v3 .stat-strip .metric-num.stat-hero {
  font-size: 1.85rem;
  font-weight: 800;
}

.v3-overhaul.journal-v3 .stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  align-items: end;
  padding: 0.05rem 0 0.35rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul.journal-v3 .stat-strip .stat-cell {
  row-gap: 0.04rem;
}

.v3-overhaul.journal-v3 .stat-strip .metric-label {
  font-size: 0.62rem;
  color: var(--v3-ink-muted);
  line-height: 1.15;
}

.v3-overhaul.journal-v3 .journal-goals-row {
  margin-top: 0 !important;
  text-align: left;
}

.v3-overhaul.journal-v3 .goals-line {
  margin: 0.05rem 0 0.4rem;
  font-size: 0.72rem;
  color: var(--v3-ink-muted);
  line-height: 1.25;
  width: 100%;
}

.v3-overhaul.journal-v3 .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  gap: var(--space-2);
}

.v3-overhaul.journal-v3 .section-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  color: var(--color-text, #2b1a4a);
}

.v3-overhaul .seg {
  display: inline-flex;
  gap: 0.2rem;
  background: rgba(78, 26, 154, 0.06);
  border-radius: 999px;
  padding: 0.18rem;
  flex-shrink: 0;
}

.v3-overhaul .seg span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  color: var(--v3-ink-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  line-height: 1.2;
}

.v3-overhaul .seg span.on {
  background: var(--v3-seg-active);
  color: var(--color-primary, #390f74);
  box-shadow: var(--v3-card-shadow);
}

/* Shared thumb-zone primary action (Journal Log Session + Stash Add Stash) */
.v3-overhaul .v3-action-fab,
.v3-overhaul .journal-bottom-bar .fab-inline,
.v3-overhaul .journal-bottom-bar .journal-fab--inline,
.v3-overhaul.stash-v3 .stash-bottom-bar .stash-add-fab {
  flex: 0 0 auto;
  order: 2;
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  box-sizing: border-box;
  min-height: 2.55rem !important;
  height: 2.55rem !important;
  min-width: 7.75rem !important;
  width: 7.75rem !important;
  max-width: none !important;
  padding: 0 0.75rem !important;
  background: var(--color-primary, #390f74) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-shadow: 0 8px 20px rgba(57, 15, 116, 0.3);
  white-space: nowrap;
}

.v3-overhaul.journal-v3 .seg {
  display: inline-flex;
  gap: 0.2rem;
  background: rgba(78, 26, 154, 0.06);
  border-radius: 999px;
  padding: 0.18rem;
  flex-shrink: 0;
}

.v3-overhaul.journal-v3 .seg span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  color: var(--v3-ink-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  line-height: 1.2;
}

.v3-overhaul.journal-v3 .seg span.on {
  background: var(--v3-seg-active);
  color: var(--color-primary, #390f74);
  box-shadow: 0 3px 14px rgba(40, 18, 81, 0.05);
}

.v3-overhaul.journal-v3 .journal-bottom-bar {
  left: var(--space-3) !important;
  right: var(--space-3) !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.v3-overhaul.journal-v3 .journal-bottom-bar .stash-search,
.v3-overhaul.journal-v3 .journal-bottom-bar .journal-search {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.v3-overhaul.journal-v3 .journal-bottom-bar .stash-search input,
.v3-overhaul.journal-v3 .journal-bottom-bar .journal-search input {
  width: 100%;
  min-height: 2.55rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  color: var(--v3-ink-muted);
}

.v3-overhaul.journal-v3 .journal-bottom-bar .fab-inline,
.v3-overhaul.journal-v3 .journal-bottom-bar .journal-fab--inline {
  order: 2;
}

.v3-overhaul.journal-v3 .effect-value.effect-value--much-better {
  color: #15803d !important;
}

/* Journal stat strip — clickable timespan pseudo-filters */
.v3-overhaul.journal-v3 .stat-strip .stat-cell.is-stat-filter {
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.v3-overhaul.journal-v3 .stat-strip .stat-cell.is-stat-filter:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.v3-overhaul.journal-v3 .stat-strip .stat-cell.is-stat-active {
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.v3-overhaul.journal-v3 .journal-timespan-empty {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-muted);
}

/* ── Journal Log Session + Rate Effects sheet (DESIGN-029) ───────────────── */
.v3-overhaul #quick-add-modal.qa-v3.glass-scrim {
  background: rgba(20, 10, 40, 0.42) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-content-wrapper.glass-modal,
.v3-overhaul #quick-add-modal.qa-v3 #qa-content-wrapper.qa-journal-sheet--v3 {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: 0 -12px 40px rgba(40, 18, 81, 0.16) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--color-text);
}

.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-header,
.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-footer {
  background: var(--v3-card-surface) !important;
  border-color: var(--color-border-light) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-header-plus {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 1;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-consumed-display {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: var(--color-text) !important;
  opacity: 1 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-consumed-edit.qa-consumed-edit-btn {
  display: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-close,
.v3-overhaul #quick-add-modal.qa-v3 #qa-close {
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 1.35rem;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-form {
  gap: 0.65rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-form label > span:first-child,
.v3-overhaul #quick-add-modal.qa-v3 #qa-goals-wrap > div:first-child,
.v3-overhaul #quick-add-modal.qa-v3 .journal-reflection-field__label,
.v3-overhaul #quick-add-modal.qa-v3 .qa-step2-field-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-form small {
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  opacity: 1 !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-entry-title,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-text,
.v3-overhaul #quick-add-modal.qa-v3 .qa-step2-text-input,
.v3-overhaul #quick-add-modal.qa-v3 .qa-product-other-input,
.v3-overhaul #quick-add-modal.qa-v3 .qa-method-line-input,
.v3-overhaul #quick-add-modal.qa-v3 #qa-recent-product,
.v3-overhaul #quick-add-modal.qa-v3 .journal-reflection-field__input {
  background: color-mix(in srgb, var(--v3-card-surface) 92%, var(--v3-tint)) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 10px !important;
  color: var(--color-text) !important;
  font-size: 0.84rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-entry-title::placeholder,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-text::placeholder,
.v3-overhaul #quick-add-modal.qa-v3 .qa-step2-text-input::placeholder,
.v3-overhaul #quick-add-modal.qa-v3 .journal-reflection-field__input::placeholder {
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  opacity: 1 !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-entry-title:focus,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-text:focus,
.v3-overhaul #quick-add-modal.qa-v3 .qa-step2-text-input:focus,
.v3-overhaul #quick-add-modal.qa-v3 .journal-reflection-field__input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12) !important;
  outline: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-tile,
.v3-overhaul #quick-add-modal.qa-v3 .qa-method-btn,
.v3-overhaul #quick-add-modal.qa-v3 .qa-goal-tile {
  background: var(--v3-tint) !important;
  border: 1px solid transparent !important;
  color: var(--color-text) !important;
  font-size: 0.78rem !important;
  padding: 0.4rem 0.65rem !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  transform: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-tile:hover,
.v3-overhaul #quick-add-modal.qa-v3 .qa-method-btn:hover,
.v3-overhaul #quick-add-modal.qa-v3 .qa-goal-tile:hover {
  transform: none !important;
  box-shadow: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-tile.selected,
.v3-overhaul #quick-add-modal.qa-v3 .qa-method-btn.selected,
.v3-overhaul #quick-add-modal.qa-v3 .qa-goal-tile.selected {
  background: rgba(78, 26, 154, 0.14) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-location-inline,
.v3-overhaul #quick-add-modal.qa-v3 #qa-summary {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 12px !important;
  padding: 0.55rem 0.65rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-location-inline span,
.v3-overhaul #quick-add-modal.qa-v3 #qa-summary,
.v3-overhaul #quick-add-modal.qa-v3 #qa-summary span,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-status-top,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-status {
  color: var(--color-text-muted) !important;
  opacity: 1 !important;
  font-size: 0.82rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-step2 > div:has(.qa-product-card),
.v3-overhaul #quick-add-modal.qa-v3 #qa-step2 > div:has(#qa-brand) {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 14px !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-card {
  background: transparent !important;
  border: none !important;
  padding: 0.25rem 0 0 !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-source {
  display: flex !important;
  gap: 0.25rem !important;
  background: var(--v3-tint) !important;
  border-radius: 999px !important;
  padding: 0.18rem !important;
  margin: 0.5rem 0 !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-source__btn {
  flex: 1;
  border: none !important;
  background: transparent !important;
  border-radius: 999px !important;
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.25rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-source__btn.is-active {
  background: var(--v3-card-surface) !important;
  color: var(--color-primary) !important;
  box-shadow: var(--v3-card-shadow) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-stash-picker__item,
.v3-overhaul #quick-add-modal.qa-v3 .qa-stash-picker__search {
  border-color: var(--color-border-light) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-location-request-top,
.v3-overhaul #quick-add-modal.qa-v3 #qa-location-request,
.v3-overhaul #quick-add-modal.qa-v3 #qa-edit-step1,
.v3-overhaul #quick-add-modal.qa-v3 #qa-back,
.v3-overhaul #quick-add-modal.qa-v3 #qa-cancel,
.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-btn-later {
  background: transparent !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.75rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-next,
.v3-overhaul #quick-add-modal.qa-v3 #qa-submit,
.v3-overhaul #quick-add-modal.qa-v3 #fx-save {
  background: var(--v3-hero-grad) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  min-height: 2.55rem;
  padding: 0.4rem 1.1rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-dose-help-btn {
  background: var(--v3-tint) !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-border-light) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .journal-reflection-fields,
.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-satisfaction {
  border-top-color: var(--color-border-light) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-modal-scroll,
.v3-overhaul #quick-add-modal.qa-v3 .rate-effects-scroll {
  padding: 0.75rem 0.9rem 1rem !important;
  scrollbar-color: rgba(78, 26, 154, 0.2) transparent;
}

/* Step 2: nowrap preset row + v3 pill padding inflated scroll min-width and clipped the right edge */
.v3-overhaul #quick-add-modal.qa-v3 #qa-content-wrapper,
.v3-overhaul #quick-add-modal.qa-v3 .qa-modal-scroll,
.v3-overhaul #quick-add-modal.qa-v3 #qa-form,
.v3-overhaul #quick-add-modal.qa-v3 #qa-step2 {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-goals-wrap {
  padding-inline: 0 !important;
  min-width: 0;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-goals-presets {
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 0.35rem !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-goals-presets .qa-goal-tile {
  flex: 0 0 auto !important;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-summary {
  gap: 0.5rem;
  min-width: 0;
}

.v3-overhaul #quick-add-modal.qa-v3 #qa-summary > div:first-child {
  min-width: 0;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-goals-custom,
.v3-overhaul #quick-add-modal.qa-v3 .qa-goal-custom-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .v3-overhaul #quick-add-modal.qa-v3 .qa-goal-tile {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.74rem !important;
  }
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-scan-embed .stash-photo-pick,
.v3-overhaul #quick-add-modal.qa-v3 .stash-embed .stash-photo-pick {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-scan-embed .stash-photo-pick:hover:not(:disabled),
.v3-overhaul #quick-add-modal.qa-v3 .stash-embed .stash-photo-pick:hover:not(:disabled) {
  border-color: var(--color-primary) !important;
  background: color-mix(in srgb, var(--v3-tint) 85%, var(--color-primary)) !important;
  transform: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-product-scan-embed .stash-photo-pick__icon,
.v3-overhaul #quick-add-modal.qa-v3 .stash-embed .stash-photo-pick__icon {
  color: var(--color-primary) !important;
}


.v3-overhaul #quick-add-modal.qa-v3 .semantic-btn {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .semantic-btn.selected {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-weight: 600;
}

/* Shared v3 list rows (Stash, future surfaces) */
.v3-overhaul .card.list-card {
  padding: 0.25rem 0.85rem;
}

.v3-overhaul .list-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.v3-overhaul .list-row:last-child {
  border-bottom: none;
}

.v3-overhaul .list-row .thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(78, 26, 154, 0.18), rgba(78, 26, 154, 0.08));
}

.v3-overhaul .list-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v3-overhaul .list-row .thumb.icon-thumb {
  display: grid;
  place-items: center;
  color: var(--color-primary);
}

.v3-overhaul .list-row .list-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
}

.v3-overhaul .list-row .list-copy {
  flex: 1;
  min-width: 0;
}

.v3-overhaul .list-row .whisper {
  font-size: var(--v3-metric-label-size);
  line-height: var(--v3-metric-label-lh);
  color: var(--v3-ink-muted);
  margin-top: 0.15rem;
}

.v3-overhaul .list-row .chev {
  color: var(--v3-ink-muted);
  opacity: 0.65;
  flex-shrink: 0;
}

/* Stash v3 — page chrome + bottom bar (search left, Add Stash right) */
.v3-overhaul.stash-v3 #stash-root,
.v3-overhaul.stash-v3 .stash-page {
  padding-bottom: var(--v3-fab-bar-clearance) !important;
}

.v3-overhaul.stash-v3 .page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
}

.v3-overhaul.stash-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.v3-overhaul.stash-v3 .stash-seg {
  margin-bottom: var(--space-2);
}

.v3-overhaul.stash-v3 .filter-quiet.v3-stash-filter {
  font-size: 0.75rem;
  color: var(--v3-ink-muted);
  margin: 0.15rem 0 0.7rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
}

.v3-overhaul.stash-v3 .stash-filter-summary {
  flex: 1;
  min-width: 0;
}

.v3-overhaul.stash-v3 .filter-quiet .btn-text {
  background: none;
  border: none;
  color: var(--color-primary, #4e1a9a);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  margin-left: auto;
}

.v3-overhaul.stash-v3 .stash-filter-bar.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.v3-overhaul.stash-v3 .stash-filter-bar.filter-bar.is-collapsed {
  display: none;
}

.v3-overhaul.stash-v3 .stash-filter-bar .filter-row {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: var(--space-2);
  align-items: start;
}

.v3-overhaul.stash-v3 .stash-filter-bar .filter-label {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding-top: 0.25rem;
}

.v3-overhaul.stash-v3 .stash-filter-bar .filter-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.v3-overhaul.stash-v3 .stash-filter-bar .filter-chip {
  background: rgba(78, 26, 154, 0.06);
  border: 1px solid rgba(78, 26, 154, 0.16);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  color: rgba(78, 26, 154, 0.84);
  font-size: 0.72rem;
  white-space: nowrap;
  cursor: pointer;
}

.v3-overhaul.stash-v3 .stash-filter-bar .filter-chip.active {
  background: var(--color-primary, #390f74);
  border-color: var(--color-primary, #390f74);
  color: #fff;
  font-weight: 600;
}

.v3-overhaul.stash-v3 .stash-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
  transition: gap 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.stash-v3 .stash-category-grid.is-stash-search-mode {
  grid-template-columns: 1fr;
}

.v3-overhaul.stash-v3 .stash-category-grid.is-stash-search-mode .stash-category-tile {
  grid-column: 1 / -1;
}

.v3-overhaul.stash-v3 .stash-category-tile {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  padding: 0 !important;
  border: none;
  border-radius: 18px;
  box-shadow: 0 3px 14px rgba(40, 18, 81, 0.05);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.v3-overhaul.stash-v3 .stash-category-tile.is-stash-expanded {
  grid-column: 1 / -1;
  box-shadow: 0 6px 22px rgba(40, 18, 81, 0.08);
}

.v3-overhaul.stash-v3
  .stash-category-grid:not(.is-stash-search-mode):has(.is-stash-expanded)
  .stash-category-tile.is-stash-collapsed {
  transform: scale(0.98);
  opacity: 0.94;
}

.v3-overhaul.stash-v3 .stash-category-collapsed {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  background: var(--v3-card-surface);
  max-height: 320px;
  overflow: hidden;
  transition:
    opacity 0.3s ease,
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.stash-v3 .stash-category-icon {
  display: grid;
  place-items: center;
  color: var(--color-primary);
  opacity: 0.9;
  line-height: 0;
}

.v3-overhaul.stash-v3 .stash-category-icon svg {
  width: 32px;
  height: 32px;
}

.v3-overhaul.stash-v3 .stash-category-count {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.stash-v3 .stash-category-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  line-height: 1.2;
  max-width: 100%;
}

.v3-overhaul.stash-v3 .stash-category-expanded {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

.v3-overhaul.stash-v3 .stash-category-tile.is-stash-expanded .stash-category-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  aspect-ratio: auto;
  pointer-events: none;
}

.v3-overhaul.stash-v3 .stash-category-tile.is-stash-expanded .stash-category-expanded {
  max-height: 4000px;
  opacity: 1;
}

.v3-overhaul.stash-v3 .stash-category-expanded-inner {
  overflow: hidden;
  background: var(--v3-card-surface);
}

.v3-overhaul.stash-v3 .stash-category-expanded-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.4rem;
}

.v3-overhaul.stash-v3 .stash-category-expanded-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
}

.v3-overhaul.stash-v3 .stash-category-chev {
  flex-shrink: 0;
  color: var(--v3-ink-muted);
  transform: rotate(-90deg);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.stash-v3 .stash-category-tile.is-stash-expanded .stash-category-chev {
  transform: rotate(90deg);
}

.v3-overhaul.stash-v3 .stash-category-expanded .list-card {
  padding: 0 0.85rem 0.35rem !important;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.v3-overhaul.stash-v3 .stash-category-expanded .list-row {
  max-width: 100%;
  box-sizing: border-box;
}

.v3-overhaul.stash-v3 .stash-category-expanded .list-row .thumb {
  flex-shrink: 0;
}

.v3-overhaul.stash-v3 .stash-bottom-bar {
  position: fixed !important;
  left: var(--space-3) !important;
  right: var(--space-3) !important;
  transform: none !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  bottom: var(--v3-thumb-zone-bottom) !important;
  z-index: 1999;
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.v3-overhaul.stash-v3 .stash-bottom-bar .stash-search {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.v3-overhaul.stash-v3 .stash-bottom-bar .stash-add-fab {
  order: 2;
  align-self: center;
}

.v3-overhaul.stash-v3 .stash-bottom-bar .stash-search input {
  width: 100%;
  min-height: 2.55rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  background: var(--glass-bg-2);
  font-size: 0.8rem;
  color: var(--color-text);
}

/* ── Circles v3.7 (DESIGN-029) ─────────────────────────────────────────── */
.v3-overhaul.circles-v3 .circles-page,
.v3-overhaul.circles-v3 main.circles-page {
  min-height: 0 !important;
  padding-bottom: var(--v3-fab-bar-clearance) !important;
}

.v3-overhaul.circles-v3 .circles-v3-content,
.v3-overhaul.circles-v3 .content-area {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) var(--space-3);
}

.v3-overhaul.circles-v3 .page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.v3-overhaul.circles-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  line-height: 1.45;
  max-width: 22rem;
}

.v3-overhaul.circles-v3 .circles-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: 0;
}

.v3-overhaul.circles-v3 .circle-card.card {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 18px !important;
  box-shadow: var(--v3-card-shadow-lg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0.85rem 0.95rem 0.8rem !important;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.v3-overhaul.circles-v3 .circle-card.card:hover {
  transform: none;
  box-shadow: 0 6px 22px rgba(40, 18, 81, 0.11) !important;
}

.v3-overhaul.circles-v3 .circle-card .chip-soft {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-primary, #4e1a9a);
  background: rgba(78, 26, 154, 0.08);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  text-transform: none;
}

.v3-overhaul.circles-v3 .circle-card .chip-soft.ghost {
  background: transparent;
  color: var(--v3-ink-muted);
  border: 1px solid var(--color-border-light);
  margin-right: 0.25rem;
}

.v3-overhaul.circles-v3 .circle-tags-v3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.v3-overhaul.circles-v3 .circle-title {
  font-weight: 750;
  font-size: 1.02rem;
  margin: 0.45rem 0 0.25rem;
  color: var(--color-primary, #4e1a9a);
  letter-spacing: -0.01em;
}

.v3-overhaul.circles-v3 .circle-card .whisper {
  font-size: 0.74rem;
  color: var(--v3-ink-muted);
  line-height: 1.45;
}

.v3-overhaul.circles-v3 .circle-cta-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  width: 100%;
}

.v3-overhaul.circles-v3 .circle-meta-whisper {
  font-size: 0.68rem;
  color: var(--v3-ink-muted);
  min-width: 0;
  flex: 1 1 auto;
  margin-right: auto;
  text-align: left;
}

.v3-overhaul.circles-v3 .circle-cta-row .btn-text,
.v3-overhaul.circles-v3 .circle-cta-row .btn-enter-circle {
  flex: 0 0 auto !important;
  width: auto !important;
  margin-left: auto;
  background: none !important;
  border: none !important;
  color: var(--color-primary, #4e1a9a) !important;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
}

.v3-overhaul.circles-v3 .circle-meta-whisper:empty {
  display: none;
}

.v3-overhaul.circles-v3 .circles-search-bar {
  position: fixed !important;
  left: var(--space-3) !important;
  right: var(--space-3) !important;
  bottom: var(--v3-thumb-zone-bottom) !important;
  transform: none !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  box-sizing: border-box;
  z-index: 1999;
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.v3-overhaul.circles-v3 .circles-search-field {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.v3-overhaul.circles-v3 .circles-search-btn {
  order: 2;
  flex: 0 0 auto !important;
  align-self: center;
}

.v3-overhaul.circles-v3 .circles-search-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.55rem;
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  background: var(--v3-card-surface);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text);
  font-family: inherit;
}

.v3-overhaul.circles-v3 .circles-search-field input::placeholder {
  color: var(--color-text-muted);
}

.v3-overhaul.circles-v3 .circles-search-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12);
}

.v3-overhaul.circles-v3 .circles-search-btn {
  width: 2.55rem;
  min-width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  background: var(--color-primary, #4e1a9a);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.2s ease;
}

.v3-overhaul.circles-v3 .circles-search-btn:hover {
  background: var(--color-primary-hover, #3d1580);
  transform: none;
}

.v3-overhaul.circles-v3 .circles-search-btn svg {
  width: 18px;
  height: 18px;
}

.v3-overhaul.circles-v3 .search-container {
  display: none !important;
}

.v3-overhaul.circles-v3 .empty-state {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-muted);
  text-align: center;
}

.v3-overhaul.circles-v3 .circle-detail-content,
.v3-overhaul.circles-v3 .user-profile-content {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 8px 32px rgba(40, 18, 81, 0.12);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.v3-overhaul.circles-v3 .post-card,
.v3-overhaul.circles-v3 .reply-card {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.v3-overhaul.circles-v3 .post-form textarea,
.v3-overhaul.circles-v3 .reply-input {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text) !important;
}

/* ── Notifications / Alerts v3.7 (DESIGN-029) ──────────────────────────── */
.v3-overhaul.notifications-v3 .notifications-v3-content,
.v3-overhaul.notifications-v3 .container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) var(--space-4);
}

.v3-overhaul.notifications-v3 .page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.v3-overhaul.notifications-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  line-height: 1.45;
}

.v3-overhaul.notifications-v3 .notifications-v3-list,
.v3-overhaul.notifications-v3 .notifications-container.grouped {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible;
  padding: 0;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(40, 18, 81, 0.06) !important;
  border-bottom: 1px solid var(--color-border-light) !important;
  padding: 0.85rem 0.95rem !important;
  opacity: 1 !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item:last-child {
  border-bottom: 1px solid var(--color-border-light) !important;
}

/* Unread: accent rail + stronger type (not opacity-only) */
.v3-overhaul.notifications-v3 .notifications-container .notification-item.unread {
  background: var(--v3-card-surface) !important;
  border-color: rgba(78, 26, 154, 0.22) !important;
  border-left: 3px solid var(--color-primary) !important;
  box-shadow: 0 4px 14px rgba(57, 15, 116, 0.1) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.unread .notification-title {
  font-weight: 700 !important;
  color: var(--color-text) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.unread .notification-message {
  color: var(--color-text-muted) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.unread .notification-time {
  color: var(--color-primary) !important;
  font-weight: 600;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.unread .notification-item__icon {
  color: var(--color-primary);
}

/* Read: quiet card — demoted vs unread (theme-aware; no white fill in dark) */
.v3-overhaul.notifications-v3 .notifications-container .notification-item.read {
  background: var(--v3-notif-read-bg) !important;
  border-color: var(--color-border-light) !important;
  border-left: 1px solid var(--color-border-light) !important;
  box-shadow: none !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-title {
  font-weight: 500 !important;
  color: var(--v3-notif-read-title) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-message,
.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-time {
  color: var(--v3-notif-read-body) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-action-btn {
  background: var(--v3-notif-read-action-bg) !important;
  color: var(--color-primary) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-item__icon {
  color: color-mix(in srgb, var(--color-primary) 55%, var(--v3-notif-read-title));
  opacity: 0.85;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item:hover {
  background: var(--v3-tint) !important;
  box-shadow: 0 3px 12px rgba(40, 18, 81, 0.08) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-close-btn {
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text-muted) !important;
}

.v3-overhaul.notifications-v3 .notifications-container .notification-item.read .notification-close-btn {
  opacity: 0.72;
}

/* NOTIF-033 · swipe-left dismiss (-dev) */
.v3-overhaul.notifications-v3 .notification-swipe-row {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  transition: opacity 0.24s ease, max-height 0.28s ease, margin 0.28s ease;
}

.v3-overhaul.notifications-v3 .notification-swipe-actions {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 92px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 0;
}

.v3-overhaul.notifications-v3 .notification-swipe-actions--right {
  right: 0;
  background: #b42318;
}

.v3-overhaul.notifications-v3 .notification-swipe-actions--left {
  left: 0;
  background: var(--color-primary, #390f74);
}

.v3-overhaul.notifications-v3 .notification-swipe-dismiss-btn {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  padding: 0 0.35rem;
}

.v3-overhaul.notifications-v3 .notification-swipe-snooze-btn {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  padding: 0 0.35rem;
  line-height: 1.15;
  text-align: center;
}

.v3-overhaul.notifications-v3 .notification-swipe-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--v3-card-surface);
  touch-action: pan-y;
  will-change: transform;
  isolation: isolate;
}

.v3-overhaul.notifications-v3 .notification-swipe-panel.is-snapping {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.notifications-v3 .notification-swipe-row.is-dragging .notification-swipe-panel {
  transition: none;
}

.v3-overhaul.notifications-v3 .notification-swipe-panel .notification-item {
  border-radius: 14px !important;
  width: 100%;
  box-sizing: border-box;
}

/* Opaque hover — v3-tint is translucent and would bleed swipe strips through on desktop */
.v3-overhaul.notifications-v3 .notification-swipe-panel .notification-item:hover {
  background: var(--v3-card-surface) !important;
  box-shadow: 0 3px 12px rgba(40, 18, 81, 0.08) !important;
}

.v3-overhaul.notifications-v3 .notification-swipe-row.is-dismissing {
  pointer-events: none;
}

@media (hover: none) and (pointer: coarse) {
  .v3-overhaul.notifications-v3 .notification-close-btn {
    display: none !important;
  }
}

.v3-overhaul.notifications-v3 .empty-state {
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-muted) !important;
  background: transparent;
}

.v3-overhaul.notifications-v3 .empty-state h3 {
  color: var(--color-text);
  font-size: 1rem;
}

.v3-overhaul.notifications-v3 .empty-state p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.v3-overhaul.notifications-v3 #load-more-container {
  margin-top: var(--space-3) !important;
}

.v3-overhaul.notifications-v3 #load-more-btn {
  border-radius: 999px;
}

.v3-overhaul.notifications-v3 .alerts-info-icon {
  background: var(--v3-tint);
  border-color: var(--color-border-light);
}

.v3-overhaul.notifications-v3 .alerts-info-icon::before {
  color: var(--color-primary);
}

.v3-overhaul.notifications-v3 .alerts-info-tooltip {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  color: var(--color-text);
  box-shadow: 0 8px 24px rgba(40, 18, 81, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.v3-overhaul.notifications-v3 .alerts-info-tooltip::after {
  border-bottom-color: var(--v3-card-surface);
}

/* ── Insights v3 (-dev) ─────────────────────────────────────────────── */
.v3-overhaul.insights-v3 .v3-insights-u-hidden {
  display: none !important;
}

.v3-overhaul.insights-v3 .container {
  max-width: 600px;
  padding-top: 0.25rem;
}

.v3-overhaul.insights-v3 .v3-insights-header {
  text-align: left;
  margin-bottom: 0.35rem;
}

.v3-overhaul.insights-v3 .v3-insights-header .page-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin: 0 0 0.25rem;
  line-height: 1.15;
}

.v3-overhaul.insights-v3 .v3-insights-header .page-lede {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0 0 0.55rem;
  line-height: 1.4;
}

.v3-overhaul.insights-v3 .filter-quiet.v3-insights-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding: 0;
  position: static;
  background: none;
  border: none;
  backdrop-filter: none;
}

.v3-overhaul.insights-v3 .filter-quiet .insights-filter-summary {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.v3-overhaul.insights-v3 .filter-quiet .btn-text {
  border: none;
  background: none;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.v3-overhaul.insights-v3 #insights-filters.filter-bar {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
}

.v3-overhaul.insights-v3 #insights-filters.filter-bar.is-collapsed {
  display: none;
}

.v3-overhaul.insights-v3 #insights-filters .filter-chip {
  border-radius: 999px;
  font-size: 0.72rem;
}

.v3-overhaul.insights-v3 .v3-insights-hero-host {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .hero-num-lg {
  font-size: 2.55rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.v3-overhaul.insights-v3 .v3-insights-hero.card.hero {
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.v3-overhaul.insights-v3 .v3-insights-hero .spark {
  position: absolute;
  right: -0.5rem;
  bottom: -0.75rem;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.v3-overhaul.insights-v3 .metrics-row.v3-insights-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .metrics-row .metric-tile {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  padding: 0.55rem 0.45rem 0.5rem;
  text-align: center;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-template-rows: unset;
}

.v3-overhaul.insights-v3 .metrics-row .metric-num {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  padding-right: 0;
  align-self: center;
  margin: 0;
}

.v3-overhaul.insights-v3 .metrics-row .metric-num.v3-insights-goal,
.v3-overhaul.insights-v3 .metrics-row .metric-num#v3-insights-top-goal {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
  max-width: 100%;
}

.v3-overhaul.insights-v3 .metrics-row .metric-label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  font-weight: 550;
  align-self: center;
}

.v3-overhaul.insights-v3 .metrics-row.v3-insights-metrics--quad {
  grid-template-columns: repeat(2, 1fr);
}

.v3-overhaul.insights-v3 .insights-review-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  align-items: stretch;
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-insights-hero {
  grid-column: 1 / -1;
  grid-row: 1;
}

/* Row 2 — metric heads */
.v3-overhaul.insights-v3 .insights-review-bento [data-v3-review='rated'] {
  grid-column: 1;
  grid-row: 2;
}

.v3-overhaul.insights-v3 .insights-review-bento [data-v3-review='methods'] {
  grid-column: 2;
  grid-row: 2;
}

.v3-overhaul.insights-v3 .insights-review-bento [data-v3-review='goal'] {
  grid-column: 3;
  grid-row: 2;
}

.v3-overhaul.insights-v3 .insights-review-bento .metric-tile {
  /* Inherit grid slot contract from .v3-overhaul .metric-tile — expand lives in row-3 reservoir */
  align-self: stretch;
  text-align: center;
  cursor: pointer;
  border-radius: 16px;
  transition:
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Bento metric heads — scoped typography inside fixed num slot (not global 2.55rem hero scale) */
.v3-overhaul.insights-v3 .insights-review-bento .metric-tile .metric-num {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  padding-right: 0;
  align-self: center;
  justify-self: center;
  margin: 0;
  width: 100%;
  min-width: 0;
}

.v3-overhaul.insights-v3 .insights-review-bento .metric-tile .metric-num.v3-insights-goal,
.v3-overhaul.insights-v3 .insights-review-bento .metric-tile .metric-num#v3-insights-top-goal {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-overhaul.insights-v3 .insights-review-bento .metric-tile .metric-label {
  font-size: 0.62rem;
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 550;
  align-self: center;
  justify-self: center;
}

/* Row 3 — full-width expand reservoir (fluid open) */
.v3-overhaul.insights-v3 .insights-review-bento .v3-metrics-expand-reservoir {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  min-height: 0;
  transition: grid-template-rows 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-metrics-expand-reservoir.is-reservoir-open {
  grid-template-rows: 1fr;
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-metrics-expand-inner {
  overflow: hidden;
  min-height: 0;
}

.v3-overhaul.insights-v3 .insights-review-bento .metric-expand-panel {
  display: none;
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  padding: 0.55rem 0.6rem 0.6rem;
  min-width: 0;
  box-sizing: border-box;
  text-align: left;
}

.v3-overhaul.insights-v3 .insights-review-bento .metric-expand-panel.is-panel-active {
  display: block;
  animation: v3-metric-panel-in 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes v3-metric-panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v3-overhaul.insights-v3 .insights-review-bento .v3-metrics-expand-reservoir {
    transition: none;
  }

  .v3-overhaul.insights-v3 .insights-review-bento .metric-expand-panel.is-panel-active {
    animation: none;
  }
}

.v3-overhaul.insights-v3 .insights-review-bento.is-exp-rated [data-v3-review='rated'],
.v3-overhaul.insights-v3 .insights-review-bento.is-exp-methods [data-v3-review='methods'],
.v3-overhaul.insights-v3 .insights-review-bento.is-exp-goal [data-v3-review='goal'] {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(78, 26, 154, 0.12);
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-insights-hero .expand-body {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  width: 100%;
  text-align: left;
  overflow: hidden;
  transition: grid-template-rows 0.52s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.42s ease;
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-insights-hero .expand-body > * {
  overflow: hidden;
  min-height: 0;
}

.v3-overhaul.insights-v3 .insights-review-bento .v3-insights-hero.is-tile-expanded .expand-body {
  grid-template-rows: 1fr;
  margin-top: 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .v3-overhaul.insights-v3 .insights-review-bento .v3-insights-hero .expand-body {
    transition: none;
  }
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-metric-expand-stat--hero {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-metric-expand-stat--hero .v3-metric-expand-val {
  color: #fff;
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-metric-expand-stat--hero .v3-metric-expand-label {
  color: rgba(255, 255, 255, 0.78);
}

.v3-overhaul.insights-v3 .v3-methods-expand-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.v3-overhaul.insights-v3 .insights-review-bento.is-exp-methods [data-v3-expand-panel='methods'] .v3-method-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  flex-wrap: unset;
  overflow-x: visible;
}

.v3-overhaul.insights-v3 .insights-review-bento.is-exp-methods [data-v3-expand-panel='methods'] .v3-method-chip {
  flex: unset;
  min-width: 0;
  width: 100%;
}

.v3-overhaul.insights-v3 .v3-goal-expand-grid {
  grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
}

.v3-overhaul.insights-v3 .v3-method-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: space-between;
  align-items: flex-end;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  -webkit-overflow-scrolling: touch;
}

.v3-overhaul.insights-v3 .v3-method-chip {
  flex: 1 1 0;
  min-width: 2.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.15rem;
  border-radius: 12px;
  background: rgba(78, 26, 154, 0.06);
  border: 1px solid rgba(78, 26, 154, 0.1);
  color: var(--color-text-muted);
  opacity: 0.55;
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-method-chip {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
}

.v3-overhaul.insights-v3 .v3-method-chip.is-used {
  opacity: 1;
  background: rgba(78, 26, 154, 0.12);
  border-color: rgba(78, 26, 154, 0.28);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(78, 26, 154, 0.08);
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-method-chip.is-used {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  box-shadow: none;
}

.v3-overhaul.insights-v3 .v3-method-chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.v3-overhaul.insights-v3 .v3-method-chip-count {
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.v3-overhaul.insights-v3 button.v3-method-chip {
  appearance: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.v3-overhaul.insights-v3 button.v3-method-chip:disabled {
  cursor: default;
  opacity: 0.35;
}

.v3-overhaul.insights-v3 .v3-method-chip.is-filter-active {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-method-chip.is-filter-active {
  background: rgba(255, 255, 255, 0.34);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.v3-overhaul.insights-v3 .v3-insights-hero-head {
  cursor: pointer;
}

.v3-overhaul.insights-v3 .v3-hero-rhythm,
.v3-overhaul.insights-v3 .v3-hero-expand-hint {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  line-height: 1.35;
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-hero-rhythm,
.v3-overhaul.insights-v3 .v3-insights-hero .v3-hero-expand-hint {
  color: rgba(255, 255, 255, 0.72);
}

.v3-overhaul.insights-v3 .v3-insights-hero-expand {
  position: relative;
}

.v3-overhaul.insights-v3 .v3-method-filter-tip {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: rgba(20, 12, 40, 0.92);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.v3-overhaul.insights-v3 .v3-method-filter-tip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.v3-overhaul.insights-v3 .v3-method-perf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.v3-overhaul.insights-v3 .v3-method-perf-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  background: var(--v3-tint);
}

.v3-overhaul.insights-v3 .v3-method-perf-icon {
  display: flex;
  line-height: 0;
  color: var(--color-primary);
}

.v3-overhaul.insights-v3 .v3-method-perf-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text);
}

.v3-overhaul.insights-v3 .v3-method-perf-count {
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.v3-overhaul.insights-v3 .v3-method-perf-avg {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.insights-v3 .v3-method-perf-avg--muted {
  color: var(--color-text-muted);
}

.v3-overhaul.insights-v3 .v3-method-perf-foot {
  margin: 0.45rem 0 0;
  font-size: 0.58rem;
  line-height: 1.35;
}

.v3-overhaul.insights-v3 .v3-metric-expand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.v3-overhaul.insights-v3 .v3-metric-expand-stat {
  background: var(--v3-tint);
  border-radius: 12px;
  padding: 0.45rem 0.35rem;
  text-align: center;
}

.v3-overhaul.insights-v3 .v3-metric-expand-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.insights-v3 .v3-metric-expand-val--sm {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-overhaul.insights-v3 .v3-metric-expand-label {
  margin-top: 0.15rem;
  font-size: 0.58rem;
  color: var(--color-text-muted);
  font-weight: 600;
  line-height: 1.2;
}

.v3-overhaul.insights-v3 .v3-goal-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.v3-overhaul.insights-v3 .v3-goal-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  background: var(--v3-tint);
}

.v3-overhaul.insights-v3 .v3-goal-name {
  color: var(--color-text);
  font-weight: 650;
}

.v3-overhaul.insights-v3 .v3-goal-count {
  color: var(--color-primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.insights-v3 .v3-insights-expand-empty {
  margin: 0;
  font-size: 0.68rem;
  text-align: center;
}

.v3-overhaul.insights-v3 .v3-insights-hero .v3-insights-expand-empty {
  color: rgba(255, 255, 255, 0.78);
}

.v3-overhaul.insights-v3 .bento-streaks.is-exp-current .bento-hero .expand-body {
  display: block;
  margin-top: 0.45rem;
  padding-top: 0;
  border-top: none;
  width: 100%;
}

.v3-overhaul.insights-v3 .bento-tile .bento-date {
  font-size: 0.58rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.v3-overhaul.insights-v3 .section-label {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Insights section unit — canvas bento summary + home-style grouped detail */
.v3-overhaul.insights-v3 #insights-modules {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.v3-overhaul.insights-v3 .insights-v3-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.15rem;
}

.v3-overhaul.insights-v3 .insights-v3-section:first-child .section-label {
  margin-top: 0.35rem;
}

.v3-overhaul.insights-v3 .insights-v3-summary {
  /* Canvas — bento tiles only; no outer card */
  margin-bottom: 0.15rem;
}

.v3-overhaul.insights-v3 .insights-v3-summary .streak-card-grid,
.v3-overhaul.insights-v3 .insights-v3-summary .stat-card-grid {
  display: none !important;
}

.v3-overhaul.insights-v3 .insights-v3-summary .v3-insights-bento-host {
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .insights-v3-detail.grouped {
  background: var(--insights-v3-card, var(--v3-card-surface));
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--insights-v3-shadow, 0 3px 14px rgba(40, 18, 81, 0.08));
  margin-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell {
  background: var(--insights-v3-card, var(--v3-card-surface));
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell:last-child {
  border-bottom: none;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .module-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin: 0;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .module-description {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin: 0 0 0.55rem;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .why-this-btn {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--insights-v3-inset, #f5f4f7);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .module-header .module-title {
  font-size: 0.82rem !important;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .chart-placeholder {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  min-height: 11rem;
  height: 220px !important;
  padding: 0;
  margin-top: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  color: var(--color-text-muted);
  overflow: hidden;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .chart-placeholder canvas {
  max-height: 220px;
  width: 100% !important;
}

.v3-overhaul.insights-v3 .insights-v3-map-cell {
  padding: 0.55rem 0.65rem 0.65rem;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  overflow: visible;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail .module-header {
  justify-content: flex-end;
  padding: 0 0.2rem 0.35rem;
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail .insights-session-map-host {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail .insights-session-map-hint {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin: 0.45rem 0.2rem 0;
  line-height: 1.4;
}

.v3-overhaul.insights-v3 .v3-insights-metrics-sink {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.v3-overhaul.insights-v3 .v3-insights-journal-shell,
.v3-overhaul.insights-v3 .insight-module.v3-insights-journal-shell {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

.v3-overhaul.insights-v3 .v3-insights-activity-shell {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .v3-insights-bento-host {
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .bento-tile.hero,
.v3-overhaul.insights-v3 .bento-tile.hero .bento-h,
.v3-overhaul.insights-v3 .bento-tile.hero .bento-num {
  color: #fff;
}

.v3-overhaul.insights-v3 .bento-tile.hero .bento-sub {
  color: rgba(255, 255, 255, 0.84) !important;
  opacity: 1;
}

:root[data-theme='dark'] .v3-overhaul.insights-v3 .bento-tile.hero .bento-sub {
  color: rgba(255, 255, 255, 0.88) !important;
}

.v3-overhaul.insights-v3 .insight-module.v3-insight-card {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .insight-module.v3-insight-card .module-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.v3-overhaul.insights-v3 .insight-module.v3-insight-card .module-description {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .insight-module.v3-insight-card .why-this-btn {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--v3-tint);
  color: var(--color-text-muted);
}

/* Grouped detail charts — flat on white (no nested tint box) */

.v3-overhaul.insights-v3 .map-module {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  padding: 0;
  margin-bottom: 0.55rem;
}

.v3-overhaul.insights-v3 .map-module .module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem 0.35rem;
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .map-module .map-head-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.v3-overhaul.insights-v3 .map-module .map-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  margin-left: auto;
}

.v3-overhaul.insights-v3 .map-module .v3-map-expand.btn-text {
  border: none;
  background: none;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0;
  min-width: auto;
  width: auto;
  height: auto;
  box-shadow: none;
  opacity: 1;
  line-height: 1.2;
}

.v3-overhaul.insights-v3 .map-module .why-this-btn--icon {
  opacity: 0.5;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  margin: 0;
  padding: 0;
  font-size: 0.72rem;
}

.v3-overhaul.insights-v3 .v3-insights-places-shell {
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .map-module.v3-insights-places-map .module-header {
  justify-content: flex-end;
  padding-top: 0.45rem;
  padding-bottom: 0.25rem;
}

.v3-overhaul.insights-v3 .map-module .map-foot,
.v3-overhaul.insights-v3 .map-module .module-description {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  padding: 0 0.85rem 0.65rem;
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .map-module .insights-session-map-host {
  margin: 0 0.55rem 0.55rem;
  border-radius: 14px;
  overflow: hidden;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail.map-module {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}

.v3-overhaul.insights-v3 .insights-v3-map-detail .insights-session-map-host {
  margin: 0;
}

.v3-overhaul.insights-v3 #insights-v3-patterns-label {
  margin-top: 0.25rem;
}

.v3-overhaul.insights-v3 .module-subsection {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: none;
}

.v3-overhaul.insights-v3 .v3-insights-activity-charts .module-header {
  margin-bottom: 0.5rem;
}

.v3-overhaul.insights-v3 .v3-insights-activity-charts .module-description {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.v3-overhaul.insights-v3 .v3-insights-activity-charts .module-subsection .module-header {
  margin-bottom: 0.45rem;
}

.v3-overhaul.insights-v3 .v3-insights-activity-charts .module-subsection .module-description {
  margin-bottom: 0.65rem;
}

.v3-overhaul.insights-v3 .v3-insights-activity-charts .chart-placeholder {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
}

.v3-overhaul.insights-v3 .bento-streaks .expand-body .erow {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.62rem;
  color: var(--color-text-muted);
  margin-top: 0.28rem;
}

.v3-overhaul.insights-v3 .bento-streaks .expand-body .erow strong {
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.insights-v3 .bento-streaks .expand-body--inset {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
}

.v3-overhaul.insights-v3 .bento-streaks .expanded-detail .expand-body--inset .erow {
  font-size: 0.58rem;
  color: var(--color-text-muted);
}

.v3-overhaul.insights-v3 .bento-streaks .expanded-detail .expand-body--inset .erow strong {
  color: var(--color-primary);
}

.v3-overhaul.insights-v3 .bento-streaks.is-exp-current .bento-hero .expand-body {
  display: block;
  margin-top: 0.45rem;
  padding-top: 0;
  border-top: none;
  width: 100%;
}

.v3-overhaul.insights-v3 .bento-tile.hero .expand-body .erow {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.28rem;
}

.v3-overhaul.insights-v3 .bento-tile.hero .expand-body .erow strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.v3-overhaul.insights-v3 #insights-v3-circles-label,
.v3-overhaul.insights-v3 #insights-v3-education-label,
.v3-overhaul.insights-v3 #insights-v3-rec-label {
  margin-top: 1rem;
}

.v3-overhaul.insights-v3 .insight-module[data-activity='circles'],
.v3-overhaul.insights-v3 .insight-module[data-activity='education'] {
  margin-bottom: 0.65rem;
}

/* For you — one grouped card; rec rows are hairlines (no nested tiles) */
.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-v3-detail.grouped {
  padding: 0;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .v3-insights-rec-slot,
.v3-overhaul.insights-v3 [data-insights-section='rec'] .content-slot {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  min-height: 0;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-card {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 0;
  border: none !important;
  border-bottom: 1px solid var(--color-border-light) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-card:last-child {
  border-bottom: none !important;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-gated {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-text-muted);
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-line {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--color-text);
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-line strong {
  color: var(--color-primary);
  font-weight: 700;
}

.v3-overhaul.insights-v3 [data-insights-section='rec'] .insights-rec-line--muted {
  color: var(--color-text-muted);
  font-weight: 450;
}

/* @deprecated — pre-section morph; kept for prod insights.html until promoted */
:root[data-theme='light'] .v3-overhaul.insights-v3 .insight-module.v3-insights-rec-module,
.v3-overhaul.insights-v3 .insight-module.v3-insights-rec-module {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0.55rem;
}

:root[data-theme='light'] .v3-overhaul.insights-v3 .v3-insights-rec-module .content-slot,
:root[data-theme='light'] .v3-overhaul.insights-v3 .v3-insights-rec-module .v3-insights-rec-slot,
.v3-overhaul.insights-v3 .v3-insights-rec-module .content-slot,
.v3-overhaul.insights-v3 .v3-insights-rec-module .v3-insights-rec-slot {
  background: transparent;
  border: none;
  padding: 0;
  min-height: 0;
  color: inherit;
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-list {
  gap: 0;
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-card {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface-1, #fff);
  box-shadow: none;
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-card:last-child {
  border-bottom: none;
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-gated {
  background: var(--color-surface-1, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  box-shadow: var(--shadow-soft, 0 3px 14px rgba(40, 18, 81, 0.05));
  color: var(--color-text-muted);
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-line {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--color-text);
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-line strong {
  color: var(--color-primary);
  font-weight: 700;
}

.v3-overhaul.insights-v3 .v3-insights-rec-module .insights-rec-line--muted {
  color: var(--color-text-muted);
  font-weight: 450;
}

.v3-overhaul.insights-v3 .insight-module.v3-insights-activity-charts {
  margin-top: 0;
}

.v3-overhaul.insights-v3 .map-module .insights-session-map-map-wrap {
  height: 220px;
  min-height: 220px;
}

.v3-overhaul.insights-v3 .map-module .insights-session-map-host .leaflet-container.insights-session-map-canvas {
  min-height: 220px;
}

/* ── Insights v3 flat surfaces (home parity — solid cards, no glass grain) ── */
/* Card/inset tokens inherit from :root / :root[data-theme='dark'] above */

.v3-overhaul.insights-v3 .insight-module,
.v3-overhaul.insights-v3 .insight-module[data-activity='journal'],
.v3-overhaul.insights-v3 .insight-module[data-activity='circles'],
.v3-overhaul.insights-v3 .insight-module[data-activity='education'],
:root[data-theme='light'] .v3-overhaul.insights-v3 .insight-module {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

.v3-overhaul.insights-v3 .insight-module .content-slot {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.v3-overhaul.insights-v3 .insights-v3-detail.grouped,
.v3-overhaul.insights-v3 .metrics-row .metric-tile,
.v3-overhaul.insights-v3 .insights-review-bento .metric-tile,
.v3-overhaul.insights-v3 .bento-tile.soft {
  background: var(--insights-v3-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: var(--insights-v3-shadow) !important;
}

.v3-overhaul.insights-v3 .insights-v3-detail.grouped {
  border-radius: 18px;
  overflow: hidden;
}

.v3-overhaul.insights-v3 .insights-v3-section .chart-placeholder,
.v3-overhaul.insights-v3 .insights-v3-detail-cell .chart-placeholder {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .why-this-btn,
.v3-overhaul.insights-v3 .insights-v3-section .why-this-btn {
  background: var(--insights-v3-inset) !important;
  border: 1px solid var(--color-border-light) !important;
  color: var(--color-text-muted) !important;
  backdrop-filter: none;
}

.v3-overhaul.insights-v3 .insights-v3-detail-cell .why-this-btn:hover,
.v3-overhaul.insights-v3 .insights-v3-section .why-this-btn:hover {
  background: var(--color-border-light) !important;
  color: var(--color-text) !important;
}

.v3-overhaul.insights-v3 .page-boot-state--embedded.page-boot-state--region {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ── Profile v3.7 (DESIGN-029) ─────────────────────────────────────────── */
.v3-overhaul.profile-v3 .profile-container {
  max-width: 600px;
  padding: var(--space-3) var(--space-3) var(--space-4);
}

.v3-overhaul.profile-v3 .identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.v3-overhaul.profile-v3 .identity .profile-avatar.av {
  width: 56px;
  height: 56px;
  min-width: 56px;
  font-size: 0.85rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.v3-overhaul.profile-v3 .id-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-primary);
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
}

.v3-overhaul.profile-v3 .profile-v3-meta {
  margin: 0 0 0.35rem;
  font-size: var(--v3-metric-label-size);
  line-height: var(--v3-metric-label-lh);
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.profile-v3 .chip-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(78, 26, 154, 0.08);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  margin: 0.12rem 0 0;
  border: none;
  cursor: pointer;
}

.v3-overhaul.profile-v3 .chip-soft:hover {
  background: rgba(78, 26, 154, 0.14);
  transform: none;
}

/* Identity persona — compact chip-soft (override legacy profile.html .persona-chip) */
.v3-overhaul.profile-v3 .profile-v3-identity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  min-width: 0;
}

.v3-overhaul.profile-v3 .persona-chip.chip-soft,
.v3-overhaul.profile-v3 #persona-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text-muted);
  background: rgba(78, 26, 154, 0.08);
  border: 1px solid rgba(78, 26, 154, 0.1);
  border-radius: 999px;
  padding: 0.2rem 0.5rem 0.2rem 0.38rem;
  margin: 0.06rem 0 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  max-width: 100%;
}

.v3-overhaul.profile-v3 #persona-chip:hover {
  background: rgba(78, 26, 154, 0.12);
  border-color: rgba(78, 26, 154, 0.16);
  transform: none;
}

.v3-overhaul.profile-v3 #persona-chip:active {
  transform: none;
}

.v3-overhaul.profile-v3 #persona-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  line-height: 0;
}

.v3-overhaul.profile-v3 #persona-emoji svg,
.v3-overhaul.profile-v3 #persona-emoji img {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}

.v3-overhaul.profile-v3 #persona-name {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.v3-overhaul .stat-strip .metric-num.metric-value--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
}

/* INS-019 · wave dots on v3 Insights hero + metric tiles */
.v3-overhaul.insights-v3 .hero-num-lg.metric-value--loading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.55rem;
}

.v3-overhaul.insights-v3 .hero-num-lg .metric-wave-dots {
  color: #ffffff;
}

.v3-overhaul.insights-v3 .metrics-row .metric-num.metric-value--loading,
.v3-overhaul.insights-v3 .metric-tile .metric-num.metric-value--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
}

.v3-overhaul.insights-v3 .bento-num.metric-value--loading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1.85rem;
}

/* HOME-LOAD-006 · Home streak bento metric wave */
.v3-overhaul .home-bento .streak-panel .metric-num.metric-value--loading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--v3-metric-num-slot-h, 2.65rem);
}

.v3-overhaul.profile-v3 .profile-display-name--loading .metric-wave-dots {
  color: var(--color-primary);
}

.v3-overhaul.profile-v3 .profile-v3-stats.stat-strip {
  margin-bottom: var(--space-3);
}

.v3-overhaul.profile-v3 .stat-strip .stat-cell[data-destination] {
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.v3-overhaul.profile-v3 .stat-strip .stat-cell[data-destination]:hover,
.v3-overhaul.profile-v3 .stat-strip .stat-cell[data-destination]:focus-visible {
  background: var(--v3-tint);
  outline: none;
}

.v3-overhaul.profile-v3 .grouped.profile-v3-group {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  box-shadow: var(--v3-card-shadow);
  width: 100%;
  box-sizing: border-box;
}

.v3-overhaul.profile-v3 .grouped .cell {
  padding: 0.85rem 1rem;
}

.v3-overhaul.profile-v3 .grouped .cell.persona-goals-section,
.v3-overhaul.profile-v3 .grouped .cell.current-programs-section,
.v3-overhaul.profile-v3 .grouped .cell.badges-section,
.v3-overhaul.profile-v3 .grouped .cell.profile-settings-section {
  /* Same element is .cell + legacy section class — keep cell inset; strip prod glass only */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  margin: 0 !important;
  padding: 0.85rem 1rem !important;
}

.v3-overhaul.profile-v3 .cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 0.55rem;
  min-height: 1.75rem;
}

.v3-overhaul.profile-v3 .cell-title {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--color-text);
}

.v3-overhaul.profile-v3 .btn-text {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.v3-overhaul.profile-v3 .btn-text:hover {
  color: var(--color-primary);
}

.v3-overhaul.profile-v3 .profile-badges-progress {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

.v3-overhaul.profile-v3 .profile-badges-progress:hover {
  color: var(--color-secondary);
}

.v3-overhaul.profile-v3 .section-edit-btn.btn-text {
  border: none;
  padding: 0;
}

.v3-overhaul.profile-v3 .empty-illus {
  text-align: center;
  padding: 0.9rem 0.5rem 0.5rem;
  color: var(--color-text-muted);
}

.v3-overhaul.profile-v3 .empty-illus .glyph {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.45rem;
  border-radius: 12px;
  background: var(--v3-tint, rgba(78, 26, 154, 0.06));
  display: grid;
  place-items: center;
  color: var(--color-primary);
}

.v3-overhaul.profile-v3 .goals-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.v3-overhaul.profile-v3 .goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(78, 26, 154, 0.08);
  color: var(--color-text);
  border: 1px solid rgba(78, 26, 154, 0.12);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.v3-overhaul.profile-v3 .badges-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 0;
  padding-bottom: 0.15rem;
}

.v3-overhaul.profile-v3 .badges-row::-webkit-scrollbar {
  display: none;
}

.v3-overhaul.profile-v3 .badge-item {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 26, 154, 0.06);
  border: 1px solid rgba(78, 26, 154, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.v3-overhaul.profile-v3 .badge-item.earned {
  background: rgba(78, 26, 154, 0.1);
  border-color: rgba(78, 26, 154, 0.28);
  box-shadow: none;
  opacity: 1;
}

.v3-overhaul.profile-v3 .badge-item.earned:hover,
.v3-overhaul.profile-v3 .badge-item.earned:focus-visible {
  border-color: rgba(78, 26, 154, 0.45);
  transform: scale(1.05);
  outline: none;
}

.v3-overhaul.profile-v3 .badge-item.locked {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.v3-overhaul.profile-v3 .notification-setting-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.v3-overhaul.profile-v3 .badges-view-all.btn-text {
  display: block;
  text-align: center;
  margin-top: 0.65rem;
}

.v3-overhaul.profile-v3 .settings-subsection-title {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.85rem 0 0.45rem;
}

.v3-overhaul.profile-v3 .settings-subsection:first-of-type .settings-subsection-title {
  margin-top: 0.15rem;
}

/* Collapsible Settings — contracted by default */
.v3-overhaul.profile-v3 .profile-settings-head {
  margin-bottom: 0;
}

.v3-overhaul.profile-v3 .profile-settings-section.is-settings-open .profile-settings-head {
  margin-bottom: 0.55rem;
}

.v3-overhaul.profile-v3 .profile-settings-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}

.v3-overhaul.profile-v3 .profile-settings-toggle:hover {
  color: var(--color-primary);
}

.v3-overhaul.profile-v3 .profile-settings-toggle:focus-visible {
  outline: 2px solid rgba(78, 26, 154, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

.v3-overhaul.profile-v3 .profile-settings-body {
  padding-top: 0;
}

.v3-overhaul.profile-v3 .profile-settings-body[hidden] {
  display: none !important;
}

.v3-overhaul.profile-v3 .profile-settings-section .settings-subsection:not(:first-of-type) {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
}

.v3-overhaul.profile-v3 .settings-subsection-title,
.v3-overhaul.profile-v3 .notification-setting-label,
.v3-overhaul.profile-v3 .data-control-label {
  padding-left: 0;
}

.v3-overhaul.profile-v3 .notification-setting-item,
.v3-overhaul.profile-v3 .data-control-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
  border-bottom: 1px solid var(--color-border-light);
  padding: 0.65rem 0;
}

.v3-overhaul.profile-v3 .notification-setting-item .toggle-switch {
  align-self: start;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.v3-overhaul.profile-v3 .notification-setting-note {
  margin: 0.35rem 0 0;
  padding: 0;
  border-top: none;
}

.v3-overhaul.profile-v3 .notification-setting-item:has(+ .notification-setting-note) {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

/* Standalone sign-out row — one grouped tile, no nested .cell (avoids double padding) */
.v3-overhaul.profile-v3 .profile-v3-sign-out {
  padding: 0.65rem 1rem;
}

.v3-overhaul.profile-v3 .profile-sign-out-item {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: 0 !important;
  margin: 0;
  border-bottom: none !important;
}

.v3-overhaul.profile-v3 .profile-sign-out-item .data-control-button-neutral {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.2;
  min-height: unset;
}

.v3-overhaul.profile-v3 .notification-setting-item:last-child,
.v3-overhaul.profile-v3 .data-control-item:last-child {
  border-bottom: none;
}

/* PROF-035 · Profile Programs enrolled rows (flat, no nested glass) */
.v3-overhaul.profile-v3 .current-programs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.v3-overhaul.profile-v3 .profile-program-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--color-border-light);
}

.v3-overhaul.profile-v3 .profile-program-row:first-child {
  border-top: none;
  padding-top: 0;
}

.v3-overhaul.profile-v3 .profile-program-row-main {
  flex: 1;
  min-width: 0;
}

.v3-overhaul.profile-v3 .profile-program-title {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--color-text);
  margin: 0 0 0.2rem;
}

.v3-overhaul.profile-v3 .profile-program-meta {
  margin-bottom: 0.45rem;
}

.v3-overhaul.profile-v3 .profile-program-progress {
  height: 4px;
  background: rgba(78, 26, 154, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.v3-overhaul.profile-v3 .profile-program-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
}

.v3-overhaul.profile-v3 .profile-program-cta.btn-text {
  flex-shrink: 0;
  margin-top: 0.1rem;
  white-space: nowrap;
}

.v3-overhaul.profile-v3 .profile-program-subhead {
  padding: 0.55rem 0 0.15rem;
  font-weight: 600;
  border-top: 1px solid var(--color-border-light);
}

.v3-overhaul.profile-v3 .profile-programs-empty-cta {
  display: inline-block;
  margin-top: 0.45rem;
}

.v3-overhaul.profile-v3 .profile-programs-discover {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border-light);
  text-align: left;
}

.v3-overhaul.profile-v3 .profile-programs-discover-label {
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.v3-overhaul.profile-v3 .profile-program-row--discover {
  text-decoration: none;
  color: inherit;
}

.v3-overhaul.profile-v3 .profile-program-row--discover:hover .profile-program-title {
  color: var(--color-primary);
}

.v3-overhaul.profile-v3 .profile-programs-discover-all {
  display: inline-block;
  margin-top: 0.55rem;
}

/* Kill legacy profile-dev inline program block spacing inside grouped cells */
.v3-overhaul.profile-v3 .current-programs-section,
.v3-overhaul.profile-v3 .current-programs-list {
  margin: 0 !important;
  gap: 0 !important;
}

.v3-overhaul.profile-v3 .section-edit-btn.btn-text {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: inherit !important;
}

/* ── Circles member profile v3 (DESIGN-029) — user.html read-only view ─── */
.v3-overhaul.user-profile-v3 .user-profile-page {
  background: var(--v3-paper) !important;
}

.v3-overhaul.user-profile-v3 .user-profile-container {
  max-width: 600px;
  padding: var(--space-3) var(--space-3) var(--space-4);
}

.v3-overhaul.user-profile-v3 .user-profile-header {
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
}

.v3-overhaul.user-profile-v3 .user-profile-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  font-size: 0.85rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.v3-overhaul.user-profile-v3 .user-profile-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
}

.v3-overhaul.user-profile-v3 .user-profile-username,
.v3-overhaul.user-profile-v3 .user-profile-member-since {
  font-size: var(--v3-metric-label-size, 0.78rem);
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.user-profile-v3 .user-profile-info-section {
  margin-top: var(--space-4);
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--v3-card-shadow, 0 2px 10px rgba(40, 18, 81, 0.06));
}

.v3-overhaul.user-profile-v3 .user-profile-info-item {
  margin-bottom: 0;
}

.v3-overhaul.user-profile-v3 .user-profile-info-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul.user-profile-v3 .user-profile-persona-chip {
  background: rgba(78, 26, 154, 0.08);
  border: none;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.v3-overhaul.user-profile-v3 .user-profile-persona-name {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.v3-overhaul.user-profile-v3 .empty-state {
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: var(--space-6) var(--space-4);
}

.v3-overhaul.user-profile-v3 .empty-state p {
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 0.85rem;
}

/* ── Admin portal v3 (DESIGN-029) — internal ops, flat paper shell ───────── */
.v3-overhaul.admin-v3 {
  background: var(--v3-paper) !important;
}

.v3-overhaul.admin-v3 .admin-container {
  max-width: 960px;
  padding: var(--space-3) var(--space-3) var(--space-6);
}

.v3-overhaul.admin-v3 .admin-header .page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.v3-overhaul.admin-v3 .admin-header .page-subtitle {
  font-size: 0.85rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0;
}

.v3-overhaul.admin-v3 .admin-tab {
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-light);
  border-radius: 999px;
  backdrop-filter: none;
}

.v3-overhaul.admin-v3 .admin-tab:hover {
  background: rgba(78, 26, 154, 0.12);
}

.v3-overhaul.admin-v3 .admin-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

.v3-overhaul.admin-v3 .admin-section {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 14px !important;
  box-shadow: var(--v3-card-shadow, 0 2px 10px rgba(40, 18, 81, 0.06)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.v3-overhaul.admin-v3 .metric-card {
  background: var(--v3-paper, #f6f2ff) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 12px !important;
  backdrop-filter: none !important;
}

.v3-overhaul.admin-v3 .chart-container {
  background: var(--v3-paper, #f6f2ff) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 12px !important;
}

.v3-overhaul.admin-v3 .activity-table {
  border-color: var(--color-border-light) !important;
}

.v3-overhaul.admin-v3 .activity-table th,
.v3-overhaul.admin-v3 .activity-table td {
  border-color: var(--color-border-light) !important;
}

/* ── Badges v3.7 (DESIGN-029) — flat paper grid, profile strip at full size ─ */
.v3-overhaul.badges-v3 .badges-v3-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) var(--space-6);
}

.v3-overhaul.badges-v3 .page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.v3-overhaul.badges-v3 .page-lede {
  font-size: 0.85rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  margin: 0 0 var(--space-3);
  line-height: 1.45;
}

.v3-overhaul.badges-v3 .badges-v3-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
}

.v3-overhaul.badges-v3 .badges-v3-catalog {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.v3-overhaul.badges-v3 .badges-v3-surface-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 0.75rem;
  color: var(--text-on-glass);
}

.v3-overhaul.badges-v3 .badges-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 480px) {
  .v3-overhaul.badges-v3 .badges-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.v3-overhaul.badges-v3 .badge-card {
  appearance: none;
  font: inherit;
  text-align: center;
  width: 100%;
  cursor: pointer;
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 0.75rem 0.45rem 0.65rem;
  box-shadow: 0 2px 10px rgba(40, 18, 81, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.v3-overhaul.badges-v3 .badge-card:hover,
.v3-overhaul.badges-v3 .badge-card:focus-visible {
  border-color: rgba(78, 26, 154, 0.28);
  box-shadow: 0 4px 14px rgba(57, 15, 116, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.v3-overhaul.badges-v3 .badge-card.earned {
  border-color: rgba(78, 26, 154, 0.22);
}

.v3-overhaul.badges-v3 .badge-card.highlighted {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.18);
}

.v3-overhaul.badges-v3 .badge-card.locked {
  opacity: 0.58;
}

.v3-overhaul.badges-v3 .badge-card.locked .badge-icon svg {
  filter: grayscale(0.65);
}

.v3-overhaul.badges-v3 .badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.v3-overhaul.badges-v3 .badge-icon svg {
  width: 2.35rem;
  height: 2.35rem;
  color: var(--color-primary);
}

.v3-overhaul.badges-v3 .badge-name {
  font-weight: 650;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.v3-overhaul.badges-v3 .badge-description {
  font-size: 0.68rem;
  line-height: 1.3;
  margin: 0;
}

.v3-overhaul.badges-v3 .badge-date {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-primary);
}

.v3-overhaul.badges-v3 .badges-v3-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.v3-overhaul.badges-v3 .badges-v3-empty-icon {
  margin-bottom: var(--space-3);
  opacity: 0.7;
}

.v3-overhaul.badges-v3 .badges-v3-empty-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--color-text);
}

.v3-overhaul.badges-v3 .badges-v3-empty-cta {
  margin-top: var(--space-4);
  display: inline-flex;
}

.v3-overhaul.badges-v3 .badges-v3-modal-scrim {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.v3-overhaul.badges-v3 .badges-v3-modal {
  position: relative;
  width: 100%;
  max-width: 22rem;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  background: var(--v3-card-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(40, 18, 81, 0.18);
}

.v3-overhaul.badges-v3 .badges-v3-modal-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: var(--space-1);
}

.v3-overhaul.badges-v3 .badges-v3-modal-icon {
  margin-bottom: var(--space-3);
}

.v3-overhaul.badges-v3 .badges-v3-modal-icon.is-locked svg {
  filter: grayscale(0.65);
  opacity: 0.65;
}

.v3-overhaul.badges-v3 .badges-v3-modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

.v3-overhaul.badges-v3 .badges-v3-modal-copy {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-sm);
}

.v3-overhaul.badges-v3 .badges-v3-modal-meta {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.v3-overhaul.badges-v3 .badges-v3-modal-meta.is-locked {
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-muted);
}

.v3-overhaul.badges-v3 .page-boot-state--embedded {
  grid-column: 1 / -1;
}

/* ── Release notes modal (DESIGN-029 · flat v3 bottom sheet) ───────────────── */
.v3-overhaul .release-notes-modal-scrim.glass-scrim {
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.v3-overhaul .release-notes-modal.glass-modal.bottom-sheet {
  background: var(--v3-card-surface) !important;
  border: 1px solid var(--color-border-light) !important;
  border-bottom: none !important;
  box-shadow: 0 -12px 40px rgba(40, 18, 81, 0.16) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--color-text);
}

:root[data-theme='dark'] .v3-overhaul .release-notes-modal.glass-modal.bottom-sheet {
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.32) !important;
}

@media (min-width: 768px) {
  .v3-overhaul .release-notes-modal.glass-modal.bottom-sheet {
    border-bottom: 1px solid var(--color-border-light) !important;
    border-radius: var(--radius-ios-lg) !important;
    box-shadow: var(--v3-card-shadow-lg) !important;
  }
}

.v3-overhaul .release-notes-modal__handle {
  background: var(--color-border-light) !important;
}

.v3-overhaul .release-notes-modal__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary) !important;
  text-shadow: none !important;
}

.v3-overhaul .release-notes-modal__close {
  color: var(--color-text-muted) !important;
  border-radius: 999px;
}

.v3-overhaul .release-notes-modal__close:hover {
  color: var(--color-text) !important;
  background: var(--v3-tint) !important;
}

.v3-overhaul .release-notes-modal__date {
  color: var(--color-text-muted) !important;
}

.v3-overhaul .release-notes-modal__body::-webkit-scrollbar-thumb {
  background: rgba(78, 26, 154, 0.22);
}

.v3-overhaul .release-notes-modal__footer {
  border-top: 1px solid var(--color-border-light) !important;
  background: var(--v3-card-surface) !important;
  padding-top: var(--space-3);
  padding-bottom: var(--space-1);
}

.v3-overhaul .release-notes-modal__footer .guest-join.release-notes-modal__done {
  width: 100%;
  min-height: 2.75rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.v3-overhaul .release-notes-modal__list {
  color: var(--color-text) !important;
  text-shadow: none !important;
}

.v3-overhaul .release-notes-modal__feature {
  padding: var(--space-3) var(--space-3) var(--space-3);
  border-radius: 14px;
  background: var(--v3-tint) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: none !important;
}

.v3-overhaul .release-notes-modal__feature--link {
  transition:
    border-color var(--motion-default) var(--ease-ios),
    background var(--motion-default) var(--ease-ios),
    box-shadow var(--motion-default) var(--ease-ios);
}

.v3-overhaul .release-notes-modal__feature--link:hover {
  background: color-mix(in srgb, var(--v3-tint) 55%, var(--v3-card-surface)) !important;
  border-color: rgba(var(--color-primary-rgb), 0.28) !important;
  box-shadow: 0 2px 10px rgba(40, 18, 81, 0.06) !important;
}

.v3-overhaul .release-notes-modal__feature-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-primary) !important;
  text-shadow: none !important;
}

.v3-overhaul .release-notes-modal__detail,
.v3-overhaul .release-notes-modal__empty {
  color: var(--color-text-muted) !important;
}

.v3-overhaul .release-notes-modal__feature-icon {
  color: var(--color-primary);
}

.v3-overhaul .release-notes-modal__explore,
.v3-overhaul .release-notes-modal__explore-arrow {
  color: var(--color-primary) !important;
  font-weight: var(--font-weight-semibold);
}

/* Unread release card CTA — pill matches v3 dock CTAs */
.v3-overhaul.notifications-v3 .notification-item.unread .notification-action-btn,
.v3-overhaul.notifications-v3 .notification-item.unread .notification-action-btn--release {
  background: var(--v3-hero-grad) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.45rem 0.95rem !important;
  font-size: 0.78rem !important;
  font-weight: var(--font-weight-semibold) !important;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22) !important;
}

.v3-overhaul.notifications-v3 .notification-item.unread .notification-action-btn:hover,
.v3-overhaul.notifications-v3 .notification-item.unread .notification-action-btn--release:hover {
  filter: brightness(1.06);
}

