@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=Tiro+Devanagari+Hindi:ital@0;1&display=swap");

:root {
  --bg: #dfd4c8;
  --bg-deep: #a29384;
  --surface: rgba(255, 250, 245, 0.78);
  --surface-strong: rgba(255, 252, 248, 0.94);
  --surface-ink: #18242a;
  --surface-soft: #566167;
  --surface-faint: #8d8579;
  --line: rgba(24, 36, 42, 0.08);
  --line-strong: rgba(24, 36, 42, 0.14);
  --sage: #dfe5dd;
  --sage-deep: #203741;
  --sea: #274650;
  --sea-soft: rgba(39, 70, 80, 0.08);
  --amber: #c99f65;
  --apricot: #b96c4b;
  --rose: #8f5458;
  --success: #2f6a58;
  --shadow-xl: 0 42px 84px rgba(20, 24, 28, 0.16);
  --shadow-lg: 0 26px 52px rgba(20, 24, 28, 0.12);
  --shadow-md: 0 16px 30px rgba(20, 24, 28, 0.085);
  --radius-3xl: 34px;
  --radius-2xl: 26px;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--surface-ink);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 12%, rgba(22, 43, 51, 0.24), transparent 19%),
    radial-gradient(circle at 86% 12%, rgba(183, 145, 88, 0.16), transparent 18%),
    radial-gradient(circle at 76% 76%, rgba(92, 64, 54, 0.16), transparent 24%),
    linear-gradient(180deg, #e9ddd1 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--surface-ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: rgba(12, 90, 97, 0.34);
  box-shadow: 0 0 0 4px rgba(12, 90, 97, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

input,
select {
  min-height: 50px;
  padding: 0 14px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 16px 18px;
  line-height: 1.65;
}

.language-disclaimer,
.voice-language-note {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #7a4e21;
  background: rgba(201, 159, 101, 0.14);
  border: 1px solid rgba(201, 159, 101, 0.24);
  border-radius: 16px;
  padding: 10px 14px;
}

.page-glow,
.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-glow {
  z-index: -2;
  background:
    radial-gradient(circle at 16% 24%, rgba(22, 43, 51, 0.22), transparent 20%),
    radial-gradient(circle at 82% 12%, rgba(183, 145, 88, 0.15), transparent 16%),
    radial-gradient(circle at 68% 78%, rgba(92, 64, 54, 0.14), transparent 24%);
}

.page-noise {
  z-index: -3;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(23,39,44,0.045)' stroke-width='1'%3E%3Cpath d='M0 30h180M0 90h180M0 150h180M30 0v180M90 0v180M150 0v180'/%3E%3C/g%3E%3C/svg%3E");
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 30px;
  display: grid;
  gap: 28px;
}

.topbar,
.topbar-actions,
.brandblock,
.product-grid,
.section-head,
.section-head.compact,
.launch-row,
.conversation-topbar,
.progress-head,
.composer-toolbar,
.voice-cluster,
.voice-toggles,
.summary-header,
.export-row,
.backstage-actions,
.detail-meta,
.bonus-signals,
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 28px;
  background: rgba(249, 243, 236, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.brandblock {
  align-items: center;
  gap: 14px;
}

.brand-mark {
  inline-size: 72px;
  block-size: 72px;
  flex: 0 0 auto;
  filter: drop-shadow(0 16px 24px rgba(39, 70, 80, 0.14));
}

.brand-copy h1,
.conversation-topbar h2,
.section-head h3,
.modal-card h2 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-variation-settings: "SOFT" 60, "WONK" 0;
}

.brand-copy h1 {
  font-size: 1.16rem;
  line-height: 1.08;
  max-width: 22ch;
  letter-spacing: -0.03em;
}

.eyebrow,
.mini-label,
.metric-label,
.planner-label,
.nudge-meta,
.history-meta {
  color: var(--surface-faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
}

.topbar-actions {
  justify-content: flex-end;
  align-items: center;
}

.language-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.74);
  border: 1px solid rgba(24, 36, 42, 0.06);
  box-shadow: 0 10px 22px rgba(29, 32, 35, 0.07);
}

.language-tab {
  min-width: 104px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--surface-soft);
  display: grid;
  gap: 2px;
  align-items: center;
  justify-items: center;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.language-tab:hover {
  transform: translateY(-1px);
}

.language-tab.is-active {
  background: linear-gradient(140deg, rgba(39, 70, 80, 0.98), rgba(27, 48, 56, 0.96));
  color: #fff;
  box-shadow: 0 14px 22px rgba(39, 70, 80, 0.2);
}

.tab-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tab-asterisk {
  color: var(--amber);
  font-size: 0.9em;
}

.tab-script {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.service-health,
.summary-text,
.panel-subtitle,
.subtitle,
.focus-copy,
.voice-status,
.session-meta,
.footer-copy,
.detail-copy,
.profile-context,
.profile-meta,
.profile-tags,
.plain-list,
.evidence-list,
.quiet-note,
.muted {
  color: var(--surface-soft);
}

.summary-text,
.panel-subtitle,
.subtitle,
.focus-copy,
.voice-status,
.session-meta,
.footer-copy,
.detail-copy,
.profile-context,
.profile-meta,
.profile-tags,
.plain-list,
.evidence-list,
.quiet-note,
.muted {
  line-height: 1.62;
}

.service-health {
  font-size: 0.86rem;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid rgba(29, 43, 45, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.service-health::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.78;
}

.service-health.good {
  color: var(--success);
}

.service-health.warn {
  color: var(--apricot);
}

.product-grid {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-areas: "conversation sanctuary";
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.conversation-column {
  grid-area: conversation;
  min-width: 0;
}

.sanctuary-column {
  grid-area: sanctuary;
}

.sanctuary-column,
.storyboard-grid,
.focus-row,
.starter-deck,
.nudge-deck,
.history-list,
.architecture-grid,
.metrics,
.planner-grid,
.detail-grid,
.personalization-grid,
.trust-row {
  display: grid;
  gap: 14px;
}

.panel,
.status-card,
.story-card,
.focus-card,
.ritual-stat,
.history-card,
.starter-card,
.nudge-card,
.trust-pill,
.metric-card,
.planner-card,
.architecture-step,
.profile-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.panel {
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-xl);
  padding: 28px;
}

.status-card,
.story-card,
.focus-card,
.ritual-stat,
.history-card,
.starter-card,
.nudge-card,
.metric-card,
.planner-card,
.architecture-step,
.profile-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.sanctuary-card,
.conversation-panel {
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 241, 233, 0.9) 100%);
}

.sanctuary-card,
.ritual-card,
.comfort-card,
.conversation-panel {
  display: grid;
  gap: 18px;
}

.subtitle {
  max-width: 38ch;
  line-height: 1.7;
}

.section-head {
  align-items: start;
  justify-content: space-between;
}

.section-head.compact {
  align-items: center;
}

.section-head h3,
.conversation-topbar h2 {
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.sanctuary-status {
  display: grid;
  gap: 12px;
}

.status-card,
.story-card,
.focus-card,
.aftercare-panel,
.composer-panel,
.nudge-panel {
  padding: 18px 18px 20px;
}

.status-card {
  background:
    linear-gradient(135deg, rgba(223, 234, 226, 0.76), rgba(255, 255, 255, 0.88));
}

.status-banner {
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.status-banner.info {
  color: var(--sea);
  background: rgba(12, 90, 97, 0.08);
  border-color: rgba(12, 90, 97, 0.1);
}

.status-banner.success {
  color: var(--success);
  background: rgba(47, 124, 97, 0.09);
  border-color: rgba(47, 124, 97, 0.14);
}

.status-banner.error {
  color: var(--rose);
  background: rgba(184, 95, 88, 0.1);
  border-color: rgba(184, 95, 88, 0.16);
}

.launch-row {
  align-items: end;
}

.inline-field {
  display: grid;
  gap: 8px;
  flex: 1 1 220px;
}

.compact-field {
  max-width: 200px;
}

.native-language-select {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.inline-field span,
.toggle span {
  font-size: 0.92rem;
  color: var(--surface-soft);
}

.starter-section {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.starter-deck,
.nudge-deck {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.starter-card,
.nudge-card {
  text-align: left;
  display: grid;
  gap: 8px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 238, 0.82));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.starter-card:hover,
.nudge-card:hover,
.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(27, 41, 45, 0.12);
  border-color: rgba(12, 90, 97, 0.18);
}

.starter-card strong,
.nudge-card strong,
.history-card strong {
  font-size: 0.98rem;
}

.starter-card span,
.nudge-card span {
  color: var(--surface-soft);
  line-height: 1.5;
  font-size: 0.92rem;
}

.profile-details {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  padding: 16px 18px;
}

.profile-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(53, 90, 95, 0.18);
  background:
    linear-gradient(180deg, rgba(238, 228, 214, 0.96), rgba(233, 222, 205, 0.92));
  box-shadow: 0 10px 24px rgba(20, 27, 32, 0.08);
}

.profile-summary-strip.is-empty {
  border-style: dashed;
  background: rgba(238, 228, 214, 0.52);
}

.profile-summary-copy {
  display: grid;
  gap: 4px;
}

.profile-sheet-trigger {
  white-space: nowrap;
}

.profile-sheet-backdrop {
  align-items: end;
  padding: 20px;
  background: rgba(12, 16, 19, 0.52);
}

.profile-sheet-card {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding-top: 20px;
  border-radius: 30px 30px 22px 22px;
  background:
    linear-gradient(180deg, rgba(238, 228, 214, 0.98), rgba(231, 219, 203, 0.98));
  box-shadow: 0 28px 70px rgba(8, 12, 14, 0.28);
}

.sheet-handle {
  inline-size: 58px;
  block-size: 6px;
  border-radius: 999px;
  margin: 0 auto 8px;
  background: rgba(20, 27, 32, 0.18);
}

.profile-sheet-grid {
  margin-top: 4px;
}

.profile-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.profile-details summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.profile-details summary::-webkit-details-marker {
  display: none;
}

.profile-details[open] summary {
  margin-bottom: 14px;
}

.profile-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

.trust-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.focus-tone-grid {
  display: grid;
  gap: 12px;
}

.tone-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(248, 240, 230, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-md);
}

.tone-icon {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 74, 79, 0.08);
  color: var(--sea);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.trust-pill {
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--surface-soft);
  font-size: 0.88rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 237, 228, 0.84));
}

