/* zoe — components */

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: all var(--t-fast) var(--easing);
  line-height: 1;
  color: var(--fg);
  background: transparent;
  min-height: 40px;
}
.btn-primary { background: var(--primary); color: var(--paper); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-secondary { color: var(--fg); border-color: var(--hairline-strong); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { color: var(--fg-muted); min-height: 32px; }
.btn-ghost:hover { color: var(--fg); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: var(--r-3); min-height: 48px; }
.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 28px; }
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--primary);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
[data-theme="dark"] .btn-primary { color: #14110E; }

/* ===== Inputs ===== */
.input {
  display: block; width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2);
  color: var(--fg);
  transition: border-color var(--t-fast) var(--easing), box-shadow var(--t-fast) var(--easing);
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder { color: var(--fg-faint); }
.field-label { display: block; font-size: 13px; color: var(--fg-muted); margin-bottom: 6px; }
.field-help { font-size: 12px; color: var(--fg-faint); margin-top: 6px; }

/* ===== Toggle / checkbox / slider ===== */
.toggle {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--mist-strong);
  position: relative; cursor: pointer;
  transition: background var(--t-base) var(--easing);
  border: 0;
  flex: none;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--paper);
  transition: transform var(--t-base) var(--easing);
}
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(16px); }

.checkbox {
  width: 18px; height: 18px; flex: none;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 4px; margin-top: 2px;
  position: relative;
  cursor: pointer;
}
.checkbox.on { border-color: var(--primary); background: var(--primary); }
.checkbox.on::after {
  content: "✓"; color: var(--paper); font-size: 12px; line-height: 1;
  position: absolute; top: 1px; left: 3px;
}
[data-theme="dark"] .checkbox.on::after { color: #14110E; }

.slider {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: var(--bg); border-radius: var(--r-pill); padding: 4px;
  border: 1px solid var(--hairline-strong);
}
.slider span {
  text-align: center; padding: 8px 12px; font-size: 12.5px; color: var(--fg-muted);
  border-radius: var(--r-pill); cursor: pointer;
}
.slider span.on { background: var(--primary); color: var(--paper); }
[data-theme="dark"] .slider span.on { color: #14110E; }

/* ===== Badge ===== */
.badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 3px 7px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  color: var(--fg-muted);
  display: inline-block;
}
.badge.success { background: rgba(47,107,74,0.10); color: var(--success); border-color: transparent; }
.badge.warn { background: rgba(184,122,31,0.12); color: var(--warning); border-color: transparent; }
.badge.error { background: rgba(154,42,40,0.10); color: var(--error); border-color: transparent; }
.badge.info { background: rgba(48,90,122,0.10); color: var(--info); border-color: transparent; }
.badge.primary { background: var(--primary-tint); color: var(--primary-deep); border-color: transparent; }
[data-theme="dark"] .badge.primary { color: var(--primary); }

/* ===== Phone mock + SMS bubbles ===== */
.phone {
  border-radius: 36px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 320px;
  margin: 0 auto;
}
.phone .status {
  padding: 14px 24px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--fg);
}
.phone .status .right { display: flex; gap: 4px; align-items: center; opacity: .8; font-size: 12px; }
.phone .messages-bar {
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 10px;
}
.phone .avatar-circle {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary); color: var(--paper);
  font-family: var(--serif); font-style: italic;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
}
[data-theme="dark"] .phone .avatar-circle { color: #14110E; }
.phone .messages-bar .name { font-weight: 600; font-size: 14px; }
.phone .messages-bar .name .smol { font-size: 11px; font-weight: 400; color: var(--fg-faint); margin-left: 6px; }
.phone .body { padding: 16px; min-height: 380px; }

.sms-day {
  text-align: center; font-family: var(--mono);
  font-size: 10.5px; color: var(--fg-faint);
  letter-spacing: .06em; margin: 4px 0 10px;
}
.bubble {
  max-width: 76%;
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 14.5px; line-height: 1.4;
  margin-bottom: 4px;
  word-wrap: break-word;
}
.bubble.them { background: #E8E4DA; color: var(--ink); border-bottom-left-radius: 6px; }
[data-theme="dark"] .bubble.them { background: #2C2823; color: #EFE9DC; }
.bubble.you {
  background: var(--info); color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}
.bubble + .bubble.them, .bubble.them + .bubble.them { border-top-left-radius: 6px; }
.bubble + .bubble.you, .bubble.you + .bubble.you { border-top-right-radius: 6px; }

/* =============================================================
   MARKETING SITE
   ============================================================= */
.site { background: var(--bg); color: var(--fg); min-height: 100vh; display: flex; flex-direction: column; }
.site main { flex: 1; }

.site-nav {
  padding: 22px 64px;
  display: flex; align-items: center; gap: 28px;
  border-bottom: 1px solid var(--hairline);
}
.site-nav .brand { font-size: 26px; }
.site-nav .links {
  display: flex; gap: 24px; margin-left: auto; font-size: 14px;
  color: var(--fg-muted);
  align-items: center;
}
.site-nav .links a { transition: color var(--t-fast) var(--easing); }
.site-nav .links a:hover, .site-nav .links a.active { color: var(--fg); }
.site-nav .login-link { color: var(--fg); padding-left: 4px; border-left: 1px solid var(--hairline); margin-left: 8px; padding-left: 24px; }
.site-nav .cta {
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong); font-size: 13px; color: var(--fg);
  transition: all var(--t-fast) var(--easing);
}
.site-nav .cta:hover { background: var(--primary); color: var(--paper); border-color: var(--primary); }
[data-theme="dark"] .site-nav .cta:hover { color: #14110E; }

.hero {
  padding: 80px 64px 64px;
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 64px; align-items: center;
}
.hero h1 {
  font-size: clamp(54px, 6vw, 84px); line-height: 0.98;
  letter-spacing: -0.025em;
}
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .sub { margin-top: 28px; font-size: 18px; line-height: 1.55; max-width: 38ch; color: var(--fg-muted); }
.hero .actions { margin-top: 32px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero .actions .lh { font-size: 12.5px; color: var(--fg-faint); }

/* ===== Hero phone "carousel" swap =====
   Standard pattern: both phones translate in PARALLEL (same direction, same distance)
   so they maintain a constant 200px X-separation at every frame of the transition.
   Front exits right; back arrives at center. They can never overlap because they
   are always 200px apart on the X axis — like two cards on a conveyor belt.
*/
.hero-phone-stack {
  position: relative;
  min-height: 560px;
  cursor: pointer;
}
.hero-phone-stack .phone {
  position: absolute;
  top: 0;
  right: 30px;
  transition:
    transform 700ms cubic-bezier(.32, .72, 0, 1),
    opacity 500ms cubic-bezier(.32, .72, 0, 1),
    filter 500ms cubic-bezier(.32, .72, 0, 1);
  will-change: transform, opacity, filter;
}

/* Default — front centered, back is 200px to the LEFT and slightly down/scaled */
.hero-phone-stack .phone.front {
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  opacity: 1;
  z-index: 2;
  filter: none;
}
.hero-phone-stack .phone.behind {
  transform: translate3d(-200px, 32px, 0) rotate(-3deg) scale(.93);
  opacity: .68;
  z-index: 1;
  filter: blur(.5px);
}

/* Hover — both phones translate +200px on X (in parallel). Front exits to the right
   into the back position. Back arrives at center. Constant 200px X gap throughout. */
.hero-phone-stack:hover .phone.front {
  transform: translate3d(200px, 32px, 0) rotate(3deg) scale(.93);
  opacity: .68;
  z-index: 1;
  filter: blur(.5px);
}
.hero-phone-stack:hover .phone.behind {
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  opacity: 1;
  z-index: 2;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone-stack .phone { transition: none; }
}

.feat-row {
  padding: 64px 64px;
  border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.feat h3 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.feat .num-pill { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .06em; margin-bottom: 12px; display: block; }
.feat p { font-size: 14.5px; line-height: 1.55; }

/* ===== Integrations — two-col grid with constellation ===== */
.integrations {
  padding: 56px 64px;
  border-top: 1px solid var(--hairline);
}
.integ-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: center;
}
.integ-head { max-width: 480px; }
.integ-head h2 { font-size: clamp(36px, 3.6vw, 48px); line-height: 1.04; }
.integ-head h2 em { font-style: italic; color: var(--primary); }
.integ-head .lede { margin-top: 16px; font-size: 16px; color: var(--fg-muted); }
.integ-foot-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

/* Constellation: SVG edges layer + absolutely-positioned logo "stars". */
.integ-constellation {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  width: 100%;
}
.cstars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}
.cstars .edge {
  stroke: var(--hairline-strong);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0;
  transition:
    stroke 220ms var(--easing),
    stroke-width 220ms var(--easing),
    opacity 220ms var(--easing);
}
.cnodes {
  position: absolute; inset: 0;
  list-style: none; padding: 0; margin: 0;
}
.cnode {
  position: absolute;
  width: 56px; height: 56px;
  margin-left: -28px;
  margin-top: -28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  outline: none;
  opacity: 0;
  transform: scale(0.4);
  transition:
    transform 220ms var(--easing),
    filter 220ms var(--easing);
}
.cnode-orb {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 220ms var(--easing),
    box-shadow 220ms var(--easing),
    transform 220ms var(--easing);
}
.cnode-orb img {
  width: 28px; height: 28px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

/* Central Zoe hub: brand wordmark inside a neutral pill */
.cnode.cnode-zoe {
  width: auto; height: auto;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.4);
  z-index: 2;
}
.cnode.cnode-zoe .cnode-orb {
  width: auto; height: 64px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-pop);
}
.cnode.cnode-zoe .brand-mark {
  font-size: 30px;
  line-height: 1;
}
.cnode.cnode-zoe:hover,
.cnode.cnode-zoe:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
}
.cnode.cnode-zoe:hover .cnode-orb,
.cnode.cnode-zoe:focus-visible .cnode-orb {
  border-color: var(--primary);
}
.integ-grid.is-in .cnode.cnode-zoe {
  animation: cnode-zoe-pop 520ms var(--easing) forwards;
}
@keyframes cnode-zoe-pop {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.cnode-name {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  padding: 4px 8px;
  border-radius: var(--r-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--easing);
}

/* Hover / focus state */
.cnode:hover, .cnode:focus-visible { transform: scale(1.08); }
.cnode:hover .cnode-orb,
.cnode:focus-visible .cnode-orb {
  border-color: var(--primary);
  box-shadow: var(--shadow-pop);
}
.cnode:hover .cnode-name,
.cnode:focus-visible .cnode-name { opacity: 1; }

/* When a node is active, dim the rest of the constellation */
.integ-constellation.is-active .cnode:not(:hover):not(:focus-visible) {
  filter: saturate(0.4) opacity(0.55);
}
.cstars .edge.is-active {
  stroke: var(--primary);
  stroke-width: 1.6;
}
.cstars .edge.is-dim { opacity: 0.18 !important; }

/* Cascade-in: nodes pop, then edges fade */
.integ-grid.is-in .cnode {
  animation: cnode-pop 520ms var(--easing) forwards;
}
.integ-grid.is-in .cnode:nth-child(1) { animation-delay:  40ms; }
.integ-grid.is-in .cnode:nth-child(2) { animation-delay: 200ms; }
.integ-grid.is-in .cnode:nth-child(3) { animation-delay: 260ms; }
.integ-grid.is-in .cnode:nth-child(4) { animation-delay: 320ms; }
.integ-grid.is-in .cnode:nth-child(5) { animation-delay: 380ms; }
.integ-grid.is-in .cnode:nth-child(6) { animation-delay: 440ms; }
.integ-grid.is-in .cnode:nth-child(7) { animation-delay: 500ms; }
.integ-grid.is-in .cnode:nth-child(8) { animation-delay: 560ms; }
.integ-grid.is-in .cnode:nth-child(9) { animation-delay: 620ms; }
.integ-grid.is-in .cstars .edge {
  animation: edge-fade 700ms var(--easing) 800ms forwards;
}

@keyframes cnode-pop {
  to { opacity: 1; transform: scale(1); }
}
@keyframes edge-fade {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cnode { opacity: 1; transform: none; animation: none !important; }
  .cnode:hover, .cnode:focus-visible { transform: none; }
  .cstars .edge { opacity: 1; animation: none !important; }
}

.show-row {
  padding: 80px 64px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-soft);
}
.show-row h2 { font-size: 36px; max-width: 18ch; margin-bottom: 36px; }
.show-row h2 em { font-style: italic; }
.scenes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.scene {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  padding: 24px 26px 28px;
}
.scene .scene-title { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.scene .sms-mini .bubble { font-size: 13.5px; }
.scene .sms-mini .bubble.them { background: var(--bg-sunk); }

.compliance-strip {
  padding: 28px 64px;
  border-top: 1px solid var(--hairline);
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-muted);
  background: var(--bg-soft);
}
.compliance-strip .item { display: flex; align-items: center; gap: 8px; }
.compliance-strip .item .dot { width: 6px; height: 6px; background: var(--primary); border-radius: 999px; }

.site-footer {
  padding: 56px 64px 24px;
  border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px;
  background: var(--bg);
}
.site-footer h4 { color: var(--fg-faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; margin-bottom: 14px; }
.site-footer a { display: block; color: var(--fg-muted); font-size: 13.5px; padding: 4px 0; }
.site-footer a:hover { color: var(--fg); }
.site-footer .brand { font-size: 44px; padding: 0; line-height: 0.95; }

.site-footer-strip {
  border-top: 1px solid var(--hairline);
  padding: 18px 64px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .04em;
  flex-wrap: wrap; gap: 16px;
}
.site-footer-strip .theme-row { display: flex; gap: 8px; align-items: center; }
.site-footer-strip .theme-row button {
  background: transparent; border: 1px solid var(--hairline);
  padding: 4px 10px; border-radius: var(--r-pill);
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  cursor: pointer;
  transition: all var(--t-fast) var(--easing);
}
.site-footer-strip .theme-row button.on { border-color: var(--primary); color: var(--fg); }
.site-footer-strip .theme-row button:hover { color: var(--fg); }

/* ===== Hero / signup / single-form pages ===== */
.signup-shell {
  padding: 80px 64px 100px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  flex: 1;
}
.signup-shell .left h2 { font-size: 56px; line-height: 1; max-width: 14ch; }
.signup-shell .left p { font-size: 17px; max-width: 38ch; margin-top: 22px; }
.signup-card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  padding: 36px 36px 28px;
  max-width: 460px;
  box-shadow: var(--shadow-sm);
}
.signup-card h3 { font-family: var(--serif); font-size: 28px; margin: 0 0 6px; font-weight: 400; }
.signup-card .sub-lede { font-size: 14.5px; color: var(--fg-muted); margin-bottom: 28px; }
.signup-card .phone-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.signup-card .checkbox-row {
  display: flex; gap: 12px; padding: 18px;
  background: var(--bg-soft); border-radius: var(--r-3);
  border: 1px solid var(--hairline);
  margin: 18px 0 22px;
  cursor: pointer;
}
.signup-card .checkbox-row .ct { font-size: 13.5px; line-height: 1.5; color: var(--fg-muted); }
.signup-card .checkbox-row .ct b { color: var(--fg); font-weight: 500; }
.signup-card .legal { font-size: 12px; color: var(--fg-faint); line-height: 1.5; margin-top: 16px; }
.signup-card .legal a { color: var(--fg-muted); text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }

/* Centered single-form pages (login, confirm, login-code) */
.center-shell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 32px;
}
.center-card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  padding: 44px 44px 36px;
  max-width: 440px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.center-card .brand { font-size: 32px; margin-bottom: 24px; }
