/* Fieldnotes: calm, restrained, light. Color carries meaning, not decoration. */
/* Colours, type sizes, radii and spacing come from tokens.css (generated from platform/design/tokens.py). */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: var(--fs-body)/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-md); }
.tiny { font-size: var(--fs-sm); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-md); }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(220px, 19%) 1fr; min-height: 100vh; }
.shell.embed { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
/* In a desktop window the full sidebar gives way to a compact bar: brand, and a Menu button that unfolds the same navigation. */
.shell.embed .side { position: sticky; top: 0; z-index: 20; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
.shell.embed .side .brand { padding: 6px 14px; }
.shell.embed .side .brand-mark { width: 24px; height: 24px; font-size: var(--fs-md); }
.shell.embed .side .brand-name { font-size: var(--fs-base); }
.shell.embed .side .brand-co { display: none; }
.shell.embed .btn.nav-toggle { display: inline-flex; }
.shell.embed .side .nav, .shell.embed .side .account { display: none; }
.shell.embed .side.open .nav { display: flex; flex-wrap: wrap; gap: 2px; max-height: calc(100vh - 90px); overflow-y: auto; }
.shell.embed .side.open .account { display: block; }
.shell.embed .nav-group { width: 100%; padding: 8px 10px 2px; }
.shell.embed.one-app .btn.nav-toggle { display: none; }
/* An application in its own window has one bar under the window's title bar: its own pages on the left, the bell and
   the account on the right. The window's title bar already names the application, so the name is not repeated here. */
.shell.embed.one-app .side { display: flex; flex-direction: row; align-items: center; min-height: 40px; }
.shell.embed.one-app .side .brand { display: none; }
.shell.embed.one-app .side-top { margin-left: auto; flex: none; }
.shell.embed.one-app .side.has-menu .nav { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 2px; padding: 4px 10px; max-height: none; overflow: visible; }
.shell.embed.one-app .side .nav a { padding: 5px 10px; width: auto; }
.acct-mini { border: 0; background: none; padding: 2px; margin-right: 10px; border-radius: 50%; cursor: pointer; line-height: 0; }
.acct-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.shell.embed .main { padding: 18px 20px 40px; }
.shell.embed .page-head h1 { font-size: 24px; }
.btn.nav-toggle { display: none; margin-right: 16px; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side { background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--green); color: var(--on-accent); display: grid;
  place-items: center; font-weight: 700; font-size: 19px; flex: none; }
.brand-name { font-weight: 700; font-size: var(--fs-xl); line-height: 1.1; }
.brand-co { font-size: 10px; letter-spacing: .32em; color: var(--muted); text-transform: uppercase; margin-top: 3px;
  font-weight: 600; }
.nav { padding: 4px 12px 12px; flex: 1; }
.nav-group { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-btn); color: var(--text);
  font-size: var(--fs-body); font-weight: 450; text-decoration: none; }
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--sel); color: var(--green); font-weight: 550; }
.nav a .ic { color: var(--muted); }
.nav a.on .ic { color: var(--green); }
.nav .count { margin-left: auto; font-size: var(--fs-sm); font-weight: 600; background: var(--amber-bg); color: var(--amber);
  border-radius: var(--r-md); padding: 0 7px; line-height: 20px; }
.account { border-top: 1px solid var(--border); padding: 12px; }
.account button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0;
  background: none; border-radius: var(--r-btn); cursor: pointer; text-align: left; }
.account button:hover { background: var(--bg); }
.account .who { font-weight: 600; font-size: var(--fs-base); }
.account .ws { font-size: var(--fs-sm); color: var(--muted); }
.main { min-width: 0; padding: 32px 40px 80px; }
.main.wide { padding-left: 28px; padding-right: 28px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: var(--fs-body); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: var(--fs-md); color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--card);
  border-radius: var(--r-btn); padding: 7px 13px; font-size: var(--fs-base); font-weight: 550; cursor: pointer; white-space: nowrap;
  line-height: 1.3; }
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.btn.primary:hover { background: var(--green-hover); }
.btn.soft { background: var(--sel); border-color: transparent; color: var(--green); }
.btn.soft:hover { background: var(--sel-hover); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--gray-bg); }
.btn.sm { padding: 4px 9px; font-size: var(--fs-md); }
.btn.icon { padding: 5px; border-color: transparent; background: none; color: var(--muted); }
.btn.icon:hover { background: var(--gray-bg); color: var(--text); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  border: 1px solid var(--field-border); border-radius: var(--r-btn); padding: 7px 10px; background: var(--card); font-size: var(--fs-base);
  width: 100%; }
::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus);
  outline-offset: 2px; border-color: var(--green); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
label.field { display: block; }
label.field > span { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-bottom: 4px;
  letter-spacing: .02em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 12px; }
.card-head h2 { font-size: 19px; font-weight: 650; margin: 0; }
.card-head .desc { color: var(--muted); font-size: var(--fs-base); margin-top: 2px; }
.card-head .link { margin-left: auto; font-size: var(--fs-base); font-weight: 550; white-space: nowrap; }
.card-head .badge-count { font-size: var(--fs-sm); font-weight: 600; background: var(--gray-bg); color: var(--muted);
  border-radius: var(--r-md); padding: 1px 8px; }
