/* ============================================================
   LIFEMAX CLUB — the Tools screen (#tools, app-tools.js and friends).

   Built from ds.css only: every colour is a token, every radius and gap is
   the system's. Silver is the accent. Green means confirmed and nothing else
   (a check-in is not "confirmed": it stays silver); red means failed.
   The face score's heatmap is NEUTRAL — silver light where a measure is
   strong, dim where it is weak — never red and green on a face.
   ============================================================ */

/* ── the frame ─────────────────────────────────────────────── */
.tl-view{min-height:40vh}
.tl-back{margin-bottom:10px}
.tl-head{margin-bottom:24px}
.tl-head .pane-actions{margin-left:auto}
.tl-sec{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:40px 0 14px}
.tl-sec h2{font-size:20px;letter-spacing:-.022em}
.tl-sec .t-foot{margin:0}
.tl-note{margin:0 0 16px}
.tl-badges{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.tl-badge{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:var(--r-pill);font-size:11.5px;font-weight:600;letter-spacing:.01em;background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair);color:var(--text-2);white-space:nowrap}
.tl-badge .ic{--ic:12px}
.tl-badge.ai{color:var(--text);background:linear-gradient(var(--surface-2),var(--surface-2)) padding-box,var(--gold) border-box;border:1px solid transparent;box-shadow:none}
.tl-badge.ai .ic{color:var(--tint)}
.tl-badge.lock .ic{color:var(--text-3)}
.tl-err{margin:12px 0 0}
.tl-empty{padding:34px 18px}
.tl-center{display:flex;justify-content:center}
.tl-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.tl-grow{flex:1;min-width:0}
.tl-mt{margin-top:16px}
.tl-mt-lg{margin-top:28px}
.tl-fine{margin-top:14px}
.tl-kbd{font-family:var(--mono);font-size:12px;padding:1px 6px;border-radius:6px;background:var(--fill-2)}

/* ── the hub ───────────────────────────────────────────────── */
.tl-top{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:20px}
.tl-today{padding:22px 24px 24px;display:flex;flex-direction:column;gap:18px}
.tl-today-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.tl-today-h h2{font-size:20px;letter-spacing:-.022em}
.tl-scales{display:grid;gap:12px}
.tl-scale{display:grid;grid-template-columns:76px minmax(0,1fr) 64px;align-items:center;gap:12px}
.tl-scale > span:first-child{font-size:14.5px;color:var(--text-2)}
.tl-scale .val{font-size:13px;color:var(--text-3);text-align:right;font-variant-numeric:tabular-nums}
.tl-pips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
/* a pip is a 32px target holding an 8px bar: the meter reads as a line, the
   finger still gets a button */
.tl-pip{height:32px;border:0;padding:0;background:none;cursor:pointer;position:relative;border-radius:8px}
.tl-pip::before{content:"";position:absolute;left:0;right:0;top:50%;height:8px;margin-top:-4px;border-radius:4px;background:var(--fill-2);
  transition:background-color var(--d-2) var(--ease),transform var(--d-3) var(--spring)}
.tl-pip:hover::before{background:var(--fill-3)}
.tl-pip.on::before{background:var(--gold-mark)}
.tl-pip:active::before{transform:scaleY(1.6);transition-duration:var(--d-1),90ms}
.tl-pip:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tl-win{display:flex;gap:10px}
.tl-win .input{min-height:44px;font-size:15.5px}
.tl-plan{border-top:1px solid var(--hair);padding-top:16px;display:flex;flex-direction:column;gap:10px}
.tl-plan-f{font-size:16px;font-weight:600;letter-spacing:-.015em}
.tl-blocks{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}
.tl-block{display:grid;grid-template-columns:62px minmax(0,1fr);gap:12px;padding:7px 0;font-size:15px;line-height:1.4}
.tl-block time{font-family:var(--mono);font-size:12px;color:var(--text-3);padding-top:3px;letter-spacing:.04em}
.tl-block.is-task b{font-weight:600}