.ritual-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ritual-stat {
  padding: 18px;
  display: grid;
  gap: 8px;
  background:
    linear-gradient(140deg, rgba(19, 110, 101, 0.9), rgba(12, 90, 97, 0.96));
  color: #fff;
}

.ritual-stat strong {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
}

.ritual-stat span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.history-list {
  grid-template-columns: 1fr;
}

.history-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.history-card.empty {
  color: var(--surface-soft);
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-tag,
.chip,
.signal-pill,
.status-pill,
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.chip,
.signal-pill,
.history-tag {
  background: rgba(12, 90, 97, 0.08);
  color: var(--sea);
}

.chip.soft {
  background: rgba(23, 39, 44, 0.06);
  color: var(--surface-soft);
}

.chip.accent {
  background: rgba(240, 182, 103, 0.18);
  color: #8a5512;
}

.chip.bonus {
  background: rgba(217, 128, 84, 0.16);
  color: #9a4f28;
}

.conversation-panel {
  min-height: calc(100vh - 120px);
  grid-template-rows: auto auto auto auto auto 1fr auto auto auto;
}

body:not(.session-live) .product-grid {
  grid-template-areas: "conversation";
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}

body:not(.session-live) .sanctuary-column {
  display: none;
}

body:not(.session-live) .nudge-panel,
body:not(.session-live) .aftercare-panel {
  display: none;
}

body:not(.session-live) .composer-panel {
  position: static;
  bottom: auto;
  box-shadow: none;
}

body:not(.session-live) .storyboard-grid,
body:not(.session-live) .focus-row,
body:not(.session-live) .session-meta {
  display: none;
}

body:not(.has-history) .ritual-card {
  display: none;
}

body:not(.session-live) .comfort-card {
  display: none;
}

body.session-live .product-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}