.center-card h3 { font-family: var(--serif); font-size: 32px; margin: 0 0 8px; font-weight: 400; line-height: 1.05; }
.center-card .sub-lede { font-size: 14.5px; color: var(--fg-muted); margin-bottom: 28px; max-width: 32ch; margin-left: auto; margin-right: auto; }
.center-card .form { text-align: left; }
.center-card .links-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; }
.center-card .links-row a { color: var(--fg-muted); }
.center-card .links-row a:hover { color: var(--fg); }
.center-card .demo-note {
  font-family: var(--mono); font-size: 10.5px; color: var(--fg-faint);
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--hairline);
  letter-spacing: .04em;
}

/* 6-digit code input */
.code-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin: 0 0 18px;
}
.code-grid input {
  width: 100%; aspect-ratio: 1/1.2;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2);
  background: var(--bg);
  font-family: var(--serif); font-size: 32px; text-align: center;
  color: var(--fg);
  padding: 0;
  transition: all var(--t-fast) var(--easing);
}
.code-grid input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.code-grid input.filled { background: var(--primary-tint); border-color: var(--primary); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: var(--r-pill);
  font-size: 13px;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--easing), transform var(--t-base) var(--easing);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
[data-theme="dark"] .toast { background: var(--paper); color: var(--ink); }

