/* Life by Design OS — "Midnight" design system (life-by-design-os.md) */
:root {
  --ink-900:#0F1524; --ink-800:#1A2236; --ink-700:#333E56; --ink-600:#4E5A73;
  --ink-500:#6B7690; --ink-400:#97A0B5; --ink-300:#BEC5D5; --ink-200:#D8DDE7; --ink-100:#E7EAF1;
  --paper:#EDF0F6; --paper-2:#E3E8F1; --cream:#E4E9F1; --cream-2:#F2F5FA;
  --white:#FBFCFE; --white-2:#FFFFFF;
  --black:#131A2B; --on-black:#EEF1F8;
  --line:#DAE0EB; --line-soft:#E6EAF2; --line-strong:#C2CAD9;
  --sapphire:#2F569E; --sapphire-100:#D9E2F2;
  --teal:#2E7264; --teal-100:#D3E4DF;
  --gold:#A8862F; --gold-100:#EEE3C8;
  --garnet:#9C3348; --garnet-100:#EBD2D7;
  --font-serif:'Newsreader','Iowan Old Style',Georgia,serif;
  --font-sans:'Public Sans',system-ui,-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --nav-width:208px; --content-max:760px;
  --shadow-modal:0 30px 74px -20px rgba(15,21,36,0.40);
  --scrim:rgba(11,16,30,0.44);
  --ease:cubic-bezier(0.4,0,0.2,1);
}
* { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; }
body { background:var(--paper); color:var(--ink-700); font:16px/1.55 var(--font-sans); -webkit-font-smoothing:antialiased; }
.boot { display:flex; height:100vh; align-items:center; justify-content:center; font:400 28px var(--font-serif); color:var(--ink-400); }
button { font:inherit; cursor:pointer; }
a { color:var(--sapphire); text-decoration:none; }

/* ---------- micro-label (signature) ---------- */
.mlabel { font:600 11px var(--font-sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-400); }
.kbd { font:500 11px var(--font-mono); letter-spacing:.02em; color:var(--ink-400); border:1px solid var(--line); border-radius:4px; padding:1px 6px; }

/* ---------- layout ---------- */
.shell { display:flex; min-height:100vh; }
.rail { position:fixed; inset:0 auto 0 0; width:var(--nav-width); background:var(--cream); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:28px 0 16px; z-index:10; }
.rail .wordmark { font:500 22px var(--font-serif); color:var(--ink-900); padding:0 20px 2px; }
.rail .wordsub { font:600 10px var(--font-sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-400); padding:0 20px 18px; border-bottom:1px solid var(--line-soft); }
.rail nav { flex:1; padding-top:10px; overflow-y:auto; }
.navitem { display:flex; align-items:center; justify-content:space-between; width:100%; text-align:left; background:none; border:none; padding:10px 20px; font:500 14px var(--font-sans); color:var(--ink-600); transition:background .12s var(--ease), color .12s var(--ease); }
.navitem:hover { color:var(--ink-900); background:var(--cream-2); }
.navitem.active { background:var(--cream-2); color:var(--ink-900); font-weight:600; box-shadow:inset 2px 0 0 var(--sapphire); }
.navitem .count { font:500 11px var(--font-mono); color:var(--ink-400); }
.rail .foot { border-top:1px solid var(--line-soft); padding-top:8px; }
.rail .foot .navitem { font-size:12px; letter-spacing:.1em; text-transform:uppercase; font-weight:600; color:var(--ink-500); }
main { flex:1; margin-left:var(--nav-width); padding:40px 40px 110px; }
.col { max-width:var(--content-max); }
.col.wide { max-width:1160px; }
.grid2 { display:grid; grid-template-columns:1.5fr 1fr; gap:24px; align-items:start; }
.gcol { min-width:0; }
.gcol > .card:last-child { margin-bottom:0; }

/* ---------- masthead ---------- */
.eyebrow { font:600 11px var(--font-sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-400); margin-bottom:8px; }
h1.pagetitle { font:400 42px/1.1 var(--font-serif); letter-spacing:-0.01em; color:var(--ink-900); margin-bottom:6px; }
.pagemeta { color:var(--ink-500); font-size:14px; margin-bottom:28px; }

/* ---------- cards ---------- */
.card { background:var(--white); border:1px solid var(--line); border-radius:4px; padding:20px 22px; margin-bottom:20px; }
.card.alert { background:var(--garnet-100); border-color:#d9b3bc; }
.cardhead { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px; }
.cardhead .acc { font:500 12px var(--font-mono); color:var(--ink-400); }

/* ---------- stat tiles (animateStats count-up target) ---------- */
.stattiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin-bottom:20px; }
.stattiles .card { margin-bottom:0; }
.stat .k { font:600 9.5px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-400); margin-bottom:6px; }
.stat .v { font:500 22px var(--font-serif); color:var(--ink-900); }
.stat .v.good { color:var(--teal); }
.stat .v.bad { color:var(--garnet); }

/* ---------- task rows ---------- */
.trow { display:flex; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid var(--line-soft); min-height:44px; }
.trow:last-child { border-bottom:none; }
.trow .tcheck { width:19px; height:19px; min-width:19px; border:1.5px solid var(--ink-300); border-radius:2px; background:var(--white-2); display:flex; align-items:center; justify-content:center; color:transparent; font-size:13px; transition:all .12s var(--ease); border:1.5px solid var(--line-strong); }
.trow .tcheck.done { background:var(--teal); border-color:var(--teal); color:#fff; }
.trow .tmain { flex:1; min-width:0; }
.trow .ttitle { color:var(--ink-800); font-size:15px; cursor:pointer; }
.trow.done .ttitle { color:var(--ink-400); text-decoration:line-through; }
.trow .tmeta { font-size:12px; color:var(--ink-400); margin-top:1px; display:flex; gap:8px; flex-wrap:wrap; }
.trow .tstar { background:none; border:none; font-size:16px; color:var(--ink-300); padding:4px; }
.trow .tstar.on { color:var(--gold); }
.badge { font:600 10px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; padding:2px 8px; border-radius:999px; }
.badge.ink { background:var(--ink-100); color:var(--ink-600); }
.badge.accent { background:var(--sapphire-100); color:var(--sapphire); }
.badge.ok { background:var(--teal-100); color:var(--teal); }
.badge.warn { background:var(--gold-100); color:var(--gold); }
.badge.alert { background:var(--garnet-100); color:var(--garnet); }
.p1 { color:var(--garnet); font-weight:600; }

/* ---------- forms ---------- */
.field { margin-bottom:18px; }
.field label { display:block; margin-bottom:6px; font:600 11px var(--font-sans); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-400); }
/* :not([type=checkbox]) matters — without it this rule stretched every toggle
   switch inside a .field into a full-width 40px bar (Accounts, Bills, Habits). */