.tl-focus-w{padding:22px 24px 22px;display:flex;flex-direction:column}
.tl-focus-w .w-head{margin-bottom:6px}
.tl-focus-live{font-family:var(--mono);font-size:12px;letter-spacing:.06em;color:var(--text)}
.tl-focus-big{display:flex;align-items:baseline;gap:6px;font-size:52px;font-weight:700;letter-spacing:-.05em;line-height:1;font-variant-numeric:tabular-nums;margin-top:14px}
.tl-focus-big small{font-size:18px;color:var(--text-2);font-weight:600;letter-spacing:-.02em}
.tl-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;align-items:end;height:44px;margin-top:18px}
.tl-week i{display:block;width:min(12px,56%);justify-self:center;border-radius:6px;background:var(--fill-2);min-height:4px;transition:height var(--d-4) var(--spring-soft)}
.tl-week i.on{background:var(--gold-mark)}
.tl-week i.today{box-shadow:0 0 0 1.5px var(--text-3)}
.tl-weekl{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-top:6px;font-family:var(--mono);font-size:10px;letter-spacing:.06em;color:var(--text-3);text-align:center}
.tl-focus-w .btn{margin-top:auto}
.tl-focus-w .tl-focus-cap{margin:12px 0 18px}

.tl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.tl-tile{padding:20px 20px 18px;display:flex;flex-direction:column;gap:10px;min-height:168px}
.tl-tile-top{display:flex;align-items:flex-start;gap:10px}
.tl-tile .well{width:40px;height:40px;border-radius:12px}
.tl-tile .well .ic{--ic:20px}
.tl-tile h3{font-size:17px;letter-spacing:-.018em;line-height:1.25}
.tl-tile p{font-size:14px;color:var(--text-2);line-height:1.4}
.tl-tile .tl-state{margin-top:auto;font-size:13px;color:var(--text-3);font-variant-numeric:tabular-nums;display:flex;align-items:center;gap:8px}
.tl-tile .tl-state b{color:var(--text);font-weight:600}
.tl-tile.is-locked .well{background:var(--fill-1);color:var(--text-3)}
.tl-tile.is-locked h3{color:var(--text-2)}

/* a card that is a link: ds.css makes a.card display:block (0,1,1), which
   would outrank the flex columns below */
a.tl-focus-w,a.tl-tile,a.tr-card,a.co-mode{display:flex;flex-direction:column}

/* ── a tool's own card ─────────────────────────────────────── */
.tl-card{padding:22px 24px}
.tl-card + .tl-card{margin-top:16px}
.tl-card > .t-title-2 + *,.tl-card > .t-title + *{margin-top:14px}
.tl-card > .t-title-2 + p,.tl-card > .t-title + p{margin-top:6px}
.tl-two{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;align-items:start}
.tl-two.even{grid-template-columns:repeat(2,minmax(0,1fr))}
.tl-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tl-stat{padding:14px 16px;border-radius:var(--r-tile);background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair)}
.tl-stat b{display:block;font-size:26px;font-weight:700;letter-spacing:-.04em;line-height:1.05;font-variant-numeric:tabular-nums}
.tl-stat b small{font-size:14px;color:var(--text-2);font-weight:600;letter-spacing:-.01em;margin-left:2px}
.tl-stat span{display:block;margin-top:5px;font-size:12.5px;color:var(--text-2)}
.tl-upsell{display:flex;align-items:center;gap:16px;padding:20px 22px}
.tl-upsell .well{width:44px;height:44px;border-radius:13px}
.tl-upsell h3{font-size:17px;letter-spacing:-.015em}
.tl-upsell p{font-size:14px;color:var(--text-2);margin-top:3px;line-height:1.4}
.tl-upsell .btn{margin-left:auto}
.tl-aiout{display:flex;gap:12px;align-items:flex-start;padding:16px 18px;border-radius:var(--r-tile);background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair);font-size:15.5px;line-height:1.5}
.tl-aiout > .ic{--ic:18px;color:var(--tint);margin-top:2px}
.tl-aiout p + p{margin-top:8px}
.tl-aiout.is-wait{color:var(--text-2)}

