/* =====================================================================
   POP v2 — Space Grotesk display layer + per-view statement heroes +
   playful physics (owned by the POP-core build agent, Jul 2 2026).
   Loads AFTER styles.css / reskin-family.css / reskin-dash.css, so
   equal-specificity selectors here win. CSS-only overrides — zero
   markup hooks renamed, app.js untouched (RESKIN-CONTRACT.md).
   All new class names are namespaced pp- (mount divs are additive
   index.html insertions; content rendered by js/pop.js).
   ===================================================================== */

:root{
  --pp-display:"Space Grotesk","Hanken Grotesk",system-ui,-apple-system,sans-serif;
  --pp-ink:#241b26;
  --pp-ink-2:#3d2e40;
  --pp-hero-mut:#9b8ba0;
  --pp-hero-suffix:#6d5c72;
  --pp-hero-line:#c9b9cf;
}

/* ---------------------------------------------------------------------
   1 · TYPOGRAPHY — Space Grotesk becomes the display face app-wide.
   Hanken Grotesk stays for body/UI. Fraunces survives ONLY as the Home
   affirmation line (#view-home .skippy-text.hm-affirm keeps var(--serif)
   at higher specificity in styles.css — deliberately not overridden here).
   --------------------------------------------------------------------- */
h1,h2,h3,
.hm-greet2,
.skippy-text,.skippy-name,
.hm-stat-num,.hm-biz-num,
.hc-score-big .num,.hc-food-top .v2,
.dc-m .val,.dc-gz .gznum,.dc-dcard .dval,.dc-prio .rk,
.cyc-ph .cpname,.mk-name,.mk-val,.dc-chathead .av,
.sk-who,.sk-hub-greet,.sk-hub-tt,
.day-cell .dnum{
  font-family:var(--pp-display);
}
/* View titles: Space Grotesk 700, upright (replaces the Fraunces italic) */
.topbar h1{
  font-family:var(--pp-display);font-style:normal;font-weight:700;
  letter-spacing:-0.03em;
}
/* Greeting display line — big, bold, upright, still plum */
.hm-greet2{font-style:normal;font-weight:700;letter-spacing:-0.02em;}
/* Big stat numbers get display tracking */
.hm-stat-num,.hm-biz-num{letter-spacing:-0.03em;}
/* Higher-specificity re-declarations (earlier files set these with an id) */
#view-calendar .day-cell .dnum{font-family:var(--pp-display);}
#view-business .biz-kpi .val{font-family:var(--pp-display);letter-spacing:-0.02em;}
#view-health .dc-m .val{font-family:var(--pp-display);}
#view-health .hc-score-big .num,
#view-health .dc-gz .gznum,
#view-health .dc-dcard .dval,
#view-health .hc-food-top .v2{font-family:var(--pp-display);font-style:normal;}
/* Health inner-voice quote loses Fraunces too (Fraunces = affirmation only) */
#view-health .hc-feedback .quote{font-family:var(--pp-display);font-style:normal;}
/* Skippy School hub display line — upright Space Grotesk (italic was Fraunces-era) */
#view-skippy .skippy-text{font-style:normal;font-weight:700;letter-spacing:-0.02em;}

/* ---------------------------------------------------------------------
   2 · HERO MOUNTS — additive divs; empty until js/pop.js renders,
   collapsed before that (no phantom margin flash).
   --------------------------------------------------------------------- */
.pp-mount{margin:14px 18px 0;}
.pp-mount:empty{display:none;margin:0;}
/* Calendar's mounts live INSIDE main.page (already 18px-padded) */
#view-calendar .pp-mount{margin:6px 0 0;}
#pp-upnext-cal{margin-top:14px;}
@media (min-width:900px){
  #view-todo .pp-mount,#view-shopping .pp-mount,#view-finances .pp-mount{
    max-width:760px;margin-left:auto;margin-right:auto;padding:0 36px;
  }
}

/* ---------------------------------------------------------------------
   3 · DARK STATEMENT HERO (To-Do · Shopping · Finances) — ink card,
   overlapping organic circles bleeding off the top-right corner.
   --------------------------------------------------------------------- */
