/* ═══════════════════════════════════════════════
   STILLWARD — styles.css
   Colours: Indigo #6366F1 · Deep navy #13121A · Sage green #34D399
═══════════════════════════════════════════════ */

/* ─── RESET & BASE ─────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0D0D12;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 24px 16px;
  font-family: 'Sora', system-ui, sans-serif;
}

/* ─── DESIGN TOKENS ─────────────────────────────── */
:root {
  /* Backgrounds */
  --bg0: #13121A;
  --bg1: #1C1B25;
  --bg2: #25232F;
  --bg3: #2E2C3A;

  /* Text */
  --tx0: #F0EFFE;
  --tx1: #C4C2D4;
  --tx2: #7A7890;

  /* Borders */
  --bdr: rgba(255, 255, 255, 0.09);

  /* Indigo accent */
  --acc:    #6366F1;
  --acc2:   #818CF8;
  --acc-bg: #1E1B4B;
  --acc-tx: #C7D2FE;

  /* Green (premium) */
  --grn:    #34D399;
  --grn-bg: #022C22;
  --grn-tx: #6EE7B7;

  /* Nav */
  --nav-bg:    #0D0D12;
  --nav-on:    #1C1B25;
  --nav-on-tx: #818CF8;
  --nav-off:   rgba(240, 239, 254, 0.3);

  /* Tip box */
  --tip-bg:  #1E1B4B;
  --tip-tx:  #C7D2FE;
  --tip-lbl: #A5B4FC;

  /* Mood colours */
  --r-bg:  #450A0A; --r-ic:  #FCA5A5;
  --l-bg:  #431407; --l-ic:  #FCD34D;
  --o-bg:  #1E1B4B; --o-ic:  #C7D2FE;
  --g-bg:  #022C22; --g-ic:  #6EE7B7;
  --gr-bg: #2E1065; --gr-ic: #DDD6FE;

  /* Chat bubbles */
  --chat-ai:    #25232F;
  --chat-ai-tx: #F0EFFE;
  --chat-u:     #1E1B4B;
  --chat-u-tx:  #C7D2FE;

  /* Premium card */
  --pfeat-bdr: #34D399;
  --pfeat-bg:  #022C22;
  --pfeat-tx:  #6EE7B7;
}

/* ─── PHONE SHELL ───────────────────────────────── */
.wrap  { width: 340px; }
.phone {
  background: var(--bg1);
  border-radius: 28px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
}
.screen {
  background: var(--bg0);
  border-radius: 18px;
  border: 1px solid var(--bdr);
  overflow: hidden;
}

/* ─── SCREENS ───────────────────────────────────── */
.si { width: 100%; padding: 16px 14px; display: none; }
.si.active { display: block; }

/* ─── BRAND HEADER ──────────────────────────────── */
.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bdr);
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E1B4B, #312E81);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(99,102,241,0.4);
}
.wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tx0);
}
.wordmark span { color: var(--acc2); }
.tagline {
  font-size: 9px;
  font-weight: 600;
  color: var(--tx2);
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ─── NAV BAR ───────────────────────────────────── */
.nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--nav-bg);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
.nt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--nav-off);
  font-family: inherit;
}
.nt.on { background: var(--nav-on); color: var(--nav-on-tx); }
.nt svg { width: 14px; height: 14px; }
.nt span { font-size: 9px; font-weight: 700; }

/* ─── TYPOGRAPHY HELPERS ────────────────────────── */
.screen-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx0);
  margin-bottom: 13px;
}
.date-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx2);
  margin-bottom: 3px;
}
.field-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--tx0);
  margin-bottom: 6px;
}
.optional { font-weight: 500; color: var(--tx2); }
.link     { color: var(--acc2); cursor: pointer; font-weight: 800; }

/* ─── MOOD BUTTONS ──────────────────────────────── */
.mrow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}
.mb {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px;
  border-radius: 10px;
  border: 1px solid var(--bdr);
  background: var(--bg1);
  cursor: pointer;
  font-family: inherit;
}
.mb.sel { border: 2px solid var(--acc); background: var(--acc-bg); }
.mi {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ml { font-size: 9px; font-weight: 700; color: var(--tx2); }
.mb.sel .ml { color: var(--acc2); }

/* ─── STRESS SLIDER ─────────────────────────────── */
.stress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}
.stress-row input[type=range] {
  flex: 1;
  accent-color: #6366F1;
}
.stress-row span {
  font-size: 13px;
  font-weight: 800;
  min-width: 14px;
  color: var(--tx0);
}