/* ── focus ─────────────────────────────────────────────────── */
.fc-stage{display:flex;flex-direction:column;align-items:center;padding:34px 24px 30px;gap:22px}
.fc-dial{position:relative;width:min(280px,72vw);aspect-ratio:1;display:grid;place-items:center}
.fc-dial > svg{position:absolute;inset:0;width:100%;height:100%}
.fc-time{position:relative;font-size:clamp(52px,12vw,68px);font-weight:700;letter-spacing:-.05em;font-variant-numeric:tabular-nums;line-height:1}
.fc-sub{position:absolute;top:calc(50% + 44px);left:0;right:0;text-align:center;font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-3)}
.fc-goal{width:min(460px,100%)}
.fc-goal .input{text-align:center}
.fc-ctl{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.fc-ctl .btn{min-width:132px}
.fc-custom{display:flex;align-items:center;gap:10px;justify-content:center;font-size:14.5px;color:var(--text-2)}
.fc-custom input{width:72px;text-align:center;min-height:36px;padding:0 8px}
.fc-list{display:flex;flex-direction:column}
.fc-row .lbl small{font-variant-numeric:tabular-nums}
.fc-row .val{font-family:var(--mono);font-size:12.5px}
.fc-debrief{margin-top:12px}
.fc-done{display:flex;flex-direction:column;gap:12px;width:min(520px,100%)}

/* ── to-do ─────────────────────────────────────────────────── */
.td-add{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center}
.td-add .select-wrap{min-width:150px}
.td-add .select{min-height:50px}
.td-group + .td-group{margin-top:22px}
.td-list{list-style:none;margin:0;padding:0}
.td-item{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 10px 8px 16px}
.td-item + .td-item{border-top:1px solid var(--hair)}
.td-item .check{flex:1;min-width:0;align-items:center}
.td-item .td-t{min-width:0;overflow-wrap:anywhere;font-size:16px;line-height:1.35;display:flex;flex-direction:column;gap:3px}
.td-meta{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center}
.td-item.is-done .td-t{color:var(--text-3);text-decoration:line-through;text-decoration-color:var(--hair-2)}
.td-due{font-size:12.5px;color:var(--text-3);white-space:nowrap;font-variant-numeric:tabular-nums}
.td-due.is-late{color:var(--danger)}
.td-lesson{font-size:11.5px;font-family:var(--mono);letter-spacing:.05em;color:var(--text-3);text-transform:uppercase;white-space:nowrap}
.td-x{opacity:.55}
.td-item:hover .td-x,.td-x:focus-visible{opacity:1}

/* ── the coach ─────────────────────────────────────────────── */
.co-wrap{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:calc(100dvh - var(--bar-h) - 150px);max-width:820px;margin:0 auto}
.co-log{display:flex;flex-direction:column;gap:14px;padding:6px 0 24px}
.co-msg{display:flex;gap:10px;align-items:flex-end;max-width:88%}
.co-msg.me{align-self:flex-end;flex-direction:row-reverse}
.co-av{width:30px;height:30px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--surface-3);color:var(--tint)}
.co-av .ic{--ic:16px}
.co-b{padding:11px 15px;border-radius:20px;font-size:16px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--cell);box-shadow:inset 0 0 0 1px var(--hair);border-bottom-left-radius:6px}
.co-msg.me .co-b{background:var(--btn-bg);color:var(--btn-text);box-shadow:none;border-bottom-left-radius:20px;border-bottom-right-radius:6px}
.co-b.is-typing{color:var(--text-3)}
.co-b.is-err{background:var(--danger-bg);box-shadow:inset 0 0 0 1px var(--danger-line)}
.co-dots{display:inline-flex;gap:4px;padding:4px 0}
.co-dots i{width:6px;height:6px;border-radius:50%;background:var(--text-3);animation:co-dot 1.2s var(--ease-io) infinite}
.co-dots i:nth-child(2){animation-delay:.15s}
.co-dots i:nth-child(3){animation-delay:.3s}
@keyframes co-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}
.co-start{display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 12px 18px;gap:10px}
.co-start .well{width:56px;height:56px;border-radius:18px}
.co-start .well .ic{--ic:26px}
.co-start h2{font-size:22px;letter-spacing:-.025em}
.co-start p{color:var(--text-2);max-width:46ch;font-size:15.5px}
.co-sugg{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:8px}
.co-sugg .chip{height:34px;font-size:14px;padding:0 14px}
.co-comp{position:sticky;bottom:0;padding:12px 0 calc(12px + env(safe-area-inset-bottom));background:linear-gradient(to top,var(--bg) 70%,transparent)}
.co-box{display:flex;align-items:flex-end;gap:8px;padding:6px 6px 6px 16px;border-radius:26px;background:var(--cell);box-shadow:inset 0 0 0 1px var(--hair-2)}
.co-box:focus-within{box-shadow:inset 0 0 0 1.5px var(--focus),0 0 0 4px var(--glow)}
.co-box textarea{flex:1;min-width:0;border:0;background:none;color:var(--text);font:inherit;font-size:16px;line-height:1.45;resize:none;max-height:180px;padding:9px 0;outline:none}
.co-box textarea::placeholder{color:var(--text-3)}
.co-send{width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;background:var(--btn-bg);color:var(--btn-text);cursor:pointer;flex:none;transition:opacity var(--d-1) var(--ease),transform var(--d-3) var(--spring)}
.co-send:disabled{opacity:.3;cursor:default}
.co-send:not(:disabled):active{transform:scale(.9);transition-duration:var(--d-1),90ms}
.co-send .ic{--ic:18px}
.co-foot{display:flex;justify-content:space-between;gap:12px;margin-top:8px;font-size:12.5px;color:var(--text-3);padding:0 6px}
.co-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.co-mode{padding:18px;display:flex;flex-direction:column;gap:8px;min-height:120px}
.co-mode h3{font-size:16.5px;letter-spacing:-.015em}
.co-mode p{font-size:14px;color:var(--text-2);line-height:1.4}
.co-scene{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--r-tile);background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair);font-size:14px;color:var(--text-2);margin-bottom:10px}
.co-scene .ic{--ic:16px;color:var(--tint)}

