/* DIE2HARD Studio 1.20 — Home: the work first.
   Same tokens as studio-ui.css (spacing 4/8/12/16/24/32, 44 px touch targets, cream / charcoal / orange).
   Loaded after studio-ui.css. Everything is scoped under #workspace .hm-page. */

#workspace .hm-page{max-width:1120px}
#workspace .hm-head{padding-top:var(--ui-2)}
#workspace .hm-headbar{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--ui-3) var(--ui-5);flex-wrap:wrap}
#workspace .hm-headbar>div:first-child{min-width:0;flex:1 1 280px}
#workspace .hm-head .p2-eyebrow{margin:0 0 var(--ui-1);font-size:13.5px;color:var(--ui-muted)}
#workspace .hm-head .p2-sub{margin-top:var(--ui-1)!important;font-size:14.5px;color:var(--ui-muted)}
#workspace .hm-body{padding-top:var(--ui-1)}

/* ---------- Right now: one card, and the reason it is first */
#workspace .hm-now{margin-top:var(--ui-4);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--ui-3) var(--ui-5);padding:var(--ui-4) var(--ui-5);background:var(--ui-surface);border:1px solid var(--ui-line);border-left:4px solid var(--ui-orange);border-radius:var(--ui-r)}
#workspace .hm-now.is-late{border-left-color:var(--ui-red)}
#workspace .hm-now-body{min-width:0}
#workspace .hm-kicker{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-1) var(--ui-2);margin:0 0 var(--ui-1)}
#workspace .hm-kicker>span:first-child{font:700 12px/1.2 var(--p2-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted)}
#workspace .hm-now h2{font-family:var(--p2-display);font-weight:700;font-size:clamp(22px,2.6vw,28px);line-height:1.08;color:var(--ui-ink);overflow-wrap:anywhere}
#workspace .hm-now-meta{margin-top:var(--ui-1)!important;font-size:14px;color:var(--ui-muted)}
#workspace .hm-now-actions{display:flex;flex-wrap:wrap;gap:var(--ui-2);justify-content:flex-end}
#workspace .hm-why{display:inline-flex;align-items:center;height:24px;padding:0 var(--ui-2);border-radius:999px;font:650 12.5px/1 var(--p2-sans);background:var(--ui-line-2);color:var(--ui-soft);white-space:nowrap}
#workspace .hm-why.is-late{background:#f4d6cd;color:#842a1b}
#workspace .hm-why.is-go{background:#fde3d3;color:#8f3306}
#workspace .hm-why.is-soon{background:#f1e6c8;color:#6a4d0a}

/* ---------- the two columns (one column below 1100 px) */
#workspace .hm-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0 var(--ui-6);align-items:start}
#workspace .hm-col{min-width:0}
#workspace .hm-sec{margin-top:var(--ui-5)}
#workspace .hm-sec-head{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-3);min-height:36px;margin-bottom:var(--ui-1)}
#workspace .hm-sec-head h2{font:700 17px/1.2 var(--p2-sans);color:var(--ui-ink)}
#workspace .hm-more{margin:var(--ui-2) 0 0;font-size:13px;color:var(--ui-muted)}