.pp-hero{
  position:relative;overflow:hidden;
  background:var(--pp-ink);border-radius:28px;padding:20px;
  color:#f6efe3;
}
.pp-hero::before,.pp-hero::after{
  content:"";position:absolute;border-radius:50%;pointer-events:none;
  opacity:.9;
}
.pp-hero::before{width:150px;height:150px;background:#d99a3a;top:-58px;right:-44px;}
.pp-hero::after{width:86px;height:86px;background:#b9603c;top:24px;right:-32px;}
.pp-hero > *{position:relative;z-index:1;}
.pp-eyebrow{
  font-size:12px;font-weight:600;color:var(--pp-hero-mut);
  letter-spacing:1px;text-transform:uppercase;
}
.pp-stat{
  font-family:var(--pp-display);font-size:54px;font-weight:700;
  color:#f6efe3;letter-spacing:-0.04em;line-height:1;margin-top:10px;
  font-variant-numeric:tabular-nums;
}
.pp-stat .pp-suffix{
  font-size:18px;font-weight:500;color:var(--pp-hero-suffix);
  letter-spacing:0;margin-left:6px;
}
.pp-pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:14px;}
.pp-pills[hidden]{display:none;}
.pp-pill{width:34px;height:8px;border-radius:4px;background:#3d2e40;flex:0 1 34px;}
.pp-pill.done{background:#8f9d6f;}
.pp-line{font-size:13px;font-weight:600;color:var(--pp-hero-line);margin-top:12px;}
.pp-line[hidden]{display:none;}
.pp-line .pp-star{color:#d99a3a;}
/* All-clear celebration state: sage-tinted ink, message replaces the count */
.pp-hero.pp-clear{background:#2e3626;}
.pp-hero.pp-clear::before{background:#8f9d6f;}
.pp-hero.pp-clear::after{background:#d99a3a;}
.pp-hero.pp-clear .pp-stat{
  font-size:24px;letter-spacing:-0.02em;line-height:1.25;max-width:82%;
}
.pp-hero.pp-clear .pp-line{color:#cbd4b4;}

/* ---------------------------------------------------------------------
   4 · CALENDAR — light on-page hero (cream, NOT ink) + clay UP NEXT banner
   --------------------------------------------------------------------- */
.pp-calhero{padding:2px 4px 0;}
.pp-cal-eyebrow{
  font-size:12px;font-weight:600;color:var(--muted);
  letter-spacing:1px;text-transform:uppercase;
}
.pp-cal-line{display:flex;align-items:baseline;gap:10px;margin-top:6px;}
.pp-cal-day{
  font-family:var(--pp-display);font-size:34px;font-weight:700;
  color:var(--text);letter-spacing:-0.03em;line-height:1.05;
}
.pp-cal-num{
  font-family:var(--pp-display);font-size:38px;font-weight:700;line-height:1;
  color:transparent;-webkit-text-stroke:2px #b9603c;letter-spacing:0;
}
@supports not (-webkit-text-stroke:2px #b9603c){
  .pp-cal-num{color:#b9603c;} /* stroke unsupported → solid clay numeral */
}
.pp-cal-sub{font-size:12px;font-weight:600;color:var(--muted);margin-top:4px;}

/* Clay UP NEXT banner — the calendar's dark moment, organic lighter-clay circles */
.pp-upnext{
  position:relative;overflow:hidden;display:block;
  background:#b9603c;border-radius:24px;padding:18px 20px;
  color:#fff7ef;transition:transform .12s ease;
}
.pp-upnext:active{transform:scale(0.97);}
.pp-upnext::before,.pp-upnext::after{
  content:"";position:absolute;border-radius:50%;pointer-events:none;
}
.pp-upnext::before{width:130px;height:130px;background:#c97a52;opacity:.55;top:-52px;right:-36px;}
.pp-upnext::after{width:74px;height:74px;background:#dc9a72;opacity:.5;top:26px;right:-26px;}
.pp-upnext > *{position:relative;z-index:1;}
.pp-up-eyebrow{
  font-size:12px;font-weight:600;color:#f3ddc9;
  letter-spacing:1px;text-transform:uppercase;
}
.pp-up-title{
  font-family:var(--pp-display);font-size:22px;font-weight:700;
  color:#fff7ef;letter-spacing:-0.02em;margin-top:6px;line-height:1.15;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.pp-up-sub{font-size:13px;font-weight:600;color:#f3c9ae;margin-top:3px;}
.pp-up-sub:empty{display:none;}

/* ---------------------------------------------------------------------
   5 · COLORED CALENDAR EVENTS — the mockup rotation replaces
   reskin-family's all-white .cal-block treatment. Color IS the identity,
   so the clay inset bar (::before) goes. Past events keep their fade
   (.cal-block-past never carries a cal-c class — app.js line 1364).
   --------------------------------------------------------------------- */
#view-calendar .cal-block.cal-c1,
#view-calendar .cal-block.cal-c2,
#view-calendar .cal-block.cal-c3,
#view-calendar .cal-block.cal-c4{
  box-shadow:none;padding-left:14px;
}
#view-calendar .cal-block.cal-c1::before,
#view-calendar .cal-block.cal-c2::before,
#view-calendar .cal-block.cal-c3::before,
#view-calendar .cal-block.cal-c4::before{display:none;}
#view-calendar .cal-block.cal-c1{background:#e9ddf1;}
#view-calendar .cal-block.cal-c1 .cal-block-title{color:#46255c;}
#view-calendar .cal-block.cal-c1 .cal-block-time{color:#8a6d9c;}
#view-calendar .cal-block.cal-c2{background:#f6e3bd;}
#view-calendar .cal-block.cal-c2 .cal-block-title{color:#5f4407;}
#view-calendar .cal-block.cal-c2 .cal-block-time{color:#a0812f;}
#view-calendar .cal-block.cal-c3{background:#f3d9cc;}
#view-calendar .cal-block.cal-c3 .cal-block-title{color:#6e3018;}
#view-calendar .cal-block.cal-c3 .cal-block-time{color:#a05f42;}
#view-calendar .cal-block.cal-c4{background:#e2e8d2;}
#view-calendar .cal-block.cal-c4 .cal-block-title{color:#3f4d28;}
#view-calendar .cal-block.cal-c4 .cal-block-time{color:#7c8b5c;}

/* ---------------------------------------------------------------------
   6 · BUSINESS — restrained POP: no ink hero (data-dense view). The FIRST
   KPI card (Weekly revenue) gets the organic-circle treatment as soft
   tints via layered radial gradients (pseudo-elements are taken by the
   status dot in reskin-dash.css — background-image is the clean slot).
   --------------------------------------------------------------------- */
#view-business .biz-kpis .biz-kpi:first-child{
  background-image:
    radial-gradient(circle 64px at 104% -14%, rgba(217,154,58,0.30), transparent 70%),
    radial-gradient(circle 40px at 86% -4%, rgba(185,96,60,0.22), transparent 70%);
  background-repeat:no-repeat;
}

/* ---------------------------------------------------------------------
   7 · PLAYFUL LAYER — press physics + checkbox pop + confetti pieces
   --------------------------------------------------------------------- */
/* Press compression on every tappable card/tile/chip/row (Home tiles
   already compress via styles.css .hm-* rules) */
.td-prio,.biz-kpi,.day-cell,.dc-m,.sk-kidcard,.sk-hub-card,.rep-link,
.seg-btn,.hp-btn,.dc-rangebar button,.tab,.biz-flag,.dc-gz{
  transition:transform .12s ease;
}
.td-prio:active,.biz-kpi:active,.day-cell:active,.dc-m:active,
.sk-kidcard:active,.sk-hub-card:active,.rep-link:active,
.seg-btn:active,.hp-btn:active,.dc-rangebar button:active,.tab:active,
.biz-flag:active,.dc-gz:active{
  transform:scale(0.97);
}

/* Checkbox spring — fires when app.js toggles .chk-done / li.done */
@keyframes ppPop{
  0%{transform:scale(0.55);}
  55%{transform:scale(1.18);}
  100%{transform:scale(1);}
}
.td-prio.chk-done .chk,
.dc-prio.chk-done .chk{animation:ppPop .32s cubic-bezier(.34,1.56,.64,1);}
.dc-protocol-list li.done .pchk{animation:ppPop .32s cubic-bezier(.34,1.56,.64,1);}

/* Confetti (26 pieces, injected by js/pop.js inside the celebrating hero) */
.pp-confetti{
  position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3;
}
.pp-cf{
  position:absolute;top:-12px;width:8px;height:8px;display:block;
  animation:ppFall .9s ease-in forwards;
}
@keyframes ppFall{
  to{transform:translateY(240px) rotate(540deg);opacity:0;}
}

/* ---------------------------------------------------------------------
   9 · COMPONENT PARITY (polish pass, Jul 2 2026) — roll the mockup
   language into EVERY Health + Business element. Nick: "the elements in
   the health tracker and business tracker are largely the same save the
   headers... I expect these updates to roll out across the board."
   CSS-only where possible; the pp- decorator in js/pop.js supplies the
   hooks CSS can't reach (initials squares, flag icon squares, lv-level
   classes to beat inline styles, leading-emoji strip). Applies at ALL
   widths — mobile verified at 390.
   --------------------------------------------------------------------- */

/* ---- 9a · HEALTH priorities (.dc-prio, all hp panels) — kill the red
   left bars → floating white cards radius 20 + shadow-card; the number
   becomes a 28px plum-tinted circle badge; HIGH/MED/LOW pills → chip
   recipe (clay/gold/sage 15% tints, matching -ink text). The pp-lv-*
   classes come from the decorator because app markup carries inline
   colors (rgba(251,113,133,.16)/#c04040 etc.) — !important is genuinely
   required to beat those inline styles. ---- */
#view-health .card:has(> .dc-prio){
  background:transparent;border:none;box-shadow:none;
  padding:0 2px !important; /* inline padding:6px 19px on the container */
}
#view-health .dc-prio{
  background:var(--card);border:none;border-left:none;border-radius:20px;
  box-shadow:var(--shadow-card);padding:14px 16px;margin-bottom:10px;
  gap:12px;align-items:flex-start;
}
#view-health .dc-prio .rk{
  font-family:var(--pp-display);font-weight:700;font-size:13px;font-style:normal;
  flex:0 0 28px;width:28px;height:28px;min-width:0;border-radius:50%;
  background:#e9ddf1;color:#46255c;
  display:flex;align-items:center;justify-content:center;
}
#view-health .dc-prio .pt{font-size:14px;font-weight:600;color:var(--text);}
#view-health .dc-prio .pw{font-size:12px;color:var(--muted);margin-top:3px;line-height:1.5;}
#view-health .dc-prio .lv{
  border-radius:999px;padding:3px 10px;font-size:10px;letter-spacing:.05em;
}
#view-health .lv.pp-lv-high{background:rgba(185,96,60,.15) !important;color:#a3452a !important;}
#view-health .lv.pp-lv-med{background:rgba(217,154,58,.15) !important;color:#95651c !important;}
#view-health .lv.pp-lv-low{background:rgba(143,157,111,.15) !important;color:#5a7a52 !important;}

/* Nested "Pending tests" details inside the priorities card — the inline
   cyan-lilac border-left tile joins the language: lilac tile, radius 16,
   no straight left border (inline style ⇒ !important required). */
#view-health details.hc-details[style*="8b7cff"]{
  background:rgba(233,221,241,.5) !important;border-left:none !important;
  border-radius:16px;padding:12px 14px;
}
#view-health details.hc-details[style*="8b7cff"] summary{font-weight:600;}

/* ---- 9b · HEALTH experiments — butter-tinted tiles, radius 18,
   eyebrow-styled "since" dates, Space Grotesk titles. The wrapping
   .dc-exgrid card dissolves so the tiles float on the cream page
   (inline padding:14px ⇒ !important). ---- */
#view-health .card.dc-exgrid{
  background:transparent;border:none;box-shadow:none;padding:0 2px !important;
}
#view-health .dc-exp{
  background:rgba(246,227,189,.45);border:none;border-radius:18px;
  padding:14px 15px;
}
#view-health .dc-exp .ex-nm{
  font-family:var(--pp-display);font-size:13px;font-weight:600;color:#5f4407;
}
#view-health .dc-exp .ex-since{
  font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  color:#a0812f;
}
#view-health .dc-exp .ex-w{color:#7d6a3f;}

/* ---- 9c · HEALTH protocol summary bar — proper white card with a 36px
   sage icon square (checklist glyph) + chevron. Open state keeps the
   dark-sage behavior from reskin-dash. padding/color carry !important in
   styles.css, so the overrides must too (later file wins the tie). ---- */
#view-health .dc-protocol-summary{
  display:flex;align-items:center;gap:12px;list-style:none;
  background:var(--card);border-radius:20px;margin:8px 0;
  box-shadow:var(--shadow-card);
  padding:12px 14px !important;
  color:var(--text) !important;font-weight:600 !important;font-size:13.5px;
}
#view-health .dc-protocol-summary::-webkit-details-marker{display:none;}
#view-health .dc-protocol-summary::before{
  content:"";flex:0 0 36px;width:36px;height:36px;border-radius:12px;
  background:rgba(143,157,111,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7a52' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Cpath d='M8 12.5l2.6 2.6L16.5 9'/%3E%3C/svg%3E") center/18px 18px no-repeat;
}
#view-health .dc-protocol-summary .chev{margin-left:auto;color:var(--sage);}
#view-health .dc-protocol-details[open] .dc-protocol-summary{
  background:var(--tile-sage-ink);color:#eef3e2 !important;
}
#view-health .dc-protocol-details[open] .dc-protocol-summary::before{
  background-color:rgba(255,255,255,.14);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8d2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Cpath d='M8 12.5l2.6 2.6L16.5 9'/%3E%3C/svg%3E");
}
#view-health .dc-protocol-details[open] .dc-protocol-summary .chev{color:var(--tile-sage);}

