/* TOPAS Gifting prototype — v2
 * Target-native styling. One interactive phone. Compact nav.
 */

:root {
  --red: #CC0000;
  --red-hover: #A70000;
  --red-tint: #FEE4E4;
  --purple: #6A00CC;
  --ink: #191919;
  --ink-soft: #333333;
  --ink-muted: #666666;
  --ink-mute-2: #999999;
  --line: #E5E5E5;
  --line-soft: #EEEEEE;
  --surface: #FFFFFF;
  --canvas: #F5F5F5;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --nav-w: 220px;
  --phone-w: 393px;
  --phone-h: 852px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
  min-width: 1240px;
  font-size: 14px;
  line-height: 1.4;
}

body {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

/* ============ LEFT NAV ============ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-header { padding: 0 8px; display: flex; flex-direction: column; gap: 4px; }

.nav-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}

.nav-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.nav-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-muted);
  margin-top: 2px;
}

.nav-list { display: flex; flex-direction: column; gap: 12px; }

.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-mute-2);
  padding: 0 8px 2px;
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink);
  border-left: 2px solid transparent;
  user-select: none;
  line-height: 1.25;
}

.nav-item:hover { background: var(--canvas); }

.nav-item.active {
  background: #FEF5F5;
  border-left-color: var(--red);
  color: var(--ink);
  font-weight: 600;
}

.nav-item-label { flex: 1; }

.nav-item-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--form { background: #E39316; }
.dot--skip { background: #3C8A3C; }

.nav-footer {
  border-top: 1px solid var(--line-soft);
  padding: 10px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-muted);
}

.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot--form { background: #E39316; }
.legend-dot--skip { background: #3C8A3C; }

/* ============ MAIN STAGE ============ */

.stage {
  grid-column: 2;
  padding: 24px 32px 40px;
  display: grid;
  grid-template-columns: minmax(413px, 1fr) minmax(320px, 400px);
  gap: 32px;
  align-items: start;
  min-height: 100vh;
}

/* ============ STAGE LEFT: header + phone ============ */

.stage-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.stage-header {
  align-self: stretch;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.stage-context-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.stage-context-title {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.stage-context-sub {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* State strip above the phone */
.state-strip {
  align-self: stretch;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.state-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--canvas);
  color: var(--ink-muted);
  cursor: pointer;
  font-weight: 500;
}
.state-step.active {
  background: var(--red);
  color: #fff;
  font-weight: 700;
}
.state-step.done {
  background: #FEE4E4;
  color: var(--red);
}
.state-strip .arrow { color: var(--ink-mute-2); font-size: 10px; }
.state-strip .hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
}

/* ============ PHONE ============ */

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: #fff;
  border-radius: 56px;
  border: 1px solid #BFBFBF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.14);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-status {
  height: 40px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  flex-shrink: 0;
}
.phone-status-right { display: flex; gap: 4px; align-items: center; }
.signal, .wifi, .battery {
  display: inline-block;
  height: 10px;
  background: var(--ink);
  border-radius: 2px;
}
.signal { width: 14px; }
.wifi { width: 12px; }
.battery { width: 20px; }

.phone-scroll {
  flex: 1;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.phone-tabbar {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 8px 16px 12px;
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.phone-tabbar .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone-tabbar .tab-active { color: var(--red); font-weight: 700; }

/* ============ SOURCE PAGE ============ */

.source-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}
.source-logo {
  width: 24px; height: 24px;
  flex-shrink: 0;
}
.source-search {
  flex: 1;
  height: 32px;
  background: #F0F0F0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--ink-muted);
  gap: 6px;
}
.source-icons {
  display: flex; gap: 12px;
  font-size: 15px;
  color: var(--ink);
}

/* Hero — gift guide */
.source-hero {
  padding: 14px 16px 12px;
  background: #fff;
}
.source-hero-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.source-hero-tagline {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.35;
}

/* Guide header — matches Target Top Toys mobile layout
 * Grid columns keep the title visually centered:
 *   [back 24] [flex space] [title] [flex space] [icons 60]
 * Right cluster (search + sparkle = 24+12+24 = 60) balances against
 * the 24 back arrow so the title sits centered in the leftover space.
 */
.guide-header {
  display: grid;
  grid-template-columns: 24px 1fr auto 1fr 60px;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 0.5px solid #D6D6D6;
}
.guide-header-back {
  grid-column: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.guide-header-back svg { width: 24px; height: 24px; display: block; }
.guide-header-title {
  grid-column: 3;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #333333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.guide-header-icons {
  grid-column: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.guide-header-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.guide-header-icon svg { width: 24px; height: 24px; display: block; }

/* Guide hero slot — bullseye placeholder */
.guide-hero-slot {
  margin: 12px 16px 8px;
  padding: 28px 20px;
  background: #FEE4E4;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.guide-hero-bullseye {
  width: 44px;
  height: 44px;
}
.guide-hero-bullseye svg { width: 44px; height: 44px; display: block; }
.guide-hero-caption {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #CC0000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Horizontal product list */
.source-hlist {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 4px 0 16px;
}
.source-hrow {
  display: grid;
  grid-template-columns: 96px 1fr 28px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 0.5px solid #EEEEEE;
}
.source-hrow:first-child { border-top: none; }
.source-hrow-img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #E8E8E8;
  flex-shrink: 0;
}
.source-hrow-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.source-hrow-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.source-hrow-brand {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666666;
}
.source-hrow-name {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: #333333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0;
}
.source-hrow-price {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #333333;
  line-height: 1.2;
  margin-top: 2px;
}
.source-hrow-rating {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
}
.source-hrow-rating .rating-num {
  font-size: 12px;
  font-weight: 700;
  color: #333333;
  line-height: 1.4;
}
.source-hrow-rating .rating-star {
  width: 10px;
  height: 10px;
  display: inline-block;
  position: relative;
  top: 1px;
}
.source-hrow-rating .rating-star svg { width: 10px; height: 10px; display: block; }
.source-hrow-rating .rating-count {
  font-size: 11px;
  font-weight: 400;
  color: #666666;
  line-height: 1.4;
}
.source-hrow-heart {
  font-size: 20px;
  color: #999;
  align-self: flex-start;
}

/* Filter chip rail */
.source-chips {
  display: flex;
  gap: 6px;
  padding: 8px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line-soft);
}
.source-chips::-webkit-scrollbar { display: none; }
.source-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
  background: #fff;
  font-weight: 500;
}
.source-chip.chip--lead {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Target-native entry card */
.entry-card {
  margin: 12px 16px;
  border-radius: 12px;
  padding: 14px 14px 14px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #6A00CC 0%, #CC0000 55%, #F76A1C 100%) border-box;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.entry-card:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.08); }
.entry-card:active { transform: translateY(0); }

.entry-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.entry-card-sparkle {
  width: 20px; height: 20px;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 1px;
}

.entry-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  flex: 1;
  text-wrap: pretty;
}

.entry-card-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.entry-card-cta {
  align-self: stretch;
  margin-top: 4px;
  background: var(--red);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.005em;
}

.entry-card-cta.entry-card-cta--outline {
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
}

/* Compact variant for SLP inline */
.entry-card--inline {
  margin: 10px 16px;
  padding: 12px 12px;
  gap: 6px;
}
.entry-card--inline .entry-card-title { font-size: 14px; }
.entry-card--inline .entry-card-sub { font-size: 12px; }
.entry-card--inline .entry-card-cta { padding: 8px 14px; font-size: 12.5px; }

/* Product grid */
.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 16px 16px;
}
.source-tile { display: flex; flex-direction: column; gap: 2px; }
.source-tile-img {
  aspect-ratio: 1;
  background: #F5F5F5;
  border-radius: 6px;
  overflow: hidden;
}
.source-tile-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.source-tile-brand {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.source-tile-name {
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source-tile-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1px;
}
.source-tile-rating {
  font-size: 9.5px;
  color: var(--ink-muted);
}

/* SLP header */
.source-results-header {
  padding: 10px 16px 6px;
  background: #fff;
}
.source-results-header-count {
  font-size: 11px;
  color: var(--ink-muted);
}
.source-results-header-title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}
.source-filter-row {
  display: flex;
  gap: 6px;
  padding: 6px 16px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.source-filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  background: #fff;
}

/* Homepage hero */
.source-homepage-hero {
  background: #FEE4E4;
  padding: 16px 16px 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.source-homepage-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
}
.source-homepage-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}
.source-homepage-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* Homepage category tiles */
.source-tiles-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 4px;
}
.category-tile {
  aspect-ratio: 1.4;
  background: #F5F5F5;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: flex-end;
}