/* ─── INSIGHT HEADER ROW ────────────────────────── */
.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tip-counter  { display: flex; align-items: center; gap: 6px; }
.drow         { display: flex; gap: 4px; align-items: center; }
.td           { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.td.on        { background: var(--acc); }
#tlft         { font-size: 10px; font-weight: 700; color: var(--tx2); white-space: nowrap; }

/* ─── NOTE TEXTAREA ─────────────────────────────── */
textarea {
  width: 100%;
  font-size: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--bdr);
  background: var(--bg1);
  color: var(--tx0);
  outline: none;
  resize: none;
  margin-bottom: 2px;
  font-family: inherit;
}

/* ─── TIP BOX ───────────────────────────────────── */
.tbox {
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
  background: var(--tip-bg);
  border: 1px solid rgba(99,102,241,0.35);
}
.tlbl {
  font-size: 9px;
  font-weight: 800;
  color: var(--tip-lbl);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tbody {
  font-size: 12px;
  font-weight: 500;
  color: var(--tip-tx);
  line-height: 1.55;
}

/* ─── BUTTONS ───────────────────────────────────── */
.cta {
  width: 100%;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 10px;
  background: var(--acc);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
}
.cta:disabled { opacity: 0.6; cursor: not-allowed; }
.cta-grn  { background: var(--grn); color: #022C22; }
.cta-ghost {
  background: var(--bg2);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--tx0);
}
.btn-ghost-sm {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid rgba(99,102,241,0.4);
  background: var(--acc-bg);
  color: var(--acc-tx);
  cursor: pointer;
  font-family: inherit;
}

/* ─── LOCK / PREMIUM TEASER ─────────────────────── */
.lock {
  background: var(--bg1);
  border: 1px dashed var(--bdr);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin-top: 10px;
}
.lock-title { font-size: 12px; font-weight: 800; color: var(--tx0); margin-bottom: 3px; }
.lock-body  { font-size: 11px; color: var(--tx1); margin-bottom: 8px; }

.premium-teaser {
  border: 1px dashed rgba(99,102,241,0.3);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  background: rgba(30,27,75,0.3);
}

/* ─── STREAK NUDGE ──────────────────────────────── */
.streak-nudge {
  display: none;
  border-radius: 10px;
  padding: 12px 13px;
  margin-top: 10px;
  background: #1a0a0a;
  border: 1px solid rgba(239,68,68,0.35);
}
.streak-nudge.show       { display: block; }
.streak-nudge-title      { font-size: 11px; font-weight: 800; color: #FCA5A5; margin-bottom: 3px; }
.streak-nudge-body       { font-size: 11px; color: #C4C2D4; line-height: 1.5; }
.streak-link             { color: #FCA5A5; font-weight: 700; cursor: pointer; }

/* ─── LOADING DOTS ──────────────────────────────── */
.dl { display: inline-flex; gap: 3px; align-items: center; }
.dl span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--tx2);
  animation: pu 1.2s infinite;
}
.dl span:nth-child(2) { animation-delay: 0.2s; }
.dl span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pu { 0%,80%,100% { opacity: 0.2; } 40% { opacity: 1; } }

/* ─── CONVERSATION ──────────────────────────────── */
.convo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.btn-back {
  font-size: 11px; font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--bdr);
  background: var(--bg2);
  color: var(--tx0);
  cursor: pointer;
  font-family: inherit;
}
.convo-title { font-size: 13px; font-weight: 800; color: var(--tx0); }
.convo-sub   { font-size: 10px; font-weight: 600; color: var(--tx2); }

#msgs {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.cb-ai {
  background: var(--chat-ai);
  border-radius: 12px 12px 12px 3px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--chat-ai-tx);
  margin-bottom: 7px;
  max-width: 88%;
  line-height: 1.5;
}
.cb-u {
  background: var(--chat-u);
  border-radius: 12px 12px 3px 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--chat-u-tx);
  margin-bottom: 7px;
  max-width: 88%;
  margin-left: auto;
  line-height: 1.5;
}
.sugg-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 7px; }
.chip {
  font-size: 10px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--bdr);
  background: var(--bg2);
  color: var(--tx0);
  cursor: pointer;
  font-family: inherit;
}
.convo-input-row { display: flex; gap: 7px; }
.convo-input-row input {
  flex: 1;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--bdr);
  background: var(--bg2);
  color: var(--tx0);
  outline: none;
  font-family: inherit;
}
.btn-send {
  padding: 8px 13px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 9px;
  background: var(--acc);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ─── INSIGHTS ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.stat-card {
  background: var(--bg1);
  border-radius: 9px;
  padding: 11px;
  border: 1px solid var(--bdr);
}
.stat-label { font-size: 10px; font-weight: 700; color: var(--tx2); margin-bottom: 3px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--tx0); }
.stat-unit  { font-size: 11px; font-weight: 600; color: var(--tx2); }