/* ---- 9d · HEALTH sweep — remaining pre-mockup accents: cards that carry
   an inline cyan/gold border-left (Insights etc.) lose the straight edge
   and get a rounded inset sage bar instead (health domain color).
   Inline style ⇒ !important required, same pattern reskin-family used
   on Finances. ---- */
#view-health .card[style*="border-left"]{border-left:none !important;position:relative;}
#view-health .card[style*="border-left"]::before{
  content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;
  border-radius:2px;background:var(--sage);
}

/* ---- 9e · BUSINESS "Needs your judgment" flags — 36px status-tinted
   icon square (flag glyph, stroke 1.8 currentColor — injected by the
   decorator) + the status dot survives as a ringed badge on the square's
   corner. Layout rules only apply once decorated ([data-pp-done]) so an
   undecorated card (JS failed) keeps its previous good layout. ---- */
#view-business .biz-flag[data-pp-done]{
  padding:14px 16px 14px 64px;
}
#view-business .biz-flag .pp-flagsq{
  position:absolute;left:14px;top:14px;width:36px;height:36px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(217,154,58,.15);color:#95651c;
}
#view-business .biz-flag.urgent .pp-flagsq{background:rgba(185,96,60,.15);color:#a3452a;}
#view-business .biz-flag.watch .pp-flagsq{background:rgba(143,157,111,.15);color:#5a7a52;}
#view-business .biz-flag .pp-flagsq svg{width:18px;height:18px;}
/* status dot → badge riding the icon square's top-right corner */
#view-business .biz-flag[data-pp-done]::before{
  left:44px;top:10px;box-shadow:0 0 0 2px var(--card);
}
#view-business .biz-flag[data-pp-done] .ttl{font-size:14px;font-weight:600;}
#view-business .biz-flag[data-pp-done] .meta{font-size:12px;}

