/*
 * ConvoMind Flagship Marketing Stylesheet — Acoustic Tonal Material
 * Unified with the Portal & Operations Console design language:
 *   - Clean Daylight Studio & Midnight Studio tonal canvases (zero muddy dark washes)
 *   - Vector-sharp interactive Clarity Summary Studio & Knowledge Recall Studio
 *   - Preserves approved metric iPhone handheld geometry, WCAG AA >= 4.5, and regional support/full modes
 */

:root {
  --bg: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --blue: #2563eb;
  --purple: #5b52f5;
  --tint: #e7f0ff;
  --surface: #f4f7fc;
  --line: rgba(15, 23, 42, 0.08);
  --editorial-rule: rgba(15, 23, 42, 0.08);

  /* Clean Daylight Studio Chapter Canvases */
  --scene-0: #edf3ff;
  --scene-1: #eaf5f3;
  --scene-2: #f1efff;
  --scene-3: #ebf3fa;
  --feature-lilac: #f3f6fc;
  --feature-mint: #eef4f9;
  --feature-neutral: #ffffff;
  --plans-bg: #eef3f9;

  --card-surface: #ffffff;
  --card-well: #f4f7fc;
  --card-border: rgba(15, 23, 42, 0.08);
  --card-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 12px 32px -8px rgba(15, 23, 42, 0.07),
    0 28px 56px -18px rgba(15, 23, 42, 0.06);
  --card-shadow-sm:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 6px 18px -4px rgba(15, 23, 42, 0.06);
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-purple: #6366f1;
  --brand-teal: #0f766e;
  --brand-amber: #b45309;
  --ease-m3: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme=dark] {
  --bg: #0b0e14;
  --ink: #f8fafc;
  --muted: #b3c0d4;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --tint: rgba(59, 130, 246, 0.18);
  --surface: #141923;
  --line: rgba(255, 255, 255, 0.09);
  --editorial-rule: rgba(255, 255, 255, 0.09);

  /* Crisp Midnight Studio Canvases (replaces muddy legacy dark tints) */
  --scene-0: #0d1322;
  --scene-1: #0c171b;
  --scene-2: #121222;
  --scene-3: #0d1521;
  --feature-lilac: #0e131e;
  --feature-mint: #0b111a;
  --feature-neutral: #0b0e14;
  --plans-bg: #101521;

  --card-surface: #141923;
  --card-well: #1b2232;
  --card-border: rgba(255, 255, 255, 0.09);
  --card-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 54px -14px rgba(0, 0, 0, 0.62);
  --card-shadow-sm:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px -8px rgba(0, 0, 0, 0.45);
  --brand-primary: #60a5fa;
  --brand-primary-hover: #93c5fd;
  --brand-purple: #a78bfa;
  --brand-teal: #2dd4bf;
  --brand-amber: #fbbf24;
}

/* Remove muddy low-contrast studio.png film on feature sections */
.feature-section::before {
  opacity: 0 !important;
  display: none !important;
}

/* ==========================================================================
   Header Navigation (Solid surface for deterministic WCAG AA >= 4.5 contrast)
   ========================================================================== */

.site-header {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--editorial-rule);
}

#navigation {
  gap: 4px;
}

#navigation > a.nav-anchor {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  margin-right: 0;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 540;
  color: var(--muted);
  transition: color 200ms var(--ease-m3), background-color 200ms var(--ease-m3);
}

#navigation > a.nav-anchor:hover {
  color: var(--ink);
  background: var(--surface);
}

#navigation > a.marketing-account {
  color: var(--blue);
  font-weight: 620;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent);
  background: var(--tint);
  padding: 0 15px;
  margin-left: 6px;
  margin-right: 6px;
  font-size: 13px;
  transition: background-color 200ms var(--ease-m3), transform 200ms var(--ease-m3);
}

#navigation > a.marketing-account:hover {
  background: color-mix(in srgb, var(--blue) 18%, transparent);
  transform: translateY(-1px);
  text-decoration: none;
}

.site-header .icon-button {
  border-radius: 999px;
  transition: background-color 180ms var(--ease-m3), color 180ms var(--ease-m3);
}

.site-header .icon-button:hover {
  background: var(--surface);
}