body.session-live .ritual-card,
body.session-live .comfort-card {
  opacity: 0.94;
}

body.session-live .welcome-stage {
  display: none;
}

.welcome-stage {
  display: grid;
  gap: 22px;
  padding: 6px 0 10px;
}

.welcome-copy {
  display: grid;
  gap: 12px;
}

.welcome-copy h2 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-size: clamp(2.9rem, 6vw, 6.1rem);
  line-height: 0.86;
  max-width: 10ch;
  letter-spacing: -0.05em;
}

.welcome-visual {
  position: relative;
  min-height: 220px;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 25%, rgba(201, 159, 101, 0.22), transparent 20%),
    radial-gradient(circle at 82% 24%, rgba(39, 70, 80, 0.18), transparent 22%),
    linear-gradient(145deg, rgba(239, 231, 220, 0.98), rgba(252, 246, 238, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lg);
}

.welcome-halo {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(12, 90, 97, 0.12);
}

.welcome-halo-a {
  inset: 24px auto auto 34px;
  width: 220px;
  height: 220px;
}

.welcome-halo-b {
  inset: 50px 38px auto auto;
  width: 136px;
  height: 136px;
}

.welcome-core {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  inline-size: 166px;
  block-size: 166px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.82), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(243, 233, 223, 0.92));
  box-shadow: 0 28px 52px rgba(29, 32, 35, 0.12);
  border: 1px solid rgba(29, 43, 45, 0.06);
}

.welcome-mark {
  inline-size: 94px;
  block-size: 94px;
  filter: drop-shadow(0 14px 18px rgba(29, 74, 79, 0.08));
}

.welcome-core-line {
  padding: 0 18px 18px;
  color: rgba(29, 43, 45, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.welcome-float {
  position: absolute;
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.94);
  color: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(40, 37, 31, 0.08);
}

.welcome-float-a { inset: 28px auto auto 28px; }
.welcome-float-b { inset: auto 26px 26px auto; }
.welcome-float-c { inset: 102px 34px auto auto; }

.welcome-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.welcome-note {
  color: var(--surface-soft);
  font-size: 0.86rem;
}

.welcome-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.conversation-topbar {
  align-items: center;
  justify-content: space-between;
}

.session-meta {
  padding: 0 2px;
  font-size: 0.95rem;
}

.session-meta.empty {
  color: var(--surface-faint);
}

.storyboard-grid {
  grid-template-columns: 1.2fr 1fr;
}

.story-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 239, 232, 0.84));
}

.story-card:first-child {
  grid-column: 1 / -1;
}

.focus-row {
  display: none;
}

.focus-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 242, 235, 0.84));
}

.progress-track {
  width: 100%;
  height: 11px;
  background: rgba(23, 39, 44, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #0e796d 0%, #5ba680 48%, #f0b667 100%);
  transition: width 220ms ease;
}

.chat-stage {
  min-height: 360px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.45), transparent 48%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(245, 239, 232, 0.93));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), var(--shadow-lg);
  overflow: hidden;
}

.chat-log {
  height: 100%;
  min-height: 360px;
  max-height: 54vh;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  gap: 14px;
}

.empty-chat-card {
  align-self: end;
  max-width: 520px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 10px;
}

.message {
  display: grid;
  gap: 8px;
}

.message.user {
  justify-items: end;
}

.speaker {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--surface-faint);
  font-weight: 800;
}

.bubble {
  max-width: min(78%, 720px);
  padding: 17px 19px;
  border-radius: 26px;
  line-height: 1.74;
  font-size: 0.99rem;
  box-shadow: var(--shadow-md);
}

.message.assistant .bubble,
.message.system .bubble {
  background: rgba(255, 255, 255, 0.94);
  border-top-left-radius: 10px;
}

.message.user .bubble {
  background:
    linear-gradient(160deg, rgba(39, 70, 80, 0.99), rgba(27, 48, 56, 0.98));
  color: #fff;
  border-top-right-radius: 10px;
}

.message.system .bubble {
  color: var(--rose);
}

.nudge-panel,
.composer-panel,
.aftercare-panel {
  background:
    linear-gradient(180deg, rgba(255, 254, 251, 0.94), rgba(247, 242, 237, 0.88));
}

.nudge-panel {
  padding-block: 14px;
}

.nudge-details {
  display: grid;
  gap: 12px;
}

.nudge-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.nudge-summary::-webkit-details-marker {
  display: none;
}

.nudge-summary h3 {
  font-size: 1.02rem;
  line-height: 1.18;
}

.nudge-details:not([open]) .nudge-deck,
.nudge-details:not([open]) .panel-subtitle {
  display: none;
}

.composer {
  display: grid;
  gap: 12px;
}

.composer-panel-head {
  align-items: center;
  gap: 16px;
}

.composer-panel {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 12px;
  box-shadow: 0 22px 44px rgba(29, 32, 35, 0.12);
}

body.session-live .composer-panel {
  position: sticky;
  bottom: 12px;
  z-index: 5;
}