/* Legal pages */
.legal-page {
  padding: 64px 96px 96px;
  display: grid; grid-template-columns: 200px 1fr;
  gap: 64px;
  flex: 1;
}
.legal-page aside {
  position: sticky; top: 24px; align-self: start;
  font-size: 13px; color: var(--fg-muted);
}
.legal-page aside a { display: block; padding: 6px 0; }
.legal-page aside a.active { color: var(--primary); border-left: 2px solid var(--primary); padding-left: 10px; margin-left: -12px; }
.legal-page article h2 { font-size: 44px; margin-bottom: 8px; }
.legal-page article .last-up { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .06em; margin-bottom: 36px; }
.legal-page article h3 { font-size: 20px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; margin-top: 36px; margin-bottom: 6px; color: var(--fg); }
.legal-page article .summary {
  background: var(--bg-soft);
  border-left: 2px solid var(--primary);
  padding: 12px 16px;
  margin: 6px 0 14px;
  font-family: var(--serif); font-style: italic;
  font-size: 16px; color: var(--fg);
}
.legal-page article p { font-size: 14.5px; max-width: 64ch; margin: 8px 0 12px; color: var(--fg-muted); }
.legal-page article a { color: var(--accent); }

/* Help kw rows */
.kw-row {
  display: grid; grid-template-columns: 100px 1fr; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
  align-items: start;
}
.kw-row .kw { font-family: var(--mono); font-size: 11px; color: var(--fg); letter-spacing: .04em; padding-top: 2px; }
.kw-row .kd { font-size: 14px; color: var(--fg-muted); }