.feature-link:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-header :is(a, button):focus-visible {
  outline-width: 2px;
  outline-offset: 2px;
}

/* ==========================================================================
   Hero — Acoustic Tonal Studio Entrance
   ========================================================================== */

@keyframes heroWaveBar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.65; }
  50% { transform: scaleY(1); opacity: 1; }
}

.hero {
  position: relative;
  padding-top: 52px;
  padding-bottom: 42px;
  background-color: var(--scene-0);
  background-image:
    radial-gradient(ellipse 68% 64% at 50% 0%, color-mix(in srgb, var(--brand-primary) 13%, transparent), transparent 68%),
    radial-gradient(ellipse 46% 52% at 82% 28%, color-mix(in srgb, var(--brand-purple) 10%, transparent), transparent 65%);
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.hero-platforms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  margin: 0 auto 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--card-shadow-sm);
}

.hero-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
  color: var(--brand-primary);
}

.hero-wave span {
  display: block;
  width: 2.5px;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  animation: heroWaveBar 1.8s var(--ease-m3) infinite;
}
.hero-wave span:nth-child(1) { height: 55%; animation-delay: 0s; }
.hero-wave span:nth-child(2) { height: 95%; animation-delay: 0.2s; }
.hero-wave span:nth-child(3) { height: 100%; animation-delay: 0.4s; }
.hero-wave span:nth-child(4) { height: 75%; animation-delay: 0.6s; }
.hero-wave span:nth-child(5) { height: 48%; animation-delay: 0.8s; }

.wordmark {
  font-weight: 660;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.hero h1 {
  font-weight: 740;
  letter-spacing: -0.035em;
}

.hero-promise {
  font-weight: 620;
  letter-spacing: -0.02em;
}

.hero-purpose {
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-cta-primary,
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  transition: transform 220ms var(--ease-m3), box-shadow 220ms var(--ease-m3), background-color 200ms var(--ease-m3), border-color 200ms var(--ease-m3);
}

.hero-cta-primary {
  background: linear-gradient(135deg, #2563eb 0%, #5b52f5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 24px -6px rgba(37, 99, 235, 0.46);
}

.hero-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 30px -6px rgba(37, 99, 235, 0.54);
}

.hero-cta-secondary {
  background: var(--card-surface);
  color: var(--ink);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow-sm);
}

.hero-cta-secondary:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, transparent);
  transform: translateY(-2px);
}

.hero-cta-primary svg,
.hero-cta-secondary svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   Shared Feature Chapter Headings & Eyebrow Pills
   ========================================================================== */

.feature-section {
  padding: 108px 0;
}

.feature-section h2,
.outro h2 {
  font-weight: 710;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.feature-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  justify-self: start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 650;
  margin-bottom: 18px;
}

.personal-heading > .feature-eyebrow,
.plans-heading > .feature-eyebrow {
  justify-self: center;
  margin-inline: auto;
}

.feature-eyebrow svg {
  width: 15px;
  height: 15px;
}

.feature-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 620;
  margin-top: 20px;
}

/* ==========================================================================
   Chapter 1: Interactive Clarity Summary Studio (Vector-Sharp Retina Craft)
   ========================================================================== */

.clarity-section {
  background-color: var(--feature-lilac);
  background-image: radial-gradient(ellipse 64% 60% at 86% 24%, color-mix(in srgb, var(--brand-primary) 9%, transparent), transparent 65%);
}

.clarity-layout {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 56px;
  align-items: center;
  margin-top: 52px;
}

.clarity-triggers {
  display: grid;
  gap: 12px;
}

.clarity-point {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background-color 240ms var(--ease-m3), border-color 240ms var(--ease-m3), box-shadow 240ms var(--ease-m3), transform 240ms var(--ease-m3);
}

.clarity-point:hover {
  background: color-mix(in srgb, var(--card-surface) 70%, transparent);
}

.clarity-point.is-active {
  background: var(--card-surface);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow-sm);
  transform: translateX(4px);
}

.point-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.point-icon svg {
  width: 20px;
  height: 20px;
}

.point-icon.blue { background: var(--tint); color: var(--blue); }
.point-icon.amber { background: rgba(245, 158, 11, 0.14); color: var(--brand-amber); }
.point-icon.teal { background: rgba(15, 118, 110, 0.14); color: var(--brand-teal); }