.composer-toggle {
  white-space: nowrap;
  min-height: 42px;
}

.composer-toggle-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.composer-panel.is-collapsed .composer-toggle-icon {
  transform: rotate(-180deg);
}

.composer-draft-area {
  display: grid;
  gap: 12px;
}

.composer-dropbar {
  appearance: none;
  border: 0;
  inline-size: 54px;
  block-size: 5px;
  border-radius: 999px;
  margin: 0 auto;
  background: rgba(20, 27, 32, 0.12);
  display: block;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
  padding: 0;
}

.composer-collapsed-hint {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(53, 90, 95, 0.24);
  background: rgba(238, 228, 214, 0.42);
}

.composer-collapsed-hint.is-hidden {
  display: none;
}

.composer-collapsed-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.composer-collapsed-actions.is-hidden {
  display: none;
}

.compact-action {
  min-height: 40px;
}

.composer-panel.is-collapsed .conversation-mode,
.composer-panel.is-collapsed .composer-draft-area,
.composer-panel.is-collapsed .call-state-card,
.composer-panel.is-collapsed .composer-toolbar {
  display: none;
}

.composer-panel.is-collapsed {
  padding-bottom: 16px;
  box-shadow: 0 16px 30px rgba(29, 32, 35, 0.12);
}

.composer-panel.is-collapsed .composer-panel-head {
  margin-bottom: 10px;
}

.composer-dropbar:hover,
.composer-dropbar:focus-visible {
  background: rgba(53, 90, 95, 0.34);
  transform: scaleX(1.06);
  outline: none;
}

.conversation-mode {
  display: grid;
  gap: 14px;
  padding: 18px 18px 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(201, 159, 101, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(32, 55, 65, 0.98), rgba(24, 39, 46, 0.98));
  color: #f8f2ea;
  box-shadow: 0 22px 40px rgba(29, 32, 35, 0.18);
}

.conversation-mode .eyebrow,
.conversation-mode .summary-text,
.conversation-mode h3 {
  color: inherit;
}

.conversation-mode-copy {
  display: grid;
  gap: 8px;
}

.conversation-mode-copy h3 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 24ch;
}

.conversation-mode-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-step {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  font-weight: 700;
}

.mode-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 999px;
  background: rgba(201, 159, 101, 0.88);
  box-shadow: 0 0 0 4px rgba(201, 159, 101, 0.12);
}

.composer-toolbar {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.voice-cluster {
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.voice-status {
  font-size: 0.92rem;
}

.voice-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(223, 234, 226, 0.78), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(12, 90, 97, 0.12);
}

.voice-preview-copy {
  display: grid;
  gap: 4px;
}

.voice-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-preview-actions .button {
  min-height: 40px;
}

.voice-status.error {
  color: var(--rose);
}

.voice-status.active {
  color: var(--sea);
  font-weight: 700;
}

.voice-toggles {
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 320px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(24, 36, 42, 0.06);
}

.toggle input {
  width: auto;
  min-height: 0;
}

.aftercare-panel {
  position: relative;
  overflow: hidden;
}

.aftercare-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(240, 182, 103, 0.2), transparent 68%);
  pointer-events: none;
}

.conversation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background:
    linear-gradient(140deg, #274650 0%, #1c343d 100%);
  box-shadow: 0 16px 28px rgba(39, 70, 80, 0.22);
}

.button.secondary,
.button.ghost,
.button.ghost-link,
.button.subtle {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 39, 44, 0.1);
  color: var(--surface-ink);
}

.button.ghost-link {
  display: inline-flex;
  align-items: center;
}