.week-card {
  background: var(--bg1);
  border-radius: 9px;
  padding: 11px;
  margin-bottom: 9px;
  border: 1px solid var(--bdr);
}
.wbar {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
}
.wbar-col {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; gap: 2px; height: 100%; justify-content: flex-end;
}
.wbar-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
}
.wbar-lbl { font-size: 8px; font-weight: 800; color: var(--tx2); }

/* ─── HISTORY ───────────────────────────────────── */
.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
}
.cal-day {
  height: 24px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 800;
  border: 1px solid var(--bdr);
}
.history-item {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bdr);
  align-items: center;
}
.history-dot  { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.history-mood { font-size: 12px; font-weight: 700; color: var(--tx0); }
.history-date { font-size: 10px; color: var(--tx2); }

/* ─── PRICING ───────────────────────────────────── */
.pricing-header {
  text-align: center;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bdr);
}
.pcard {
  border: 1px solid var(--bdr);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 9px;
  background: var(--bg1);
}
.pcard-featured {
  border: 2px solid var(--pfeat-bdr);
  background: var(--pfeat-bg);
}
.pcard-header    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pcard-name      { font-size: 13px; font-weight: 800; color: var(--tx0); }
.pcard-name-grn  { color: var(--grn-tx); }
.pcard-name-row  { display: flex; align-items: center; gap: 6px; }
.pcard-price     { font-size: 13px; font-weight: 800; color: var(--tx0); white-space: nowrap; }
.pcard-price-grn { color: var(--grn-tx); }
.pcard-sub       { font-size: 10px; font-weight: 700; color: var(--grn); margin-bottom: 8px; }
.pcard-save      { font-size: 10px; font-weight: 700; color: var(--tx2); }
.badge-popular {
  font-size: 9px; font-weight: 800;
  background: var(--grn);
  color: #022C22;
  padding: 2px 7px;
  border-radius: 99px;
}
.pr-row    { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.pc        { width: 13px; height: 13px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pr-text   { font-size: 11px; font-weight: 600; color: var(--tx1); }
.pr-text-grn { color: var(--pfeat-tx); }

.pc-grn       { background: var(--grn-bg); }
.pc-grn::after, .pc-grn-solid::after {
  content: '';
  display: block;
  width: 5px; height: 3px;
  border-left: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(-45deg) translate(1px, -1px);
}
.pc-grn::after      { border-color: var(--grn-tx); }
.pc-grn-solid       { background: var(--grn); }
.pc-grn-solid::after { border-color: #022C22; }

.grad-bar {
  height: 2px;
  background: linear-gradient(90deg, #6366F1, #34D399);
  border-radius: 99px;
  margin: 10px 0;
}

/* ─── ONBOARDING ────────────────────────────────── */
.ob {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ob.active { display: flex; }
.ob-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
  pointer-events: none;
}
.ob-logo-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-bottom: 32px;
}
.ob-logo-big {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1E1B4B, #312E81);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(99,102,241,0.5), 0 0 0 1px rgba(99,102,241,0.2);
}
.ob-wordmark {
  font-size: 28px; font-weight: 900;
  letter-spacing: -0.04em; color: var(--tx0);
}
.ob-wordmark span { color: var(--acc2); }
.ob-tagline {
  font-size: 11px; font-weight: 600;
  font-style: italic; color: var(--tx2); letter-spacing: 0.04em;
}
.ob-step {
  font-size: 9px; font-weight: 800; color: var(--tx2);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 28px;
}
.ob-title {
  font-size: 20px; font-weight: 900;
  color: var(--tx0); line-height: 1.25;
  margin-bottom: 10px; letter-spacing: -0.02em;
}
.ob-body {
  font-size: 13px; font-weight: 500;
  color: var(--tx1); line-height: 1.6;
  margin-bottom: 24px; max-width: 240px;
}
.ob-feats { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-bottom: 24px; text-align: left; }
.ob-feat {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--bg1); border-radius: 11px;
  padding: 12px 13px; border: 1px solid var(--bdr);
}
.ob-feat-ic {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ob-feat-tx h4 { font-size: 12px; font-weight: 800; color: var(--tx0); margin-bottom: 2px; }
.ob-feat-tx p  { font-size: 11px; color: var(--tx2); line-height: 1.45; }

.ob-phils {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; width: 100%; margin-bottom: 24px;
}
.ob-phil {
  border-radius: 11px; padding: 13px 11px;
  border: 1px solid var(--bdr); background: var(--bg1);
  text-align: left; position: relative; overflow: hidden;
}
.ob-phil.free { border-color: rgba(99,102,241,0.5); background: var(--acc-bg); }
.ob-phil h4   { font-size: 11px; font-weight: 800; color: var(--tx0); margin-bottom: 2px; }
.ob-phil p    { font-size: 10px; color: var(--tx2); line-height: 1.4; }
.free-badge {
  display: inline-block;
  font-size: 8px; font-weight: 800; color: var(--acc2);
  background: rgba(99,102,241,0.2);
  border-radius: 99px; padding: 1px 7px; margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.lock-ic { position: absolute; top: 9px; right: 9px; opacity: 0.4; }

.ob-icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--bg2); border: 1px solid var(--bdr);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0;
}
.ob-disclaimers {
  width: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px;
}
.ob-disc-card {
  background: var(--bg1); border-radius: 11px;
  padding: 12px 13px; border: 1px solid var(--bdr);
}
.disc-title { font-size: 11px; font-weight: 800; color: var(--tx0); margin-bottom: 3px; }
.disc-body  { font-size: 11px; color: var(--tx2); line-height: 1.5; }
.hotline    { color: var(--acc2); font-weight: 700; }

.ob-dots { display: flex; gap: 5px; margin-bottom: 20px; }
.ob-dot  {
  width: 5px; height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.ob-dot.on { width: 16px; background: var(--acc); }

.ob-btn {
  width: 100%; padding: 14px;
  font-size: 14px; font-weight: 900;
  border-radius: 12px;
  background: var(--acc); color: #fff;
  border: none; cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  font-family: inherit;
}
.ob-btn:active { transform: scale(0.98); }
.ob-btn-ghost {
  background: var(--bg2);
  border: 1px solid rgba(99,102,241,0.4);
  color: var(--tx0);
  box-shadow: none;
}
.ob-skip {
  font-size: 11px; font-weight: 600; color: var(--tx2);
  background: none; border: none; cursor: pointer;
  margin-top: 10px; padding: 4px;
  font-family: inherit;
}
.ob-legal {
  font-size: 10px; color: var(--tx2);
  line-height: 1.5; max-width: 240px; margin-top: 10px;
}

/* ─── ONBOARDING ANIMATIONS ─────────────────────── */
@keyframes ob-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.ob.active > * { animation: ob-in 0.5s ease both; }
.ob.active .ob-logo-wrap    { animation-delay: 0.05s; }
.ob.active .ob-title        { animation-delay: 0.1s; }
.ob.active .ob-body         { animation-delay: 0.15s; }
.ob.active .ob-feats,
.ob.active .ob-phils        { animation-delay: 0.15s; }
.ob.active .ob-dots         { animation-delay: 0.2s; }
.ob.active .ob-btn          { animation-delay: 0.25s; }
.ob.active .ob-skip         { animation-delay: 0.3s; }
