/* Insights dashboard. Built on the tokens in app.css (--bg --card --ink --muted --line --soft and the hues). Everything is scoped to .dash. */
.dash {
  --k: var(--d); --kt: var(--d-t);
  --spin: #4560D8; /* a bluer step than the app's spin, kept apart from Jacob's teal and the muted grey (validated 18 Oct; the muted grey itself sits below the chroma floor by design) */
  --unk: color-mix(in srgb, var(--muted) 32%, var(--card));
  --bandop: .14;
  --track: color-mix(in srgb, var(--ink) 9%, transparent);
  max-width: 560px; margin: 0 auto; padding: 0 16px 28px;
}
@media (prefers-color-scheme: dark) { .dash { --spin: #6B7CEC; --bandop: .26; } }
.dash[data-who="maggie"] { --k: var(--c); --kt: var(--c-t); }
.dash[data-who="us"] { --k: var(--b); --kt: var(--b-t); }
body.us #app { padding-bottom: calc(var(--safe-b) + 24px); }

/* svg: the app sets a stroke on every svg; charts here paint with fill unless a class says otherwise */
.dash svg { stroke: none; stroke-width: 1; }
.dash svg.ic { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; width: 16px; height: 16px; flex-shrink: 0; }
.dash svg.moon { fill: currentColor; width: 11px; height: 11px; flex-shrink: 0; }

/* ---------- header */
.dxh { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 6px 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.dsw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 16px; background: var(--soft); }
.dsw button { min-height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: 15px; color: var(--muted); }
.dsw button i { width: 9px; height: 9px; border-radius: 50%; background: var(--k2); }
.dsw .c-d { --k2: var(--d); } .dsw .c-c { --k2: var(--c); } .dsw .c-b { --k2: var(--b); }
.dsw button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(42, 33, 48, .12); }
.dsw button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dline { margin: 4px 2px 0; font-size: 12.5px; color: var(--muted); }
.dstale { margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--ink); }
.empty.big { margin-top: 18px; padding: 34px 22px; font-size: 16px; line-height: 1.45; color: var(--ink); }

