/* ============================================================
   home-app.css — Personal > Home: a soft, "bubbly" widget board,
   and the "breathing to life" intro that plays on every sign-in.
   Colors come from theme tokens, so every scheme (Axiom dark,
   Editorial warm, Prime IV blue) looks right.
   ============================================================ */

/* springy, slightly-over-the-top easing used for the bubbly feel */
:root{ --hm-spring:cubic-bezier(.34,1.56,.64,1); --hm-soft:cubic-bezier(.2,.7,.2,1); --hm-r:18px; }

/* ---------- header ---------- */
.hm-loading{font-size:13px;color:var(--ink-mute);padding:30px 0;}
.hm-hello{display:grid;grid-template-columns:1fr auto;align-items:end;column-gap:16px;margin-bottom:22px;}
.hm-hello > .hm-eyebrow,.hm-hello > .hm-title,.hm-hello > .hm-date{grid-column:1;}
.hm-tools{grid-column:2;grid-row:1 / span 3;align-self:end;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.hm-customize{
  font:600 12.5px var(--sans);color:var(--ink-soft);background:var(--card-bg);border:1px solid var(--border);
  border-radius:999px;padding:8px 15px;cursor:pointer;
  transition:transform .35s var(--hm-spring),background .2s,color .2s,border-color .2s,box-shadow .2s;}
.hm-customize::before{content:'\2726  ';color:var(--accent);}
.hm-customize:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 6px 18px -8px rgba(0,0,0,.35);}
.hm-customize.on{background:var(--accent);border-color:var(--accent);color:#fff;}
.hm-customize.on::before{content:'\2713  ';color:#fff;}
.hm-eyebrow{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);margin-bottom:8px;}
.hm-title{font-family:var(--serif);font-size:30px;font-weight:600;color:var(--ink);line-height:1.15;}
.hm-date{font-size:13px;color:var(--ink-soft);margin-top:6px;}
.hm-muted{font-size:13px;color:var(--ink-soft);line-height:1.55;}
.hm-link{font-size:12.5px;font-weight:600;color:var(--accent);text-decoration:none;white-space:nowrap;}
.hm-link:hover{text-decoration:underline;}

/* ---------- the board ---------- */
.hm-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;grid-auto-flow:row dense;align-items:stretch;}
.hm-w{position:relative;grid-column:span 1;min-width:0;display:flex;flex-direction:column;
  transition:transform .45s var(--hm-spring);}
.hm-w[data-size="m"]{grid-column:span 2;}
.hm-w[data-size="l"]{grid-column:span 3;}
.hm-w[data-size="full"]{grid-column:1 / -1;}
.hm-wbody{flex:1;display:flex;flex-direction:column;min-width:0;}
.hm-wbody > *{flex:1;}

/* every widget is a soft card */
.hm-card,.hm-tile,.hm-biz{
  background:var(--card-bg);border:1px solid var(--border);border-radius:var(--hm-r);
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px -18px rgba(0,0,0,.45), 0 2px 6px -3px rgba(0,0,0,.12);
  transition:transform .45s var(--hm-spring), box-shadow .3s ease, border-color .2s, background .2s;}
.hm-card{padding:20px 24px;}
.hm-board:not(.x) .hm-w:hover > .hm-wbody > .hm-card,
.hm-board .hm-w:hover > .hm-wbody > .hm-tile,
.hm-board .hm-w:hover > .hm-wbody > .hm-biz{transform:translateY(-3px) scale(1.012);
  box-shadow:0 1px 0 rgba(255,255,255,.05) inset, 0 18px 36px -18px rgba(0,0,0,.5), 0 4px 10px -4px rgba(0,0,0,.15);}

/* business snapshot */
.hm-biz{display:flex;align-items:center;gap:20px;padding:18px 24px;}
.hm-figs{display:flex;flex:1;flex-wrap:wrap;row-gap:12px;min-width:0;}
.hm-fig{flex:1;min-width:150px;padding:2px 20px;border-left:1px solid var(--border);}
.hm-fig:first-child{border-left:none;padding-left:0;}
.hm-fig-label{font-size:11.5px;color:var(--ink-mute);}
.hm-fig-value{font-family:var(--serif);font-size:22px;font-weight:600;color:var(--ink);margin-top:4px;font-variant-numeric:tabular-nums;}
.hm-fig-sub{font-size:11px;color:var(--ink-mute);margin-top:2px;}