/* Pricing */
.pricing-shell { padding: 96px 64px; text-align: center; flex: 1; }
.pricing-shell h2 { font-size: 56px; margin: 0 auto 16px; max-width: 14ch; }
.pricing-shell h2 em { font-style: italic; color: var(--primary); }
.pricing-shell .lede { margin: 0 auto 56px; max-width: 36ch; }
.price-card {
  margin: 0 auto; max-width: 420px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-4);
  padding: 36px;
  text-align: left;
  background: var(--bg-soft);
}
.price-card .tag {
  font-family: var(--mono); font-size: 11px; color: var(--primary);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px;
}
.price-card .price-num {
  font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--fg);
}
.price-card .price-num small { font-family: var(--sans); font-size: 14px; color: var(--fg-faint); margin-left: 4px; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; font-size: 14px; }
.price-card ul li { padding: 8px 0; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; color: var(--fg); }
.price-card ul li::before { content: ""; width: 5px; height: 5px; background: var(--primary); border-radius: 999px; flex: none; }

/* About */
.about-shell { padding: 120px 96px; max-width: 880px; margin: 0 auto; flex: 1; }
.about-shell h2 { font-size: 56px; line-height: 1.05; max-width: 14ch; }
.about-shell .body p {
  font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--fg);
  margin: 24px 0; max-width: 36ch;
}

