/* ==========================================================================
   Illuminate Academy — Parent Resource Hub — Design System
   Responsive hybrid: bottom tab bar + stacked cards on mobile,
   pill top nav + multi-column grids on desktop.
   Tokens: navy #1B2B4A · teal #2aaca6/#3A9E94/#1A8A7A · lime #a8d44e
   Off-white #f4f9f8 · Playfair Display (display) · Plus Jakarta Sans (body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root{
  --navy: #1B2B4A;
  --navy-soft: #334667;
  --teal: #2aaca6;
  --teal-mid: #3A9E94;
  --teal-deep: #1A8A7A;
  --lime: #a8d44e;
  --lime-soft: #eef7dc;
  --off-white: #f4f9f8;
  --white: #ffffff;
  --ink: #22324e;
  --ink-soft: #55647f;
  --line: #e3ece9;
  --amber: #c8791a;
  --amber-bg: #fdf3e4;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 20px rgba(27,43,74,0.06);
  --shadow-lift: 0 10px 30px rgba(27,43,74,0.10);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--off-white);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }

h1,h2,h3,h4{ font-family: var(--font-display); color: var(--navy); margin: 0 0 0.4em; font-weight: 600; letter-spacing: -0.01em; }
h1{ font-size: clamp(1.7rem, 3vw, 2.3rem); }
h2{ font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3{ font-size: 1.1rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow{ display:inline-flex; align-items:center; gap:6px; font-size: 0.72rem; font-weight:700; letter-spacing:0.09em; text-transform:uppercase; color: var(--teal-deep); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior:auto !important; }
}

a:focus-visible, button:focus-visible, input:focus-visible{ outline: 2.5px solid var(--teal); outline-offset: 2px; }

@keyframes breathe{ 0%,100%{ transform:scale(1); opacity:0.85;} 50%{ transform:scale(1.6); opacity:1;} }
@keyframes breathe-fab{ 0%,100%{ box-shadow: 0 10px 26px rgba(26,138,122,0.30);} 50%{ box-shadow: 0 14px 34px rgba(26,138,122,0.48);} }

/* ==========================================================================
   SHELL — the responsive container used on every page
   ========================================================================== */
.shell{ max-width: 430px; margin: 0 auto; min-height: 100vh; position:relative; padding-bottom: 100px; }

/* ---------------- Top bar (mobile) ---------------- */
.topbar{ display:flex; align-items:center; justify-content:space-between; padding: 16px 18px 6px; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width:38px; height:38px; border-radius: 50%;
  overflow:hidden; flex-shrink:0;
  box-shadow: var(--shadow-soft);
  background:#fff;
}
.brand-mark img{ width:100%; height:100%; object-fit:cover; display:block; }
.brand-text{ display:none; }
.topbar-right{ display:flex; align-items:center; gap:10px; }
.avatar{
  width:38px; height:38px; border-radius:50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:0.82rem;
  box-shadow: var(--shadow-soft); flex-shrink:0;
}
.desktop-nav{ display:none; }

/* ---------------- Page intro (non-dashboard pages) ---------------- */
.page-intro{ padding: 10px 18px 14px; }
.page-intro h1{ margin-bottom:6px; }
.page-intro p{ margin:0; font-size:0.92rem; }

/* ---------------- Section labels ---------------- */
.section-label{ font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--ink-soft); margin: 22px 18px 10px; display:flex; align-items:center; justify-content:space-between; }
.section-label a{ font-size:0.72rem; font-weight:700; color: var(--teal-deep); text-transform:none; letter-spacing:0; }
.section-pad{ padding: 0 18px; }

/* ==========================================================================
   HERO (Dashboard "Start Here" card)
   ========================================================================== */