.card-body { padding: 0 22px 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.metric { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.metric .mi { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; }
.metric .ml { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.metric .mv { font-size: 28px; font-weight: 700; line-height: 1.15; }
.metric .mv small { font-size: var(--fs-body); font-weight: 600; color: var(--muted); margin-left: 3px; }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-red { background: var(--red-bg); color: var(--red); }
/* minmax(0, ...) lets a column shrink below its longest title instead of pushing the page sideways. */
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; align-items: start; }
.cols > * { min-width: 0; }
.cols > div > .card + .card { margin-top: 20px; }
.empty { text-align: center; padding: 28px 16px 30px; }
.empty .ei { width: 48px; height: 48px; border-radius: 50%; background: var(--sel); color: var(--green); display: grid;
  place-items: center; margin: 0 auto 12px; }
.empty b { display: block; font-size: var(--fs-body); margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: var(--fs-base); margin: 0 0 10px; }

/* ---------- lists ---------- */
.rows > .r { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.rows > .r:first-child { border-top: 0; }
.rows > .r.click { cursor: pointer; }
.rows > .r.click:hover .t { color: var(--green); }
.r .t { font-weight: 600; font-size: var(--fs-body); line-height: 1.3; }
.r .s { font-size: var(--fs-md); color: var(--muted); margin-top: 1px; }
.circle { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--card);
  cursor: pointer; flex: none; display: grid; place-items: center; color: transparent; padding: 0; }
.circle:hover { border-color: var(--green); color: var(--green); }
.circle.done { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.circle.qa { border-color: var(--amber); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; border-radius: var(--r-sm);
  padding: 1px 7px; line-height: 19px; white-space: nowrap; background: var(--gray-bg); color: var(--muted); }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-orange { background: var(--hi-bg); color: var(--hi); }
.b-done { background: var(--green); color: var(--on-accent); }
.b-outline { background: none; border: 1px solid var(--border-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--border-strong); }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.red { background: var(--red); }
.dot.blue { background: var(--blue); } .dot.orange { background: var(--hi); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-xs);
  font-weight: 650; background: var(--sel); color: var(--green); flex: none; letter-spacing: .02em; border: 1.5px solid var(--card); }
.avatar.lg { width: 34px; height: 34px; font-size: var(--fs-md); }
.avatar.inh { background: var(--card); border: 1.5px dashed var(--border-strong); color: var(--muted); }
.avatar.none { background: var(--card); border: 1.5px dashed var(--field-border); color: var(--muted); }
.avatar.c1 { background: var(--av1-bg); color: var(--av1); } .avatar.c2 { background: var(--av2-bg); color: var(--av2); }
.avatar.c3 { background: var(--av3-bg); color: var(--av3); } .avatar.c4 { background: var(--av4-bg); color: var(--av4); }
.avatar.c5 { background: var(--av5-bg); color: var(--av5); } .avatar.c6 { background: var(--av6-bg); color: var(--av6); }
.progress { height: 6px; border-radius: var(--r-xs); background: var(--gray-bg); overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }
.progress .p-done { background: var(--green); }
.progress .p-qa { background: var(--p-qa); }
.progress .p-impl { background: var(--p-impl); }
.legend { display: flex; gap: 12px; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px;
  vertical-align: 0; }
.legend .l-done::before { background: var(--green); } .legend .l-qa::before { background: var(--p-qa); }
.legend .l-impl::before { background: var(--p-impl); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 13px; font-size: var(--fs-base); font-weight: 550; color: var(--muted); border: 0; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .on { color: var(--green); border-bottom-color: var(--green); }
.tabs .n { font-size: var(--fs-xs); background: var(--gray-bg); border-radius: var(--r-btn); padding: 0 6px; margin-left: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 3px 11px; font-size: var(--fs-md);
  cursor: pointer; color: var(--muted); font-weight: 500; }
.chip.on { background: var(--sel); border-color: var(--sel); color: var(--green); }

/* ---------- project tree (the workbench) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar input[type=search] { width: 220px; padding: 5px 10px; }
.tree { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow);
  overflow: auto; outline: none; }
.tr { display: grid; grid-template-columns: 30px minmax(260px, 1fr) 128px 120px 30px 30px 30px 86px 96px 56px 30px;
  align-items: center; min-height: 36px; border-top: 1px solid var(--line-soft); font-size: var(--fs-base); min-width: 900px; }
.tr.head { position: sticky; top: 0; background: var(--surface-2); z-index: 2; border-top: 0; border-bottom: 1px solid var(--border);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-height: 32px; }
.tr.head > div { padding: 0 6px; }
.tr:first-child + .tr { border-top: 0; }
.tr > div { padding: 0 4px; min-width: 0; }
.tr.focus { background: var(--row-focus); box-shadow: inset 2px 0 0 var(--green); }
.tr.sel { background: var(--row-sel); }
.tr.k-milestone .tt { font-weight: 650; }
.tr.k-milestone { background: var(--surface-2); }
.tr.done .tt { color: var(--muted); }
.tr.waived .tt { text-decoration: line-through; color: var(--muted); }
.tr.drop-before { box-shadow: inset 0 2px 0 var(--green); }
.tr.drop-after { box-shadow: inset 0 -2px 0 var(--green); }
.tr.drop-into { background: var(--sel); }
.tr.dragging { opacity: .45; }
.tcell { display: flex; align-items: center; gap: 5px; min-width: 0; height: 36px; }
.chev { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; cursor: pointer;
  color: var(--muted); padding: 0; border-radius: var(--r-xs); flex: none; }
.chev:hover { background: var(--gray-bg); color: var(--text); }
.chev svg { transition: transform .12s; }
.chev.open svg { transform: rotate(90deg); }
.chev.leaf { visibility: hidden; }
.kind-ic { color: var(--muted); flex: none; display: inline-flex; }
.k-milestone .kind-ic { color: var(--green); }
.tt { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text;
  padding: 2px 4px; border-radius: var(--r-xs); }
.tt:hover { background: var(--gray-bg); }
.tt.ph { color: var(--muted); font-style: italic; }
.ind { display: inline-flex; gap: 4px; align-items: center; flex: none; }
.ind .badge { font-size: var(--fs-xs); padding: 0 5px; line-height: 17px; }
.title-input { border: 1px solid var(--green) !important; padding: 3px 6px !important; font-size: var(--fs-base) !important;
  border-radius: var(--r-sm) !important; }
.cellbtn { border: 0; background: none; padding: 3px 4px; border-radius: var(--r-sm); cursor: pointer; display: inline-flex;
  align-items: center; gap: 4px; max-width: 100%; font-size: var(--fs-md); color: var(--text); }
.cellbtn:hover { background: var(--gray-bg); }
.cellbtn.empty-val { color: var(--muted); }
.cellbtn:disabled { cursor: default; opacity: 1; }
.cellbtn:disabled:hover { background: none; }
.mini-roll { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.mini-roll .progress { width: 58px; height: 5px; flex: none; }
.due-over { color: var(--red); font-weight: 550; }
.due-soon { color: var(--amber); font-weight: 550; }
.draft-row input { border: 1px dashed var(--green) !important; background: var(--surface-2) !important; }
.bulkbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--toast);
  color: var(--toast-ink); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: 10px; flex-wrap: wrap; box-shadow: var(--shadow-pop); }
.bulkbar .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: var(--toast-ink); }
.bulkbar .btn:hover { background: rgba(255,255,255,.16); }
.proj-strip { display: flex; gap: 22px; align-items: center; padding: 12px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.proj-strip .k { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.proj-strip .v { font-size: var(--fs-lg); font-weight: 700; }
.kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-sm); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: var(--r-xs); padding: 0 5px; background: var(--card); color: var(--text); }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--fs-base); align-items: center; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.tbl th { text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.tbl th.sort { cursor: pointer; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto;
  padding-bottom: 10px; }
.bcol { background: var(--col-bg); border-radius: var(--r-card); padding: 10px; min-height: 200px; }
.bcol.over { background: var(--sel); }
.bcol h3 { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 2px 4px 10px; display: flex; gap: 6px; align-items: center; }
.bcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; box-shadow: var(--shadow); }
.bcard:hover { border-color: var(--border-strong); }
.bcard .t { font-weight: 600; font-size: var(--fs-base); }
.bcard .s { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }

/* ---------- calendar / timeline ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  background: var(--card); border-radius: var(--r-card); overflow: hidden; }
.cal .dow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm); }
.cal .day.other { background: var(--surface-2); color: var(--border-strong); }
.cal .day.today .dn { background: var(--green); color: var(--on-accent); border-radius: var(--r-md); padding: 0 6px; }
.cal .dn { font-weight: 600; display: inline-block; margin-bottom: 4px; }
.cal .ev { display: block; border-radius: var(--r-sm); padding: 2px 6px; margin-bottom: 3px; background: var(--sel); color: var(--text);
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.over { background: var(--red-bg); color: var(--red); }
.cal .ev.done { background: var(--gray-bg); color: var(--muted); text-decoration: line-through; }
.tl { display: grid; grid-template-columns: 280px 1fr; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden; }
.tl-left { border-right: 1px solid var(--border); }
.tl-right { overflow-x: auto; position: relative; }
.tl-row { height: 32px; display: flex; align-items: center; font-size: var(--fs-md); border-bottom: 1px solid var(--line-soft);
  white-space: nowrap; overflow: hidden; padding-right: 8px; }
.tl-head { height: 40px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-xs); color: var(--muted);
  position: relative; }
.tl-bar { position: absolute; height: 16px; border-radius: var(--r-sm); background: var(--bar); cursor: pointer; }
.tl-bar.done { background: var(--green); }
.tl-bar.qa { background: var(--bar-qa); }
.tl-bar.blocked { background: var(--bar-blocked); }
.tl-bar.ms { width: 14px !important; height: 14px; transform: rotate(45deg); border-radius: 2px; background: var(--green); }

/* ---------- drawer / modal / popover / toast ---------- */
.drawer-back { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--card); z-index: 41;
  box-shadow: var(--shadow-pop); display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.drawer-head { padding: 16px 20px 0; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 21px; font-weight: 700; margin: 4px 0 8px; line-height: 1.25; cursor: text; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
.drawer .tabs { margin-bottom: 0; border-bottom: 0; }
.statusline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.section-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  margin: 22px 0 8px; }
.section-title:first-child { margin-top: 0; }
.roles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.role { border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 11px; cursor: pointer; background: var(--card);
  text-align: left; }
.role:hover { border-color: var(--border-strong); }
.role { min-width: 0; max-width: 100%; }
.role .rv { min-width: 0; }
.role .rv > .ellipsis { min-width: 0; flex: 0 1 auto; }
.role .rl { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.role .rv { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-weight: 550; font-size: var(--fs-base); }
.role .inh { font-size: var(--fs-sm); color: var(--muted); font-weight: 400; }
.note-box { border-radius: var(--r-md); padding: 11px 13px; font-size: var(--fs-base); }
.note-box.warn { background: var(--hi-bg); color: var(--warn-ink); }
.note-box.bad { background: var(--red-bg); color: var(--bad-ink); }
.note-box.ok { background: var(--green-bg); color: var(--ok-ink); }
.note-box.info { background: var(--blue-bg); color: var(--info-ink); }
.note-box ul { margin: 6px 0 0; padding-left: 18px; }
.crit { border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 8px; }
.crit .ch { display: flex; gap: 8px; align-items: flex-start; }
.crit .cd { font-weight: 600; font-size: var(--fs-base); flex: 1; }
.crit .meta { font-size: var(--fs-md); color: var(--muted); margin-top: 3px; }
.vstat { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; flex: none; }
.vstat button { border: 0; background: var(--card); padding: 3px 8px; font-size: var(--fs-sm); cursor: pointer; color: var(--muted);
  border-left: 1px solid var(--border); }
.vstat button:first-child { border-left: 0; }
.vstat button.on.passed { background: var(--green); color: var(--on-accent); }
.vstat button.on.failed { background: var(--red); color: var(--on-accent); }
.vstat button.on.na { background: var(--gray-bg); color: var(--text); }
.vstat button.on.waived { background: var(--amber-bg); color: var(--amber); }
.vstat button.on.not_tested { background: var(--gray-bg); color: var(--text); }
.attempt { border-left: 3px solid var(--border); padding: 6px 0 6px 12px; margin-bottom: 14px; }
.attempt.passed { border-left-color: var(--green); }
.attempt.failed { border-left-color: var(--red); }
.attempt.pending { border-left-color: var(--amber); }
.act { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-md); }
.act:first-child { border-top: 0; }
.act .when { color: var(--muted); white-space: nowrap; margin-left: auto; padding-left: 10px; }
.comment { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.comment .who { font-weight: 600; font-size: var(--fs-md); }
.comment .body { white-space: pre-wrap; font-size: var(--fs-base); margin-top: 2px; }
.modal-back { position: fixed; inset: 0; background: var(--scrim-strong); z-index: 60; display: grid; place-items: start center;
  padding: 8vh 16px 16px; overflow-y: auto; }
.modal { background: var(--card); border-radius: var(--r-lg); width: min(560px, 100%); box-shadow: var(--shadow-pop); }
.modal.wide { width: min(820px, 100%); }
.modal-head { padding: 18px 22px 6px; font-size: 19px; font-weight: 700; }
.modal-body { padding: 10px 22px 6px; }
.modal-foot { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.pop { position: fixed; z-index: 70; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: 6px; min-width: 200px; max-height: 340px; overflow-y: auto; }
.pop .opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm); cursor: pointer;
  font-size: var(--fs-base); border: 0; background: none; width: 100%; text-align: left; }
.pop .opt:hover, .pop .opt.hl { background: var(--bg); }
.pop .opt.cur { color: var(--green); font-weight: 600; }
.pop .sep { height: 1px; background: var(--border); margin: 5px 0; }
.pop .hint { font-size: var(--fs-sm); color: var(--muted); padding: 5px 9px; }
.pop input[type=search], .pop input[type=text] { margin-bottom: 4px; }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px;
  max-width: min(440px, calc(100vw - 36px)); }
.toast { background: var(--toast); color: var(--toast-ink); border-radius: var(--r-md); padding: 11px 14px; font-size: var(--fs-base);
  box-shadow: var(--shadow-pop); }
.toast.err { background: var(--toast-err); }
.toast ul { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-md); }
.timerbar { display: flex; align-items: center; gap: 10px; background: var(--amber-bg); color: var(--amber-ink); border-radius: var(--r-md);
  padding: 8px 14px; margin-bottom: 18px; font-size: var(--fs-base); }
.stepper { display: flex; flex-wrap: wrap; gap: 4px; }
.step { font-size: var(--fs-sm); padding: 4px 9px; border-radius: var(--r-lg); background: var(--gray-bg); color: var(--muted);
  border: 0; cursor: pointer; }
.step.past { background: var(--sel); color: var(--green); }
.step.cur { background: var(--green); color: var(--on-accent); font-weight: 600; }
.report-sec { border-top: 1px solid var(--border); padding: 12px 0; }
.report-sec:first-child { border-top: 0; }
.report-sec .rh { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.report-sec ul { margin: 6px 0 0; padding-left: 26px; font-size: var(--fs-base); }
.report-sec li { margin: 3px 0; }
.report-sec li a { cursor: pointer; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(400px, 100%); padding: 28px; }
pre.report { white-space: pre-wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px;
  font-size: var(--fs-md); line-height: 1.5; }

/* ---------- welcome ---------- */
.welcome { display: grid; gap: 0; padding-top: 6px; padding-bottom: 6px; }
.welcome-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); }
.welcome-step:first-child { border-top: 0; }
.ws-n { width: 28px; height: 28px; border-radius: 50%; background: var(--sel); color: var(--green); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-md); flex: none; }
.ws-t { font-weight: 650; font-size: var(--fs-body); }
.ws-b { color: var(--muted); font-size: var(--fs-base); margin-top: 2px; max-width: 64ch; }
.welcome-step > .btn, .welcome-step > .badge { flex: none; margin-top: 2px; }