.field input:not([type=checkbox]), .field select { width:100%; height:40px; border:none; border-bottom:1px solid var(--line-strong); background:var(--white-2); padding:0 10px; font:400 15px var(--font-sans); color:var(--ink-800); outline:none; border-radius:2px 2px 0 0; transition:border-color .12s; }
.field input:focus, .field select:focus { border-bottom:1.5px solid var(--ink-900); }
.field textarea { width:100%; border:1px solid var(--line-strong); border-radius:2px; background:var(--white-2); padding:10px; font:400 15px/1.5 var(--font-sans); color:var(--ink-800); outline:none; min-height:80px; resize:vertical; }
.field textarea:focus { border-color:var(--ink-900); }
.field .mono { font-family:var(--font-mono); font-size:14px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:42px; padding:0 22px; border-radius:2px; border:1px solid transparent; font:600 12px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; transition:transform .08s; }
.btn:active { transform:translateY(1px); }
.btn.primary { background:var(--black); color:var(--on-black); }
.btn.secondary { background:var(--white); border-color:var(--line-strong); color:var(--ink-700); }
.btn.ghost { background:none; color:var(--ink-500); }
.btn.full { width:100%; }
.formgrid { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.formgrid .span2 { grid-column:1 / -1; }

/* ---------- login ---------- */
.loginwrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.loginbox { width:100%; max-width:360px; }
.loginbox .wordmark { font:400 34px var(--font-serif); color:var(--ink-900); margin-bottom:4px; }
.loginbox .wordsub { font:600 10px var(--font-sans); letter-spacing:.16em; text-transform:uppercase; color:var(--ink-400); margin-bottom:34px; }
.loginerr { color:var(--garnet); font-size:13px; margin:-6px 0 14px; min-height:18px; }

/* ---------- capture overlay ---------- */
.overlay { position:fixed; inset:0; background:var(--scrim); backdrop-filter:blur(2px); display:flex; align-items:flex-start; justify-content:center; padding:12vh 20px 20px; z-index:50; }
/* max-height + scroll so a long form (the Accounts sheet has ten fields) can't push
   its own Save button off the bottom of the screen. */
.sheet { width:100%; max-width:560px; background:var(--white); border-radius:8px; box-shadow:var(--shadow-modal); padding:22px; max-height:84vh; overflow-y:auto; }
@media (max-height:820px) { .overlay { padding:6vh 20px 20px; } .sheet { max-height:88vh; } }
.sheet textarea { width:100%; border:none; outline:none; font:400 17px/1.5 var(--font-sans); color:var(--ink-800); min-height:76px; resize:none; background:transparent; }
.sheet .sheetfoot { display:flex; align-items:center; justify-content:space-between; margin-top:10px; }
.capresult { margin-top:14px; border-top:1px solid var(--line-soft); padding-top:12px; font-size:14px; color:var(--ink-700); }
.capresult .rline { display:flex; gap:8px; align-items:baseline; padding:3px 0; }
.spin { display:inline-block; width:14px; height:14px; border:2px solid var(--ink-200); border-top-color:var(--sapphire); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---------- misc ---------- */
.empty { color:var(--ink-400); font-size:14px; padding:12px 0; font-style:italic; }
.quiet { color:var(--ink-400); font-size:12px; }
.fab { position:fixed; right:22px; bottom:calc(24px + env(safe-area-inset-bottom)); width:54px; height:54px; border-radius:50%; background:var(--black); color:var(--on-black); border:none; font-size:22px; box-shadow:0 12px 38px -12px rgba(15,21,36,.4); z-index:40; }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.chip { border:1px solid var(--line-strong); background:var(--white); border-radius:999px; padding:5px 14px; font:600 11px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-500); }
.chip.on { background:var(--black); color:var(--on-black); border-color:var(--black); }
.evrow { display:flex; gap:12px; padding:7px 0; border-bottom:1px solid var(--line-soft); font-size:14px; }
.evrow:last-child { border-bottom:none; }
.evrow .evtime { font:500 12px var(--font-mono); color:var(--gold); min-width:74px; padding-top:2px; }
.domrow { display:flex; align-items:center; justify-content:space-between; padding:13px 2px; border-bottom:1px solid var(--line-soft); }
.domrow:last-child { border-bottom:none; }
.domrow .dname { color:var(--ink-800); font-size:15px; font-weight:500; }
.domrow .dstats { display:flex; gap:14px; font:500 12px var(--font-mono); color:var(--ink-400); }

/* ---------- phase 2: rhythm / routines / projects / slipping ---------- */
.sliprow { display:flex; align-items:flex-start; gap:10px; padding:9px 0; border-bottom:1px solid #e0c4cb; }
.sliprow:last-child { border-bottom:none; }
.slipmain { flex:1; font-size:14px; color:var(--ink-800); }
.slipx { background:none; border:none; color:var(--ink-400); font-size:13px; padding:2px 6px; }
.slipx:hover { color:var(--garnet); }
.rblock { padding:8px 0 4px; border-bottom:1px solid var(--line-soft); }
.rblock:last-child { border-bottom:none; }
.rrow, .rtrow { display:flex; align-items:center; gap:11px; padding:8px 0; min-height:40px; }
.rtrow { align-items:flex-start; border-bottom:1px solid var(--line-soft); padding:11px 0; }
.rtrow:last-child { border-bottom:none; }
.rtmain { flex:1; min-width:0; }
.rname { font-size:15px; color:var(--ink-800); }
.rname.rdone, .rdone { color:var(--ink-400); text-decoration:line-through; }
.rbridge { display:flex; gap:8px; flex-wrap:wrap; padding:8px 0 6px; }
.heat { display:flex; gap:3px; margin-top:6px; }
.heatcell { width:9px; height:9px; border-radius:2px; background:var(--ink-100); }
.heatcell.on { background:var(--teal); }
.progress { height:6px; background:var(--ink-100); border-radius:3px; overflow:hidden; }
.progressfill { height:100%; background:var(--sapphire); border-radius:3px; transition:width .3s var(--ease); }
.projrow { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 2px; border-bottom:1px solid var(--line-soft); cursor:pointer; }
.projrow:last-child { border-bottom:none; }
.projrow:hover .projname { color:var(--sapphire); }
.projname { font-size:15.5px; font-weight:500; color:var(--ink-800); }
.sheetwide { max-width:640px; max-height:86vh; overflow-y:auto; }
.addrow { display:flex; gap:8px; margin-top:8px; }
.addrow input { flex:1; height:38px; border:none; border-bottom:1px solid var(--line-strong); background:var(--white-2); padding:0 10px; font:400 14px var(--font-sans); color:var(--ink-800); outline:none; border-radius:2px 2px 0 0; }
.addrow input:focus { border-bottom:1.5px solid var(--ink-900); }

/* ---------- daily brief: countdown / daily text / tiles / week / lifebook / inbox ---------- */
.countdown { background:var(--ink-900); color:var(--on-black); border-radius:4px; padding:16px 22px; margin-bottom:24px; }
.cdtop { display:flex; align-items:baseline; gap:2px; }
.cdnum { font:400 34px var(--font-serif); color:var(--gold); }
.cdlbl { font:600 11px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-300); margin-left:10px; }
.cdmission { font-size:14px; color:var(--ink-300); margin-top:6px; font-style:italic; }
.dtcard { background:var(--white); }
.dtscrip { font:400 20px/1.4 var(--font-serif); color:var(--ink-900); margin:8px 0 6px; }
.dtcite { font-size:15px; color:var(--ink-500); font-style:italic; }
.dtcomment { font-size:14px; line-height:1.6; color:var(--ink-600); }
/* ---- meetings this week (sits under the Daily Text) ---- */
.mtgcard { border-top:3px solid var(--gold); }
.mtgblock { padding:10px 0; border-bottom:1px solid var(--line-soft); }
.mtgblock:last-child { padding-bottom:0; border-bottom:none; }
.mtgkind { font:600 10px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--gold); }
.mtgline { font-size:14.5px; line-height:1.5; color:var(--ink-700); margin-top:3px; }
.mtgline.quiet { font-size:13.5px; color:var(--ink-500); }
.mtgline b { font-weight:600; color:var(--ink-900); }
.mtgsong { font:500 11.5px var(--font-mono); color:var(--ink-400); margin-top:4px; letter-spacing:.02em; }
.mtgwarn { font-size:13.5px; line-height:1.55; color:var(--ink-500); margin-top:8px;
  padding:9px 12px; border:1px solid var(--line); border-radius:8px; }