/* ---- 9e-health · the Health-view "Read first" callout (Chantelle's Cycle &
   hormone optimizer) reuses .biz-flag, so pop.js injects the same .pp-flagsq
   icon square + flag <svg>. The sizing/position rules above are
   #view-business-scoped ONLY, so in #view-health the svg was unconstrained
   and blew up to full column width (Nick's live report). Mirror the icon-
   square treatment here so the flag renders as a 36px square with an 18px
   glyph. position:relative is set explicitly (the static markup lacks the
   inline position the live business flags carry). ---- */
#view-health .biz-flag[data-pp-done]{position:relative;padding:14px 16px 14px 64px;}
#view-health .biz-flag .pp-flagsq{
  position:absolute;left:14px;top:14px;width:36px;height:36px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(217,154,58,.15);color:#95651c;
}
#view-health .biz-flag.urgent .pp-flagsq{background:rgba(185,96,60,.15);color:#a3452a;}
#view-health .biz-flag.watch .pp-flagsq{background:rgba(143,157,111,.15);color:#5a7a52;}
#view-health .biz-flag .pp-flagsq svg{width:18px;height:18px;flex:0 0 18px;}

/* ---- 9f · BUSINESS watchlist — proper list-group rows: 32px initials
   square (decorator-injected .pp-avsq), inline dot hidden (the pill
   already carries status), status pill on the chip recipe, name pushes
   the pill to the row's right edge. The reason line's inline
   padding-left:16px indented under a dot that no longer exists ⇒
   !important to realign it with the name. ---- */
