/* Opt in on the Terminal body; append after existing Terminal styles. */
[data-home-details] .topbar .top-right{gap:2px}
[data-home-details] .topbar .search-trigger,
[data-home-details] .topbar .top-right>.icon-button,[data-home-details] .topbar .top-right>:where(.top-more)>.icon-button{width:44px;min-width:44px;height:44px;padding:0}
/* Search sits beside the bell: its icon centred in its 44 px target, and no gap between them (the Founder's walk, 1 October 2026). */
[data-home-details] .topbar .top-right .search-trigger{justify-content:center;margin:0!important}
[data-home-details] .topbar .top-right{column-gap:0!important}
/*
 * Primy's card is her face, the badge, her name and her role, the expand mark and the message box (the Founder,
 * 4 October 2026, 23:40). The text block is sized to the face and centred against it: the badge, the name and the
 * role each on a line of their own, every line one line long, so it never stands taller than the face.
 */
[data-home-details] [data-primary-chat] .agent-summary{gap:18px;align-items:center}
[data-home-details] [data-primary-chat] .portrait-box.hero{width:112px;height:112px;flex:0 0 112px}
[data-home-details] [data-primary-chat] .agent-summary>.grow{min-width:0;padding-inline-end:22px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px}
[data-home-details] [data-primary-chat] .agent-summary h2{margin:0;max-width:100%;font-size:1.25rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-home-details] [data-primary-chat] .agent-summary .agent-role{margin:0;max-width:100%;font-size:.875rem;line-height:1.35;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The account's condition, in its own row under the greeting: four small counts, each opening its page. */
.home-stats{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,148px);gap:10px;margin:0 0 20px}
.home-stat{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;min-height:56px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);color:inherit;text-decoration:none}
.home-stat strong{font-size:1.125rem;line-height:1.2;overflow-wrap:anywhere}
.home-stat span{font-size:.75rem;line-height:1.2;color:var(--muted)}
.home-stat[data-waiting] strong{color:var(--purple)}
.home-stat:hover{border-color:var(--purple)}
.home-stat:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
[data-home-details] .quick-work-strip>a>.icon{width:28px;height:28px}
[data-home-details] .quick-work-strip [data-action="new-task"]>.icon{width:24px;height:24px}
[data-home-details] .quick-work-strip [data-action="new-task"]{min-height:44px}
[data-home-details] [data-home-workspaces]>.list-row>.icon:first-child{width:28px;height:28px}
[data-home-details] [data-home-workspaces]>.list-row>.grow{min-width:0;overflow-wrap:anywhere}
[data-home-details] [data-home-workspaces] .card-head{flex-wrap:wrap}
[data-home-details] [data-home-workspaces] [data-action="new-workspace"]{min-height:44px}
@media(max-width:700px){
 [data-home-details] [data-primary-chat] .agent-summary{gap:12px}
 [data-home-details] [data-primary-chat] .portrait-box.hero{width:88px;height:88px;flex-basis:88px}
 [data-home-details] [data-primary-chat] .agent-summary>.grow{padding-inline-end:24px;gap:4px}
 [data-home-details] [data-primary-chat] .agent-summary h2{font-size:1.0625rem}
 [data-home-details] [data-primary-chat] .agent-summary .agent-role{font-size:.8125rem}
 .home-stats{grid-auto-columns:minmax(0,1fr);gap:6px;margin-bottom:16px}
 .home-stat{min-height:52px;padding:7px 8px}
 .home-stat strong{font-size:1rem}
 .home-stat span{font-size:.6875rem}
 [data-home-details] .quick-work-strip{flex-wrap:wrap;gap:12px}
 [data-home-details] .quick-work-strip>a{min-width:0;flex:1 1 135px}
 [data-home-details] [data-home-workspaces]>.list-row{display:grid;grid-template-columns:28px minmax(0,1fr) 21px;gap:6px 10px}
 [data-home-details] [data-home-workspaces]>.list-row>.icon:first-child{grid-column:1;grid-row:1/3}
 [data-home-details] [data-home-workspaces]>.list-row>.badge{grid-column:2;justify-self:start}
 [data-home-details] [data-home-workspaces]>.list-row>.icon:last-child{grid-column:3;grid-row:1/3}
 [data-home-details] [data-home-workspaces]>.list-row>.grow{flex:1 1 120px}
}
/* On a phone the chips share the line and wrap when the money adds one (Credits, SYM Pay): each keeps its words whole. */
@media(max-width:700px){.home-stats{display:flex;flex-wrap:wrap}.home-stat{flex:1 1 auto;min-width:64px}}
/*
 * Home, top to bottom (the Founder, 5 October 2026, 01:20): the Primary's card, the account's row, Briefs, Tasks,
 * Workspaces; one column with one gap, each block adding none of its own. The rest follows in the grid.
 */
.home-top{display:flex;flex-direction:column;gap:16px;margin:0 0 20px;min-width:0}
.home-top>*{margin-top:0!important;margin-bottom:0!important;min-width:0}
.home-briefs:empty{display:none}
/*
 * One anatomy for every Needs-you card (needs-you.js; the Founder, 5 October 2026, at 390): title, description,
 * status, then the presses. No icon column: every line starts at the card's own left padding, as Home's parts and
 * the Tasks rows do. The presses are one grid of equal cells, left-aligned; a second row only when the first is full.
 */