/* email tiles — little bubbles */
.hm-tile{display:block;text-decoration:none;padding:18px 20px;position:relative;overflow:hidden;}
.hm-tile::after{content:'';position:absolute;right:-26px;top:-26px;width:84px;height:84px;border-radius:50%;
  background:radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  transition:transform .6s var(--hm-spring);}
.hm-w:hover .hm-tile::after{transform:scale(1.35);}
.hm-tile:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
.hm-tile-label{font-size:12px;font-weight:600;color:var(--ink-soft);}
.hm-tile-value{font-size:32px;font-weight:700;color:var(--ink);line-height:1.15;margin:6px 0 4px;font-variant-numeric:tabular-nums;}
.hm-tile.hot .hm-tile-value{color:var(--accent);}
.hm-tile-sub{font-size:11.5px;color:var(--ink-mute);}

.hm-day-item + .hm-day-item{margin-top:12px;padding-top:12px;border-top:1px solid var(--border);}
.hm-day-title{font-size:13.5px;font-weight:600;color:var(--ink);}
.hm-day-body{font-size:13px;color:var(--ink-soft);line-height:1.55;margin-top:3px;}

.hm-top{display:flex;flex-direction:column;}
.hm-mail{display:block;text-decoration:none;padding:11px 10px;margin:0 -10px;border-radius:12px;transition:background .2s;}
.hm-mail + .hm-mail{border-top:1px solid var(--border);border-radius:0;}
.hm-mail:hover{background:var(--raise);border-radius:12px;}
.hm-mail-line{display:flex;justify-content:space-between;gap:10px;}
.hm-mail-from{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hm-mail.unread .hm-mail-from::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:7px;vertical-align:2px;}
.hm-mail-when{font-size:11.5px;color:var(--ink-mute);flex-shrink:0;}
.hm-mail-subject{font-size:12.5px;color:var(--ink-soft);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hm-mail-why{font-size:11.5px;color:var(--ink-mute);margin-top:3px;line-height:1.45;}
.hm-more{margin-top:auto;padding-top:12px;align-self:flex-start;}

.hm-connect-title{font-family:var(--serif);font-size:18px;font-weight:600;color:var(--ink);margin-bottom:6px;}
.hm-btn{display:inline-block;margin-top:14px;background:var(--accent);color:#fff;text-decoration:none;font-size:13px;font-weight:600;
  padding:10px 18px;border-radius:999px;transition:transform .35s var(--hm-spring);}
.hm-btn:hover{background:var(--accent-hover, var(--accent));transform:scale(1.05);}
.hm-err{font-size:13px;color:var(--ink-soft);}

/* ---------- customize mode ---------- */
.hm-wbar{display:none;align-items:center;gap:6px;margin-bottom:8px;padding:0 4px;}
#homeApp.editing .hm-wbar{display:flex;}
.hm-wgrip{cursor:grab;color:var(--ink-mute);font-size:12px;letter-spacing:-3px;padding:2px 4px;user-select:none;}
.hm-wname{flex:1;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-mute);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hm-wbtn{width:26px;height:26px;border-radius:50%;border:1px solid var(--border);background:var(--card-bg);color:var(--ink-soft);
  font-size:13px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:transform .35s var(--hm-spring),background .2s,color .2s;}
.hm-wbtn:hover{transform:scale(1.15);background:var(--accent-tint);color:var(--accent);}
#homeApp.editing .hm-w:not(.hm-fixed){cursor:grab;}
#homeApp.editing .hm-wbody{pointer-events:none;}
#homeApp.editing .hm-w:not(.hm-fixed) > .hm-wbody > *{outline:1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);outline-offset:3px;
  animation:hmBreathe 2.6s ease-in-out infinite;}
#homeApp.editing .hm-w:nth-child(2n) > .hm-wbody > *{animation-delay:-1.3s;}
@keyframes hmBreathe{0%,100%{transform:scale(1);}50%{transform:scale(1.012);}}
.hm-w.dragging{opacity:.45;transform:scale(.97);}
.hm-w.pop > .hm-wbody > *{animation:hmPop .55s var(--hm-spring);}
@keyframes hmPop{0%{transform:scale(.94);}60%{transform:scale(1.03);}100%{transform:scale(1);}}