/* ── face score ────────────────────────────────────────────── */
.fs-consent{max-width:640px}
.fs-consent ul{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.fs-consent li{display:flex;gap:12px;align-items:flex-start;font-size:15.5px;line-height:1.45}
.fs-consent li .ic{--ic:18px;flex:none;margin-top:2px;color:var(--tint)}
.fs-pick{display:flex;gap:12px;flex-wrap:wrap}
.fs-pick label{cursor:pointer}
.fs-pick input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.fs-result{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.fs-photo{position:relative;border-radius:var(--r-card);overflow:hidden;background:var(--surface-2);aspect-ratio:3/4;border:1px solid var(--hair)}
.fs-photo canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.fs-legend{position:absolute;left:14px;right:14px;bottom:14px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;font-size:12px}
.fs-legend .fs-grad{flex:1;height:6px;border-radius:3px;background:linear-gradient(90deg,rgba(255,255,255,.08),rgba(255,255,255,.9))}
.fs-score{display:flex;align-items:baseline;gap:8px}
.fs-score b{font-size:84px;font-weight:700;letter-spacing:-.06em;line-height:.95;font-variant-numeric:tabular-nums;background:var(--title);-webkit-background-clip:text;background-clip:text;color:transparent}
.fs-score span{font-size:20px;color:var(--text-2);font-weight:600}
.fs-parts{display:flex;flex-direction:column;gap:12px;margin-top:18px}
.fs-part{display:grid;grid-template-columns:96px minmax(0,1fr) 34px;align-items:center;gap:12px;font-size:14.5px}
.fs-part span:first-child{color:var(--text-2)}
.fs-part b{font-weight:600;text-align:right;font-variant-numeric:tabular-nums;font-size:14px}
.fs-part b.is-ok{color:var(--ok)}
.fs-work{display:flex;gap:8px;flex-wrap:wrap}
.fs-hist{height:120px;margin-top:6px}
.fs-hist svg{width:100%;height:100%;overflow:visible}
.fs-tips{display:flex;flex-direction:column;gap:12px}
.fs-tip{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start}
.fs-tip .badge{margin-top:1px;text-transform:capitalize}
.fs-tip p{font-size:15px;line-height:1.45}
.fs-tip small{display:block;color:var(--text-2);font-size:13.5px;margin-top:2px}
.fs-busy{display:flex;flex-direction:column;align-items:center;gap:14px;padding:48px 20px;text-align:center}

/* ── trackers ──────────────────────────────────────────────── */
.tr-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.tr-card{padding:18px 20px;display:flex;flex-direction:column;gap:8px;min-height:150px}
.tr-card .mono{color:var(--text-3)}
.tr-card h3{font-size:17px;letter-spacing:-.018em}
.tr-card p{font-size:14px;color:var(--text-2);line-height:1.4}
.tr-card .tl-state{margin-top:auto;font-size:13px;color:var(--text-3)}
.tr-target{font-size:14.5px;color:var(--text-2);line-height:1.5;max-width:70ch}
.tr-form{display:flex;flex-direction:column;gap:14px}
.tr-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tr-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.tr-fields.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.tr-fields .field + .field{margin-top:0}
.tr-fields .input{min-height:46px}
.tr-rowh{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) minmax(0,.6fr) minmax(0,.6fr) 46px 36px;gap:8px;font-size:12px;color:var(--text-3);padding:0 2px}
.tr-set{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) minmax(0,.6fr) minmax(0,.6fr) 46px 36px;gap:8px;align-items:center}
.tr-set .input{min-height:42px;padding:0 10px;font-size:15px}
.tr-set .miss{display:grid;place-items:center}
.tr-chart{width:100%;height:220px}
.tr-chart svg{width:100%;height:100%;overflow:visible}
.tr-chart .band{fill:rgba(var(--glow-rgb),.09);stroke:rgba(var(--glow-rgb),.28);stroke-dasharray:3 4}
.tr-chart .axis{stroke:var(--hair);stroke-width:1}
.tr-chart .lbl{fill:var(--text-3);font-family:var(--mono);font-size:10px;letter-spacing:.05em}
.tr-chart .dot{fill:var(--g1)}
.tr-chart .dot.out{fill:var(--surface);stroke:var(--text-3);stroke-width:1.5}
.tr-chart .line{fill:none;stroke:var(--g2);stroke-width:1.5}
.tr-hist{display:flex;flex-direction:column}
.tr-entry .lbl small{white-space:normal}
.tr-baseline{display:flex;flex-direction:column;gap:10px}
.tr-bl-row{display:grid;grid-template-columns:90px minmax(0,1fr) minmax(0,1.2fr) 150px;gap:10px;align-items:center}
.tr-bl-row > span{font-size:14.5px;font-weight:600}
.tr-bl-row .input{min-height:44px;font-size:15px}
.tr-cmp{width:100%;border-collapse:collapse;font-size:14.5px}
.tr-cmp th,.tr-cmp td{padding:10px 8px;text-align:left;border-bottom:1px solid var(--hair);font-variant-numeric:tabular-nums}
.tr-cmp th{font-size:12px;color:var(--text-3);font-weight:500;font-family:var(--mono);letter-spacing:.05em;text-transform:uppercase}
.tr-cmp td:not(:first-child){text-align:right}
.tr-scroll{overflow-x:auto}
.tr-claim{display:grid;grid-template-columns:minmax(0,1fr) 110px 120px;gap:10px;align-items:center}
.tr-claim .input{min-height:44px;font-size:15px}
.tr-big{font-size:34px;font-weight:700;letter-spacing:-.04em;font-variant-numeric:tabular-nums;line-height:1}
.tr-days{display:flex;gap:6px;flex-wrap:wrap}
.tr-days i{width:22px;height:22px;border-radius:7px;background:var(--fill-2)}
.tr-days i.on{background:var(--gold-mark)}

