/* HOP — My Numbers / progress pills. The .pfill layer works inside ANY pill:
   give the pill position:relative + overflow:hidden, drop in
   <div class="pfill" style="--pct:28.6%">, and keep its content above it. */
.pfill{position:absolute;inset:0 auto 0 0;width:var(--pct,0%);background:color-mix(in srgb,var(--success) 22%,transparent);
  border-right:2px solid color-mix(in srgb,var(--success) 55%,transparent);pointer-events:none;z-index:0;transition:width .5s ease;}
.pfill[style*="--pct:100%"]{border-right:0;}
@media (prefers-reduced-motion:reduce){.pfill{transition:none;}}

/* Daily Weigh-In anchor + any anchor card */
.anchor-card{overflow:hidden;}
.anchor-card .anchor-icon,.anchor-card .anchor-title,.anchor-card .anchor-weigh,.anchor-card .anchor-sub,.anchor-card .anchor-prog{position:relative;z-index:1;}
.anchor-card .anchor-state{z-index:1;}
.anchor-prog{margin-top:3px;font-size:12.5px;font-weight:700;color:var(--success);line-height:1.25;}
.anchor-prog.is-muted{color:var(--text-faint);font-weight:600;}

/* Today list rows (pinned numbers, or any row that supplies progress) */
.attn-row.has-fill{position:relative;overflow:hidden;}
.attn-row.has-fill>*:not(.pfill){position:relative;z-index:1;}

/* My Numbers pills (Progress screen) */
.num-list{display:flex;flex-direction:column;gap:9px;}
.num-pill{position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:14px 15px;
  border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);font:inherit;cursor:pointer;box-shadow:var(--shadow-sm);}
.num-pill:active{transform:scale(.99);}
.num-pill.is-reached{border-color:color-mix(in srgb,var(--success) 45%,var(--border));}
.num-main{position:relative;z-index:1;flex:1;min-width:0;}
.num-name{font-family:var(--font-display);font-weight:800;font-size:16px;line-height:1.15;}
.num-sub{margin-top:3px;font-size:12.5px;color:var(--text-muted);line-height:1.3;}
.num-val{position:relative;z-index:1;font-family:var(--font-display);font-weight:800;font-size:17px;white-space:nowrap;}

/* Metric sheet */
.num-hero{position:relative;overflow:hidden;border:1px solid var(--border);border-radius:16px;padding:16px;margin-bottom:16px;background:var(--surface-2);}
.num-hero>*:not(.pfill){position:relative;z-index:1;}
.num-hero-val{font-family:var(--font-display);font-weight:800;font-size:30px;line-height:1.05;}
.num-hero-sub{margin-top:4px;font-size:13.5px;color:var(--text-muted);font-weight:600;}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end;margin-bottom:6px;}
.num-log-btn{align-self:end;margin-bottom:16px;}
.num-note{font-size:13px;color:var(--text-muted);line-height:1.4;margin:6px 0 14px;}
.num-suggest{margin:0 0 12px;}
.num-pin{display:flex;align-items:center;gap:10px;margin:14px 2px 6px;font-size:15px;font-weight:600;}
.num-preset{width:100%;text-align:left;background:transparent;border:0;font:inherit;color:inherit;}
.num-goal-box{margin:0 0 16px;border:1px solid var(--border);border-radius:14px;padding:10px 14px 4px;background:var(--surface-2);}
.num-goal-box summary{cursor:pointer;font-weight:700;font-size:14.5px;padding-bottom:8px;}
.num-goal-box .field-row{margin-top:6px;}

/* ---- past-date "Catch up" card ---- */
.bf-card{padding:16px;margin-top:12px;}
.bf-head{font-weight:800;font-size:16.5px;}
.bf-sub{color:var(--text-muted);font-size:14px;margin:2px 0 12px;}
.bf-actions{display:flex;flex-direction:column;gap:8px;margin-top:6px;}