/* 404 */
.error-shell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 32px;
  text-align: center;
}
.error-shell h1 { font-size: clamp(80px, 12vw, 160px); line-height: 1; }
.error-shell h1 em { font-style: italic; color: var(--primary); }
.error-shell .lede { margin-top: 18px; }

/* =============================================================
   DASHBOARD (app)
   ============================================================= */
.app-page { background: var(--bg); min-height: 100vh; }
.app {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app-side {
  border-right: 1px solid var(--hairline);
  padding: 22px 16px 16px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 4px;
}
.app-side .brand { font-size: 26px; padding: 0 8px 18px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; }
.app-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-2);
  color: var(--fg-muted);
  font-size: 14px;
  transition: background var(--t-fast) var(--easing), color var(--t-fast) var(--easing);
}
.app-side a:hover { background: var(--bg-soft); color: var(--fg); }
.app-side a.active { background: var(--primary-tint); color: var(--primary-deep); font-weight: 500; }
[data-theme="dark"] .app-side a.active { color: var(--primary); }

.app-side .footing {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 4px;
}
.app-side .footing .theme-mini {
  display: flex; gap: 4px;
  padding: 8px 4px 4px;
  font-family: var(--mono); font-size: 10.5px; color: var(--fg-faint);
  align-items: center;
  letter-spacing: .04em;
}
.app-side .footing .theme-mini button {
  background: transparent; border: 1px solid var(--hairline);
  padding: 3px 8px; border-radius: var(--r-pill);
  color: var(--fg-faint); cursor: pointer;
  font-family: var(--mono); font-size: 10.5px;
  transition: all var(--t-fast) var(--easing);
}
.app-side .footing .theme-mini button.on { color: var(--fg); border-color: var(--primary); }