.needs-row{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0}
.needs-row>*{margin:0}
.needs-row h3,.needs-title{margin:0;font-size:1rem;line-height:1.4;overflow-wrap:anywhere}
.needs-row h3 a{color:inherit;text-decoration:none}
.needs-row h3 a:hover{text-decoration:underline}
.decision-row.needs-row p,.needs-description,.needs-status{margin:0;overflow-wrap:anywhere}
.decision-row.needs-row .needs-description,.needs-description{font-size:.875rem;line-height:1.5;color:inherit}
.decision-row.needs-row .needs-status,.needs-status{font-size:.8125rem;line-height:1.5;color:var(--muted)}
.needs-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,9rem),1fr));grid-auto-rows:1fr;gap:8px;margin-top:8px;justify-content:start}
.needs-actions .btn,.needs-actions .btn.small{min-height:44px;height:100%;width:100%;margin:0;padding:7px 12px;font-size:.8125rem;white-space:normal}
@media(min-width:701px){.needs-actions{grid-template-columns:repeat(auto-fill,minmax(12rem,1fr))}}
/* Quiet-agent reassignment: wider equal cells keep the sentence readable; stack on phones.
   Inbox/agent rows already name their kind; the detail card identifies waiting work with its task list. */
[data-needs-kind="AGENT_QUIET"] .needs-actions,
[data-needs-next]:has(> .needs-tasks) > .needs-actions{grid-template-columns:repeat(auto-fill,minmax(min(100%,16rem),1fr))}
.needs-next{display:flex;flex-direction:column;gap:6px}
.needs-next h2{margin:0 0 4px}
/* An agent Unresponsive or Disconnected, on its own page (the Founder, 9 October 2026, 07:16): one card. The face, the
   name and the state pill on one line; one line of what is known; then one full-width row, the whole of it the press,
   with an arrow at its end, opening the agent on the agent's own platform. */
.offline-card{display:flex;flex-direction:column;gap:10px;padding:16px}
.offline-who{display:flex;align-items:center;gap:10px;min-width:0}
.offline-face{display:inline-flex;flex:none;border-radius:50%}
.offline-who .portrait-box,.offline-who .portrait-box.small{flex:0 0 40px;width:40px;min-width:40px;height:40px}
.offline-who .held-face-letter{width:40px;height:40px;font-size:1rem}
.offline-name{min-width:0;font-size:1rem;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.offline-known{margin:0;color:var(--muted,#6b6578);font-size:.9375rem;line-height:1.4}
.offline-open{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:48px;margin:2px 0 0;padding:0 14px;border:1px solid var(--line,#e4e1ea);border-radius:12px;background:var(--surface,#fff);color:var(--purple,#6d28b5);font-weight:600;text-decoration:none;-webkit-tap-highlight-color:transparent}
.offline-open-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.offline-open .icon{flex:none;width:18px;height:18px}
.offline-open:hover{background:var(--soft,#f2ecfa)}
.offline-open:active{background:var(--soft,#f2ecfa)}
.offline-open:focus-visible{outline:2px solid var(--purple,#6d28b5);outline-offset:2px}
[dir=rtl] .offline-open .icon{transform:scaleX(-1)}
.needs-tasks{margin:0 0 4px;padding-inline-start:20px}
.needs-tasks a{display:inline-flex;align-items:center;min-height:32px}
@media(max-width:700px){.home-top{gap:12px;margin-bottom:16px}}
/*
 * Home, 5 October 2026, 07:14 (the Founder): no greeting; the Chief's card in its frame; Overview, Briefs and every
 * other section under a title with its icon; History is the week's figures and the recent activity together.
 */
.home-title{display:flex;align-items:center;gap:8px;margin:0;min-width:0}
.home-title>.icon{width:20px;height:20px;color:var(--purple)}
.home-title>span{min-width:0;overflow-wrap:anywhere}
.home-section{display:flex;flex-direction:column;gap:10px;min-width:0}
.home-section>.home-title{font-size:1.0625rem}
.home-section .home-stats{margin:0}
.home-section:has(>.home-briefs:empty){display:none}
.home-stat{flex-direction:row;align-items:center;justify-content:flex-start;gap:9px}
.home-stat>.icon{width:20px;height:20px;color:var(--purple)}
.home-stat-text{display:flex;flex-direction:column;gap:2px;min-width:0}
/* The Chief's frame: the person's Action color (--chief-ink, agent-colour.css), or the Chief's own colour where the person chose that. */
.chief-frame{--chief-frame:var(--chief-ink,#6d28b5)}
.card.chief-frame{border:2px solid var(--chief-frame)}
/* On Agents the second pixel is drawn inside, so the Chief's face and words sit where every other tile's do. */
.agent-card.chief-frame{border:1px solid var(--chief-frame);box-shadow:inset 0 0 0 1px var(--chief-frame)}
/* The Chief tab on Home, as clear as the Agents page's: larger words and crown, the same tab shape, in the frame's colour. */
[data-home-crew] .has-primary-tab{margin-top:30px!important}
[data-home-crew] .primary-tab{top:-30px;height:30px;gap:6px;padding:4px 12px;font-size:14px;line-height:20px;font-weight:650}
[data-home-crew] .primary-tab .primary-crown{width:18px;height:18px}
.chief-frame>.primary-tab{border:2px solid var(--chief-frame);border-bottom:0;color:var(--chief-frame)}
[data-home-crew] .list-row.chief-frame{position:relative;padding:12px;border:2px solid var(--chief-frame);border-radius:12px;margin-bottom:6px}
[data-home-crew] .list-row.chief-frame>.primary-tab{inset-inline-start:10px}
[data-home-history] .home-week{padding-bottom:16px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.home-week-when{margin:0 0 10px;font-size:.8125rem;color:var(--muted)}
@media(max-width:700px){
 .home-stat{gap:7px}
 .home-stat>.icon{width:18px;height:18px}
 .home-week-figures{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .home-week-figures dt{font-size:.75rem;margin-bottom:4px}
 .home-week-figures dd{font-size:1rem}
}
@media(min-width:701px){.home-section .home-stats{grid-auto-columns:minmax(148px,max-content)}.home-stat strong{white-space:nowrap}}