/* ---- Progress: last 28 days grid ---- */
.cg-card{padding:16px;margin-bottom:14px;}
.cg-sum{color:var(--text-muted);font-size:14px;margin:0 0 10px;}
.cg-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;}
.cg-dow{text-align:center;font-size:11px;font-weight:700;color:var(--text-muted);}
.cg-cell{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:50px;padding:4px 0;border-radius:10px;border:1px dashed var(--border);background:transparent;color:var(--text);font-family:var(--font-body);cursor:pointer;}
.cg-cell.is-blank{border:none;cursor:default;}
.cg-d{font-size:10.5px;color:var(--text-muted);font-weight:700;line-height:1;}
.cg-w{font-size:12px;font-weight:800;line-height:1.1;}
.cg-cell.is-win{background:var(--accent-100, #dcedf9);border:1px solid var(--accent-600, #2a8fd0);}
.cg-cell.is-steady{background:var(--surface-2);border:1px solid var(--border);}
.cg-cell.is-baseline{background:var(--warning-100, #fdebd0);border:1px solid var(--warning, #d98a1d);}
.cg-cell.is-skipped{background:var(--surface-2);border:1px solid var(--border);opacity:.6;}
.cg-cell.is-today{outline:2px solid var(--accent-600, #2a8fd0);outline-offset:1px;}
.cg-beast{position:absolute;top:4px;right:5px;width:7px;height:7px;border-radius:50%;background:var(--accent-600, #2a8fd0);}
.cg-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:12px;color:var(--text-muted);margin:10px 0 2px;}
.cg-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;vertical-align:-1px;margin-right:3px;}
.cg-legend .lg-win{background:var(--accent-100, #dcedf9);border:1px solid var(--accent-600, #2a8fd0);}
.cg-legend .lg-base{background:var(--warning-100, #fdebd0);border:1px solid var(--warning, #d98a1d);}
.cg-legend .lg-dot{width:7px;height:7px;border-radius:50%;background:var(--accent-600, #2a8fd0);}
.cg-hint{font-size:12.5px;color:var(--text-muted);margin:4px 0 0;}

/* ---- Daily Weigh-In page ---- */
.wi-hero{padding:18px;margin-bottom:14px;}
.wi-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.wi-big{font-size:42px;font-weight:800;line-height:1;letter-spacing:-.5px;}
.wi-big span{font-size:18px;font-weight:700;color:var(--text-muted);}
.wi-when{color:var(--text-muted);font-size:14px;margin-top:6px;}
.wi-chg{text-align:right;font-weight:800;font-size:17px;line-height:1.15;}
.wi-chg small{display:block;font-size:12px;font-weight:600;color:var(--text-muted);}
.wi-chg.is-down{color:var(--accent-600);}
.wi-track{height:14px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);margin:16px 0 8px;overflow:hidden;}
.wi-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent-100,#c9e1f3),var(--accent-600,#2a8fd0));min-width:6px;}
.wi-line{color:var(--text-muted);font-size:14.5px;margin:0 0 14px;}
.wi-setup,.wi-recent{padding:16px;margin-bottom:14px;}
.wi-setup h3,.wi-recent h3{margin:0 0 10px;font-size:17px;}
.wi-note{color:var(--text-muted);font-size:13.5px;margin:6px 0 12px;}
.wi-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:11px 2px;border:0;border-bottom:1px solid var(--border);background:transparent;font-family:var(--font-body);color:var(--text);cursor:pointer;}
.wi-row:last-of-type{border-bottom:0;}
.wi-d{flex:1;font-size:14.5px;}
.wi-w{font-weight:800;font-size:15px;}
.wi-pill{font-size:12px;font-weight:800;border-radius:999px;padding:3px 9px;white-space:nowrap;}
.wi-pill.is-win{background:var(--accent-100,#dcedf9);color:var(--accent-600,#2a8fd0);}
.wi-pill.is-base{background:var(--warning-100,#fdebd0);color:var(--warning,#a8650a);}
.wi-pill.is-steady{background:var(--surface-2);color:var(--text-muted);}

/* Today focus row: BEAST -> FEAST -> FAST -> SLEEP over a faint KrugerBody wordmark (one line, scales down on narrow phones) */
.focus-card.has-wordmark{position:relative;overflow:hidden;min-height:60px;}
.focus-card.has-wordmark::before{content:"";position:absolute;inset:7px 12px;background:url("icons/krugerbody-wordmark.png") center/contain no-repeat;opacity:.17;pointer-events:none;}
.focus-card.has-wordmark > *{position:relative;z-index:1;}
.focus-card h3.focus-flow{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:4px;font-size:clamp(10.5px,3.3vw,14.5px);letter-spacing:0;white-space:nowrap;min-width:0;}
.focus-flow .flow-arrow{flex:none;width:1.0em;height:1.0em;color:var(--accent-500,#0f78be);}
@media (max-width:340px){.focus-card h3.focus-flow{gap:2px;font-size:10px;}}

/* Future date page: Daily Anchors, a break, then Your Choices */
#app main .hop-section-head{margin-bottom:8px;}
#app main .future-choices-head{margin-top:26px;}

/* Daily Anchor cards: one third shorter, same width */
.anchor-grid .anchor-card{min-height:75px;padding:10px 12px;border-radius:16px;}
.anchor-grid .anchor-icon{width:26px;height:26px;border-radius:9px;margin-bottom:6px;}
.anchor-grid .anchor-icon svg{width:15px;height:15px;}
.anchor-grid .anchor-title{font-size:clamp(13px,3.9vw,16.5px);line-height:1.1;white-space:nowrap;}
.anchor-grid .anchor-state{width:22px;height:22px;right:9px;top:9px;font-size:11px;}
.anchor-grid .anchor-state svg{width:12px;height:12px;}
.anchor-grid .anchor-card .anchor-weigh{font-size:18px;margin-top:2px;line-height:1.1;}
.anchor-grid .anchor-sub{margin-top:2px;font-size:12.5px;line-height:1.25;}
.anchor-grid .anchor-prog{margin-top:2px;font-size:12px;line-height:1.2;}

/* ---- Universal habit log form, "Why am I doing this...", yesterday check-in ---- */
.item-form-history-row .item-form-history-btn+.item-form-history-btn{margin-top:2px;}
.log-form .item-form-hero{margin-bottom:14px;}
.lf-sub{font-size:14.5px;color:var(--text-muted);margin-top:4px;text-align:center;}
.lf-field label{display:flex;align-items:baseline;gap:8px;font-size:15px;}
.lf-opt{font-size:12px;font-weight:600;color:var(--text-faint);text-transform:uppercase;letter-spacing:.05em;}
.lf-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px;}
.lf-chip{border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);font-family:var(--font-body);font-weight:600;font-size:15px;padding:9px 13px;border-radius:999px;cursor:pointer;min-height:40px;}
.lf-chip.is-on{background:var(--accent-100);border-color:var(--accent-500);color:var(--accent-600);}
.lf-field textarea{min-height:64px;font-size:16.5px;}
.why-view .why-for{font-size:15px;font-weight:700;color:var(--accent-600);margin:-6px 0 12px;}
.why-view .why-headline{font-family:var(--font-display);font-weight:800;font-size:19px;line-height:1.3;margin:0 0 12px;}
.why-view p{font-size:16.5px;line-height:1.5;margin:0 0 12px;color:var(--text);}
.why-step{background:var(--accent-100);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:3px;font-size:15.5px;line-height:1.4;margin-top:6px;}
.why-step b{color:var(--accent-600);font-size:13px;text-transform:uppercase;letter-spacing:.05em;}
.checkin .ci-note{background:var(--warning-100);color:var(--text);border-radius:12px;padding:11px 13px;font-size:15.5px;line-height:1.4;margin:0 0 12px;}
.checkin .ci-sub{color:var(--text-muted);font-size:14.5px;margin:-6px 0 12px;}
.ci-list{display:flex;flex-direction:column;gap:2px;margin-bottom:14px;}
.ci-row{display:flex;align-items:center;gap:12px;padding:11px 8px;border-radius:12px;cursor:pointer;font-size:17px;font-weight:600;color:var(--text);}
.ci-row:active{background:var(--surface-2);}
.ci-row input{width:24px;height:24px;flex-shrink:0;accent-color:var(--accent-500);margin:0;}
.ci-row small{display:block;font-size:13px;font-weight:500;color:var(--text-muted);}
.ci-row.is-off span{color:var(--text-muted);text-decoration:line-through;text-decoration-color:var(--text-faint);}

/* Focus row: big, bold, translucent words spanning ~80% of the button, logo watermark showing through */
.focus-card.has-wordmark{container-type:inline-size;min-height:68px;}
.focus-card.has-wordmark::before{opacity:.22;}
.focus-card h3.focus-flow{font-size:clamp(12px,4.85cqw,34px);font-weight:900;letter-spacing:.01em;gap:.28em;color:color-mix(in srgb,var(--text) 66%,transparent);}
.focus-flow .flow-arrow{width:.9em;height:.9em;opacity:.8;}
@media (max-width:340px){.focus-card h3.focus-flow{gap:.2em;font-size:clamp(11px,4.85cqw,34px);}}

/* ---- Curriculum philosophy pills ("?") and their pages ---- */
button.philosophy-pill{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;color:#fff;font-family:inherit;line-height:1.25;cursor:pointer;width:100%;}
button.philosophy-pill:active{background:rgba(255,255,255,.22);}
.philosophy-pill .pq{flex:none;width:19px;height:19px;border-radius:50%;background:rgba(255,255,255,.92);color:#102F5C;font-weight:800;font-size:12.5px;display:inline-flex;align-items:center;justify-content:center;}
.phil-hero h2{font-size:24px;line-height:1.2;}
.phil-block{padding:14px 16px;margin-top:12px;}
.phil-block h3{margin:0 0 6px;font-size:17.5px;}
.phil-block p{margin:0;font-size:16.5px;line-height:1.5;color:var(--text);}
.card.phil-hop{padding:14px 16px;margin-top:12px;background:var(--accent-100);border-color:transparent;}
.phil-hop h3{margin:0 0 8px;font-size:15px;text-transform:uppercase;letter-spacing:.05em;color:var(--accent-600);}
.phil-hop ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.phil-hop li{display:flex;gap:10px;align-items:flex-start;font-size:15.5px;line-height:1.45;}
.phil-hop li svg{flex:none;margin-top:3px;color:var(--accent-500);}
.phil-try-list{padding:4px 6px;}
.phil-try{display:grid;grid-template-columns:1fr auto;column-gap:10px;align-items:center;width:100%;text-align:left;background:transparent;border:none;border-radius:12px;padding:11px 10px;cursor:pointer;color:var(--text);font-family:inherit;}
.phil-try+.phil-try{border-top:1px solid var(--border);border-radius:0;}
.phil-try b{font-size:16.5px;}
.phil-try small{grid-column:1;color:var(--text-muted);font-size:14px;line-height:1.35;margin-top:2px;}
.phil-try svg{grid-row:1 / span 2;grid-column:2;color:var(--text-faint);}
.card.phil-pocket{margin:12px 0;padding:16px;text-align:center;background:linear-gradient(135deg,#102F5C,#0f78be);color:#fff;border:none;}
.card.phil-pocket small{display:block;opacity:.75;font-size:12.5px;text-transform:uppercase;letter-spacing:.07em;margin-bottom:4px;}
.card.phil-pocket b{font-family:var(--font-display);font-size:21px;line-height:1.25;}

/* ---- Home v2: weigh-in hero card, slim BEAST row ("To the Den"), Core-4 buttons ---- */
.anchor-grid{grid-template-columns:1fr;gap:10px;}
.anchor-grid .anchor-card.anchor-hero{min-height:0;padding:16px 16px 14px;border-radius:18px;}
.anchor-hero .anchor-head{display:flex;align-items:center;gap:10px;}
.anchor-grid .anchor-hero .anchor-icon{width:30px;height:30px;border-radius:10px;margin:0;flex:none;}
.anchor-grid .anchor-hero .anchor-icon svg{width:18px;height:18px;}
.anchor-hero.is-done .anchor-icon{background:var(--success);color:#fff;}
.anchor-grid .anchor-hero .anchor-title{font-size:16.5px;white-space:nowrap;}
.anchor-chip{margin-left:auto;font-size:12.5px;font-weight:800;line-height:1.2;padding:5px 11px;border-radius:999px;background:var(--surface-2);color:var(--text-muted);text-align:center;max-width:62%;}
.anchor-grid .anchor-hero .anchor-chip{margin-top:0;font-size:12.5px;line-height:1.2;}
.anchor-chip.is-above{background:color-mix(in srgb,#E0A100 22%,var(--surface));color:#8A5A00;}
.anchor-chip.is-win{background:var(--success-100);color:var(--success);}
.anchor-chip.is-todo{background:transparent;border:1.5px solid var(--border);}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .anchor-chip.is-above{color:#F0C25A;}}
:root[data-theme="dark"] .anchor-chip.is-above{color:#F0C25A;}
.anchor-grid .anchor-card .anchor-weigh{font-size:44px;line-height:1;letter-spacing:-.03em;color:var(--text);margin:14px 0 0;}
.anchor-weigh small{font-size:19px;font-weight:800;color:var(--accent-600);letter-spacing:0;}
.anchor-grid .anchor-card .anchor-weigh.is-prompt{font-size:22px;color:var(--text-muted);letter-spacing:-.01em;margin-top:12px;}
.anchor-bar{position:relative;height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden;margin:14px 0 7px;}
.anchor-bar .pfill{position:absolute;inset:0 auto 0 0;width:var(--pct,0%);background:var(--success);border:0;border-radius:999px;}
.anchor-grid .anchor-hero .anchor-prog{display:flex;justify-content:space-between;gap:8px;margin-top:0;font-size:12.5px;font-weight:600;color:var(--text-muted);}
.anchor-grid .anchor-hero .anchor-prog.is-muted{margin-top:12px;color:var(--text-faint);}
.anchor-grid .anchor-card.anchor-slim{display:flex;align-items:center;gap:12px;min-height:0;padding:11px 12px 11px 14px;border-radius:18px;}
.anchor-grid .anchor-slim .anchor-icon{width:34px;height:34px;border-radius:11px;margin:0;flex:none;}
.anchor-grid .anchor-slim .anchor-icon svg{width:19px;height:19px;}
.anchor-slim .anchor-copy{flex:1;min-width:0;}
.anchor-grid .anchor-slim .anchor-title{font-size:17px;white-space:normal;}
.anchor-grid .anchor-slim .anchor-sub{margin-top:1px;}
.anchor-grid .anchor-slim .anchor-state{position:static;flex:none;width:24px;height:24px;}
.anchor-go{flex:none;background:var(--accent-500);color:#fff;font-weight:800;font-size:14px;padding:9px 14px;border-radius:12px;white-space:nowrap;}
:root[data-theme="dark"] .anchor-go{color:#06182a;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .anchor-go{color:#06182a;}}
.anchor-slim.is-skipped .anchor-go,.anchor-slim.is-paused .anchor-go{background:var(--surface-3);color:var(--text-muted);}

.core4{margin-top:4px;}
.core4-mark{display:block;height:17px;width:auto;max-width:60%;margin:8px 2px 10px;}
.core4-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.core4-btn{appearance:none;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:14px;padding:11px 2px 9px;display:flex;flex-direction:column;align-items:center;gap:6px;font-family:var(--font-display);font-weight:800;font-size:11.5px;letter-spacing:.04em;cursor:pointer;box-shadow:var(--shadow-sm);}
.core4-btn svg{color:var(--accent-500);}
.core4-btn:active{transform:scale(.97);}
/* the grey half of the KrugerBody mark disappears on a dark page, so give it a light chip there */
:root[data-theme="dark"] .core4-mark{background:#fff;padding:5px 10px;border-radius:9px;box-sizing:content-box;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .core4-mark{background:#fff;padding:5px 10px;border-radius:9px;box-sizing:content-box;}}

/* ---- Home v3: compact weigh-in (60% of the old height), BEAST row 80% of it, Core-4 above the anchors ---- */
.anchor-grid .anchor-card.anchor-hero{min-height:98px;padding:8px 14px 9px;}
.anchor-hero .anchor-head{gap:9px;}
.anchor-grid .anchor-hero .anchor-icon{width:26px;height:26px;border-radius:9px;}
.anchor-grid .anchor-hero .anchor-icon svg{width:16px;height:16px;}
.anchor-grid .anchor-hero .anchor-title{font-size:15.5px;}
.anchor-grid .anchor-hero .anchor-chip{padding:3px 10px;font-size:12px;}
.anchor-mid{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:3px;}
.anchor-grid .anchor-card .anchor-weigh{font-size:34px;margin:0;line-height:1.05;}
.anchor-weigh small{font-size:16px;}
.anchor-grid .anchor-card .anchor-weigh.is-prompt{font-size:20px;margin:6px 0 4px;}
.anchor-grid .anchor-hero .anchor-prog{display:block;margin:0 0 2px;text-align:right;font-size:12px;line-height:1.3;white-space:nowrap;}
.anchor-grid .anchor-hero .anchor-prog span{display:block;}
.anchor-grid .anchor-hero .anchor-prog.is-muted{margin:0 0 2px;}
.anchor-bar{height:7px;margin:7px 0 0;}
.anchor-grid .anchor-card.anchor-slim{height:79px;min-height:79px;padding:0 14px 0 14px;gap:13px;}
.anchor-grid .anchor-slim .anchor-icon{width:42px;height:42px;border-radius:13px;}
.anchor-grid .anchor-slim .anchor-icon svg{width:22px;height:22px;}
.anchor-grid .anchor-slim .anchor-title{font-size:19px;}
.anchor-grid .anchor-slim .anchor-sub{font-size:13px;}
.anchor-go{font-size:15px;padding:11px 16px;}
.core4{margin-top:2px;margin-bottom:2px;}
.core4-mark{margin:4px 2px 9px;}


/* ===== One idea under the anchors (quiet; not an anchor) ===== */
.anchor-grid .idea-card{display:flex;align-items:center;gap:12px;padding:11px 8px 11px 14px;border-radius:18px;background:var(--surface);border:1px dashed var(--border-strong);cursor:pointer;min-height:76px;text-align:left;}
.idea-card:focus-visible{outline:2px solid var(--accent-500);outline-offset:2px;}
.idea-icon{flex:none;width:40px;height:40px;border-radius:12px;background:var(--accent-100);color:var(--accent-600);display:grid;place-items:center;}
.idea-copy{flex:1;min-width:0;}
.idea-kicker{font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint);}
.idea-title{font-family:var(--font-display);font-weight:800;font-size:16.5px;line-height:1.2;color:var(--text);margin-top:1px;}
.idea-sub{font-size:13px;line-height:1.3;color:var(--text-muted);margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.idea-shuffle{flex:none;width:40px;height:40px;border-radius:12px;border:0;background:transparent;color:var(--text-muted);display:grid;place-items:center;cursor:pointer;}
.idea-shuffle:hover{background:var(--surface-2);}

/* ===== Notebook: saved lines ===== */
.nb-sub{margin:2px 0 12px;font-size:14.5px;color:var(--text-muted);}
.nb-add{display:flex;gap:8px;margin-bottom:12px;}
.nb-input{flex:1;min-width:0;height:44px;border-radius:12px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);padding:0 12px;font:inherit;font-size:16px;}
.nb-list{padding:0;overflow:hidden;}
.nb-row{display:flex;align-items:center;gap:8px;padding:11px 8px 11px 14px;border-top:1px solid var(--border);}
.nb-row:first-child{border-top:0;}
.nb-text{flex:1;min-width:0;}
.nb-line{font-size:16px;font-weight:600;color:var(--text);word-break:break-word;}
.nb-meta{font-size:12.5px;color:var(--text-faint);margin-top:2px;}
.nb-use{flex:none;border:1px solid var(--accent-line);background:transparent;color:var(--accent-600);border-radius:10px;padding:6px 10px;font-weight:700;font-size:13px;cursor:pointer;}
.nb-del{flex:none;width:34px;height:34px;border-radius:10px;border:0;background:transparent;color:var(--text-faint);display:grid;place-items:center;cursor:pointer;}
.nb-del:hover{background:var(--surface-2);color:var(--danger);}
.lf-keep{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:14px;color:var(--text-muted);}
.lf-keep input{width:18px;height:18px;accent-color:var(--accent-500);}
.lf-chip.lf-more{background:transparent;border-style:dashed;}

/* ===== Daily Anchors as one list: weigh-in, BEAST, a habit of the day (what is left first, what is done below) ===== */
.anchor-list{padding:0;overflow:hidden;}
.anchor-list .anchor-card.anchor-row{display:flex;align-items:center;gap:12px;width:100%;min-height:0;height:auto;padding:12px 12px 12px 14px;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:left;color:var(--text);cursor:pointer;transform:none;font:inherit;overflow:visible;}
.anchor-list .anchor-card.anchor-row+.anchor-card.anchor-row{border-top:1px solid var(--border);}
.anchor-list .anchor-card.anchor-row:active{background:var(--surface-2);transform:none;}
.anchor-list .anchor-card.anchor-row.is-done,.anchor-list .anchor-card.anchor-row.is-glow{background:transparent;border-color:var(--border);box-shadow:none;}
.anchor-list .anchor-card.anchor-row.is-skipped,.anchor-list .anchor-card.anchor-row.is-paused{background:transparent;border-style:solid;}
.anchor-list .anchor-row .anchor-icon{width:40px;height:40px;border-radius:12px;margin:0;flex:none;background:var(--accent-100);color:var(--accent-600);display:grid;place-items:center;}
.anchor-list .anchor-row .anchor-icon svg{width:22px;height:22px;}
.anchor-list .anchor-row.is-done .anchor-icon{background:var(--success-100);color:var(--success);}
.anchor-list .anchor-row.is-skipped .anchor-icon,.anchor-list .anchor-row.is-paused .anchor-icon{background:var(--surface-2);color:var(--text-faint);}
.anchor-list .anchor-row .anchor-copy{flex:1;min-width:0;}
.anchor-list .anchor-row .anchor-title{font-size:16.5px;line-height:1.15;white-space:normal;}
.anchor-list .anchor-row .anchor-sub{margin:2px 0 0;font-size:13px;line-height:1.3;color:var(--text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.anchor-list .anchor-row .anchor-sub.is-ok{color:var(--success);font-weight:700;}
.anchor-list .anchor-row.anchor-hero .anchor-title{white-space:nowrap;}
.anchor-list .anchor-row.anchor-hero .anchor-sub.is-ok{white-space:nowrap;display:block;}
.anchor-list .anchor-row.anchor-slim .anchor-chev,.anchor-list .anchor-row.anchor-hero.is-done .anchor-chev{display:none;}
.anchor-list .anchor-right{flex:0 1 124px;min-width:0;text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:3px;}
.anchor-list .anchor-row .anchor-weigh{margin:0;font-size:22px;line-height:1;white-space:nowrap;color:var(--text);}
.anchor-list .anchor-row .anchor-weigh small{font-size:13px;font-weight:700;color:var(--text-muted);}
.anchor-list .anchor-row .anchor-prog{display:block;margin:3px 0 0;text-align:left;font-size:12.5px;font-weight:700;line-height:1.25;color:var(--text-muted);white-space:nowrap;}
.anchor-list .anchor-row .anchor-prog.is-muted{color:var(--text-faint);}
.anchor-list .anchor-note{font-size:11.5px;text-align:right;font-weight:700;line-height:1.25;color:var(--text-muted);}
.anchor-list .anchor-note.is-above{color:#8A5A00;}
.anchor-list .anchor-note.is-win{color:var(--success);}
:root[data-theme="dark"] .anchor-list .anchor-note.is-above{color:#F0C25A;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .anchor-list .anchor-note.is-above{color:#F0C25A;}}
.anchor-list .anchor-go{flex:none;font-size:13.5px;padding:9px 12px;}
.anchor-list .anchor-slim.is-skipped .anchor-go,.anchor-list .anchor-slim.is-paused .anchor-go{background:var(--surface-3);color:var(--text-muted);}
.anchor-chev{flex:none;color:var(--text-faint);display:grid;place-items:center;}
@media (max-width:370px){.anchor-list .anchor-row .anchor-weigh{font-size:20px}.anchor-list .anchor-right{flex-basis:112px}}

/* a small picture for every habit row */
.row-icon{flex:none;width:38px;height:38px;border-radius:12px;background:var(--accent-100);color:var(--accent-600);display:grid;place-items:center;}
.row-icon svg{width:20px;height:20px;}

/* the short "what is this / how" under a habit's name */
.item-form-blurb{text-align:center;max-width:34ch;margin:2px auto 0;color:var(--text-muted);font-size:15px;line-height:1.4;}
.item-form-blurb p{margin:0 0 6px;}
.item-form-how b{color:var(--text);}
.item-form-how span{white-space:nowrap;}

/* History: summary, calendar, entries */
.hist-view .hist-lead{display:flex;align-items:center;gap:12px;margin:2px 0 12px;}
.hist-lead-title{font-family:var(--font-display);font-weight:800;font-size:17px;}
.hist-lead-sub{font-size:13.5px;color:var(--text-muted);margin-top:1px;}
.hist-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 12px;}
.hist-stat{background:var(--surface-2);border-radius:14px;padding:10px 4px;text-align:center;}
.hist-stat b{display:block;font-family:var(--font-display);font-weight:800;font-size:21px;line-height:1.1;color:var(--text);}
.hist-stat b small{font-size:12px;color:var(--text-muted);font-weight:700;}
.hist-stat span{display:block;margin-top:3px;font-size:11.5px;color:var(--text-muted);line-height:1.2;}
.hist-cal{padding:12px 14px 10px;margin-bottom:6px;}
.hist-cal-head,.hist-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center;gap:7px 0;}
.hist-cal-head span{font-size:11.5px;font-weight:700;color:var(--text-faint);}
.hist-cal-grid{margin-top:6px;}
.hist-dot{display:inline-block;width:22px;height:22px;border-radius:50%;background:var(--surface-2);border:1.5px solid var(--border);}
.hist-dot.is-done{background:var(--accent-500);border-color:var(--accent-500);}
.hist-dot.is-skip{background:transparent;border:1.5px dashed var(--text-faint);}
.hist-dot.is-future{background:transparent;border-color:transparent;}
.hist-dot.is-today{box-shadow:0 0 0 2px var(--surface),0 0 0 3.5px var(--accent-500);}
.hist-cal-key{display:flex;align-items:center;gap:14px;margin-top:10px;font-size:12.5px;color:var(--text-muted);}
.hist-cal-key .hist-dot{width:12px;height:12px;vertical-align:-1px;margin-right:3px;}
.hist-cal-key .hist-best{margin-left:auto;font-weight:700;}
.hist-list-label{margin-top:10px;}
.anchor-list .anchor-row.anchor-slim .anchor-sub{-webkit-line-clamp:3;}
.anchor-list .anchor-row .anchor-bar{position:absolute;left:14px;right:14px;bottom:5px;height:4px;margin:0;border-radius:999px;background:var(--surface-3);overflow:hidden;z-index:1;}
.anchor-list .anchor-row.anchor-hero{padding-bottom:16px;}
.attn-row-blurb{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.5px;line-height:1.3;}