/* accordion head — a real <button> so it is keyboard- and screen-reader-reachable,
   stripped back to look like the .cardhead it replaces */
.mtghead { display:flex; align-items:center; gap:8px; width:100%; background:none; border:none;
  padding:0 0 2px; margin:0; cursor:pointer; text-align:left; font:inherit; color:inherit;
  -webkit-tap-highlight-color:transparent; }
.mtghead .acc { margin-left:auto; }
.mtghead:hover .mlabel { color:var(--gold); }
.mtgcaret { font-size:10px; color:var(--gold); width:9px; line-height:1; }
.mtgsum { font-size:14px; line-height:1.5; color:var(--ink-600); margin-top:5px; }
.mtgsum b { font-weight:600; color:var(--ink-900); }
.mtgread { font:400 19px/1.3 var(--font-serif); color:var(--ink-900); margin:5px 0 6px; }
.mtgrun { font:500 11.5px var(--font-mono); color:var(--ink-500); letter-spacing:.02em;
  padding:6px 0; border-top:1px solid var(--line-soft); margin-top:8px; }
.mtgsec { margin-top:12px; }
.mtgseclbl { font:600 9.5px var(--font-sans); letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-400); padding-bottom:5px; border-bottom:1px solid var(--line-soft); }
.mtgitem { margin-top:8px; }
.mtgirow { font-size:14px; line-height:1.5; color:var(--ink-700); }
.mtgnum { font:600 12px var(--font-mono); color:var(--gold); margin-right:5px; }
.mtgittl { font-weight:600; color:var(--ink-900); }
.mtgmin { font:500 11.5px var(--font-mono); color:var(--ink-400); margin-left:5px; white-space:nowrap; }
.mtgfmt { font:600 9.5px var(--font-sans); letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-500); margin-left:6px; }
.mtgin { color:var(--ink-600); }
.mtgbul { list-style:none; margin:4px 0 0; padding:0 0 0 18px; }
.mtgbul li { position:relative; font-size:13.5px; line-height:1.55; color:var(--ink-600); margin-top:4px; }
.mtgbul li:before { content:'·'; position:absolute; left:-11px; color:var(--gold); font-weight:700; }
.mtgsrc { font:500 11.5px var(--font-mono); color:var(--ink-400); margin:4px 0 6px; letter-spacing:.02em; }
/* no border-top: a .mtgblock always precedes it and already draws the rule */
.mtgnext { font-size:12.5px; color:var(--ink-400); padding-top:9px; }
.mtgnext b { color:var(--ink-600); font-weight:600; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:1px; background:var(--line-soft); border:1px solid var(--line-soft); border-radius:3px; overflow:hidden; }
.tile { background:var(--white); padding:12px 14px; }
.tlabel { font:600 10px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-400); }
.tval { font:400 24px var(--font-serif); color:var(--ink-900); margin-top:3px; }
.tval.t-teal { color:var(--teal); } .tval.t-gold { color:var(--gold); } .tval.t-garnet { color:var(--garnet); }
.tsub { font-size:11px; color:var(--ink-400); margin-top:1px; }
.wfocus { font:400 15px var(--font-serif); font-style:italic; color:var(--ink-700); margin-bottom:12px; }
.wtrow { display:flex; align-items:center; gap:10px; padding:6px 0; font-size:14px; color:var(--ink-700); border-bottom:1px solid var(--line-soft); }
.wtrow:last-child { border-bottom:none; }
.wtcheck { width:16px; height:16px; min-width:16px; border:1.5px solid var(--line-strong); border-radius:2px; display:flex; align-items:center; justify-content:center; font-size:11px; color:#fff; }
.wtcheck.on { background:var(--teal); border-color:var(--teal); }
.nsstar { text-transform:none; letter-spacing:0; font-weight:500; }
.lbrow { display:flex; align-items:center; gap:13px; padding:14px 2px; border-bottom:1px solid var(--line-soft); }
.lbrow:last-child { border-bottom:none; }
.lbdot { width:10px; height:10px; min-width:10px; border-radius:50%; }
.lbmain { flex:1; min-width:0; }
.lblinks { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.dashlink { font:600 12px var(--font-sans); color:var(--sapphire); white-space:nowrap; }
.dashlink:hover { color:var(--ink-900); }
.caprow { display:flex; align-items:flex-start; gap:12px; padding:12px 2px; border-bottom:1px solid var(--line-soft); }
.caprow:last-child { border-bottom:none; }
.capmain { flex:1; min-width:0; }
.captext { font-size:15px; color:var(--ink-800); }
.capacts { display:flex; align-items:center; gap:8px; }
.capacts select { border:1px solid var(--line-strong); border-radius:2px; background:var(--white-2); font:500 12px var(--font-sans); color:var(--ink-600); padding:6px; }

/* ---------- phase 3: people / library / records / search / ask ---------- */
.prow, .librow { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 2px; border-bottom:1px solid var(--line-soft); cursor:pointer; }
.prow:last-child, .librow:last-child { border-bottom:none; }
.pname { font-size:15.5px; font-weight:500; color:var(--ink-800); }
.prow:hover .pname, .librow:hover .libtitle { color:var(--sapphire); }
.libmain { flex:1; min-width:0; }
.libtitle { font-size:15px; font-weight:500; color:var(--ink-800); }
.libex { font-size:13px; color:var(--ink-500); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.noteview { font:400 13.5px/1.6 var(--font-mono); color:var(--ink-700); white-space:pre-wrap; word-break:break-word; max-height:64vh; overflow-y:auto; background:var(--paper); border:1px solid var(--line-soft); border-radius:3px; padding:14px; }
.sres { padding:10px 8px; border-bottom:1px solid var(--line-soft); cursor:pointer; border-radius:3px; }
.sres:hover { background:var(--cream-2); }
.srhead { font:600 11px var(--font-sans); letter-spacing:.06em; text-transform:uppercase; color:var(--ink-500); }
.srex { font-size:13.5px; color:var(--ink-700); margin-top:3px; line-height:1.5; }
.askanswer { font-size:15px; line-height:1.65; color:var(--ink-800); white-space:pre-wrap; }

/* ---------- mobile ---------- */
/* ---------- embedded LifeBook dashboards (full-bleed) ---------- */
button.dashlink { background:none; border:none; cursor:pointer; font:inherit; }
.fullmain { margin-left:var(--nav-width); padding:0; height:100dvh; display:flex; flex-direction:column; min-width:0; }
.dashbar { display:flex; align-items:center; gap:14px; padding:12px 22px; border-bottom:1px solid var(--line); background:var(--cream); flex:0 0 auto; }
.dashback { background:none; border:none; font:600 12px var(--font-sans); letter-spacing:.06em; text-transform:uppercase; color:var(--ink-500); padding:6px 10px; border-radius:4px; }
.dashback:hover { color:var(--ink-900); background:var(--cream-2); }
.dashname { font:500 17px var(--font-serif); color:var(--ink-900); }
.dashframe { flex:1; width:100%; border:none; background:var(--paper); }
@media (max-width:900px) { .fullmain { margin-left:0; height:calc(100dvh - 50px); } }

.tabbar { display:none; }
@media (max-width:900px) {
  .rail { display:none; }
  main { margin-left:0; padding:26px 18px 130px; }
  h1.pagetitle { font-size:32px; }
  .formgrid { grid-template-columns:1fr; }
  .grid2 { grid-template-columns:1fr; gap:0; }
  .col.wide { max-width:var(--content-max); }
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; background:var(--white); border-top:1px solid var(--line); z-index:30; padding-bottom:env(safe-area-inset-bottom); overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .tabbar button { flex:0 0 auto; min-width:20%; background:none; border:none; padding:11px 14px 9px; font:600 10px var(--font-sans); letter-spacing:.08em; text-transform:uppercase; color:var(--ink-400); white-space:nowrap; }
  .tabbar button.active { color:var(--ink-900); box-shadow:inset 0 2px 0 var(--sapphire); }
  .fab { bottom:calc(74px + env(safe-area-inset-bottom)); }
}

/* ---------------- Settings ---------------- */
.setlist { display:flex; flex-direction:column; }
.setrow { display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:11px 2px; border-bottom:1px solid var(--line-soft); cursor:default; }
.setrow:last-child { border-bottom:none; }
.setrowmain { display:flex; flex-direction:column; gap:2px; min-width:0; }
.setlabel { font:600 14px var(--font-sans); color:var(--ink-900); }
.setseg { display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.setcol { font:500 12px var(--font-sans); color:var(--ink-700); background:var(--white-2);
  border:1px solid var(--line); border-radius:8px; padding:5px 6px; }
.minibtn { font:600 12px var(--font-sans); color:var(--ink-700); background:var(--white-2);
  border:1px solid var(--line); border-radius:8px; padding:5px 10px; text-decoration:none;
  cursor:pointer; white-space:nowrap; line-height:1.2; }
.minibtn:hover { border-color:var(--line-strong); color:var(--ink-900); }
.minibtn:disabled { opacity:.35; cursor:default; }
.setcheck { appearance:none; -webkit-appearance:none; width:44px; height:26px; flex:0 0 auto;
  border-radius:999px; background:var(--ink-200); position:relative; cursor:pointer;
  transition:background .18s var(--ease); border:none; }
.setcheck::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px;
  border-radius:50%; background:var(--white); box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .18s var(--ease); }
.setcheck:checked { background:var(--sapphire); }
.setcheck:checked::after { left:21px; }
label.setrow { cursor:pointer; }
/* A toggle row inside a form field is a ROW, not a field caption — without this it
   inherited .field label's uppercase 11px tracking and read as a heading. */
.field label.setrow { display:flex; margin-bottom:0; font:inherit; letter-spacing:normal;
  text-transform:none; color:inherit; }
.field label.setrow .setlabel { font:600 14px var(--font-sans); color:var(--ink-900);
  text-transform:none; letter-spacing:normal; }
.field label.setrow .quiet { text-transform:none; letter-spacing:normal; font-size:12.5px; }
.field .setcheck { width:44px; height:26px; }
/* toggles read as a group, so tighten the gap the generic .field margin leaves */
.formgrid .field.span2:has(label.setrow) { margin-bottom:2px; }
#setbody textarea { width:100%; resize:vertical; font:400 14px var(--font-sans); color:var(--ink-900);
  background:var(--white-2); border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.sheet .formgrid textarea { width:100%; resize:vertical; font:400 14px var(--font-sans);
  color:var(--ink-900); background:var(--white-2); border:1px solid var(--line); border-radius:10px; padding:10px 12px; }

/* ---------------- Lifebook Settings + Archer voice ---------------- */
.lbthumb { width:56px; height:40px; min-width:56px; border-radius:3px; border:1px solid var(--line);
  background:var(--ink-100); background-size:cover; background-position:center; }
.lbimg { display:inline-block; width:148px; height:100px; min-width:148px; border-radius:4px; border:1px solid var(--line);
  background:var(--ink-100); background-size:cover; background-position:center; }
.lbimgrow { display:flex; gap:14px; align-items:flex-start; margin:2px 0 14px; }
.vorb { width:86px; height:86px; border-radius:50%; margin:4px auto 0;
  background:radial-gradient(circle at 34% 30%, #4a6fb8, var(--ink-900));
  box-shadow:0 0 0 0 rgba(47,86,158,.35); transition:box-shadow .3s var(--ease); }
.vorb.connecting { animation:vpulse 1.6s ease-in-out infinite; }
.vorb.listening { box-shadow:0 0 0 9px rgba(46,114,100,.16); }
.vorb.thinking { animation:vpulse 1.1s ease-in-out infinite; }
.vorb.working { animation:vpulse .8s ease-in-out infinite; }
.vorb.speaking { animation:vtalk .55s ease-in-out infinite; }
.vorb.error { background:radial-gradient(circle at 34% 30%, #b8536d, #401722); }
@keyframes vpulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
@keyframes vtalk { 0%,100% { transform:scale(1); box-shadow:0 0 0 4px rgba(47,86,158,.22); }
  50% { transform:scale(1.09); box-shadow:0 0 0 15px rgba(47,86,158,.10); } }
.vstate { font:500 11px var(--font-mono); color:var(--ink-400); text-transform:uppercase; letter-spacing:.1em; }
.ivfields { display:flex; flex-direction:column; gap:6px; max-height:38vh; overflow-y:auto; }
.ivf { display:flex; gap:10px; padding:7px 10px; border:1px solid var(--line-soft); border-radius:3px; background:var(--paper); }
.ivf.on { border-color:var(--teal); background:var(--teal-100); }
.ivfl { font:600 10px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-500); min-width:76px; padding-top:2px; }
.ivft { font-size:13px; color:var(--ink-800); flex:1; line-height:1.45; }
#jv_log { max-height:44vh; overflow-y:auto; }

/* ---------------- North Stars + Habits dashboard ---------------- */
.nsrow { display:flex; align-items:flex-start; gap:10px; padding:6px 2px; border-bottom:1px solid var(--line-soft); }
.nsrow:last-child { border-bottom:none; }
.nsstarbtn { background:none; border:none; font-size:17px; line-height:1.3; color:var(--ink-200); padding:0 2px; transition:color .12s var(--ease), transform .12s var(--ease); }
.nsstarbtn:hover { color:var(--ink-400); }
.nsstarbtn.on { color:var(--gold); }
.nsstarbtn.on:hover { transform:scale(1.12); }
.nstext { font-size:14px; color:var(--ink-700); line-height:1.5; padding-top:1px; }
.trendbars { display:flex; gap:10px; align-items:flex-end; height:86px; padding:4px 2px 0; }
.tb { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:4px; }
.tb .tbfill { width:100%; max-width:44px; background:var(--sapphire); border-radius:3px 3px 0 0; min-height:2px; transition:height .3s var(--ease); }
.tb span { font:500 10px var(--font-mono); color:var(--ink-400); }

/* ---- Habits v2 (Habitify-inspired, Midnight-styled) ---- */
.habtop { display:flex; align-items:center; gap:14px; margin:2px 0 22px; flex-wrap:wrap; }
.weekstrip { display:flex; gap:6px; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:2px; }
.wday { display:flex; flex-direction:column; align-items:center; gap:3px; min-width:52px; padding:9px 8px 8px;
  background:var(--white); border:1px solid var(--line); border-radius:12px; transition:all .14s var(--ease); }
.wday:hover { border-color:var(--line-strong); }
.wday.sel { background:var(--black); border-color:var(--black); }
.wday .wdl { font:600 9px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-400); }
.wday .wdn { font:500 19px var(--font-serif); color:var(--ink-900); line-height:1.1; }
.wday.sel .wdl { color:var(--ink-300); }
.wday.sel .wdn { color:var(--on-black); }
.wday .wdd { width:26px; height:3px; border-radius:2px; background:var(--ink-100); overflow:hidden; display:block; }
.wday .wdd span { display:block; height:100%; background:var(--teal); border-radius:2px; }
.wday.sel .wdd { background:var(--ink-700); }
.herocard { display:flex; align-items:center; gap:20px; padding:18px 22px; }
.ring { width:84px; height:84px; transform:rotate(-90deg); flex:0 0 auto; }
.ringbg { fill:none; stroke:var(--ink-100); stroke-width:7; }
.ringfg { fill:none; stroke:var(--sapphire); stroke-width:7; stroke-linecap:round; transition:stroke-dashoffset .5s var(--ease); }
.heronum { font:400 36px var(--font-serif); color:var(--ink-900); line-height:1.1; }
.heronum span { font-size:19px; color:var(--ink-400); }
.herosub { font-size:13px; color:var(--ink-500); margin-top:2px; }
.habcard { padding:14px 18px; }
.habrow { display:flex; align-items:center; gap:13px; padding:11px 0; border-bottom:1px solid var(--line-soft); }
.habrow:last-child { border-bottom:none; }
.hico { width:38px; height:38px; min-width:38px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  font:600 15px var(--font-sans); }
.hico.sm { width:28px; height:28px; min-width:28px; border-radius:8px; font-size:12px; }
.habmain { flex:1; min-width:0; cursor:pointer; }
.habname { font-size:15px; font-weight:500; color:var(--ink-800); }
.habrow.hdone .habname { color:var(--ink-400); }
.habmain:hover .habname { color:var(--sapphire); }
.habmeta { font-size:12px; color:var(--ink-400); margin-top:1px; }
.hstreak { color:var(--gold); font-weight:600; }
.wk7 { display:flex; gap:4px; flex:0 0 auto; }
.wk7 .w7 { width:7px; height:7px; border-radius:50%; background:var(--ink-100); }
.wk7 .w7.on { background:var(--teal); }
.wk7 .w7.cur { outline:1.5px solid var(--ink-300); outline-offset:1px; }
.hcheck { width:38px; height:38px; min-width:38px; border-radius:50%; border:1.5px solid var(--line-strong);
  background:var(--white-2); color:transparent; font-size:16px; display:flex; align-items:center; justify-content:center;
  transition:all .15s var(--ease); }
.hcheck:hover { border-color:var(--ink-400); }
.hcheck.on { background:var(--teal); border-color:var(--teal); color:#fff; }
.hcheck:disabled { opacity:.75; }
.cal { display:grid; grid-template-columns:repeat(7,1fr); gap:5px 2px; justify-items:center; }
.calh { font:600 9.5px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-400); text-align:center; padding-bottom:4px; align-self:end; }
.cald { position:relative; width:34px; height:34px; display:flex; align-items:center; justify-content:center;
  font:500 11.5px var(--font-mono); color:var(--ink-600); border-radius:50%; background:var(--white-2);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease); }
@media (max-width:420px){ .cald { width:30px; height:30px; } }
.cald.heat { background:rgba(47,86,158,calc(.14 + .6*var(--heat,.3))); color:var(--sapphire); font-weight:600; }
.cald.heat.hi { color:#fff; }
.cald.late { background:var(--garnet-100); color:var(--garnet); font-weight:600; }
.cald.sel { box-shadow:0 0 0 1.5px var(--paper), 0 0 0 3px var(--gold); font-weight:700; }
.cald.pick { box-shadow:0 0 0 1.5px var(--paper), 0 0 0 3px var(--sapphire); }
.cald.fut { color:var(--ink-200); background:transparent; }
.cald.bill::after { content:''; position:absolute; left:50%; transform:translateX(-50%); bottom:7%;
  width:4px; height:4px; border-radius:50%; background:var(--gold); }
.cald.heat.bill::after { background:var(--gold-100); }
.strow { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--line-soft); }
.strow:last-child { border-bottom:none; }
.stname { flex:1; font-size:13.5px; color:var(--ink-700); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stnum { font:400 20px var(--font-serif); color:var(--ink-900); }
.stnum span { font-size:12px; color:var(--ink-400); }
.raterow { display:flex; align-items:center; gap:10px; padding:6px 0; }
.ratename { flex:0 0 42%; font-size:12.5px; color:var(--ink-600); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ratebar { flex:1; height:6px; border-radius:3px; background:var(--ink-100); overflow:hidden; }
.ratefill { display:block; height:100%; border-radius:3px; transition:width .3s var(--ease); }
.ratenum { font:500 11px var(--font-mono); color:var(--ink-500); min-width:34px; text-align:right; }

/* ---- Tasks v2 + Bills + speech capture ---- */
.hcheck.sm { width:30px; height:30px; min-width:30px; font-size:13px; }
.tdot { width:9px; height:9px; min-width:9px; border-radius:50%; }
.cald.tapday { cursor:pointer; }
.cald.tapday:hover { transform:scale(1.14); box-shadow:0 2px 8px rgba(16,24,40,.2); z-index:1; }

/* ---- Library v2: Journal day cards + Board Room + rich prose ---- */
.jday { cursor:pointer; transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.jday:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(16,24,40,.08); }
.jnarr { font:400 15.5px/1.6 var(--font-serif); color:var(--ink-700); }
.jnarr p { margin:0 0 10px; }
.jnarr p:last-child { margin-bottom:0; }
.jnarr em { color:var(--ink-500); }
.jchips { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.jchip { font:500 11px var(--font-mono); color:var(--ink-500); background:var(--white-2); border:1px solid var(--line-soft); border-radius:11px; padding:3px 9px; }
.noteprose { font:400 15px/1.6 var(--font-sans); color:var(--ink-700); max-height:70vh; overflow-y:auto; }
.noteprose h1 { font:500 24px var(--font-serif); color:var(--ink-900); margin:4px 0 12px; }
.noteprose h2 { font:600 12px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-500); margin:20px 0 8px; }
.noteprose h3 { font:600 14px var(--font-sans); color:var(--ink-700); margin:14px 0 6px; }
.noteprose p { margin:8px 0; }
.noteprose table { border-collapse:collapse; margin:8px 0; font-size:13px; width:100%; }
.noteprose th, .noteprose td { border:1px solid var(--line-soft); padding:5px 9px; text-align:left; }
.noteprose th { background:var(--white-2); font-weight:600; }
.noteprose ul, .noteprose ol { padding-left:20px; margin:6px 0; }
.noteprose li { margin:3px 0; }
/* ---- cash-flow strip (income vs bills, day by day) ---- */
.cfbars { display:flex; align-items:flex-end; gap:2px; height:74px; margin-top:6px;
  padding-bottom:2px; border-bottom:1px solid var(--line-soft); }
.cfbar { flex:1; min-width:3px; border-radius:2px 2px 0 0; background:var(--sapphire); opacity:.75; }
.cfbar.neg { background:var(--garnet); opacity:.9; }
.cfbar:hover { opacity:1; }

/* ---- Idea Lab: big idea cards ---- */
.idcard { cursor:pointer; padding:18px 20px; transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.idcard:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(16,24,40,.09); }
.idcard.idready { border-color:var(--teal); background:linear-gradient(180deg, var(--teal-100) 0%, var(--paper) 40%); }
.idbody { font:400 14.5px/1.6 var(--font-sans); color:var(--ink-600); }
.idsum { font:400 15.5px/1.65 var(--font-serif); color:var(--ink-800); margin-top:10px;
  padding-left:12px; border-left:2px solid var(--teal); }
.idfoot { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:14px;
  padding-top:10px; border-top:1px solid var(--line-soft); }
/* Promote sits at the far right of the card footer — the one action on the card,
   so it should not compete with the metadata to its left. */
.idpromote { margin-left:auto; border-color:var(--teal); color:var(--teal); font-weight:600; }
.idpromote:hover:not(:disabled) { background:var(--teal); color:#fff; border-color:var(--teal); }
.idpromote:disabled { opacity:.75; cursor:default; }
.idverdict { font:600 9.5px var(--font-sans); letter-spacing:.12em; text-transform:uppercase;
  border-radius:9px; padding:3px 9px; }
.idverdict.v-pursue { background:var(--teal-100); color:var(--teal); }
.idverdict.v-park { background:var(--gold-100); color:var(--gold); }
.idverdict.v-kill { background:var(--garnet-100); color:var(--garnet); }

/* ---- habit value inputs (log the reading, not just the check) ---- */
.hvwrap { display:inline-flex; align-items:center; gap:4px; margin-right:8px; }
.hvin { width:104px; font:500 12.5px var(--font-mono); color:var(--ink-900);
  background:var(--white-2); border:1px solid var(--line-soft); border-radius:8px; padding:5px 8px; }
.hvin:focus { outline:none; border-color:var(--sapphire); background:var(--paper); }
.hvin::placeholder { color:var(--ink-300); font-weight:400; }
.hvunit { font:500 9.5px var(--font-mono); letter-spacing:.04em; text-transform:uppercase; color:var(--ink-400); }
.hval { display:inline-flex; align-items:baseline; gap:4px; margin-right:8px;
  font:500 12.5px var(--font-mono); color:var(--teal); background:var(--teal-100);
  border-radius:8px; padding:4px 9px; }
.hval i { font-style:normal; font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; opacity:.75; }
.hval b { font-weight:500; font-size:10.5px; color:var(--ink-400); }
.hvin.hvtime { width:58px; text-align:center; }
/* Save — every habit that takes extra input commits it explicitly. Muted until
   there's something to save, so the row stays quiet when nothing is pending. */
.hvgo { font:600 10px var(--font-sans); letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-400); background:var(--paper-2); border:1px solid var(--line);
  border-radius:8px; padding:5px 10px; white-space:nowrap;
  transition:background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease); }
.hvgo:hover:not(:disabled) { color:var(--ink-800); border-color:var(--line-strong); }
.hvgo.ready { color:var(--white-2); background:var(--sapphire); border-color:var(--sapphire); }
.hvgo.ready:hover:not(:disabled) { color:var(--white-2); background:var(--ink-800); border-color:var(--ink-800); }
.hvgo:disabled { opacity:.6; cursor:default; }
/* yes/no value — "read with Leti" on the Daily Text */
.hvtog { display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  font:500 12px var(--font-sans); color:var(--ink-500); white-space:nowrap;
  background:var(--white-2); border:1px solid var(--line-soft); border-radius:8px; padding:4px 10px;
  transition:color .14s var(--ease), border-color .14s var(--ease), background .14s var(--ease); }
.hvtog input { width:13px; height:13px; margin:0; accent-color:var(--garnet); cursor:pointer; }
.hvtog.on { color:var(--garnet); border-color:var(--garnet); background:var(--garnet-100); font-weight:600; }
.htog { color:var(--garnet); font-weight:600; }
@media (max-width:560px){
  .hvin.hvtime { width:50px; }
  .hvin { width:78px; }
  .hvwrap { gap:5px; margin-right:0; }
  .hvgo { padding:6px 10px; letter-spacing:.05em; }
  .hvtog { padding:5px 9px; font-size:11.5px; }
  /* the input drops to its own line under the habit name rather than squeezing the
     row — the check button stays where the thumb already expects it */
  .habrow, .rrow { flex-wrap:wrap; }
  .habrow .wk7 { order:3; }
  .habrow .hcheck { order:4; }
  .habrow .hvwrap { order:5; flex-basis:100%; margin:4px 0 0 51px; }
  .rrow .hvwrap { flex-basis:100%; margin:4px 0 0 37px; }
}
.frow { padding:7px 0; border-bottom:1px solid var(--line-soft); }
.frow:last-child { border-bottom:none; }
.fname { font-size:13.5px; color:var(--ink-900); font-weight:500; }
.fage { float:right; font:500 11px var(--font-mono); color:var(--garnet); }
.fhint { font-size:11.5px; color:var(--ink-500); margin-top:2px; }
.yearban { border-color:var(--gold); background:linear-gradient(180deg, var(--gold-100) 0%, var(--paper) 42%); }

/* ---- Dashboards launcher + in-dashboard switcher ---- */
.dgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:12px; }
.dcard { display:flex; align-items:center; gap:12px; width:100%; text-align:left; cursor:pointer;
  background:var(--paper); border:1px solid var(--line-soft); border-top:2px solid var(--acc);
  border-radius:12px; padding:14px 16px; font:inherit;
  transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.dcard:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(16,24,40,.10); }
.dcico { flex:0 0 34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font:600 14px var(--font-sans); color:var(--acc); background:color-mix(in srgb, var(--acc) 12%, transparent); }
.dcmain { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.dcname { font:500 15px var(--font-sans); color:var(--ink-900); }
.dcblurb { font-size:11.5px; color:var(--ink-400); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dcstat { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:1px; }
.dcval { font:500 19px var(--font-serif); color:var(--ink-900); line-height:1.1; }
.dcval.quiet { color:var(--ink-300); }
.dclbl { font:500 9.5px var(--font-mono); letter-spacing:.06em; text-transform:uppercase; color:var(--ink-400); }
.dswrap { position:relative; }
.dsbtn { font:600 13px var(--font-sans); color:var(--ink-900); background:var(--white-2);
  border:1px solid var(--line-soft); border-radius:9px; padding:6px 12px; cursor:pointer; }
.dsbtn:hover { border-color:var(--line-strong); }
.dscar { color:var(--ink-400); font-size:10px; margin-left:3px; }
.dsmenu { position:absolute; top:calc(100% + 6px); left:0; z-index:30; min-width:250px; display:none;
  background:var(--paper); border:1px solid var(--line-soft); border-radius:12px; padding:6px;
  box-shadow:0 12px 32px rgba(16,24,40,.16); max-height:70vh; overflow-y:auto; }
.dsmenu.open { display:block; }
.dsgrp { font:600 9.5px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-400); padding:8px 10px 4px; }
.dsitem { display:flex; align-items:center; gap:9px; width:100%; text-align:left; cursor:pointer;
  background:none; border:none; border-radius:8px; padding:7px 10px; font:400 13.5px var(--font-sans); color:var(--ink-700); }
.dsitem:hover { background:var(--white-2); }
.dsitem.on { background:var(--cream-2); color:var(--ink-900); font-weight:600; }
.dsdot { width:8px; height:8px; border-radius:50%; flex:0 0 8px; }
.dsstat { margin-left:auto; font:500 11px var(--font-mono); color:var(--ink-400); }
.blist { margin:0; padding-left:18px; }
.blist li { font-size:14px; color:var(--ink-700); margin:4px 0; line-height:1.5; }
.blist.bad li::marker { color:var(--garnet); }
.blist.q li { color:var(--ink-900); font-style:italic; }
.blist.q li::marker { color:var(--gold); }
.noteprose details { margin:10px 0; }
.noteprose summary { cursor:pointer; color:var(--ink-500); font-size:13px; }
.cald.tapday.sel:hover { box-shadow:0 0 0 1.5px var(--paper), 0 0 0 3px var(--gold), 0 2px 8px rgba(16,24,40,.2); }
.agday { padding:8px 0 4px; border-bottom:1px solid var(--line-soft); }
.agday:last-child { border-bottom:none; }
.aghead { font:600 11px var(--font-sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-500); margin-bottom:3px; }
.agrow { display:flex; gap:10px; padding:3px 0; font-size:13.5px; color:var(--ink-700); }
.agrow .agtime { font:500 11px var(--font-mono); color:var(--gold); min-width:44px; padding-top:2px; }
.agrow .agtime.bill { color:var(--teal); font-weight:700; }
.bday { font:500 15px var(--font-mono); color:var(--ink-500); min-width:26px; text-align:right; }
.bamt { font:500 13px var(--font-mono); color:var(--ink-700); white-space:nowrap; }
.binact { opacity:.45; }
.sctext { min-height:22px; font:400 15px var(--font-serif); font-style:italic; color:var(--ink-800); padding:0 8px; }

/* ---- Projects v2 (charter cards + Archer delegation) ---- */
.pgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; margin-bottom:6px; }
.pcard { background:var(--white); border:1px solid var(--line); border-top:3px solid var(--pacc,var(--line-strong));
  border-radius:6px; padding:14px 16px 12px; cursor:pointer; transition:box-shadow .15s var(--ease), transform .15s var(--ease); }
.pcard:hover { box-shadow:0 10px 28px -14px rgba(15,21,36,.25); transform:translateY(-1px); }
.pchead { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.pcname { font:500 18px var(--font-serif); color:var(--ink-900); line-height:1.25; }
.pcmeta { font-size:12px; margin-top:1px; }
.pnext { font-size:12.5px; color:var(--ink-700); margin-top:8px; overflow:hidden; text-overflow:ellipsis;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.pcfoot { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:10px; flex-wrap:wrap; }
.pcfoot .badge { margin-left:4px; }
.det-rowp { margin-bottom:10px; }
.det-rowp div { font-size:14px; color:var(--ink-700); line-height:1.5; margin-top:2px; }
.pcmid { display:flex; align-items:center; gap:12px; margin-top:6px; }
.pring { width:42px; height:42px; flex:0 0 auto; }
.prbg { fill:none; stroke:var(--ink-100); stroke-width:4; }
.prfg { fill:none; stroke-width:4; stroke-linecap:round; transition:stroke-dashoffset .4s var(--ease); }
.prt { font:600 11px var(--font-mono); fill:var(--ink-600); }
.nsproj { padding:7px 0; border-bottom:1px solid var(--line-soft); }
.nsproj:last-child { border-bottom:none; }
.nsprojgoal { font-size:13px; font-weight:600; color:var(--ink-800); }
.nsprojlink { display:block; text-align:left; padding:2px 0 0 16px; font-size:12.5px; }

/* ---- Glow-up: geometric circular checks everywhere (kill the glyph ✓) ---- */
.tcheck, .hcheck, .wtcheck {
  font-size:0 !important; color:transparent !important; position:relative;
  border-radius:50% !important; background:var(--white-2); border:1.5px solid var(--line-strong);
  transition:background .16s var(--ease), border-color .16s var(--ease), transform .1s var(--ease);
}
.tcheck::after, .hcheck::after, .wtcheck::after {
  content:""; position:absolute; border:solid transparent; border-width:0 2px 2px 0;
  transform:rotate(45deg); transition:border-color .16s var(--ease);
}
.tcheck { width:26px; height:26px; min-width:26px; }
.tcheck::after { left:8.5px; top:4.5px; width:6px; height:11px; }
.hcheck::after { left:13.5px; top:8px; width:8px; height:14px; border-width:0 2.5px 2.5px 0; }
.hcheck.sm::after { left:10.5px; top:6px; width:6px; height:11px; border-width:0 2px 2px 0; }
.wtcheck { width:18px; height:18px; min-width:18px; }
.wtcheck::after { left:5.5px; top:2.5px; width:4px; height:8px; }
.tcheck:hover, .hcheck:hover { border-color:var(--ink-400); }
.tcheck:hover::after, .hcheck:hover::after { border-color:var(--ink-200); }
.tcheck.done, .hcheck.on, .wtcheck.on {
  background:var(--teal) !important; border-color:var(--teal) !important;
  animation:checkpop .22s var(--ease);
}
.tcheck.done::after, .hcheck.on::after, .wtcheck.on::after { border-color:#fff; }
@keyframes checkpop { 0% { transform:scale(.82); } 60% { transform:scale(1.08); } 100% { transform:scale(1); } }

/* ---- Glow-up: Daily Briefing ---- */
.dtcard { border-top:3px solid var(--gold); }
.dtscrip { font-size:22px; }
.rdot { width:8px; height:8px; min-width:8px; border-radius:50%; display:inline-block; margin-right:2px; }
.card { transition:box-shadow .18s var(--ease); }

/* ---- Glow-up: Inbox / People / Library ---- */
.dayhdr { font:600 11px var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-400);
  margin:14px 0 4px; padding-bottom:5px; border-bottom:1px solid var(--line-soft); }
.dayhdr:first-child { margin-top:0; }
.zerocard { text-align:center; padding:38px 22px; }
.zerohero { font:400 26px var(--font-serif); color:var(--ink-900); margin-bottom:6px; }
.avatar { width:38px; height:38px; min-width:38px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font:600 13px var(--font-sans); letter-spacing:.02em; }
.libico { width:36px; height:36px; min-width:36px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; font:600 13px var(--font-sans); }
.libex { font:400 13.5px var(--font-serif); font-style:italic; color:var(--ink-500); }
.prow:hover .avatar, .librow:hover .libico { transform:scale(1.05); }
.avatar, .libico { transition:transform .14s var(--ease); }
.caprow .capacts select { border-radius:8px; }
.prow .pmain, .librow .libmain { flex:1; min-width:0; }
.prow, .librow { justify-content:flex-start; }
.caprow { align-items:center; }
@media (max-width:900px) {
  .wk7 { display:none; }
  .herocard { gap:14px; }
  .heronum { font-size:30px; }
}

/* ---------- grouped check-off sheet (med groups + group habits, 2026-08-03) ---------- */
.glist { display:flex; flex-direction:column; gap:2px; margin:6px 0 2px; max-height:52vh; overflow-y:auto; }
.gitem { display:flex; align-items:center; gap:12px; padding:9px 10px; border-radius:10px; cursor:pointer; transition:background .12s var(--ease); }
.gitem:hover { background:var(--cream-2); }
.gitem input[type=checkbox] { width:18px; height:18px; accent-color:var(--teal); flex:none; cursor:pointer; }
.gitem.gdone .gname { color:var(--ink-400); text-decoration:line-through; }
.gmain { display:flex; flex-direction:column; min-width:0; flex:1; }
.gname { font:500 14px var(--font-sans); color:var(--ink-800); }
.gsub { font:400 12px var(--font-mono); color:var(--ink-400); }
.gat { font:500 12px var(--font-mono); color:var(--teal); }
.gundo { background:none; border:none; color:var(--garnet); cursor:pointer; font-size:14px; padding:2px 6px; border-radius:6px; }
.gundo:hover { background:var(--garnet-100); }
.growk { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line-soft); }
.gtime { display:flex; align-items:center; gap:8px; }
.gtime input { width:112px; }

/* ---------------- Mission Board (Phase 2 · Archer Jr.) ---------------- */
.mb-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.mb-note{max-width:46ch}
.mb-lane{background:var(--panel,#fff);border:1px solid var(--line,#E3E7F0);border-radius:14px;padding:14px 16px;margin-bottom:14px}
.mb-lanehead{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px;margin-bottom:10px}
.mb-lanehead::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--mb-accent,#8A93A6)}
.mb-tony{--mb-accent:#B98A2E}
.mb-archer{--mb-accent:#2E7264}
.mb-archer-jr{--mb-accent:#3E6FB8}
.mb-count{margin-left:auto;font-size:12px;color:var(--ink-400,#8A93A6);font-weight:500}
.mb-cols{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:10px;overflow-x:auto;padding-bottom:4px}
.mb-colhead{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-400,#8A93A6);margin-bottom:8px}
.mb-col{min-width:0;background:var(--bg,#F4F6FA);border-radius:10px;padding:10px}
.mb-card{background:var(--panel,#fff);border:1px solid var(--line,#E3E7F0);border-left:3px solid var(--mb-accent,#8A93A6);border-radius:8px;padding:8px 10px;margin-bottom:8px;cursor:pointer;transition:transform .12s,box-shadow .12s}
.mb-card:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(20,28,46,.08)}
.mb-flag{border-left-color:#9C3348}
.mb-title{font-size:13px;font-weight:600;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.mb-sub{font-size:11.5px;color:var(--ink-400,#8A93A6);margin-top:3px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.mb-empty{font-size:12px;color:var(--ink-300,#B4BBC9);text-align:center;padding:8px 0}
@media(max-width:700px){.mb-cols{grid-template-columns:repeat(4,minmax(150px,72vw))}}
.mb-drag{cursor:grab}
.mb-drag:active{cursor:grabbing}
.mb-over{outline:2px dashed #3E6FB8;outline-offset:-2px;background:#3E6FB814}
.btn.full{width:100%}