.dh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dh em { font-style: normal; font-weight: 600; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.dash .card { margin-bottom: 0; }
.dash h3 { margin: 0; font-size: 15.5px; font-weight: 750; line-height: 1.3; }

/* ---------- this week: tiles and bullet meters */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); padding: 12px 12px 11px; box-shadow: 0 1px 0 var(--line); min-width: 0; }
.tl { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); min-height: 18px; }
.tl .aim { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tl .aim svg { color: var(--k); width: 14px; height: 14px; stroke-width: 3; }
.tt { margin-top: 4px; font-size: 14px; font-weight: 700; line-height: 1.28; }
.tm { margin-top: auto; padding-top: 10px; }
@supports (grid-template-rows: subgrid) { /* keep the meters on one line across a row of cards */
  .tiles { row-gap: 0; }
  .tiles:not(.u) .tile { display: grid; grid-template-rows: subgrid; grid-row: span 4; margin-bottom: 10px; }
}
.ts { margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.ts span { display: block; }
.ts span + span { margin-top: 3px; }
.mt { position: relative; height: 18px; }
.mt .tr { position: absolute; left: 0; right: 0; top: 4px; height: 10px; border-radius: 5px; background: var(--track); }
.mt .bd { position: absolute; top: 0; height: 18px; border-radius: 5px; background: var(--k); opacity: .2; }
.mt .fl { position: absolute; left: 0; top: 4px; height: 10px; border-radius: 5px 4px 4px 5px; background: var(--k); }
.mt .lt { position: absolute; top: 0; height: 18px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.mt .mk { position: absolute; top: -1px; height: 20px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.tm .mt { margin-bottom: 0; }
.lw { position: relative; height: 13px; }
.lw span { position: absolute; top: 1px; transform: translateX(-50%); font-size: 10.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.big { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; }
.big b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.big span { font-size: 13px; color: var(--muted); }

/* ---------- next week */
.nx { padding: 6px 14px 12px; }
.nrow { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; min-height: 44px; text-align: left; }
.nrow + .nwhy, .nrow + .nrow { border-top: 0; }
.nx > .nrow, .nx > .nwhy + .nrow { border-top: 1px solid var(--line); }
.nx > .nrow:first-child { border-top: 0; }
.ni { width: 26px; height: 26px; border-radius: 50%; background: var(--kt); color: var(--k); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.ni svg { width: 15px; height: 15px; }
.nt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nt b { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nt span { font-size: 15px; line-height: 1.35; }
.nch { color: var(--muted); margin-top: 12px; transition: transform .15s; }
.nrow[aria-expanded="true"] .nch { transform: rotate(90deg); }
.nwhy { padding: 0 0 12px 38px; font-size: 13.5px; line-height: 1.4; }
.nwhy p { margin: 0 0 4px; }
.nwhy .src { color: var(--muted); font-size: 12.5px; }
.ncue { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.nnote { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ncap { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.nnone { margin: 8px 0; font-size: 14px; color: var(--muted); }

/* ---------- day by day */
.dg { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; }
.dg > b { text-align: center; font-size: 11px; font-weight: 750; color: var(--muted); padding-bottom: 2px; }
.dg .rl { font-size: 11px; font-weight: 650; color: var(--muted); line-height: 1.1; }
.dc { position: relative; height: 46px; min-width: 0; border-radius: 10px; background: var(--soft); display: flex; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.dc.blank { background: transparent; }
.dc.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.dc:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dc .tp { display: flex; align-items: center; justify-content: space-between; height: 13px; padding: 2px 4px 0; color: var(--muted); }
.dc .dots { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; padding: 0 5px 8px; }
.dt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dt.s { background: var(--k); } .dt.p { background: var(--spin); } .dt.o { background: var(--muted); }
.dt.u { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.fb { display: inline-block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--k) 62%, transparent); vertical-align: middle; }
.dc .fb { position: absolute; left: 6px; bottom: 5px; right: 6px; }
.dc .fb.h { right: auto; width: calc((100% - 12px) / 3); }
.lg .fb { width: 16px; } .lg .fb.h { width: 8px; }
.rb { font-style: normal; font-size: 8.5px; font-weight: 800; line-height: 1; padding: 1.5px 3px; border-radius: 4px; background: var(--kt); color: var(--ink); }
.lg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.lg > span { display: inline-flex; align-items: center; gap: 5px; }
.lg svg.moon { color: var(--muted); }
/* us */
.uf { position: absolute; left: 0; right: 0; bottom: 0; }
.uf.both { top: 0; background: color-mix(in srgb, var(--k) 52%, transparent); }
.uf.one { height: 33%; background: color-mix(in srgb, var(--k) 52%, transparent); }
.ub { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--soft); position: relative; overflow: hidden; }
.ub.both { background: color-mix(in srgb, var(--k) 52%, transparent); }
.ub.one { background: linear-gradient(to top, color-mix(in srgb, var(--k) 52%, transparent) 33%, var(--soft) 33%); }
.dg .dc .tp { position: absolute; left: 0; right: 0; top: 0; z-index: 1; color: var(--ink); }

/* ---------- week by week */
.wk { padding: 12px 12px 14px; }
.ro { min-height: 262px; margin-bottom: 10px; }
.rc.wide { grid-column: 1 / -1; }
.rt { min-height: 38px; align-content: flex-start; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 13px; }
.rt b { font-size: 14.5px; }
.rt span { color: var(--muted); }
.rg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; margin-top: 8px; }
.rc { display: flex; flex-direction: column; min-width: 0; padding: 6px 8px; border-radius: 10px; background: var(--soft); }
.rc span { font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc b { font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.rc small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.wkchart { position: relative; outline: none; border-radius: 8px; }
.wkchart:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wkv { display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wkv text { font-family: inherit; fill: var(--muted); stroke: none; }
.wkv .lt1 { font-size: 12px; font-weight: 750; fill: var(--ink); }
.wkv .lt2 { font-size: 10.5px; font-weight: 600; fill: var(--muted); }
.wkv .ax { font-size: 10.5px; font-weight: 600; fill: var(--muted); }
.wkv .el { font-size: 11px; font-weight: 800; fill: var(--ink); }
.wkv .nt1 { font-size: 11px; font-weight: 600; fill: var(--muted); paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.wkv .evn { font-size: 9px; font-weight: 800; fill: var(--card); }
.wkv .gl, .iv .gl { stroke: var(--line); stroke-width: 1; fill: none; }
.wkv .evl { stroke: var(--muted); stroke-width: 1; opacity: .7; fill: none; }
.wkv .ln, .spk .ln { stroke: var(--k); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.wkv .hl { fill: var(--ink); opacity: .07; }
.wkv .hit { fill: transparent; }
.evs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.evs li { display: flex; align-items: baseline; gap: 8px; }
.evs b { flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: var(--card); font-size: 10px; display: grid; place-items: center; align-self: center; }
.evs em { font-style: normal; color: var(--muted); margin-left: auto; white-space: nowrap; }
.tbl { margin-top: 12px; font-size: 13px; }
.tbl summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.ts-wrap { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th, .tbl td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.tbl thead th { color: var(--muted); font-weight: 700; }
.tbl tbody th { text-align: left; font-weight: 700; position: sticky; left: 0; background: var(--card); }

/* ---------- what we're learning */
.q { margin-top: 10px; }
.q h3 { margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 700; }
.chip svg { width: 16px; height: 16px; color: var(--muted); }
.qe { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.q .mt { margin-top: 8px; }
.iv { display: block; margin-top: 6px; }
.iv text { font-family: inherit; fill: var(--muted); font-size: 10.5px; font-weight: 600; stroke: none; }
.iv .zone { fill: var(--muted); opacity: .18; }
.iv .zl { stroke: var(--ink); stroke-width: 1; opacity: .5; fill: none; }
.iv .rng { stroke: var(--k); stroke-width: 2; stroke-linecap: round; fill: none; }
.trd { margin-top: 10px; }
.tr3 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 6px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tr3.hd { border-top: 0; padding: 8px 0 2px; font-size: 11.5px; color: var(--muted); }
.tr3 .m { font-weight: 650; }
.tr3 b { font-weight: 800; }
.tr3 > span:not(.m) { color: var(--muted); }
.tr3 .st { text-align: right; color: var(--ink); font-size: 12.5px; }
.tr3.hd b { font-weight: 800; color: var(--ink); }

/* ---------- lifts and shape, heart food, us */
.lifts, .body { padding-top: 6px; padding-bottom: 6px; }
.lf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; min-height: 52px; border-top: 1px solid var(--line); }
.lifts .lf:first-child, .body .lf:first-child { border-top: 0; }
.lf > div { display: flex; flex-direction: column; min-width: 0; }
.lf b { font-size: 14.5px; font-weight: 750; }
.lf span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.spk { flex-shrink: 0; }
.oth { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.oth b { display: block; font-size: 12px; font-weight: 750; margin-bottom: 3px; }
.oth p { margin: 2px 0; }
.body { margin-top: 10px; }
.due { margin: 0; padding: 10px 0 6px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.body .lf:first-child + .due { border-top: 1px solid var(--line); }
.hf .hw b { font-size: 13.5px; }
.hf .hw.sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hr { margin-top: 8px; }
.hr > span { font-size: 13.5px; font-weight: 650; }
.hr em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.hr .mt { margin-top: 6px; }
.plink { display: block; margin: 12px 2px 0; padding: 12px 0; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.un { padding-bottom: 14px; }
.ut { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.dos p { margin: 0; padding: 8px 0; font-size: 15px; line-height: 1.4; border-top: 1px solid var(--line); }
.dos p:first-child { border-top: 0; padding-top: 2px; }
.dos b { font-weight: 800; }
.ms { padding-top: 6px; padding-bottom: 6px; }
.ms > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ms > div:first-child { border-top: 0; }
.ms b { font-weight: 750; font-size: 13px; }
.ms em { font-style: normal; color: var(--muted); font-size: 12.5px; margin-left: 4px; }

/* ---------- v3: headline, slim rows, plan strip, bot line */
.hl span { display: inline-block; }
.hl { margin: 10px 2px 2px; font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -.005em; }
.slims { margin-top: 10px; padding: 2px 14px; }
.sl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
.sl:first-child { border-top: 0; }
.sll { font-size: 13px; font-weight: 700; color: var(--muted); }
.sl b { font-size: 14px; font-weight: 700; text-align: right; }
.sl .mt { grid-column: 1 / -1; height: 10px; }
.sl .mt .tr, .sl .mt .fl { top: 3px; height: 4px; border-radius: 2px; }
.sls { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.pl { padding: 12px 10px 12px; }
.pg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 7px 0 8px; min-height: 76px; border-radius: 12px; background: var(--soft); }
.pd.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pd b { font-size: 11px; font-weight: 750; color: var(--muted); }
.pd.fut { opacity: .85; }
.prs { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.prs em { font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.prx { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2px; }
.pr { display: inline-block; box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--pc, var(--muted)); background: transparent; flex-shrink: 0; }
.pr.on { background: var(--pc, var(--muted)); }
.pr.x { width: 9px; height: 9px; border-width: 0; background: var(--pc, var(--muted)); }
.pr.sm { width: 11px; height: 11px; border-width: 1.5px; }
.pr.x.sm { width: 7px; height: 7px; }
.botl { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.botl p { font-size: 13px; line-height: 1.4; color: var(--muted); }
.chip.sm { margin-top: 8px; padding: 3px 10px 3px 7px; font-size: 12px; background: var(--card); }
.chip.sm svg { width: 14px; height: 14px; }

/* ---------- v3: food this week */
.fcard { margin-top: 10px; }
.h-sec + .fcard { margin-top: 0; }
.ct { font-size: 14.5px; font-weight: 750; }
.cs { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.cs.sp { margin-top: 16px; }
.cal-cap { margin-top: 6px; font-size: 13px; color: var(--ink); font-weight: 600; }
.wkv.cal, .wkv.tl { overflow: visible; }
.wkv .gl.base { stroke: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.wkv .gl.zero { stroke: var(--ink); opacity: .45; }
.wkv .gl.ann { stroke: var(--ink); opacity: .4; }
.wkv .gl.rowl { stroke: var(--line); }
.wkv .ax.fut { opacity: .55; }
.wkv .ax.strong { font-weight: 800; fill: var(--ink); }
.wkv .band { fill: var(--k); opacity: calc(var(--bandop) * 1.5); }
.wkv .bar { fill: var(--k); }
.wkv .unf { fill: none; stroke: var(--k); stroke-width: 2; stroke-dasharray: .01 4.2; stroke-linecap: round; }
.wkv .gly { fill: var(--muted); }
.wkv .gly.o { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.wkv .today { fill: none; stroke: var(--ink); stroke-width: 1.25; opacity: .5; }
.wkv .fhit { fill: transparent; cursor: pointer; outline: none; }
.wkv .fhit:focus-visible, .wkv .fhit:hover { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.wkv .fhit:focus-visible { stroke: var(--ink); stroke-width: 2; }
.wkv .rowt { font-size: 11.5px; font-weight: 650; fill: var(--ink); }
.wkv .rowt.fut { fill: var(--muted); }
.wkv .tick { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wkv .md { fill: var(--card); stroke: var(--k); stroke-width: 1.5; }
.wkv .md.on { fill: var(--k); stroke: var(--card); stroke-width: 1.5; }
.wkv .arr { fill: var(--muted); }
.wkv .chs { fill: none; stroke-width: 1.5; }
.gsv { flex-shrink: 0; }
.gsv .md { fill: var(--card); stroke: var(--k); stroke-width: 1.5; }
.gsv .md.on { fill: var(--k); stroke: none; }
.gsv .gly { fill: var(--muted); } .gsv .gly.o { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.lg i { display: inline-block; flex-shrink: 0; }
.lgb { width: 14px; height: 10px; border-radius: 3px; background: var(--k); opacity: calc(var(--bandop) * 1.5); }
.lgf { width: 8px; height: 12px; border-radius: 3px 3px 0 0; background: var(--k); }
.lgu { width: 10px; height: 10px; border-radius: 3px; border: 2px dotted var(--k); }
.lgs { width: 10px; height: 8px; border-radius: 2px; }
.lgw { width: 14px; height: 8px; border-radius: 4px; background: var(--muted); }
.lgw.o { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.lg + .lg { margin-top: 6px; }
.tf { margin-top: 10px; }
.tfh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; font-size: 13.5px; }
.tfh span { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }
.tfh b { font-weight: 800; white-space: nowrap; }
.tfh em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 40px; text-align: right; }
.tf .mt { height: 10px; }
.tf .mt .tr, .tf .mt .fl { top: 2px; height: 6px; border-radius: 3px; }
.lever { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.4; color: var(--muted); }
.macros { margin-top: 10px; padding-top: 4px; padding-bottom: 12px; }
.macros summary { margin-top: 0; justify-content: space-between; }
.macros summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.macros[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .macros summary::after { transition: none; } }
.macros summary::-webkit-details-marker { display: none; }
.macros .hr:first-of-type { margin-top: 2px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 14px; background: var(--soft); margin-bottom: 12px; }
.seg button { min-height: 44px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(42, 33, 48, .12); }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.yd { padding-left: 12px; padding-right: 12px; }
.sync { margin: 22px 2px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #3A3140; box-shadow: none; } }

/* ---------- day sheet */
.dsheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(23, 19, 26, .38); animation: dfade .18s ease-out; }
.dpanel { width: 100%; max-width: 560px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px 18px calc(var(--safe-b) + 18px); animation: dup .22s cubic-bezier(.2, .8, .2, 1); }
.dpanel .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.dpanel h3 { font-size: 20px; font-weight: 850; }
.dpanel p { margin: 6px 0 14px; font-size: 15.5px; line-height: 1.45; }
.dclose { width: 100%; min-height: 48px; border-radius: 14px; background: var(--soft); font-weight: 800; font-size: 15px; }
@keyframes dup { from { transform: translateY(40px); opacity: .4; } }
@keyframes dfade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dpanel, .dsheet { animation: none; } .nch { transition: none; } }
@media (prefers-color-scheme: dark) { .dsw button[aria-selected="true"] { background: #3A3140; box-shadow: none; } }

/* ---------- v3 review fixes: folds, lighter pre-day-type glyphs, extra lanes */
.fold > summary { list-style: none; cursor: pointer; min-height: 44px; align-items: center; margin-top: 10px; margin-bottom: 0; }
.fold[open] > summary { margin-bottom: 10px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 2px; transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fold > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.fold > summary em { margin-left: auto; }
.fold > .card:first-of-type, .fold > .empty:first-of-type { margin-top: 0; }
.wkv .gly.pre { opacity: .55; }
.lg .pre { color: var(--muted); opacity: .85; }
.tbl > .wkchart { margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }
.wk .tbl summary { justify-content: space-between; }
.wk .tbl summary::-webkit-details-marker { display: none; }
.wk .tbl summary::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.wk .tbl[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .wk .tbl summary::after { transition: none; } }

/* ---------- v3.1: flags, chips, muted lines, shorter legends, paste box */
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 2px 2px; }
.fchip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.tg { display: inline-flex; align-items: center; gap: 6px; }
.tchip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--soft); font-size: 10.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.hr .tchip { margin-left: 6px; vertical-align: 1px; }
.tt.mu { font-weight: 600; font-size: 13px; color: var(--muted); }
.sl b { font-weight: 700; }
.sl .sls { grid-column: auto; font-weight: 500; color: var(--muted); }
.ovl { margin: 8px 0 0; font-size: 13px; line-height: 1.35; }
.lg.one { flex-wrap: nowrap; gap: 6px 12px; white-space: nowrap; }
.lg .mu { color: var(--muted); opacity: .85; }
.wkv .nt0 { font-size: 11.5px; font-weight: 600; fill: var(--muted); }
.dash[data-who="jacob"] .ro { min-height: 304px; }
.pastebox { margin-top: 10px; }
.pastebox .cta { margin-top: 10px; padding: 14px; font-size: 16px; min-height: 48px; }
.pastebox .pin { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--soft); font-size: 16px; }
.pastebox .pin:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.perr { margin: 8px 2px 0; font-size: 13px; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ts .nw { display: inline; white-space: nowrap; }