/* ============ TOPAS STATES ============ */

/* Header — canonical Figma 1:735 · 16h / 12v padding, 0.5px #D6D6D6 bottom border */
.topas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 0.5px solid #D6D6D6;
  background: #fff;
  flex-shrink: 0;
}
.topas-back {
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topas-back svg { width: 24px; height: 24px; display: block; }
.topas-back-spacer {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.topas-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #333333;
}

.topas-scroll {
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}
.topas-scroll::-webkit-scrollbar { display: none; }

.user-bubble {
  align-self: flex-end;
  max-width: 82%;
  background: #F0F0F0;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.35;
}

.ai-thinking {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
}
.ai-thinking-sparkle {
  width: 14px; height: 14px;
  display: inline-block;
}

.ai-prose {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.ai-prose b { font-weight: 700; }

/* Micah's TOPAS Clarifying Question — canonical Nicollet 2016:17659
 * Pixel-matched to the single-select variant.
 * Renders inline in the chat thread as an elevated card.
 */

/* Bottom-anchored, edge-to-edge sheet */
.clarity-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 4;
  animation: clarity-scrim-in 0.2s ease-out;
}
@keyframes clarity-scrim-in { from { opacity: 0; } to { opacity: 1; } }

.clarity-modal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: #fff;
  border: none;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -6px 20px rgba(51, 51, 51, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 5;
  animation: clarity-sheet-up 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes clarity-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.clarity-header {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
}

.clarity-header-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.clarity-question {
  flex: 1;
  padding: 0 8px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
  letter-spacing: 0;
}

.clarity-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 20px;
  color: #333;
  flex-shrink: 0;
  font-family: var(--sans);
  line-height: 1;
}
.clarity-close:hover { background: #F5F5F5; }

.clarity-meta {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 8px;
  height: 24px;
  margin-top: 0;
}

.clarity-step {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
  color: #333;
}

.clarity-subtitle {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

.clarity-separator {
  height: 0.5px;
  background: #D6D6D6;
  width: 100%;
  flex-shrink: 0;
}

.clarity-options {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  gap: 0;
}

.clarity-cell {
  min-height: 48px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  transition: background 0.1s ease;
}
.clarity-cell:hover { background: #FAFAFA; }

.clarity-cell-radio {
  padding: 12px 0 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.clarity-radio-wrap {
  width: 32px;
  height: 32px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clarity-radio {
  width: 20px;
  height: 20px;
  border: 1px solid #888;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clarity-cell.selected .clarity-radio {
  border-color: var(--red);
  border-width: 2px;
}
.clarity-cell.selected .clarity-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.clarity-cell-content {
  flex: 1;
  padding: 8px 16px;
  padding-left: 16px;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.clarity-label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
}
.clarity-label--placeholder { color: #666; }

/* Type an answer row: no radio, just label at left aligned to same 16 gutter */
.clarity-cell--text .clarity-cell-content {
  padding-left: 16px;
}

/* Footer buttons — Go back + Skip for now */
.clarity-footer {
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.clarity-btn {
  flex: 1;
  height: 32px;
  border-radius: 999px;
  border: 0.5px solid #888;
  background: #fff;
  padding: 0 12px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.clarity-btn:hover { background: #FAFAFA; }
.clarity-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

/* Product carousel — headline formula + Rachel-locked subheadline */
.carousel-headline {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: #333333;
  margin: 0 0 0 0;
  padding: 0;
}
.carousel-subheadline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  color: #666666;
  margin: -8px 0 8px 0;
  padding: 0;
}
.carousel-subheadline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.carousel-subheadline-icon svg { display: block; }

.chat-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  padding-top: 4px;
  padding-bottom: 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  align-items: stretch;
}
.chat-carousel::-webkit-scrollbar { display: none; }

/* Product Card — canonical Figma reference 1:746
 * 152w total, 8 radius, 0.5 border #D6D6D6, white bg.
 * Image container: 8/8/0/8 padding, image is 12 radius, #E8E8E8 bg, square (128x128).
 * Content: 8/8/8/8 padding, itemSpacing 8.
 * Button container: 0/12/12/12 padding, full-width 40h Add to cart.
 */
.chat-card {
  flex-shrink: 0;
  width: 152px;
  background: #fff;
  border: 0.5px solid #D6D6D6;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
}
.chat-card-img-wrap {
  padding: 8px 8px 0 8px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}
/* Ribbon slot — reserved 32px band below image, so cards without a
 * ribbon still match the height of cards that have one. */
.chat-card-ribbon-slot {
  height: 32px;
  padding: 8px 8px 0 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.chat-card-ribbon {
  width: 110px;
  height: 24px;
  flex-shrink: 0;
}
.chat-card-ribbon svg {
  display: block;
  width: 110px;
  height: 24px;
}
.chat-card-img {
  aspect-ratio: 1;
  flex: 1;
  background: #E8E8E8;
  border-radius: 12px;
  overflow: hidden;
}
.chat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.chat-card-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  align-items: flex-start;
  min-height: 80px;
}
.chat-card-brand { display: none; }
.chat-card-price {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #333333;
  margin: 0;
}
.chat-card-name {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: #333333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 35px;
  margin: 0;
}
.chat-card-rating {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  color: #333333;
  margin: 0;
  line-height: 1.4;
}
.chat-card-rating .rating-num {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.chat-card-rating .rating-star {
  width: 11px;
  height: 11px;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}
.chat-card-rating .rating-star svg { width: 11px; height: 11px; display: block; }
.chat-card-rating .rating-count {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #666666;
}
.chat-card-rating .rating-count {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #666666;
}
.chat-card-atc-wrap {
  padding: 0 12px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: auto;
  flex-shrink: 0;
}
.chat-card-atc {
  height: 40px;
  min-width: 120px;
  width: 100%;
  padding: 0 16px;
  border-radius: 999px;
  background: #CC0000;
  color: #FFFFFF;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Recipient nudge — plain system text, above the follow-ups */
.recipient-nudge {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  padding: 2px 0;
}

/* Follow-up Prompt Pill — canonical Nicollet (407:33)
 * Not a pill. Text with the AI Gradient applied to the text itself.
 * body/small - bold: 14/1.4/700, Helvetica for Target
 */
.followups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 0;
}
.followup-chip {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  cursor: pointer;
  background: linear-gradient(90deg, #CC0000 0%, #623D94 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  width: fit-content;
  padding: 0;
  border: 0;
  position: relative;
}
.followup-chip:hover {
  background: linear-gradient(90deg, #A80000 0%, #4A2D75 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
/* Framework overlay — job dot after the text, only when toggle is on */
.followup-chip[data-job]::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.15s ease;
  -webkit-text-fill-color: initial;
}
.framework-on .followup-chip[data-job="Refine"]::after     { background: #E39316; opacity: 1; }
.framework-on .followup-chip[data-job="Compare"]::after    { background: #CC0000; opacity: 1; }
.framework-on .followup-chip[data-job="Explain"]::after    { background: #8B5B00; opacity: 1; }
.framework-on .followup-chip[data-job="Complement"]::after { background: #6A00CC; opacity: 1; }
.framework-on .followup-chip[data-job="Explore"]::after    { background: #2563EB; opacity: 1; }

/* ============ MATRIX INTELLIGENCE BUBBLE ============
   Renders as plain conversational text above ask-anything
   carousels. No bubble chrome, no purple, no all caps. */
.intelligence-bubble {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0 12px;
  margin: 4px 0 8px;
  background: none;
  border: none;
  border-radius: 0;
}
.intelligence-bubble--flag {
  background: none;
  border: none;
}
/* Sparkles removed from agent responses — plain conversational text */
.intelligence-bubble-sparkle { display: none; }
.intelligence-bubble-sparkle svg { display: none; }
.intelligence-bubble-body {
  flex: 1 1 auto;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: #333333;
}
.intelligence-bubble-body b { font-weight: 700; color: #1E1E1E; }

/* ============ CHIP-TRIGGERED AI RESPONSES ============
   Plain conversational text. No bubble chrome, no purple,
   no all caps — just a sparkle + sentence. */
.ai-response {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 10px;
  margin: 4px 0 8px;
  background: none;
  border: none;
  border-radius: 0;
}
.ai-response--intro {
  margin-bottom: 8px;
}
.ai-response-eyebrow {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #1E1E1E;
  line-height: 1.5;
}
/* Sparkles removed from agent responses — plain conversational text */
.ai-response-sparkle { display: none; }
.ai-response-body {
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  padding-left: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #333333;
}
.ai-response-body b { font-weight: 700; color: #1E1E1E; }

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compare-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid #ECE7F1;
}
.compare-row:first-child { border-top: 0; padding-top: 0; }
.compare-row-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  line-height: 1.25;
}
.compare-row-note {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  color: #666666;
}

/* ============ ASK-ANYTHING (multi-category) ============ */

/* Empty state — quick-prompt suggestion list above the input */
.ask-empty-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666666;
  padding: 8px 0 12px;
}
.ask-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}
.ask-prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 14px;
  background: #FAFAFA;
  border: 1px solid #E6E6E6;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #333333;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ask-prompt-row:hover {
  background: #F3F3F3;
  border-color: #D6D6D6;
}
.ask-prompt-row-icon { display: flex; flex-shrink: 0; width: 18px; height: 18px; }
.ask-prompt-row-icon svg { width: 18px; height: 18px; display: block; }
.ask-prompt-row-text { flex: 1; }
.ask-prompt-row-caret {
  flex-shrink: 0;
  font-size: 16px;
  color: #999999;
  line-height: 1;
}

/* Result state — stacked carousels + show-more expander */
.multi-carousel-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 4px;
}
.show-more-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  margin: 12px 0 4px;
  background: #FFFFFF;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.show-more-row:hover {
  background: #FAFAFA;
  border-color: #D6D6D6;
}
.show-more-caret { font-size: 14px; line-height: 1; color: #666666; }

/* Search Input States — canonical Figma 1:591 · condensed default */
.phone-input {
  padding: 8px 16px 16px;
  background: #fff;
  flex-shrink: 0;
}
.input-pill {
  height: 46px;
  border-radius: 28px;
  padding: 5px 5px 5px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 0.5px solid #D6D6D6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}
.input-placeholder {
  flex: 1;
  min-width: 0;
  font-family: "Helvetica for Target", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
  color: #666666;
}
.input-send {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: #E8E8E8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px;
}
.input-send svg { width: 12px; height: 12px; display: block; }

/* ============ RIGHT SIDEBAR ============ */

.stage-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}
.info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

/* Collapsible info-card pattern (Global rule, The 5 jobs) */
.info-card.collapsible { gap: 0; padding: 0; }
.info-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.info-card-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.info-card-caret {
  font-size: 14px;
  line-height: 1;
  color: #999999;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}
.info-card.collapsed .info-card-caret { transform: rotate(-90deg); }
.info-card-body {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-card.collapsed .info-card-body { display: none; }
.info-body {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.info-body code {
  background: #FFF3D6;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #8B5B00;
  display: inline-block;
  margin-right: 4px;
}

.info-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  font-size: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  line-height: 1.35;
}
.info-row:first-of-type { border-top: none; padding-top: 0; }
.info-row-label {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.info-row-value { color: var(--ink); }

/* "What TOPAS sees" — one inferred fact per row */
.inferred-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.inferred-row {
  font-size: 13px;
  color: var(--ink);
  padding: 8px 10px;
  background: #FAF8F5;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  line-height: 1.35;
}
.inferred-row--empty {
  color: var(--ink-muted);
  font-style: italic;
  background: transparent;
  border: 1px dashed var(--line-soft);
}

/* Framework toggle in the sidebar */
.framework-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 0 4px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}
.framework-toggle input { display: none; }
.framework-toggle-track {
  width: 30px; height: 16px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.framework-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.framework-toggle input:checked + .framework-toggle-track { background: var(--red); }
.framework-toggle input:checked + .framework-toggle-track .framework-toggle-thumb { transform: translateX(14px); }

.framework-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--ink-muted);
  padding-top: 2px;
}
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.legend-tag {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* JTBD coverage on the Chips-on-screen card */
.jtbd-coverage {
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coverage-status {
  font-size: 12px;
  color: var(--ink);
}
.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.coverage-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  background: #F5F5F5;
  border: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.coverage-tag.active {
  color: #fff;
}

/* Chip-on-screen breakdown */
.chip-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chip-breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
}
.chip-breakdown-row:first-child { border-top: none; padding-top: 0; }
.chip-breakdown-copy {
  color: var(--ink);
  font-weight: 600;
}
.chip-breakdown-copy .role-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.chip-breakdown-tmpl {
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  color: var(--ink-muted);
  background: #F7F5F1;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.chip-breakdown-grammar {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  margin-top: -2px;
}

/* Template library list */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.template-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.35;
  padding: 4px 0;
  border-top: 1px solid var(--line-soft);
}
.template-row:first-child { border-top: none; padding-top: 0; }
.template-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 11px;
}
.template-name .role-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.template-grammar {
  color: var(--ink-muted);
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
}

/* Rule list */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rule-row {
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rule-row:first-child { border-top: none; padding-top: 0; }
.rule-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}
.rule-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--line-soft);
  color: var(--ink-muted);
}
.rule-tag[data-tag="guardrail"] { background: #FCE4E4; color: var(--red); }
.rule-tag[data-tag="grammar"] { background: #FFF3D6; color: #8B5B00; }
.rule-tag[data-tag="ranking"] { background: #E4EFFF; color: #003C99; }
.rule-tag[data-tag="sanity"] { background: #E4F4E9; color: #1F6B1F; }
.rule-tag[data-tag="structure"] { background: #FFF3D6; color: #8B5B00; }
.rule-tag[data-tag="signal"] { background: #E4EFFF; color: #003C99; }
.rule-tag[data-tag="job"] { background: #E4F4E9; color: #1F6B1F; }
.rule-detail {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}