.hm-tray{display:none;align-items:center;flex-wrap:wrap;gap:8px;margin-top:16px;padding:14px 16px;
  border:1.5px dashed var(--border);border-radius:var(--hm-r);}
.hm-tray.has{display:flex;}
.hm-tray-label{font-size:12px;font-weight:600;color:var(--ink-mute);margin-right:4px;}
.hm-pill{font:600 12.5px var(--sans);background:var(--accent-tint);color:var(--accent);border:none;border-radius:999px;padding:7px 13px;cursor:pointer;
  transition:transform .35s var(--hm-spring);}
.hm-pill:hover{transform:scale(1.07);}
.hm-pill.ghost{background:transparent;color:var(--ink-mute);border:1px solid var(--border);margin-left:auto;}

@media (max-width:1000px){
  .hm-board{grid-template-columns:repeat(2,minmax(0,1fr));}
  .hm-w[data-size="l"],.hm-w[data-size="m"]{grid-column:1 / -1;}
  .hm-biz{flex-direction:column;align-items:flex-start;}
  .hm-fig{border-left:none;padding-left:0;}
}
@media (max-width:560px){
  .hm-board{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .hm-w{grid-column:1 / -1 !important;}
  /* the four number tiles sit two to a row on a phone */
  .hm-w[data-size="s"]{grid-column:span 1 !important;}
  .hm-w[data-size="s"] .hm-tile{padding:14px 14px;}
  .hm-w[data-size="s"] .hm-tile-value{font-size:28px;}
}

/* ============================================================
   "Breathing to life" — on every sign-in.

   #axReveal is a full-screen frosted layer (backdrop blur). Its mask
   is a gradient three screens wide: clear | soft edge | frosted.
   Sliding the mask from the frosted end to the clear end moves the
   soft edge across the screen left → right, so the page sharpens in
   a wave. #axSheen is a faint light band riding the same edge.
   Each widget gets --d (set in home-app.js from where it sits) so it
   breathes in — small, soft, then a springy settle — just as the
   wave reaches it, and its numbers count up.
   ============================================================ */
.ax-reveal{
  position:fixed;inset:0;z-index:9000;pointer-events:none;
  -webkit-backdrop-filter:blur(22px) saturate(.75);backdrop-filter:blur(22px) saturate(.75);
  background:color-mix(in srgb, var(--bg-page) 38%, transparent);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,transparent 33.33%,#000 50%,#000 100%);
          mask-image:linear-gradient(90deg,transparent 0%,transparent 33.33%,#000 50%,#000 100%);
  -webkit-mask-size:300% 100%;mask-size:300% 100%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:100% 0;mask-position:100% 0;
}
.ax-sheen{
  position:fixed;top:0;bottom:0;left:0;width:50vw;z-index:9001;pointer-events:none;
  background:linear-gradient(90deg,transparent 0%,color-mix(in srgb, var(--accent) 7%, transparent) 45%,
             rgba(255,255,255,.12) 52%,transparent 100%);
  transform:translateX(-200%);opacity:0;
}
html.ax-reveal-go .ax-reveal{animation:axSweep 1.25s cubic-bezier(.6,0,.25,1) forwards;}
html.ax-reveal-go .ax-sheen{animation:axSheen 1.25s cubic-bezier(.6,0,.25,1) forwards;}
@keyframes axSweep{
  from{-webkit-mask-position:100% 0;mask-position:100% 0;}
  to{-webkit-mask-position:0% 0;mask-position:0% 0;}
}
@keyframes axSheen{
  0%{transform:translateX(-200%);opacity:0;}
  15%{opacity:1;}
  85%{opacity:1;}
  100%{transform:translateX(200%);opacity:0;}
}

/* Widgets pull in: from small, soft and blurred → a springy settle. */
html.ax-reveal-on .hm-rise,
html.ax-reveal-on .hm-w{opacity:0;transform:translateY(18px) scale(.9);filter:blur(8px);}
html.ax-reveal-go .hm-rise,
html.ax-reveal-go .hm-w{animation:hmBreatheIn .95s var(--hm-spring) forwards;animation-delay:var(--d, 200ms);}
@keyframes hmBreatheIn{
  0%{opacity:0;transform:translateY(18px) scale(.9);filter:blur(8px);}
  45%{opacity:1;filter:blur(0);}
  100%{opacity:1;transform:none;filter:blur(0);}
}
/* An ordinary visit (no sign-in): no frost, just a quick soft settle. */
#homeApp.hm-soft .hm-w,#homeApp.hm-soft .hm-rise{animation:hmSettle .55s var(--hm-soft) both;animation-delay:calc(var(--d, 0ms) * .35);}
@keyframes hmSettle{from{opacity:0;transform:translateY(8px) scale(.98);}to{opacity:1;transform:none;}}

/* People who've asked their computer for less motion get a quiet fade. */
@media (prefers-reduced-motion: reduce){
  html.ax-reveal-go .ax-reveal{animation:axFade .35s ease forwards;}
  html.ax-reveal-go .ax-sheen{animation:none;opacity:0;}
  html.ax-reveal-on .hm-rise, html.ax-reveal-go .hm-rise,
  html.ax-reveal-on .hm-w, html.ax-reveal-go .hm-w,
  #homeApp.hm-soft .hm-w, #homeApp.hm-soft .hm-rise{animation:none;opacity:1;transform:none;filter:none;}
  #homeApp.editing .hm-w > .hm-wbody > *{animation:none;}
  .hm-card,.hm-tile,.hm-biz,.hm-w{transition:none;}
  @keyframes axFade{to{opacity:0;}}
}
.hm-day-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.hm-day-head .hm-eyebrow{margin-bottom:0;}
.hm-top-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:auto;padding-top:12px;}
.hm-top-foot .hm-more{margin-top:0;padding-top:0;}
.hm-focus-go{font:600 12.5px var(--sans);color:#fff;text-decoration:none;background:var(--accent);border-radius:999px;padding:7px 14px;transition:transform .3s;}
.hm-focus-go:hover{transform:translateY(-1px);}

/* ---- time range pill + calendar + "older" line (Nov 9) ---- */
.hm-range{display:flex;gap:3px;padding:3px;background:var(--card-bg);border:1px solid var(--border);border-radius:11px;}
.hm-range.busy{opacity:.6;pointer-events:none;}
.hm-range-btn{border:0;border-radius:8px;padding:7px 13px;font:600 12.5px var(--sans);color:var(--ink-soft);background:transparent;cursor:pointer;min-height:34px;}
.hm-range-btn:hover{color:var(--ink);background:var(--raise);}
.hm-range-btn.on{background:var(--ink);color:var(--bg-page);}
.hm-range-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.hm-older{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 2px;padding:10px 12px;border-radius:10px;
  background:var(--raise);color:var(--ink-soft);font-size:13px;text-decoration:none;}
.hm-older:hover{color:var(--ink);}
.hm-older-go{font-weight:700;color:var(--accent);}
.hm-cal .hm-day-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;}
.hm-cal-list{display:flex;flex-direction:column;}
.hm-cal-row{display:flex;align-items:center;gap:14px;padding:10px 0;border-top:1px solid var(--border);}
.hm-cal-row:first-child{border-top:0;}
.hm-cal-row.live{box-shadow:inset 3px 0 0 var(--accent);padding-left:10px;}
.hm-cal-time{flex:0 0 96px;font-size:13px;font-weight:600;color:var(--ink-soft);white-space:nowrap;}
.hm-cal-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.hm-cal-title{font-size:14px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hm-cal-who{font-size:12.5px;color:var(--ink-mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hm-cal-now{font-size:10px;font-weight:800;letter-spacing:.08em;color:#fff;background:var(--accent);border-radius:6px;padding:3px 7px;}
.hm-cal-join{font-size:12.5px;font-weight:700;color:#fff;background:var(--accent-2);border-radius:8px;padding:6px 12px;text-decoration:none;}
@media (max-width:700px){
  .hm-hello{grid-template-columns:1fr;}
  .hm-tools{grid-column:1;grid-row:auto;justify-content:flex-start;margin-top:14px;}
  .hm-range{flex:1;}
  .hm-range-btn{flex:1;padding:9px 0;}
  .hm-cal-time{flex-basis:76px;}
}

/* CRM follow-ups widget (Nov 11) */
.hm-crm-check{flex:0 0 auto;width:22px;height:22px;border-radius:7px;border:2px solid var(--outline, var(--ink-mute));background:var(--card-bg);color:#fff;font-size:12px;font-weight:900;cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center;}
.hm-crm-check:hover{border-color:var(--accent-2);}
.hm-crm-done .hm-crm-check{background:var(--accent-2);border-color:var(--accent-2);}
.hm-crm-done .hm-cal-title{text-decoration:line-through;color:var(--ink-mute);}
.hm-crm .hm-cal-time{flex-basis:84px;}

/* CRM nudges (Nov 11) */
.hm-crm-nudges{display:flex;flex-direction:column;gap:6px;margin-bottom:10px;}
.hm-crm-nudge{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--accent-tint);}
.hm-crm-spark{color:var(--accent);font-size:13px;flex:0 0 auto;}
.hm-crm-follow{flex:0 0 auto;border:1px solid var(--accent);background:var(--card-bg);color:var(--accent);font:inherit;font-size:12.5px;font-weight:700;border-radius:999px;padding:6px 12px;cursor:pointer;white-space:nowrap;}
.hm-crm-follow:hover:not(:disabled){background:var(--accent);color:#fff;}
.hm-crm-follow.hm-crm-added{border-color:transparent;background:transparent;color:var(--ink-soft);cursor:default;}
@media (max-width:600px){.hm-crm-nudge{flex-wrap:wrap;}.hm-crm-follow{margin-left:22px;}}

/* Axiom briefing / wrap-up (Nov 12) */
.hm-brief-slot:empty{display:none;}
.hm-brief{margin:0 0 18px;padding:18px 20px;border-radius:18px;background:linear-gradient(135deg,var(--accent-tint),var(--card-bg) 60%);border:1px solid var(--border);}
.hm-brief-evening,.hm-brief-wrapped{background:linear-gradient(135deg,var(--accent-2-tint),var(--card-bg) 60%);}
.hm-brief-top{display:flex;align-items:center;gap:8px;margin-bottom:6px;}
.hm-brief-spark{color:var(--accent);font-size:15px;}
.hm-brief-evening .hm-brief-spark,.hm-brief-wrapped .hm-brief-spark{color:var(--accent-2);}
.hm-brief-text{font-size:16px;line-height:1.55;color:var(--ink);max-width:880px;}
.hm-brief-open{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:10px;}
.hm-brief-k{font-size:12px;font-weight:700;color:var(--ink-mute);margin-right:4px;}
.hm-brief-item{font-size:12.5px;font-weight:600;color:var(--ink-soft);background:var(--raise);border-radius:999px;padding:3px 10px;}
.hm-brief-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.hm-brief-btn{font:inherit;font-size:13px;font-weight:700;color:var(--ink);background:var(--card-bg);border:1px solid var(--border);border-radius:999px;padding:8px 14px;cursor:pointer;min-height:36px;}
.hm-brief-btn:hover{border-color:var(--ink-mute);}
.hm-brief-btn.hot{background:var(--accent);border-color:var(--accent);color:#fff;}
/* Axiom follow-ups ready (Nov 12) */
.hm-crm-ready{display:flex;align-items:center;gap:10px;margin:2px 0 10px;padding:10px 12px;border-radius:12px;background:var(--accent-2-tint, rgba(37,99,235,.12));color:var(--ink);text-decoration:none;}
.hm-crm-ready .hm-cal-title{flex:1;min-width:0;font-weight:700;}
.hm-crm-ready:hover{filter:brightness(1.05);}

/* Nov 30: Today's tasks widget */
.hm-task-link{text-decoration:none;color:inherit;}
.hm-task-link:hover .hm-cal-title{color:var(--accent);}

/* Client tickets (Dec 1) */
.hm-tk-nums{display:flex;gap:18px;margin:4px 0 8px}
.hm-tk-num b{display:block;font-size:24px;font-weight:700;line-height:1.1;color:var(--ink)}
.hm-tk-num span{font-size:11.5px;color:var(--ink-mute)}
.hm-tk-num.hot b{color:var(--accent)}
.hm-tk-num.ok b{color:#2f9e6e}