#view-business #ov-watch .biz-watch-item[data-pp-done]{
  position:relative;padding:12px 2px 12px 43px;
}
#view-business #ov-watch .pp-avsq{
  position:absolute;left:0;top:12px;width:32px;height:32px;border-radius:12px;
  background:var(--chip-bg);color:var(--tile-butter-ink);
  font-family:var(--pp-display);font-size:11px;font-weight:700;letter-spacing:.02em;
  display:flex;align-items:center;justify-content:center;
}
#view-business #ov-watch .biz-watch-item .nm{flex:1;min-width:0;font-size:13px;font-weight:600;}
#view-business #ov-watch .biz-watch-item[data-pp-done] .nm .dot{display:none;}
#view-business #ov-watch .biz-watch-item .st{
  border-radius:999px;padding:3px 10px;font-size:10px;letter-spacing:.04em;
  align-self:center;white-space:nowrap;
}
#view-business #ov-watch .biz-watch-item[data-pp-done] > div[style*="padding-left"]{
  padding-left:0 !important;
}

/* ---- 9g · BUSINESS number sweep — Space Grotesk on the remaining
   figures (waterfall values, table numerics). KPI .val already covered
   in §1, which also hits the Finance-tab #biz-fkpis tiles. ---- */
#view-business .wf .v,
#view-business td.num{font-family:var(--pp-display);font-variant-numeric:tabular-nums;}

/* ---------------------------------------------------------------------
   8 · REDUCED MOTION — kill the physics, keep the content
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .td-prio.chk-done .chk,.dc-prio.chk-done .chk,
  .dc-protocol-list li.done .pchk{animation:none;}
  .pp-cf{animation:none;display:none;}
  .td-prio:active,.biz-kpi:active,.day-cell:active,.dc-m:active,
  .sk-kidcard:active,.sk-hub-card:active,.rep-link:active,
  .seg-btn:active,.hp-btn:active,.dc-rangebar button:active,.tab:active,
  .biz-flag:active,.dc-gz:active,.pp-upnext:active{transform:none;}
}

/* ---------------------------------------------------------------------
   10 · DUE-DATE EDIT CHIPS (pp-date-*, Jul 2 2026) — decorator-injected
   by js/pop.js onto app.js's To-Do rows (all three panels). Chip recipe
   (11px/600, pill), gold tint when due today, clay when overdue —
   mirrors the row's own .td-today/.td-overdue accents. The invisible
   native <input type="date"> overlays the chip so a tap opens the OS
   picker (iOS wheel / desktop calendar). Read-only variant (.pp-date-ro)
   on Business rows, which expose no Monday item id.
   --------------------------------------------------------------------- */
#view-todo .pp-date-wrap{
  position:relative;display:inline-flex;align-items:center;margin-top:6px;
}
#view-todo .pp-date-chip{
  display:inline-flex;align-items:center;gap:5px;border:none;cursor:pointer;
  background:var(--chip-bg);color:var(--chip-ink);border-radius:999px;
  padding:4px 11px;font-family:var(--sans);font-size:11px;font-weight:600;
  letter-spacing:.02em;line-height:1.3;white-space:nowrap;
}
#view-todo .pp-date-chip::before{content:"✎";font-size:10px;opacity:.65;}
#view-todo .pp-date-chip.pp-due-today{background:rgba(217,154,58,.18);color:#95651c;}
#view-todo .pp-date-chip.pp-due-over{background:rgba(251,113,133,.16);color:#c04040;}
#view-todo .pp-date-chip.pp-date-ro{cursor:default;opacity:.65;}
#view-todo .pp-date-chip.pp-date-ro::before{content:"";}
/* invisible native date input riding the chip — the real tap target */
#view-todo .pp-date-input{
  position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;
  -webkit-appearance:none;appearance:none;border:0;padding:0;margin:0;
  font-size:16px; /* iOS: ≥16px blocks the focus auto-zoom */
}
/* saving spinner rides the chip's right edge */
#view-todo .pp-date-chip.pp-date-saving::after{
  content:"";width:9px;height:9px;border-radius:50%;flex:0 0 auto;
  border:2px solid currentColor;border-top-color:transparent;
  animation:pp-date-spin .7s linear infinite;
}
@keyframes pp-date-spin{to{transform:rotate(360deg)}}
#view-todo .pp-date-err{
  font-size:10.5px;font-weight:600;color:#c04040;margin-left:8px;white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){
  #view-todo .pp-date-chip.pp-date-saving::after{animation:none;opacity:.5;}
}

/* =====================================================================
   v59 — HEALTH pending-tests expander (hl- namespace, behavior in
   js/health.js). Native <details>/<summary> styled to the app language:
   lilac card, count chip, 22px sage check circles, checked rows strike +
   fade, all-checked celebration. Replaces the old nested hc-details tile. */