.clarity-point > span:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.clarity-point strong {
  font-size: 16.5px;
  font-weight: 660;
  color: var(--ink);
  line-height: 1.4;
}

.clarity-point > span:last-child > span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* Shared L1 Floating Studio Board (Clarity & Memory) */
.studio-board {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 24px 24px 22px;
  box-shadow: var(--card-shadow);
  min-width: 0;
}

.studio-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--editorial-rule);
}

.studio-title-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.studio-title-group strong {
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.studio-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 650;
}

.studio-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card-well);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.studio-blocks {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.studio-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card-well);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 240ms var(--ease-m3), border-color 240ms var(--ease-m3), box-shadow 240ms var(--ease-m3), transform 240ms var(--ease-m3), opacity 240ms var(--ease-m3);
}

.clarity-board[data-active-focus] .studio-card:not(.is-highlighted) {
  opacity: 0.72;
}

.studio-card.is-highlighted {
  opacity: 1;
  background: var(--card-surface);
  border-color: color-mix(in srgb, var(--blue) 42%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 10%, transparent), var(--card-shadow-sm);
  transform: translateY(-1px);
}

.studio-card header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.studio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.studio-dot.blue { background: var(--blue); }
.studio-dot.amber { background: var(--brand-amber); }
.studio-dot.teal { background: var(--brand-teal); }

.studio-card h3 {
  font-size: 13.5px;
  font-weight: 660;
  color: var(--ink);
}

.studio-time-tag {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--card-well);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.studio-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.studio-card li,
.studio-card > p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.studio-action-list {
  display: grid;
  gap: 8px;
}

.studio-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 180ms var(--ease-m3), background-color 180ms var(--ease-m3);
}

.studio-action-item:hover {
  border-color: color-mix(in srgb, var(--brand-teal) 45%, transparent);
}

.studio-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: background-color 180ms var(--ease-m3), border-color 180ms var(--ease-m3), color 180ms var(--ease-m3);
}

.studio-check svg {
  width: 12px;
  height: 12px;
}

.studio-action-item.is-checked .studio-check {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #ffffff;
}

:root[data-theme=dark] .studio-action-item.is-checked .studio-check {
  color: #04201e;
}

.studio-action-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.studio-action-item.is-checked .studio-action-copy {
  text-decoration: line-through;
  color: var(--muted);
}

.studio-owner-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--card-well);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.studio-audio-bar {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 999px;
  background: var(--card-well);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.studio-play-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.studio-play-dot svg {
  width: 14px;
  height: 14px;
}

.studio-audio-label {
  color: var(--muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-audio-time {
  color: var(--ink);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ==========================================================================
   Chapter 2: Interactive Cross-Session Knowledge & Recall Studio
   ========================================================================== */

.memory-section {
  background-color: var(--feature-mint);
  background-image: radial-gradient(ellipse 62% 58% at 16% 24%, color-mix(in srgb, var(--brand-purple) 9%, transparent), transparent 64%);
}

.memory-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  margin-top: 52px;
}

.mem-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mem-stat {
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--card-well);
  display: grid;
  gap: 2px;
}

.mem-num {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mem-stat span {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 540;
}

.mem-search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--card-well);
  border: 1px solid var(--card-border);
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.mem-search-shell svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
}

.mem-search-query {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mem-kbd {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.mem-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.mem-pill {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-well);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 580;
  cursor: pointer;
  transition: background-color 180ms var(--ease-m3), color 180ms var(--ease-m3), border-color 180ms var(--ease-m3);
}

.mem-pill:hover {
  color: var(--ink);
}

.mem-pill.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  font-weight: 640;
}

:root[data-theme=dark] .mem-pill.is-active {
  color: #081224;
}

.mem-cards {
  display: grid;
  gap: 10px;
}

.mem-card {
  padding: 15px 17px;
  border-radius: 18px;
  background: var(--card-well);
  border: 1px solid var(--card-border);
  transition: transform 200ms var(--ease-m3), border-color 200ms var(--ease-m3);
}

.mem-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--blue) 35%, transparent);
}

.mem-card[hidden] {
  display: none;
}