.app-side .me {
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  border-radius: var(--r-2);
  cursor: pointer;
  color: var(--fg-muted);
  transition: background var(--t-fast) var(--easing);
}
.app-side .me:hover { background: var(--bg-soft); color: var(--fg); }
.app-side .me .av {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent); color: var(--paper);
  font-family: var(--serif); font-style: italic;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
[data-theme="dark"] .app-side .me .av { color: #14110E; }
.app-side .me .name-block { line-height: 1.2; }
.app-side .me .name-block .nm { color: var(--fg); font-weight: 500; }

.app-side .logout {
  padding: 8px 12px; font-size: 12.5px; color: var(--fg-faint);
}
.app-side .logout:hover { background: transparent; color: var(--danger); }

.app-main { padding: 36px 48px 80px; background: var(--bg); }
.app-head { margin-bottom: 32px; }
.app-head .crumbs { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .04em; margin-bottom: 8px; text-transform: uppercase; }
.app-head h2 { font-size: 36px; margin: 0 0 4px; }
.app-head .sub { font-size: 14px; color: var(--fg-muted); }

/* Today */
.today-letter {
  max-width: 640px;
  font-family: var(--serif); font-size: 22px; line-height: 1.55;
  color: var(--fg);
}
.today-letter p { font-family: var(--serif); font-size: 22px; line-height: 1.55; color: var(--fg); max-width: none; margin: 16px 0; }
.today-letter .ts { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .08em; margin-bottom: 20px; }
.today-letter .pill-action {
  display: inline-block; margin: 8px 6px 0 0;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--bg-soft);
  font-size: 12.5px; color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--t-fast) var(--easing);
}
.today-letter .pill-action:hover { color: var(--fg); border-color: var(--fg-faint); }

.today-summary {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.today-summary .col .label { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.today-summary .col .body { font-family: var(--serif); font-size: 18px; line-height: 1.4; color: var(--fg); }

/* Memory */
.memory-grid { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.memory-grid aside { font-size: 13.5px; color: var(--fg-muted); }
.memory-grid aside .group {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--r-2); cursor: pointer;
}
.memory-grid aside .group.active { background: var(--primary-tint); color: var(--primary-deep); font-weight: 500; }
[data-theme="dark"] .memory-grid aside .group.active { color: var(--primary); }
.memory-grid aside .group .ct { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); }
.memory-list .item {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: start;
}
.memory-list .item:first-child { border-top: 0; padding-top: 0; }
.memory-list .item .subj {
  font-family: var(--serif); font-size: 20px; color: var(--fg); margin-bottom: 4px;
}
.memory-list .item .know {
  font-size: 14px; color: var(--fg-muted); max-width: 56ch; margin-bottom: 8px;
}
.memory-list .item .why {
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  border-left: 2px solid var(--hairline-strong); padding-left: 10px; margin-top: 8px;
  line-height: 1.5;
}
.memory-list .item .why a { color: var(--accent); }
.memory-list .item .controls { display: flex; gap: 6px; }

/* Conversations */
.convo-shell { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.convo-list .search {
  padding: 12px 14px; border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2); background: var(--bg);
  font-size: 13px; color: var(--fg-muted); margin-bottom: 12px;
}
.convo-list .item {
  padding: 14px 4px; border-top: 1px solid var(--hairline);
  cursor: pointer;
}
.convo-list .item:first-child { border-top: 0; }
.convo-list .item .day { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .04em; }
.convo-list .item .preview { font-size: 13.5px; color: var(--fg-muted); margin-top: 4px; }
.convo-list .item.active { background: var(--bg-soft); border-radius: var(--r-2); padding: 14px; }

.convo-thread {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  padding: 24px 28px;
  background: var(--bg-soft);
}
.convo-thread .day-header { font-family: var(--serif); font-size: 22px; margin-bottom: 16px; color: var(--fg); }
.convo-thread .day-header .ts { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); margin-left: 10px; letter-spacing: .04em; }
.convo-thread .annot {
  margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--accent);
  cursor: pointer;
}
.convo-thread .annot.tagged { color: var(--success); }