#view-health details.hl-pt{
  margin:9px 0 4px;background:rgba(233,221,241,.5);border:none;
  border-radius:16px;padding:11px 14px;box-shadow:none;
}
#view-health .hl-pt-sum{
  display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;
  font-weight:600;font-size:13.5px;color:var(--plum);
}
#view-health .hl-pt-sum::-webkit-details-marker{display:none;}
#view-health .hl-pt-sum::after{
  content:"\203A";margin-left:auto;font-size:18px;line-height:1;color:var(--plum);
  transform:rotate(90deg);transition:transform .18s ease;opacity:.7;
}
#view-health details.hl-pt[open] .hl-pt-sum::after{transform:rotate(270deg);}
#view-health .hl-pt-label{flex:0 1 auto;}
#view-health .hl-pt-chip{
  flex:0 0 auto;border-radius:999px;padding:2px 10px;font-size:10.5px;
  font-weight:700;letter-spacing:.03em;
  background:rgba(90,38,96,.1);color:var(--plum);white-space:nowrap;
}
#view-health .hl-pt-list{list-style:none;margin:11px 0 2px;padding:0;}
#view-health .hl-pt-row{
  display:flex;align-items:flex-start;gap:11px;padding:8px 2px;
  border-top:1px solid rgba(90,38,96,.09);font-size:12.5px;line-height:1.55;
  color:var(--text);transition:opacity .2s ease;
}
#view-health .hl-pt-row:first-child{border-top:none;}
#view-health .hl-pt-chk{
  flex:0 0 22px;width:22px;height:22px;margin-top:1px;border-radius:50%;
  border:2px solid var(--sage);background:transparent;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:background .16s ease,border-color .16s ease;
}
#view-health .hl-pt-chk::after{
  content:"";width:6px;height:11px;margin-top:-2px;
  border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg) scale(0);
  transition:transform .16s ease;
}
#view-health .hl-pt-row.hl-done .hl-pt-chk{background:var(--sage);border-color:var(--sage);}
#view-health .hl-pt-row.hl-done .hl-pt-chk::after{transform:rotate(45deg) scale(1);}
#view-health .hl-pt-chk:focus-visible{outline:2px solid var(--plum);outline-offset:2px;}
#view-health .hl-pt-txt{flex:1;}
#view-health .hl-pt-row.hl-done .hl-pt-txt{
  text-decoration:line-through;opacity:.5;
}
#view-health .hl-new{
  display:inline-block;vertical-align:middle;margin-right:7px;
  border-radius:999px;padding:1px 7px;font-size:9px;font-weight:800;
  letter-spacing:.06em;background:rgba(217,154,58,.2);color:#8a5f14;
}
/* All-checked: quiet sage celebration on the card */
#view-health details.hl-pt.hl-all-done{background:rgba(143,157,111,.16);}
#view-health details.hl-pt.hl-all-done .hl-pt-sum,
#view-health details.hl-pt.hl-all-done .hl-pt-sum::after{color:#5a7a52;}
#view-health details.hl-pt.hl-all-done .hl-pt-chip{
  background:rgba(143,157,111,.28);color:#4d6b45;
}
@media (prefers-reduced-motion:reduce){
  #view-health .hl-pt-sum::after,
  #view-health .hl-pt-chk,
  #view-health .hl-pt-chk::after{transition:none;}
}

/* =====================================================================
   PROTOCOL TRACKER v2 — pt- namespace (js/protocol.js). Additive daily-use
   component mounted per Health person panel. When it renders, .pt-live on
   the panel hides the old static protocol card (fail-soft: no class → old
   card visible). Mobile-first 390px; now-card caps ~640px on desktop.
   ===================================================================== */

/* Hide ONLY the primary daily-protocol card (the FIRST .dc-protocol-details in
   the panel) + its section title when the tracker renders. The Recs/experiments/
   Proposed-testing/Next-additions tier cards further down share the same class
   but are RECOMMENDATIONS, not the daily checklist — they must stay visible.
   (Bug fixed Jul 3 2026: the old `> .dc-protocol-details` rule hid ALL of them,
   so the recommendations section rendered blank on Chantelle/Noah/Willow.) */
#view-health .hp-panel.pt-live > details.dc-protocol-details:first-of-type{ display:none; }
#view-health .hp-panel.pt-live > .section-title:has(+ details.dc-protocol-details:first-of-type){ display:none; }

.pt-mount{ display:block; }
.pt-comp{ margin:2px 0 14px; }