.hero-row{ display:block; }
.app-hero{
  margin: 6px 18px 18px; background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  border-radius: 22px; padding: 22px 22px 24px; color:#fff; position:relative; overflow:hidden;
}
.app-hero::after{ content:""; position:absolute; right:-30px; top:-30px; width:150px; height:150px; border-radius:50%; background: radial-gradient(circle, rgba(168,212,78,0.35), transparent 70%); }
.hero-badge{ display:inline-flex; align-items:center; gap:7px; background: rgba(255,255,255,0.14); padding:6px 14px; border-radius:999px; font-size:0.7rem; font-weight:700; letter-spacing:0.04em; margin-bottom:12px; }
.breathe-dot{ width:8px; height:8px; border-radius:50%; background: var(--lime); animation: breathe 4s ease-in-out infinite; }
.app-hero h1{ color:#fff; font-size:1.35rem; margin-bottom:6px; }
.app-hero p{ color:#c3ccdd; font-size:0.85rem; margin-bottom:16px; max-width:40ch; }
.hero-progress{ display:flex; align-items:center; gap:14px; }
.progress-ring{ width:56px; height:56px; border-radius:50%; background: conic-gradient(var(--lime) 0% var(--pct,50%), rgba(255,255,255,0.15) var(--pct,50%) 100%); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.progress-ring-inner{ width:44px; height:44px; border-radius:50%; background:var(--navy); display:flex; align-items:center; justify-content:center; font-size:0.74rem; font-weight:700; color:#fff; }
.hero-progress-text{ font-size:0.8rem; color:#fff; font-weight:700; }
.hero-progress-sub{ font-size:0.74rem; color:#a9b4cc; }
.hero-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.hero-btn{ display:inline-block; background:#fff; color:var(--navy); font-weight:700; font-size:0.8rem; padding:10px 18px; border-radius:999px; }
.hero-btn-outline{ display:inline-block; background:rgba(255,255,255,0.1); border:1.5px solid rgba(255,255,255,0.35); color:#fff; font-weight:700; font-size:0.8rem; padding:9px 18px; border-radius:999px; }

.quick-panel-desktop{ display:none; }

/* ==========================================================================
   EMERGENCY / ALERT CARD (dashboard only)
   ========================================================================== */
.alert-card{ margin: 0 18px 18px; background: var(--amber-bg); border:1px solid #f0d3a6; border-radius: 16px; padding: 14px 16px; display:flex; gap:10px; align-items:flex-start; }
.alert-card svg{ width:18px; height:18px; color: var(--amber); flex-shrink:0; margin-top:1px; }
.alert-card h3{ color:#8a5412; font-size:0.92rem; margin-bottom:2px; }
.alert-card p{ color:#8a5412; margin:0; font-size:0.82rem; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn{ display:inline-flex; align-items:center; gap:8px; padding: 11px 20px; border-radius: var(--radius-pill); font-weight:700; font-size:0.86rem; cursor:pointer; border:none; transition: transform .16s ease, box-shadow .16s ease; }
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep)); color:#fff; box-shadow: 0 8px 20px rgba(26,138,122,0.22); }
.btn-secondary{ background:#fff; color: var(--navy); border:1.5px solid var(--line); }
.btn-ghost{ background:transparent; color: var(--teal-deep); padding:6px 2px; }
.btn-sm{ padding: 8px 15px; font-size:0.78rem; }
.btn-block{ width:100%; justify-content:center; }

/* ==========================================================================
   QUICK ACCESS ICON GRID (dashboard)
   ========================================================================== */
.quickgrid{ display:grid; grid-template-columns: repeat(4,1fr); gap:12px; padding:0 18px; margin-bottom:8px; }
.quick-item{ display:flex; flex-direction:column; align-items:center; gap:7px; }
.quick-icon{ width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center; background:#fff; box-shadow: var(--shadow-soft); color: var(--teal-deep); }
.quick-icon svg{ width:22px; height:22px; }
.quick-icon.v-navy{ color: var(--navy); }
.quick-icon.v-lime{ color: #5c7a1f; }
.quick-icon.v-amber{ color: var(--amber); }
.quick-label{ font-size:0.68rem; font-weight:700; color:var(--navy-soft); text-align:center; line-height:1.2; }

/* ==========================================================================
   HORIZONTAL SCROLL CARD ROW (mobile "Today" etc.)
   ========================================================================== */
.cardrow{ display:flex; gap:12px; overflow-x:auto; padding: 0 18px 8px; margin-bottom:6px; scrollbar-width:none; }
.cardrow::-webkit-scrollbar{ display:none; }
.mini-card{ min-width:200px; background:#fff; border-radius:16px; padding:15px 16px; box-shadow: var(--shadow-soft); flex-shrink:0; border:1px solid var(--line); }
.mini-tag{ font-size:0.6rem; font-weight:700; text-transform:uppercase; color: var(--teal-deep); letter-spacing:0.04em; }
.mini-tag.amber{ color: var(--amber); }
.mini-title{ font-size:0.85rem; font-weight:700; color:var(--navy); margin: 4px 0 2px; line-height:1.3; }
.mini-meta{ font-size:0.72rem; color: var(--ink-soft); }

/* ==========================================================================
   GENERIC GRID / CARD (content pages)
   ========================================================================== */
.grid{ display:grid; gap: 14px; padding: 0 18px; }
.grid-2{ grid-template-columns: repeat(2,1fr); }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-4{ grid-template-columns: repeat(4,1fr); }
.card{ background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile{ display:flex; flex-direction:column; gap:10px; cursor:pointer; }
.tile-icon{ width:44px; height:44px; border-radius: 13px; background: var(--lime-soft); display:flex; align-items:center; justify-content:center; color: var(--teal-deep); flex-shrink:0; }
.tile-icon svg{ width:20px; height:20px; }
.tile-icon.v-teal{ background: #e3f4f2; color: var(--teal-deep); }
.tile-icon.v-navy{ background: #eaeef5; color: var(--navy); }
.tile-icon.v-lime{ background: var(--lime-soft); color: #5c7a1f; }
.tile-icon.v-amber{ background: var(--amber-bg); color: var(--amber); }
.tile h3{ margin-bottom:2px; font-size:1.02rem; }
.tile p{ font-size: 0.85rem; margin:0; }
.tile-link{ font-size:0.8rem; font-weight:700; color: var(--teal-deep); margin-top:auto; display:flex; align-items:center; gap:4px; }

/* List rows */
.list-card{ background:#fff; border:1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); margin: 0 18px; overflow:hidden; }
.list-row{ display:flex; gap:13px; align-items:flex-start; padding: 15px 18px; border-bottom:1px solid var(--line); }
.list-row:last-child{ border-bottom:none; }
.list-row.clickable{ cursor:pointer; }
.list-icon{ width:34px; height:34px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background: var(--off-white); color: var(--teal-deep); }
.list-icon svg{ width:17px; height:17px; }
.list-title{ font-weight:700; color: var(--navy); font-size:0.9rem; }
.list-meta{ font-size:0.78rem; color: var(--ink-soft); margin-top:2px; }
.list-body{ font-size:0.83rem; color:var(--ink-soft); margin-top:6px; }
.tag{ font-size:0.64rem; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; padding:3px 9px; border-radius: var(--radius-pill); background: var(--lime-soft); color:#5c7a1f; white-space:nowrap; flex-shrink:0; }
.tag.amber{ background: var(--amber-bg); color: var(--amber); }
.tag.navy{ background:#eaeef5; color:var(--navy); }

/* Quick links / buttons row */
.linklist{ padding:0 18px; }
.link-tile{ display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--line); border-radius: 16px; padding: 15px 16px; box-shadow: var(--shadow-soft); margin-bottom:12px; }
.link-tile .tile-icon{ margin:0; }
.link-tile-title{ font-weight:700; color:var(--navy); font-size:0.92rem; }
.link-tile-sub{ font-size:0.76rem; color:var(--ink-soft); margin-top:1px; }
.link-tile-arrow{ margin-left:auto; color: var(--ink-soft); flex-shrink:0; }

/* Search + filters */
.search-bar{ display:flex; gap:10px; padding: 0 18px; margin-bottom:14px; flex-wrap:wrap; }
.search-input-wrap{ position:relative; flex:1; min-width:0; }
.search-input-wrap svg{ position:absolute; left:15px; top:50%; transform:translateY(-50%); color: var(--ink-soft); width:17px; height:17px; }
.search-input-wrap input{ width:100%; padding: 12px 16px 12px 42px; border-radius: var(--radius-pill); border:1.5px solid var(--line); font-family:inherit; font-size:0.88rem; outline:none; background:#fff; }
.search-input-wrap input:focus{ border-color: var(--teal); }
.filter-row{ display:flex; gap:8px; overflow-x:auto; padding: 0 18px; margin-bottom:16px; scrollbar-width:none; }
.filter-row::-webkit-scrollbar{ display:none; }
.filter-chip{ padding: 7px 15px; border-radius: var(--radius-pill); border:1.5px solid var(--line); background:#fff; font-size:0.78rem; font-weight:700; color: var(--navy-soft); cursor:pointer; white-space:nowrap; flex-shrink:0; }
.filter-chip.active{ background: var(--navy); color:#fff; border-color:var(--navy); }
.resource-type{ font-size:0.68rem; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; color: var(--teal-deep); margin-bottom:5px; display:block; }
.empty-state{ text-align:center; padding: 40px 20px; color: var(--ink-soft); grid-column: 1/-1; }

/* Accordion (Programs) */
.accordion-item{ background:#fff; border:1px solid var(--line); border-radius: var(--radius-md); margin: 0 18px 12px; overflow:hidden; box-shadow: var(--shadow-soft); }
.accordion-trigger{ width:100%; display:flex; align-items:center; gap:13px; padding: 16px 16px; background:none; border:none; cursor:pointer; text-align:left; }
.accordion-trigger .tile-icon{ width:38px; height:38px; flex-shrink:0; }
.accordion-trigger .chev{ margin-left:auto; transition: transform .2s ease; color: var(--ink-soft); flex-shrink:0; }
.accordion-item.open .chev{ transform: rotate(180deg); }
.accordion-panel{ max-height:0; overflow:hidden; transition: max-height .25s ease; }
.accordion-item.open .accordion-panel{ max-height: 600px; }
.accordion-panel-inner{ padding: 0 16px 20px 67px; }
.accordion-panel-inner p{ margin-bottom:10px; font-size:0.88rem; }
.accordion-panel-inner .meta-row{ display:flex; gap:14px; flex-wrap:wrap; font-size:0.78rem; color:var(--ink-soft); margin-bottom:10px; }
.accordion-panel-inner .meta-row strong{ color:var(--navy); }

/* Checklist (Progress page) */
.checklist-card{ margin:0 18px; background:#fff; border:1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow:hidden; }
.check-row{ display:flex; align-items:center; gap:13px; padding:15px 16px; border-bottom:1px solid var(--line); }
.check-row:last-child{ border-bottom:none; }
.check-box{ width:25px; height:25px; border-radius:8px; border:2px solid var(--line); flex-shrink:0; display:flex; align-items:center; justify-content:center; cursor:pointer; background:#fff; transition: background .15s ease, border-color .15s ease; }
.check-box.done{ background: var(--teal-deep); border-color: var(--teal-deep); }
.check-box svg{ width:14px; height:14px; color:#fff; display:none; }
.check-box.done svg{ display:block; }
.check-label{ font-weight:700; color: var(--navy); font-size:0.9rem; }
.check-label.done{ text-decoration: line-through; color: var(--ink-soft); font-weight:600; }
.check-meta{ font-size:0.76rem; color: var(--ink-soft); margin-top:1px; }
.progress-hero-card{ margin:0 18px 18px; background:#fff; border:1px solid var(--line); border-radius:var(--radius-md); padding:20px; box-shadow: var(--shadow-soft); }
.progress-track{ width:100%; height:10px; border-radius: var(--radius-pill); background: #e6efec; overflow:hidden; margin: 12px 0 6px; }
.progress-fill{ height:100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--teal), var(--lime)); transition: width .5s ease; }
.progress-label{ display:flex; justify-content:space-between; font-size:0.8rem; color:var(--ink-soft); font-weight:600; }

/* Wins page */
.quote-card{ margin:0 18px 16px; background: linear-gradient(135deg, #ffffff, var(--off-white)); border-left: 4px solid var(--teal); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-soft); }
.quote-card p{ font-family: var(--font-display); font-style:italic; font-size:1.05rem; color: var(--navy); margin-bottom:8px; }
.quote-attr{ font-size:0.8rem; font-weight:700; color: var(--teal-deep); }
.try-today-card{ margin:0 18px 16px; background: var(--lime-soft); border:1px solid #d9ecb5; border-radius: var(--radius-md); padding:18px 20px; }
.try-today-card h3{ color:#4c661a; font-size:0.98rem; }
.try-today-card p{ color:#5c7a1f; font-size:0.86rem; margin:0; }
.win-card{ display:flex; gap:12px; align-items:flex-start; }

/* Minimal footer */
.mini-footer{ text-align:center; padding: 30px 18px 10px; font-size:0.76rem; color: var(--ink-soft); }
.mini-footer a{ color: var(--teal-deep); font-weight:700; }

/* ==========================================================================
   FLOATING AI CHAT WIDGET — made clearly identifiable as a help bot
   ========================================================================== */
.chat-fab{
  position: fixed; bottom: 96px; right: 18px; z-index: 100;
  display:flex; align-items:center; gap:9px;
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep));
  border-radius: 999px; border:none; cursor:pointer;
  padding: 12px 18px 12px 14px;
  box-shadow: 0 10px 26px rgba(26,138,122,0.35);
  animation: breathe-fab 4.5s ease-in-out infinite;
}
.chat-fab .fab-icon-wrap{ position:relative; width:26px; height:26px; display:flex; align-items:center; justify-content:center; }
.chat-fab svg{ width:24px; height:24px; color:#fff; }
.chat-fab .fab-badge{ position:absolute; top:-4px; right:-4px; width:12px; height:12px; border-radius:50%; background: var(--lime); border:2px solid #fff; }
.chat-fab-label{ color:#fff; font-weight:700; font-size:0.82rem; white-space:nowrap; }

.chat-teaser{
  position: fixed; bottom: 156px; right: 18px; z-index:100;
  background:#fff; border:1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 12px 16px; box-shadow: var(--shadow-lift); max-width: 220px;
  font-size:0.82rem; color:var(--navy); font-weight:600;
  opacity:0; transform: translateY(6px); pointer-events:none;
  transition: opacity .3s ease, transform .3s ease;
}
.chat-teaser.show{ opacity:1; transform:translateY(0); pointer-events:auto; }
.chat-teaser .close-teaser{ position:absolute; top:4px; right:6px; background:none; border:none; color:var(--ink-soft); cursor:pointer; font-size:0.9rem; line-height:1; padding:4px; }

.chat-panel{
  position: fixed; bottom: 96px; right: 18px; z-index: 100;
  width: 372px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 140px);
  background:#fff; border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(27,43,74,0.25);
  border: 1px solid var(--line);
  display:none; flex-direction:column; overflow:hidden;
}
.chat-panel.open{ display:flex; }
.chat-head{ background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color:#fff; padding: 16px 18px; display:flex; align-items:center; gap:10px; }
.chat-head .bot-icon{ width:34px; height:34px; border-radius:50%; background: rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.chat-head .bot-icon svg{ width:18px; height:18px; color:#fff; }
.chat-head-title{ font-weight:700; font-size:0.92rem; display:flex; align-items:center; gap:7px; }
.chat-head-title .dot{ width:8px; height:8px; border-radius:50%; background: var(--lime); animation: breathe 4s ease-in-out infinite; }
.chat-head-sub{ font-size:0.7rem; color:#c3ccdd; }
.chat-close{ margin-left:auto; background:none; border:none; color:#c3ccdd; cursor:pointer; padding:4px; }
.chat-ai-tag{ font-size:0.6rem; font-weight:800; letter-spacing:0.05em; background: rgba(255,255,255,0.18); padding:2px 8px; border-radius:999px; margin-left:8px; }
.chat-body{ flex:1; overflow-y:auto; padding: 16px; background: var(--off-white); display:flex; flex-direction:column; gap:10px; }
.chat-msg{ max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size:0.87rem; line-height:1.45; }
.chat-msg.bot{ background:#fff; border:1px solid var(--line); color: var(--ink); align-self:flex-start; border-bottom-left-radius:4px; }
.chat-msg.user{ background: var(--navy); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.chat-suggestions{ display:flex; flex-wrap:wrap; gap:6px; padding: 0 16px 12px; background:var(--off-white); }
.chat-chip{ font-size:0.76rem; font-weight:600; background:#fff; border:1px solid var(--line); color: var(--teal-deep); padding:7px 12px; border-radius: var(--radius-pill); cursor:pointer; }
.chat-chip:hover{ background: var(--lime-soft); }
.chat-input-row{ display:flex; gap:8px; padding: 12px; border-top:1px solid var(--line); background:#fff; }
.chat-input-row input{ flex:1; border:1px solid var(--line); border-radius: var(--radius-pill); padding: 10px 16px; font-size:0.86rem; font-family:inherit; outline:none; }
.chat-input-row input:focus{ border-color: var(--teal); }
.chat-send{ width:38px; height:38px; border-radius:50%; border:none; cursor:pointer; background: var(--teal-deep); color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.chat-typing{ display:flex; gap:4px; padding: 4px 2px; }
.chat-typing span{ width:6px; height:6px; border-radius:50%; background: var(--ink-soft); opacity:0.5; animation: typing 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2){ animation-delay:0.2s; }
.chat-typing span:nth-child(3){ animation-delay:0.4s; }
@keyframes typing{ 0%,60%,100%{ transform: translateY(0); opacity:0.4;} 30%{ transform: translateY(-4px); opacity:1;} }

/* ==========================================================================
   BOTTOM TAB BAR (mobile)
   ========================================================================== */
.tabbar{ position: fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:430px; background:#fff; border-top:1px solid var(--line); display:flex; justify-content:space-around; padding: 9px 4px 12px; box-shadow: 0 -4px 20px rgba(27,43,74,0.06); z-index:80; }
.tab{ display:flex; flex-direction:column; align-items:center; gap:3px; color: var(--ink-soft); flex:1; }
.tab svg{ width:21px; height:21px; }
.tab span{ font-size:0.6rem; font-weight:700; }
.tab.active{ color: var(--teal-deep); }
.tab.active .tab-icon-wrap{ background: var(--lime-soft); border-radius:10px; padding:3px 11px; }

/* ==========================================================================
   RESPONSIVE — DESKTOP (≥900px)
   ========================================================================== */
@media (min-width: 900px){
  .shell{ max-width: 1180px; padding-bottom: 60px; padding-left:24px; padding-right:24px; }

  .topbar{ padding: 20px 0; display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; }
  .brand-text{ display:block; }
  .brand-name{ font-family: var(--font-display); font-weight:700; color: var(--navy); font-size:1.08rem; line-height:1.1; }
  .brand-sub{ font-size:0.64rem; color: var(--ink-soft); letter-spacing:0.05em; text-transform:uppercase; }

  .desktop-nav{ display:flex; align-items:center; gap:2px; background:#fff; border:1px solid var(--line); padding:5px; border-radius:999px; box-shadow: var(--shadow-soft); justify-self:center; }
  .desktop-nav a{ padding:9px 16px; border-radius:999px; font-size:0.83rem; font-weight:700; color:var(--navy-soft); }
  .desktop-nav a.active{ background: var(--navy); color:#fff; }

  .page-intro{ padding: 6px 0 16px; }

  .section-label{ margin: 30px 0 14px; padding:0; }
  .section-pad{ padding:0; }

  .hero-row{ display:grid; grid-template-columns: 1.5fr 1fr; gap:20px; margin: 6px 0 8px; }
  .app-hero{ margin:0; padding: 30px 32px 32px; }
  .app-hero h1{ font-size:1.7rem; }
  .app-hero p{ font-size:0.95rem; max-width:46ch; }
  .quick-panel-desktop{ display:flex; flex-direction:column; gap:8px; background:#fff; border-radius:22px; padding:20px; box-shadow: var(--shadow-soft); justify-content:center; }
  .quick-panel-desktop .qp-title{ font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--ink-soft); margin-bottom:2px; }
  .qp-row{ display:flex; align-items:center; gap:12px; padding:10px 10px; border-radius:12px; }
  .qp-row:hover{ background: var(--off-white); }
  .qp-row .quick-icon{ width:38px; height:38px; border-radius:11px; box-shadow:none; background: var(--lime-soft); color: var(--teal-deep); }
  .qp-row .quick-icon svg{ width:17px; height:17px; }
  .qp-row-label{ font-size:0.86rem; font-weight:700; color:var(--navy); }
  .quickgrid.mobile-only{ display:none; }

  .alert-card{ margin: 0 0 22px; align-items:center; }

  .cardrow{ display:grid; grid-template-columns: repeat(4,1fr); overflow:visible; padding:0; margin-bottom:0; }
  .cardrow.cols-3{ grid-template-columns: repeat(3,1fr); }
  .mini-card{ min-width:0; }

  .grid{ padding:0; }

  .list-card{ margin:0; }
  .linklist{ padding:0; }
  .accordion-item{ margin: 0 0 12px; }
  .checklist-card{ margin:0; }
  .progress-hero-card{ margin:0 0 22px; }
  .quote-card{ margin:0 0 18px; }
  .try-today-card{ margin:0 0 18px; }

  .search-bar{ padding:0; }
  .filter-row{ padding:0; overflow:visible; flex-wrap:wrap; }

  .tabbar{ display:none; }
  .chat-fab{ right: 32px; bottom: 32px; }
  .chat-panel{ right: 32px; bottom: 104px; }
  .chat-teaser{ right: 32px; bottom: 168px; }

  .mini-footer{ padding: 40px 0 20px; text-align:left; display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); margin-top:20px; }
}

@media (min-width:900px) and (max-width:1120px){
  .grid-4{ grid-template-columns: repeat(3,1fr); }
}

/* Lumi chat — temporarily disabled. Remove this rule to re-enable. */
#chatFab, #chatTeaser, #chatPanel { display: none !important; }