/* Settings */
.settings-shell { display: grid; grid-template-columns: 200px 1fr; gap: 48px; }
.settings-side { font-size: 13.5px; color: var(--fg-muted); }
.settings-side a { display: block; padding: 8px 10px; border-radius: var(--r-2); }
.settings-side a:hover { background: var(--bg-soft); color: var(--fg); }
.settings-side a.active { background: var(--bg-soft); color: var(--fg); font-weight: 500; }
.settings-card {
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  padding: 28px 30px;
  margin-bottom: 16px;
}
.settings-card h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 4px; font-weight: 400; }
.settings-card .desc { font-size: 13.5px; color: var(--fg-muted); margin-bottom: 18px; max-width: 56ch; }
.pref-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--hairline);
}
.pref-row:first-of-type { border-top: 0; }
.pref-row .lbl { font-size: 14px; color: var(--fg); }
.pref-row .sub { font-size: 12.5px; color: var(--fg-faint); margin-top: 2px; }

.danger-block {
  border: 1px solid color-mix(in oklab, var(--danger) 30%, var(--hairline));
  background: color-mix(in oklab, var(--danger) 5%, var(--bg-soft));
  border-radius: var(--r-3);
  padding: 22px 26px;
  margin-top: 20px;
}
.danger-block h3 { color: var(--danger); margin: 0 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.danger-block .ck { font-size: 13.5px; color: var(--fg-muted); margin-bottom: 16px; max-width: 60ch; }

/* Account / billing specific */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.invoice-table th, .invoice-table td {
  text-align: left;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
}
.invoice-table th { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; border-top: 0; padding-top: 0; }
.invoice-table td .meta { color: var(--fg-faint); font-size: 12.5px; }
.invoice-table td a { color: var(--accent); font-size: 13px; }

.card-on-file {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  margin-bottom: 16px;
}
.card-on-file .brandmark {
  width: 40px; height: 28px;
  background: var(--ink); color: var(--paper);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em;
}
.card-on-file .nums { font-family: var(--mono); font-size: 13px; color: var(--fg); letter-spacing: .04em; }
.card-on-file .meta { font-size: 12px; color: var(--fg-faint); margin-top: 2px; }
.card-on-file .ed { margin-left: auto; }

/* Plan card on billing */
.plan-card {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 20px;
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  margin-bottom: 16px;
}
.plan-card .pname { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.plan-card .pmeta { font-size: 13px; color: var(--fg-muted); margin-top: 2px; }
.plan-card .pprice { font-family: var(--serif); font-size: 28px; }
.plan-card .pprice small { font-family: var(--sans); font-size: 13px; color: var(--fg-faint); margin-left: 2px; }

/* =============================================================
   HAMBURGER NAV (mobile marketing)
   ============================================================= */
.site-nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-family: var(--mono); font-size: 12px;
  color: var(--fg);
  cursor: pointer;
  margin-left: auto;
  min-height: 40px;
  transition: all var(--t-fast) var(--easing);
}
.site-nav-toggle:hover { border-color: var(--ink-3); }
.site-nav-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.site-nav-toggle[aria-expanded="true"] { background: var(--bg-soft); }

.site-nav-drawer {
  display: none;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  padding: 12px 24px 18px;
  flex-direction: column;
  gap: 4px;
}
.site-nav-drawer.open { display: flex; }
.site-nav-drawer a {
  display: block;
  padding: 12px 8px;
  font-size: 15px;
  color: var(--fg);
  border-bottom: 1px solid var(--hairline);
  min-height: 44px;
}
.site-nav-drawer a:last-child { border-bottom: 0; }
.site-nav-drawer a.cta {
  margin-top: 8px;
  background: var(--primary); color: var(--paper);
  text-align: center;
  border-radius: var(--r-2);
  border: 0;
  padding: 14px;
  font-weight: 500;
}
[data-theme="dark"] .site-nav-drawer a.cta { color: #14110E; }

/* =============================================================
   CONFIRM DIALOG (native <dialog>)
   ============================================================= */
.confirm-dialog {
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  background: var(--bg);
  color: var(--fg);
  padding: 28px 28px 24px;
  max-width: 420px; width: calc(100% - 32px);
  box-shadow: var(--shadow-pop);
  font-family: var(--sans);
}
.confirm-dialog::backdrop {
  background: rgba(26, 24, 22, 0.45);
  backdrop-filter: blur(2px);
}
[data-theme="dark"] .confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.confirm-dialog h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 24px; margin: 0 0 8px;
  color: var(--fg);
}
.confirm-dialog .msg {
  font-size: 14px; color: var(--fg-muted);
  line-height: 1.55; margin: 0 0 20px;
}
.confirm-dialog .actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.confirm-dialog .actions .btn { min-width: 96px; }

/* =============================================================
   MOBILE BOTTOM-NAV (dashboard)
   ============================================================= */
.app-mobile-header {
  display: none;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.app-mobile-header .brand { font-size: 24px; }
.app-mobile-header .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.app-mobile-header .right a {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--accent); color: var(--paper);
  font-family: var(--serif); font-style: italic;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
[data-theme="dark"] .app-mobile-header .right a { color: #14110E; }
.app-mobile-header .right button {
  background: transparent; border: 1px solid var(--hairline);
  padding: 8px 12px; border-radius: var(--r-pill);
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  cursor: pointer;
  min-height: 36px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 920px) {
  .signup-shell, .hero, .feat-row, .site-footer,
  .memory-grid, .convo-shell, .settings-shell,
  .scenes, .field-grid, .today-summary
    { grid-template-columns: 1fr !important; gap: 24px !important; }
  .legal-page { grid-template-columns: 1fr; padding: 36px; gap: 24px; }
  .hero, .signup-shell, .show-row, .pricing-shell, .about-shell, .feat-row, .site-footer, .compliance-strip, .site-nav, .site-footer-strip { padding-left: 24px; padding-right: 24px; }
  .app-main { padding: 28px 24px 100px; }
  .hero-phone-stack { min-height: 360px; }
  .hero-phone-stack .phone { right: auto; left: 50%; transform: translateX(-50%); }
  .hero-phone-stack .phone.behind { transform: translateX(-50%) rotate(-3deg); top: 20px; opacity: .35; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .pricing-shell h2 { font-size: 44px; }

  /* MARKETING — collapse links into hamburger drawer */
  .site-nav { padding: 16px 24px; }
  .site-nav .links { display: none; }
  .site-nav .cta { display: none; }
  .site-nav-toggle { display: inline-flex; align-items: center; }

  /* DASHBOARD — sidebar becomes bottom-nav */
  .app {
    grid-template-columns: 1fr;
    padding-bottom: 72px;
  }
  .app-mobile-header { display: flex; }
  .app-side {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--hairline);
    padding: 6px 4px 8px;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    z-index: 40;
    justify-content: space-around;
    gap: 0;
  }
  .app-side .brand { display: none; }
  .app-side .footing { display: none; }
  .app-side > a:not(.brand) {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 8px 4px 6px;
    font-size: 11px;
    gap: 2px;
    border-radius: var(--r-2);
    min-height: 56px;
    justify-content: center;
  }
  .app-side > a:not(.brand)::before {
    content: "";
    display: block;
    width: 6px; height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.45;
    margin-bottom: 2px;
  }
  .app-side > a:not(.brand).active::before { opacity: 1; }

  /* Memory + Conversations sidebars stack at top */
  .memory-grid aside, .convo-list, .settings-side { padding-bottom: 8px; border-bottom: 1px solid var(--hairline); }

  /* Marketing site: phone stack just shows the front phone */
  .hero-phone-stack .phone.behind { display: none; }

  /* Integrations — stack head over constellation; constellation collapses to wrap-flow */
  .integrations { padding: 48px 24px; }
  .integ-grid { grid-template-columns: 1fr; gap: 36px; align-items: start; }
  .integ-head { max-width: none; }
  .integ-head h2 { font-size: 32px; }
  .integ-constellation { aspect-ratio: auto; min-height: 0; }
  .cstars { display: none; }
  .cnodes {
    position: static;
    display: flex; flex-wrap: wrap; gap: 18px 14px;
    justify-content: center;
  }
  .cnode {
    position: static;
    margin: 0;
    flex-direction: column;
    height: auto;
  }
  .cnode-name {
    position: static;
    transform: none;
    opacity: 1;
    margin-top: 6px;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--fg-muted);
  }
}

@media (max-width: 600px) {
  .legal-page { padding: 28px 20px; }
  .site-footer { grid-template-columns: 1fr; }
  .center-card { padding: 32px 24px 24px; }
  .pricing-shell { padding: 64px 20px; }
  .about-shell { padding: 64px 20px; }
}