/* ---- NOW CARD (the hero) ---- */
.pt-now{
  position:relative; overflow:hidden;
  background:var(--ink); color:var(--cream);
  border-radius:28px; padding:20px 20px 18px;
  box-shadow:0 10px 30px rgba(36,27,38,.18);
  max-width:640px;
}
.pt-now.pt-done{
  background:linear-gradient(160deg,#2c3327 0%,#241b26 70%);
}
.pt-deco{ position:absolute; inset:0; pointer-events:none; }
.pt-deco .pt-c1,.pt-deco .pt-c2{ position:absolute; border-radius:50%; opacity:.5; }
.pt-deco .pt-c1{ width:120px;height:120px; right:-38px; top:-40px;
  background:radial-gradient(circle at 30% 30%,rgba(217,154,58,.55),rgba(217,154,58,0) 70%); }
.pt-deco .pt-c2{ width:100px;height:100px; left:-34px; bottom:-36px;
  background:radial-gradient(circle at 60% 40%,rgba(185,96,60,.5),rgba(185,96,60,0) 70%); }

.pt-eyebrow{
  position:relative; z-index:1;
  font-family:var(--pp-display);
  font-size:11px; font-weight:700; letter-spacing:.14em;
  color:var(--gold); text-transform:uppercase; margin-bottom:8px;
}
.pt-head{ position:relative; z-index:1; display:flex; align-items:baseline; gap:10px; }
.pt-title{ font-family:var(--pp-display); font-size:22px; font-weight:700; color:var(--cream); line-height:1.1; }
.pt-count{ margin-left:auto; font-family:var(--pp-display); font-weight:600;
  font-size:12.5px; color:#d6c7d9; background:rgba(255,255,255,.08);
  padding:3px 9px; border-radius:999px; white-space:nowrap; }

/* 7-day adherence dots */
.pt-dots{ position:relative; z-index:1; display:flex; gap:6px; margin:10px 0 12px; }
.pt-dot{ width:11px;height:11px;border-radius:50%; box-sizing:border-box; }
.pt-dot-full{ background:var(--sage); }
.pt-dot-partial{ background:var(--gold); }
.pt-dot-miss{ background:transparent; border:1.5px solid rgba(246,239,227,.34); }
.pt-dot-today{ outline:2px solid rgba(246,239,227,.85); outline-offset:2px; }

/* dose-line list */
.pt-items{ position:relative; z-index:1; display:flex; flex-direction:column; gap:7px; margin-bottom:12px; }
.pt-item{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
.pt-item.pt-skipped{ opacity:.4; text-decoration:line-through; }
.pt-i-name{ font-size:13px; font-weight:600; color:var(--cream); }
.pt-i-dose{ font-size:11px; color:#b8a9bb; }
.pt-i-note{ font-size:9.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink); background:var(--gold); padding:1px 6px; border-radius:999px; cursor:help; }

/* expand → per-item exception rows */
.pt-expand{ position:relative; z-index:1; margin-bottom:12px; }
.pt-expand-sum{ list-style:none; cursor:pointer; font-size:12px; color:#c9bccb;
  display:inline-flex; align-items:center; gap:6px; }
.pt-expand-sum::-webkit-details-marker{ display:none; }
.pt-expand-sum::after{ content:"⌄"; font-size:14px; transition:transform .2s ease; }
.pt-expand[open] .pt-expand-sum::after{ transform:rotate(180deg); }
.pt-ex-list{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.pt-ex-row{ display:flex; align-items:center; gap:10px; }
.pt-ex-chk{ width:20px;height:20px;flex:none;border-radius:50%;
  border:2px solid rgba(246,239,227,.4); background:transparent; cursor:pointer;
  position:relative; transition:background .15s ease,border-color .15s ease; }
.pt-ex-chk.pt-ex-on{ background:var(--sage); border-color:var(--sage); }
.pt-ex-chk.pt-ex-on::after{ content:""; position:absolute; left:6px; top:2.5px;
  width:5px;height:10px;border:solid var(--ink);border-width:0 2px 2px 0; transform:rotate(45deg); }
.pt-ex-chk:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
.pt-ex-name{ font-size:13px; color:var(--cream); }
.pt-ex-row .pt-ex-chk:not(.pt-ex-on) ~ .pt-ex-name{ opacity:.5; text-decoration:line-through; }

/* actions */
.pt-actions{ position:relative; z-index:1; display:flex; align-items:center; gap:12px; }
.pt-done-btn{
  flex:1; border:0; cursor:pointer;
  font-family:var(--pp-display); font-weight:700; font-size:16px; color:var(--ink);
  background:linear-gradient(180deg,#e7ad4e,#d99a3a); border-radius:999px;
  padding:14px 20px; box-shadow:0 6px 16px rgba(217,154,58,.4);
  transition:transform .12s cubic-bezier(.34,1.56,.64,1),box-shadow .12s ease;
}
.pt-done-btn:active{ transform:scale(.95); box-shadow:0 3px 10px rgba(217,154,58,.35); }
.pt-done-state{ flex:1; display:flex; flex-direction:column; gap:2px; }
.pt-done-line{ font-family:var(--pp-display); font-weight:700; font-size:15px; color:var(--sage); }
.pt-next{ font-size:12px; color:#b8a9bb; }
.pt-undo{ background:transparent; border:0; color:#9c8fa0; font-size:12px; cursor:pointer;
  text-decoration:underline; padding:6px; }

/* weekly body */
.pt-weekly{ position:relative; z-index:1; display:flex; flex-direction:column; gap:10px; margin-bottom:4px; }
.pt-wk-row{ display:flex; align-items:center; gap:10px; }
.pt-wk-main{ flex:1; display:flex; flex-direction:column; gap:1px; }
.pt-wk-chk{ width:26px;height:26px;flex:none;border-radius:50%;
  border:2px solid var(--gold); background:transparent; color:var(--gold);
  display:flex;align-items:center;justify-content:center; font-size:16px; font-weight:700;
  cursor:pointer; line-height:1; }
.pt-wk-chk:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
.pt-wk-dot{ width:8px;height:8px;flex:none;border-radius:50%;background:rgba(246,239,227,.4); }
.pt-wk-count{ font-family:var(--pp-display); font-weight:600; font-size:11.5px; color:var(--sage);
  white-space:nowrap; }

/* CHIP STRIP */
.pt-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; max-width:640px; }
.pt-chip{ position:relative; border:0; cursor:pointer;
  font-family:var(--pp-display); font-weight:600; font-size:12.5px;
  color:var(--ink); background:#efe6d6; border-radius:999px; padding:7px 13px;
  display:inline-flex; align-items:center; gap:6px; transition:transform .1s ease; }
.pt-chip:active{ transform:scale(.96); }
.pt-chip-done{ background:rgba(143,157,111,.22); color:#4d6b45; }
.pt-chip-now{ background:var(--ink); color:var(--cream); }
.pt-chip-sel{ box-shadow:0 0 0 2px var(--gold); }
.pt-chip-nowlbl{ font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--gold); }
.pt-chip-dot{ width:7px;height:7px;border-radius:50%;background:var(--clay); }

/* empty state */
.pt-empty{ background:#efe6d6; border-radius:24px; padding:26px 20px; text-align:center;
  max-width:640px; }
.pt-empty-mark{ font-size:22px; color:var(--sage); margin-bottom:6px; }
.pt-empty-txt{ font-family:var(--pp-display); font-weight:600; font-size:14px; color:var(--muted); }

/* confetti (self-contained, mirrors pp- engine) */
.pt-confetti{ position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:4; }
.pt-cf{ position:absolute; top:-12px; width:8px; height:8px; display:block;
  animation:ptFall .95s ease-in forwards; }
@keyframes ptFall{ to{ transform:translateY(300px) rotate(560deg); opacity:0; } }

@media (prefers-reduced-motion:reduce){
  .pt-cf{ animation:none; display:none; }
  .pt-done-btn,.pt-chip{ transition:none; }
}

/* ---------------------------------------------------------------------
   NO UNLABELED BLOCKS (Nick, Jul 3): short timeline events (compact/tight)
   only had vertical room for the time line — the title div rendered but
   clipped below the fold, leaving apparently label-less blocks. Fix: for
   compact/tight blocks, time + title share ONE line (title ellipsizes).
   Structure per app.js renderCalendar: .cal-block > .cal-block-time +
   .cal-block-title (direct children; the ::before accent is absolute so
   it never joins the flex flow).
   --------------------------------------------------------------------- */
#view-calendar .cal-block.cal-compact,
#view-calendar .cal-block.cal-block-tight{
  display:flex;flex-direction:row;align-items:center;gap:6px;overflow:hidden;
}
#view-calendar .cal-block.cal-compact .cal-block-time,
#view-calendar .cal-block.cal-block-tight .cal-block-time{flex:0 0 auto;}
#view-calendar .cal-block.cal-compact .cal-block-title,
#view-calendar .cal-block.cal-block-tight .cal-block-title{
  flex:1 1 auto;min-width:0;display:block;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  -webkit-line-clamp:unset;
}

/* ---------------------------------------------------------------------
   CURRENT + UP NEXT stack (Jul 3 2026) — the calendar hero + home card now
   show a "Now" (in-progress) card ABOVE the "Up next" card. Same clay
   language; the Now variant reads slightly deeper + a gold "live" eyebrow
   so Current vs Up Next are distinguishable at a glance. Both mounts
   (#pp-upnext-cal on Calendar, the injected #hm-nownext on Home) reuse the
   existing .pp-upnext / .hm-upnext recipes — these rules only add the small
   deltas (stack gap, hidden state, live accents).
   --------------------------------------------------------------------- */
/* Calendar — space the stacked banners; deepen the Now banner + gold eyebrow */
#pp-upnext-cal .pp-nownext{margin-bottom:12px;}
#pp-upnext-cal .pp-nownext[hidden]{display:none;}
#pp-upnext-cal .pp-nownext{background:#a3502e;}
#pp-upnext-cal .pp-nownext::before{background:#bd6c46;}
#pp-upnext-cal .pp-nownext::after{background:#d68b60;}
#pp-upnext-cal .pp-nownext .pp-up-eyebrow{color:#f6d9a8;}

/* Home — the injected Current card needs its OWN grid cell, stacked above the
   static Up Next anchor. Both carry .hm-upnext (grid-area:upnext), so without a
   dedicated area they'd collapse into one cell and overlap. Re-declare the grid
   template at EACH breakpoint with a leading full-width "nownext" row and pin
   the Current card to it. All three use #view-home .hm-grid specificity (0,1,1)
   so they consistently beat the base/desktop .hm-grid rules (0,1,0) that own the
   original templates. When #hm-nownext is [hidden] the row collapses to a
   zero-height empty auto track → no gap when nothing's in progress.
   Breakpoints mirror the originals: base 2-col (styles.css), ≥900 3-col
   (styles.css), ≥1100 3-col denser (desktop.css). */
#view-home .hm-grid{
  grid-template-areas:
    "nownext nownext"
    "upnext  upnext"
    "todo    today"
    "biz     biz"
    "shop    fin"
    "kids    kids";
}
@media (min-width:900px){
  #view-home .hm-grid{
    grid-template-areas:
      "nownext nownext nownext"
      "upnext  upnext  todo"
      "today   shop    fin"
      "biz     biz     biz"
      "kids    kids    kids";
  }
}
@media (min-width:1100px){
  #view-home .hm-grid{
    grid-template-areas:
      "nownext nownext nownext"
      "upnext  upnext  todo"
      "today   shop    fin"
      "biz     biz     kids";
  }
}
#hm-nownext.hm-nownext{grid-area:nownext;margin-bottom:0;}
.hm-nownext[hidden]{display:none;}
/* Filled clay icon square marks it as the active/in-progress block */
.hm-nownext .hm-upnext-ic{background:var(--clay);color:#fff;}