/* ── diet ──────────────────────────────────────────────────── */
.dt-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.dt-form .field + .field{margin-top:0}
.dt-form .wide{grid-column:1/-1}
.dt-targets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.dt-rules{margin:0;padding:0 0 0 18px;display:flex;flex-direction:column;gap:6px;font-size:15px;line-height:1.45;color:var(--text)}
.dt-meals{display:flex;flex-direction:column}
.dt-meal{align-items:flex-start;padding-top:14px;padding-bottom:14px}
.dt-meal .lbl{display:flex;flex-direction:column;gap:3px}
.dt-meal .lbl small{white-space:normal}
.dt-meal time{font-family:var(--mono);font-size:12px;color:var(--text-3);min-width:46px;padding-top:3px}
.dt-shop{columns:2;column-gap:28px}
.dt-shop label{break-inside:avoid;display:flex;margin-bottom:10px}

/* ── try-on ────────────────────────────────────────────────── */
.to-styles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.to-style{height:auto;min-height:48px;padding:10px 14px;justify-content:flex-start;white-space:normal;text-align:left;line-height:1.3;border-radius:14px}
.to-cmp{position:relative;border-radius:var(--r-card);overflow:hidden;aspect-ratio:3/4;background:var(--surface-2);border:1px solid var(--hair);max-width:520px;touch-action:pan-y;user-select:none}
.to-cmp img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.to-cmp .after{clip-path:inset(0 0 0 var(--cut,50%))}
.to-cmp .handle{position:absolute;top:0;bottom:0;left:var(--cut,50%);width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 12px rgba(0,0,0,.5)}
.to-cmp .handle::after{content:"";position:absolute;top:50%;left:50%;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.4)}
.to-cmp input[type=range]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:ew-resize;margin:0}
.to-tags{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none}
.to-tags span{padding:4px 10px;border-radius:var(--r-pill);font-size:12px}
.to-prev{width:120px;aspect-ratio:3/4;border-radius:16px;overflow:hidden;background:var(--surface-2);border:1px solid var(--hair);flex:none}
.to-prev img{width:100%;height:100%;object-fit:cover}

