/* ─────────────────────────────────────────────────────────────────
   Coral POC — Shared Design System
   Applied to all 4 POC pages + hub
───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --coral:        #C0392B;
  --coral-dark:   #922B21;
  --coral-light:  #FDEAE8;
  --coral-mid:    #F5C6C0;
  --navy:         #1A1A2E;
  --teal:         #0E6B6B;
  --teal-light:   #E6F4F4;
  --text:         #1A1A2E;
  --muted:        #6B7280;
  --hint:         #9CA3AF;
  --bg:           #FAFAF9;
  --surface:      #FFFFFF;
  --border:       #E5E7EB;
  --border-s:     #D1D5DB;
  --green:        #1E8449;
  --green-light:  #D5F5E3;
  --amber:        #D97706;
  --amber-light:  #FEF3C7;
  --purple:       #6C3483;
  --purple-light: #F0E6F6;
  --blue:         #1A5276;
  --blue-light:   #EBF5FB;
  --r:            12px;
  --rs:           8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── GLOBAL HEADER ── */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.app-logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--coral);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.app-logo-mark svg { width: 13px; height: 13px; fill: #fff; }
.app-logo-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; }
.app-logo-sub  { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }

.header-badge {
  margin-left: auto;
  background: var(--coral-light);
  color: var(--coral);
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  letter-spacing: 0.4px; text-transform: uppercase;
}

/* Back nav */
.back-link {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; display: flex; align-items: center; gap: 5px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--coral); }

/* ── CONTENT WRAPPER ── */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 32px 20px 80px; }
.page-wrap-narrow { max-width: 680px; margin: 0 auto; padding: 32px 20px 80px; }

/* ── PANELS ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.panel-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.7px;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 7px;
}
.panel-label::before {
  content: ''; display: block;
  width: 3px; height: 12px;
  background: var(--coral); border-radius: 2px;
}
.panel-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.panel-sub   { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

/* ── CHIPS ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 13px;
  border: 1.5px solid var(--border-s);
  border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.15s; background: var(--bg);
  user-select: none;
}
.chip:hover { border-color: var(--coral); color: var(--coral); }
.chip.selected { background: var(--coral); border-color: var(--coral); color: #fff; }

/* ── BUTTONS ── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px;
  background: var(--coral); color: #fff;
  border: none; border-radius: var(--rs);
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background 0.15s, transform 0.08s;
  letter-spacing: -0.2px;
}
.btn-primary:hover { background: var(--coral-dark); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { background: var(--border-s); color: var(--hint); cursor: not-allowed; }

.btn-sec {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: transparent; color: var(--muted);
  border: 1.5px solid var(--border-s); border-radius: var(--rs);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.12s;
}
.btn-sec:hover { background: var(--bg); color: var(--text); border-color: var(--border-s); }
.btn-sec:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── TYPE BADGES ── */
.type-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.4px;
  display: inline-block;
}
.badge-audio     { background: var(--blue-light);   color: var(--blue); }
.badge-wellness  { background: var(--green-light);  color: var(--green); }
.badge-education { background: var(--purple-light); color: var(--purple); }
.badge-sleep     { background: var(--teal-light);   color: var(--teal); }
.badge-product   { background: var(--coral-light);  color: var(--coral); }
.badge-milestone { background: var(--amber-light);  color: var(--amber); }

/* ── PRODUCT CARD ── */
.product-rec {
  background: var(--surface);
  border: 2px solid var(--coral);
  border-radius: var(--rs);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 13px;
  margin-top: 14px;
}
.pr-icon  { font-size: 28px; flex-shrink: 0; }
.pr-meta  { flex: 1; min-width: 0; }
.pr-tag   { font-size: 10px; font-weight: 700; color: var(--coral); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.pr-name  { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.pr-desc  { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pr-cta a {
  padding: 8px 14px; background: var(--coral); color: #fff;
  border-radius: var(--rs); font-size: 12px; font-weight: 700;
  text-decoration: none; display: inline-block; white-space: nowrap;
  transition: background 0.15s;
}
.pr-cta a:hover { background: var(--coral-dark); }

/* ── AUDIO PLAYER ── */
.audio-player {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 12px 16px;
  display: flex; align-items: center; gap: 14px;
}
.play-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--coral); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.play-btn:hover { background: var(--coral-dark); }
.play-btn svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.play-btn.playing svg { margin-left: 0; }
.audio-info { flex: 1; min-width: 0; }
.audio-title-text { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.prog-wrap { width: 100%; height: 3px; background: var(--border); border-radius: 2px; cursor: pointer; }
.prog-fill { height: 100%; background: var(--coral); border-radius: 2px; transition: width 0.25s linear; }

/* ── LOADING ── */
.loading-panel {
  text-align: center; padding: 48px 20px;
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.loading-sub   { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.loading-steps { display: flex; flex-direction: column; gap: 10px; max-width: 260px; margin: 0 auto; text-align: left; }
.ls-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--hint); }
.ls-item.active { color: var(--text); font-weight: 500; }
.ls-item.done   { color: var(--green); }
.ls-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-s); flex-shrink: 0; }
.ls-item.active .ls-dot { background: var(--amber); animation: pulse 1s infinite; }
.ls-item.done   .ls-dot { background: var(--green); animation: none; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.3} }

/* ── SCREENS ── */
.screen { display: none; animation: fadeUp 0.28s ease; }
.screen.active { display: block; }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── FORM FIELDS ── */
.field       { margin-bottom: 16px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--border-s);
  border-radius: var(--rs);
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--coral); }
.field input::placeholder { color: var(--hint); }

/* ── UTILITY ── */
.hint  { font-size: 12px; color: var(--hint); margin-top: 5px; line-height: 1.5; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* product-mention highlight (in stories) */
.product-mention {
  background: var(--coral-light);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .page-wrap, .page-wrap-narrow { padding: 20px 14px 60px; }
}