/* ---------- help ---------- */
.help-search { margin-bottom: 16px; min-width: 220px; }
.help-search input { max-width: 420px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; color: var(--text); text-decoration: none; }
.help-card:hover { border-color: var(--border-strong); text-decoration: none; }
.help-card:hover .t { color: var(--green); }
.help-card .mi { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; }
.help-card .t { font-weight: 650; font-size: 16px; }
.help-card .s { color: var(--muted); font-size: var(--fs-base); margin-top: 2px; }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.help-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; font-size: var(--fs-base); }
.help-toc a { display: block; padding: 4px 8px; border-radius: var(--r-sm); color: var(--text); }
.help-toc a:hover { background: var(--gray-bg); text-decoration: none; }
.help-toc a.sub { padding-left: 20px; color: var(--muted); font-size: var(--fs-md); }
.doc { max-width: 780px; line-height: 1.6; }
.doc h1 { font-size: 30px; margin: 0 0 12px; line-height: 1.2; }
.doc h2 { font-size: 22px; margin: 32px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); line-height: 1.25; }
.doc h3 { font-size: var(--fs-lg); margin: 24px 0 8px; }
.doc h4 { font-size: var(--fs-body); margin: 18px 0 6px; color: var(--muted); }
.doc h1 + p { font-size: 16px; color: var(--muted); }
.doc h2, .doc h3 { scroll-margin-top: 16px; }
.doc .flash { background: var(--sel); border-radius: var(--r-sm); transition: background 1.5s; }
.doc p { margin: 0 0 12px; }
.doc-fig { margin: 16px 0 22px; }
.doc-fig a { display: block; }
.doc-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md, 8px); background: #fff; }
.doc-fig.narrow img { max-width: min(100%, 300px); }
.doc-fig figcaption { margin-top: 8px; font-size: var(--fs-md); color: var(--muted); line-height: 1.45; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 24px; }
.doc li { margin: 4px 0; }
.doc li > ul, .doc li > ol { margin: 4px 0 0; }
.doc li.task-item { list-style: none; margin-left: -20px; }
.doc li.task-item input { accent-color: var(--green); vertical-align: -2px; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-md); background: var(--gray-bg);
  border-radius: var(--r-xs); padding: 1px 5px; }