/* ---------- rows: one structure for tasks, decisions, projects and matters */
#workspace .hm-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--ui-line)}
#workspace .hm-row{display:flex;align-items:center;gap:var(--ui-2);border-bottom:1px solid var(--ui-line)}
#workspace .hm-main{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:var(--ui-3);width:auto;min-height:60px;padding:var(--ui-3) 0;margin:0;border:0;border-radius:0;background:none;color:var(--ui-ink);font:inherit;text-align:left;text-transform:none;letter-spacing:normal;box-shadow:none;transform:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
#workspace .hm-main>svg{flex:none;margin-left:auto;color:var(--ui-muted)}
#workspace .hm-main:focus-visible,#workspace .hm-quick:focus-visible{outline:2px solid var(--ui-orange);outline-offset:-2px;border-radius:8px}
#workspace .hm-text{flex:1 1 auto;min-width:0;display:grid;gap:3px}
#workspace .hm-text b{font:600 15.5px/1.3 var(--p2-sans);color:var(--ui-ink);overflow-wrap:anywhere}
#workspace .hm-text small{display:block;font:400 13.5px/1.45 var(--p2-sans);color:var(--ui-muted)}
@media (hover:hover){#workspace .hm-main:hover .hm-text b{color:var(--ui-orange-deep)}}
#workspace .hm-flag{color:var(--ui-red);font-weight:600}
#workspace .hm-task.is-late small{color:var(--ui-red)}
#workspace .hm-dot{flex:none;width:10px;height:10px;border-radius:50%;border:2px solid var(--ui-muted);box-sizing:border-box}
#workspace .hm-dot.is-in_progress{border-color:var(--ui-orange);background:var(--ui-orange)}
#workspace .hm-dot.is-blocked{border-color:var(--ui-red);background:var(--ui-red)}
#workspace .hm-quick{flex:none;min-height:40px;min-width:76px;padding:0 var(--ui-4);border-radius:999px;border:1.5px solid var(--ui-ink);background:transparent;color:var(--ui-ink);font:600 13.5px var(--p2-sans);text-transform:none;letter-spacing:normal;box-shadow:none;transform:none;cursor:pointer;white-space:nowrap}
#workspace .hm-quick:active{background:var(--ui-ink);color:var(--ui-paper)}
#workspace .hm-badge{display:inline-flex;align-items:center;height:22px;margin-right:var(--ui-2);padding:0 var(--ui-2);border-radius:999px;font:650 12px/1 var(--p2-sans);vertical-align:1px;background:var(--ui-line-2);color:var(--ui-soft);white-space:nowrap}
#workspace .hm-badge.is-changes_requested,#workspace .hm-badge.is-blocked{background:#f4d6cd;color:#842a1b}
#workspace .hm-badge.is-in_review{background:#fde3d3;color:#8f3306}
#workspace .hm-ver{font-style:normal;font-weight:500;color:var(--ui-muted)}
#workspace .hm-proj .hm-text .p2-track{margin-top:var(--ui-2);max-width:260px}
#workspace .hm-side{flex:none;display:flex;align-items:center;gap:var(--ui-3)}
#workspace .hm-due{font:600 13px var(--p2-sans);color:var(--ui-soft);white-space:nowrap}
#workspace .hm-due.is-late{color:var(--ui-red)}
#workspace .hm-matter .ag-cat{font-size:11.5px}

/* ---------- getting started: one line; the whole list lives in Help */
#workspace .hm-start{margin-top:var(--ui-5);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--ui-2) var(--ui-4);padding:var(--ui-3) var(--ui-4);border:1px solid var(--ui-line);border-radius:var(--ui-r);background:var(--ui-surface)}
#workspace .hm-start-text{display:grid;gap:2px;min-width:0}
#workspace .hm-start-text b{font:650 15px/1.3 var(--p2-sans)}
#workspace .hm-start-text small{font:400 13.5px/1.4 var(--p2-sans);color:var(--ui-muted)}
#workspace .hm-start-actions{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ui-1) var(--ui-2);justify-content:flex-end}
#workspace .hm-start .p2-track{grid-column:1/-1;margin:0}
#workspace .hm-page>.p2-body>.hm-start:first-child{margin-top:var(--ui-4)}

@media (min-width:1100px){
  #workspace .hm-grid:not(.is-one){grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
}
@media (max-width:760px){
  #workspace .hm-now{grid-template-columns:minmax(0,1fr);padding:var(--ui-4)}
  #workspace .hm-now-actions{justify-content:stretch}
  #workspace .hm-now-actions>*{flex:1 1 0}
  #workspace .hm-start{grid-template-columns:minmax(0,1fr)}
  #workspace .hm-start-actions{justify-content:flex-start}
}
@media (max-width:650px),(pointer:coarse) and (max-height:500px) and (max-width:1000px){
  #workspace .hm-ava{display:none}
  #workspace .hm-quick{min-height:var(--ui-touch)}
  #workspace .hm-headbar .ui-pair.is-one{grid-template-columns:minmax(0,1fr)}
  #workspace .hm-headbar .ui-actions{width:100%}
}

/* ---------- Overview · People in motion (1.20): a grid on a computer, a list on a phone, never a sideways scrollbar.
   It used to be one row that scrolled sideways, with a thick bar under it and half a card cut off at the edge. */
#workspace .v09-people-strip{display:grid!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))!important;gap:var(--ui-3)!important;overflow:visible!important;padding-bottom:0!important}
#workspace .v09-people-strip>.v09-person{min-height:0!important;min-width:0}
#workspace .v091-inline-link{margin-top:var(--ui-3)}
@media (max-width:650px),(pointer:coarse) and (max-height:500px) and (max-width:1000px){
  #workspace .v09-people-strip{grid-template-columns:minmax(0,1fr)!important;gap:0!important;border-top:1px solid var(--ui-line)}
  #workspace .v09-people-strip>.v09-person{padding:var(--ui-3) 0!important;border:0!important;border-bottom:1px solid var(--ui-line)!important;border-radius:0!important;background:none!important;box-shadow:none!important;min-height:0!important}
  #workspace .v09-people-strip .v09-person-foot{display:none!important}
}

/* ---------- Older pages: the same title scale as the new ones (they used 60–94 px titles that pushed the work off the screen) */
#workspace .workspace-top h1,#workspace .v09-space-head h1{font-size:clamp(26px,5.5vw,36px)!important;line-height:1.05!important;letter-spacing:-.005em!important;margin:6px 0 8px!important;max-width:none!important}
#workspace .workspace-top h1 em,#workspace .v09-space-head h1 em{font-style:normal}

/* ---------- Agency matters list (1.20): who owns it, when it is due, how far along, and two lines of what it is */
#workspace .ag-card .ag-brief{-webkit-line-clamp:2}
#workspace .ag-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--ui-1) var(--ui-3);margin-top:var(--ui-2)}
#workspace .ag-progress .p2-track{grid-column:1/-1;margin:0}
#workspace .ag-progress small{font:500 13px/1.3 var(--p2-sans);color:var(--ui-muted)}
#workspace .ag-card.is-done{opacity:.72}
#workspace .ag-filters{margin:var(--ui-3) 0 var(--ui-4)}
#workspace .ag-filters .ag-finished{margin-left:auto;border-color:transparent;background:none;color:var(--ui-soft);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
#workspace .ag-filters .ag-finished.on{background:var(--ui-line-2);color:var(--ui-ink);text-decoration:none}
#workspace .ag-about{margin-top:var(--ui-6)}
#workspace .ag-about .p2-hint{margin:0 0 var(--ui-3);max-width:60ch}
