/* AI views: activity feed (#feed) and dashboard (#dash). Amber = AI only, jacaranda = people.
   Fallback primitives below have zero specificity (:where), so the shell's shared primitives win once they exist. */

/* ---------- fallback primitives (shell lane owns the real ones) ---------- */
:where(.af-doc,.db-doc){--a-sf:var(--surface,var(--paper));--a-hv:var(--hover,var(--soft));--a-act:var(--act,var(--staff));--a-act-s:var(--act-soft,var(--staff-bg));--a-ai-s:var(--ai-soft,var(--ai-bg))}
:where(.af-doc,.db-doc){max-width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:16px;min-width:0}
:where(.af-doc,.db-doc) :where(.dot){width:8px;height:8px;border-radius:50%;flex:none;display:inline-block;background:var(--muted)}
:where(.af-doc,.db-doc) :where(.dot.ai){background:var(--ai)} :where(.af-doc,.db-doc) :where(.dot.act){background:var(--a-act)}
:where(.af-doc,.db-doc) :where(.dot.good){background:var(--good)} :where(.af-doc,.db-doc) :where(.dot.warn){background:var(--warn)}
:where(.af-doc,.db-doc) :where(.dot.bad){background:var(--bad)} :where(.af-doc,.db-doc) :where(.dot.mute){background:var(--line)}
:where(.af-doc,.db-doc) :where(.pill){display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;font:600 11px var(--body);background:var(--soft);color:var(--muted);white-space:nowrap}
:where(.af-doc,.db-doc) :where(.pill.ai){background:var(--a-ai-s);color:var(--ai)} :where(.af-doc,.db-doc) :where(.pill.act){background:var(--a-act-s);color:var(--a-act)}
:where(.af-doc,.db-doc) :where(.group-label){margin:0;padding:16px 12px 4px;font:600 11px var(--body);color:var(--muted);letter-spacing:.02em}
:where(.af-doc,.db-doc) :where(.chip){display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--a-sf);color:var(--ink);font:500 12px var(--body);cursor:pointer;white-space:nowrap}
:where(.af-doc,.db-doc) :where(.chip:hover){background:var(--a-hv)}
:where(.af-doc,.db-doc) :where(.chip.on){background:var(--ink);border-color:var(--ink);color:var(--paper)}
:where(.af-doc,.db-doc) :where(.inp){height:32px;border:1px solid var(--line);border-radius:6px;padding:0 8px;background:var(--a-sf);color:var(--ink);font:13px var(--body)}
:where(.af-doc,.db-doc) :where(.empty){display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px;text-align:center}
:where(.af-doc,.db-doc) :where(.empty-ic svg){width:32px;height:32px;color:var(--muted)}
:where(.af-doc,.db-doc) :where(.empty-t){font:600 13px var(--body)} :where(.af-doc,.db-doc) :where(.empty-s){font-size:12px;color:var(--muted)}
:where(.af-doc,.db-doc) :where(.ai-card){border:1px solid var(--ai-line);border-radius:8px;background:var(--a-sf);overflow:hidden}
:where(.af-doc,.db-doc) :where(.ai-card-h){display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--a-ai-s);font-size:13px}
:where(.af-doc,.db-doc) :where(.ai-card-h svg){width:16px;height:16px;color:var(--ai);flex:none}
:where(.af-doc,.db-doc) :where(.ai-card-st){color:var(--ai);font-size:12px;font-weight:600}
:where(.af-doc,.db-doc) :where(.ai-card-b){margin:0;padding:4px 0;list-style:none}
:where(.af-doc,.db-doc) :where(.ai-check){display:flex;align-items:center;gap:12px;min-height:40px;padding:4px 12px}
:where(.af-doc,.db-doc) :where(.ai-card-f){display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid var(--line)}

/* ---------- AI activity feed ---------- */
.af-doc .phead{margin:0}
.af-bsel{min-width:168px}
.af-layout{display:grid;grid-template-columns:208px minmax(0,1fr);gap:24px;align-items:start}
.af-main{display:flex;flex-direction:column;gap:12px;min-width:0}

