/* 📱 Pulse phone app (Mic 2026-11-16 "Build me a seperate Pulse PWA for mobile devices … Organize for mobile phone friendly").
   One column, thumb-reach tab bar at the bottom, 44px+ touch targets, safe-area aware (notch / home bar). */
:root {
  color-scheme: dark;
  --bg: #0b0d17; --card: #151827; --card2: #1b1f33; --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .12);
  --tx: #eceefa; --mute: #9aa0bd; --dim: #6c7293;
  --ac: #8b6cff; --ac2: #2dd4bf; --ok: #34d399; --warn: #ffb547; --bad: #ff6b81;
  --do: #8b6cff; --dec: #ffb547; --rep: #38bdf8;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --hh: 56px; --tb: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--tx); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; cursor: pointer; }
textarea, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: #b9a8ff; }

/* ---- header ---- */
.pp-head { position: fixed; z-index: 20; top: 0; left: 0; right: 0; padding: calc(var(--top) + 6px) 16px 8px; background: rgba(11, 13, 23, .86); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; min-height: calc(var(--top) + var(--hh)); }
.pp-head h1 { margin: 0; flex: 1; min-width: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-head h1 small { display: block; font-size: 12px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
.pp-hbtn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); display: grid; place-items: center; font-size: 18px; }
.pp-hbtn:active { background: rgba(255, 255, 255, .14); }
.pp-hbtn.spin span { display: inline-block; animation: ppspin 1s linear infinite; }
@keyframes ppspin { to { transform: rotate(360deg); } }

/* ---- page ---- */
.pp-main { max-width: 640px; margin: 0 auto; padding: calc(var(--top) + var(--hh) + 12px) 16px calc(var(--bot) + var(--tb) + 24px); }
.pp-ptr { height: 0; overflow: hidden; display: grid; place-items: center; color: var(--mute); font-size: 13px; transition: height .2s; }
.pp-sec { margin: 22px 2px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.pp-sec b { color: var(--tx); background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 1px 8px; font-size: 11px; letter-spacing: 0; }
.pp-sec:first-child { margin-top: 4px; }
.pp-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.pp-empty { color: var(--mute); text-align: center; padding: 22px 10px; font-size: 14px; }
.pp-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--ac); border-radius: 50%; animation: ppspin .8s linear infinite; vertical-align: -2px; }
.pp-err { background: rgba(255, 107, 129, .12); border: 1px solid rgba(255, 107, 129, .3); color: #ffc2cc; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 10px; }

/* ---- today: hello + rings ---- */
.pp-hello { margin: 2px 2px 14px; }
.pp-hello h2 { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.pp-hello p { margin: 3px 0 0; color: var(--mute); font-size: 14px; }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pp-stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 11px 12px; text-align: left; border-width: 1px; }
.pp-stat b { display: block; font-size: 22px; font-weight: 750; line-height: 1.1; }
.pp-stat small { color: var(--mute); font-size: 12px; }
.pp-stat.ok b { color: var(--ok); } .pp-stat.late b { color: var(--bad); } .pp-stat.need b { color: var(--warn); }
.pp-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: -2px 2px 14px; }
.pp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ac), var(--ac2)); border-radius: inherit; transition: width .5s; }
.pp-hint { display: flex; gap: 10px; align-items: flex-start; background: linear-gradient(135deg, rgba(139, 108, 255, .18), rgba(45, 212, 191, .1)); border: 1px solid rgba(139, 108, 255, .3); border-radius: 16px; padding: 12px; margin-bottom: 12px; font-size: 13.5px; }
.pp-hint span { flex: 1; }
.pp-hint button { border: 0; background: none; color: var(--mute); font-size: 16px; padding: 0 4px; }