.mem-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.mem-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.mem-tag.purple { background: color-mix(in srgb, var(--brand-purple) 15%, transparent); color: var(--purple); }
.mem-tag.blue { background: var(--tint); color: var(--blue); }
.mem-tag.teal { background: rgba(15, 118, 110, 0.14); color: var(--brand-teal); }

.mem-date {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mem-card h3 {
  font-size: 14.5px;
  font-weight: 660;
  color: var(--ink);
  margin-bottom: 5px;
}

.mem-card p {
  font-size: 13px;
  line-height: 1.62;
  color: var(--muted);
}

.mem-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--blue);
}

.mem-source svg {
  width: 13px;
  height: 13px;
}

.mem-card-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mem-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mem-person-body {
  flex: 1;
  min-width: 0;
}

.mem-person-body strong {
  font-size: 14px;
  color: var(--ink);
}

/* Right editorial quote & reasons */
.memory-highlight {
  padding: 28px 28px 26px;
  border-radius: 24px;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow-sm);
}

.memory-highlight > svg {
  color: var(--blue);
  margin-bottom: 16px;
}

.memory-highlight > p {
  color: var(--ink);
  letter-spacing: -0.025em;
}

.memory-reasons {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--editorial-rule);
}

.memory-reasons > p {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 540;
}

/* ==========================================================================
   Chapter 3: Capabilities & Privacy Bento Grid
   ========================================================================== */

.personal-section {
  background: var(--feature-neutral);
}

.personal-grid.personal-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.personal-grid.personal-grid-4 article {
  border: 1px solid var(--card-border);
  border-radius: 26px;
  padding: 30px 28px 32px;
  background: var(--card-well);
  box-shadow: none;
  transition: transform 260ms var(--ease-m3), border-color 260ms var(--ease-m3), background-color 260ms var(--ease-m3), box-shadow 260ms var(--ease-m3);
}

.personal-grid.personal-grid-4 article:hover {
  transform: translateY(-3px);
  background: var(--card-surface);
  border-color: color-mix(in srgb, var(--blue) 36%, var(--card-border));
  box-shadow: var(--card-shadow-sm);
}

.personal-grid .feature-icon {
  border-radius: 14px;
  width: 48px;
  height: 48px;
}

.personal-grid p {
  max-width: 100%;
  text-wrap: pretty;
}

/* ==========================================================================
   Chapter 4: Plans & Entitlements Comparison Deck
   ========================================================================== */

.plans-section {
  background: var(--plans-bg);
}

.plans-heading {
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

.plans-heading .feature-eyebrow {
  justify-content: center;
}

.plans-heading > p:last-child {
  font-size: 16px;
  color: var(--muted);
  margin: 18px auto 0;
  line-height: 1.8;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border-radius: 28px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  box-shadow: var(--card-shadow-sm);
  min-width: 0;
  transition: transform 280ms var(--ease-m3), box-shadow 280ms var(--ease-m3);
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
}

.plan-card-featured {
  position: relative;
  border-color: color-mix(in srgb, var(--brand-primary) 46%, transparent);
  background-image: radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in srgb, var(--brand-primary) 10%, transparent), transparent 65%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand-primary) 18%, transparent),
    0 20px 44px -14px rgba(37, 99, 235, 0.22);
}

:root[data-theme=dark] .plan-card-featured {
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.34),
    0 24px 52px -14px rgba(0, 0, 0, 0.65);
}

.plan-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--editorial-rule);
}

.plan-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--card-well);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 620;
  margin-bottom: 14px;
}

.plan-tag.featured {
  background: var(--tint);
  color: var(--blue);
}

.plan-head h3 {
  font-size: 28px;
  font-weight: 720;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.plan-head p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.plan-list {
  list-style: none;
  padding: 20px 0 0;
  margin: 0;
  display: grid;
  gap: 13px;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}

.plan-list svg {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--blue);
  flex-shrink: 0;
}

.plans-store-note {
  margin-top: 28px;
  padding: 22px 26px;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.plans-store-note svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--blue);
  flex-shrink: 0;
}

.plans-store-note strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}

.plans-store-note p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ==========================================================================
   Outro & Footer
   ========================================================================== */