/* left rail: kind filter + live state */
.af-rail{position:sticky;top:0;display:flex;flex-direction:column;min-width:0}
.af-rail>.group-label:first-child{padding-top:4px}
.af-rk{display:flex;align-items:center;gap:8px;height:32px;padding:0 8px 0 12px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:13px var(--body);text-align:left;cursor:pointer;min-width:0}
.af-rk:hover{background:var(--a-hv)}
.af-rk[aria-pressed="true"]{background:var(--a-hv);font-weight:600}
.af-rk:focus-visible,.af-now-b:focus-visible,.af-tick:focus-visible,.af-why:focus-visible{outline:2px solid var(--a-act);outline-offset:1px}
.af-rk-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.af-rk-n{font:500 12px var(--body);color:var(--muted);font-variant-numeric:tabular-nums}
.af-now{display:flex;flex-direction:column}
.af-now ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.af-now-b{display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;width:100%;padding:6px 8px 6px 12px;border:0;border-radius:6px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}
.af-now-b:hover{background:var(--a-hv)}
.af-mini{grid-row:span 2;width:24px;height:24px;border-radius:50%;background:var(--soft);color:var(--muted);display:grid;place-items:center;font:600 10px var(--body)}
.af-now-n{font:600 13px var(--body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.af-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.af-state.ai{color:var(--ai)}
.af-state.ai i{width:6px;height:6px;border-radius:50%;background:var(--ai);flex:none;animation:af-pulse 1.6s ease-in-out infinite}
@keyframes af-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.af-state.ai i{animation:none}}

/* review card: drafts waiting for an OK */
.af-review .ai-card-h b{font-weight:600}
.af-review .ai-card-b{margin:0;padding:4px 0;list-style:none}
.af-review .ai-card-h .pill{margin-left:0}
.af-draft{display:grid;grid-template-columns:20px 120px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:40px;padding:4px 12px;font-size:13px}
.af-tick{width:20px;height:20px;padding:0;border:1.5px solid var(--line);border-radius:6px;background:var(--a-sf);color:#fff;display:grid;place-items:center;cursor:pointer}
.af-tick[aria-checked="true"]{background:var(--ai);border-color:var(--ai)}
.af-tick svg{width:14px;height:14px}
:root[data-theme="dark"] .af-tick{color:#1a1205}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .af-tick{color:#1a1205}}
.af-dr-b{font-size:13px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.af-dr-t{font-size:13px;color:var(--ink);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.af-dr-m{font-size:12px;color:var(--muted);white-space:nowrap}
.af-f-n{margin-left:auto;font-size:12px;color:var(--muted);text-align:right}
.af-review.is-done .ai-card-h{background:transparent}
.af-clear{margin:0;padding:4px 12px 8px;font-size:12px;color:var(--muted)}

/* filter chips: phone only (the rail covers desktop) */
.af-chips{display:none;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0;padding:0;min-width:0;max-width:100%}
.af-chips::-webkit-scrollbar{display:none}
.af-chips .chip{flex:none}
.af-cn{font-size:11px;opacity:.7;font-variant-numeric:tabular-nums}

/* timeline: grouped by day, separated by whitespace, no boxes */
.af-day{display:flex;flex-direction:column}
.af-dayh{display:flex;align-items:baseline;gap:8px;padding-left:0 !important}
.af-dayh span{font-weight:500}
.af-turns{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.af-turn{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;padding:8px 12px 8px 0;border-radius:8px}
.af-turn:hover{background:var(--a-hv)}
.af-time{font:500 12px var(--body);color:var(--muted);text-align:right;padding-top:2px;font-variant-numeric:tabular-nums}
.af-body{display:flex;flex-direction:column;gap:4px;min-width:0}
.af-bh{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:600;min-height:20px}
.af-body ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.af-ev{display:grid;grid-template-columns:8px minmax(0,1fr) auto 44px;align-items:baseline;gap:8px;min-height:24px}
.af-ev .dot{align-self:center;transform:translateY(0)}
.af-txt{display:flex;flex-direction:column;min-width:0;font-size:13px;overflow-wrap:anywhere}
.af-sub{font-size:12px;color:var(--muted)}
.af-sub.af-words{font-style:italic;color:var(--ai)}
.af-tag{font-size:12px;color:var(--muted);white-space:nowrap}
.af-why{height:24px;padding:0 8px;border:1px solid var(--ai-line);border-radius:6px;background:transparent;color:var(--ai);font:600 12px var(--body);cursor:pointer;opacity:0;transition:opacity .12s var(--ease-out,cubic-bezier(.2,.8,.2,1))}
.af-turn:hover .af-why,.af-why:focus-visible{opacity:1}
@media (hover:none){.af-why{opacity:1}}

/* ---------- dashboard ---------- */
.db-doc .phead{margin:0}

/* dashboard link buttons */

  

 

.db-go{height:28px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:600 12px var(--body);cursor:pointer}
.db-go:hover{background:var(--a-hv);color:var(--ink)}
.db-go:focus-visible{outline:2px solid var(--a-act)}

/* ---------- responsive ---------- */
@media (max-width:1100px){.af-layout{grid-template-columns:184px minmax(0,1fr);gap:16px}.af-draft{grid-template-columns:20px 96px minmax(0,1fr)}.af-dr-m{display:none}}
@media (max-width:760px){
  .af-layout{grid-template-columns:minmax(0,1fr)}
  .af-rail{display:none}
  .af-chips{display:flex}
  .af-bsel{min-width:0;max-width:148px}
  .af-draft{grid-template-columns:20px minmax(0,1fr);row-gap:0;align-items:start}.af-tick{grid-row:span 2}
  .af-dr-t{grid-column:2;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .ai-card-f{flex-wrap:wrap}.af-f-n{flex-basis:100%;margin-left:0;text-align:left}
  .af-turn{grid-template-columns:40px minmax(0,1fr);gap:8px;padding-right:4px}
  .af-ev{grid-template-columns:8px minmax(0,1fr) auto}.af-why{opacity:1;height:28px;padding:0 8px}
  .af-tag{display:none}
  
  
  
  
  
  .af-doc .phead h2,.db-doc .phead h2{display:none}
}

/* fallback one-line page header (shell's .phead wins once styled) */
:where(.af-doc,.db-doc) :where(.phead){display:flex;align-items:center;gap:8px;min-height:32px;flex-wrap:wrap}
:where(.af-doc,.db-doc) :where(.phead h2){margin:0 4px 0 0;font:600 18px var(--body)}
:where(.af-doc,.db-doc) :where(.phead-chip){display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;background:var(--soft);color:var(--muted);font:500 12px var(--body)}
:where(.af-doc,.db-doc) :where(.phead-i){width:24px;height:24px;padding:4px;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:help}
:where(.af-doc,.db-doc) :where(.phead-i svg){width:16px;height:16px}
:where(.af-doc,.db-doc) :where(.phead-a){margin-left:auto;display:flex;align-items:center;gap:8px}

/* AI pause strip */


.ai-paused{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 12px;border:1px solid var(--line);border-radius:8px;background:var(--soft);font-size:13px;color:var(--ink)}
.ai-paused b{font-weight:600}
.ai-paused .btn{margin-left:auto}
.af-held .af-dr-t{color:var(--muted)}
.af-held .af-dr-m{justify-self:end;display:inline-flex !important}
.af-held .af-dr-b{grid-column:2}
.af-f-l{margin-left:0;margin-right:auto;text-align:left}
.db-tpl{text-decoration:none}
@media (max-width:760px){.db-doc .phead{flex-wrap:nowrap}.db-doc .phead-a{flex-wrap:nowrap}.af-held .af-dr-m{grid-column:2;justify-self:start}}

/* art direction round 1: ship's log */
.af-review .ai-card-h{background:var(--surface,var(--paper))}
.af-review{border-left:3px solid var(--ai)}
.af-review .ai-card-st{display:inline-flex;align-items:center;gap:6px}
.af-review .ai-card-st .breathe{width:6px;height:6px}
.af-dayh{margin:16px 0 4px;padding:0 0 4px;display:flex;align-items:baseline;justify-content:space-between;gap:8px;font:600 20px/1.2 var(--display);letter-spacing:-.015em;color:var(--ink);border-bottom:1px solid var(--line)}
.af-dayh span{font:500 11px var(--mono);color:var(--muted)}
.af-day:first-of-type .af-dayh{margin-top:8px}
.af-turn{grid-template-columns:52px minmax(0,1fr);gap:0}
.af-time{font:500 11px var(--mono);padding:3px 12px 0 0;border-right:1px solid var(--line);align-self:stretch}
.af-body{padding-left:12px}
.af-v-st{color:var(--a-act);font-weight:600}
@media (max-width:760px){.af-turn{grid-template-columns:44px minmax(0,1fr)}.af-time{padding-right:8px}.af-body{padding-left:8px}}

/* ---------- Daily numbers: annual-report editorial ---------- */
.dn{gap:16px}
.dn-health{display:flex;align-items:center;gap:8px;min-height:32px;font-size:13px;color:var(--muted)}
.dn-health b{color:var(--ink);font-weight:600;white-space:nowrap}
.dn-health.warn{padding:6px 12px;border-left:3px solid var(--warn);background:var(--warn-bg);border-radius:0 6px 6px 0;color:var(--ink)}
.dn-health-t{flex:1;min-width:0}
.dn-d{white-space:nowrap;color:var(--muted);font-size:12px}
.dn .rule-2{margin:4px 0}
.dn-sec{display:flex;flex-direction:column;gap:12px;padding:8px 0 20px;border-bottom:1px solid var(--line)}
.dn-sec:last-child{border-bottom:0}
.dn-sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.dn-cols{display:grid;grid-template-columns:minmax(0,8fr) minmax(0,4fr);gap:32px;align-items:start}
.dn-main{min-width:0}
.dn-side{display:flex;flex-direction:column;gap:8px;min-width:0;padding-left:24px;border-left:1px solid var(--line)}
.dn-say{margin:0;font-size:13px;line-height:1.5;color:var(--ink)}
.dn-u{font-size:.5em;margin-left:2px;color:var(--muted)}
.dn-more{margin:-8px 0 0}
.dn-jobs{list-style:none;margin:0;padding:0}
.dn-jobs li{display:grid;grid-template-columns:8px minmax(150px,1.1fr) minmax(0,1.6fr) 100px 84px;align-items:center;gap:12px;min-height:44px;border-top:1px solid var(--line);font-size:13px}
.dn-jobs li:first-child{border-top:0}
.dn-j-t{display:flex;flex-direction:column;min-width:0}.dn-j-t b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dn-j-t span,.dn-j-n{font:400 11px var(--mono);color:var(--muted)}
.dn-j-r{font-size:12px;min-width:0}.dn-j-n{white-space:nowrap}
.dn-jobs .db-go{justify-self:end;white-space:nowrap}
.dn-ctl{margin:0;display:flex;flex-direction:column}
.dn-ctl div{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:36px;border-top:1px solid var(--line);font-size:13px}
.dn-ctl div:first-child{border-top:0}
.dn-ctl dt{display:inline-flex;align-items:center;gap:8px}.dn-ctl dd{margin:0;font-size:12px;color:var(--muted);text-align:right}
.dn-kill{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--line)}
.dn-kill span{display:flex;flex-direction:column;min-width:0}.dn-kill b{font-weight:600;color:var(--bad)}.dn-kill small{font-size:12px;color:var(--muted)}
.dn-digest ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}
.dn-digest li{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;border-top:1px solid var(--line);font-size:13px}
.dn-digest .mid-n{color:var(--ai);text-align:right}.dn-digest .mid-n.st{color:var(--act,var(--staff))}
@media (max-width:1100px){.dn-jobs li{grid-template-columns:8px minmax(0,1fr) 84px;padding:6px 0;row-gap:0}.dn-j-r,.dn-j-n{grid-column:2}.dn-jobs .db-go{grid-row:1;grid-column:3}}
@media (max-width:900px){.dn-cols,.dn-side{padding-left:0;border-left:0;order:-1}.dn-digest ul{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){.dn-health{flex-wrap:wrap}.dn-health-t{flex-basis:100%;order:3}.dn-health .btn{margin-left:auto}}
.dn-main .ch-vbars{margin-top:20px}
.af-line .hl-ai{background:color-mix(in srgb,var(--ai) 15%,transparent);border-radius:2px;padding:0 3px;margin:0 -1px;text-decoration:none;box-shadow:none}

/* nurture summary card (link only; approvals live in the Nurture queue) */
.af-rv-b{display:flex;flex-direction:column;gap:6px;padding:8px 12px;font-size:13px}
.af-rv-b p{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.af-rv-k{font:500 11px var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;min-width:48px}

/* phone: scroll row ends with breathing room; every tap target gets a 32px hit area */
.af-chips::after{content:"";flex:0 0 8px}
@media (max-width:760px){
  .af-doc .lnk,.dn .lnk,.af-why,.db-go,.af-doc .phead-i,.dn .phead-i{position:relative}
  .af-doc .lnk::after,.dn .lnk::after{content:"";position:absolute;inset:-8px -4px}
  .af-why::after,.db-go::after,.af-doc .phead-i::after,.dn .phead-i::after{content:"";position:absolute;inset:-5px -4px;min-height:32px}
  .af-chips .chip{min-height:32px}
}
.af-rv-i{display:inline-flex;align-items:center;gap:6px;margin-right:8px}
@media (max-width:760px){.af-doc .phead-a{flex-wrap:nowrap;margin-left:auto}.db-tpl{position:relative}.db-tpl::after{content:"";position:absolute;inset:-8px -4px}}
.af-rv-b p:not(.af-f-n){display:grid;grid-template-columns:56px minmax(0,1fr);align-items:start;gap:8px}
.af-rv-k{padding-top:3px}
.af-rv-v{display:flex;flex-wrap:wrap;gap:4px 0;min-width:0}
.af-rv-i{flex-wrap:wrap;white-space:nowrap;row-gap:2px}
.af-doc .phead-a{flex-wrap:nowrap}

/* log at volume: actor filter, scoring bundle, paging */
.af-tools{display:flex;align-items:center;gap:8px;margin-top:4px}
.af-bun{all:unset;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:8px;width:100%;min-height:28px;font-size:13px;color:var(--ink);cursor:pointer;border-radius:4px}
.af-bun:focus-visible{outline:2px solid var(--act);outline-offset:2px}
.af-bun-c{margin-left:auto;font:500 12px var(--body);color:var(--muted)}
.af-bun:hover .af-bun-c{color:var(--ink)}
.af-bun-l{list-style:none;margin:4px 0 0;padding:0 0 0 0;display:flex;flex-direction:column;gap:2px;border-top:1px dashed var(--line);padding-top:4px}
.af-more{display:flex;align-items:center;gap:12px;padding:16px 0 8px}
.dn-ctl dd{max-width:60%}
@media (max-width:760px){.af-more{flex-wrap:wrap}}

/* design pass: one bold thing (the amber verb), everything else quiet */
.af-ev{grid-template-columns:8px minmax(0,1fr) 44px}
.af-bun-l .af-ev{grid-template-columns:8px minmax(0,1fr) auto 44px}
.af-bt{font:500 11px var(--mono);color:var(--muted);white-space:nowrap}
.af-tools{justify-content:space-between}
.af-tools .af-bsel{margin-left:auto}
/* motion that answers an action: the bundle opens with a short fade, buttons acknowledge a press */
.af-bun-l{transition:opacity .16s var(--ease-out,cubic-bezier(.2,.8,.2,1)),transform .16s var(--ease-out,cubic-bezier(.2,.8,.2,1))}
@starting-style{.af-bun-l{opacity:0;transform:translateY(-2px)}}
.af-why,.af-tools .seg button{transition:transform .12s var(--ease-out,cubic-bezier(.2,.8,.2,1)),opacity .12s var(--ease-out,cubic-bezier(.2,.8,.2,1))}
.af-why:active,.af-tools .seg button:active{transform:scale(.97)}
.af-bun:active .af-bun-t{opacity:.7}
@media (prefers-reduced-motion:reduce){.af-bun-l,.af-why,.af-tools .seg button{transition:none}}
@media (max-width:760px){.af-ev,.af-bun-l .af-ev{grid-template-columns:8px minmax(0,1fr) auto}.af-bun-l .af-bt{display:none}.af-tools .af-bsel{max-width:150px}}
.af-tools .seg{flex:none;flex-wrap:nowrap;white-space:nowrap}
.af-tools .af-bsel{width:200px;flex:0 0 200px;min-width:0}
@media (max-width:760px){.af-tools{gap:8px}.af-tools .af-bsel{width:auto;flex:1 1 0;max-width:none}}
/* hit apron for inline buyer links at every width (links are 20px tall) */
.af-doc .lnk,.dn .lnk{position:relative}
.af-doc .lnk::after,.dn .lnk::after{content:"";position:absolute;inset:-8px -4px}
/* phone tap apron for the figure buttons (coordinator, night pass) */
@media (max-width:600px){}

/* day book: seven rows, newest first; one thin AI/team bar per day */
.dn-book{display:flex;flex-direction:column;gap:8px}
.dn-tbl{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
.dn-tbl th,.dn-tbl td{padding:0 12px;height:44px;border-bottom:1px solid var(--line);text-align:left;font-weight:400}
.dn-tbl th:first-child,.dn-tbl td:first-child{padding-left:0}
.dn-tbl th:last-child,.dn-tbl td:last-child{padding-right:0}
.dn-tbl thead th{height:32px;font:500 12px var(--body);color:var(--muted);border-bottom:1px solid var(--line-2,var(--line));white-space:nowrap}
.dn-tbl tbody tr:hover{background:var(--hover,var(--soft))}
.dn-tbl tr.is-today .dn-day{font-weight:600}
.dn-day{display:inline-block;min-width:76px;color:var(--ink)}
.dn-date{font:400 11px var(--mono);color:var(--muted)}
.dn-ans{width:46%}
.dn-ans{white-space:nowrap}
.dn-num{display:inline-block;min-width:40px;font:600 15px var(--display);color:var(--ink)}
.dn-bar{display:inline-flex;vertical-align:middle;width:calc(100% - 56px);max-width:360px;height:6px;margin-left:8px;background:var(--soft);border-radius:1px;overflow:hidden}
.dn-bar i,.dn-key i{display:block;height:100%}
.dn-bar i.ai,.dn-key i.ai{background:var(--ai)}.dn-bar i.team,.dn-key i.team{background:var(--act,var(--staff))}
.dn-key{display:inline-flex;align-items:center;gap:4px;margin-left:8px;font:400 11px var(--body);color:var(--muted)}
.dn-key i{width:8px;height:8px;border-radius:1px}
.dn-c{text-align:right!important;white-space:nowrap}
.dn-cell{all:unset;cursor:pointer;padding:6px 4px;margin:-6px -4px;border-radius:4px;font-variant-numeric:tabular-nums}
.dn-cell:hover{text-decoration:underline;text-underline-offset:3px}
.dn-cell:focus-visible{outline:2px solid var(--act);outline-offset:1px}
.dn-tbl tfoot th,.dn-tbl tfoot td{border-bottom:0;border-top:3px double var(--line-2,var(--line));font-weight:600}
.dn-tbl tfoot .dn-num{font-size:18px}
.dn-tbl .dn-d{margin-left:8px;font-size:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:760px){
  .dn-tbl th,.dn-tbl td{padding:0 6px;height:48px}
  .dn-tbl thead th{white-space:normal;line-height:1.2;font-size:11px;vertical-align:bottom;padding-bottom:6px;height:auto}
  .dn-key{display:none}
  .dn-day{display:block;min-width:0}
  .dn-ans{width:auto}
  .dn-bar{display:flex;width:100%;max-width:none;margin:4px 0 0}
  .dn-num{font-size:14px}
}
.dn-tbl thead th,.dn-tbl .dn-key{text-transform:none;letter-spacing:0}

/* N9 phone: feed content within ~120px of the top. The drafts card, actor/buyer filters and Export fold into the chip strip; the buyer select lives in a sheet. */
.af-rv-chip,.af-f-chip{display:none}
@media (max-width:760px){
  .af-doc .af-review,.af-doc .af-tools,.af-doc [data-act="afCsv"]{display:none}
  .af-doc>.phead{display:none}
  .af-rv-chip,.af-f-chip{display:inline-flex}
  .af-rv-chip{color:var(--ai);border-color:var(--ai-line);font-weight:600}
  .af-chips{margin-top:0}
  .af-dayh{font-size:16px;margin:8px 0 0}
  .af-day:first-of-type .af-dayh{margin-top:4px}
}
/* N9 phone: the day book leads; the AI health line sits right under it (a pause of the whole AI stays on top) */
@media (max-width:760px){.dn{display:flex;flex-direction:column}.dn>.ai-paused{order:-2}.dn>.dn-book{order:-1}}
.af-rv-held{color:var(--muted);font-weight:500;white-space:pre}
/* Why is discoverable at rest: muted outline, full strength on row hover or focus */
.af-why{opacity:1;color:var(--muted);border-color:var(--line)}
.af-turn:hover .af-why,.af-ev:hover .af-why,.af-why:hover,.af-why:focus-visible{color:var(--ai);border-color:var(--ai-line)}
/* phone critic r1: feed starts nearer the top, chip strip shows it scrolls, day-book cells get a full tap area */
@media (max-width:640px){
  #view[data-route="feed"]{padding-top:0}
  .af-day:first-of-type .af-dayh{margin-top:0}.af-chips+.af-day{margin-top:-4px}
  .af-chips{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
}
.dn-cell{position:relative}
.dn-cell::after{content:"";position:absolute;inset:-8px -12px}
/* 7-day impact statements above the day book */
.dn-stm ul{list-style:none;margin:4px 0 0;padding:0;border-top:1px solid var(--line)}
.dn-stm li{border-bottom:1px solid var(--line)}
.dn-stm-b{all:unset;box-sizing:border-box;width:100%;display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:12px;align-items:baseline;padding:8px 0;cursor:pointer}
.dn-stm-b:hover .dn-stm-c{text-decoration:underline;text-underline-offset:3px}
.dn-stm-b:focus-visible{outline:2px solid var(--act);outline-offset:2px;border-radius:4px}
.dn-stm-f{font:600 20px/1.1 var(--display);color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.dn-stm-f small{font-size:12px}
.dn-stm-c{font-size:13px;color:var(--ink);min-width:0}
.dn-stm-n{display:block;margin-top:2px;font-size:12px;color:var(--muted)}
.dn-stm-n .stamp{margin-right:4px}
@media (max-width:760px){
  .dn>.dn-stm{order:-1}
  .dn-stm .dn-sec-h{display:none}.dn-stm ul{margin:0}
  .dn-stm-b{grid-template-columns:64px minmax(0,1fr);row-gap:2px;padding:6px 0}
  .dn-stm-b>.stamp{grid-column:2;justify-self:start}
  .dn-stm-f{font-size:17px}
  .dn-stm-n{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
@media (max-width:760px){
  .dn-stm-c{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dn-stm-n{display:none}
  .dn-stm-b{grid-template-columns:56px minmax(0,1fr) auto;align-items:start}
  .dn-stm-b>.stamp{grid-column:auto;font-size:10px}
  .dn-stm-f{font-size:15px}
}
.dn-nm{font-size:var(--fs-sm,13px);color:var(--muted,#6b6b6b);font-weight:500}