/* next up */
.pp-next { position: relative; overflow: hidden; border-color: rgba(139, 108, 255, .35); background: linear-gradient(160deg, rgba(139, 108, 255, .16), rgba(21, 24, 39, 1) 55%); }
.pp-next .pp-when { font-size: 12.5px; font-weight: 700; color: #c9bbff; text-transform: uppercase; letter-spacing: .06em; }
.pp-next .pp-when.now { color: #ff8da0; }
.pp-next h3 { margin: 4px 0 2px; font-size: 18px; line-height: 1.25; }
.pp-next .pp-meta { color: var(--mute); font-size: 13px; }
.pp-brief { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; }
.pp-brief p { margin: 0 0 7px; }
.pp-brief i { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.pp-brief ul { margin: 4px 0 6px; padding-left: 18px; }
.pp-brief .pp-watch { color: var(--warn); }

/* chips to the hub */
.pp-needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.pp-need { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 10px 8px; text-align: center; }
.pp-need b { display: block; font-size: 20px; } .pp-need small { color: var(--mute); font-size: 12px; }
.pp-need.do b { color: var(--do); } .pp-need.dec b { color: var(--dec); } .pp-need.rep b { color: var(--rep); }
.pp-need:active { background: var(--card2); }

/* ---- hub segmented control ---- */
.pp-seg { position: sticky; z-index: 5; top: calc(var(--top) + var(--hh) + 4px); display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: rgba(21, 24, 39, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; }
.pp-seg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.pp-seg button b { font-size: 11px; background: rgba(255, 255, 255, .08); border-radius: 99px; padding: 0 6px; min-width: 18px; }
.pp-seg button.on { background: var(--ac); color: #fff; }
.pp-seg button.on b { background: rgba(255, 255, 255, .25); }

/* ---- items ---- */
.pp-it { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.pp-it::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--k, var(--ac)); }
.pp-it.k-do { --k: var(--do); } .pp-it.k-decide { --k: var(--dec); } .pp-it.k-reply { --k: var(--rep); } .pp-it.k-fam { --k: #f472b6; }
.pp-in { position: relative; z-index: 1; background: inherit; padding: 13px 14px 12px 16px; touch-action: pan-y; transition: transform .22s ease; }
.pp-it.dragging .pp-in { transition: none; }
.pp-swl, .pp-swr { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 22px; font-weight: 700; font-size: 14px; }
.pp-swl { background: rgba(52, 211, 153, .22); color: var(--ok); }
.pp-swr { background: rgba(255, 181, 71, .2); color: var(--warn); justify-content: flex-end; }
.pp-it.going { opacity: .4; pointer-events: none; transition: opacity .2s; }
.pp-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--k); background: color-mix(in srgb, var(--k) 16%, transparent); border-radius: 99px; padding: 2px 8px; margin-bottom: 6px; }
.pp-it h4 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 650; }
.pp-it p { margin: 5px 0 0; font-size: 13.5px; color: #c7cbe2; }
.pp-it .pp-step { color: #b9a8ff; }
.pp-it .pp-rec { color: #9de8d6; }
.pp-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; font-size: 12px; color: var(--mute); }
.pp-late { color: var(--bad); font-weight: 600; }
.pp-src { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pp-acts { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.pp-b { min-height: 40px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pp-b:active { background: rgba(255, 255, 255, .12); }
a.pp-b { text-decoration: none; color: inherit; }
.pp-b.pri { background: var(--ac); border-color: var(--ac); color: #fff; }
.pp-b.ok { background: rgba(52, 211, 153, .16); border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.pp-b.grow { flex: 1; }
.pp-b.x { width: 40px; padding: 0; color: var(--mute); }
.pp-b:disabled { opacity: .5; }
.pp-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pp-opts .pp-b { justify-content: flex-start; text-align: left; min-height: 44px; padding: 8px 13px; line-height: 1.25; }
.pp-ride { margin-top: 9px; padding: 9px 10px; border-radius: 12px; background: rgba(56, 189, 248, .08); font-size: 12.5px; color: #bfe3f5; }
.pp-draft { margin-top: 10px; }
.pp-draft textarea { width: 100%; min-height: 96px; resize: vertical; border-radius: 12px; border: 1px solid var(--line2); background: #0f1220; padding: 10px; font-size: 15px; line-height: 1.4; outline: 0; }
.pp-draft textarea:focus { border-color: rgba(139, 108, 255, .7); }
.pp-tones { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.pp-tones::-webkit-scrollbar { display: none; }
.pp-tones .pp-b { min-height: 34px; font-size: 12.5px; font-weight: 500; flex: none; }
details.pp-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #b9a8ff; font-size: 13.5px; font-weight: 600; min-height: 34px; }
details.pp-more > summary::-webkit-details-marker { display: none; }
details.pp-more > summary::after { content: "▾"; font-size: 11px; transition: transform .2s; }
details.pp-more[open] > summary::after { transform: rotate(180deg); }
.pp-showall { width: 100%; min-height: 44px; border: 1px dashed var(--line2); border-radius: 14px; background: none; color: var(--mute); }

/* ---- calendar ---- */
.pp-day h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.pp-day h3 small { color: var(--mute); font-weight: 500; font-size: 12.5px; }
.pp-ev { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.pp-ev:first-of-type { border-top: 0; }
.pp-ev .t { width: 48px; flex: none; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; }
.pp-ev .t small { display: block; color: var(--dim); font-weight: 500; font-size: 12px; }
.pp-ev .c { flex: 1; min-width: 0; border-left: 3px solid var(--ec, var(--ac)); padding-left: 10px; }
.pp-ev .c b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.pp-ev .c small { color: var(--mute); font-size: 12.5px; }
.pp-ev.past { opacity: .45; }
.pp-ev.cur .c b::after { content: " · now"; color: #ff8da0; font-size: 12px; }
.pp-ev.clash .c { border-left-color: var(--bad); }
.pp-nowl { display: flex; align-items: center; gap: 8px; margin: 2px 0; color: #ff8da0; font-size: 11.5px; font-weight: 700; }
.pp-nowl::after { content: ""; flex: 1; height: 2px; background: #ff6b81; border-radius: 2px; }
.pp-allday { display: inline-block; margin: 0 6px 6px 0; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; background: color-mix(in srgb, var(--ec, var(--ac)) 18%, transparent); }
.pp-free { color: var(--mute); font-size: 13.5px; padding: 4px 0; }
.pp-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pp-facts span { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 5px 9px; font-size: 12.5px; color: #c7cbe2; }
.pp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 110px; }
.pp-wd { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.pp-wd .bar { width: 100%; max-width: 30px; flex: 1; display: flex; align-items: flex-end; }
.pp-wd .bar i { width: 100%; border-radius: 7px 7px 3px 3px; background: rgba(139, 108, 255, .45); }
.pp-wd.today .bar i { background: linear-gradient(var(--ac), var(--ac2)); }
.pp-wd b { font-size: 11.5px; } .pp-wd small { font-size: 11px; color: var(--mute); } .pp-wd em { font-style: normal; font-size: 11px; color: var(--mute); min-height: 14px; }
.pp-wl { padding: 9px 0; border-top: 1px solid var(--line); }
.pp-wl h4 { margin: 0 0 4px; font-size: 14px; display: flex; justify-content: space-between; } .pp-wl h4 small { color: var(--mute); font-weight: 500; }
.pp-wl div { font-size: 13.5px; color: #c7cbe2; padding: 2px 0; } .pp-wl div b { font-variant-numeric: tabular-nums; margin-right: 6px; color: var(--tx); }

/* ---- reports ---- */
.pp-headline { font-size: 15px; line-height: 1.45; margin: 0 0 4px; }
.pp-rep h4 { margin: 0 0 4px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; } .pp-rep h4 small { color: var(--mute); font-weight: 500; font-size: 12px; margin-left: auto; white-space: nowrap; }
.pp-rep p { margin: 0; font-size: 13.5px; color: #c7cbe2; }
.pp-nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pp-nums span { background: rgba(45, 212, 191, .1); color: #9de8d6; border-radius: 10px; padding: 4px 9px; font-size: 12.5px; }
.pp-issue { color: #ffc2cc; font-size: 13.5px; margin-top: 7px; }
.pp-ract { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; } .pp-ract span { flex: 1; }

/* ---- family / misc lists ---- */
.pp-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pp-row:first-child { border-top: 0; padding-top: 2px; }
.pp-row span { flex: 1; min-width: 0; } .pp-row small { color: var(--mute); font-size: 12px; display: block; }
.pp-row .pp-b { min-height: 36px; }
.pp-chips3 { display: flex; gap: 4px; flex: none; }
.pp-chips3 button { min-height: 32px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line2); background: none; font-size: 12px; color: var(--mute); }
.pp-chips3 button.on { background: var(--ac); border-color: var(--ac); color: #fff; }
.pp-cap textarea { width: 100%; min-height: 80px; border-radius: 12px; border: 1px solid var(--line2); background: #0f1220; padding: 10px; font-size: 15px; outline: 0; margin-top: 8px; }
.pp-chk { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 14px; } .pp-chk input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ac); flex: none; }

/* ---- tab bar ---- */
.pp-tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 6px 6px calc(var(--bot) + 6px); background: rgba(11, 13, 23, .9); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--line); }
.pp-tabs > div { display: flex; width: 100%; max-width: 640px; }
.pp-tab { position: relative; flex: 1; min-height: 50px; border: 0; background: none; color: var(--dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; border-radius: 12px; }
.pp-tab span { font-size: 21px; line-height: 1; filter: grayscale(1) opacity(.65); transition: filter .2s, transform .2s; }
.pp-tab.on { color: var(--tx); } .pp-tab.on span { filter: none; transform: translateY(-1px); }
.pp-tab:active { background: rgba(255, 255, 255, .05); }
.pp-tab em { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---- sheet / toast / login ---- */
.pp-sheetbg { position: fixed; z-index: 40; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; animation: ppfade .2s; }
@keyframes ppfade { from { opacity: 0; } }
.pp-sheet { width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; background: #161a2b; border-radius: 22px 22px 0 0; border: 1px solid var(--line2); border-bottom: 0; padding: 8px 16px calc(var(--bot) + 16px); animation: ppup .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes ppup { from { transform: translateY(40%); } }
.pp-sheet .grab { width: 38px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .2); margin: 2px auto 12px; }
.pp-sheet h3 { margin: 0 0 10px; font-size: 18px; }
.pp-sheet input[type=text] { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: #0f1220; padding: 0 12px; font-size: 16px; outline: 0; }
.pp-sheet .pp-menu { display: flex; flex-direction: column; gap: 6px; }
.pp-sheet .pp-menu .pp-b { justify-content: flex-start; min-height: 50px; font-size: 15px; }
.pp-toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--bot) + var(--tb) + 16px); transform: translateX(-50%); max-width: calc(100% - 32px); background: #262b44; border: 1px solid var(--line2); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); animation: ppup .2s; }
.pp-toast.bad { background: #4a1f2a; border-color: rgba(255, 107, 129, .5); }
.pp-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--top) + 24px) 24px calc(var(--bot) + 24px); text-align: center; background: radial-gradient(600px 400px at 50% 0%, rgba(139, 108, 255, .25), transparent 70%), var(--bg); }
.pp-login img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 16px 40px rgba(139, 108, 255, .35); }
.pp-login h1 { margin: 18px 0 4px; font-size: 28px; }
.pp-login p { margin: 0 0 22px; color: var(--mute); }
.pp-login form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.pp-login input[type=password] { min-height: 50px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); padding: 0 14px; font-size: 16px; outline: 0; text-align: center; }
.pp-login label { color: var(--mute); font-size: 13.5px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.pp-login .pp-b { min-height: 50px; font-size: 16px; }
.pp-login .pp-err { margin: 0; }

/* 📬 agent reports (Mic 2026-11-17) */
.pp-ar summary { cursor: pointer; list-style: none; } .pp-ar summary::-webkit-details-marker { display: none; } .pp-artext { white-space: pre-wrap; font-size: 13px; line-height: 1.5; margin-top: 10px; overflow-wrap: anywhere; } .pp-arbtn { width: 100%; margin: 12px 0; padding: 12px; }