.outro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.outro-actions .workspace-entry {
  margin-top: 0;
  border-radius: 999px;
  padding: 10px 24px;
}

.outro-help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 180ms var(--ease-m3), color 180ms var(--ease-m3), transform 180ms var(--ease-m3);
}

.outro-help-link:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, transparent);
  color: var(--blue);
  transform: translateY(-1px);
}

.outro-help-link svg {
  width: 16px;
  height: 16px;
}

.site-footer,
.site-footer > p {
  font-size: 12px;
}

/* ==========================================================================
   Responsive Breakpoints (320px -> 1440px, Zero Horizontal Overflow)
   ========================================================================== */

@media (min-width: 761px) {
  .personal-grid p {
    font-size: 15px;
    margin-top: 10px;
  }
}

@media (max-width: 1020px) {
  .clarity-layout,
  .memory-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .plans-grid {
    grid-template-columns: 1fr;
  }
  #navigation > a.nav-anchor {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 32px;
    padding-bottom: 30px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin-inline: auto;
  }
  .studio-board {
    padding: 18px 16px;
    border-radius: 22px;
  }
  .studio-audio-label {
    white-space: normal;
  }
  .clarity-point {
    padding: 14px;
    border-radius: 18px;
  }
  .clarity-point.is-active {
    transform: none;
  }
  .mem-stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .mem-stat {
    padding: 10px 10px;
  }
  .mem-num {
    font-size: 18px;
  }
  .personal-grid.personal-grid-4 {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 32px;
  }
  .personal-grid.personal-grid-4 article {
    padding: 20px;
    border-radius: 20px;
  }
  .personal-grid p {
    font-size: 14px;
    margin-top: 6px;
  }
  .plans-store-note {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wave span {
    animation: none;
  }
  .hero-cta-primary,
  .hero-cta-secondary,
  .clarity-point,
  .studio-card,
  .mem-card,
  .personal-grid.personal-grid-4 article,
  .plan-card {
    transition: none;
    transform: none;
  }
}


/* ==========================================================================
   UNIFIED MODERN STUDIO LAYER — homepage
   Crisp architectural light & deep obsidian-slate dark canvases with real
   chapter transitions, 100% unified modern sans typography, natural scroll
   flow (zero 330svh sticky dead-zone), uniform right-side cards, frosted
   chapter pill bar, and structured 2-row footer.
   The iPhone handheld geometry invariants are 100% preserved.
   ========================================================================== */

:root {
  --bg: #f8f9fb;
  --ink: #111318;
  --muted: #555c68;
  --blue: #2554e8;
  --purple: #4f46e5;
  --tint: #e8efff;
  --surface: #eff2f7;
  --line: rgba(15, 23, 42, 0.09);
  --editorial-rule: rgba(15, 23, 42, 0.09);

  /* Subtle, cohesive light chapter tones */
  --scene-0: #f3f6fc;
  --scene-1: #eef6f4;
  --scene-2: #f4f2fc;
  --scene-3: #eff4fa;
  --feature-lilac: #f5f6fb;
  --feature-mint: #f0f5f7;
  --feature-neutral: #f8f9fb;
  --plans-bg: #f2f4f8;

  --card-surface: #ffffff;
  --card-well: #f3f5f9;
  --card-border: rgba(15, 23, 42, 0.09);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -14px rgba(15, 23, 42, 0.09);
  --card-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --brand-primary: #2554e8;
  --brand-primary-hover: #1c44c7;
  --brand-purple: #4f46e5;
  --brand-teal: #0f766e;
  --brand-amber: #b45309;
  --sans: Sora, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  --serif: var(--sans);
}

:root[data-theme=dark] {
  --bg: #0c0e13;
  --ink: #f3f5f8;
  --muted: #a6b0c2;
  --blue: #6e9bff;
  --purple: #9b8cff;
  --tint: rgba(110, 155, 255, 0.16);
  --surface: #181d28;
  --line: rgba(255, 255, 255, 0.1);
  --editorial-rule: rgba(255, 255, 255, 0.1);

  /* Rich Obsidian Studio dark chapter transitions (clearly distinct, never muddy brown) */
  --scene-0: #0e1424;
  --scene-1: #0c1a1c;
  --scene-2: #151226;
  --scene-3: #0e1622;
  --feature-lilac: #121520;
  --feature-mint: #0e151a;
  --feature-neutral: #0c0e13;
  --plans-bg: #11151f;

  --card-surface: #161b26;
  --card-well: #1e2433;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 44px -18px rgba(0, 0, 0, 0.65);
  --card-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --brand-primary: #6e9bff;
  --brand-primary-hover: #90b4ff;
  --brand-purple: #9b8cff;
  --brand-teal: #34d399;
  --brand-amber: #fbbf24;
}