.button.emergency-link,
.emergency-link {
  color: #f9f3ea;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding-inline: 12px 16px;
  min-height: 50px;
  background:
    linear-gradient(140deg, rgba(34, 45, 53, 0.98) 0%, rgba(24, 31, 37, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 28px rgba(17, 21, 24, 0.18);
}

.emergency-kicker {
  min-width: 40px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  background: rgba(201, 159, 101, 0.18);
  color: #f2cf97;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.emergency-copy {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  align-self: center;
}

.voice-button {
  min-width: 188px;
  border-radius: 18px;
}

.send-button {
  min-width: 124px;
  margin-left: auto;
}

.disabled-link {
  opacity: 0.55;
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

.review-only {
  display: none !important;
}

body.review-mode .review-only {
  display: initial !important;
}

body.review-mode section.review-only,
body.review-mode button.review-only {
  display: block !important;
}

.backstage-panel {
  display: grid;
  gap: 20px;
}

.profile-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-card {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.profile-title {
  font-weight: 800;
}

.detail-panel,
.summary-block {
  display: grid;
  gap: 16px;
}

.detail-grid,
.personalization-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.detail-meta,
.metrics {
  align-items: stretch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.metric-card,
.planner-card,
.architecture-step {
  padding: 16px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-value.small {
  font-size: 1rem;
  text-transform: capitalize;
}

.metric-value.small.urgent {
  color: var(--rose);
}

.planner-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.planner-value {
  font-weight: 700;
}

.topic-map {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-pill,
.status-pill {
  background: rgba(23, 39, 44, 0.06);
  color: var(--surface-soft);
}

.status-pill.resolved,
.topic-pill.resolved {
  background: rgba(47, 124, 97, 0.14);
  color: var(--success);
}

.status-pill.partial,
.topic-pill.partial {
  background: rgba(240, 182, 103, 0.2);
  color: #9a6a15;
}

.topic-pill.pending,
.topic-pill.probing {
  background: rgba(240, 182, 103, 0.16);
  color: #8f6616;
}

.topic-pill.stable {
  background: rgba(47, 124, 97, 0.14);
  color: var(--success);
}

.topic-pill.held_back {
  background: rgba(23, 39, 44, 0.1);
  color: var(--surface-soft);
}

.status-pill.review,
.topic-pill.review,
.status-pill.contradicted,
.topic-pill.contradicted {
  background: rgba(184, 95, 88, 0.14);
  color: var(--rose);
}

.plain-list,
.evidence-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.94rem;
}

th {
  color: var(--surface-faint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.empty-cell {
  color: var(--surface-faint);
}

.evidence-item {
  display: grid;
  gap: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(18, 28, 31, 0.46);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.modal-card {
  width: min(860px, 100%);
  padding: 28px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 251, 247, 0.97);
  box-shadow: var(--shadow-xl);
  display: grid;
  gap: 18px;
}

.architecture-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.architecture-step {
  display: grid;
  gap: 8px;
}

.quiet-note {
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .product-grid,
  body.session-live .product-grid,
  body:not(.session-live) .product-grid {
    grid-template-areas:
      "conversation"
      "sanctuary";
    grid-template-columns: 1fr;
  }

  .conversation-panel {
    min-height: auto;
  }

  .storyboard-grid,
  .focus-row {
    grid-template-columns: 1fr;
  }

  .language-tabs {
    order: 3;
  }
  body:not(.session-live) .sanctuary-column {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .composer-toolbar,
  .voice-cluster,
  .voice-toggles,
  .launch-row,
  .conversation-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .language-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .language-tab {
    flex: 1 1 0;
    min-width: 0;
  }

  .brand-copy h1 {
    max-width: none;
  }

  .welcome-copy h2 {
    max-width: none;
    font-size: clamp(2.3rem, 12vw, 3.7rem);
  }

  .welcome-visual {
    min-height: 180px;
  }

  .welcome-core {
    inline-size: 128px;
    block-size: 128px;
  }

  .welcome-mark {
    inline-size: 76px;
    block-size: 76px;
  }

  .profile-form-grid,
  .ritual-stats,
  .starter-deck,
  .nudge-deck,
  .metrics,
  .planner-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .chat-log {
    max-height: none;
    min-height: 320px;
    padding: 18px;
  }

  .bubble {
    max-width: 90%;
  }

  .button,
  .toggle {
    width: 100%;
    justify-content: center;
  }

  .composer-toggle {
    width: 100%;
  }

  .composer-panel {
    position: static;
  }

  .voice-preview,
  .voice-preview-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-summary-strip,
  .profile-sheet-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-sheet-backdrop {
    padding: 12px;
  }

  .profile-sheet-card {
    max-height: 88vh;
    border-radius: 28px 28px 20px 20px;
  }
}

/* Premium product reset: quieter hierarchy, matte surfaces, stronger ritual/voice states */

:root {
  --bg: #141b20;
  --bg-deep: #0f1519;
  --surface: #eee4d6;
  --surface-strong: #f5ede1;
  --surface-ink: #1b2328;
  --surface-soft: #5d635d;
  --surface-faint: #7a746d;
  --line: rgba(27, 35, 40, 0.1);
  --line-strong: rgba(27, 35, 40, 0.16);
  --sage: #d7dbd3;
  --sage-deep: #1e2c32;
  --sea: #355a5f;
  --sea-soft: rgba(53, 90, 95, 0.12);
  --amber: #c48742;
  --apricot: #a65d4e;
  --rose: #915952;
  --success: #3a735a;
  --shadow-xl: 0 24px 60px rgba(8, 12, 15, 0.24);
  --shadow-lg: 0 18px 36px rgba(8, 12, 15, 0.18);
  --shadow-md: 0 10px 22px rgba(8, 12, 15, 0.12);
}

body {
  color: var(--surface-ink);
  background:
    linear-gradient(180deg, #192127 0%, #141b20 42%, #0f1519 100%);
}

.page-glow {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(196, 135, 66, 0.04), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(53, 90, 95, 0.07), transparent 18%);
}

.page-noise {
  z-index: -3;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'%3E%3Cpath d='M0 40h220M0 110h220M0 180h220M40 0v220M110 0v220M180 0v220'/%3E%3C/g%3E%3C/svg%3E");
}

.shell {
  gap: 22px;
}

.topbar {
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(20, 27, 32, 0.96);
  border: 1px solid rgba(238, 228, 214, 0.08);
  box-shadow: var(--shadow-lg);
  backdrop-filter: none;
}

.brand-copy h1,
.conversation-topbar h2,
.section-head h3,
.modal-card h2,
.welcome-copy h2,
.next-step-title {
  color: var(--surface);
}

.brand-copy h1 {
  max-width: 25ch;
  font-size: 1.12rem;
}

.eyebrow,
.mini-label,
.metric-label,
.planner-label,
.nudge-meta,
.history-meta {
  color: rgba(238, 228, 214, 0.58);
  letter-spacing: 0.06em;
}

.brandblock .eyebrow {
  color: rgba(238, 228, 214, 0.72);
}

.topbar-actions {
  align-items: center;
}

.language-tabs {
  background: rgba(255, 248, 240, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.language-tab {
  color: rgba(247, 239, 229, 0.82);
}

.language-tab.is-active {
  background: #355a5f;
  color: #fff8f2;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 242, 0.14);
}

.language-tab[data-language="hinglish"] {
  color: rgba(255, 232, 205, 0.88);
}

.language-tab[data-language="hinglish"] .tab-script {
  color: rgba(255, 206, 153, 0.92);
}

.language-tab.is-active[data-language="hinglish"] {
  background: #9b642f;
}

.language-tab.is-active .tab-asterisk {
  color: #ffe2b0;
}

.product-grid {
  gap: 20px;
}

.panel,
.status-card,
.story-card,
.focus-card,
.ritual-stat,
.history-card,
.starter-card,
.nudge-card,
.trust-pill,
.metric-card,
.planner-card,
.architecture-step,
.profile-card {
  backdrop-filter: none;
  border-color: rgba(27, 35, 40, 0.08);
}

.conversation-panel {
  background: var(--surface-strong);
  min-height: calc(100vh - 118px);
}

.ritual-card,
.care-plan-card {
  background: rgba(24, 31, 36, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--surface);
}

.ritual-card .summary-text,
.ritual-card .quiet-note,
.care-plan-card .summary-text,
.care-plan-card .quiet-note,
.ritual-card .mini-label,
.care-plan-card .mini-label,
.ritual-card .eyebrow,
.care-plan-card .eyebrow {
  color: rgba(238, 228, 214, 0.72);
}

.ritual-spotlight,
.guided-step-body {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ritual-theme {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-size: 1.18rem;
  line-height: 1.2;
}

.ritual-restart {
  width: 100%;
}

.history-current-panel {
  display: grid;
  gap: 10px;
}

.history-archive-heading {
  margin-top: 4px;
}

.history-current-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.history-current-head,
.history-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-current-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(196, 135, 66, 0.2);
  color: #f6eadb;
  font-size: 0.92rem;
  font-weight: 800;
}

.history-current-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-current-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--surface);
  font-size: 0.82rem;
  font-weight: 700;
}

.history-card {
  background: rgba(255, 255, 255, 0.06);
  color: var(--surface);
  border-color: rgba(255, 255, 255, 0.08);
}

.history-card p,
.history-card strong,
.history-card .history-meta {
  color: inherit;
}

.history-session-line {
  font-size: 0.84rem;
  color: rgba(238, 228, 214, 0.76);
}

.history-tag,
.chip,
.signal-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--surface-ink);
}

.ritual-card .history-tag,
.ritual-card .chip,
.care-plan-card .chip {
  background: rgba(255, 255, 255, 0.1);
  color: var(--surface);
}

.history-card.compact {
  gap: 8px;
}

.history-card.compact p {
  margin: 0;
}

.chip.soft {
  background: rgba(27, 35, 40, 0.08);
  color: var(--surface-soft);
}

.chip.warm {
  background: rgba(196, 135, 66, 0.14);
  color: #83511f;
}

.chip.accent {
  background: rgba(196, 135, 66, 0.18);
  color: #8a5a27;
}

.chip.bonus {
  background: rgba(166, 93, 78, 0.16);
  color: #8c493d;
}

body:not(.has-history) .ritual-card {
  display: none;
}

body:not(.has-snapshot) .sanctuary-column,
body:not(.has-snapshot) .companion-panel,
body:not(.has-snapshot) .nudge-panel,
body:not(.has-snapshot) .aftercare-panel {
  display: none;
}

body.session-live.has-snapshot .product-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 356px);
}

.welcome-stage {
  gap: 20px;
  padding: 4px 0 2px;
}

.welcome-copy {
  gap: 10px;
  max-width: 60ch;
}

.welcome-copy h2 {
  font-size: clamp(2.5rem, 5.2vw, 4.6rem);
  line-height: 0.94;
  color: var(--surface-ink);
  max-width: 10ch;
}

.subtitle {
  max-width: 42ch;
  color: var(--surface-soft);
}

.conversation-panel .conversation-topbar h2,
.welcome-copy h2,
.starter-section .section-head h3 {
  color: #162229;
}

.conversation-panel .conversation-topbar .eyebrow,
.welcome-copy .eyebrow,
.starter-section .eyebrow {
  color: #6d6256;
}

.welcome-copy .subtitle,
.starter-section .panel-subtitle,
.starter-section .summary-text {
  color: #46535a;
}

.welcome-note {
  color: #5c544c;
  font-weight: 600;
}

.language-disclaimer {
  max-width: 56ch;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(27, 35, 40, 0.045);
  color: #3d494d;
  border: 1px solid rgba(27, 35, 40, 0.09);
  font-size: 0.9rem;
  font-weight: 700;
}

.trust-item:nth-child(1) {
  background: rgba(53, 90, 95, 0.08);
  border-color: rgba(53, 90, 95, 0.16);
  color: #244248;
}

.trust-item:nth-child(2) {
  background: rgba(196, 135, 66, 0.12);
  border-color: rgba(196, 135, 66, 0.2);
  color: #7a4e21;
}

.trust-item:nth-child(3) {
  background: rgba(166, 93, 78, 0.1);
  border-color: rgba(166, 93, 78, 0.16);
  color: #7b4741;
}

.trust-item:nth-child(4) {
  background: rgba(91, 166, 128, 0.1);
  border-color: rgba(91, 166, 128, 0.16);
  color: #2f6a58;
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(196, 135, 66, 0.14);
  color: var(--amber);
  font-size: 0.72rem;
}

.starter-section {
  padding: 0;
}

.starter-deck {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.starter-card,
.nudge-card {
  padding: 18px;
  border-radius: 18px;
  background: #f6efe6;
  border: 1px solid rgba(27, 35, 40, 0.08);
  box-shadow: none;
}

.nudge-card.is-active {
  border-color: rgba(53, 90, 95, 0.26);
  background: #efe5d8;
  box-shadow: inset 0 0 0 1px rgba(53, 90, 95, 0.08);
}

.starter-card:hover,
.nudge-card:hover,
.history-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(53, 90, 95, 0.2);
}

.companion-panel {
  display: grid;
}

.companion-details {
  border-radius: 24px;
  background: #ede4d7;
  border: 1px solid rgba(27, 35, 40, 0.08);
  padding: 18px;
}

.companion-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
}

.companion-summary::-webkit-details-marker {
  display: none;
}

.companion-summary h3 {
  font-family: "Manrope", "Avenir Next", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--surface-ink);
}

.companion-summary-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.companion-grid,
.companion-footer,
.outcome-grid {
  display: grid;
  gap: 14px;
}

.companion-grid {
  margin-top: 16px;
  grid-template-columns: 1.35fr 1fr 1fr;
}

.companion-footer,
.outcome-grid {
  margin-top: 14px;
  grid-template-columns: 1.2fr 1fr;
}

.outcome-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.companion-card,
.outcome-card {
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid rgba(27, 35, 40, 0.08);
  display: grid;
  gap: 10px;
}

.companion-summary .eyebrow,
.companion-card .mini-label,
.companion-card .eyebrow,
.outcome-card .mini-label,
.composer-panel .mini-label,
.composer-panel .eyebrow,
.nudge-panel .mini-label,
.nudge-panel .eyebrow,
.aftercare-panel .mini-label,
.aftercare-panel .eyebrow {
  color: #5f5146;
}

.companion-summary h3,
.composer-panel .section-head h3,
.nudge-panel .section-head h3,
.aftercare-panel .section-head h3,
.aftercare-panel .next-step-title {
  color: var(--surface-ink);
}

.outcome-card strong {
  font-size: 1.9rem;
  line-height: 0.95;
  color: var(--surface-ink);
}

.score-scale-note {
  color: #40352d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.outcome-card .mini-label {
  font-weight: 800;
}

.outcome-card .summary-text {
  color: #4b423a;
  font-weight: 600;
}

.companion-card-primary {
  background: #f5ede1;
}

.companion-card-branches {
  margin-top: 14px;
}

.branch-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.branch-tab {
  border: 1px solid rgba(23, 39, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--surface-soft);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.branch-tab.is-active {
  background: rgba(12, 90, 97, 0.12);
  color: var(--sea);
  border-color: rgba(12, 90, 97, 0.18);
}

.branch-topic-map {
  margin-top: 2px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.branch-topic-map .topic-pill {
  align-items: flex-start;
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 18px;
  flex-direction: column;
}

.branch-topic-map .topic-pill strong {
  font-size: 0.84rem;
  line-height: 1.2;
}

.branch-topic-map .topic-pill span {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

.branch-topic-map .topic-pill small {
  font-size: 0.73rem;
  line-height: 1.35;
  color: rgba(52, 58, 62, 0.8);
}

.questionnaire-view {
  margin-top: 6px;
}

.questionnaire-groups {
  display: grid;
  gap: 12px;
}

.questionnaire-empty {
  border: 1px dashed rgba(23, 39, 44, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  color: #4f443c;
  padding: 16px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.questionnaire-section {
  border: 1px solid rgba(23, 39, 44, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 32px rgba(23, 39, 44, 0.06);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.questionnaire-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.questionnaire-section-head .mini-label {
  color: #5f5146;
  margin-bottom: 4px;
}

.questionnaire-section-head h4 {
  margin: 0;
  color: var(--surface-ink);
  font-size: 1rem;
  line-height: 1.2;
}

.questionnaire-item-list {
  display: grid;
  gap: 12px;
}

.questionnaire-item {
  border-radius: 18px;
  border: 1px solid rgba(23, 39, 44, 0.08);
  background: rgba(250, 247, 241, 0.92);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.questionnaire-item.resolved {
  border-color: rgba(12, 90, 97, 0.18);
  background: rgba(232, 245, 241, 0.86);
}

.questionnaire-item.partial,
.questionnaire-item.contradicted {
  border-color: rgba(184, 134, 11, 0.22);
  background: rgba(255, 247, 221, 0.88);
}

.questionnaire-item.review {
  border-color: rgba(155, 49, 49, 0.18);
  background: rgba(255, 239, 239, 0.88);
}

.questionnaire-item.unresolved {
  border-style: dashed;
}

.questionnaire-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.questionnaire-item-code {
  color: #66584c;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.questionnaire-answer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #53463d;
  background: rgba(88, 75, 63, 0.1);
}

.questionnaire-answer-pill.resolved {
  color: #0f605f;
  background: rgba(12, 90, 97, 0.12);
}

.questionnaire-answer-pill.partial,
.questionnaire-answer-pill.contradicted {
  color: #8d6210;
  background: rgba(184, 134, 11, 0.16);
}

.questionnaire-answer-pill.review {
  color: #8c2e2e;
  background: rgba(155, 49, 49, 0.14);
}

.questionnaire-answer-pill.unresolved {
  color: #5d5046;
  background: rgba(93, 80, 70, 0.11);
}

.questionnaire-question {
  margin: 0;
  color: var(--surface-ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.questionnaire-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(88, 75, 63, 0.08);
  color: #584b3f;
  border: 1px solid rgba(88, 75, 63, 0.08);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.answer-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0c5a61, #1e7a77);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(12, 90, 97, 0.22);
}

.answer-chip.is-muted {
  opacity: 0.7;
}

.questionnaire-note,
.questionnaire-evidence {
  margin: 0;
  color: #4d433b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.questionnaire-note {
  font-weight: 600;
}

.questionnaire-evidence {
  color: #67584d;
  font-style: italic;
}

@media (max-width: 720px) {
  .questionnaire-section {
    padding: 14px;
  }

  .questionnaire-section-head {
    flex-direction: column;
  }
}

.signals-card .bonus-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-banner {
  border-radius: 18px;
  background: rgba(53, 90, 95, 0.08);
  color: var(--sea);
}

.chat-stage {
  min-height: 400px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(22, 29, 34, 0.98), rgba(17, 23, 27, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
}

.chat-log {
  min-height: 400px;
  max-height: 50vh;
  padding: 20px;
  gap: 16px;
}

.empty-chat-card {
  background: rgba(245, 237, 225, 0.12);
  border: 1px solid rgba(245, 237, 225, 0.12);
  color: var(--surface);
  box-shadow: none;
}

.empty-chat-card .summary-text,
.empty-chat-card .eyebrow,
.empty-chat-card h3 {
  color: inherit;
}

.speaker {
  color: rgba(238, 228, 214, 0.54);
}

.bubble {
  max-width: min(82%, 720px);
  padding: 17px 18px;
  box-shadow: none;
}

.message.assistant .bubble,
.message.system .bubble {
  background: #f1e8da;
  color: var(--surface-ink);
}

.message.user .bubble {
  background: #355a5f;
  color: #fff8f2;
}

.message.system .bubble {
  background: rgba(166, 93, 78, 0.16);
  color: #ffdfd7;
}

.nudge-panel,
.composer-panel,
.aftercare-panel {
  background: #f1e8da;
}

.nudge-panel {
  gap: 12px;
}

.nudge-quest {
  display: grid;
  gap: 10px;
}

.nudge-quest-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nudge-quest-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(27, 35, 40, 0.045);
  border: 1px solid rgba(27, 35, 40, 0.08);
  color: var(--surface-soft);
}

.nudge-quest-chip.active {
  background: rgba(53, 90, 95, 0.08);
  border-color: rgba(53, 90, 95, 0.22);
  color: var(--sea);
}

.nudge-quest-chip.done {
  background: rgba(196, 135, 66, 0.12);
  border-color: rgba(196, 135, 66, 0.18);
  color: #7a4e21;
}

.nudge-quest-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(27, 35, 40, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.nudge-quest-copy {
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 700;
}

.nudge-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(27, 35, 40, 0.08);
  overflow: hidden;
}

.nudge-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a65d4e 0%, #c48742 48%, #355a5f 100%);
  transition: width 220ms ease;
}

.composer-panel {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 12px;
  box-shadow: var(--shadow-lg);
}

body.session-live .composer-panel {
  box-shadow: var(--shadow-lg);
}

.chat-stage + .composer-panel {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.conversation-mode {
  background: linear-gradient(160deg, #1d262c 0%, #141b20 100%);
  color: #f5ede1;
  box-shadow: none;
  padding: 14px 16px;
}

.call-state-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(27, 35, 40, 0.06);
  border: 1px solid rgba(27, 35, 40, 0.08);
}

.call-state-copy {
  display: grid;
  gap: 8px;
}

.conversation-topbar h2,
.section-head h3,
.conversation-mode-copy h3,
.next-step-title {
  font-family: "Manrope", "Avenir Next", sans-serif;
  letter-spacing: -0.02em;
}

.conversation-mode-copy h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
  max-width: none;
}

.conversation-mode-rail {
  display: none;
}

#messageInput {
  min-height: 108px;
}

.voice-language-note {
  max-width: 52ch;
}

body.voice-disabled-language .conversation-mode,
body.voice-disabled-language .call-state-card,
body.voice-disabled-language .voice-cluster,
body.voice-disabled-language .voice-toggles,
body.voice-disabled-language #composerQuickMic {
  display: none !important;
}

body.voice-disabled-language .composer-toolbar {
  justify-content: flex-end;
}

body.voice-disabled-language .send-button {
  margin-left: 0;
}

.voice-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  width: fit-content;
}

.voice-state-pill.idle {
  background: rgba(27, 35, 40, 0.08);
  color: var(--surface-soft);
}

.voice-state-pill.listening {
  background: rgba(53, 90, 95, 0.14);
  color: var(--sea);
}

.voice-state-pill.thinking {
  background: rgba(196, 135, 66, 0.18);
  color: #895623;
}

.voice-state-pill.speaking {
  background: rgba(166, 93, 78, 0.18);
  color: #8c493d;
}

.voice-state-pill.error {
  background: rgba(145, 89, 82, 0.16);
  color: var(--rose);
}

.voice-preview {
  background: rgba(53, 90, 95, 0.08);
  border: 1px solid rgba(53, 90, 95, 0.14);
}

.aftercare-panel {
  overflow: visible;
}

.aftercare-panel::after {
  display: none;
}

.next-step-title {
  font-size: 1.18rem;
  color: var(--surface);
}

.next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guided-step-body {
  color: rgba(238, 228, 214, 0.82);
  line-height: 1.62;
}

.conversation-footer {
  justify-content: space-between;
  color: var(--surface-soft);
}

.button {
  border-radius: 18px;
}

.button.primary {
  background: #a65d4e;
  box-shadow: 0 12px 22px rgba(166, 93, 78, 0.24);
}

.button.secondary,
.button.ghost,
.button.ghost-link,
.button.subtle {
  background: rgba(27, 35, 40, 0.05);
  border: 1px solid rgba(27, 35, 40, 0.1);
  color: var(--surface-ink);
}

.button.emergency-link,
.emergency-link {
  background: #c48742;
  color: #fff7ef;
  box-shadow: 0 14px 24px rgba(166, 93, 78, 0.22);
}

.emergency-kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ef;
}

body.lang-hi .brand-copy h1,
body.lang-hi .welcome-copy h2,
body.lang-hi .section-head h3,
body.lang-hi .conversation-topbar h2,
body.lang-hi .companion-summary h3,
body.lang-hi .conversation-mode-copy h3,
body.lang-hi .next-step-title {
  font-family: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

@media (max-width: 1180px) {
  body.session-live.has-snapshot .product-grid {
    grid-template-columns: 1fr;
  }

  .companion-grid,
  .companion-footer,
  .outcome-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .welcome-copy h2 {
    max-width: none;
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .trust-strip,
  .next-step-actions,
  .voice-preview-actions,
  .call-state-card,
  .companion-summary-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .nudge-quest-track {
    grid-template-columns: 1fr;
  }

  .chat-log {
    min-height: 320px;
  }

  .bubble {
    max-width: 92%;
  }

  .composer-panel {
    bottom: 0;
    margin-top: 10px;
  }
}
