/* Phase 2 · the morning brief on Home (js/pm-brief.js). Sections of rows between the greeting
   and the three app tiles, which become a compact row underneath. */
#brief { display: grid; gap: 14px; max-width: 760px; margin-top: 18px; align-content: start; }
/* wide screens: the brief is a panel down the right edge; the greeting and the tiles keep the left */
@media (min-width: 1000px) {
  #home-page .main.home.brief-on { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "head brief" "grid brief"; grid-template-rows: auto 1fr; column-gap: 40px; align-items: start; max-width: none; padding-right: 0; padding-bottom: 0; }
  .brief-on .home-head { grid-area: head; }
  .brief-on .app-grid { grid-area: grid; margin-bottom: 64px; }
  #app-screen #home-page.layout:has(.brief-on) { max-width: none; padding-bottom: 0; } /* full window width, so the panel meets the right edge */
  #home-page .main.home.brief-on { width: 100%; margin: 0; padding-left: var(--gutter); } /* the panel fills the window; no spare page under it */
  #brief { grid-area: brief; position: sticky; top: 56px; box-sizing: border-box; height: calc(100vh - 56px); max-width: none; margin: -88px 0 0; padding: 28px 32px 40px 28px; overflow-y: auto; border-left: 1px solid var(--line); background: var(--glass); }
}
.brief-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.brief-h b { font-weight: 600; color: var(--text); }
.brief-sec.late .brief-h { color: var(--danger); }
.brief-sec.today .brief-h { color: var(--accent); }
.brief-sec.waiting .brief-h, .brief-sec.needs .brief-h { color: var(--amber); }
.brief-list { display: grid; }
.brief-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 8px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.brief-row:hover, .brief-row:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
:where(html[data-theme="light"]) .brief-row:hover, :where(html[data-theme="light"]) .brief-row:focus-visible { background: rgba(15, 23, 42, .05); }
.brief-main { flex: 1; min-width: 0; display: grid; gap: 0; }
.brief-title { font-size: 14px; font-weight: 600; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-sub { font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-row .face-stack { flex: none; }
.brief-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.brief-venture { min-height: 40px; }
.brief-personal { min-height: 36px; margin-top: -6px; }
/* venture lines sit side by side when there is room */
.brief-sec.ventures .brief-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 16px; }
.brief-clear { margin: 20px 0 0 8px; color: var(--muted); font-size: 14px; line-height: 22px; }
#brief-date { margin-top: 6px; font-size: 14px; }
/* in between (tablets): the brief sits above the tiles, which become a compact row (phones keep their list, mobile-other.css) */
@media (min-width: 761px) and (max-width: 999px) {
  .brief-on .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
  .brief-on .app-card { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 0; align-items: center; min-height: 0; padding: 14px 16px; border-radius: 16px; }
  .brief-on .app-card:hover { transform: none; }
  .brief-on .app-icon { grid-row: 1 / span 2; width: 40px; height: 40px; margin: 0; }
  .brief-on .app-icon svg { width: 20px; height: 20px; }
  .brief-on .app-name { grid-column: 2; align-self: end; font-size: 15px; line-height: 20px; }
  .brief-on .app-meta { grid-column: 2; align-self: start; min-height: 0; margin: 0; padding: 0; font-size: 13px; line-height: 18px; }
  .brief-on .app-go { top: 50%; right: 16px; margin-top: -8px; }
}
@media (max-width: 760px) {
  #brief { gap: 14px; margin-top: 16px; }
  .brief-row { min-height: 46px; padding: 6px 8px; }
  .brief-on .app-grid { margin-top: 24px; }
}

/* a row with a control at its end (Chase on a Waiting row) */
.brief-row .brief-extra { flex: none; margin-left: 12px; display: inline-flex; }
.brief-row.brief-row { cursor: pointer; }