body {
  font-family: var(--sans);
}

/* Header: unified sans typography and crisp hairline */
.site-header { background: var(--bg); box-shadow: 0 1px 0 var(--editorial-rule); }
#navigation > a.nav-anchor { border-radius: 8px; font-family: var(--sans); }
#navigation > a.marketing-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 630;
  letter-spacing: -0.005em;
  padding: 0 6px 0 18px;
  margin-left: 8px;
  margin-right: 10px;
  transition: color 180ms var(--ease-m3);
}
#navigation > a.marketing-account::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--editorial-rule);
}
#navigation > a.marketing-account::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 6px;
  bottom: 9px;
  height: 1.5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 42%, transparent);
  transition: background-color 180ms var(--ease-m3), transform 180ms var(--ease-m3);
  transform-origin: center;
}
#navigation > a.marketing-account svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  transition: transform 200ms var(--ease-m3);
}
#navigation > a.marketing-account:hover {
  background: transparent;
  color: var(--blue);
  transform: none;
  text-decoration: none;
}
#navigation > a.marketing-account:hover::after {
  background: var(--blue);
  transform: scaleX(1.04);
}
#navigation > a.marketing-account:hover svg {
  transform: translate(2px, -2px);
}
.site-header .icon-button { border-radius: 8px; }
.brand strong { font-family: var(--sans); font-weight: 660; font-size: 16px; letter-spacing: -0.02em; }