.doc pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 12px 14px; overflow-x: auto;
  margin: 0 0 14px; }
.doc pre code { background: none; padding: 0; font-size: var(--fs-md); line-height: 1.5; }
.doc .tbl-wrap { margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--r-btn); }
.doc .tbl td { vertical-align: top; }
.doc-note { margin: 0 0 14px; }
.doc-note p { margin: 0; }
.doc-note p + p { margin-top: 8px; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* Narrow window (phone, or a snapped half/quarter on the desktop): the menu folds behind a Menu button. */
  .side { position: sticky; top: 0; z-index: 20; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .side .brand { padding: 10px 16px; }
  .side .brand-mark { width: 30px; height: 30px; font-size: var(--fs-body); }
  .side .brand-name { font-size: var(--fs-lg); }
  .btn.nav-toggle { display: inline-flex; }
  .side .nav, .side .account { display: none; }
  .side.open .nav { display: flex; flex-wrap: wrap; gap: 2px; max-height: calc(100vh - 120px); overflow-y: auto; }
  .side.open .account { display: block; }
  .nav-group { width: 100%; padding: 8px 10px 2px; }
  .main { padding: 20px 16px 60px; }
  .grid2, .grid3, .roles { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: 1fr; }
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; max-height: none; }
}

/* ---- Time: timer, weekly timesheet, reports ---- */
.nav .tpill { margin-left: auto; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--amber-ink);
  background: var(--amber-bg); border-radius: var(--r-md); padding: 1px 8px; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; margin-bottom: 16px; }