/* ── reminders ─────────────────────────────────────────────── */
.rm-days{display:flex;gap:6px;flex-wrap:wrap}
.rm-day{width:40px;height:40px;border-radius:12px;border:0;background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair);color:var(--text-2);font:600 13px/1 var(--font);cursor:pointer;transition:background-color var(--d-1) var(--ease),color var(--d-1) var(--ease),transform var(--d-3) var(--spring)}
.rm-day[aria-pressed="true"]{background:var(--btn-bg);color:var(--btn-text);box-shadow:none}
.rm-day:active{transform:scale(.9);transition-duration:var(--d-1),var(--d-1),90ms}
.rm-item .lbl small{font-variant-numeric:tabular-nums}
.rm-time{font-size:22px;font-weight:700;letter-spacing:-.03em;font-variant-numeric:tabular-nums;min-width:74px}
.rm-push{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.rm-steps{margin:12px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:14.5px;color:var(--text-2)}

/* ── the owner's Members screen (app-owner.js) ───────────── */
.ow-unlock{max-width:560px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.ow-unlock .well{margin-bottom:6px}
.ow-unlock-f{display:flex;gap:10px;width:100%;margin-top:8px}
.ow-unlock-f .input{flex:1}
.ow-bar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.ow-search{flex:1;min-width:220px;display:flex;align-items:center;gap:10px;height:46px;padding:0 14px;border-radius:14px;background:var(--cell);box-shadow:inset 0 0 0 1px var(--hair-2)}
.ow-search:focus-within{box-shadow:inset 0 0 0 1.5px var(--focus),0 0 0 4px var(--glow)}
.ow-search .ic{--ic:17px;color:var(--text-3)}
.ow-search input{flex:1;min-width:0;border:0;background:none;color:var(--text);font:inherit;font-size:16px;outline:none;-webkit-appearance:none;appearance:none}
.ow-av{display:inline-flex;flex:none}
.ow-row .lbl small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ow-meta{display:flex;align-items:center;gap:10px;flex:none}
.ow-row.is-removed{opacity:.55}
.ow-hero{display:flex;align-items:center;gap:20px;margin-bottom:18px}
.ow-hero-t{min-width:0}
.ow-hero .subtitle{margin-top:6px;color:var(--text-2);font-size:16px;overflow-wrap:anywhere}
.ow-chips{margin-top:12px}
.ow-brief{white-space:pre-wrap;font:inherit;font-size:15px;line-height:1.55;padding:16px 18px;border-radius:var(--r-tile);background:var(--fill-1);box-shadow:inset 0 0 0 1px var(--hair);margin:0}
.ow-answers{display:flex;flex-direction:column;gap:4px;margin:14px 0 0}
.ow-answers dt{font-size:13px;color:var(--text-2);margin-top:10px}
.ow-answers dd{margin:0;font-size:15.5px;line-height:1.45;overflow-wrap:anywhere}
.ow-answers dd.is-empty{color:var(--text-3)}
.ow-prog{display:flex;align-items:center;gap:18px;margin:14px 0 10px}
.ow-map{width:120px;height:120px;flex:none}
.ow-map svg{width:100%;height:100%}
.ow-nums{display:flex;flex-direction:column;gap:4px;font-size:14px;color:var(--text-2)}
.ow-nums b{font-size:20px;color:var(--text);letter-spacing:-.02em}
/* the owner's delete on a chat line (chatui.js) */
.cmsg{position:relative}
.cmsg-del{position:absolute;top:2px;right:2px;width:30px;height:30px;border-radius:50%;border:0;padding:0;background:var(--fill-1);color:var(--text-3);display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity var(--d-1) var(--ease),color var(--d-1) var(--ease),background-color var(--d-1) var(--ease)}
.cmsg:hover .cmsg-del,.cmsg-del:focus-visible{opacity:1}
.cmsg-del .ic{--ic:15px}
.cmsg-del:hover{color:var(--danger);background:var(--danger-bg)}
.cmsg-del.is-err{color:var(--danger);opacity:1}
@media (hover:none){ .cmsg-del{opacity:.75} }

/* ── the public tools (score.html, face.html) ──────────────── */
.pt-main{width:min(1080px,calc(100% - 32px));margin:0 auto;padding:56px 0 96px}
.pt-hero{text-align:center;max-width:720px;margin:0 auto 36px}
.pt-hero .t-h2{margin-top:14px}
.pt-hero .lede{margin:14px auto 0}
.pt-card{padding:28px 30px;max-width:720px;margin:0 auto}
.sq-prog{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.sq-prog .bar{flex:1}
.sq-q{font-size:clamp(22px,3vw,28px);font-weight:700;letter-spacing:-.03em;line-height:1.2}
.sq-pillar{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px}
.sq-pillar .ic{--ic:16px;color:var(--tint)}
.sq-opts{margin-top:22px}
.sq-nav{display:flex;justify-content:space-between;align-items:center;margin-top:20px;gap:12px}
.sq-result{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:center}
.sq-map{width:100%;max-width:400px;aspect-ratio:1;margin:0 auto}
.sq-score{display:flex;align-items:baseline;gap:8px}
.sq-score b{font-size:96px;font-weight:700;letter-spacing:-.06em;line-height:.9;font-variant-numeric:tabular-nums;background:var(--title);-webkit-background-clip:text;background-clip:text;color:transparent}
.sq-score span{font-size:22px;color:var(--text-2);font-weight:600}
.sq-rows{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.sq-row{display:grid;grid-template-columns:110px minmax(0,1fr) 36px;gap:12px;align-items:center;font-size:14.5px}
.sq-row span:first-child{color:var(--text-2);display:flex;align-items:center;gap:8px}
.sq-row span:first-child .ic{--ic:15px}
.sq-row b{text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.sq-acts{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.sq-weak{margin-top:20px}
.pt-cta{margin-top:28px;padding:24px 26px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.pt-cta > div{flex:1;min-width:240px}
.pt-cta h3{font-size:19px;letter-spacing:-.02em}
.pt-cta p{color:var(--text-2);font-size:15px;margin-top:4px}
.pt-cta .btn{margin-left:auto}

/* ── responsive ────────────────────────────────────────────── */
@media (max-width:1180px){
  .tl-grid,.tr-list,.co-modes{grid-template-columns:repeat(2,minmax(0,1fr))}
  .to-styles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dt-targets{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:900px){
  .tl-top,.tl-two,.tl-two.even,.fs-result,.sq-result{grid-template-columns:minmax(0,1fr)}
  .tl-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dt-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tr-fields,.tr-fields.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tr-bl-row{grid-template-columns:78px minmax(0,1fr) minmax(0,1fr)}
  .tr-bl-row .input[type=date]{grid-column:2/-1}
}
@media (max-width:640px){
  .tr-list,.co-modes{grid-template-columns:minmax(0,1fr)}
  /* the hub on a phone (28 Sep 2026): twenty tools, so two to a row, compact,
     like the Shortcuts app — the name and where it stands; the line is on the tool */
  .tl-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tl-tile{min-height:0;padding:14px 14px 13px;gap:7px;border-radius:22px}
  .tl-tile .well{width:34px;height:34px;border-radius:10px}
  .tl-tile .well .ic{--ic:17px}
  .tl-tile h3{font-size:15px;line-height:1.25}
  .tl-tile p{display:none}
  .tl-tile .tl-state{font-size:12px;line-height:1.3}
  .tl-tile .tl-badges .tl-badge{height:20px;padding:0 7px;font-size:10.5px}
  .tl-today,.tl-focus-w,.tl-card{padding:18px 18px 20px}
  .tl-scale{grid-template-columns:64px minmax(0,1fr) 44px;gap:10px}
  .td-add{grid-template-columns:minmax(0,1fr) auto}
  .td-add .select-wrap{grid-column:1/-1;order:3}
  .to-styles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dt-form,.tr-fields,.tr-fields.two,.tr-fields.four{grid-template-columns:minmax(0,1fr)}
  .dt-targets{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dt-shop{columns:1}
  .tr-rowh{display:none}
  .tr-set{grid-template-columns:minmax(0,1fr) 62px 56px 40px 36px}
  .tr-set > :nth-child(1){grid-column:1/-1}
  .tr-claim{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tr-claim > :first-child{grid-column:1/-1}
  .tr-bl-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tr-bl-row > span{grid-column:1/-1}
  .tl-upsell{flex-wrap:wrap}
  .ow-hero{flex-direction:column;align-items:flex-start;gap:12px}
  .ow-meta .val{display:none}
  .ow-unlock-f{flex-direction:column}
  .tl-upsell .btn{margin-left:0;width:100%}
  .co-msg{max-width:94%}
  /* the composer rides above the tab bar, not under it */
  html:has(.tabbar:not([hidden])) .co-comp{bottom:calc(var(--tab-h) + 6px + env(safe-area-inset-bottom))}
  .co-wrap{min-height:calc(100dvh - var(--bar-h) - 200px)}
  .fs-score b{font-size:72px}
  .sq-score b{font-size:80px}
  .pt-card{padding:22px 18px}
  .pt-main{padding-top:34px}
  .pt-cta .btn{margin-left:0;width:100%}
}
@media (prefers-reduced-motion: reduce){
  .co-dots i{animation:none;opacity:.6}
}
html.rm .co-dots i{animation:none;opacity:.6}

/* ── the hub by pillar, and the four tools that replaced the notes app (28 Sep 2026) ── */
.tl-group{display:flex;align-items:center;gap:10px;margin:40px 0 14px}
.tl-group h2{font-size:19px;letter-spacing:-.02em;line-height:1.2}
.tl-group .well{width:28px;height:28px;border-radius:8px}
.tl-group .well .ic{--ic:15px;color:var(--text-2)}
.tl-group .mono{margin-left:auto}
/* the Journal */
.tr-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.tr-journal .tr-jrow{display:block;padding:12px 16px 14px}
.tr-journal .tr-jrow + .tr-jrow::before{left:16px}
.tr-jtop{display:flex;align-items:center;gap:10px;min-width:0}
.tr-jtop .badge{min-width:0;max-width:62%;overflow:hidden;text-overflow:ellipsis}
.tr-jtop .icon-btn{margin-left:auto}
.tr-jtext{margin-top:7px;font-size:15.5px;line-height:1.5;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
/* Standards and the grooming routine: a row per rule, marked with a segmented control */
.tr-std{display:flex;flex-direction:column}
.tr-std-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px solid var(--hair)}
.tr-std > .tr-std-row:first-child,.tr-when + .tr-std-row{border-top:0}
.tr-std-l{display:flex;flex-direction:column;min-width:0}
.tr-std-l b{font-weight:600;font-size:15.5px;letter-spacing:-.012em;line-height:1.3}
.tr-std-l small{margin-top:2px;font-size:13px;color:var(--text-2);line-height:1.35}
.tr-std-row .seg{flex:none;width:min(300px,56%)}
.tr-when{margin:16px 0 2px}
.tr-std > .tr-when:first-child{margin-top:0}
.tr-rules .is-retired .lbl{color:var(--text-3)}
.tr-rules .is-retired .lbl > :first-child,.tr-rules .is-retired .lbl{text-decoration:line-through;text-decoration-color:var(--hair-2)}
.tr-rules .is-retired .lbl small{text-decoration:none}
@media (max-width:640px){
  .tr-std-row{flex-direction:column;align-items:stretch;gap:8px}
  .tr-std-row .seg{width:100%}
  .tl-group{margin-top:32px}
}