/* Hero: calm, pure editorial entrance without button clutter */
.hero {
  background-color: var(--scene-0);
  background-image: radial-gradient(ellipse 70% 60% at 50% 0%, color-mix(in srgb, var(--blue) 9%, transparent), transparent 68%);
  padding-top: 56px;
  padding-bottom: 44px;
}
:root[data-theme=dark] .hero {
  background-image: radial-gradient(ellipse 72% 65% at 50% 0%, rgba(110, 155, 255, 0.14), transparent 70%);
}
.hero-platforms {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11.5px;
}
.wordmark { font-family: var(--sans); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 620; font-size: 13px; }
.hero h1,
.chapter-copy h2,
.feature-section h2,
.outro h2,
.plan-head h3,
.memory-highlight > p {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero h1 { font-size: 68px; line-height: 1.12; }
.hero-promise { font-family: var(--sans); font-weight: 560; letter-spacing: -0.015em; }

/* Natural-flow showcase: zero 330svh scroll-trap, generous headroom above iPhone */
.story-track,
body[data-static=true] .story-track {
  height: auto !important;
  min-height: 0;
}
.story-stage {
  position: relative !important;
  top: 0 !important;
  height: 760px !important;
  min-height: 740px !important;
  transition: background-color 0.45s ease;
}
:root[data-theme=dark] .story-stage {
  background-image: radial-gradient(ellipse 65% 55% at 50% 38%, rgba(110, 155, 255, 0.1), transparent 72%);
}
:root[data-theme=dark] .story-stage[data-step="1"] {
  background-image: radial-gradient(ellipse 65% 55% at 50% 38%, rgba(45, 212, 191, 0.1), transparent 72%);
}
:root[data-theme=dark] .story-stage[data-step="2"] {
  background-image: radial-gradient(ellipse 65% 55% at 50% 38%, rgba(155, 140, 255, 0.11), transparent 72%);
}
:root[data-theme=dark] .story-stage[data-step="3"] {
  background-image: radial-gradient(ellipse 65% 55% at 50% 38%, rgba(96, 165, 250, 0.1), transparent 72%);
}

/* Generous air above the phone bezel so it never touches the top header */
:root {
  --device-top: 46px;
  --phone-h: min(544px, calc(100svh - 240px));
}
.handheld .device-screen {
  background: #111318;
}
.story-controls {
  top: calc(var(--device-top) + var(--phone-h) + 26px);
}

/* Light, refined frosted chapter pill (replaces stark black remote bar) */
.chapter-tabs {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
  box-shadow: 0 6px 22px -8px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chapter-tabs > button {
  border-radius: 10px;
  color: var(--muted);
  font-weight: 560;
  transition: background-color 180ms ease, color 180ms ease;
}
.chapter-tabs > button:hover {
  color: var(--ink);
  background: var(--surface);
}
.chapter-tabs > button[aria-selected=true] {
  background: var(--ink);
  color: #ffffff;
}
:root[data-theme=dark] .chapter-tabs {
  background: rgba(24, 29, 40, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.55);
}
:root[data-theme=dark] .chapter-tabs > button {
  color: #a6b0c2;
}
:root[data-theme=dark] .chapter-tabs > button:hover {
  color: #f3f5f8;
  background: rgba(255, 255, 255, 0.06);
}
:root[data-theme=dark] .chapter-tabs > button[aria-selected=true] {
  background: var(--blue);
  color: #09132b;
  font-weight: 640;
}
.chapter-kind { letter-spacing: 0.08em; }

/* Unified right-side context cards across all 4 chapters (zero white-vs-wireframe mismatch) */
.scene-drawing { display: none !important; }
.context-cluster,
.context-cluster[data-context="0"],
.context-cluster[data-context="1"],
.context-cluster[data-context="2"],
.context-cluster[data-context="3"] {
  top: 158px !important;
  left: calc(50% + 220px);
  width: 264px;
}
.context-cluster .context-artifact,
.context-cluster .context-artifact.quiet,
.context-cluster[data-context="1"] .context-artifact {
  position: relative;
  padding: 16px 18px !important;
  border-radius: 12px !important;
  border: 1px solid var(--card-border) !important;
  background: var(--card-surface) !important;
  box-shadow: var(--card-shadow-sm) !important;
  margin-left: 0 !important;
}
.context-cluster[data-context="1"] .context-artifact::before {
  display: none !important;
}
.context-cluster .context-artifact + .context-artifact,
.context-cluster[data-context="1"] .context-artifact + .context-artifact,
.context-cluster[data-context="2"] .context-artifact + .context-artifact {
  margin-top: 14px !important;
  margin-left: 0 !important;
}
.context-cluster .context-artifact > header {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.context-cluster .context-artifact > p {
  font-size: 14px !important;
  font-weight: 450;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 8px;
}

/* Section eyebrows & headings */
.feature-eyebrow {
  padding: 0;
  background: transparent;
  border-radius: 0;
  gap: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--blue);
}
.feature-eyebrow::before { content: ""; width: 24px; height: 1.5px; background: currentColor; }
.feature-eyebrow svg { display: none; }
.feature-section h2 { font-size: 42px; line-height: 1.28; }
.feature-section { padding: 104px 0; }
.feature-section::before { display: none !important; }
.clarity-section, .memory-section { background-image: none; }
.personal-section, .plans-section { border-top: 1px solid var(--editorial-rule); }
:root[data-theme=dark] .clarity-section { background: var(--feature-lilac); border-top: 1px solid var(--editorial-rule); }
:root[data-theme=dark] .memory-section { background: var(--feature-mint); border-top: 1px solid var(--editorial-rule); }
:root[data-theme=dark] .personal-section { background: var(--feature-neutral); }
:root[data-theme=dark] .plans-section { background: var(--plans-bg); }

/* Interactive studios: crisp architectural cards */
.studio-board { border-radius: 16px; box-shadow: var(--card-shadow); padding: 24px; border: 1px solid var(--card-border); }
.studio-pill-live, .studio-meta-chip, .studio-time-tag, .studio-owner-pill, .mem-tag { border-radius: 6px; }
.studio-card { border-radius: 10px; }
.studio-card.is-highlighted { box-shadow: none; transform: none; border-color: var(--blue); }
.studio-title-group strong { font-family: var(--sans); font-weight: 650; font-size: 17px; }
.studio-action-item { border-radius: 8px; }
.studio-audio-bar { border-radius: 10px; }
.studio-play-dot { border-radius: 8px; background: var(--blue); color: #ffffff; }
:root[data-theme=dark] .studio-play-dot { color: #09132b; }
.clarity-point { border-radius: 10px; }
.clarity-point.is-active { transform: none; box-shadow: none; border-color: var(--blue); }
.clarity-point strong { font-family: var(--sans); font-weight: 640; }
.point-icon, .feature-icon { border-radius: 8px; }
.mem-stat { border-radius: 10px; }
.mem-num { font-family: var(--sans); font-weight: 700; font-size: 26px; font-variant-numeric: tabular-nums; }
.mem-search-shell { border-radius: 10px; }
.mem-pill { border-radius: 8px; }
.mem-pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.mem-card { border-radius: 12px; box-shadow: none; }
.mem-card h3 { font-family: var(--sans); font-weight: 640; }
.mem-avatar { border-radius: 10px; }
.memory-highlight > p { font-size: 32px; }

.personal-grid.personal-grid-4 { gap: 0; border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; background: var(--card-surface); }
.personal-grid.personal-grid-4 article {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 32px 32px 34px;
}
.personal-grid.personal-grid-4 article:nth-child(odd) { border-right: 1px solid var(--card-border); }
.personal-grid.personal-grid-4 article:nth-child(-n+2) { border-bottom: 1px solid var(--card-border); }
.personal-grid.personal-grid-4 article:hover { transform: none; border-color: var(--card-border); }
.personal-grid h3 { font-family: var(--sans); font-weight: 640; font-size: 19px; }

/* Plans */
.plan-card { border-radius: 16px; box-shadow: var(--card-shadow-sm); padding: 30px 28px; }
.plan-card:hover { transform: none; }
.plan-card-featured,
:root[data-theme=dark] .plan-card-featured {
  border: 1.5px solid var(--blue);
  box-shadow: none;
  background-image: none;
}
.plan-tag { border-radius: 6px; }
.plan-head { border-bottom: 1px solid var(--editorial-rule); }
.plan-head h3 { font-size: 28px; }
.plans-store-note { border-radius: 12px; background: var(--card-well); border: 1px solid var(--card-border); }

.outro { border-top: 1px solid var(--editorial-rule); }
.outro-actions .workspace-entry,
.workspace-entry { border-radius: 10px; background: var(--ink); color: var(--bg); }
.outro-help-link { border-radius: 10px; }
.outro h2 { font-size: 40px; }

/* Structured 2-row architectural Footer */
.site-footer {
  max-width: 1120px;
  width: calc(100% - 64px);
  margin: 0 auto;
  padding: 40px 0 48px;
  border-top: 1px solid var(--editorial-rule);
  text-align: left;
}
.site-footer .footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 620;
  color: var(--ink);
}
.site-footer .footer-brand img {
  border-radius: 6px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  justify-content: flex-end;
}
.site-footer nav a {
  font-size: 13px;
  color: var(--muted);
}
.site-footer nav a:hover {
  color: var(--ink);
}
.site-footer > p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.site-footer > p:first-of-type {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--editorial-rule);
}

@media (max-width: 760px) {
  :root {
    --device-top: 136px;
    --phone-h: min(490px, calc(100svh - 248px));
  }
  .story-stage {
    height: 720px !important;
    min-height: 700px !important;
  }
  .hero h1 { font-size: 46px; }
  .feature-section { padding: 72px 0; }
  .feature-section h2 { font-size: 30px; }
  .memory-highlight > p { font-size: 24px; }
  .personal-grid.personal-grid-4 article { padding: 22px; border-right: 0 !important; }
  .personal-grid.personal-grid-4 article:not(:last-child) { border-bottom: 1px solid var(--card-border); }
  .outro h2 { font-size: 28px; }
  .brand strong { font-size: 14px; }
  #navigation > a.marketing-account { padding: 0 8px; margin-left: 2px; margin-right: 4px; }
  #navigation > a.marketing-account::before { display: none; }
  #navigation > a.marketing-account::after { left: 8px; right: 8px; }
  .site-footer { width: calc(100% - 40px); padding: 32px 0 40px; }
  .site-footer nav { justify-content: flex-start; gap: 8px 16px; }
}
@media (max-width: 360px) {
  .brand strong { font-size: 12.5px; }
}