.tcard.running { flex-direction: row; align-items: center; gap: 14px; background: var(--amber-bg); color: var(--amber-ink); border-color: transparent; }
.tcard.running .muted { color: inherit; opacity: .75; }
.tcard.running { flex-wrap: wrap; }
.tcard.running > .grow { flex: 1 1 150px; min-width: 150px; }      /* on a phone the clock and buttons drop below the task name instead of crushing it */
.trow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.trow .tnote { flex: 3 1 240px; font-size: 16px; padding: 9px 12px; }
.trow .tpick { flex: 2 1 200px; min-width: 0; }
.trow .tact { flex: 1 1 150px; }
.trow .tact select { width: 100%; }
.trecent { gap: 6px; }
.trecent .chip { display: inline-flex; align-items: center; gap: 2px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tclock { font-size: var(--fs-2xl); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tdot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex: none; animation: tpulse 1.6s ease-in-out infinite; }
.tdot.sm { width: 8px; height: 8px; }
@keyframes tpulse { 50% { opacity: .35; } }
.btn.chooser { width: 100%; justify-content: flex-start; gap: 8px; min-width: 0; }
.btn.chooser .grow { text-align: left; }
.btn.chooser .btn.icon { padding: 2px; margin: -2px -4px -2px 0; }
.weeknav b { min-width: 150px; text-align: center; }
.tstatus { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); }
.tstatus.ok { background: var(--green-bg); border-color: transparent; color: var(--ok-ink); }
.tstatus.info { background: var(--blue-bg); border-color: transparent; color: var(--info-ink); }
.tsgrid { font-variant-numeric: tabular-nums; }
.tsgrid th.num, .tsgrid td.num { width: 64px; text-align: right; }
.tsgrid th small { display: block; font-size: var(--fs-body); font-weight: 600; letter-spacing: 0; color: var(--text); text-transform: none; }
.tsgrid .today { background: var(--row-sel); }
.tsgrid .zero { color: var(--muted); }
.tsgrid td:first-child { max-width: 320px; }
.tsgrid tfoot td { border-top: 1px solid var(--border-strong); font-weight: 600; }
.tsfoot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.dayhead { display: flex; justify-content: space-between; padding: 12px 16px 4px; font-size: var(--fs-base); }
.chip.retired { opacity: .55; text-decoration: line-through; }
.rtabs { margin: -6px 0 18px; }
.rgrid { gap: 16px; align-items: start; }
.breakdown .barcol { width: 32%; min-width: 90px; }
.hbar { height: 10px; background: var(--line-soft); border-radius: 0 4px 4px 0; }
.hbar span { display: block; height: 100%; background: var(--green); border-radius: 0 4px 4px 0; }
.over { color: var(--red); font-weight: 600; }
.wchart { position: relative; }
.wchart .cols { display: flex; align-items: stretch; gap: 2px; height: 180px; border-bottom: 1px solid var(--border-strong); }
.wchart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; outline: none; position: relative; cursor: default; }
.wchart .cstack { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 3px; }
.wchart .cbar { width: 100%; max-width: 44px; background: var(--green); border-radius: 4px 4px 0 0; min-height: 0; }
.wchart .col:hover .cbar, .wchart .col:focus .cbar { background: var(--green-hover); }
.wchart .cval { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; white-space: nowrap; }
.wchart .clab { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: var(--fs-xs); color: var(--muted); padding-top: 6px; white-space: nowrap; overflow: hidden; }
.wchart { padding-bottom: 24px; }
.wchart .ctip { position: absolute; top: 0; width: 140px; background: var(--toast); color: var(--toast-ink); border-radius: var(--r-btn); padding: 7px 10px;
  font-size: var(--fs-md); pointer-events: none; box-shadow: var(--shadow-pop); }
.printonly { display: none; }
@media (max-width: 760px) { .rgrid { grid-template-columns: 1fr; } .tclock { font-size: var(--fs-xl); } .wchart .clab { font-size: 9px; } }
@media print {
  .side, .page-head .btn, .tcard, .weeknav, .tstatus .btn, .addtime, .noprint, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0 !important; }
  .printonly { display: flex; }
  .card { box-shadow: none; break-inside: avoid; }
  .tsgrid .today { background: none; }
}

/* loading bar, busy buttons, keyboard focus on clickable rows */
.busybar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; opacity: 0; overflow: hidden; }
.busybar.on { opacity: 1; }
.busybar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--green); }
.busybar.on::before { animation: busyslide 1.1s ease-in-out infinite; }
@keyframes busyslide { to { left: 100%; } }
.btn.busy { cursor: progress; }
.click:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.toast { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .busybar.on::before { animation: none; left: 0; width: 100%; opacity: .6; } }

/* motion: people who ask their device for less movement get none */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* real links inside rows look like the row text until hovered or focused */
a.rowlink { color: inherit; text-decoration: none; }
a.rowlink:hover { text-decoration: underline; text-decoration-color: var(--muted); }
.btn.busy { opacity: .7; }
/* phone widths: a long button label wraps instead of pushing the page sideways */
@media (max-width: 760px) { .btn { max-width: 100%; white-space: normal; text-align: left; } }

/* the running timer, across the top of every page */
.maincol { min-width: 0; }
.tstrip { position: sticky; top: 0; z-index: 15; background: var(--green-bg); border-bottom: 1px solid var(--border-strong); color: var(--text); }
.tstrip.long { background: var(--hi-bg); }
.tstrip.paused { background: var(--gray-bg); }
.tstrip-in { display: flex; align-items: center; gap: 10px; padding: 7px 20px; font-size: var(--fs-base); flex-wrap: wrap; }
.tstrip-clock { font-variant-numeric: tabular-nums; }
.tstrip .tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.tstrip.long .tdot { background: var(--hi); }
.toast .toast-act { margin-left: 10px; background: var(--card); color: var(--text); }
.monthgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(48px, .7fr); gap: 4px; }
.mg-h { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; }
.mg-d { min-height: 54px; border: 1px solid var(--border); border-radius: var(--r-btn); padding: 5px 7px; display: flex; flex-direction: column; justify-content: space-between;
  color: inherit; text-decoration: none; background: var(--card); }
.mg-d.out { border-color: transparent; background: none; }
.mg-d.has { background: var(--green-bg); }
.mg-d.today { border-color: var(--green); }
.mg-d .mg-n { font-size: var(--fs-sm); color: var(--muted); }
.mg-w { display: flex; align-items: center; justify-content: flex-end; font-weight: 600; padding-right: 6px; }
@media print { .tstrip { display: none !important; } }

