@font-face { font-family: Hanken; src: url('/fonts/hanken.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: Newsreader; src: url('/fonts/newsreader.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #171A17; --ink-2: #3D413C; --mute: #73766F; --faint: #A3A39C;
  --line: #E4E2DB; --field: #F6F5F1; --paper: #F3F1EC; --hover: #FAFAF7;
  --green: #2B4A37; --green-deep: #203A2A; --on-green: #F3F1EC;
  --red: #B3261E;
  --sans: Hanken, "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Newsreader, Georgia, serif;
  --logo: url("https://images.squarespace-cdn.com/content/v1/655e678e638893672066bf0d/6f7de3a9-271e-4f9b-9bee-c84a8ec1e270/DoMyRenos_Logo.png?format=750w");
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------------------------------------------------------------- controls */
button, .btn {
  font: inherit; font-size: 14px; color: var(--ink); background: #ECEBE6; border: 0; border-radius: 0;
  padding: 8px 14px; min-height: 38px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { background: #E2E1DB; }
button:disabled { opacity: .5; cursor: default; }
.primary, .btn.primary { background: var(--green); color: var(--on-green); }
.primary:hover, .btn.primary:hover { background: var(--green-deep); }
.danger { background: var(--red) !important; color: #fff !important; }
button.link, .link { background: none; padding: 0; min-height: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
button.link:hover { background: none; color: var(--ink); }
.danger-link { background: none; color: var(--red); padding: 8px 4px; }
.danger-link:hover { background: none; text-decoration: underline; }
button.x { background: none; color: var(--faint); font-size: 18px; line-height: 1; padding: 4px 8px; min-height: 0; }
button.x:hover { color: var(--red); background: none; }
.seg { display: inline-flex; gap: 2px; }
.seg .btn[aria-pressed=true], .seg button[aria-pressed=true] { background: var(--ink); color: #fff; }

input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--field);
  border: 0; border-bottom: 1px solid #B9B7AE; border-radius: 0; padding: 8px 10px; width: 100%; min-height: 38px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--ink); background: #F0EFEA; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--green); margin: 0; flex: none; }
input[type=search] { max-width: 360px; }
input:disabled, textarea:disabled { background: transparent; border-bottom-color: transparent; color: var(--ink-2); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); }
label small, legend small, h2 small, .h2 small, .h3 small { color: var(--mute); font-weight: 400; font-size: 12.5px; }
label.chk { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 14.5px; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--mute); padding: 0; margin-bottom: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- shell */
.top {
  position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--ink);
  height: 60px; padding: 0 32px; display: flex; align-items: center; gap: 30px;
}
.logo { display: block; flex: none; }
.logo-mark {
  display: block; height: 30px; aspect-ratio: 682 / 365; background: var(--green);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.logo-mark.big { height: 64px; }
.nav { display: flex; gap: 24px; height: 100%; }
.nav a { display: flex; align-items: center; text-decoration: none; color: var(--ink-2); font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--green); }
#save-state { margin-left: auto; font-size: 12.5px; color: var(--mute); }
#save-state.warn { color: var(--red); }
.top-link { font-size: 14px; color: var(--mute); text-decoration: none; }
.top-link:hover, .top-link.on { color: var(--ink); }
.tabbar { display: none; }

.page { max-width: 1200px; margin: 0 auto; padding: 30px 32px 96px; }
.page.wide { max-width: none; }
.page.narrow { max-width: 640px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 0; }
h1 { font: 400 36px/1.12 var(--serif); letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 12px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; color: var(--mute); }
.sub { margin: 6px 0 0; color: var(--mute); font-size: 14px; line-height: 1.6; }
.sub a { color: var(--ink-2); }
.crumb { font-size: 13px; color: var(--mute); margin-bottom: 10px; }
.crumb a { color: var(--mute); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.actions select { width: auto; }
.bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 14px 0 16px; }
.bar label { flex-direction: row; align-items: center; gap: 8px; }
.bar label input, .bar label select { width: auto; }
.hint { color: var(--mute); font-size: 13px; }
.mute { color: var(--mute); }
.empty { color: var(--mute); font-size: 14px; margin: 6px 0 14px; }
.empty.pad { padding: 24px 0; }
.h2 { font: 400 23px/1.25 var(--serif); margin: 30px 0 10px; }
.h3 { font-size: 13px; font-weight: 400; color: var(--mute); border-top: 1px solid var(--ink); padding-top: 9px; margin: 28px 0 10px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.cols > div > .h3:first-child, .cols > div > .h2:first-child, .side > .h3:first-child { margin-top: 0; }
.side > .kv:first-child { border-top: 1px solid var(--ink); padding-top: 12px; }

.sq { display: inline-block; width: 10px; height: 10px; flex: none; margin-right: 8px; vertical-align: 0; }
.sq.big { width: 14px; height: 14px; margin-right: 0; }

/* status: plain text with a small square */
.st { white-space: nowrap; font-size: 14px; }
.st::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--c, var(--faint)); vertical-align: 1px; }
.st-new { --c: #B7791F; } .st-visit { --c: #3D5C7A; } .st-quoted { --c: #6B4E71; } .st-lost { --c: #C9C8C1; color: var(--mute); }
.st-upcoming { --c: #8A93A0; } .st-active { --c: var(--green); } .st-hold { --c: #C05621; } .st-done { --c: #B5B4AD; color: var(--mute); }
.est-draft { --c: #B5B4AD; } .est-sent { --c: #3D5C7A; } .est-approved { --c: var(--green); } .est-declined { --c: #C9C8C1; color: var(--mute); }
.inv-draft { --c: #B5B4AD; } .inv-sent { --c: #3D5C7A; } .inv-partial { --c: #8C7A2E; } .inv-overdue { --c: var(--red); color: var(--red); } .inv-paid { --c: var(--green); } .inv-void { --c: #C9C8C1; color: var(--mute); }
select.stage-sel { width: auto; }

/* ---------------------------------------------------------------- tables & lists */
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: left; font-weight: 400; font-size: 13px; color: var(--mute); padding: 10px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th:first-child, table.list td:first-child { padding-left: 0; }
table.list td small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
table.list th small { display: block; font-size: 11.5px; }
table.list td a { text-decoration: none; }
table.list td a:hover { text-decoration: underline; }
.rows-link tbody tr { cursor: pointer; }
.rows-link tbody tr:hover td { background: var(--hover); }
tr.inactive td { color: var(--mute); }
.r { text-align: right !important; font-variant-numeric: tabular-nums; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
ul.plain li small { display: block; color: var(--mute); font-size: 13px; }
ul.plain a { text-decoration: none; }
ul.plain a:hover { text-decoration: underline; }
ul.menu li { padding: 14px 0; font-size: 16px; }
ul.menu .link { text-decoration: none; color: var(--ink); font-size: 16px; }

dl.kv { display: grid; grid-template-columns: 112px 1fr; gap: 10px 12px; margin: 0; font-size: 14.5px; }
dl.kv dt { color: var(--mute); font-size: 13px; padding-top: 1px; }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dl.kv.money { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
dl.kv.money dd { font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 6px 0 18px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stats > div { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats small { display: block; color: var(--mute); font-size: 13px; }
.stats strong { display: block; font: 400 28px/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.stats span { display: block; color: var(--mute); font-size: 12.5px; }
.stats .bad strong { color: var(--red); }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--ink); margin: 18px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 0; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14.5px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--green); }

/* notes, tasks, logs, photos */
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.note-form button { align-self: flex-start; }
ol.notes { list-style: none; padding: 0; margin: 0; }
ol.notes li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ol.notes p { margin: 0 0 4px; white-space: pre-wrap; }
ol.notes small { color: var(--mute); font-size: 13px; }

ul.tasks { list-style: none; padding: 0; margin: 0; }
li.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
li.task input { margin-top: 2px; width: 20px; height: 20px; }
li.task > div { min-width: 0; }
.t-name { background: none; padding: 0; min-height: 0; font-size: 15px; color: var(--ink); text-align: left; white-space: normal; display: inline; }
button.t-name:hover { background: none; text-decoration: underline; }
li.task small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
li.task small a { color: var(--ink-2); text-decoration: none; }
li.task .t-note { color: var(--ink-2); white-space: pre-wrap; }
li.task.done .t-name { color: var(--mute); text-decoration: line-through; }
.late { color: var(--red); }
.today-job h3 { font-size: 16px; font-weight: 500; margin: 18px 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; }
.today-job h3 a { text-decoration: none; }
.today-job h3 small { color: var(--mute); font-weight: 400; font-size: 13px; margin-left: 10px; }
.today-job h3 small a { color: var(--mute); text-decoration: underline; }

ol.logs { list-style: none; padding: 0; margin: 0; }
li.log { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.log-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14.5px; }
.log-head strong { font-weight: 500; }
.log-head a { color: var(--ink-2); }
.log-head .by { color: var(--mute); font-size: 13px; }
.log-acts { margin-left: auto; font-size: 13px; }
.log-text { margin: 6px 0 10px; white-space: pre-wrap; }
.clip { margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photos a { display: block; background: var(--field); }
.photos img { width: 112px; height: 112px; object-fit: cover; }
.photos.small img { width: 64px; height: 64px; }
.photos.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photos.grid img { width: 100%; height: auto; aspect-ratio: 1; }

/* leads */
.action-queue { margin: 6px 0 32px; border-top: 1px solid var(--ink); }
.action-queue .bar { margin: 14px 0 6px; }
.bar .h2 { margin: 0; }
.action-list { list-style: none; margin: 0; padding: 0; }
.action-list li { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.action-list li > div { min-width: 0; }
.action-title { display: block; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; margin: 2px 0; }
.action-title:hover { text-decoration: underline; }
.action-list small { display: block; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.action-list small.late, .action-list small .late { color: var(--red); }
.action-list small a { color: inherit; text-decoration: none; }
.action-list .btn { flex-shrink: 0; }
.more-actions { margin: 14px 0 22px; }
.more-actions summary { cursor: pointer; color: var(--green); font-size: 14px; padding: 8px 0; }
.issue-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-footer { margin-top: 28px; }
.log-followup { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; }
@media (max-width: 480px) {
  .issue-dlg .two { grid-template-columns: minmax(0, 1fr); }
  .action-list li { align-items: flex-start; gap: 8px; }
  .action-list .btn { font-size: 12px; padding: 6px 8px; }
  .page h1 { overflow-wrap: anywhere; }
}

/* leads */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 22px; }
.board h2 { font-size: 13px; font-weight: 400; color: var(--mute); border-top: 1px solid var(--ink); padding-top: 9px; margin: 0 0 4px; }
a.lead { display: block; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
a.lead:hover { background: var(--hover); }
a.lead strong { display: block; font-weight: 500; }
a.lead span { display: block; color: var(--ink-2); font-size: 14px; }
a.lead small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
details.lost { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 10px; }
details.lost summary { cursor: pointer; color: var(--mute); font-size: 14px; }
details.lost a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }

/* ---------------------------------------------------------------- estimate & invoice editors */
.title-input { font: 400 34px/1.15 var(--serif); background: transparent; border: 0; border-bottom: 1px dashed #C9C8C1; padding: 2px 0; min-height: 0; }
.title-input:hover, .title-input:focus { background: transparent; border-bottom: 1px solid var(--ink); }
table.est-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 4px; }
.est-table th { text-align: left; font-weight: 400; font-size: 13px; color: var(--mute); padding: 8px 6px; border-bottom: 1px solid var(--ink); }
.est-table td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.est-table td input { background: transparent; border-bottom: 1px solid transparent; padding: 6px 6px; min-height: 34px; font-size: 14.5px; }
.est-table td input:hover:not(:disabled) { background: var(--field); }
.est-table td input:focus { background: var(--field); border-bottom-color: var(--ink); }
.est-table input.num { text-align: right; font-variant-numeric: tabular-nums; }
.est-table .i-desc { font-size: 13px; color: var(--mute); min-height: 28px; padding-top: 2px; }
.est-table .i-desc:placeholder-shown:not(:focus) { display: none; }
.est-table tr.item:focus-within .i-desc { display: block; }
.est-table tr.sec td { padding-top: 22px; border-bottom: 1px solid var(--ink); }
.est-table .sec-name { font-weight: 600; font-size: 15.5px; }
.est-table .sec-total { color: var(--mute); padding: 30px 10px 0 0; font-variant-numeric: tabular-nums; }
.est-table .amt { padding: 10px 10px 0 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-table tr.add td { border-bottom: 0; padding: 8px 6px 4px; font-size: 13.5px; }
.est-table td:last-child { text-align: right; }
.w-qty { width: 84px; } .w-unit { width: 96px; } .w-price { width: 128px; } .w-amt { width: 128px; } .w-x { width: 36px; }
/* Unit cost and markup: the office's working, set apart by a hairline and quieter type. */
.w-cost { width: 112px; } .w-mk { width: 84px; }
.est-table th.w-cost { border-left: 1px solid var(--line); }
.est-table td.cost { color: var(--ink-2); }
.est-table td.cost:first-of-type, .est-table td[data-l="Unit cost"] { border-left: 1px solid var(--line); }
.est-table td.cost input { color: var(--ink-2); }
.est-table td.cost input:disabled { background: transparent; border-bottom-color: transparent; }
.ed-bar { gap: 10px 20px; }
.ed-bar .inline { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); }
.ed-bar label input.pct { width: 64px; }
.margin-box { margin-top: 26px; border-top-color: var(--line); }
.margin-box::before { content: 'Office only · never on the proposal'; display: block; font-size: 12.5px; color: var(--mute); padding: 8px 0 0; }
.margin-box .hint { margin: 8px 0 0; }
.inv-table .i-name { font-size: 15px; }
.totals { margin: 18px 0 0 auto; width: min(380px, 100%); border-top: 1px solid var(--ink); }
.totals > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.totals b { font-weight: 400; }
.totals .grand { border-bottom: 1px solid var(--ink); }
.totals .grand b { font: 400 26px/1.2 var(--serif); }
input.pct { width: 64px; display: inline-block; text-align: right; padding: 4px 6px; min-height: 0; margin: 0 2px; }
label.terms { margin-top: 28px; }
.inv-status { margin: -6px 0 6px; font-size: 14px; color: var(--mute); }
.totals .bal { border-bottom: 1px solid var(--ink); }
.totals .bal b { font: 400 21px/1.2 var(--serif); }
.pay-table tr.reversed td { color: var(--mute); }
.pay-table td .link { font-size: 13.5px; }

/* ---------------------------------------------------------------- schedule */
.sched-bar .period { font-weight: 500; margin: 0 6px; }
.who-filter { margin-left: auto; }
.gantt { border-top: 1px solid var(--ink); overflow-x: auto; }
.g-grid { display: grid; grid-template-columns: 230px repeat(var(--days), minmax(46px, 1fr)); min-width: calc(230px + var(--days) * 46px); }
.g-head { border-bottom: 1px solid var(--ink); }
.g-day { font-size: 13px; text-align: center; padding: 7px 2px; border-left: 1px solid var(--line); line-height: 1.3; min-width: 0; }
.g-day small { display: block; color: var(--mute); font-size: 11.5px; }
.g-day em { display: block; font-style: normal; font-size: 10.5px; color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-day.off, .g-cell.off { background: var(--paper); }
.g-day.now { color: var(--green); font-weight: 600; box-shadow: inset 0 -3px var(--green); }
.g-job { grid-auto-rows: minmax(34px, auto); border-bottom: 1px solid var(--line); padding: 4px 0; }
.g-label { padding: 6px 14px 6px 0; font-size: 14px; line-height: 1.35; min-width: 0; align-self: start; }
.g-label a { text-decoration: none; font-weight: 500; }
.g-label a:hover { text-decoration: underline; }
.g-label small { display: block; color: var(--mute); font-size: 12.5px; padding-left: 18px; }
.g-cell { background: transparent; border: 0; border-left: 1px solid var(--line); padding: 0; min-height: 0; margin: -4px 0; }
button.g-cell:hover { background: #EEF1EC; }
.g-cell.now { background: rgba(43, 74, 55, .06); }
.g-bar { z-index: 1; margin: 3px 2px; padding: 0 8px; min-height: 28px; background: var(--c); color: #fff; font-size: 12.5px; justify-content: space-between; overflow: hidden; }
.g-bar:hover { background: var(--c); filter: brightness(1.12); }
.g-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-bar i { font-style: normal; font-size: 11px; opacity: .85; }
.g-bar.done { opacity: .42; }
.g-bar.short { background: transparent; color: var(--ink); border-left: 6px solid var(--c); padding-left: 7px; justify-content: flex-start; overflow: visible; z-index: 2; }
.g-bar.short:hover { background: transparent; filter: none; text-decoration: underline; }
.g-bar.short span { overflow: visible; }
.g-bar.short i { color: var(--mute); margin-left: 8px; }
.g-bar.cut-l { margin-left: 0; border-left: 3px solid rgba(255, 255, 255, .5); }
.g-bar.cut-r { margin-right: 0; border-right: 3px solid rgba(255, 255, 255, .5); }
.month { border-top: 1px solid var(--ink); }
.m-head { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12.5px; color: var(--mute); border-bottom: 1px solid var(--ink); }
.m-head div { padding: 6px 8px; }
.m-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); }
.m-cell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 6px 6px; min-width: 0; }
.m-cell.off { background: #F8F7F3; }
.m-cell.other > * { opacity: .4; }
.m-date { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 2px; min-height: 24px; }
.m-date em { font-style: normal; font-size: 10.5px; color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-cell.now .m-date span { background: var(--green); color: #fff; padding: 0 6px; }
.m-add { order: 3; margin-left: auto; background: none; color: var(--mute); padding: 0 6px; min-height: 0; visibility: hidden; font-size: 16px; }
.m-cell:hover .m-add, .m-add:focus-visible { visibility: visible; }
.m-task { display: flex; align-items: center; width: 100%; background: none; padding: 2px 0; min-height: 0; font-size: 12.5px; text-align: left; justify-content: flex-start; overflow: hidden; }
.m-task:hover { background: var(--hover); }
.m-task .sq { width: 8px; height: 8px; margin-right: 6px; }
.m-task.done { color: var(--mute); text-decoration: line-through; }
.h3.day.now { color: var(--green); border-top-color: var(--green); }

/* ---------------------------------------------------------------- dialogs */
dialog { border: 1px solid var(--ink); border-radius: 0; padding: 0; width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 32px); color: var(--ink); background: #fff; }
dialog.small { width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(23, 26, 23, .42); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
dialog form > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 4px; }
dialog h3 { font: 400 23px/1.2 var(--serif); margin: 0; }
.dlg-body { padding: 12px 22px 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-body ul.plain li { font-size: 14px; }
.dlg-note { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.dlg-err { color: var(--red); font-size: 13.5px; margin: 0; padding: 0 22px 10px; }
dialog footer { display: flex; gap: 8px; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
dialog footer .spacer { flex: 1; }
.new-client { display: flex; flex-direction: column; gap: 14px; padding: 12px 0 14px 14px; border-left: 2px solid var(--green); }
.kinds { display: flex; gap: 22px; }
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick label.btn { align-self: flex-start; flex-direction: row; color: var(--ink); font-size: 14px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbs:empty { display: none; }
.thumb { position: relative; }
.thumb img { width: 84px; height: 84px; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; min-height: 0; padding: 0; background: rgba(0, 0, 0, .62); color: #fff; font-size: 15px; }
dialog.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; background: #111; color: #ddd; }
dialog.viewer img { width: 100%; height: calc(100% - 48px); object-fit: contain; }
.vbar { display: flex; gap: 18px; align-items: center; height: 48px; padding: 0 16px; font-size: 13.5px; }
.vbar a, .vbar button { color: #ddd; background: none; padding: 0; min-height: 0; }
.vbar button { margin-left: auto; }
.vprev, .vnext { position: absolute; top: 45%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 34px; padding: 4px 14px; }
.vprev { left: 8px; } .vnext { right: 8px; }

/* settings */
.set { border-top: 1px solid var(--ink); margin-top: 34px; padding-top: 2px; }
.set > .h2 { margin-top: 14px; }
.set .settings-form { max-width: 760px; }

/* sign in */
.login { min-height: 100dvh; width: min(360px, calc(100% - 32px)); margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login button { min-height: 46px; margin-top: 4px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--on-green); padding: 11px 18px; font-size: 14px; z-index: 100; max-width: calc(100% - 32px); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side { margin-top: 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stats > div:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .top { height: 54px; padding: 0 16px; gap: 14px; }
  .top .nav, .top-link:not(.who) { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    background: #fff; border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; align-items: center; justify-content: center; height: 54px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; border-top: 3px solid transparent; margin-top: -1px; }
  .tabbar a.on { color: var(--ink); border-top-color: var(--green); }
  .page { padding: 20px 16px 120px; }
  h1 { font-size: 29px; }
  .title-input { font-size: 27px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .page-head .actions { justify-content: flex-start; }
  .hide-s { display: none; }
  .board { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .three { grid-template-columns: 1fr; }
  .stats.three { grid-template-columns: 1fr 1fr; }
  .stats strong { font-size: 23px; }
  input[type=search] { max-width: none; }
  input, select, textarea { font-size: 16px; }
  .who-filter { margin-left: 0; }
  .primary.big { position: fixed; left: 16px; right: 16px; bottom: calc(66px + env(safe-area-inset-bottom)); min-height: 52px; font-size: 16px; z-index: 15; box-shadow: 0 0 0 6px #fff; }
  #toast { bottom: auto; top: 64px; }
  dialog { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; }
  dialog form { height: 100%; max-height: none; }
  dialog footer { margin-top: auto; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .two { grid-template-columns: 1fr; }
  dialog .two { grid-template-columns: 1fr 1fr; }
  /* estimate rows stack: item on top, numbers below */
  .est-table thead { display: none; }
  .est-table tr.item { display: grid; grid-template-columns: 70px 80px 1fr 1fr 36px; border-bottom: 1px solid var(--line); padding: 4px 0; }
  .est-table tr.item td { border: 0; padding: 1px 2px; }
  .est-table tr.item td:first-child { grid-column: 1 / -1; }
  .est-table tr.sec { display: grid; grid-template-columns: 1fr auto 36px; }
  .est-table tr.sec td { border: 0; }
  .est-table tr.sec td:first-child { border-bottom: 1px solid var(--ink); }
  .est-table .sec-total { padding: 30px 6px 0 0; }
  .est-table.with-costs tr.sec td:first-child { grid-column: 1; }
  .est-table.with-costs tr.item td[data-l] { grid-row: 3; border-left: 0; }
  .est-table.with-costs tr.item td[data-l="Unit cost"] { grid-column: 1 / 3; }
  .est-table.with-costs tr.item td[data-l="Markup %"] { grid-column: 3; }
  .est-table.with-costs tr.item td[data-l]::before { content: attr(data-l); display: block; text-align: left; font-size: 11.5px; color: var(--mute); padding: 0 6px; }
  .m-cell { min-height: 64px; padding: 2px 3px; text-decoration: none; display: block; }
  .m-dots { display: flex; flex-wrap: wrap; gap: 3px; }
  .m-dots .sq { width: 9px; height: 9px; margin: 0; }
  .m-dots .sq.done { opacity: .35; }
}

/* Reliability controls reuse the existing visual language. */
.editor-fields { border:0; padding:0; margin:0; min-width:0; }
.editor-fields:disabled input,.editor-fields:disabled textarea { color:var(--ink); opacity:1; }
.sync-details { white-space:pre-wrap; overflow-wrap:anywhere; max-height:180px; overflow:auto; font-size:12px; }
#save-state { font-size:12px; max-width:240px; text-align:right; }
/* Save status: one entry per change group; actions wrap on a 375px phone. */
#sync-banner { margin: 0; padding: 10px 32px; border-bottom: 1px solid var(--line); color: var(--red); font-size: 14px; }
#sync-banner .link { color: var(--red); }
.sync-dlg footer { flex-wrap: wrap; }
.sync-dlg .h3 { margin: 4px 0 0; }
.sync-list li { overflow-wrap: anywhere; }
.sync-list li strong { font-weight: 500; }
.sync-why { margin: 4px 0 8px; color: var(--red); font-size: 13.5px; }
.sync-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.sync-acts button { white-space: normal; text-align: left; }
@media (max-width: 760px) { #sync-banner { padding: 10px 16px; } }

/* Inbox: messages in, proposals out; nothing is saved to a job until someone confirms */
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox-item { padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.inbox-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.inbox-head small { color: var(--mute); font-size: 13px; }
.inbox-head small a { color: inherit; }
.inbox-text { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--line); color: var(--ink-2); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: auto; }
.inbox-answer { margin: 8px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.proposals { list-style: none; margin: 4px 0 0; padding: 0; }
.proposals li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.proposals .chk { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; }
.proposals .chk span { min-width: 0; }
.proposals strong { font-weight: 600; margin-right: 6px; }
.proposals small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.proposals select { width: auto; max-width: 220px; flex: none; }
.proposals .pjob { flex: none; margin: 0; }
.inbox-nudge { margin: 0 0 8px; font-size: 14.5px; }
.inbox-form .samples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.inbox-saved { margin: 6px 0 10px; font-size: 14px; }
.inbox-saved a { margin-right: 2px; }
@media (max-width: 760px) { .proposals li { flex-direction: column; } .proposals select { width: 100%; max-width: 100%; } }

/* ---------------------------------------------------------------- messages
   A conversation reads like a printed transcript: name and time, then the text; the client's own lines carry a green rule. */
.unread { color: var(--green); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-left: 5px; }
.seg .btn[aria-pressed=true] .unread { color: #fff; }
.msg-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.msg-page section > .h2:first-child, .msg-page .crumb + .h2 { margin-top: 0; }
.threads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.threads li { border-bottom: 1px solid var(--line); }
.threads a { display: block; padding: 11px 0 11px 12px; text-decoration: none; border-left: 2px solid transparent; }
.threads li.on a { border-left-color: var(--green); background: var(--hover); }
.threads a:hover { background: var(--hover); }
.threads strong { font-weight: 500; font-size: 14.5px; }
.threads small { display: block; color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { max-width: 760px; }
.thread > .hint { margin: 0 0 8px; }
.msgs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); max-height: min(62vh, 640px); overflow-y: auto; }
.msg { padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; }
.msg.client { border-left-color: var(--green); }
.msg-who { font-size: 13.5px; font-weight: 500; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg-who small { color: var(--mute); font-weight: 400; font-size: 12.5px; }
.msg.mine .msg-who { color: var(--ink-2); }
.msg p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-day { font-size: 12.5px; color: var(--mute); padding: 14px 0 4px; border-bottom: 1px solid var(--line); }
.msg-empty { color: var(--mute); font-size: 14px; padding: 16px 0; }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.composer textarea { flex: 1; min-height: 46px; }
.composer button { min-height: 46px; }
@media (max-width: 899px) { .msg-page { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .msgs { max-height: 58vh; } }

/* ---------------------------------------------------------------- project Gantt (portal and job schedule) */
.gt { border-top: 1px solid var(--ink); overflow-x: auto; margin: 4px 0 22px; }
.gt-row { display: grid; grid-template-columns: 220px minmax(calc(var(--weeks) * 64px), 1fr); min-width: calc(220px + var(--weeks) * 64px); border-bottom: 1px solid var(--line); }
.gt-name { padding: 7px 12px 7px 0; font-size: 14px; line-height: 1.35; position: sticky; left: 0; z-index: 2; background: #fff; }
.gt-name small { display: block; color: var(--mute); font-size: 12px; }
.gt-track { position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--weeks))),
    repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--weeks) * 5 / 7), var(--field) calc(100% / var(--weeks) * 5 / 7) calc(100% / var(--weeks))); }
.gt-head .gt-track { height: 30px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--weeks))); }
.gt-head span { position: absolute; top: 7px; padding-left: 5px; font-size: 12px; color: var(--mute); white-space: nowrap; }
.gt-bar { position: absolute; top: 50%; height: 12px; margin-top: -6px; min-width: 4px; background: var(--green); }
.gt-row.done .gt-bar { background: #B5B4AD; }
.gt-row.late .gt-bar { background: var(--red); }
.gt-row.active .gt-name { font-weight: 500; }
.gt-now { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ink); z-index: 1; }
@media (max-width: 760px) {
  .gt-row { grid-template-columns: 132px minmax(calc(var(--weeks) * 48px), 1fr); min-width: calc(132px + var(--weeks) * 48px); }
  .gt-name { font-size: 13px; }
}

/* ---------------------------------------------------------------- client portal and sharing */
.top.for-client #save-state:not(.warn) { visibility: hidden; } /* a client only needs to hear about unsaved messages */
.preview-bar { margin: 0; padding: 10px 32px; background: var(--ink); color: #fff; font-size: 14px; }
.preview-bar a { color: #fff; margin-left: 8px; }
.portal-jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.portal-jobs a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.portal-jobs strong { font: 400 21px/1.3 var(--serif); }
.portal-jobs small { display: block; color: var(--mute); font-size: 13.5px; }
.decisions li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.decisions strong { font-weight: 500; }
.decisions p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.photos.grid figure { margin: 0; min-width: 0; }
.photos.grid figure a { display: block; }
.photos.grid figcaption { font-size: 12.5px; color: var(--ink-2); padding: 5px 0 3px; }
label.chk span small { display: inline; color: var(--mute); font-size: 12.5px; }
@media (max-width: 760px) { .preview-bar { padding: 10px 16px; } }

/* ---------------------------------------------------------------- budget against actual */
.list.budget tr.total td { border-top: 1px solid var(--ink); font-weight: 500; }
.list.budget td small { display: block; color: var(--mute); font-size: 12.5px; }
.show-s { display: none; }
@media (max-width: 760px) { .show-s { display: block; } }
.side .purge { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.side .purge .danger-link { padding: 4px 0; }
