/* ──────────────────────────────────────────────────────────────────────────
 * home.css — the hub-home CONTENT, styled EXACTLY to the hub-toprail mockup.
 * Everything is nested under .hub-v2 (native CSS nesting) so the mockup's
 * generic class names (.card / .hero / .track / .step / .ub-row / …) never
 * collide with plenum.css or other global hub CSS. Tokens come from plenum.css.
 * The top bar stays the existing hub .topbar — this file is content only.
 * ────────────────────────────────────────────────────────────────────────── */

/* Match the mockup's roomier gutters (40px vs plenum's default 26px). The double
 * class outranks plenum's .wrap in both the base and mobile rules. */
.wrap.hub-v2 { padding: 30px 40px 80px; }
@media (max-width:760px) { .wrap.hub-v2 { padding: 22px 16px 60px; } }

.hub-v2 {
  /* hello */
  .hello { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:26px; }
  .eyebrow { font-family:var(--mono); font-size:calc(10.5px * var(--hub-fs, 1)); letter-spacing:var(--track-cap); text-transform:uppercase; color:var(--ink-3); font-weight:600; }
  .hello h1 { font-size:calc(30px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-tight); margin-top:8px; line-height:1.05; }
  .hello .sub { color:var(--ink-2); font-size:calc(14px * var(--hub-fs, 1)); margin-top:8px; }
  .hello .sub b { color:var(--ink); font-weight:600; }
  .hello .sub .hub-mk-spin { display:none; }
  .plan { display:flex; align-items:center; gap:14px; padding:10px 15px; border-radius:12px; background:var(--panel);
    border:1px solid var(--hair); box-shadow:var(--sh-1); white-space:nowrap; }
  .plan .k { font-family:var(--mono); font-size:calc(9.5px * var(--hub-fs, 1)); letter-spacing:var(--track-cap); text-transform:uppercase; color:var(--ink-3); }
  .plan b { font-size:calc(13.5px * var(--hub-fs, 1)); font-weight:600; margin-top:2px; display:block; }
  .plan a { font-size:calc(11.5px * var(--hub-fs, 1)); font-weight:600; color:var(--accent); cursor:pointer; }

  /* section head */
  .sh { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:34px 0 14px; }
  .sh h2 { font-size:calc(16px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-snug); }
  .sh a { font-size:calc(12.5px * var(--hub-fs, 1)); font-weight:600; color:var(--accent); cursor:pointer; }
  .sh .cnt { font-family:var(--mono); font-size:calc(11px * var(--hub-fs, 1)); font-weight:600; padding:2px 8px; border-radius:999px;
    background:var(--hot-soft); color:var(--hot); margin-left:8px; }

  /* stat band */
  .stats { display:grid; grid-template-columns:1.6fr 1fr 1fr; grid-template-rows:auto auto; gap:14px; }
  .card { background:var(--panel); border:1px solid var(--hair); border-radius:var(--r-lg); box-shadow:var(--sh-1);
    transition:transform var(--dur) var(--out), border-color var(--dur), box-shadow var(--dur); }
  .clk { cursor:pointer; }
  .clk:hover { transform:translateY(-2px); border-color:var(--hair-2); box-shadow:var(--sh-2); }
  .slab { font-family:var(--mono); font-size:calc(10px * var(--hub-fs, 1)); letter-spacing:var(--track-cap); text-transform:uppercase; color:var(--ink-3); font-weight:600; }
  .hero { grid-row:span 2; padding:22px 24px; display:flex; flex-direction:column; }
  .hero .top { display:flex; align-items:flex-start; justify-content:space-between; }
  .chip { display:inline-flex; align-items:center; gap:4px; font-size:calc(11px * var(--hub-fs, 1)); font-weight:600; font-family:var(--mono);
    padding:3px 8px; border-radius:999px; background:var(--pos-soft); color:var(--cold); }
  .chip i { font-size:calc(13px * var(--hub-fs, 1)); }
  .chip[hidden] { display:none; }
  .hero .num { font-size:calc(38px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-tight); margin-top:14px; line-height:1; }
  .spark { margin-top:16px; width:100%; height:66px; display:block; }
  .spark[hidden] { display:none; }
  .hero .brk { display:flex; gap:26px; margin-top:16px; padding-top:16px; border-top:1px solid var(--hair); }
  .hero .brk .k { font-size:calc(11px * var(--hub-fs, 1)); color:var(--ink-3); font-weight:500; }
  .hero .brk .v { font-size:calc(17px * var(--hub-fs, 1)); font-weight:600; margin-top:3px; }
  .hero .brk .v.neg { color:var(--hot); }
  .mini { padding:18px 18px; }
  .mini .num { font-size:calc(27px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-tight); margin-top:12px; line-height:1; }
  .mini .ss { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-2); margin-top:7px; }
  .mini .ss b { color:var(--accent); font-weight:600; }
  .alert { grid-column:2 / span 2; display:flex; align-items:center; gap:15px; padding:16px 18px;
    border-color:color-mix(in srgb, var(--amber) 30%, var(--hair)); }
  .alert.all-clear { border-color:var(--hair); }
  .alert .aic { width:40px; height:40px; border-radius:11px; flex:none; display:grid; place-items:center; font-size:calc(20px * var(--hub-fs, 1));
    background:var(--amber-soft); color:var(--amber); }
  .alert.all-clear .aic { background:var(--pos-soft); color:var(--cold); }
  .alert .at { flex:1; min-width:0; }
  .alert .at b { font-size:calc(14px * var(--hub-fs, 1)); font-weight:600; display:block; }
  .alert .at span { font-size:calc(12.5px * var(--hub-fs, 1)); color:var(--ink-2); }
  .alert .anum { font-size:calc(22px * var(--hub-fs, 1)); font-weight:600; color:var(--amber); }
  .alert.all-clear .anum { color:var(--cold); }
  .alert .arr { color:var(--ink-3); font-size:calc(20px * var(--hub-fs, 1)); }

  /* two-column body */
  .cols { display:grid; grid-template-columns:1.5fr 1fr; gap:22px; align-items:start; }
  .panel { background:var(--panel); border:1px solid var(--hair); border-radius:var(--r-lg); box-shadow:var(--sh-1); overflow:hidden; }
  .ph { display:flex; align-items:center; justify-content:space-between; padding:15px 18px 13px; border-bottom:1px solid var(--hair); }
  .ph h3 { font-size:calc(14px * var(--hub-fs, 1)); font-weight:600; }
  .ph a, .ph small { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); }
  .ph a { color:var(--accent); font-weight:600; cursor:pointer; }

  /* attention queue (feature_hub_attention) — deliberately built from the same
     row anatomy as "Ready to bill" below (icon tile · two-line text · action),
     because they are the same gesture: a thing you clear. A second visual
     language for the same job would only make the page look busier. The tier
     stripe on the left is the ONLY thing the queue adds — it is the one piece of
     information the ready-to-bill list has no need for. */
  .attn { display:flex; flex-direction:column; }
  .attn-row { display:flex; align-items:stretch; border-bottom:1px solid var(--hair); }
  .attn-row:last-child { border-bottom:0; }
  .attn-row:hover { background:var(--panel-2); }
  .attn-main { flex:1; min-width:0; display:flex; align-items:center; gap:13px; padding:13px 6px 13px 18px;
    text-decoration:none; color:inherit; cursor:pointer; position:relative; }
  .attn-row::before { content:""; width:3px; flex:none; background:transparent; }
  .attn-row.t0::before { background:var(--hot); }
  .attn-row.t1::before { background:var(--amber); }
  .attn-ic { width:36px; height:36px; border-radius:10px; flex:none; display:grid; place-items:center; font-size:calc(18px * var(--hub-fs, 1));
    background:var(--panel-2); color:var(--ink-2); border:1px solid var(--hair); }
  .attn-row.t0 .attn-ic { background:var(--hot-soft); color:var(--hot); border-color:transparent; }
  .attn-row.t1 .attn-ic { background:var(--amber-soft); color:var(--amber); border-color:transparent; }
  .attn-tx { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
  .attn-tx b { font-size:calc(13.5px * var(--hub-fs, 1)); font-weight:600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .attn-tx span { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .attn-cta { flex:none; display:inline-flex; align-items:center; gap:5px; font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--accent);
    border:1px solid var(--hair-2); border-radius:8px; padding:6px 11px; transition:border-color var(--dur), background var(--dur); }
  .attn-row:hover .attn-cta { border-color:var(--accent); background:var(--accent-wash); }
  .attn-x { flex:none; width:34px; display:grid; place-items:center; border:0; background:none; cursor:pointer;
    color:var(--ink-3); font-size:calc(14px * var(--hub-fs, 1)); opacity:0; transition:opacity var(--dur), color var(--dur); }
  .attn-row:hover .attn-x, .attn-x:focus-visible { opacity:1; }
  .attn-x:hover { color:var(--ink); }
  .attn-more { border:0; background:none; padding:0; cursor:pointer; font-family:inherit;
    font-size:calc(12.5px * var(--hub-fs, 1)); font-weight:600; color:var(--accent); }
  /* Touch has no hover, so the dismiss control must be permanently visible there
     or it does not exist for half the users. */
  @media (hover:none) { .attn-x { opacity:1; } }

  /* the records behind a row (feature_attention_actions). The chevron is always
     visible — it is the row's second action, not a tidy-up like dismiss — and the
     list sits in the row's own tint, indented to the text so it reads as the
     row's detail and not as more rows. */
  .attn-peek { flex:none; width:34px; display:grid; place-items:center; border:0; background:none; cursor:pointer;
    color:var(--ink-3); font-size:calc(15px * var(--hub-fs, 1)); transition:color var(--dur); }
  .attn-peek:hover, .attn-peek:focus-visible { color:var(--ink); }
  .attn-peek-gap { flex:none; width:34px; }
  .attn-peek i { transition:transform var(--dur) var(--out); }
  .attn-peek[aria-expanded="true"] i { transform:rotate(180deg); }
  .attn-row.is-open { background:var(--panel-2); border-bottom-color:transparent; }
  .attn-recs { background:var(--panel-2); border-bottom:1px solid var(--hair); padding:0 18px 8px 70px; }
  .attn-recs[hidden] { display:none; }
  .attn-recs:last-child { border-bottom:0; }
  .attn-rec { display:flex; align-items:center; gap:12px; padding:8px 0; border-top:1px solid var(--hair); }
  .attn-rec-tx { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
  .attn-rec-tx b { font-size:calc(13px * var(--hub-fs, 1)); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .attn-rec-tx span { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .attn-rec-amt { flex:none; font-size:calc(13px * var(--hub-fs, 1)); font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .attn-rec-act { flex:none; display:inline-flex; align-items:center; gap:5px; font-size:calc(12px * var(--hub-fs, 1)); font-weight:600;
    color:var(--accent); text-decoration:none; border:1px solid var(--hair-2); border-radius:8px; padding:5px 10px; background:var(--panel);
    transition:border-color var(--dur), background var(--dur); }
  .attn-rec-act:hover, .attn-rec-act:focus-visible { border-color:var(--accent); background:var(--accent-wash); }
  .attn-rec-note { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); padding:10px 0 4px; border-top:1px solid var(--hair); }
  .attn-rec-note a { color:var(--accent); font-weight:600; }
  @media (max-width:640px) {
    .attn-recs { padding-left:18px; }
    .attn-rec { flex-wrap:wrap; }
    .attn-rec-tx { flex-basis:100%; }
    .attn-rec-tx b, .attn-rec-tx span { white-space:normal; }
  }

  /* ready to bill rows */
  .ub { display:flex; flex-direction:column; }
  .ub-row { display:flex; align-items:center; gap:13px; padding:13px 18px; cursor:pointer; border-bottom:1px solid var(--hair);
    text-decoration:none; color:inherit; transition:background var(--dur); }
  .ub-row:last-child { border-bottom:0; }
  .ub-row:hover { background:var(--panel-2); }
  .ub-ic { width:36px; height:36px; border-radius:10px; flex:none; display:grid; place-items:center; font-size:calc(18px * var(--hub-fs, 1));
    background:var(--panel-2); color:var(--ink-2); border:1px solid var(--hair); }
  .ub-ic.q { background:var(--pos-soft); color:var(--cold); border-color:transparent; }
  .ub-tx { flex:1; min-width:0; }
  .ub-tx b { font-size:calc(13.5px * var(--hub-fs, 1)); font-weight:600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ub-tx span { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); }
  .ub-amt { font-family:var(--mono); font-weight:600; font-size:calc(14px * var(--hub-fs, 1)); }
  .ub-cta { flex:none; display:inline-flex; align-items:center; gap:5px; font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--accent);
    border:1px solid var(--hair-2); border-radius:8px; padding:6px 11px; transition:border-color var(--dur), background var(--dur); }
  .ub-row:hover .ub-cta { border-color:var(--accent); background:var(--accent-wash); }

  /* who is out today (feature_hub_crew) — a header for the agenda beneath it,
     not a second list. Deliberately denser than an agenda row: it is scanned,
     never read line by line. */
  .crew { display:flex; flex-wrap:wrap; gap:8px; padding:12px 18px 4px; border-bottom:1px solid var(--hair); }
  .cw { display:flex; align-items:center; gap:9px; padding:6px 11px 6px 7px; border-radius:999px;
    border:1px solid var(--hair); background:var(--panel-2); min-width:0; }
  .cw-av { width:24px; height:24px; border-radius:50%; flex:none; display:grid; place-items:center;
    font-size:calc(9.5px * var(--hub-fs, 1)); font-weight:700; color:#fff; }
  .cw-av.none { background:var(--panel); color:var(--ink-3); border:1px dashed var(--hair-2); font-size:calc(13px * var(--hub-fs, 1)); }
  .cw-tx { display:flex; flex-direction:column; min-width:0; line-height:1.25; }
  .cw-tx b { font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:112px; }
  .cw-tx span { font-size:calc(10.5px * var(--hub-fs, 1)); color:var(--ink-3); white-space:nowrap; }
  .cw-n { font-family:var(--mono); font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--ink-2); flex:none;
    padding-left:2px; border-left:1px solid var(--hair); margin-left:2px; padding-left:9px; }
  /* Someone actually out is the one state worth colour; "day done" recedes and
     unassigned work is marked as a gap rather than a person. */
  .cw.live { border-color:var(--amber); background:var(--amber-soft); }
  .cw.live .cw-tx span { color:var(--amber); font-weight:600; }
  .cw.done { opacity:.62; }
  .cw.none { border-style:dashed; background:transparent; }
  .cw.none .cw-tx b { color:var(--ink-3); }

  /* recently opened (feature_hub_recents) — a footer to the Today panel, kept
     deliberately quiet. It is a shortcut back to something, not news, so it must
     never compete with the agenda above it. */
  .recents { border-top:1px solid var(--hair); padding:11px 18px 13px; }
  .rc-h { font-family:var(--mono); font-size:calc(9.5px * var(--hub-fs, 1)); letter-spacing:var(--track-cap); text-transform:uppercase;
    color:var(--ink-3); font-weight:600; margin-bottom:8px; }
  .rc-list { display:flex; flex-wrap:wrap; gap:6px; }
  .rc { display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:5px 10px; border-radius:8px;
    border:1px solid var(--hair); background:var(--panel-2); text-decoration:none; color:var(--ink-2);
    font-size:calc(11.5px * var(--hub-fs, 1)); transition:border-color var(--dur), color var(--dur); }
  .rc:hover { border-color:var(--accent); color:var(--accent); }
  .rc i { font-size:calc(13px * var(--hub-fs, 1)); flex:none; opacity:.75; }
  .rc span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }

  /* activity feed */
  .feed { display:flex; flex-direction:column; padding:6px 0; }
  .fr { display:flex; gap:13px; padding:10px 18px; align-items:flex-start; }
  /* A row that names a document is an <a> to it; the four state-derived sources
     have nothing to open and stay plain divs, so the hover has to be keyed on
     the anchor rather than the row. */
  a.fr { text-decoration:none; color:inherit; transition:background var(--dur); }
  a.fr:hover { background:var(--panel-2); }
  .fr .fd { width:30px; height:30px; border-radius:8px; flex:none; display:grid; place-items:center; font-size:calc(15px * var(--hub-fs, 1));
    background:var(--panel-2); color:var(--ink-2); border:1px solid var(--hair); margin-top:1px; }
  .fr .fd.pos { background:var(--pos-soft); color:var(--cold); border-color:transparent; }
  .fr .fd.neg { background:var(--hot-soft); color:var(--hot); border-color:transparent; }
  .fr .ft { flex:1; min-width:0; }
  .fr .ft p { font-size:calc(13px * var(--hub-fs, 1)); line-height:1.45; }
  .fr .ft p b { font-weight:600; }
  .fr .ft .amt { font-family:var(--mono); font-weight:600; }
  .fr .tm { font-size:calc(11px * var(--hub-fs, 1)); color:var(--ink-3); white-space:nowrap; flex:none; }

  /* today agenda */
  .agenda { display:flex; flex-direction:column; padding:6px 0; }
  .ag { display:flex; gap:13px; padding:11px 18px; align-items:center; cursor:pointer; text-decoration:none; color:inherit; transition:background var(--dur); }
  .ag:hover { background:var(--panel-2); }
  .ag .time { font-family:var(--mono); font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--ink-2); width:44px; flex:none; text-align:right; }
  .ag .bar { width:3px; align-self:stretch; border-radius:3px; background:var(--accent); flex:none; }
  .ag .bar.warn { background:var(--amber); }
  .ag .bar.done { background:var(--ink-3); }
  .ag .agt { flex:1; min-width:0; }
  .ag .agt b { font-size:calc(13px * var(--hub-fs, 1)); font-weight:600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ag .agt span { font-size:calc(11.5px * var(--hub-fs, 1)); color:var(--ink-3); }
  .ag .who { width:24px; height:24px; border-radius:7px; flex:none; display:grid; place-items:center; font-size:calc(10px * var(--hub-fs, 1)); font-weight:700; color:#fff; }
  /* job state (feature_hub_today_state). Only the states worth interrupting a
     scan for get colour: someone is on the way, someone is there. "Booked" is
     the default and says nothing, so it renders no chip at all. */
  .ag .ag-st { flex:none; font-family:var(--mono); font-size:calc(9.5px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-cap);
    text-transform:uppercase; padding:3px 7px; border-radius:999px; border:1px solid var(--hair-2); color:var(--ink-3); }
  .ag .ag-st.onsite { background:var(--amber-soft); color:var(--amber); border-color:transparent; }
  .ag .ag-st.enroute { background:var(--pos-soft); color:var(--cold); border-color:transparent; }
  .ag .ag-st.done { color:var(--ink-3); opacity:.75; }

  /* apps launcher */
  .apps { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
  .app-card { display:flex; flex-direction:column; gap:14px; padding:20px; border-radius:var(--r-lg); cursor:pointer;
    background:var(--panel); border:1px solid var(--hair); box-shadow:var(--sh-1); position:relative; overflow:hidden;
    text-decoration:none; color:inherit;
    transition:transform var(--dur) var(--out), border-color var(--dur), box-shadow var(--dur); }
  .app-card:hover { transform:translateY(-3px); border-color:var(--hair-2); box-shadow:var(--sh-2); }
  .app-card::after { content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--accent); opacity:0; transition:opacity var(--dur); }
  .app-card:hover::after { opacity:1; }
  .app-ic { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; color:#fff; }
  .app-ic i { font-size:calc(22px * var(--hub-fs, 1)); }
  .app-ic.design { background:linear-gradient(140deg,#1493e6,#0f76bf); }
  .app-ic.dispatch { background:linear-gradient(140deg,#5b6b82,#3a4657); }
  .app-ic.books { background:linear-gradient(140deg,#e23b3b,#b8302f); }
  .app-ic.other { background:linear-gradient(140deg,var(--accent),var(--accent-2)); }
  .app-card h4 { font-size:calc(15px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-snug); }
  .app-card p { font-size:calc(12.5px * var(--hub-fs, 1)); color:var(--ink-3); line-height:1.5; }
  .app-card .go { margin-top:auto; display:flex; align-items:center; justify-content:space-between; font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--ink-2); }
  .app-card .go i { color:var(--accent); font-size:calc(16px * var(--hub-fs, 1)); }
  .app-card.locked { opacity:.72; border-style:dashed; font:inherit; text-align:left; }

  /* resume — pick up where you left off */
  .resume { display:flex; flex-direction:column; gap:14px; }
  .rz-card { padding:17px 22px 22px; background:var(--panel); border:1px solid var(--hair); border-radius:var(--r-lg);
    box-shadow:var(--sh-1); transition:border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--out); }
  .rz-card:hover { border-color:var(--hair-2); box-shadow:var(--sh-2); transform:translateY(-1px); }
  .rz-top { display:flex; align-items:center; gap:16px; }
  .rz-who { flex:1; min-width:0; }
  .rz-who .cust { font-size:calc(15px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-snug); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rz-who .meta { font-size:calc(12px * var(--hub-fs, 1)); color:var(--ink-3); margin-top:3px; }
  .rz-who .meta .val { font-family:var(--mono); font-weight:600; color:var(--ink-2); }
  .rz-next { font-size:calc(11.5px * var(--hub-fs, 1)); font-weight:600; color:var(--accent-2); white-space:nowrap; }
  .rz-next .k { font-family:var(--mono); font-size:calc(9px * var(--hub-fs, 1)); letter-spacing:var(--track-cap); text-transform:uppercase; color:var(--ink-3); display:block; margin-bottom:2px; }
  .rz-cont { display:inline-flex; align-items:center; gap:7px; padding:9px 15px; border-radius:10px; cursor:pointer;
    font-size:calc(12.5px * var(--hub-fs, 1)); font-weight:600; color:#fff; background:var(--accent); border:0; box-shadow:var(--sh-1); white-space:nowrap; flex:none;
    text-decoration:none; transition:background var(--dur), transform var(--dur) var(--out); }
  .rz-cont:hover { background:var(--accent-2); }
  .rz-cont:active { transform:scale(.97); }
  .rz-cont i { font-size:calc(15px * var(--hub-fs, 1)); }
  .rz-cont.ghost { color:var(--accent); background:var(--accent-wash); }
  .rz-cont.ghost:hover { background:color-mix(in srgb, var(--accent) 20%, var(--panel)); }

  /* cross-app stage tracker */
  .track { display:flex; margin-top:20px; }
  .step { flex:1; display:flex; flex-direction:column; align-items:center; gap:9px; position:relative; min-width:0; }
  .step::before { content:""; position:absolute; top:12px; left:calc(-50% + 13px); width:calc(100% - 26px); height:2px; background:var(--hair-2); z-index:0; }
  .step:first-child::before { display:none; }
  .step .dot { width:26px; height:26px; border-radius:50%; display:grid; place-items:center; font-size:calc(13px * var(--hub-fs, 1)); z-index:1;
    background:var(--panel); border:2px solid var(--hair-2); color:var(--ink-3); }
  .step .dot i { font-size:calc(13px * var(--hub-fs, 1)); }
  .step .lbl { display:flex; flex-direction:column; align-items:center; gap:2px; }
  .step .lbl b { font-size:calc(11.5px * var(--hub-fs, 1)); font-weight:600; color:var(--ink-3); white-space:nowrap; }
  .step .lbl .owner { font-size:calc(9px * var(--hub-fs, 1)); font-family:var(--mono); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-3); opacity:.7; }
  .step.done .dot { background:var(--cold); border-color:transparent; color:#fff; }
  .step.done .lbl b { color:var(--ink); }
  .step.done::before { background:var(--cold); }
  .step.active .dot { border-color:var(--accent); color:var(--accent); box-shadow:0 0 0 4px var(--accent-ring); }
  .step.active .lbl b { color:var(--ink); }
  .step.active .lbl .owner { color:var(--accent); opacity:1; }
  .step.skip .dot { border:2px dashed var(--hair-2); background:var(--panel); color:var(--ink-3); }
  .step.skip .lbl b { color:var(--ink-3); opacity:.75; }
  .step.skip .lbl .owner { opacity:.4; }
  .step.skip::before { background:repeating-linear-gradient(90deg, var(--hair-2) 0 5px, transparent 5px 9px); }
  /* A stage the thread can PROVE is a place you can go (feature_hub_thread_track).
     Anchors here are still laid out as steps — .step already carries the flex
     sizing, so the element only gains its affordance, never a second geometry. */
  a.step.has-link { text-decoration:none; color:inherit; cursor:pointer; }
  a.step.has-link:hover .lbl b { color:var(--accent); }
  a.step.has-link:hover .dot { border-color:var(--accent); }
  a.step.has-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:8px; }

  /* legend */
  .rz-legend { display:flex; gap:16px; margin:-4px 0 14px; flex-wrap:wrap; }
  .rz-legend span { display:inline-flex; align-items:center; gap:6px; font-size:calc(11px * var(--hub-fs, 1)); color:var(--ink-3); font-weight:500; }
  .rz-legend .lg { width:12px; height:12px; border-radius:50%; border:2px solid var(--hair-2); background:var(--panel); }
  .rz-legend .lg.done { background:var(--cold); border-color:transparent; }
  .rz-legend .lg.active { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-ring); }
  .rz-legend .lg.skip { border-style:dashed; }

  /* carousel controls */
  .rz-ctl { display:flex; align-items:center; gap:9px; }
  .rz-arrow { width:30px; height:30px; border-radius:8px; border:1px solid var(--hair-2); background:var(--panel);
    display:grid; place-items:center; cursor:pointer; color:var(--ink-2); box-shadow:var(--sh-1);
    transition:color var(--dur), border-color var(--dur), transform var(--dur) var(--out); }
  .rz-arrow:hover { color:var(--ink); border-color:var(--ink-3); }
  .rz-arrow:active { transform:scale(.92); }
  .rz-arrow i { font-size:calc(16px * var(--hub-fs, 1)); }
  .rz-count { font-family:var(--mono); font-size:calc(12px * var(--hub-fs, 1)); font-weight:600; color:var(--ink-2); min-width:46px; text-align:center; }
  .rz-count b { color:var(--ink); }
  .rz-all { font-size:calc(12.5px * var(--hub-fs, 1)); font-weight:600; color:var(--accent); cursor:pointer; margin-left:8px; }
  .resume.carousel .rz-card { display:none; }
  .resume.carousel .rz-card.show { display:block; }
  .rz-empty { display:flex !important; align-items:center; gap:13px; }
  .rz-empty > i { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; font-size:calc(20px * var(--hub-fs, 1)); background:var(--pos-soft); color:var(--cold); flex:none; }
  .rz-empty b { display:block; font-size:calc(14px * var(--hub-fs, 1)); font-weight:600; }
  .rz-empty span { font-size:calc(12.5px * var(--hub-fs, 1)); color:var(--ink-3); }

  /* responsive */
  @media (max-width:760px) {
    .rz-card { padding:16px 18px 18px; }
    .rz-top { flex-wrap:wrap; gap:10px; }
    .rz-next { order:3; width:100%; text-align:left; }
    .track { flex-direction:column; gap:0; margin-top:16px; }
    .step { flex:none; flex-direction:row; align-items:center; justify-content:flex-start; gap:13px; height:46px; width:100%; min-width:0; }
    .step .dot { flex:none; }
    .step .lbl { flex-direction:row; align-items:baseline; gap:8px; min-width:0; }
    .step::before { top:-23px; left:12px; width:2px; height:46px; background:var(--hair-2); }
    .step:first-child::before { display:none; }
    .step.skip .lbl b { opacity:.6; }
  }
  @media (max-width:1080px) {
    .stats { grid-template-columns:1fr 1fr; }
    .hero { grid-column:span 2; grid-row:auto; }
    .alert { grid-column:span 2; }
    .cols { grid-template-columns:1fr; }
    .apps { grid-template-columns:1fr; }
  }
  @media (max-width:640px) {
    .hello { flex-direction:column; align-items:flex-start; }
    .stats { grid-template-columns:1fr; }
    .hero, .alert { grid-column:auto; }
    .rz-cont { width:100%; justify-content:center; }
  }
}

/* Chase overdue, opened in place (feature_hub_chase). js/books/chase-queue.js
   draws itself with Books' modal classes and --inv-* tokens; the hub has
   neither, so these are those, on plenum. Scoped to the queue's own overlay
   (#cqModal) — nothing else on the hub wears a .bk-* class.
   TOP LEVEL, not inside .hub-v2 above: the queue attaches its overlay to
   <body>, outside the page wrapper, so a nested rule would never match it. */
#cqModal.bk-overlay { position:fixed; inset:0; z-index:1200; display:flex; align-items:center; justify-content:center; padding:16px;
  background:rgba(8,10,14,.55);
  --inv-muted:var(--ink-3); --inv-border:var(--hair); --inv-input-bg:var(--panel-2); --ok-soft:var(--accent-2); --warn-soft:var(--amber); }
#cqModal .bk-modal { width:100%; max-width:640px; max-height:90vh; overflow-y:auto; padding:20px;
  background:var(--panel); color:var(--ink); border:1px solid var(--hair-2); border-radius:var(--r-lg); box-shadow:var(--sh-pop);
  font-size:calc(13px * var(--hub-fs, 1)); }
#cqModal .bk-modal h3 { display:flex; align-items:center; gap:8px; margin:0 0 16px; font-size:calc(16px * var(--hub-fs, 1)); font-weight:600; letter-spacing:var(--track-snug); }
#cqModal .bk-modal h3 i { color:var(--accent); }
#cqModal .bk-modal-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:18px; }
#cqModal .bk-right { display:flex; gap:8px; margin-left:auto; }
#cqModal .btn-ghost, #cqModal .btn-rowact { height:32px; padding:0 13px; border-radius:8px; border:1px solid var(--hair-2); background:var(--panel);
  color:var(--ink-2); font-family:inherit; font-size:calc(12.5px * var(--hub-fs, 1)); font-weight:600; cursor:pointer;
  transition:border-color var(--dur), background var(--dur); }
#cqModal .btn-ghost:hover, #cqModal .btn-rowact:hover { border-color:var(--accent); }
#cqModal .btn-rowact.primary { background:var(--ink); border-color:var(--ink); color:var(--paper); }
#cqModal .btn-rowact.primary:hover { opacity:.88; }
#cqModal .btn-rowact:disabled { opacity:.6; cursor:default; }

/* feature_motion_kit: the brand mark, held upright with an orbiting dashed
 * ring, next to "Loading your workspace…" — this app's own boot moment
 * (dashboard.js's boot() sets html.mk-on before renderChrome() clears
 * #subline[data-loading], which is what turns this off again). */
html.mk-on .hub-v2 .hello .sub[data-loading] .hub-mk-spin {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px;
}
html.mk-on .hub-v2 .hello .sub[data-loading] .hub-mk-spin img {
  width: 62%; height: 62%; object-fit: contain; border-radius: 3px; position: relative;
}
html.mk-on .hub-v2 .hello .sub[data-loading] .hub-mk-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  animation: hub-mk-spin-rot 1.6s linear infinite;
}
@keyframes hub-mk-spin-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html.mk-on .hub-v2 .hello .sub[data-loading] .hub-mk-ring { animation-duration: 6s; }
}

/* ── Phone attention rows (feature_office_polish → html.of-polish) ──────────
 * Stamped by hub/js/dashboard.js. On a phone the Chase / snooze / × trio took
 * ~60% of the row and the text truncated to "2 invoice…". Here the row's own
 * action drops under the text (aligned with it, not the icon) and snooze + ×
 * fold into a ⋯ menu that dashboard.js renders only under the flag. Above
 * 640px the ⋯ never shows and the row is exactly as before. Flag off: no
 * html.of-polish, no .attn-more-wrap in the markup — nothing here matches. */
html.of-polish .hub-v2 .attn-more-wrap { display: none; }
@media (max-width: 640px) {
  html.of-polish .hub-v2 .attn-wrap .panel:has(> #attnList) { overflow: visible; }
  html.of-polish .hub-v2 .attn-row:has(.attn-more-wrap) > .attn-x { display: none; }
  html.of-polish .hub-v2 .attn-main {
    display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 13px; row-gap: 8px;
    align-items: start; padding-right: 4px;
  }
  html.of-polish .hub-v2 .attn-tx b,
  html.of-polish .hub-v2 .attn-tx span { white-space: normal; overflow: visible; }
  html.of-polish .hub-v2 .attn-cta { grid-column: 2; justify-self: start; }
  html.of-polish .hub-v2 .attn-more-wrap { position: relative; display: flex; align-items: flex-start; flex: none; padding: 10px 6px 0 0; }
  /* The "which ones" chevron (feature_attention_actions) sits at the top of the
     row beside the ⋯, not floating at its middle; a row without one gives the
     width back. */
  html.of-polish .hub-v2 .attn-peek { align-self: flex-start; height: 44px; }
  html.of-polish .hub-v2 .attn-peek-gap { display: none; }
  html.of-polish .hub-v2 .attn-kebab {
    width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px;
    background: none; color: var(--ink-3); font-size: calc(18px * var(--hub-fs, 1)); cursor: pointer;
  }
  html.of-polish .hub-v2 .attn-kebab[aria-expanded="true"],
  html.of-polish .hub-v2 .attn-kebab:focus-visible { background: var(--panel-2); color: var(--ink); }
  /* Same surface as look-panel's snooze menu (.lk-snz), which opens off it. */
  html.of-polish .hub-v2 .attn-menu {
    position: absolute; right: 6px; top: 52px; z-index: 40; width: 180px; padding: 6px;
    display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--hair-2);
    border-radius: 12px; box-shadow: var(--sh-pop, var(--sh-2));
  }
  html.of-polish .hub-v2 .attn-menu[hidden] { display: none; }
  html.of-polish .hub-v2 .attn-menu button {
    display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 8px; border: 0;
    border-radius: 8px; background: none; color: var(--ink); font: 500 13px var(--font); text-align: left; cursor: pointer;
  }
  html.of-polish .hub-v2 .attn-menu button i { font-size: 16px; color: var(--ink-3); }
  html.of-polish .hub-v2 .attn-menu button:hover,
  html.of-polish .hub-v2 .attn-menu button:focus-visible { background: var(--panel-2); }
}