/* ---- Hub: bell, notifications, The Junction (whole business), The Water Cooler ---- */
.side-tools { display: flex; align-items: center; gap: 4px; padding-right: 14px; flex: none; }
.side-top .brand { flex: 1 1 auto; min-width: 0; padding-right: 4px; }
.side-top .brand > div:last-child { min-width: 0; }
.dash-wide { margin-bottom: 20px; }
.cols.even .rows > .r { flex-wrap: wrap; row-gap: 6px; }
.cols.even .rows > .r > .grow { flex: 1 1 240px; }
.cols.even .rows > .r > .row { flex-wrap: wrap; }
.btn.bell { position: relative; color: var(--text); padding: 7px; }
.bell-n { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red);
  color: var(--card); font-size: var(--fs-xs); font-weight: 700; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums; }
.tone-gray { background: var(--gray-bg); color: var(--muted); }
.pop:has(.nt-panel) { padding: 0; }
.nt-panel { width: min(400px, calc(100vw - 16px)); }
.nt-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: var(--fs-body); }
.nt-foot { padding: 9px 12px; border-top: 1px solid var(--border); font-size: var(--fs-base); text-align: center; }
.nt-list { max-height: min(60vh, 460px); overflow-y: auto; }
.nt-list.page { max-height: none; overflow: visible; }
.nt-pad { padding: 14px 12px; margin: 0; }
.nt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line-soft); }
.nt-list > .nt:first-child, .nt-list > .nt-row:first-child, .nt-list > .nt-row:first-child .nt { border-top: 0; }
.nt:hover { background: var(--row-hover); }
.nt:focus-visible { outline-offset: -2px; }
.nt-i { width: 30px; height: 30px; border-radius: var(--r-btn); display: grid; place-items: center; flex: none; }
.nt-t { display: block; font-size: var(--fs-base); line-height: 1.35; overflow-wrap: anywhere; }
.nt.unread .nt-t { font-weight: 650; }
.nt-s { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.nt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; margin-top: 6px; position: relative; }
.nt-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line-soft); }
.nt-row .nt { flex: 1 1 auto; min-width: 0; border-top: 0; padding-left: 0; }
.nt-row .btn { flex: none; }
.card > .card-body:first-child { padding-top: 18px; }
.cols.wide-first { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.jn > .card { margin-bottom: 20px; }
.cooler-strip { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.cooler-strip .cs-t { font-weight: 650; }
.cooler-strip .link { font-size: var(--fs-base); font-weight: 550; white-space: nowrap; }
.seg { display: inline-flex; gap: 2px; }
.metrics.dash { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric.tile { text-decoration: none; color: var(--text); padding: 14px 16px; }
.metric.tile:hover { border-color: var(--border-strong); }
.metric.tile .mv { font-size: 24px; }
.metric.tile .mv small { font-size: var(--fs-sm); }
.metric.tile .ml { letter-spacing: .08em; }
.tstats { gap: 28px; margin-bottom: 12px; }
.tstats .ml { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tstats b { font-size: var(--fs-lg); }
.tbl th.pcell { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); font-weight: 550; color: var(--text); padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tbl tr:last-child th.pcell { border-bottom: 0; }
.ann { margin-bottom: 16px; }
.ann.hl { border-color: var(--green); }
.ann.gone { opacity: .75; }
.ann-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-body); line-height: 1.5; }
.card[tabindex="-1"]:focus { outline: none; }
@media (max-width: 1100px) {
  .cols.wide-first, .cols.even { grid-template-columns: 1fr; }
  .metrics.dash { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .metrics.dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.tile { padding: 10px 12px; gap: 10px; }
  .metric.tile .mi { width: 34px; height: 34px; }
  .nt-row { flex-wrap: wrap; }
  .cooler-strip { flex-wrap: wrap; }
  .cols.even .rows > .r { flex-wrap: wrap; row-gap: 6px; }
  .cols.even .rows > .r > .grow { flex-basis: 100%; }
  .cols.even .rows > .r > .row { flex-wrap: wrap; }
  .page-head select { max-width: 100%; }
}

/* ---- conversations (talk.js) */
.composer textarea { width: 100%; }
.composer > .row { margin-top: 8px; }
.composer .picked { overflow-wrap: anywhere; }
.thread { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.thread.done { background: none; }
.msg { padding: 2px 0 6px; border-radius: var(--r-sm); scroll-margin: 80px; }
.msg:focus { outline: none; }
.msg.flash { box-shadow: 0 0 0 2px var(--green); background: var(--sel); padding-left: 6px; padding-right: 6px; }
.msg-head { gap: 6px; flex-wrap: wrap; min-height: 28px; }
.msg .who { font-weight: 600; font-size: var(--fs-md); }
.msg .when { text-decoration: none; }
.msg .when:hover, .msg .when:focus-visible { text-decoration: underline; }
.msg .body, .ver .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-base); margin-top: 2px; line-height: 1.45; }
.msg .mention { color: var(--blue); background: var(--blue-bg); border-radius: 4px; padding: 0 3px; font-weight: 550; }
.msg .mention.me { color: var(--green); background: var(--sel); }
.msg .ref { font-weight: 550; }
.msg-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.msg-files .chip { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--text); max-width: 100%; overflow-wrap: anywhere; }
.replies { margin: 4px 0 0 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.replies .msg + .msg { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.thread-foot { margin-top: 6px; gap: 6px; }
.thread-done { margin-top: 12px; }
.thread-done > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-md); padding: 6px 0; }
.thread-done[open] > summary { margin-bottom: 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-family: inherit; }
.btn.icon.sm-ic { padding: 3px; }
.ver { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.talk-list .talk-t { display: block; color: var(--text); text-decoration: none; font-weight: 550; overflow-wrap: anywhere; }
.talk-list .talk-t:hover, .talk-list .talk-t:focus-visible { color: var(--green); text-decoration: underline; }
@media (max-width: 760px) {
  .replies { margin-left: 4px; padding-left: 8px; }
  .talk-list > .r { flex-wrap: wrap; }
}

/* ---- sign in with Files */
.sso-box { margin-bottom: 18px; }
.sso-btn { width: 100%; justify-content: center; text-decoration: none; }
.sso-box p { margin: 8px 0 0; }
.login .note-box { margin-bottom: 14px; }
.login .section-title { margin-bottom: 10px; }

/* Work linked to Files (links.js) */
.lk-panel { margin-top: 6px; }
.lk-add { display: flex; gap: 8px; flex-wrap: wrap; }
.lk-add input { flex: 1 1 220px; min-width: 0; }
.rows > .r.lk { align-items: flex-start; }
.rows > .r.lk .grow { min-width: 0; overflow-wrap: anywhere; }
.rows > .r.lk.gone .grow > a { text-decoration: line-through; }
.lk-acts { display: flex; gap: 4px; flex: none; }
.lk-more { margin-top: 8px; }
.lk-hist { margin: 0; padding-left: 18px; font-size: var(--fs-md); }
.lk-hist li { margin: 2px 0; overflow-wrap: anywhere; }
.lk-crumbs { font-size: var(--fs-md); overflow-wrap: anywhere; }
.lk-browse .rows > .r { padding: 8px 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.linklike:hover { text-decoration: underline; }
@media (max-width: 560px) { .rows > .r.lk { flex-wrap: wrap; } .lk-acts { margin-left: 28px; } }
.lk-talk { border-left: 2px solid var(--border-strong); padding-left: 10px; }
.lk-versions { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.lk-msgs { list-style: none; margin: 0 0 8px; padding: 0; max-height: 320px; overflow-y: auto; }
.lk-msgs li { margin: 0 0 8px; }
.lk-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-md); }
.lk-say { display: flex; gap: 6px; align-items: flex-end; }
.lk-say textarea { flex: 1; min-width: 0; resize: vertical; }
.lk-take { margin-left: 8px; }

/* Search (Ctrl+K), favourites, shortcut list */
.nav-find { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--card); color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.nav-find:hover, .nav-find:focus-visible { color: var(--text); border-color: var(--border-strong); }
.nav-find kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-sm); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0 5px; }
.find-back { position: fixed; inset: 0; background: var(--scrim-strong); z-index: 70; display: grid; place-items: start center; padding: 9vh 16px 16px; }
.find { background: var(--card); border-radius: var(--r-lg); width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); overflow: hidden; }
.find-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--muted); }
.find-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-lg); padding: 6px 0; }
.find-list { overflow-y: auto; padding: 6px; flex: 1; }
.find-group { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 9px 4px; }
.find-group .btn { text-transform: none; letter-spacing: 0; }
.find-row { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: var(--r-sm); cursor: pointer; }
.find-row.hl { background: var(--sel); }
.find-row .grow { min-width: 0; }
.find-ref { color: var(--muted); font-variant-numeric: tabular-nums; }
.find-empty { padding: 22px 12px; color: var(--muted); text-align: center; }
.find-foot { padding: 7px 12px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); min-height: 30px; }
.btn.icon.star.on { color: var(--amber, var(--green)); }
.btn.icon.star.on svg { fill: currentColor; }
.r.flash { box-shadow: 0 0 0 2px var(--green); background: var(--sel); border-radius: var(--r-sm); }
@media (max-width: 560px) { .find-back { padding: 0; } .find { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; } .nav-find kbd { display: none; } }
@media (max-width: 480px) { .mg-d { padding: 4px 2px; align-items: center; } .mg-d b { font-size: var(--fs-xs); } }      /* a phone: 1.25 has to fit a 34px day */
/* Outside the desktop: one button that lists the other applications (inside the desktop, the desktop does this). */
.nav-apps { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--r-btn);
  background: none; color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.nav-apps:hover, .nav-apps:focus-visible { color: var(--text); border-color: var(--border-strong); }

/* W5: one home for every record. Links from a task to the applications that own its other sides, and the row a link lands on. */
.homes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip.home { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text); }
.chip.home:hover, .chip.home:focus-visible { border-color: var(--green); color: var(--green); }
.spot { outline: 2px solid var(--green); outline-offset: -2px; background: var(--sel); transition: background .6s; }
.task-hours { margin-bottom: 16px; }
.task-hours a.r { text-decoration: none; color: inherit; }

/* ---- phone and tablet (W6) ----
   Fingers: every control is at least 44 px on a phone, and on any screen that is touched rather than pointed at. */
.tabs-pick { display: none; }
@media (max-width: 620px), (pointer: coarse) {
  .btn, .btn.sm, .chip, .tabs a, .tabs button, .nav a, .nav button, select, textarea, summary, .pop .opt, .linkish, .rowlink,
  input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=email], input[type=url], input[type=file] { min-height: 44px; }
  .chip, .linkish, .rowlink, summary { display: inline-flex; align-items: center; }
  summary { display: flex; }
  .btn.icon, .btn.sm, .acct-mini, .btn.bell { min-width: 44px; justify-content: center; }
  .acct-mini { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; }
  .check, label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  .check input, input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: none; }
  .btn.chooser .btn.icon { min-width: 40px; min-height: 40px; margin: -2px -8px -2px 0; }
  input, select, textarea { font-size: 16px; }      /* a phone zooms the page when a smaller field is tapped */
}
@media (max-width: 620px) {
  /* nothing scrolls sideways: tabs become one picker (or wrap, when there are only a few) */
  .tabs-pick { display: block; width: 100%; margin-bottom: 14px; font-weight: 600; }
  .tabs-pick + .tabs { display: none; }
  .tabs { flex-wrap: wrap; overflow-x: visible; }
  /* an application's own pages fold behind one Menu button */
  .shell.embed.one-app .side.has-menu { flex-wrap: wrap; }
  .shell.embed.one-app .side.has-menu .btn.nav-toggle { display: inline-flex; margin: 0 0 0 8px; }
  .shell.embed.one-app .side.has-menu .side-top { margin-left: 0; flex: 1 1 100%; order: 1; }
  .shell.embed.one-app .side.has-menu .side-tools { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; width: 100%; padding: 4px 0; }
  .shell.embed.one-app .side.has-menu .nav { display: none; order: 2; }
  .shell.embed.one-app .side.has-menu.open .nav { display: flex; flex-direction: column; flex: 1 1 100%; padding: 4px 8px 10px; }
  .shell.embed.one-app .side.has-menu.open .nav a { width: 100%; padding: 8px 10px; }
  .shell.embed .main, .main { padding: 14px 12px 32px; }
  /* tables read as cards: the first cell is the card's title, the others carry their column's name */
  .tbl-wrap { overflow-x: visible; }
  table.tbl, .tbl tbody, .tbl tfoot, .tbl tr, .tbl td { display: block; width: auto; }
  .tbl thead { display: none; }
  .tbl tbody tr, .tbl tfoot tr { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl tfoot tr { border-top: 1px solid var(--border); border-bottom: 0; background: var(--surface-2); }
  .tbl td { display: flex; gap: 12px; justify-content: space-between; align-items: center; min-height: 28px; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
  .tbl td::before { content: attr(data-th); flex: none; max-width: 45%; text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .tbl td:first-child { font-weight: 600; text-align: left; justify-content: flex-start; }
  .tbl td:first-child::before, .tbl td[data-th=""]::before, .tbl td:not([data-th])::before { display: none; }
  .tbl td:empty { display: none; }
  .tbl td > * { min-width: 0; }
  /* the week's timesheet: the task on its own line, then the seven days and the total in one row */
  .tbl.tsgrid tbody tr, .tbl.tsgrid tfoot tr { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
  .tbl.tsgrid td:first-child, .tbl.tsgrid td[colspan] { grid-column: 1 / -1; }
  .tbl.tsgrid td.num { flex-direction: column; gap: 0; align-items: center; justify-content: flex-start; text-align: center; padding: 4px 0; border-radius: var(--r-sm); }
  .tbl.tsgrid td.num::before { max-width: 100%; text-align: center; letter-spacing: 0; font-size: 10px; }
  /* the plan: the work and its status; the rest is on the task itself */
  .tr { grid-template-columns: 34px minmax(0, 1fr) auto; min-width: 0; min-height: 44px; }
  .tr > div:nth-child(n+4) { display: none; }
  .tree { overflow-x: hidden; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
  .toolbar input[type=search] { width: 100%; }
  .page-head .row, .toolbar { flex-wrap: wrap; }
}
@media (max-width: 620px), (pointer: coarse) {
  .cellbtn, .chev, .side .brand { min-height: 44px; }
  .chev { min-width: 44px; }
  .cellbtn { min-width: 44px; }
}
@media (max-width: 620px) {
  .shell.embed.one-app .side.has-menu .side-tools { padding: 4px 10px 4px 0; box-sizing: border-box; }
  input[type=file], input, select, textarea { max-width: 100%; box-sizing: border-box; }
}
@media (max-width: 620px) {
  /* a row of work: its name on a line of its own, what is known about it underneath */
  .rows > .r { flex-wrap: wrap; row-gap: 6px; }
  .rows > .r > .grow { flex-basis: 100%; min-width: 0; }
  .tbl.tsgrid tbody tr, .tbl.tsgrid tfoot tr { padding: 8px 6px; }
  .tbl.tsgrid td { overflow: hidden; }
  /* the month: seven days across, each big enough for a finger; the week's total on a line under its week */
  .monthgrid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap: 2px !important; }
  .monthgrid .mg-h:nth-child(8) { display: none; }
  .monthgrid .mg-h { padding: 2px 0; text-align: center; }
  .monthgrid .mg-w { grid-column: 1 / -1; padding: 0 6px 8px; }
  .monthgrid .mg-w:empty { display: none; }
  .monthgrid .mg-w::before { content: "Week: "; font-weight: 400; color: var(--muted); margin-right: 6px; }
  .card:has(> .monthgrid), .card-body:has(> .monthgrid) { padding-left: 4px; padding-right: 4px; }
  /* the plan's tick boxes: the whole 44 px square takes the tap */
  .tr { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .tr > div:first-child { padding: 0; }
  .tr > div:first-child input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 44px; height: 44px; margin: 0; border: 0; border-radius: 0; cursor: pointer; display: block;
    background: linear-gradient(var(--card), var(--card)) center / 16px 16px no-repeat, linear-gradient(var(--border-strong), var(--border-strong)) center / 20px 20px no-repeat; }
  .tr > div:first-child input[type=checkbox]:checked { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    linear-gradient(var(--green), var(--green)) center / 20px 20px no-repeat; }
}
@media (max-width: 620px) {
  .tbl.tsgrid th.num, .tbl.tsgrid td.num { width: auto; }
  .rows > .r .rowlink, .rows > .r .t, .rows > .r > .grow > .ellipsis:first-child { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
}
@media (max-width: 620px), (pointer: coarse) { a.link { min-height: 44px; display: inline-flex; align-items: center; } }
@media (max-width: 620px) {
  /* the plan on a phone: the work's full name on one line, its status under it */
  .tr { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
  .tr > div:nth-child(3) { grid-column: 2; padding: 0 4px 4px 26px; margin-top: -6px; }
  .tr.head > div:nth-child(3) { display: none; }
  .tr.head { align-items: center; }
  .tcell { height: auto; min-height: 44px; }
  .tt { white-space: normal; overflow-wrap: anywhere; flex: 1 1 auto; }
  .chev.leaf { min-width: 22px; width: 22px; }
  .ind { flex-wrap: wrap; }
  .card-head { flex-wrap: wrap; padding: 14px 14px 10px; }
  .card-body { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 620px) { .tr:not(.k-milestone) .kind-ic { display: none; } }
@media (max-width: 620px) {
  .tbl td .progress { flex: 0 1 55%; min-width: 80px; }
  .tbl td:first-child { display: block; }
}
@media (max-width: 620px), (pointer: coarse) {
  /* the round "done" button: the same 20 px ring, inside a 44 px square that takes the tap */
  .circle { width: 44px; height: 44px; border: 12px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1.5px var(--border-strong); margin: -12px; flex: none; }
  .circle:hover { border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--green); }
  .circle.done { border-color: transparent; box-shadow: none; }
  .circle.qa { border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--amber); }
}
@media (max-width: 620px) {
  /* the timer strip: its words get a line of their own instead of being cut to nothing beside the buttons */
  .tstrip-in { padding: 6px 12px; gap: 6px 8px; }
  .tstrip-in > .grow { flex: 1 1 calc(100% - 30px); white-space: normal; overflow: visible; }
}
/* a guide never grows wider than the screen: its pictures, tables and code fit or scroll inside the article */
.help-layout > article { min-width: 0; }
.doc { overflow-wrap: anywhere; }
.doc pre { max-width: 100%; overflow-x: auto; }
@media (max-width: 900px) { .help-layout { grid-template-columns: minmax(0, 1fr); } }
