/* G3 PM Tools prototype – styles per the G3 Knows brand book
   Primaries: Trusted Blue #2C395B · Slate #434B55 · Bright Blue #16A8DD
   Fonts: Roboto Slab (headlines) · Montserrat (sub-heads caps / body) – bundled locally (OFL) */
@font-face { font-family: 'Roboto Slab'; src: url('assets/fonts/RobotoSlab.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('assets/fonts/Montserrat.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #2C395B; --navy2: #364469; --slate: #434B55; --bright: #16A8DD; --bright2: #4EB7DE;
  --brick: #C66A4D; --moss: #778D66; --moss-d: #4C5941; --sunny: #F5A61C; --sunny-l: #F3BB58;
  --mgray: #AFB6BB; --lgray: #E5E5E4; --bg: #FAF9F8; --band: #F4F4F3; --panel: #F0F2F6;
  --input: #E8F6FC; --warn: #FCEED5; --warn-t: #8A5A00; --alert: #F7E1D9; --done: #E4EBDD;
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(44,57,91,.06), 0 4px 14px rgba(44,57,91,.07);
  --shadow-h: 0 2px 4px rgba(44,57,91,.08), 0 10px 24px rgba(44,57,91,.12);
  --slab: 'Roboto Slab', Rockwell, Georgia, serif;
  --sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --banner-h: 30px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); font-weight: 400; color: var(--slate); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--slab); color: var(--navy); font-weight: 700; margin: 0; line-height: 1.2; }
.caps { font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 600; color: var(--navy); }
.muted { color: #7d858e; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Email sign-in gate (covers the sample app until sign-in) ---------- */
.signin-gate { position: fixed; top: var(--banner-h); left: 0; right: 0; bottom: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--navy); }
.signin-gate[hidden] { display: none; }
.signin-card { width: min(420px, 100%); background: #fff; border-radius: 18px; border-top: 4px solid var(--bright); box-shadow: var(--shadow-h); padding: 28px 22px 22px; text-align: center; }
.signin-card h1 { font-size: 26px; }
.signin-sub { margin: 6px 0 0; font-size: 13px; color: #7d858e; }
.signin-card form { text-align: left; margin-top: 18px; }
.signin-error { color: var(--brick); font-size: 13px; font-weight: 600; margin: 0 0 12px; }

/* ---------- Sample banner (on every screen) ---------- */
.sample-banner[hidden] { display: none !important; }
.sample-banner { position: sticky; top: 0; z-index: 60; height: var(--banner-h); display: flex; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(-45deg, #F5A61C 0 14px, #F3BB58 14px 28px); color: var(--navy); font-size: 12px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; }
.sample-banner strong { font-weight: 700; background: var(--navy); color: #fff; padding: 2px 9px; border-radius: 5px; letter-spacing: .09em; }
.sample-banner .sb-sub { font-weight: 600; }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }
@media (max-width: 520px) { .sample-banner .sb-sub { display: none; } }
.jobs-db-note { background: #fff; color: var(--brick); font-weight: 700; text-align: center; padding: 10px 16px; border-bottom: 1px solid #f0d0c8; }
.jobs-db-note[hidden] { display: none; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: calc(100vh - var(--banner-h)); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar { display: none; }
.appbar { position: sticky; top: var(--banner-h); z-index: 40; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 3px solid var(--bright); min-height: 58px; }
.appbar .back { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.appbar .logo { height: 26px; display: block; }
.appbar .title { flex: 1; min-width: 0; }
.appbar .title h1 { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .title .sub { font-size: 11px; color: #D5DAE3; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.persona-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; flex: none; }
.persona-btn .av { width: 30px; height: 30px; font-size: 11px; }
.persona-btn .pl { text-align: left; line-height: 1.1; }
.persona-btn .pl b { display: block; font-size: 12px; font-weight: 600; }
.persona-btn .pl span { font-size: 10px; color: #D5DAE3; text-transform: uppercase; letter-spacing: .08em; }
.av { border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--bright); font-family: var(--sans); letter-spacing: .02em; flex: none; }
.av.pm2 { background: var(--moss); } .av.office { background: var(--sunny); color: var(--navy); } .av.owner { background: #fff; color: var(--navy); }
.view { flex: 1; padding: 16px 14px 110px; max-width: 760px; width: 100%; margin: 0 auto; outline: none; }

/* bottom nav (mobile) */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--lgray); display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: flex-end; column-gap: 8px; padding: 8px 10px 0; box-shadow: 0 -4px 16px rgba(44,57,91,.06); }
.bottomnav .motto { flex: 1 0 100%; display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; margin: 10px -10px 0; padding: 9px 6px calc(10px + env(safe-area-inset-bottom)); padding-left: calc(6px + .08em); background: var(--navy); color: #fff; border-top: 3px solid var(--bright); font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.05; text-align: center; }
.bottomnav a { flex: 1; text-decoration: none; color: #7d858e; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 6px 0 12px; position: relative; }
.bottomnav a.on { color: var(--navy); }
.bottomnav a.on svg { color: var(--bright); }
.bottomnav a .fab { width: 50px; height: 50px; border-radius: 16px; background: var(--bright); color: #fff; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 6px 16px rgba(22,168,221,.4); }
.bottomnav .nb { position: absolute; top: 2px; right: calc(50% - 24px); background: #F5A61C; color: #fff; min-width: 22px; height: 22px; font-size: 13px; font-weight: 800; border: 2px solid #fff; z-index: 3; }

/* ---------- Cards / generic ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; border: 1px solid rgba(44,57,91,.04); }
.card.flat { box-shadow: none; border: 1px solid var(--lgray); }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 2px 10px; }
.section-h h2 { font-size: 17px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.section-h h2::before { content: ''; width: 16px; height: 3px; background: var(--bright); border-radius: 2px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--panel); color: var(--navy); white-space: nowrap; letter-spacing: .02em; }
.chip.blue { background: var(--input); color: #0d6f93; }
.chip.navy { background: var(--navy); color: #fff; }
.chip.warn { background: var(--warn); color: var(--warn-t); }
.chip.alert { background: var(--alert); color: #9c4a31; }
.chip.done { background: var(--done); color: var(--moss-d); }
.chip.teal { background: var(--t-mitigation-bg); color: var(--t-mitigation); }
.chip.apprais { background: #fff; border: 1px solid var(--navy); color: var(--navy); }
.chip.legal { background: var(--brick); color: #fff; }
.stage-set { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.stage-set label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.stage-set select { flex: 1; min-width: 0; min-height: 44px; border: 0; border-bottom: 2px solid var(--bright); border-radius: 10px 10px 4px 4px; background: var(--input); padding: 0 10px; font: 600 13.5px var(--sans); color: var(--navy); }
.stage-set .btn.sm { padding: 10px 16px; min-height: 44px; }
.stage-set .btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.stage-note { font-size: 12px; color: #6b737c; margin: 10px 0 0; display: flex; align-items: center; gap: 5px; }
.chip.grey { background: var(--band); color: #7d858e; }
.chip.outline { background: transparent; border: 1px solid var(--lgray); color: var(--slate); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brick); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.badge.blue { background: var(--bright); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: transform .06s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--bright); color: #fff; box-shadow: 0 4px 12px rgba(22,168,221,.3); }
.btn.primary:hover { background: #1197c8; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.ghost { background: var(--panel); color: var(--navy); border: 0; }
.btn.danger { background: #fff; color: var(--brick); border: 1px solid #efc9bb; }
.btn.moss { background: var(--moss); color: #fff; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { background: #d9dde2 !important; color: #8a929a !important; box-shadow: none !important; cursor: not-allowed; border-color: transparent !important; }
.stack > * + * { margin-top: 10px; }
.divider { height: 1px; background: var(--lgray); margin: 12px 0; }
.label-line { font-family: var(--sans); font-weight: 600; color: var(--navy); font-size: 13.5px; letter-spacing: .01em; }
.label-line .sep { color: var(--bright); margin: 0 1px; }
.jobid { font-variant-numeric: tabular-nums; }

/* ---------- PM home (G3 Roofing and Construction) ---------- */
.hello { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); color: #fff; border-radius: 18px; padding: 18px; position: relative; overflow: hidden; margin-bottom: 16px; }
.hello::after { content: ''; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; border: 22px solid rgba(22,168,221,.18); }
.hello h2 { color: #fff; font-size: 22px; }
.hello p { margin: 4px 0 0; color: #D5DAE3; font-size: 13px; }
.hello .stats { display: flex; gap: 18px; margin-top: 14px; position: relative; z-index: 1; }
.hello .stats div b { display: block; font-family: var(--slab); font-size: 22px; color: #fff; }
.hello .stats div span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #aebbd3; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; background: #fff; border-radius: 16px; padding: 14px; min-height: 124px; box-shadow: var(--shadow); text-decoration: none; color: var(--slate); display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(44,57,91,.05); transition: box-shadow .15s, transform .15s; cursor: pointer; }
.tile:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.tile .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--input); color: var(--bright); }
.tile.owner .ic { background: var(--navy); color: #fff; }
.tile h3 { font-family: var(--sans); font-size: 17px; font-weight: 800; color: var(--navy); margin-top: 10px; line-height: 1.2; }
.tile p { margin: 2px 0 0; font-size: 11.5px; color: #7d858e; line-height: 1.3; }
.tile .badge { position: absolute; top: 12px; right: 12px; }
.tile .phase { position: absolute; top: 12px; right: 12px; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; padding: 3px 7px; border-radius: 6px; background: var(--panel); color: var(--navy2); }
.tile.later { background: repeating-linear-gradient(-45deg, #fff 0 10px, #f6f6f5 10px 20px); box-shadow: none; border: 1px dashed #d4d7db; cursor: default; }
.tile.later .ic { background: var(--band); color: var(--mgray); }
.tile.later h3 { color: #8a929a; }
.tile.wide { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 12px; justify-content: flex-start; }
.tile.wide h3 { margin-top: 0; }

/* ---------- Client list ---------- */
.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--lgray); border-radius: 12px; padding: 0 12px; box-shadow: var(--shadow); }
.searchbar input { border: 0; outline: 0; padding: 12px 0; flex: 1; background: transparent; min-width: 0; }
.stage-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.stage-jumps button { border: 1px solid var(--lgray); background: #fff; color: var(--navy); border-radius: 12px; min-height: 40px; padding: 8px 12px; font-size: 13px; font-weight: 800; cursor: pointer; }
.stage-jumps button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { border: 1px solid var(--lgray); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--slate); white-space: nowrap; cursor: pointer; }
.fchip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.client { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 12px; margin-bottom: 10px; border-left: 4px solid var(--bright); transition: box-shadow .15s; }
.client:hover { box-shadow: var(--shadow-h); }
.client.s1 { border-left-color: var(--mgray); } .client.s2 { border-left-color: var(--bright); } .client.s25 { border-left-color: var(--navy2); }
.client.s3 { border-left-color: var(--sunny); } .client.s4 { border-left-color: var(--moss); } .client.unassigned { border-left-color: var(--brick); }
.client .name { font-size: 13px; color: #6b737c; margin-top: 2px; }
.client .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.client .foot { display: flex; justify-content: space-between; font-size: 11.5px; color: #8a929a; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--band); }
.stage { font-weight: 700; }
.empty { text-align: center; padding: 34px 16px; color: #8a929a; }
.empty h3 { font-size: 17px; margin-bottom: 4px; }

/* ---------- Forms ---------- */
.form .field { margin-bottom: 14px; }
.form label.l, .form .l { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin-bottom: 6px; }
.form .req::after { content: ' *'; color: var(--brick); }
.form input:not([type]), .form input[type=text], .form input[type=email], .form input[type=password], .form input[type=tel], .form input[type=number], .form input[type=date], .form select, .form textarea {
  width: 100%; border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); color: var(--navy2); border-radius: 10px 10px 4px 4px; padding: 12px 12px; font-size: 16px; outline: none; transition: background .15s, border-color .15s; font-weight: 500; }
.form input:focus, .form select:focus, .form textarea:focus { background: #d9f0fa; border-bottom-color: var(--navy); }
.form textarea { min-height: 84px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .three { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 10px; }
.form .help { font-size: 12px; color: #7d858e; margin-top: 5px; }
.form .err { font-size: 12px; color: var(--brick); font-weight: 600; margin-top: 5px; }
.form .invalid { border-bottom-color: var(--brick) !important; background: var(--alert) !important; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { border: 1.5px solid var(--lgray); background: #fff; border-radius: 999px; padding: 9px 15px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--slate); }
.seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg.theme-pick { margin-top: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--lgray); border-radius: 12px; background: #fff; margin-bottom: 8px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--bright); flex: none; }
.consent b { color: var(--navy); font-weight: 600; font-size: 14px; display: block; }
.consent span { font-size: 12px; color: #7d858e; display: block; margin-top: 2px; }
.form-foot { position: sticky; bottom: 76px; background: linear-gradient(transparent, var(--bg) 30%); padding-top: 16px; z-index: 5; }

@media (max-width: 699px) {
  .form-foot.dock { position: fixed; left: 0; right: 0; bottom: calc(148px + env(safe-area-inset-bottom)); z-index: 44; background: var(--bg); padding: 8px 14px 6px; margin: 0; }
  .form.intake { padding-bottom: 108px; }
  .dock-pad { height: 132px; }
}
@media (min-width: 700px) and (max-width: 999px) {
  .form-foot.dock { position: fixed; left: 0; right: 0; bottom: 92px; z-index: 44; background: var(--bg); padding: 8px 14px 6px; margin: 0; }
  .form.intake { padding-bottom: 96px; }
  .dock-pad { height: 120px; }
}

.notice { border-radius: 12px; padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.notice.info { background: var(--input); color: #0d5f7e; }
.notice.warn { background: var(--warn); color: var(--warn-t); }
.notice.alert { background: var(--alert); color: #8e3f27; }
.notice.done { background: var(--done); color: var(--moss-d); }
.notice.panel { background: var(--panel); color: var(--navy2); }
.notice svg { flex: none; margin-top: 1px; }
.notice b { font-weight: 700; }

/* capture */
.capture { border: 2px dashed #9fd8ee; background: linear-gradient(180deg, #f3fbfe, #e8f6fc); border-radius: 16px; padding: 22px 14px; text-align: center; }
.capture .cam { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 0 auto 8px; color: var(--bright); box-shadow: var(--shadow); }
.capture b { color: var(--navy); display: block; font-size: 15px; }
.capture .row { justify-content: center; margin-top: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.thumb { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; flex: none; background: var(--panel); box-shadow: var(--shadow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(44,57,91,.8); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.masked { position: relative; }
.masked img { filter: blur(0); }
.masked .mask { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: rgba(44,57,91,.92); color: #fff; font-size: 9px; display: grid; place-items: center; letter-spacing: .06em; font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-head { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; position: relative; overflow: visible; }
.dash-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bright); border-radius: var(--radius) 0 0 var(--radius); }
.dash-head h2 { font-size: 21px; margin-top: 4px; }
.name-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.name-line h2 { flex: 1; min-width: 0; }
.cm-drop { position: relative; flex: none; }
.cm-drop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.cm-drop > summary::-webkit-details-marker { display: none; }
.cm-drop > summary::after { content: ''; border: solid currentColor; border-width: 0 1.5px 1.5px 0; display: inline-block; padding: 2.5px; transform: rotate(45deg); margin-top: -3px; }
.cm-drop[open] > summary::after { transform: rotate(-135deg); margin-top: 2px; }
.cm-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(340px, 78vw); background: #fff; color: var(--navy); border-radius: 14px; box-shadow: 0 12px 32px rgba(29, 36, 51, .18); border: 1px solid #e6e8ee; padding: 12px 14px; text-align: left; }
.cm-panel h3 { margin: 10px 0 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7d858e; font-weight: 700; font-family: var(--sans, inherit); }
.cm-panel h3:first-child { margin-top: 0; }
.cm-panel ul { margin: 0; padding-left: 16px; font-size: 13px; }
.cm-panel li { margin: 2px 0; }
.cm-panel li.muted { list-style: none; margin-left: -16px; color: #8a929a; }
.contact-row { display: flex; gap: 8px; margin-top: 12px; }
.cm-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.client .cm-name { font-size: 16px; font-weight: 700; color: var(--navy); }
.hist-row { flex-direction: column; align-items: stretch; gap: 8px; }
.hist-row .imain { flex: none; min-width: 0; }
.hist-row .imain b { white-space: nowrap; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-chips .chip { white-space: normal; max-width: 100%; }
.contact-row a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--panel); border-radius: 12px; padding: 9px 4px; text-decoration: none; color: var(--navy); font-size: 11px; font-weight: 600; }
.contact-row a svg { color: var(--bright); }
.contact-line { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.contact-line button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--panel); border: 0; border-radius: 12px; padding: 12px; color: var(--navy); font: 700 14px var(--sans); cursor: pointer; }
.contact-line button svg { color: var(--bright); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin-top: 12px; }
.kv dt { color: #8a929a; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding-top: 1px; }
.kv dd { margin: 0; color: var(--slate); font-weight: 500; }
.money3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mbox { background: var(--panel); border-radius: 12px; padding: 12px 10px; text-align: center; }
.mbox b { display: block; font-family: var(--slab); color: var(--navy); font-size: 19px; font-variant-numeric: tabular-nums; }
.mbox span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7d858e; font-weight: 600; }
.mbox.profit { background: var(--navy); } .mbox.profit b { color: #fff; } .mbox.profit span { color: #aebbd3; }
.mbox.neg b { color: var(--brick); }
.est { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn-t); background: var(--warn); border-radius: 6px; padding: 3px 8px; }
.subfig { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.subfig div { border: 1px solid var(--lgray); border-radius: 12px; padding: 10px 12px; }
.subfig b { display: block; font-size: 16px; color: var(--navy); font-variant-numeric: tabular-nums; font-weight: 700; }
.subfig span { font-size: 11px; color: #7d858e; font-weight: 600; letter-spacing: .04em; }
.lines { margin: 0; padding: 0; list-style: none; }
.lines li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--band); font-size: 13.5px; }
.lines li:last-child { border-bottom: 0; }
.lines .amt { margin-left: auto; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lines .desc b { display: block; font-weight: 600; color: var(--slate); }
.lines .desc span { font-size: 11.5px; color: #8a929a; }
.lines li.pending { color: #9aa1a8; font-style: italic; }
.lines li.pending .amt, .lines li.pending .desc b { color: #9aa1a8; }
.lines li.total { border-top: 1px solid var(--navy); border-bottom: 3px double var(--navy); font-weight: 700; color: var(--navy); }
.lines .cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--navy2); font-weight: 700; padding: 12px 2px 4px; border: 0; }
.ck { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 10px; border-radius: 10px; margin-bottom: 6px; background: #fff; border: 1px solid var(--band); font-size: 13.5px; }
.ck-supp { flex: 1 0 100%; margin: 0 0 2px 34px; }
.ck-supp p { margin: 4px 0; font-size: 12.5px; }
.ck-supp form { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.ck-supp input { flex: 1; min-width: 0; min-height: 36px; border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); border-radius: 8px 8px 3px 3px; padding: 6px 8px; }
.ck .ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700; }
.ck.done .ico { background: var(--moss); color: #fff; }
.ck.due .ico { background: var(--input); color: var(--bright); border: 1.5px solid var(--bright2); }
.ck.overdue { background: var(--warn); border-color: #f4d9a7; }
.ck.overdue .ico { background: var(--sunny); color: #fff; }
.ck.na .ico { background: var(--band); color: var(--mgray); }
.ck.na, .ck.later { color: #9aa1a8; }
.ck.later .ico { background: #fff; border: 1.5px solid var(--lgray); }
.ck .t { flex: 1; min-width: 0; }
.ck .t small { display: block; font-size: 11px; color: #8a929a; }
.ck .acts { display: flex; gap: 4px; }
.ck .acts button { border: 0; background: var(--panel); border-radius: 8px; font-size: 11px; font-weight: 600; padding: 4px 7px; cursor: pointer; color: var(--navy); }
.doc { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--band); text-decoration: none; color: var(--slate); font-size: 13.5px; }
.doc .fi { width: 34px; height: 40px; border-radius: 6px; background: var(--panel); display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--navy2); letter-spacing: .04em; flex: none; border: 1px solid var(--lgray); }
.doc .go { margin-left: auto; color: var(--bright); font-size: 12px; font-weight: 600; }
.split-rows .sr { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--band); font-size: 13.5px; }
.split-rows .sr:last-child { border-bottom: 0; }
.split-rows .pct { margin-left: auto; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.stopbtn { width: 100%; margin-top: 12px; }
.dnc-banner { background: var(--brick); color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 13px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }

/* ---------- Queues / tables ---------- */
.tabs { display: flex; gap: 4px; background: #fff; border-radius: 12px; padding: 4px; box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs button { flex: 1; border: 0; background: var(--panel); border-radius: 9px; padding: 9px 10px; font-weight: 600; font-size: 12.5px; color: var(--navy); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button.on { background: var(--navy); color: #fff; }
.tabs button .badge { height: 18px; min-width: 18px; font-size: 10px; }
.qitem { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
/* Sub task queue only. Project-card shape, orange sliver, extra gap so it is not a button link. */
.task-q .qitem,
.sub-queue-tab .task-q .qitem {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid #F5A61C;
  padding: 14px 14px 12px 22px;
  margin: 0 0 12px;
}
.qitem .top { display: flex; gap: 12px; }
.qitem .img { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; flex: none; background: var(--panel); position: relative; }
.qitem .img img { width: 100%; height: 100%; object-fit: cover; }
.qitem .amt { font-family: var(--slab); color: var(--navy); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qitem .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.qitem .acts .btn { flex: 1; }
.qitem .facts { font-size: 12.5px; color: #6b737c; margin-top: 4px; line-height: 1.5; }
.qitem.overdue { border-left: 4px solid var(--sunny); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--navy); color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; font-size: 12px; letter-spacing: .03em; }
.tbl th:first-child { border-top-left-radius: 10px; } .tbl th:last-child { border-top-right-radius: 10px; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--lgray); vertical-align: middle; }
.tbl tr:nth-child(even) td { background: var(--band); }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }

/* split editor */
.split-edit .sprow { display: grid; grid-template-columns: 1fr 1.2fr 96px 34px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--band); }
.split-edit .sprow .rname { font-weight: 600; color: var(--navy); font-size: 13.5px; }
.split-edit .sprow .rname small { display: block; color: #8a929a; font-weight: 500; font-size: 11px; }
.split-edit select, .split-edit input { width: 100%; border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); border-radius: 8px 8px 3px 3px; padding: 10px 8px; color: var(--navy2); font-weight: 600; font-size: 14px; outline: none; }
.split-edit input { text-align: right; }
.split-edit .rm { border: 0; background: transparent; color: var(--mgray); font-size: 20px; cursor: pointer; }
.totalbar { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; margin-top: 12px; font-weight: 700; }
.totalbar.ok { background: var(--done); color: var(--moss-d); }
.totalbar.bad { background: var(--alert); color: #9c4a31; }
.totalbar b { font-family: var(--slab); font-size: 22px; }
.meter { height: 10px; border-radius: 999px; background: var(--lgray); overflow: hidden; display: flex; margin-top: 10px; }
.meter i { display: block; height: 100%; }

/* phase mockups */
.phase-wrap { position: relative; }
.phase-ribbon { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.phase-ribbon .ph { background: var(--bright); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.phase-ribbon.p3 .ph { background: var(--mgray); color: var(--navy); }
.phase-ribbon p { margin: 0; font-size: 12.5px; color: #D5DAE3; }
.static { pointer-events: none; user-select: none; opacity: .92; }
.static-note { text-align: center; font-size: 12px; color: #8a929a; margin: 6px 0 16px; }

/* sheet + toast */
.sheet-back { position: fixed; inset: 0; background: rgba(28,36,58,.5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--lgray); margin: 0 auto 12px; }
.sheet h3 { font-size: 18px; margin-bottom: 4px; }
.sheet:has(.newbar) { padding-top: 0; }
.sheet:has(.newbar) .grab { background: rgba(255,255,255,.55); margin-bottom: 0; position: relative; z-index: 1; top: 10px; }
.newbar { background: var(--navy); color: #fff; text-align: center; margin: -10px -16px 14px; padding: 22px 16px 14px; border-bottom: 3px solid var(--bright); }
.newbar h3 { color: #fff; margin: 0; letter-spacing: .04em; font-size: 20px; }
.persona { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--lgray); background: #fff; border-radius: 14px; padding: 12px; margin-top: 8px; cursor: pointer; }
.persona.on { border-color: var(--bright); background: var(--input); }
.persona .av { width: 42px; height: 42px; font-size: 14px; }
.persona b { display: block; color: var(--navy); font-weight: 600; }
.persona span { font-size: 12px; color: #7d858e; }
.persona .check { margin-left: auto; color: var(--bright); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-h); opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.success { text-align: center; padding: 26px 16px 10px; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--done); color: var(--moss-d); display: grid; place-items: center; margin: 0 auto 14px; }
.success .bigid { font-family: var(--slab); font-size: 28px; color: var(--navy); margin: 6px 0; font-weight: 700; }

/* ---------- Desktop ---------- */
@media (min-width: 1000px) {
  .bottomnav { display: none; }
  .sidebar { display: flex; flex-direction: column; width: 248px; flex: none; background: var(--navy); color: #fff; position: sticky; top: var(--banner-h); height: calc(100vh - var(--banner-h)); padding: 18px 14px; border-right: 3px solid var(--bright); }
  .sidebar .logo { height: 34px; margin: 4px 8px 22px; align-self: flex-start; }
  .sidebar a { display: flex; align-items: center; gap: 12px; color: #D5DAE3; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
  .sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .sidebar a.on { background: rgba(22,168,221,.18); color: #fff; box-shadow: inset 3px 0 0 var(--bright); }
  .sidebar a .badge { margin-left: auto; }
  .sidebar .sgroup { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8d9bb8; margin: 16px 12px 6px; font-weight: 600; }
  .sidebar .foot { margin-top: auto; font-size: 11px; color: #8d9bb8; padding: 0 8px; }
  .appbar { background: #fff; color: var(--navy); border-bottom: 1px solid var(--lgray); padding: 14px 28px; }
  .appbar .logo { display: none; }
  .appbar .title h1 { color: var(--navy); font-size: 30px; }
  .appbar .title .sub { color: #7d858e; }
  .appbar .back { background: var(--panel); color: var(--navy); }
  .persona-btn { background: var(--panel); border-color: var(--lgray); color: var(--navy); }
  .persona-btn .pl span { color: #7d858e; }
  .view { max-width: 1180px; padding: 24px 28px 60px; }
  .view.narrow { max-width: 760px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .desk-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
  .desk-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .clients-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .clients-grid .client { margin: 0; }
  .form-foot { bottom: 0; }
  .toast { bottom: 28px; }
  .sheet-back { align-items: center; }
  .sheet { border-radius: 20px; }
}

/* ---- polish pass ---- */
.jobid { white-space: nowrap; }
.bottomnav a .fab svg, .bottomnav a.on .fab svg { color: #fff; }
.masked .mask { white-space: nowrap; font-size: 8.5px; letter-spacing: .02em; overflow: hidden; }
details.more { margin-top: 12px; border-top: 1px solid var(--band); padding-top: 10px; }
details.more summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--navy); letter-spacing: .06em; text-transform: uppercase; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: '+'; font-size: 18px; color: var(--bright); font-weight: 600; }
details.more[open] summary::after { content: '–'; }
details.more .kv { margin-top: 10px; }
.head-mini { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: #6b737c; margin-top: 10px; }
.head-mini b { color: var(--slate); font-weight: 600; }
@media (max-width: 999px) {
  .split-edit .sphead { display: none; }
  .split-edit .sprow { grid-template-columns: 1fr 88px 30px; grid-template-areas: "role role rm" "person pct pct"; row-gap: 6px; padding: 12px 0; }
  .split-edit .f-role { grid-area: role; } .split-edit .f-person { grid-area: person; } .split-edit .f-pct { grid-area: pct; } .split-edit .f-rm { grid-area: rm; }
  .split-edit .f-role { background: transparent; border-bottom-color: var(--lgray); color: var(--navy); font-weight: 700; padding-left: 2px; }
}
.split-edit .f-pct { font-family: var(--slab); font-size: 16px; }
.totalbar { padding: 10px 14px; }
.totalbar b { font-size: 20px; }
.phase-ribbon .ph { white-space: nowrap; flex: none; }
.row.wrap > .btn.small { white-space: nowrap; flex: 1 1 auto; }

/* ---------- Branding: G3 Knows launcher shell + G3 Roofing and Construction section ---------- */
/* Logos are used on their native backgrounds only (the G3C files are opaque): dark circle on the navy bar,
   light lockup on white cards. Sizes are set by height with width:auto so nothing is ever stretched. */
.appbar .logo { width: auto; }
.brand-badge { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: none; }
.brand-badge img { display: block; width: 74%; height: 74%; object-fit: contain; }
.brand-badge.sm { width: 32px; height: 32px; }
.co-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; box-shadow: var(--shadow); border: 1px solid rgba(44,57,91,.05); }
.co-brand img { display: block; height: 84px; width: auto; }
.co-brand > div { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.co-brand .caps { font-size: 10.5px; color: #7d858e; }
.co-brand a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--navy); text-decoration: none; padding: 6px 10px; border-radius: 999px; background: var(--panel); }

/* launcher */
body.is-launcher .bottomnav, body.is-launcher .sidebar { display: none !important; }
body.is-launcher .view { max-width: 560px; padding-bottom: 40px; }
.lx-hero { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 28px 20px 20px; text-align: center; border-top: 4px solid var(--bright); }
.lx-logo { display: block; height: 60px; width: auto; margin: 4px auto 22px; }
.lx-hero h2 { font-size: 22px; }
.lx-hero p { margin: 6px 0 0; font-size: 13.5px; }
.lx-hero p.lx-demo { margin: 2px 0 14px; font-size: 11px; color: #8a929a; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.lx-h { font-family: var(--sans); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--navy); margin: 22px 2px 10px; }
.lx-cos { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lx-co { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 14px 14px 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--slate); border: 1px solid rgba(44,57,91,.05); border-left: 4px solid #09938D; transition: box-shadow .15s, transform .15s; min-height: 72px; min-width: 0; }
.lx-co:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.lx-co img { display: block; width: 72px; height: 72px; flex: none; }
.lx-co div { flex: 1; min-width: 0; }
.lx-co b { display: block; font-family: var(--slab); font-size: 16px; color: var(--navy); line-height: 1.25; overflow-wrap: break-word; }
.lx-co div span { display: block; font-size: 12px; color: #7d858e; margin-top: 3px; line-height: 1.35; overflow-wrap: break-word; }
.lx-co.lx-sub { border-left-color: #F5A61C; }
.lx-co .lx-mark { flex: none; width: 80px; height: 80px; border-radius: 18px; background: #F5A61C; display: grid; place-items: center; }
.lx-co .lx-mark img { width: 68px; height: 68px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #F5A61C; }
.lx-go { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--input); color: var(--bright); }
.subportal-entry { min-width: 0; max-width: 100%; }
.subportal-entry h2 { font-size: 22px; margin-bottom: 12px; overflow-wrap: break-word; }
.subportal-entry select { min-height: 44px; max-width: 100%; }
@media (max-width: 699px) {
  .lx-co { gap: 12px; padding: 12px; }
  .lx-co img { width: 64px; height: 64px; }
  .lx-co .lx-mark { width: 72px; height: 72px; }
  .lx-co .lx-mark img { width: 60px; height: 60px; }
  .lx-co b { font-size: 15px; }
  .lx-hero h2, .lx-logo { max-width: 100%; }
  .lx-logo { height: auto; max-height: 60px; }
  .subportal-entry h2 { font-size: 20px; }
}
.lx-later { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lx-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 6px 12px; border-radius: 14px; border: 1px dashed #d4d7db; background: repeating-linear-gradient(-45deg, #fff 0 10px, #f6f6f5 10px 20px); color: #8a929a; cursor: not-allowed; user-select: none; }
.lx-soon .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--band); color: var(--mgray); }
.lx-soon b { font-size: 12.5px; font-weight: 600; color: #8a929a; line-height: 1.2; margin-bottom: 4px; }
.lx-soon .soon { margin-top: auto; white-space: nowrap; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9aa1a8; background: var(--band); padding: 2px 7px; border-radius: 6px; }
/* Christmas Lights is its own portal mark at the bottom of the title page, under the company row. */
.lx-lights-portal { display: flex; justify-content: center; margin: 28px 0 8px; }
.lx-lights { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(100%, 240px); padding: 16px 18px 14px; border-radius: 18px; background: #fff; text-decoration: none; color: #0B6346; border: 1px solid rgba(11,99,70,.22); box-shadow: var(--shadow); }
.lx-lights:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.lx-lights img { display: block; width: 112px; height: auto; }
.lx-lights-copy { display: grid; gap: 2px; text-align: center; }
.lx-lights-copy b { font-family: var(--slab); font-size: 16px; color: #0B6346; line-height: 1.25; }
.lx-lights-copy span { font-size: 12px; color: #7d858e; line-height: 1.35; }

@media (min-width: 1000px) {
  .sidebar .side-brand { background: #fff; border-radius: 12px; padding: 12px 16px; margin: 2px 4px 10px; display: flex; justify-content: center; }
  .sidebar .side-brand img { display: block; height: 80px; width: auto; }
  .sidebar a.side-apps { font-size: 12.5px; color: #aebbd3; padding: 6px 12px; }
  .co-brand { display: none; }
  .brand-badge { display: none; }
  body.is-launcher .appbar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--bright); }
  body.is-launcher .appbar .logo { display: block; height: 30px; }
  body.is-launcher .appbar .title h1 { color: #fff; }
  body.is-launcher .appbar .title .sub { color: #D5DAE3; }
  body.is-launcher .persona-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
  body.is-launcher .persona-btn .pl span { color: #D5DAE3; }
  body.is-launcher .view { padding-top: 40px; }
}

/* ===== Round 3: project types, My Projects, closed-only money ===== */
:root {
  --t-storm: #2C395B; --t-storm-bg: #E3E8F2;
  --t-water: #0F86B3; --t-water-bg: #E1F3FB;
  --t-fire: #B2583B; --t-fire-bg: #F8E3DB;
  --t-mold: #5A6E4B; --t-mold-bg: #E6EDDF;
  --t-remodel: #A86A00; --t-remodel-bg: #FCEFD6;
  --t-mitigation: #0B8078; --t-mitigation-bg: #DDF1EF;
  --t-landscaping: #3E7C3A; --t-landscaping-bg: #E3F0DF;
  --t-christmas-lights: #8C7400; --t-christmas-lights-bg: #FAF3CF;
  --t-window-washing: #1F7A9C; --t-window-washing-bg: #DFF0F6;
  --t-misc: #434B55; --t-misc-bg: #ECEEF0;
  --t-windows: #4A6FA5; --t-windows-bg: #E6EDF7;
}
.t-storm { --tc: var(--t-storm); --tb: var(--t-storm-bg); }
.t-water { --tc: var(--t-water); --tb: var(--t-water-bg); }
.t-fire { --tc: var(--t-fire); --tb: var(--t-fire-bg); }
.t-mold { --tc: var(--t-mold); --tb: var(--t-mold-bg); }
.t-remodel { --tc: var(--t-remodel); --tb: var(--t-remodel-bg); }
.t-mitigation { --tc: var(--t-mitigation); --tb: var(--t-mitigation-bg); }
.t-landscaping { --tc: var(--t-landscaping); --tb: var(--t-landscaping-bg); }
.t-christmas-lights { --tc: var(--t-christmas-lights); --tb: var(--t-christmas-lights-bg); }
.t-windows { --tc: var(--t-windows); --tb: var(--t-windows-bg); }
.t-window-washing { --tc: var(--t-window-washing); --tb: var(--t-window-washing-bg); }
.t-misc { --tc: var(--t-misc); --tb: var(--t-misc-bg); }
.tbadge { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--tb); color: var(--tc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 16%, transparent); }
.tbadge.lg { width: 48px; height: 48px; border-radius: 14px; }
.tbadge svg { display: block; }
.ptype { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 46px; flex: none; }
.ptype .tname { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tc); line-height: 1; }
.tchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--tb); color: var(--tc); white-space: nowrap; letter-spacing: .02em; }
.client.proj { display: flex; gap: 12px; align-items: flex-start; }
.client.proj[class*="t-"] { border-left-color: var(--tc); }
.job-cols[class*="t-"] .section-h h2::before { background: var(--tc); }
.client.proj .pbody { flex: 1; min-width: 0; }
.client.proj .label-line { line-height: 1.35; }
.plist-name { font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.plist-order { font-size: 13.5px; font-weight: 650; color: var(--navy); margin-top: 2px; font-variant-numeric: tabular-nums; }
a.jobident { display: block; text-decoration: none; color: inherit; }
.client.slost { border-left-color: var(--brick); }
.final-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; padding: 8px 10px; background: var(--done); border-radius: 10px; font-size: 12px; color: var(--moss-d); }
.final-line b { font-family: var(--slab); color: var(--navy); font-variant-numeric: tabular-nums; }
.final-line .fl-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.list-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #7d858e; margin: 6px 2px 10px; }
.tabs.scope { margin-bottom: 10px; }
.tabs.scope .cnt { font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--panel); color: var(--navy); }
.tabs.scope button.on .cnt { background: rgba(255,255,255,.18); color: #fff; }
.fchip svg { vertical-align: -2px; }
.dh-top { display: flex; gap: 12px; align-items: center; }
.dash-head[class*="t-"]::before { background: var(--tc); }
.typepick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.typepick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 9px; border: 1.5px solid var(--lgray); border-radius: 14px; background: #fff; cursor: pointer; font: 600 12px var(--sans); color: var(--slate); transition: border-color .15s, background .15s, box-shadow .15s; }
.typepick button:hover { border-color: color-mix(in srgb, var(--tc) 45%, var(--lgray)); }
.typepick button.on { border-color: var(--tc); background: color-mix(in srgb, var(--tb) 55%, #fff); color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 14%, transparent); }
.typepick button:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.final-card .mbox b { font-size: 17px; }
.list-note svg { flex: none; width: 14px; height: 14px; }
@media (max-width: 999px) {
  .appbar .title.long h1 { font-size: 22px; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .appbar .title.long .sub { display: none; }
}

/* ===== Round 4: Notes & Tasks, office desktop workspace, tablet, touch targets ===== */
.tbadge.xs { width: 28px; height: 28px; border-radius: 8px; }
.desk-only { display: none !important; }
.grow { flex: 1; min-width: 0; }
/* home "Needs your answer" / "Office Inbox" tile */
.tile.attn { background: linear-gradient(120deg, #fff 55%, var(--input)); border: 1px solid #bfe6f5; }
.tile.attn .ic { background: var(--navy); color: #fff; }
.tile.attn .count { flex: none; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 14px; display: grid; place-items: center; font: 700 22px var(--slab); color: #fff; background: var(--brick); box-shadow: 0 4px 12px rgba(198,106,77,.3); }
.tile.attn.calm { background: #fff; border-color: rgba(44,57,91,.05); }
.tile.attn.calm .count { background: var(--done); color: var(--moss-d); box-shadow: none; }
.chip.wait { gap: 4px; }
/* note type badges: Task = Trusted Blue, Question = Bright Blue, Request = Sunny/amber */
.nt-task { --nc: var(--navy); --nb: #E3E8F2; }
.nt-question { --nc: #0d6f93; --nb: var(--input); }
.nt-request { --nc: var(--warn-t); --nb: var(--warn); }
.ntype { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px 3px 7px; border-radius: 7px; background: var(--nb); color: var(--nc); }
.notes-card { padding: 12px; }
.notes-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.notes-top .filters { padding: 0; flex: 1 1 auto; }
.fchip .n { margin-left: 6px; font-size: 10.5px; font-weight: 700; opacity: .7; }
.nlist { margin-top: 10px; display: grid; gap: 8px; }
.note { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--lgray); border-left: 4px solid var(--nc); border-radius: 12px; padding: 11px 12px 10px; transition: box-shadow .15s; }
.note:hover { box-shadow: var(--shadow-h); }
.note.mine { background: linear-gradient(90deg, #f3f8fc, #fff 60%); }
.note.overdue { border-color: #eab8a6; border-left-color: var(--brick); background: #fdf5f2; }
.note.is-done { opacity: .72; border-left-color: var(--moss); }
.note.is-done .ntitle { text-decoration: line-through; text-decoration-color: rgba(67,75,85,.35); }
.nhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ntitle { font-weight: 700; color: var(--navy); font-size: 14.5px; margin-top: 7px; line-height: 1.3; }
.nbody { font-size: 12.5px; color: #6b737c; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nmeta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 11.5px; color: #8a929a; margin-top: 8px; }
.nmeta .to { display: inline-flex; align-items: center; gap: 2px; color: var(--navy2); font-weight: 600; }
.nfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 7px; }
.nfoot:empty { display: none; }
.nico { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: #8a929a; font-weight: 600; }
.chip.due { gap: 4px; }
.nhelp { font-size: 11.5px; margin: 10px 2px 0; }
.njob { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; text-decoration: none; }
.njob .label-line { font-size: 12.5px; }
/* thread */
.nthread { border-top: 4px solid var(--nc); }
.nthread.overdue { border-top-color: var(--brick); }
.nth { font-size: 20px; margin: 10px 0 4px; }
.nbody-full { font-size: 14px; line-height: 1.5; margin: 6px 0 10px; color: var(--slate); }
.nkv { border-top: 1px solid var(--band); padding-top: 10px; }
.attach { display: inline-flex; flex-direction: column; gap: 4px; text-decoration: none; margin: 6px 0; max-width: 220px; }
.attach img { display: block; width: 200px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--lgray); }
.attach span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--navy2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.bubble .av { width: 30px; height: 30px; font-size: 11px; }
.bubble .bb { background: #fff; border: 1px solid var(--lgray); border-radius: 16px 16px 16px 4px; padding: 9px 12px; box-shadow: var(--shadow); min-width: 0; }
.bubble.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble.me .bb { background: var(--navy); border-color: var(--navy); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble.me .bmeta { color: #aebbd3; } .bubble.me .bmeta b { color: #fff; }
.bubble.me .attach span { color: #D5DAE3; }
.bmeta { font-size: 11px; color: #8a929a; margin-bottom: 2px; } .bmeta b { color: var(--navy); }
.btext { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .attach img { width: 160px; height: 120px; }
.composer { margin-top: 14px; }
.composer .l { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin-bottom: 6px; }
.composer textarea { width: 100%; min-height: 84px; border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); border-radius: 10px 10px 4px 4px; padding: 10px 12px; font: 500 14px var(--sans); color: var(--navy2); resize: vertical; }
.attach-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.attach-prev { flex-basis: 100%; }
.attach-prev:empty { display: none; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 10px; padding: 4px 4px 4px 4px; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.attach-chip img { width: 40px; height: 32px; object-fit: cover; border-radius: 6px; }
.attach-chip button { border: 0; background: transparent; font-size: 18px; color: var(--navy2); cursor: pointer; min-width: 44px; min-height: 44px; }
/* new item form */
.nnew-job { padding: 12px 14px; } .nnew-job .njob { margin: 0; }
.ntpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ntpick button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; min-height: 64px; border: 1.5px solid var(--lgray); border-radius: 14px; background: #fff; cursor: pointer; color: var(--nc); font-family: var(--sans); }
.ntpick button svg { grid-row: span 2; background: var(--nb); border-radius: 10px; padding: 8px; box-sizing: content-box; }
.ntpick button b { font-size: 14px; color: var(--navy); } .ntpick button small { font-size: 11.5px; color: #7d858e; }
.ntpick button.on { border-color: var(--nc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc) 14%, transparent); background: color-mix(in srgb, var(--nb) 45%, #fff); }
.ro { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px 10px 4px 4px; background: #eceff1; color: #5c6770; font-weight: 600; font-size: 14px; border-bottom: 2px solid #c5cdd4; }
.sigpad { width: 100%; height: 140px; background: #fff; border: 1px solid var(--lgray); border-radius: 10px; touch-action: none; }
/* inbox */
.inbox-grid { display: grid; gap: 10px; margin-top: 10px; }
.inbox-grid .note { box-shadow: var(--shadow); }
.inbox-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 4px; }
.is-box { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; text-decoration: none; min-height: 44px; }
.is-box b { display: block; font: 700 24px var(--slab); color: var(--navy); }
.is-box span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: #7d858e; font-weight: 600; }
.is-box.link span { color: var(--bright); }
/* project table (desktop, Office/Owner) */
.tfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 2px 10px; font-size: 12px; font-weight: 600; color: var(--navy); }
.tfilters label { display: inline-flex; align-items: center; gap: 8px; }
.tfilters select { border: 1px solid var(--lgray); background: #fff; border-radius: 10px; padding: 8px 10px; font: 600 13px var(--sans); color: var(--navy2); min-height: 40px; }
.tfilters .muted { margin-left: auto; font-weight: 500; font-size: 11.5px; }
.ptable-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th { position: sticky; top: 0; background: var(--navy); color: #fff; text-align: left; padding: 0; font-weight: 600; white-space: nowrap; }
.ptable th button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: 100%; padding: 12px 12px; cursor: pointer; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; min-height: 44px; }
.ptable th button:focus-visible { outline: 2px solid var(--bright2); outline-offset: -2px; }
.ptable th.r button { justify-content: flex-end; } .ptable th.c button { justify-content: center; }
.ptable th .sa { font-size: 9px; opacity: .6; }
.ptable th[aria-sort="ascending"], .ptable th[aria-sort="descending"] { background: var(--navy2); box-shadow: inset 0 -3px 0 var(--bright); }
.ptable td { padding: 10px 12px; border-bottom: 1px solid var(--band); vertical-align: middle; color: var(--slate); height: 56px; }
.ptable tbody tr { cursor: pointer; transition: background .1s; }
.ptable tbody tr:nth-child(even) td { background: #FBFBFA; }
.ptable tbody tr:hover td { background: #F1F8FC; }
.ptable tr.unassigned td:first-child { box-shadow: inset 3px 0 0 var(--brick); }
.ptable td small { display: block; font-size: 11px; color: #8a929a; margin-top: 1px; }
.ptable .pcell { display: flex; align-items: center; gap: 10px; min-width: 300px; }
.ptable .pcell a { text-decoration: none; font-size: 13px; }
.ptable td.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable td.c { text-align: center; white-space: nowrap; }
.ptable .fin { font-weight: 700; color: var(--navy); }
.ptable .est { font-style: italic; color: #7d858e; }
.ptable td.neg .fin, .ptable td.neg .est { color: var(--brick); }
.ptable .oc { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--panel); color: var(--navy); font-weight: 700; font-size: 12px; margin-right: 4px; }
.ptable .chip.stage { font-size: 10.5px; }

/* phone only: one column, Notes and Tasks sit under the project header.
   iPad portrait starts at 700px and stays on the desktop two-column split. */
@media (max-width: 699px) {
  html, body { height: 100%; overflow: hidden; background: var(--navy); }
  .shell, .main-col { height: 100%; min-height: 0; overflow: hidden; }
  .appbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding-top: calc(10px + env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); min-height: calc(58px + env(safe-area-inset-top)); }
  .view { height: 100%; overflow-y: auto; overscroll-behavior-y: none; -webkit-overflow-scrolling: touch; padding-top: calc(74px + env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); background: var(--bg); }
  .job-cols { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
  .job-cols > div { display: contents; }
  [data-testid="job-body"] > *, .job-side > * { width: 100%; max-width: 100%; align-self: stretch; box-sizing: border-box; }
  [data-testid="job-body"] > *, .job-side > * { order: 20; }
  .job-cols .dash-head { order: 1; }
  .job-cols .phone-updates { order: 2; }
  .job-cols .phone-tasks { order: 3; }
  .job-cols .phone-quick { order: 4; }
  .job-cols .phone-cal { order: 5; }
  .job-cols .phone-calls { order: 6; }
  .job-cols .phone-pnotes { order: 7; }
  .job-cols .phone-co { order: 8; }
  .job-cols .phone-da { order: 9; }
  .job-cols .phone-sub { order: 10; }
  .job-cols .phone-crit { order: 11; }
  .job-cols .phone-money { order: 11; }
  .job-cols .phone-rev { order: 12; }
  .job-cols .phone-exp { order: 13; }
  .job-cols .phone-split { display: none; }
  .job-cols .datacheck, .job-cols .access-prompt { margin-top: 4px; }
  .bottomnav { box-shadow: none; border-top: 0; background: #fff; padding: 12px 6px 0; column-gap: 10px; }
  .bottomnav a { font-size: 12px; gap: 6px; padding-bottom: 14px; }
  .bottomnav a .fab { width: 52px; height: 52px; margin-top: 0; border-radius: 16px; box-shadow: none; }
  .view { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
  .bottomnav .motto { font-size: 16px; letter-spacing: .1em; gap: 8px; margin-left: -6px; margin-right: -6px; padding-left: calc(6px + .1em); }
  .dash-head .tbadge.lg { width: 64px; height: 64px; border-radius: 16px; }
  .dash-head .tbadge.lg svg { width: 36px; height: 36px; }
  .label-line .lname { font-size: 22px; font-weight: 800; }
  .name-line h2 { font-size: 28px; }
  .plist-name { font-size: 20px; }
  .section-h h2, .tile h3, .inbox-h h3 { font-size: 20px; font-weight: 800; }
  .plist-order { font-size: 15px; }
  .appbar .brand-badge, .appbar .brand-badge.sm { width: 56px; height: 56px; }
  .appbar { min-height: calc(76px + env(safe-area-inset-top)); }
  .view { padding-top: calc(92px + env(safe-area-inset-top)); }
  .scope-toggle button { font-size: 16px; min-height: 52px; }
  .scope-toggle .cnt { font-size: 14px; min-width: 26px; height: 26px; }
  .scope-more { font-size: 15px; gap: 8px; }
  .scope-more > button { font-size: 15px; padding: 10px 14px; min-height: 46px; }
  .view-toggle button { font-size: 15px; min-height: 46px; }
  .fchip { font-size: 15px; padding: 10px 16px; }
  .ml-bar, .ml-bar select, .tfilters, .tfilters select { font-size: 16px; }
  .ml-bar select, .tfilters select { min-height: 44px; }
  .stage-jumps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0 4px; }
  .stage-jumps button { border: 1px solid var(--lgray); background: #fff; color: var(--navy); border-radius: 12px; min-height: 48px; font-size: 15px; font-weight: 800; }
  .stage-jumps button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
  .stage-jumps button.word { font-size: 12px; line-height: 1.1; padding: 4px; }
}
/* iPad portrait widths: wider tiles and a 2-up job list. The project page stays two columns. */
@media (min-width: 700px) and (max-width: 999px) {
  .view { max-width: 760px; margin: 0 auto; padding: 20px 24px 110px; }
  .view.narrow { max-width: 680px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile.wide { grid-column: span 3; }
  .clients-grid, .inbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .clients-grid .client { margin: 0; }
  .inbox-strip { grid-template-columns: repeat(4, 1fr); }
  .appbar { padding-left: 24px; padding-right: 24px; }
  .bottomnav a { font-size: 11.5px; }
  .co-brand img { height: 92px; }
  .money3 .mbox b { font-size: 22px; }
}
/* iPad portrait, iPad landscape, and desktop: left column is the job body, right column is notes and tasks */
@media (min-width: 700px) {
  .job-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
  .job-cols .notes-panel > .section-h:first-child { margin-top: 0; }
  .view:has(.job-cols) { max-width: 1180px; }
}
/* desktop / iPad landscape */
@media (min-width: 1000px) {
  .desk-only { display: revert !important; }
  .tfilters.desk-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .view:has(.ptable-wrap) { max-width: 1400px; }
  .job-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .job-cols .notes-panel > .section-h:first-child { margin-top: 0; }
  .notes-card { max-height: calc(100vh - 230px); overflow: auto; }
  .inbox-grid { grid-template-columns: repeat(2, 1fr); }
  .inbox-strip { grid-template-columns: repeat(4, 1fr); }
  .tiles .tile.wide { grid-column: span 2; }
}
@media (min-width: 1300px) { .inbox-grid { grid-template-columns: repeat(3, 1fr); } }
/* touch targets ≥ 44 px on touch devices and phone/tablet widths (nothing is hover-only) */
@media (pointer: coarse), (max-width: 999px) {
  .fchip, .tabs button, .btn.small, .seg button, details.more summary, .doc, .persona-btn, .ptable th button { min-height: 44px; }
  .fchip { display: inline-flex; align-items: center; }
  .appbar .back { width: 44px; height: 44px; }
  .ck .acts button { min-width: 44px; min-height: 44px; }
  .split-edit .rm { min-width: 44px; min-height: 44px; }
  .thumb button { width: 30px; height: 30px; }
  .thumb button::after { content: ''; position: absolute; inset: -7px; }
  .sidebar a { min-height: 44px; }
  .contact-row a { min-height: 56px; justify-content: center; }
}
.notes-top .filters.nf { flex-wrap: wrap; overflow: visible; }
.ptable .pcell { min-width: 0; display: table-cell; }
.ptable .pcell a { white-space: nowrap; }
.ptable td.nw { white-space: nowrap; }
.ptable .mest { font-style: italic; color: #7d858e; }
.ptable td.neg .mest { color: var(--brick); }
.ptable th button { padding: 10px 10px; font-size: 10.5px; letter-spacing: .05em; }
.ptable td { padding: 8px 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1299px) {
  .ptable .pcell a { white-space: normal; display: block; max-width: 190px; }
  .ptable .pcell small { max-width: 190px; }
  .ptable .tchip { padding: 5px; } .ptable .tchip span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ptable td.nw small { display: none; }
  .ptable td.pmc { white-space: normal; }
  .ptable td small.d { display: none; }
}
@media (min-width: 1300px) and (max-width: 1499px) { .ptable .pcell a { white-space: normal; display: block; max-width: 250px; } }
@media (min-width: 1000px) { .sidebar { overflow-y: auto; } .sidebar .foot { padding-top: 14px; } }
.inbox-h { display: flex; align-items: center; gap: 8px; margin: 16px 2px 0; }
.inbox-h h3 { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--navy); }
@media (min-width: 1000px) { .home-wait { grid-template-columns: repeat(3, 1fr); } }

/* ===== Round 4b: intake form + 10 project types ===== */
.typepick.ten { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.typepick.ten button { padding: 9px 0 8px; gap: 5px; font-size: 11.5px; border-radius: 12px; min-height: 72px; }
.typepick.ten button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typepick.ten .tbadge { width: 42px; height: 42px; border-radius: 12px; }
.typepick.ten .tbadge svg { width: 28px; height: 28px; }
/* Mitigation: a project type, not a service, so it sits on its own row under the 10 services */
.typepick.ten button.ptype-only { grid-column: 1 / -1; flex-direction: row; justify-content: center; min-height: 0; padding: 6px 10px; gap: 8px; }
.typepick.ten button.ptype-only .tbadge { width: 30px; height: 30px; border-radius: 9px; }
.typepick.ten button.ptype-only .tbadge svg { width: 20px; height: 20px; }
.typepick.ten button.ptype-only small { font-weight: 500; opacity: .7; }
@media (max-width: 520px) { .typepick.ten { gap: 5px; } .typepick.ten button { font-size: 10px; letter-spacing: -.015em; } }
@media (max-width: 370px) { .typepick.ten button { font-size: 8.8px; } .typepick.ten .tbadge { width: 30px; height: 30px; } }
.typepick.invalid button { border-color: color-mix(in srgb, var(--brick) 55%, var(--lgray)); }
.intake .city-st { grid-template-columns: 1fr 96px; }
.intake select:disabled { background: var(--wash, #F3F5F8); color: var(--slate); opacity: 1; cursor: not-allowed; }
.intake .field .help svg { vertical-align: -2px; }
.intake textarea { min-height: 76px; }
.intake .field .err { margin-top: 4px; }
.ptype { width: auto; min-width: 46px; max-width: 64px; }
.ptype .tname { letter-spacing: .03em; white-space: nowrap; }
@media (max-width: 340px) { .typepick.ten { gap: 3px; } .typepick.ten button { font-size: 8.4px; letter-spacing: -.02em; } }
@media (max-width: 520px) { .intake .two.stack-phone { grid-template-columns: 1fr; gap: 0; } }

/* ===== Round 5: new-customer approvals, employee role, sample SMS ===== */
.av.emp { background: #7A5BA8; color: #fff; }
.chip.ist svg { flex: none; }
.appr-card, .qitem.entry { display: block; text-decoration: none; color: inherit; border: 1px solid transparent; transition: border-color .15s; }
.appr-card:hover, .qitem.entry:hover { border-color: var(--bright2, #9fd9ef); }
.appr-card .an, .qitem.entry .an { color: var(--navy); font-size: 15px; }
.appr-card .go, .qitem.entry .go { color: #9aa2aa; align-self: center; }
.rej-reason { margin-top: 8px; font-size: 12.5px; color: #8e3f27; background: var(--alert); border-radius: 10px; padding: 7px 10px; display: flex; gap: 6px; align-items: flex-start; }
.rej-reason svg { flex: none; margin-top: 2px; }
.success .tick.pend { background: var(--warn); color: var(--warn-t); }
.success .tick.rej { background: var(--alert); color: var(--brick); }
.bigstat { font: 800 21px var(--sans); color: var(--warn-t); margin-top: 4px; letter-spacing: -.01em; }
.bigstat.rej { color: var(--brick); }
.pend-banner { display: flex; align-items: center; gap: 10px; background: var(--warn); color: var(--warn-t); border-radius: 12px; padding: 11px 14px; margin-bottom: 12px; text-decoration: none; font-size: 13px; min-height: 44px; }
.pend-banner span { flex: 1; }
.appr-head .facts { font-size: 13px; color: #6b737c; margin-top: 2px; }
.appr-head .entered { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--lgray); font-size: 13px; color: var(--slate); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dup-warn .dline { margin-top: 4px; font-size: 12.5px; }
.dup-warn a { color: inherit; font-weight: 700; }
.ap-sel { width: 100%; border: 0; border-bottom: 2px solid var(--bright2, #4EB7DE); background: var(--input); border-radius: 10px 10px 4px 4px; padding: 12px 10px; font: 600 15px var(--sans); color: var(--navy2); min-height: 48px; }
.ap-acts { display: grid; gap: 10px; margin-top: 14px; }
.btn.danger { color: var(--brick); border-color: color-mix(in srgb, var(--brick) 35%, var(--lgray)); }
.btn.danger-fill { background: var(--brick); border-color: var(--brick); }
.tile.appr .ic { background: var(--input); color: var(--bright); }
.sidebar a.appr .badge { background: var(--bright); }
/* sample SMS mock */
.sms-label { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 auto 12px; width: max-content; max-width: 100%; background: var(--sunny); color: var(--navy); font: 800 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.phone-mock { max-width: 340px; margin: 0 auto; background: #fff; border: 10px solid #1d2230; border-radius: 42px; overflow: hidden; box-shadow: 0 18px 40px rgba(29,34,48,.25); font-family: -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif; }
.pm-status { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 4px; font-size: 13px; font-weight: 600; color: #111; }
.pm-notch { width: 90px; height: 24px; background: #1d2230; border-radius: 14px; }
.pm-head { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 12px; border-bottom: 1px solid #e6e6ea; background: #f7f7f9; }
.pm-head .pm-av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(#8e96a3, #6b7380); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.pm-head b { font-size: 14px; color: #111; }
.pm-head span:last-child { font-size: 11.5px; color: #8a8f98; }
.pm-body { padding: 18px 14px 26px; min-height: 250px; background: #fff; }
.bubble.in { background: #e9e9eb; color: #111; border-radius: 20px 20px 20px 6px; padding: 10px 14px; font-size: 15.5px; line-height: 1.35; max-width: 88%; word-wrap: break-word; }
.bubble.in a { color: #0a64d6; text-decoration: underline; }
.pm-meta { font-size: 11px; color: #8a8f98; margin: 8px 0 0 6px; }
.pm-input { border-top: 1px solid #e6e6ea; padding: 10px 14px 16px; }
.pm-input span { display: block; border: 1px solid #d6d6db; border-radius: 18px; padding: 7px 14px; color: #a0a4ab; font-size: 14px; }
.phone-mock .bubble.in { display: block; width: max-content; }
#view .card > .help, #pmNote { font-size: 12.5px; color: #7d858e; margin-top: 6px; line-height: 1.45; }
.card > label.l { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); }

/* round 7 · 2024 actual-data preview */
.real-banner { background: var(--brick); }
.datacheck ul { margin: 6px 0 6px; padding-left: 18px; }
.datacheck li { margin: 2px 0; }
.datacheck li.serious { font-weight: 700; }
a.lnk { color: #0d6f97; text-decoration: underline; text-underline-offset: 2px; }
.docgrp { border-bottom: 1px solid var(--lgray); }
.docgrp:last-of-type { border-bottom: 0; }
.docgrp summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--navy); font-size: 13.5px; }
.doc-empty { margin: 0 0 8px; font-size: 12.5px; }
.docgrp summary .cnt { color: #7d858e; font-weight: 600; margin-left: 4px; }
.doc .fi.code { width: 46px; font-size: 10px; letter-spacing: 0; white-space: nowrap; }
/* round 7 · folder access + master list */
.access-prompt { border: 1px solid var(--navy); }
.access-prompt .acts, .qitem .acts { display: flex; gap: 8px; }
.ml-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.ml-bar .searchbar { flex: 1 1 260px; }
.ml-bar label { font-size: 12px; font-weight: 700; color: var(--slate); display: flex; gap: 6px; align-items: center; }
.ml-bar select { min-height: 40px; border: 0; border-bottom: 2px solid var(--bright); border-radius: 10px 10px 4px 4px; background: var(--input); padding: 0 8px; font: 600 13px var(--sans); color: var(--navy); }
.ml-group { margin-top: 16px; }
.ml-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; flex-wrap: wrap; }
.ml-h b { color: var(--navy); font-size: 13.5px; }
.ml-h .cnt { background: var(--panel); color: var(--navy2); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.ml-h .ml-pmc { margin-left: auto; font-size: 11.5px; color: #7d858e; font-weight: 600; }
.ml-card { padding: 4px 12px; }
.ml-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--lgray); text-decoration: none; color: inherit; }
.ml-row:last-of-type { border-bottom: 0; }
.ml-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ml-main small { color: #7d858e; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ml-side small { font-size: 11px; color: #7d858e; }
.av.sm { width: 30px; height: 30px; font-size: 11px; background: var(--navy); color: #fff; }
.nt-flag { --nc: #8e3f27; --nb: var(--alert); }

/* ---------- Round 8: uploads, Accounts Payable, sub link, tiers, document viewer ---------- */
.steps { display: flex; gap: 6px; margin: 0 0 14px; }
.steps span { flex: 1; text-align: center; font: 600 11px var(--sans); color: var(--slate); background: #EEF1F5; border-radius: 999px; padding: 6px 4px; }
.steps span.on { background: var(--navy); color: #fff; }
.namebox { background: #F4F6F9; border: 1px dashed #C9D1DC; border-radius: 12px; padding: 10px 12px; margin: 6px 0 12px; display: grid; gap: 4px; }
.namebox code { font: 600 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--navy); word-break: break-word; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--navy); margin: 4px 0 8px; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--bright); flex: none; }
label.check.invalid span { color: var(--brick); }
.qitem.charge { border-left: 4px solid transparent; }
.qitem.charge .img { border: 0; padding: 0; cursor: zoom-in; background: #EEF1F5; border-radius: 10px; overflow: hidden; width: 64px; height: 64px; flex: none; }
.qitem.charge .img img, .qitem.charge .img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.fname { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--navy); word-break: break-word; }
.chip.ag { background: #EEF1F5; color: var(--slate); }
.chip.ag-yellow { background: #FFF3C4; color: #7A5B00; }
.chip.ag-orange { background: #FFE0C2; color: #9A4A00; }
.chip.ag-red { background: #F7D4CB; color: #9B2F1A; }
.qitem.charge.ag-yellow { border-left-color: #F2C230; }
.qitem.charge.ag-orange { border-left-color: #F08A24; }
.qitem.charge.ag-red { border-left-color: #D2462A; }
.aglegend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: 12px; }
.sl-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 16px; }
.sl-head b { display: block; color: var(--navy); font-size: 16px; }
.sl-head span { color: var(--slate); font-size: 12.5px; }
body.is-sublink .bottomnav, body.is-sublink .sidebar, body.is-sublink .persona-btn, body.is-sublink .brand-badge { display: none !important; }
body.is-sublink .view { max-width: 560px; }
.done-card { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 26px 18px; }
.done-card .row { width: 100%; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--done); color: var(--moss-d); display: grid; place-items: center; }
.tiersplit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tiersplit span { background: #F4F6F9; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--slate); }
.tiersplit b { color: var(--navy); }
.viewer { position: relative; background: #5B6472; border-radius: 12px; padding: 12px; display: grid; gap: 12px; max-height: 60vh; overflow: auto; user-select: none; -webkit-user-select: none; }
.viewer.tall { max-height: 68vh; }
.vpage { background: #fff; border-radius: 6px; min-height: 180px; display: grid; place-items: center; overflow: hidden; }
.vpage img, .vpage svg { max-width: 100%; display: block; }
.doc-page { aspect-ratio: 8.5 / 11; place-items: stretch; align-content: start; padding: 18px; gap: 9px; display: grid; }
.doc-page .dp-h { display: flex; gap: 8px; align-items: center; border-bottom: 2px solid var(--bright); padding-bottom: 8px; margin-bottom: 6px; font-size: 12px; color: var(--navy); }
.doc-page .dp-h span { margin-left: auto; color: var(--slate); font-size: 11px; }
.doc-page i { display: block; height: 8px; border-radius: 4px; background: #E6EAF0; }
.doc-page i:nth-child(3n) { width: 72%; } .doc-page i:nth-child(5n) { width: 55%; }
.viewer .wm { position: sticky; bottom: 0; justify-self: center; background: rgba(44,57,91,.82); color: #fff; font-size: 11px; padding: 5px 10px; border-radius: 999px; pointer-events: none; }
.tabs.grid2 { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
@media (min-width: 900px) { .tabs.grid2 { grid-template-columns: repeat(6, 1fr); } }

/* round 9: test sets */
.tsrow{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line,#E4E8EE)}
.tsrow:last-child{border-bottom:0}.tsrow.done{opacity:.55}
.tsmain{min-width:0;font-size:14px;line-height:1.4}.tsmain .fname,.fname{font-family:ui-monospace,Menlo,monospace;font-size:12px;word-break:break-all;color:#334}
.tsact{display:flex;flex-direction:column;gap:6px;flex:none}
.pill.ok{background:#E3F6EA;color:#17703A;border-radius:99px;padding:3px 10px;font-size:12px;font-weight:600}
.tabs.ts { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
.tabs.ts a { border-radius: 9px; padding: 9px 10px; font-weight: 600; font-size: 12.5px; color: var(--navy); background: var(--panel); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; text-align: center; }
.tabs.ts a.on { background: var(--navy); color: #fff; }
.tabs.ts a.on .cnt { background: rgba(255,255,255,.18); color: #fff; }
/* round 10: lead source fix */
.srcfix input { font: inherit; font-size: 15px; padding: 10px 12px; border: 0; border-bottom: 2px solid var(--blue, #16A8DD); border-radius: 8px 8px 0 0; background: var(--input, #E8F5FB); color: var(--navy, #1f2d4a); min-height: 44px; }
.srcfix input:focus { outline: 2px solid var(--blue, #16A8DD); outline-offset: 1px; }

/* Round 15: Joist-style change order document */
.co-owed { margin: 0 0 12px; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); line-height: 1.35; }
.co-doc { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(27,42,65,.12); padding: 18px 16px; margin: 10px 0; color: var(--slate); font-size: 13px; }
.co-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 3px solid var(--navy); flex-wrap: wrap; }
.co-head img { height: 44px; width: auto; }
.co-co { text-align: right; font-size: 11.5px; line-height: 1.45; }
.co-co b { color: var(--navy); font-size: 12.5px; }
.co-miss { color: #b07a00; font-style: italic; }
.co-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--band); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.co-band b, .co-parties b { display: block; color: var(--navy); font-size: 13px; }
.co-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; line-height: 1.45; }
.co-title { color: var(--navy); font-size: 16px; margin: 6px 0 8px; }
.co-lines { width: 100%; border-collapse: collapse; }
.co-lines th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--navy); padding: 7px 6px; }
.co-lines td { padding: 8px 6px; border-bottom: 1px solid var(--band); vertical-align: top; }
.co-lines td span { display: block; font-size: 11.5px; color: #6b747d; }
.co-lines .r { text-align: right; white-space: nowrap; }
.co-lines tfoot td { font-weight: 700; color: var(--navy); border-top: 1px solid var(--navy); border-bottom: 3px double var(--navy); }
.co-x { border: 0; background: none; color: #b3261e; font-size: 18px; cursor: pointer; padding: 0 4px; }
.co-notes { margin: 10px 0; font-size: 12.5px; }
.co-terms { margin-top: 12px; font-size: 11px; line-height: 1.5; color: #5b636b; background: var(--band); border-radius: 10px; padding: 10px 12px; }
.co-sign { display: flex; gap: 12px; align-items: flex-end; margin-top: 16px; flex-wrap: wrap; }
.co-sign img { height: 60px; width: auto; border-bottom: 1.5px solid var(--navy); }
.co-sigline { width: 220px; border-bottom: 1.5px solid var(--navy); height: 40px; }
.co-picks { max-height: 45vh; overflow: auto; }
.co-pick { display: block; width: 100%; text-align: left; border: 1.5px solid var(--lgray); background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; min-height: 44px; }
.co-pick.on { border-color: var(--navy); }
.co-pick b { display: block; color: var(--navy); }
.co-pick span { font-size: 12px; color: #6b747d; }
.sigpad { width: 100%; height: 130px; background: #fff; border: 1.5px dashed var(--lgray); border-radius: 10px; touch-action: none; }
.mailprev { border: 1px solid var(--lgray); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.mailprev > div { padding: 3px 0; }
.mailbody { border-top: 1px solid var(--band); margin-top: 8px; padding-top: 10px; }
.co-done { margin-top: 12px; }
.co-done-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--band); }
.co-done-row:last-of-type { border-bottom: 0; }
.co-done-row svg { flex: none; color: var(--moss-d); margin-top: 2px; }
.co-done-row > div { flex: 1; min-width: 0; font-size: 13px; }
.co-done-row b { display: block; color: var(--navy); word-break: break-word; }
.co-done-row span { display: block; font-size: 12px; color: var(--slate); word-break: break-all; }
.co-done-row em { display: block; font-style: normal; font-size: 11.5px; color: var(--mgray); }
.co-done-row .lnk { background: none; border: 0; color: var(--bright); font-weight: 600; font-size: 13px; padding: 2px 0; cursor: pointer; }
.sms { background: var(--panel); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 13.5px; margin: 6px 0 14px; }
.mailbody ul { padding-left: 18px; margin: 6px 0; }
.co-sow { margin: 4px 0 12px; padding: 12px 14px; border-left: 3px solid var(--bright); }
.co-sow .doc.missing { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 13px; opacity: .8; }
.co-sow .doc.missing .fi { background: var(--band); color: var(--mgray); }
.co-ph { margin: 4px 0 12px; padding: 12px 14px; border-left: 3px solid var(--brick); }
.co-ph-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--band); }
.co-ph-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.co-ph-row .lnk { background: none; border: 0; color: var(--brick); font-size: 12.5px; padding: 4px 0; cursor: pointer; }
.co-ph-add { margin-top: 10px; cursor: pointer; }
.co-phdoc { padding: 12px 0; border-top: 1px solid var(--band); }
.co-phgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.co-phgrid figure { margin: 0; }
.co-phgrid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; }
.co-phgrid figcaption { font-size: 12px; color: var(--navy); margin-top: 4px; }
.lw-row { margin-bottom: 10px; }
.lw-row b { color: var(--navy); }
.lw-miss { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--warn-t); background: var(--warn); border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.lw-miss svg { flex: none; margin-top: 1px; }
.lw-acts { gap: 6px; margin-top: 10px; }
.lw-doc { font-size: 13px; line-height: 1.5; }
.lw-doc p { margin: 0 0 10px; }
.lw-notice { border: 2px solid var(--navy); border-radius: 8px; padding: 10px 12px; font-size: 15px; line-height: 1.45; color: #000; margin-bottom: 12px; }
.lw-title { font-family: var(--slab); color: var(--navy); font-size: 15px; text-align: center; margin: 6px 0 10px; letter-spacing: .02em; }
.lw-kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin: 0 0 12px; font-size: 13px; }
.lw-kv dt { font-weight: 700; color: var(--slate); }
.lw-kv dd { margin: 0; color: var(--navy); }
.lw-sig dd img { max-width: 200px; height: auto; display: block; }
.lw-cite { font-size: 11px; color: var(--mgray); margin: 8px 0 0 !important; }
#cojobsel { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.lw-row, .lw-acts { min-width: 0; max-width: 100%; }
.lw-acts .btn { max-width: 100%; }
/* Round 16: referral links */
.ref-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ref-stats > div { background: #fff; border: 1px solid var(--line, #E3E6EA); border-radius: 12px; padding: 10px 6px; text-align: center; }
.ref-stats b { display: block; font-size: 22px; color: var(--navy); font-family: var(--serif, inherit); }
.ref-stats span { font-size: 11px; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; }
.ref-qr { border-radius: 10px; border: 1px solid #E3E6EA; background: #fff; image-rendering: pixelated; flex: none; }
.ref-qr.big { display: block; margin: 12px auto 8px; }
.ref-link { font-weight: 700; color: var(--navy); font-size: 16px; word-break: break-all; }
.ref-kit .caps { margin-bottom: 2px; }
.ref-prev { background: var(--input, #EAF5FB); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--slate); }
.ref-hero { text-align: center; }
.ref-hero h2 { margin: 0 0 6px; color: var(--navy); font-size: 22px; }
.ref-hero p { margin: 0; color: var(--slate); font-size: 14.5px; }
.ref-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ref-sb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; border-radius: 12px; border: 1px solid #E3E6EA; background: #fff; color: var(--navy); font: 600 12.5px var(--sans, inherit); text-decoration: none; cursor: pointer; }
.ref-sb.fb { color: #1877F2; } .ref-sb.x { color: #111; } .ref-sb.nd { color: #1B8751; }
.ref-sb span { color: var(--navy); }
.ref-banner .dline, .ref-new .dline { margin-top: 4px; }
/* Round 16b: project accounting */
.ac .caps { margin-bottom: 4px; }
.ac-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #EEF0F2; }
.ac-row span { min-width: 0; color: var(--slate); }
.ac-row b { color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-row.tot { border-bottom: 0; border-top: 2px solid #E3E6EA; font-weight: 700; }
.ac-row.tot span { color: var(--navy); font-weight: 700; }
.ac-row.net b { color: var(--moss-d); }
.ac-row.sub { font-size: 13px; padding-left: 12px; }
.ac-cat summary { list-style: none; cursor: pointer; }
.ac-cat summary::-webkit-details-marker { display: none; }
/* Round 16d: net split summary */
.ns-tbl{width:100%;border-collapse:collapse;margin-top:6px;font-size:13.5px}
.ns-tbl th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--slate);font-weight:600;text-align:left;padding:6px 4px;border-bottom:1px solid var(--line,#dde2e8)}
.ns-tbl td{padding:8px 4px;border-bottom:1px solid var(--line,#eef1f4);vertical-align:top}
.ns-tbl td span{display:block;font-size:12px;color:var(--slate)}
.ns-tbl .r{text-align:right;white-space:nowrap}
.ns-tbl tr.mine td{background:rgba(31,58,95,.05)}
.ns-tbl tr.other td b{font-weight:500}
.ns-tbl tfoot td{border-top:1.5px solid var(--navy);border-bottom:0;font-weight:700;color:var(--navy)}

/* §53.284(e)(1): the notice must be at least as large as the largest type on the form */
.lw-doc .lw-title { font-size: 15px; }
.lw-doc { font-size: 13px; }
.lw-rec { padding: 8px 0; border-bottom: 1px solid #eef1f4; }
.lw-rec .caps { font-size: 10.5px; display: block; margin-bottom: 2px; }
.lw-rec div { font-size: 13.5px; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.lw-rec div .muted { font-weight: 500; }

/* t135 project notes */
.pnotes textarea{width:100%;min-height:76px;resize:vertical}
.pn-list{margin-top:12px;border-top:1px solid var(--lgray)}
.pn{padding:10px 0;border-bottom:1px solid var(--lgray)}
.pn:last-child{border-bottom:0}
.pn-h{display:flex;align-items:center;gap:8px;font-size:13px}
.pn-h time{font-size:11.5px;color:var(--slate)}
.pn p{margin:6px 0 0;font-size:13.5px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
.doc-req input[type=text]{width:100%;box-sizing:border-box}

.pn-f{margin-top:5px}.pn-vis{font-size:11px;color:var(--slate);display:inline-flex;align-items:center;gap:4px}.pn-vis.g3{color:var(--navy)}
.pn-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.pn-links{margin-top:10px;padding-top:10px;border-top:1px dashed var(--lgray);font-size:12.5px;line-height:1.8}
.linkbtn{background:none;border:0;padding:0;color:var(--blue,#1c7fc4);font:inherit;text-decoration:underline;cursor:pointer}
.pnotes select{width:100%}
/* t140: numbers in side-by-side figure boxes line up on the same baseline even when a label wraps */
.subfig > div { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.subfig > div > b { margin-top: auto; }
.pn-h{flex-wrap:wrap;row-gap:2px}.pn-h time{white-space:nowrap}
/* t141 note replies */
.pn-f{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.pn-rbtn{margin-left:auto;background:none;border:0;padding:0 2px;min-height:44px;display:inline-flex;align-items:center;gap:5px;font:600 12.5px/1 inherit;font-family:inherit;color:var(--blue,#1f5fa8);cursor:pointer}
.pn-rbtn:hover{text-decoration:underline}.pn-rbtn:focus-visible{outline:2px solid var(--blue,#1f5fa8);outline-offset:2px;border-radius:4px}
.pn-rform{flex-basis:100%;margin-top:2px}.pn-rform textarea{width:100%;font:inherit;font-size:13.5px}
.pn-replies{margin:6px 0 0 14px;padding-left:12px;border-left:3px solid var(--lgray)}
.pn-r{padding:8px 0}.pn-r+.pn-r{border-top:1px dashed var(--lgray)}
.pn-r .pn-h{font-size:12.5px}.pn-r p{margin:5px 0 0;font-size:13.5px;line-height:1.45;overflow-wrap:anywhere}
/* t143 closed-project PM visibility */
.pmvis{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0 0;padding:8px 10px;border-radius:10px;background:var(--mist,#EEF2F6);font-size:12.5px;color:var(--navy)}
.pmvis span{display:inline-flex;align-items:center;gap:6px}.pmvis.on{background:#E7F3EC}
/* t146 lead source + t147 PM notes prompts */
.lead-extra{margin-top:10px}.lead-extra .l{display:block;margin-bottom:4px}
.srcpick select,.srcpick input{width:100%}
.pmn-wrap{display:grid;grid-template-columns:1fr;gap:10px}
.pmn-wrap textarea{min-height:140px}
.pmn-ask{background:var(--mist,#EEF2F6);border-left:3px solid var(--blue,#1f5fa8);border-radius:8px;padding:10px 12px;font-size:12.5px;color:var(--navy);order:-1}
.pmn-ask b{display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:4px}
.pmn-ask ul{margin:0;padding-left:18px;line-height:1.5}
@media (min-width:640px){.pmn-wrap{grid-template-columns:1fr 240px}.pmn-ask{order:0}}
/* t152 sub vs retail */
.ok-t{color:var(--moss,#2E7D4F);display:inline-flex;gap:4px;align-items:center}.warn-t{color:#9A4B12;display:inline;}
/* Office Inbox: Request From a PM */
.askpm{margin:12px 0;padding:12px 14px}.askpm summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:44px}.askpm summary::-webkit-details-marker{display:none}.askpm summary .ic{width:34px;height:34px;border-radius:10px;background:var(--input);color:var(--navy);display:grid;place-items:center}.askpm summary b{color:var(--navy);font-size:15px}

/* Roof Install Calendar (16y) */
.cal .calh { align-items: center; margin-bottom: 8px; } .cal .calh h2 { margin: 0; font-size: 17px; color: var(--navy); }
.cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cgrid .cw { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a929a; text-align: center; padding: 2px 0 4px; }
.cgrid .cd { min-height: 54px; border: 1px solid var(--band); border-radius: 8px; padding: 3px; background: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cgrid .cd.pad { border: 0; background: transparent; } .cgrid .cd.past { background: #f6f7f8; }
.cgrid .cd .dn { font-size: 11px; font-weight: 600; color: #5b6570; }
.cgrid .cd.today { border-color: var(--blue, #1a9bd7); box-shadow: inset 0 0 0 1px var(--blue, #1a9bd7); } .cgrid .cd.today .dn { color: var(--blue, #1a9bd7); }
.cgrid .ij { display: block; font-size: 10.5px; line-height: 1.25; font-weight: 600; color: #fff; background: var(--navy); border-radius: 4px; padding: 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ilist { padding: 4px 12px; } .irow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--band); } .irow:last-child { border-bottom: 0; }
.irow .idate { width: 44px; flex: none; text-align: center; } .irow .idate b { display: block; font-size: 12px; color: var(--navy); text-transform: uppercase; } .irow .idate span { font-size: 12px; color: #5b6570; }
.irow .imain { flex: 1; min-width: 0; text-decoration: none; color: inherit; } .irow .imain b { display: block; font-size: 14px; color: var(--navy); } .irow .imain span { display: block; font-size: 12px; color: #6b747d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instd { width: 138px; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--band); background: #eef7fc; }
.ck .acts .instd { width: 132px; }
.cgrid .ij.other { background: #c9ced3; color: #3d4650; font-weight: 600; cursor: default; }
.cgrid .ij.other { font-size: 9px; padding: 2px 2px; text-overflow: clip; text-align: center; letter-spacing: 0; }

/* Client app · Referrals (16z) */
.capp-top { display: flex; gap: 10px; align-items: center; margin: 2px 0 12px; } .capp-top b { display: block; color: var(--navy); font-size: 18px; } .capp-top span { color: var(--slate); font-size: 12.5px; }
.capp-install { display: flex; gap: 10px; align-items: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.capp-install b { display: block; font-size: 14px; } .capp-install span { font-size: 12px; opacity: .85; } .capp-install svg { flex: none; }
.capp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.capp-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--band); background: #fff; color: var(--slate); font: inherit; font-size: 12px; font-weight: 600; }
.capp-tabs button.on { background: #e6f4fb; border-color: var(--blue, #1a9bd7); color: var(--navy); }
.ref-copyrow { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.capp-share { grid-template-columns: repeat(3, 1fr); } .capp-share .ref-sb.wide { grid-column: 1 / -1; flex-direction: row; min-height: 52px; }
.capp-qr { text-align: center; margin-top: 12px; } .capp-qr summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 14px; } .capp-qr img { margin: 12px auto 6px; display: block; }
.ref-lk { display: flex; gap: 8px; align-items: baseline; font-size: 13px; margin-top: 2px; } .ref-lk span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a929a; width: 42px; flex: none; } .ref-lk b { color: var(--navy); word-break: break-all; }

/* Round 16ac: Archived projects table (read only, sortable) */
.ptable.arc tr.arc-row { cursor: default; }
.ptable.arc tr.arc-row:hover td { background: inherit; }
.ptable.arc td small.d { display: block; color: var(--muted, #6b7280); font-size: 11px; margin-top: 3px; }
.ptable.arc .chip.alert svg { vertical-align: -2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) {
  .arc-wrap { overflow: visible; border: 0; background: none; box-shadow: none; }
  .ptable.arc thead { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .ptable.arc thead tr { display: contents; }
  .ptable.arc thead th { display: block; padding: 0; border: 0; background: none; }
  .ptable.arc thead th:last-child { display: none; }
  .ptable.arc thead th button { border: 1px solid var(--line, #e5e7eb); border-radius: 999px; padding: 5px 10px; background: #fff; font-size: 12px; }
  .ptable.arc tbody, .ptable.arc tbody tr, .ptable.arc tbody td { display: block; }
  .ptable.arc tbody tr { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
  .ptable.arc tbody td { border: 0; padding: 3px 0; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .ptable.arc tbody td.pcell { display: block; padding-bottom: 6px; border-bottom: 1px solid var(--line, #e5e7eb); margin-bottom: 4px; }
  .ptable.arc tbody td:not(.pcell)::before { content: attr(data-l); font-size: 12px; color: var(--muted, #6b7280); }
  .ptable.arc tbody td:last-child::before { content: ''; }
  .ptable.arc tbody td small.d { display: inline; margin: 0 0 0 6px; }
}
@media (max-width: 760px) {
  .ptable.arc thead th button { color: var(--navy, #1f2a44) !important; text-transform: none; letter-spacing: 0; font-weight: 600; height: auto; }
  .ptable.arc thead th { position: static; height: auto; }
  .ptable.arc thead th[aria-sort="ascending"] button, .ptable.arc thead th[aria-sort="descending"] button { background: var(--navy, #1f2a44); color: #fff !important; border-color: var(--navy, #1f2a44); }
  .ptable.arc thead th::after { display: none; }
  .ptable.arc tbody td { min-height: 0; height: auto; line-height: 1.3; }
  .ptable.arc tbody td .btn { width: 100%; justify-content: center; }
}

.filters .flab { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7280); align-self: center; margin-right: 2px; }

/* 16ad closeout paid */
.cp-prev { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cp-prev img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line, #e5e7eb); }
.fchip.on { background: var(--navy, #1f2a44); color: #fff; border-color: var(--navy, #1f2a44); }

/* ---------- Round 16ae: PM Advances ---------- */
.adv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.adv-card { all: unset; box-sizing: border-box; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; border: 1.5px solid transparent; min-height: 44px; }
.adv-card[disabled] { cursor: default; }
.adv-card:focus-visible { outline: 2px solid var(--bright2); outline-offset: 2px; }
.adv-card.on { border-color: var(--navy); }
.adv-card span { font-size: 12px; font-weight: 600; color: var(--slate); }
.adv-card b { font-size: 19px; color: var(--navy); font-variant-numeric: tabular-nums; }
.adv-card b.neg, .ptable.adv .neg { color: var(--brick); }
.adv-card small { font-size: 11px; color: #8a929a; }
.adv-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.adv-f { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: #6b737c; text-transform: uppercase; letter-spacing: .05em; }
.adv-f select, .adv-f input { min-height: 40px; border: 1px solid var(--lgray); border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--slate); background: #fff; }
.adv-tools .btn { margin-left: auto; min-height: 40px; }
.adv-note { margin: 0 0 10px; }
.ptable.adv td { height: auto; }
.ptable.adv .adv-notes { min-width: 180px; }
.ptable.adv .adv-flag { color: #8A5A00; }
.ptable.adv .adv-flag svg { vertical-align: -1px; }

/* 16af · Sub Notes & Gallery */
.sn-name { color: inherit; text-decoration: none; }
.sn-name:hover { text-decoration: underline; }
.sn-open .cnt, .tabs .cnt { margin-left: 4px; }
.sn-note { padding: 14px; margin-top: 10px; }
.sn-note .av { width: 34px; height: 34px; border-radius: 50%; background: var(--navy, #2C395B); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.sn-text { margin: 10px 0 4px; white-space: pre-wrap; line-height: 1.45; }
.sn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sn-th { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); padding: 0; background: #f3f4f7; cursor: pointer; }
.sn-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sn-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20,25,40,.75); color: #fff; font-size: 15px; line-height: 20px; cursor: pointer; }
.sn-add { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.sn-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sn-gi { border: 0; padding: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer; text-align: left; }
.sn-gi img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sn-gi span { display: block; padding: 6px 8px; font-size: 11.5px; color: #5b6275; }
.sn-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #111; }

/* 16ag · Project Calendar (Gantt month) */
.contact-row a .cnt { position: absolute; margin: -4px 0 0 34px; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; background: var(--bright); color: #fff; display: inline-grid; place-items: center; padding: 0 5px; }
.contact-row a { position: relative; }
.gantt { margin-top: 8px; border: 1px solid #e6e8ee; border-radius: 12px; overflow: hidden; }
.gw-h { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gw-h div { padding: 7px 6px; text-align: center; }
.gw { position: relative; border-top: 1px solid #e6e8ee; min-height: 74px; }
.gw-d { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.gw-d div { border-left: 1px solid #eef0f4; padding: 4px 6px; font-size: 12px; font-weight: 600; color: #3b4150; }
.gw-d div:first-child { border-left: 0; }
.gw-d div.out { background: #fafbfc; color: #b5bac4; }
.gw-d div.today span { background: var(--bright); color: #fff; border-radius: 999px; padding: 1px 7px; }
.gw-b { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-flow: row dense; gap: 4px 0; padding: 26px 0 8px; }
.gbar { height: 24px; margin: 0 4px; border: 0; border-radius: 6px; color: #fff; font-size: 11.5px; font-weight: 600; text-align: left; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gbar.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gbar.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.t-lab { background: var(--navy, #2C395B); } .t-mat { background: var(--bright, #16A8DD); } .t-oth { background: #7a8599; }
.glegend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: #5b6275; }
.glegend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.alist { padding: 2px 6px; }
.arow { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; border-bottom: 1px solid #eef0f4; padding: 11px 6px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.arow:last-child { border-bottom: 0; }
.adot { width: 10px; height: 34px; border-radius: 4px; flex: none; }
.ckline { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; margin: 2px 0 10px; }
@media (max-width: 600px) { .gbar { font-size: 10.5px; padding: 0 5px; height: 22px; } .gw-d div { padding: 3px 4px; font-size: 11px; } }
/* 16ag · project calendar takes the project type's color (Storm navy, Water blue, Fire rust, Remodel amber) */
.pcal-type { display: flex; gap: 10px; align-items: center; background: var(--tb); border-left: 4px solid var(--tc); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.pcal-type b { color: var(--tc); font-size: 14px; }
.pcal .gw-h { background: var(--tc); }
.pcal .gw-d div.today span { background: var(--tc); }
.pcal .gantt { border-color: color-mix(in srgb, var(--tc) 25%, #e6e8ee); }
.pcal .t-lab { background: var(--tc); color: #fff; }
.pcal .t-mat { background: var(--tb); color: var(--tc); box-shadow: inset 0 0 0 1.5px var(--tc); }
.pcal .glegend i.t-mat { box-shadow: inset 0 0 0 1.5px var(--tc); }
.pcal #actAdd { background: var(--tc); border-color: var(--tc); }
.pcal .section-h h2::before { background: var(--tc); }
/* r16ah: schedule a sub, quotes, trade colors */
.job-subarea { margin: 14px 0 2px; }
.job-subacts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.job-subacts .btn { min-height: 44px; justify-content: center; text-align: center; }
.job-sublist { display: grid; gap: 6px; margin-top: 8px; }
.job-subline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; padding: 8px 12px; border: 1px solid var(--lgray); border-radius: 10px; background: #fff; text-decoration: none; color: var(--navy); }
.job-subline b { font-size: 13.5px; }
.job-subline span { font-size: 12.5px; color: var(--slate); }
.sub-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.sub-actions .btn.primary{flex:1 1 100%}
.sub-actions .btn.ghost{flex:1 1 0}
.tcol-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:6px 14px}
.tcol{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--line,#e6e8ee);font-size:13.5px}
.tcol-sw{width:22px;height:22px;border-radius:6px;flex:none;display:grid;place-items:center;border:1px dashed #b9bfcc;color:#9aa1b1}
.tcol-sw[style*="background"]{border:0}
.tcol input[type=color]{width:34px;height:28px;padding:0;border:1px solid var(--line,#e6e8ee);border-radius:6px;background:#fff;cursor:pointer}
.msgprev{white-space:pre-wrap;background:#F4F6FA;border:1px solid var(--line,#e6e8ee);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.45;margin-top:4px}
.qrow .tsact{display:flex;flex-direction:column;gap:6px;align-items:flex-end}
@media (max-width:640px){.qrow{flex-direction:column}.qrow .tsact{flex-direction:row;flex-wrap:wrap;align-items:flex-start;margin-top:8px}}
.tcol input[type=color].unset{opacity:.55;border-style:dashed}
/* 16ai Project Calendar embedded on the project page, with Full Screen */
.jcal { padding: 12px; }
.jcal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.jcal-top .calh { flex: 1 1 260px; margin: 0; }
.jcal-top .calh h2 { font-size: 17px; margin: 0; }
.jcal-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.jcal #jcalAdd { background: var(--tc); border-color: var(--tc); color: #fff; }
.jcal-more { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--tc); text-decoration: none; text-align: right; }
.jcal-title { display: flex; gap: 10px; align-items: center; width: 100%; font-size: 13px; padding-bottom: 8px; border-bottom: 3px solid var(--tc); margin-bottom: 4px; }
.jcal-title b { color: var(--tc); font-size: 18px; }
.jcal-full { position: fixed; inset: 16px; z-index: 80; margin: 0; overflow: auto; box-shadow: 0 20px 60px rgba(28,36,58,.35); padding: 18px 22px; }
.jcal-full .gbar { height: 30px; font-size: 13px; }
.gbar.gbar-mine, .pcal .gbar.gbar-mine, .jcal .gbar.gbar-mine { height: 36px; font-size: 15px; font-weight: 800; background: #b42318 !important; color: #fff !important; }
.jcal-full .gbar.gbar-mine { height: 42px; font-size: 16px; }
@media (max-width: 600px) { .gbar.gbar-mine, .pcal .gbar.gbar-mine, .jcal .gbar.gbar-mine { height: 32px; font-size: 14px; padding: 0 8px; } }
.jcal-full .jcal-top .calh h2 { font-size: 22px; }
.jcal-scrim { position: fixed; inset: 0; background: rgba(28,36,58,.55); z-index: 79; }
body.jcal-lock { overflow: hidden; }
@media (max-width: 700px) { .jcal-full { inset: 0; border-radius: 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); } .jcal-actions { margin-left: 0; width: 100%; } .jcal-actions .btn { flex: 1; justify-content: center; } }
.jcal-full .gw { min-height: max(90px, calc((100vh - 270px) / 6)); }
@media (max-width: 700px) { .jcal-full .gw { min-height: max(74px, calc((100vh - 290px) / 6)); } }
.notify-box { background: var(--panel, #eef3f8); border: 1px solid #dde4ee; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.notify-box .ckline svg { color: var(--bright); }
.notify-box .help { margin-top: 4px; }
/* 16ak Projects: Active vs All toggle, secondary scopes, List vs Group by Stage */
.scope-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #fff; border-radius: 14px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 8px; max-width: 560px; }
.scope-toggle button { border: 0; background: transparent; border-radius: 10px; padding: 12px 10px; font: inherit; font-weight: 700; font-size: 14px; color: #5b6275; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; }
.scope-toggle button.on { background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(44,57,91,.25); }
.scope-toggle .cnt { font-size: 11.5px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--panel); color: var(--navy); }
.scope-toggle button.on .cnt { background: rgba(255,255,255,.2); color: #fff; }
.scope-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 12px; font-size: 12.5px; }
.scope-more > button { border: 1px solid #dde2ea; background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6275; cursor: pointer; }
.scope-more > button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.scope-more .cnt { font-weight: 700; margin-left: 2px; }
.view-toggle { display: inline-flex; background: #fff; border: 1px solid #dde2ea; border-radius: 10px; padding: 3px; gap: 2px; }
.view-toggle button { border: 0; background: transparent; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: #5b6275; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.view-toggle button.on { background: var(--bright); color: #fff; }
@media (max-width: 600px) { .scope-more .grow { display: none; } .view-toggle { width: 100%; } .view-toggle button { flex: 1; justify-content: center; } }
/* 16an: change order signature blocks with date and time stamps */
.co-sigs { display: grid; gap: 14px; margin-top: 16px; }
.co-sigs .co-sign { display: block; margin-top: 0; padding-top: 6px; }
.co-sigs .co-sign img { display: block; height: 56px; border-bottom: 0; }
.co-sigs .co-sigline { height: 56px; border: 0; }
.co-sigmeta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; border-top: 1.5px solid var(--navy); padding-top: 5px; }
.co-sigmeta > div { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.co-sigmeta .caps { font-size: 9.5px; letter-spacing: .08em; }
.co-sigmeta b { color: var(--navy); }
.co-stamp .muted { font-size: 11px; }
.co-stampline { display: block; height: 16px; }
.co-stampnow { font-size: 12.5px; color: #5b636b; background: var(--band); border-radius: 8px; padding: 9px 11px; }

/* 16aq · PM My Calendar: project activities next to roof installs */
.cgrid .ij.act { background: #e6eef7; color: var(--navy); border: 1px solid #b9c9dc; }

/* 16ax Design Approvals */
.da-wrap > .section-h { flex-wrap: wrap; row-gap: 8px; }
.da-head-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: 1 1 12rem; min-width: 0; }
.da-head-actions .btn { flex: none; }
.da-list .da-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line, #E5E5E4); }
.da-list .da-row:last-child { border-bottom: 0; }
.da-list .da-main { min-width: 0; flex: 1; }
.da-list .da-main b { color: var(--navy); display: block; }
.da-list .da-main .facts { font-size: 12.5px; color: var(--slate); margin-top: 2px; }
.da-list .da-meta-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; text-align: right; }
.da-list .da-meta-col .lnk { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; min-height: 44px; }
.da-meta { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 8px 0 12px; }
.da-meta dt { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-top: 8px; }
.da-meta dd { margin: 0; color: var(--navy); font-size: 13.5px; line-height: 1.45; }
.da-files ul, .da-filelist { list-style: none; margin: 6px 0 0; padding: 0; }
.da-files li, .da-filelist li { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; color: var(--navy); }
.da-filelist .lnk { margin-left: auto; background: none; border: 0; cursor: pointer; }
.da-doc .co-terms { line-height: 1.55; }
/* 16ay · Sub Active / Inactive */
.sub-filter { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.sub-filter input[type=search] { min-height: 44px; }
.sub-seg button { min-height: 44px; }
.sub-row { align-items: flex-start; gap: 12px; }
.sst-switch { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 6px 10px 6px 6px; border: 1.5px solid var(--lgray); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; font-size: 12.5px; color: #7d858e; order: 2; margin-left: auto; }
.sst-switch .knob { width: 38px; height: 22px; border-radius: 999px; background: var(--lgray); position: relative; transition: background .15s; }
.sst-switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.sst-switch.on { border-color: var(--navy); color: var(--navy); }
.sst-switch.on .knob { background: var(--navy); }
.sst-switch.on .knob::after { left: 19px; }
.sst-switch:focus-visible { outline: 3px solid var(--bright2, #4a90d9); outline-offset: 2px; }
.sst-req { flex: none; order: 2; margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }
.sub-row .tsmain { order: 1; flex: 1; min-width: 0; }
.sub-avail-help .lnk, .sub-row .lnk.sn-name { display: inline-flex; align-items: center; min-height: 44px; }
.act-req .tsact .btn { min-height: 44px; }
/* 16ba · Accept Credit Card */
.card-pay .card-calc { margin-top: 12px; border-top: 1px solid var(--lgray); padding-top: 12px; }
.card-pay .card-notice { font-size: 13px; line-height: 1.45; }
.card-pay #cardCopy { min-height: 44px; }
.card-pay .card-sw { order: 0; margin-left: 0; }
.card-pay #cardAmt { min-height: 44px; }
/* 16bb · Add Link */
.link-box { margin-top: 10px; }
.link-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.link-item { display: flex; align-items: stretch; gap: 6px; }
.link-a { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--lgray); border-radius: 10px; background: #fff; color: var(--navy); text-decoration: none; }
.link-a:hover, .link-a:focus-visible { border-color: var(--bright); }
.link-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #EAF3F7; color: var(--navy); }
.link-t { min-width: 0; display: flex; flex-direction: column; text-align: left; }
.link-t b { font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-t small { font-size: 11.5px; color: var(--slate, #5B6478); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-rm { flex: none; width: 44px; min-height: 44px; border: 1px solid var(--lgray); border-radius: 10px; background: #fff; color: var(--brick, #A33); font-size: 20px; line-height: 1; cursor: pointer; }
.link-open { min-height: 44px; }
.link-form { margin-top: 8px; padding: 12px; border: 1px dashed var(--lgray); border-radius: 12px; background: #FAFAF9; text-align: left; }
.link-form .field { margin-bottom: 10px; }
.link-form .btn { min-height: 44px; }
.link-list.compact { margin-top: 6px; }
.link-list.compact .link-a { padding: 4px 10px; }
.link-list.doc .link-a { border-style: dashed; }
.cap-links { margin-top: 4px; text-align: left; width: 100%; }

/* 16bd · collapsible project sections */
.section-h.sec-toggle { cursor: pointer; min-height: 44px; margin-bottom: 6px; border-radius: 10px; user-select: none; -webkit-tap-highlight-color: transparent; }
.section-h.sec-toggle:hover h2 { color: var(--bright); }
.section-h.sec-toggle:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.section-h.sec-toggle > :first-child { margin-right: auto; }
.sec-chev { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--panel); color: var(--navy); flex: none; transition: transform .18s; transform: rotate(90deg); }
.section-h.sec-closed .sec-chev { transform: rotate(0deg); }
.section-h.sec-closed { margin-bottom: 0; opacity: .85; }
.sec-hidden { display: none !important; }
.sec-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 12px 2px 0; font-size: 12px; }
.sec-bar .btn.small { min-height: 44px; padding: 8px 14px; }
.sec-bar .muted { margin-right: auto; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: 11px; }
/* 16be · acknowledge + missed updates */
.note-w { display: flex; flex-direction: column; border-radius: 12px; }
.note-w > .note { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.note-w .ack-strip { border: 1px solid var(--lgray); border-top: 0; border-radius: 0 0 12px 12px; background: #fff; }
.ack-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px 6px 12px; font-size: 12px; font-weight: 600; min-height: 44px; }
.ack-strip span { display: inline-flex; align-items: center; gap: 6px; }
.ack-strip.ok { color: #4f7a3a; background: #f4f8f1 !important; }
.ack-strip.wait { color: var(--slate); background: #faf7ef !important; }
.ack-strip.need { color: var(--brick); background: #fdf3ef !important; }
.note-w.unack .ack-strip, .note-w.unack > .note { border-color: #efc9bb; }
.ack-strip .ack-btn { min-height: 44px; padding: 8px 14px; }
.pn > .ack-strip { margin: 8px -2px 0; border-radius: 10px; }
.nthread .ack-strip { margin-top: 10px; border-radius: 10px; }
.chip.missed { background: var(--brick); color: #fff; border: 0; }
.chip.missed.soft { background: #fdf3ef; color: var(--brick); border: 1px solid #efc9bb; }
.missed-banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 12px 0 0; padding: 12px 14px; min-height: 56px; border-radius: 14px; border: 1px solid #efc9bb; background: #fdf3ef; color: var(--brick); font: inherit; cursor: pointer; }
.missed-banner span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.missed-banner b { font-size: 14px; }
.missed-banner small { color: var(--slate); font-size: 12px; }
.missed-banner.soft { background: #fff; }
@media (max-width: 999px) { .job-cols .missed-banner { order: -2; } }
.tile.missed-tile { border-color: #efc9bb; background: linear-gradient(120deg, #fff 55%, #fdf3ef); }
.tile.missed-tile .count { background: var(--brick); }

/* Next version: one open-job list, sample notices, role actions */
.av.sub { background: var(--slate); }
.av.client { background: var(--brick); }
.tabs a { flex: 1; text-decoration: none; text-align: center; border-radius: 9px; padding: 9px 10px; font-weight: 600; font-size: 12.5px; color: var(--navy); background: var(--panel); white-space: nowrap; }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs a .cnt { font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--panel); color: var(--navy); margin-left: 4px; }
.tabs a.on .cnt { background: rgba(255,255,255,.18); color: #fff; }
.sample-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: repeating-linear-gradient(-45deg, #F5A61C 0 8px, #F3BB58 8px 16px); padding: 3px 8px; border-radius: 6px; }
.channels { display: grid; gap: 10px; margin-top: 12px; }
.channel { border: 1px solid var(--lgray); border-radius: 14px; padding: 12px; background: var(--bg); }
.channel .ch-h { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin: 8px 0; }
.appnote { background: #fff; border-radius: 12px; padding: 12px; color: var(--navy); border: 1px solid var(--lgray); }
.mail { background: #fff; border-radius: 12px; padding: 12px; border: 1px solid var(--lgray); }
.mail .subj { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.item-row { padding: 12px 0; border-bottom: 1px solid var(--band); }
.item-row:last-child { border-bottom: 0; }
.hist { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--band); }
.hist:last-child { border-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-card { border: 1px solid var(--lgray); border-radius: 12px; overflow: hidden; background: #fff; }
button.photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.photo-card img { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--panel); }
.photo-card .cap { padding: 8px 10px 10px; font-size: 12.5px; }
.acts-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.acts-row .btn { flex: 1; min-width: 120px; }
.nlink { display: block; text-decoration: none; color: inherit; }
.nlink .facts { margin-top: 6px; }

.newpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.newpick a { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 4px; border-radius: 16px; background: var(--panel); color: var(--navy); font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; }
.newpick .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.newpick .c-client .ic { background: #2C395B; }
.newpick .c-note .ic { background: #16A8DD; }
.newpick .c-upload .ic { background: #778D66; }
.newpick .c-co .ic { background: #F5A61C; color: #2C395B; }
.newpick .c-appt .ic { background: #4C5941; }
.newpick .c-sub .ic { background: #C66A4D; }
.newpick .c-ref .ic { background: #8A5A00; }
.newpick .c-call .ic { background: #0E7490; }
.newpick .c-proj .ic { background: #434B55; }

.sizebar { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.sizebar span { font-weight: 700; color: var(--navy); line-height: 1; }
.sizebar span.big { font-size: 26px; }
.sizebar input[type=range] { flex: 1; height: 28px; accent-color: var(--bright); }
html[data-theme="dark"] {
  --bg: #161b26; --slate: #d5dbe4; --lgray: #3a4356; --band: #222838; --panel: #2a3144; --input: #243044;
  --warn: #3a2e18; --warn-t: #f3c56b; --alert: #3a2822; --done: #243028;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--slate); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] .caps, html[data-theme="dark"] a { color: #e7edf6; }
html[data-theme="dark"] .appbar h1, html[data-theme="dark"] .hello h2, html[data-theme="dark"] .hello .stats div b,
html[data-theme="dark"] .motto, html[data-theme="dark"] .bottomnav .motto { color: #fff; }
html[data-theme="dark"] .card, html[data-theme="dark"] .tile, html[data-theme="dark"] .client,
html[data-theme="dark"] .searchbar, html[data-theme="dark"] .dash-head, html[data-theme="dark"] .ck,
html[data-theme="dark"] .bottomnav, html[data-theme="dark"] .btn.danger,
html[data-theme="dark"] .stage-jumps button, html[data-theme="dark"] .fchip, html[data-theme="dark"] .seg button,
html[data-theme="dark"] .consent, html[data-theme="dark"] .cm-panel, html[data-theme="dark"] .sheet,
html[data-theme="dark"] .signin-card { background: #222838; color: var(--slate); }
html[data-theme="dark"] .bottomnav a { color: #9aa3b2; }
html[data-theme="dark"] .bottomnav a.on { color: #fff; }
html[data-theme="dark"] .muted, html[data-theme="dark"] .stage-note { color: #aeb6c2; }

.call-rec-wrap { display: flex; justify-content: center; margin: 8px 0 12px; }
.call-rec { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 240px; min-height: 72px; padding: 16px 28px; border: 0; border-radius: 999px; background: #C62828; color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.call-rec .dot { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.28); flex: none; }
.call-rec.on { background: #8E1B1B; }

.qlist { display: flex; flex-direction: column; gap: 8px; }
.qline { display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; border: 0; background: var(--panel); color: var(--navy); border-radius: 12px; padding: 12px; font: 700 16px var(--sans); text-decoration: none; cursor: pointer; }

#signin-face { margin-top: 10px; }

/* Add Photo sheet only. Entry boxes use the same radius as other form fields. */
.photo-add .field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0 0 14px; }
.photo-add .l, .photo-add label.l { display: block; width: 100%; margin: 0; font-size: 14px; font-weight: 700; color: var(--navy); text-transform: none; letter-spacing: 0; line-height: 1.3; }
.photo-add .req::after { content: ' *'; color: var(--brick); }
.photo-add .photo-choose { min-height: 72px; width: 100%; font-size: 18px; padding: 18px 20px; border-radius: 12px; }
.photo-add input:not([type=file]), .photo-add textarea {
  display: block; width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 14px;
  border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); color: var(--navy2);
  border-radius: 10px 10px 4px 4px; font-size: 16px; font-weight: 500; }
.photo-add textarea { min-height: 120px; resize: vertical; }
.photo-add input:not([type=file]):focus, .photo-add textarea:focus { outline: none; border-bottom-color: var(--navy); background: #d9f0fa; }
.photo-add .help { font-size: 12px; color: #7d858e; margin: 0 0 10px; }
.photo-add .err { font-size: 12px; color: var(--brick); font-weight: 600; margin: 0 0 10px; }

/* Type-in fields match the Phone Call entry boxes: light blue fill, blue line underneath. */
input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea {
  width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--bright2);
  background: var(--input); color: var(--navy2); border-radius: 10px 10px 4px 4px;
  padding: 12px 12px; font-size: 16px; outline: none; font-weight: 500; }
input:not([type]):focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus { background: #d9f0fa; border-bottom-color: var(--navy); }
.searchbar input { border: 0; border-bottom: 0; border-radius: 0; outline: 0; padding: 12px 0; flex: 1; width: auto; background: transparent; min-width: 0; font-size: inherit; font-weight: inherit; color: inherit; }
.searchbar input:focus { background: transparent; border-bottom-color: transparent; }
/* AI summary and key points are not type-in. */
#callSum, #callPts, #callSum:focus, #callPts:focus { background: var(--panel); border-bottom-color: var(--mgray); }

/* Subcontractor reviews */
.rev-amazon .rev-co { padding: 12px 0; border-top: 1px solid var(--line); }
.rev-cohead { font-size: 15px; color: var(--navy); }
.rev-score { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev-score b { font-size: 28px; line-height: 1; color: var(--navy); }
.rev-pips { display: inline-flex; gap: 3px; }
.rev-pips i { width: 10px; height: 10px; border-radius: 2px; background: var(--lgray); display: block; }
.rev-pips i.on { background: #e6a817; }
.rev-drop summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; list-style: none; min-height: 44px; }
.rev-drop summary::-webkit-details-marker { display: none; }
.rev-one { padding: 10px 0; border-top: 1px solid var(--line); }
.rev-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rev-one p { margin: 6px 0 0; }
.sst-switch.rev-sw { order: 0; margin-left: auto; }
.rate-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.rate-pick button { min-width: 40px; min-height: 40px; border: 0; border-bottom: 2px solid var(--bright2); background: var(--input); color: var(--navy); border-radius: 10px 10px 4px 4px; font-weight: 700; cursor: pointer; }
.rate-pick button.on { background: var(--navy); color: #fff; border-bottom-color: var(--navy); }
.rev-togrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.enter-as { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 14px; }
.enter-as .btn.block { width: 100%; }
.enter-pick[hidden] { display: none !important; }
.viewas-bar { margin: 0 0 12px; }
.viewas-bar .btn { margin-bottom: 6px; }

/* Sub schedule change: four type-in fields, gap before the request button. */
.sch-when { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin: 4px 0 22px; }
.sch-when .field { margin: 0; }
.sch-when .l { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; text-transform: none; letter-spacing: 0; }
.sch-when input[type="date"], .sch-when input[type="time"] {
  width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--bright2);
  background: var(--input); color: var(--navy2); border-radius: 10px 10px 4px 4px;
  padding: 12px 12px; font-size: 16px; outline: none; font-weight: 500; }
.sch-when input[type="date"]:focus, .sch-when input[type="time"]:focus { background: #d9f0fa; border-bottom-color: var(--navy); }
@media (max-width: 520px) { .sch-when { grid-template-columns: 1fr; } }

/* Subcontractor Tools home only. PM home is not inside this wrapper. */
.sub-tools-home .btn,
.sub-tools-home .btn.small {
  font-size: 18px;
}
.sub-tools-home .btn.ghost {
  background: #efe6d6;
  color: #6b3f12;
}
.sub-tools-home .calh .btn:first-child {
  background: #C46A12;
  color: #fff;
}
.sub-tools-home .calh .btn:last-child {
  background: #F3BB58;
  color: #2C395B;
}
.sub-tools-home .calh .btn:first-child:hover { background: #A85A0C; color: #fff; }
.sub-tools-home .calh .btn:last-child:hover { background: #E0A43A; color: #2C395B; }
.sub-tools-home .sub-home-actions .btn.primary:nth-child(1) {
  background: #F5A61C;
  color: #2C395B;
}
.sub-tools-home .sub-home-actions .btn.primary:nth-child(2) {
  background: #E09510;
  color: #2C395B;
}
.sub-tools-home .sub-home-actions .btn.primary:nth-child(1):hover { background: #E09510; color: #2C395B; }
.sub-tools-home .sub-home-actions .btn.primary:nth-child(2):hover { background: #C9840E; color: #2C395B; }
.sub-tools-home .qline .btn.primary,
.sub-tools-home .qline .btn.primary.small {
  background: #D9892B;
  color: #2C395B;
}
.sub-tools-home .qline .btn.primary:hover { background: #C47A1E; color: #2C395B; }

.sidebar a.btn.side-apps {
  display: inline-flex;
  width: calc(100% - 8px);
  margin: 0 4px 12px;
  background: #fff;
  color: #2C395B;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 14px;
  justify-content: center;
}
.sidebar a.btn.side-apps:hover { background: #e8eef6; color: #2C395B; }
.co-brand a.btn {
  border-radius: 12px;
  font-size: 15px;
  padding: 10px 14px;
  background: #2C395B;
  color: #fff;
}

/* Subcontractor chrome only. body.is-sub is set in render() when role() === 'sub'
   and removed on the next render when that role ends. PM rules above are unchanged.
   Do not override --bright here: stage stripes, trade bars, and status chips share it. */
body.is-sub { background: #FBF6EF; }
body.is-sub .view { background: #FBF6EF; }
body.is-sub .card { background: #fff; border-color: rgba(196, 122, 16, .16); }
body.is-sub .appbar { border-bottom-color: #F5A61C; }
body.is-sub .bottomnav .motto { border-top-color: #F5A61C; }
body.is-sub .newbar { border-bottom-color: #F5A61C; }
body.is-sub .sidebar { border-right-color: #F5A61C; }
body.is-sub .sidebar a.on { background: rgba(245, 166, 28, .22); color: #fff; box-shadow: inset 3px 0 0 #F5A61C; }
body.is-sub .bottomnav a.on { color: #2C395B; }
body.is-sub .bottomnav a.on svg { color: #E09510; }
body.is-sub .bottomnav a .fab { background: #F5A61C; color: #2C395B; box-shadow: 0 6px 16px rgba(245, 166, 28, .4); }
body.is-sub .bottomnav a .fab svg,
body.is-sub .bottomnav a.on .fab svg { color: #2C395B; }
body.is-sub .btn.primary { background: #F5A61C; color: #2C395B; box-shadow: 0 4px 12px rgba(245, 166, 28, .35); }
body.is-sub .btn.primary:hover { background: #E09510; color: #2C395B; }
body.is-sub .tabs button.on,
body.is-sub .tabs a.on,
body.is-sub .tabs.ts a.on,
body.is-sub .view-toggle button.on,
body.is-sub .scope-toggle button.on { background: #F5A61C; color: #2C395B; }
body.is-sub .tabs a.on .cnt,
body.is-sub .tabs button.on .badge,
body.is-sub .tabs.ts a.on .cnt,
body.is-sub .scope-toggle button.on .cnt { background: rgba(44, 57, 91, .12); color: #2C395B; }
/* Task Queue count is always a light blue circle with white numbers.
   The selected tab itself stays orange. */
body.is-sub .tabs.ts a[href*="tab=queue"] .cnt,
body.is-sub .sidebar a[data-nav="queue"] .badge,
body.is-sub .bottomnav a[href*="tab=queue"] .badge.nb,
body.is-sub .sub-queue-tab .section-h .badge.blue,
body.is-sub .tabs.ts a.on[href*="tab=queue"] .cnt,
body.is-sub .sidebar a.on[data-nav="queue"] .badge,
body.is-sub .bottomnav a.on[href*="tab=queue"] .badge.nb {
  background: #16A8DD;
  color: #fff;
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
}
body.is-sub .capp-tabs button.on { background: #FFF6E8; border-color: #F5A61C; color: #2C395B; }
body.is-sub .section-h h2::before,
body.is-sub .dash-head::before { background: #F5A61C; }
body.is-sub .pcal .section-h h2::before { background: var(--tc); }
body.is-sub .hello::after { border-color: rgba(245, 166, 28, .28); }
body.is-sub .av { background: #F5A61C; color: #2C395B; }
body.is-sub .av.pm2 { background: var(--moss); color: #fff; }
body.is-sub .av.office { background: var(--sunny); color: var(--navy); }
body.is-sub .av.owner { background: #fff; color: var(--navy); }
body.is-sub .av.sm { background: var(--navy); color: #fff; }
body.is-sub .tile .ic,
body.is-sub .tile.appr .ic { background: #FFF6E8; color: #C47A10; }
body.is-sub .tile.owner .ic { background: var(--navy); color: #fff; }
body.is-sub .tile.later .ic { background: var(--band); color: var(--mgray); }
body.is-sub .lx-hero { border-top-color: #F5A61C; }
body.is-sub .lx-go { background: #FFF6E8; color: #C47A10; }
body.is-sub .label-line .sep,
body.is-sub .doc .go,
body.is-sub .co-done-row .lnk,
body.is-sub .is-box.link span,
body.is-sub .contact-row a svg,
body.is-sub .contact-line button svg,
body.is-sub .capture .cam,
body.is-sub .ck.due .ico,
body.is-sub .notify-box .ckline svg,
body.is-sub .persona .check,
body.is-sub details.more summary::after,
body.is-sub .section-h.sec-toggle:hover h2 { color: #C47A10; }
body.is-sub a.lnk { color: #C47A10; }
body.is-sub .co-ph-row .lnk { color: var(--brick); }
body.is-sub .ck.due .ico { background: #FFF6E8; border-color: #F5A61C; }
body.is-sub .persona.on { border-color: #F5A61C; background: #FFF6E8; }
body.is-sub .link-a:hover,
body.is-sub .link-a:focus-visible { border-color: #F5A61C; }
body.is-sub .cgrid .cd.today { border-color: #F5A61C; box-shadow: inset 0 0 0 1px #F5A61C; }
body.is-sub .cgrid .cd.today .dn { color: #C47A10; }
body.is-sub .gw-d div.today span { background: #F5A61C; color: #2C395B; }
body.is-sub .pcal .gw-d div.today span { background: var(--tc); color: #fff; }
body.is-sub .capture { border-color: #F3BB58; background: linear-gradient(180deg, #fffaf2, #fff6e8); }
body.is-sub .tile.attn { background: linear-gradient(120deg, #fff 55%, #FFF6E8); border-color: #F3D7A0; }
body.is-sub :focus-visible { outline-color: #F5A61C; }
body.is-sub .typepick button:focus-visible,
body.is-sub .ptable th button:focus-visible,
body.is-sub .adv-card:focus-visible,
body.is-sub .sst-switch:focus-visible,
body.is-sub .section-h.sec-toggle:focus-visible,
body.is-sub .pn-rbtn:focus-visible,
body.is-sub .srcfix input:focus { outline-color: #F5A61C; }
body.is-sub input,
body.is-sub .consent input,
body.is-sub label.check input,
body.is-sub .sizebar input[type=range] { accent-color: #F5A61C; }

/* Type-in fields: warm cream + orange underline. Selects and other non-type-in stay gray. */
body.is-sub input:not([type]),
body.is-sub input[type="text"],
body.is-sub input[type="email"],
body.is-sub input[type="password"],
body.is-sub input[type="tel"],
body.is-sub input[type="number"],
body.is-sub input[type="search"],
body.is-sub input[type="url"],
body.is-sub input[type="date"],
body.is-sub input[type="time"],
body.is-sub textarea,
body.is-sub .srcfix input,
body.is-sub .photo-add input:not([type=file]),
body.is-sub .photo-add textarea,
body.is-sub .composer textarea,
body.is-sub .ck-supp input,
body.is-sub .split-edit input,
body.is-sub .sch-when input[type="date"],
body.is-sub .sch-when input[type="time"] {
  background: #FFF6E8;
  border-bottom-color: #F5A61C;
  color: #2C395B;
}
body.is-sub input:not([type]):focus,
body.is-sub input[type="text"]:focus,
body.is-sub input[type="email"]:focus,
body.is-sub input[type="password"]:focus,
body.is-sub input[type="tel"]:focus,
body.is-sub input[type="number"]:focus,
body.is-sub input[type="search"]:focus,
body.is-sub input[type="url"]:focus,
body.is-sub input[type="date"]:focus,
body.is-sub input[type="time"]:focus,
body.is-sub textarea:focus,
body.is-sub .form input:focus,
body.is-sub .form textarea:focus,
body.is-sub .srcfix input:focus,
body.is-sub .photo-add input:not([type=file]):focus,
body.is-sub .photo-add textarea:focus,
body.is-sub .composer textarea:focus,
body.is-sub .sch-when input[type="date"]:focus,
body.is-sub .sch-when input[type="time"]:focus {
  background: #FFE8C2;
  border-bottom-color: #E09510;
  outline-color: #F5A61C;
}
body.is-sub .searchbar input,
body.is-sub .searchbar input:focus {
  background: transparent;
  border-bottom-color: transparent;
  color: inherit;
}
body.is-sub #callSum,
body.is-sub #callPts,
body.is-sub #callSum:focus,
body.is-sub #callPts:focus { background: var(--panel); border-bottom-color: var(--mgray); color: inherit; }
body.is-sub .form select,
body.is-sub .stage-set select,
body.is-sub .ml-bar select,
body.is-sub .ap-sel,
body.is-sub .split-edit select {
  background: #F0F1F3;
  border-bottom-color: #AFB6BB;
  color: #2C395B;
}
body.is-sub .form select:focus,
body.is-sub .stage-set select:focus,
body.is-sub .ml-bar select:focus,
body.is-sub .ap-sel:focus,
body.is-sub .split-edit select:focus {
  background: #E6E8EB;
  border-bottom-color: #8A929A;
}
body.is-sub .rate-pick button { background: #FFF6E8; border-bottom-color: #F5A61C; color: #2C395B; }
body.is-sub .rate-pick button.on { background: var(--navy); color: #fff; border-bottom-color: var(--navy); }

@media (min-width: 1000px) {
  body.is-sub .appbar { border-bottom-color: var(--lgray); }
  body.is-sub.is-launcher .appbar { border-bottom-color: #F5A61C; }
}

html[data-theme="dark"] body.is-sub { background: #1c1814; }
html[data-theme="dark"] body.is-sub .view { background: #1c1814; }
html[data-theme="dark"] body.is-sub .card { background: #222838; border-color: rgba(245, 166, 28, .22); }
html[data-theme="dark"] body.is-sub .btn.primary { background: #F5A61C; color: #2C395B; box-shadow: 0 4px 12px rgba(245, 166, 28, .35); }
html[data-theme="dark"] body.is-sub .btn.primary:hover { background: #E09510; color: #2C395B; }
html[data-theme="dark"] body.is-sub .bottomnav a.on,
html[data-theme="dark"] body.is-sub .bottomnav a.on svg { color: #F5A61C; }
html[data-theme="dark"] body.is-sub .bottomnav a .fab { background: #F5A61C; color: #2C395B; }
html[data-theme="dark"] body.is-sub .bottomnav a .fab svg,
html[data-theme="dark"] body.is-sub .bottomnav a.on .fab svg { color: #2C395B; }
html[data-theme="dark"] body.is-sub .tabs button.on,
html[data-theme="dark"] body.is-sub .tabs a.on,
html[data-theme="dark"] body.is-sub .tabs.ts a.on,
html[data-theme="dark"] body.is-sub .view-toggle button.on,
html[data-theme="dark"] body.is-sub .scope-toggle button.on { background: #F5A61C; color: #2C395B; }
html[data-theme="dark"] body.is-sub a.lnk,
html[data-theme="dark"] body.is-sub .doc .go,
html[data-theme="dark"] body.is-sub .co-done-row .lnk,
html[data-theme="dark"] body.is-sub .is-box.link span,
html[data-theme="dark"] body.is-sub .label-line .sep { color: #F3BB58; }
html[data-theme="dark"] body.is-sub .co-ph-row .lnk { color: var(--brick); }
html[data-theme="dark"] body.is-sub input:not([type]),
html[data-theme="dark"] body.is-sub input[type="text"],
html[data-theme="dark"] body.is-sub input[type="email"],
html[data-theme="dark"] body.is-sub input[type="password"],
html[data-theme="dark"] body.is-sub input[type="tel"],
html[data-theme="dark"] body.is-sub input[type="number"],
html[data-theme="dark"] body.is-sub input[type="search"],
html[data-theme="dark"] body.is-sub input[type="url"],
html[data-theme="dark"] body.is-sub input[type="date"],
html[data-theme="dark"] body.is-sub input[type="time"],
html[data-theme="dark"] body.is-sub textarea,
html[data-theme="dark"] body.is-sub .srcfix input,
html[data-theme="dark"] body.is-sub .photo-add input:not([type=file]),
html[data-theme="dark"] body.is-sub .photo-add textarea,
html[data-theme="dark"] body.is-sub .sch-when input[type="date"],
html[data-theme="dark"] body.is-sub .sch-when input[type="time"] {
  background: #3a2c18;
  border-bottom-color: #F5A61C;
  color: #f6efe4;
}
html[data-theme="dark"] body.is-sub input:not([type]):focus,
html[data-theme="dark"] body.is-sub input[type="text"]:focus,
html[data-theme="dark"] body.is-sub input[type="email"]:focus,
html[data-theme="dark"] body.is-sub input[type="password"]:focus,
html[data-theme="dark"] body.is-sub input[type="tel"]:focus,
html[data-theme="dark"] body.is-sub input[type="number"]:focus,
html[data-theme="dark"] body.is-sub input[type="search"]:focus,
html[data-theme="dark"] body.is-sub input[type="url"]:focus,
html[data-theme="dark"] body.is-sub input[type="date"]:focus,
html[data-theme="dark"] body.is-sub input[type="time"]:focus,
html[data-theme="dark"] body.is-sub textarea:focus,
html[data-theme="dark"] body.is-sub .form input:focus,
html[data-theme="dark"] body.is-sub .form textarea:focus,
html[data-theme="dark"] body.is-sub .photo-add input:not([type=file]):focus,
html[data-theme="dark"] body.is-sub .photo-add textarea:focus,
html[data-theme="dark"] body.is-sub .sch-when input[type="date"]:focus,
html[data-theme="dark"] body.is-sub .sch-when input[type="time"]:focus {
  background: #4a3820;
  border-bottom-color: #F3BB58;
}
html[data-theme="dark"] body.is-sub .searchbar input,
html[data-theme="dark"] body.is-sub .searchbar input:focus { background: transparent; border-bottom-color: transparent; color: inherit; }
html[data-theme="dark"] body.is-sub #callSum,
html[data-theme="dark"] body.is-sub #callPts,
html[data-theme="dark"] body.is-sub #callSum:focus,
html[data-theme="dark"] body.is-sub #callPts:focus { background: var(--panel); border-bottom-color: var(--mgray); color: inherit; }
html[data-theme="dark"] body.is-sub .form select,
html[data-theme="dark"] body.is-sub .stage-set select,
html[data-theme="dark"] body.is-sub .ml-bar select,
html[data-theme="dark"] body.is-sub .ap-sel,
html[data-theme="dark"] body.is-sub .split-edit select {
  background: #2a3144;
  border-bottom-color: #8d9bb8;
  color: #d5dbe4;
}

/* Phone shell for the subcontractor role only. PM phone shell stays navy.
   html/body paint overscroll. The fixed app bar stays navy; only the safe-area
   strip behind the status bar (the navy that shows above the bar) turns deep orange. */
@media (max-width: 699px) {
  html:has(body.is-sub),
  html[data-theme="dark"]:has(body.is-sub),
  body.is-sub,
  html[data-theme="dark"] body.is-sub {
    background: #9A3412;
  }
  body.is-sub .appbar {
    background-color: var(--navy);
    background-image: linear-gradient(#9A3412, #9A3412);
    background-repeat: no-repeat;
    background-position: top left;
    background-size: 100% env(safe-area-inset-top, 0px);
  }
  /* Profile tabs: every button stays on screen. No sideways scroll. */
  body.is-sub .tabs.ts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-wrap: unset;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }
  body.is-sub .tabs.ts a {
    flex: none;
    min-height: 44px;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  /* Keep the sub home and project page inside a 390px phone. Do not restyle PM jobs. */
  body.is-sub .view { min-width: 0; }
  body.is-sub .co-brand { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  body.is-sub .co-brand img { max-width: 100%; height: auto; max-height: 84px; }
  body.is-sub .sub-home-actions { min-width: 0; max-width: 100%; }
  body.is-sub .sub-home-actions .btn { max-width: 100%; }
  body.is-sub .qline { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  body.is-sub .qline > span,
  body.is-sub .qline > a:not(.btn) { min-width: 0; overflow-wrap: anywhere; }
  body.is-sub .task-q { min-width: 0; max-width: 100%; }
  body.is-sub .task-q .qitem { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  body.is-sub .task-q .qitem .acts { flex-wrap: wrap; }
  body.is-sub .task-q .qitem .acts .btn { min-width: 0; }
  body.is-sub .task-q .qitem b,
  body.is-sub .task-q .qitem a,
  body.is-sub .task-q .qitem .facts { min-width: 0; overflow-wrap: anywhere; }
  body.is-sub .contact-row { min-width: 0; max-width: 100%; }
  body.is-sub .contact-row a { min-width: 0; }
  body.is-sub .dash-head,
  body.is-sub .card,
  body.is-sub .cal,
  body.is-sub .jcal,
  body.is-sub .gantt,
  body.is-sub .cgrid { min-width: 0; max-width: 100%; }
  body.is-sub .gw-h,
  body.is-sub .gw-d,
  body.is-sub .gw-b { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
  body.is-sub .gbar,
  body.is-sub .gw-h div,
  body.is-sub .gw-d div,
  body.is-sub .cgrid .cd,
  body.is-sub .cgrid .ij { min-width: 0; }
  body.is-sub .gw-h div { padding-left: 0; padding-right: 0; overflow: hidden; }
  body.is-sub .bottomnav { max-width: 100%; }
  body.is-sub .bottomnav a { min-width: 0; }
  body.is-sub .bottomnav .motto { max-width: 100%; flex-wrap: wrap; }
  body.is-sub .label-line { min-width: 0; }
  body.is-sub .sch-when input,
  body.is-sub .form input,
  body.is-sub .form select,
  body.is-sub .form textarea { min-width: 0; max-width: 100%; }
}

/* Minimized how-it-works footnote. Starts closed. */
details.note-foot { margin-top: 8px; }
details.note-foot > summary { cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; color: #7d858e; }
details.note-foot > summary::-webkit-details-marker { display: none; }
details.note-foot .help { font-size: 12px; color: #7d858e; margin: 4px 0 0; }
/* Task titles match Work Assignments (.irow .imain b): 14px navy, not a section header. */
.asg-title { display: block; font-size: 14px; color: var(--navy); font-weight: 700; line-height: 1.3; }
.task-q .qitem > a { text-decoration: none; }

/* Sub Queue buttons match the home action buttons: 18px, weight 600, 12px 18px, radius 12, orange fills. PM buttons are outside body.is-sub. */
body.is-sub .task-q .qitem .acts .btn,
body.is-sub .task-q .qitem .acts .btn.small,
body.is-sub .sub-queue-tab .task-q .qitem .acts .btn,
body.is-sub .sub-queue-tab .task-q .qitem .acts .btn.small,
body.is-sub .sub-queue-tab .btn,
body.is-sub .sub-queue-tab .btn.small {
  font-size: 18px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
}
body.is-sub .sub-queue-tab .btn.primary {
  background: #F5A61C;
  color: #2C395B;
}
body.is-sub .sub-queue-tab .btn.primary:hover {
  background: #E09510;
  color: #2C395B;
}
body.is-sub .sub-queue-tab .btn.ghost {
  background: #efe6d6;
  color: #6b3f12;
}
body.is-sub .task-q .qitem .acts .btn.primary,
body.is-sub .task-q .qitem .acts .btn.primary.small,
body.is-sub .sub-queue-tab .qline .btn.primary,
body.is-sub .sub-queue-tab .qline .btn.primary.small {
  background: #D9892B;
  color: #2C395B;
  box-shadow: 0 4px 12px rgba(217, 137, 43, .35);
}
body.is-sub .task-q .qitem .acts .btn.primary:hover,
body.is-sub .sub-queue-tab .qline .btn.primary:hover {
  background: #C47A1E;
  color: #2C395B;
}
body.is-sub .section-h h2 .sub-ho { min-width: 0; white-space: normal; font-weight: 800; }
body.is-sub .jobid,
body.is-sub .task-q .qitem .jobid,
body.is-sub .sub-queue-tab .jobid { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
body.is-sub .task-q .qitem .asg-title,
body.is-sub .task-q .qitem .facts {
  overflow-wrap: break-word;
  word-break: normal;
}

body.is-sub .upload-doc-center { display: flex; justify-content: center; margin-top: 12px; }
body.is-sub .upload-doc-center a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 190px; text-align: center; text-decoration: none; background: var(--panel); color: var(--navy); border-radius: 12px; padding: 10px 16px; font-size: 13px; font-weight: 700; }
body.is-sub .upload-doc-center a svg { color: var(--bright); }

/* Round 15: G3 e-sign code step (PM and Sub portals) */
.g3es-gate { border: 1px solid var(--line, #d9dee8); border-radius: 12px; padding: 14px; margin: 4px 0 14px; background: #f7f9fc; }
.g3es-gate.done { background: #eef8f2; border-color: #b9dfc8; }
.g3es-gate .caps { margin-bottom: 4px; }
.g3es-p { font-size: 13.5px; margin: 4px 0 10px; }
.g3es-ch { display: flex; gap: 8px; margin-bottom: 10px; }
.g3es-ch button { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line, #c9d0dc); background: #fff; font-weight: 600; color: var(--navy, #2C395B); }
.g3es-ch button.on { background: var(--navy, #2C395B); color: #fff; border-color: var(--navy, #2C395B); }
.g3es-again { background: none; border: 0; margin-top: 8px; padding: 4px 0; }
.g3es-dev { font-weight: 700; color: #8a5a00; }
.g3es-pdf { margin-bottom: 10px; }
.g3es-row, .g3es-done { padding: 10px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.g3es-csf { margin-top: 10px; }

/* ---------- Round 15: portal screen logo-only tiles (all the same size) ---------- */
.lx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lx-tiles.lx-n1 { grid-template-columns: minmax(0, 168px); justify-content: center; }
.lx-tiles.lx-n2 { grid-template-columns: repeat(2, minmax(0, 168px)); justify-content: center; }
.lx-tile { display: block; aspect-ratio: 1 / 1; border-radius: 20px; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(44,57,91,.08); text-decoration: none; transition: box-shadow .15s, transform .15s; min-width: 0; }
.lx-tile:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.lx-tile:focus-visible { outline: 3px solid var(--bright); outline-offset: 3px; }
.lx-tile-box { display: grid; place-items: center; width: 100%; height: 100%; padding: 14%; box-sizing: border-box; }
.lx-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Round 20: company tiles = white background + real color-on-white logos. Entities only (no Sub company tile). */
.lx-t-g3c, .lx-t-pm { border-top: 4px solid #09938D; background: #fff; }
.lx-t-g3c .lx-tile-box, .lx-t-pm .lx-tile-box { padding: 10%; }
.lx-t-lights { border-top: 4px solid #CC2738; background: #fff; }
.lx-t-sub { border-top: 4px solid #F5A61C; } /* kept for any leftover sub styling; Sub is no longer a company tile */
.lx-t-sub .lx-tile-box img { border-radius: 50%; }
.sidebar .side-brand { background: #fff; }
/* Title page company buttons (logo only, same size, white tiles). */
.signin-co { display: grid; grid-template-columns: repeat(2, minmax(0, 136px)); justify-content: center; gap: 14px; margin: 0 0 6px; }
.signin-co-btn { font: inherit; padding: 0; margin: 0; width: 100%; cursor: pointer; -webkit-appearance: none; appearance: none; }
.signin-co-btn[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--bright); }
.signin-pick { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.signin-co + .signin-pick + h1, .signin-co + .signin-pick[hidden] + h1 { margin-top: 14px; }
html[data-theme="dark"] .signin-pick { color: var(--slate); }
.lx-roles .btn { justify-content: center; }
.lx-checking, .lx-none { text-align: center; margin: 8px 0; }
.lx-switch { display: grid; gap: 10px; }
.lx-switch .enter-as { margin: 0; }
.lx-lights-switch { display: grid; gap: 10px; padding: 14px 16px; }
.lx-lights-switch b { font-family: var(--slab); color: #0B6346; }
.lx-lights-switch .row { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-lights-switch .btn { flex: 1 1 140px; }
@media (max-width: 420px) {
  .lx-tiles { gap: 10px; }
  .lx-tile { border-radius: 16px; }
}

/* Round 16: lien waiver Preview label + unconditional final lock (solid red buttons, white text, light red inputs) */
.lw-preview { display: flex; flex-direction: column; gap: 2px; background: #FDECEC; border: 1px solid #F3B9BF; border-left: 4px solid #CC2738; color: #8E1B27; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 12.5px; line-height: 1.4; }
.lw-preview b { font-size: 13px; letter-spacing: .01em; }
.lw-lock { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 13px; line-height: 1.45; }
.lw-lock > svg { flex: 0 0 auto; margin-top: 1px; }
.lw-lock > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lw-lock b { font-size: 14px; }
.lw-lock.locked { background: #FDECEC; border: 1px solid #F3B9BF; color: #8E1B27; }
.lw-lock.open { background: #EAF4E4; border: 1px solid #BCD6AD; color: #3D5A2C; }
.lw-lock.checking { background: #F1F3F5; border: 1px solid #DDE2E6; color: #434B55; }
.lw-lock .lw-lock-how { font-size: 12.5px; }
.btn.lw-red, .btn.lw-red:hover, .btn.lw-red:focus-visible { background: #CC2738; color: #fff; border: 0; box-shadow: none; }
.btn.lw-red:hover { background: #A81F2E; }
.lw-paid input, .lw-paid select { background: #FDECEC !important; border-bottom-color: #CC2738 !important; }
.lw-paid input:focus { background: #FAD9DC !important; }
[data-lw-needs-unlock]:disabled { opacity: .5; cursor: not-allowed; }
html[data-theme="dark"] .lw-lock.locked, html[data-theme="dark"] .lw-preview { background: #3A1D21; border-color: #6B2C33; color: #F6C9CE; }
html[data-theme="dark"] .lw-lock.open { background: #1F2C19; border-color: #3D5A2C; color: #CFE3C2; }
.g3es-soon { font-size: 12px; color: var(--slate, #434B55); opacity: .8; margin: 10px 0 0; }
/* Round 31 item 26: readable dark sign-in on iPhone + safe-area top inset */
.signin-gate { padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
@media (max-height: 760px) { .signin-gate { align-items: flex-start; overflow-y: auto; } }
html[data-theme="dark"] .signin-card h1 { color: #ffffff; }
html[data-theme="dark"] .signin-sub, html[data-theme="dark"] .signin-pick { color: #d5dbe6; }
html[data-theme="dark"] .signin-card .l { color: #ffffff; }
html[data-theme="dark"] .signin-card .l.req::after { color: #ff9aa5; }
html[data-theme="dark"] #signin-face { color: #f2f5fa; background: #2f3850; border-color: #55617d; }
html[data-theme="dark"] #signin-submit { background: #0b6ea3; border-color: #0b6ea3; color: #ffffff; }
html[data-theme="dark"] .signin-card input { color: #12203a; background: #e8f3fb; }
html[data-theme="dark"] .signin-error { color: #ffb3bb; }

/* Global: bottom nav anchored to the screen bottom (iOS toolbar collapse / overscroll). */
html, body { overscroll-behavior-y: none; }
.bottomnav { position: fixed !important; bottom: 0 !important; z-index: 900; transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); will-change: transform; }
.bottomnav::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--navy); pointer-events: none; }
body.is-sub .bottomnav::after { background: var(--navy); }

/* real126 (Oct 15, 2026): bottom bar anchored on iOS/Android (see g3-settings.css v5). */
html, body { overscroll-behavior-y: none; }
html { background-color: var(--navy); }
.bottomnav { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; transform: none !important; -webkit-transform: none !important; will-change: auto !important; }
.bottomnav::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--navy); pointer-events: none; }
html.g3-has-foot body { padding-bottom: calc(var(--g3-foot-h, 0px) + 12px) !important; }

/* Help & Guides (Oct 16, 2026) */
.ghelp h3, .ghelp-toc h3 { font-family: 'Roboto Slab', Rockwell, serif; color: var(--navy); }
.ghelp p, .ghelp li, .ghelp td { line-height: 1.55; }
.ghelp ol, .ghelp ul { padding-left: 20px; margin: 8px 0; }
.ghelp li { margin: 6px 0; }
.ghelp a, .ghelp-toc a { color: var(--navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--bright); text-underline-offset: 3px; }
.ghelp code { background: #F0F2F6; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.gbtn { display: inline-block; background: #CC2738; color: #fff; font-weight: 700; font-size: .78em; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; white-space: nowrap; vertical-align: 1px; }
.ghelp-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 10px; }
.gtab { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .93em; }
.gtab th { background: var(--navy); color: #fff; text-align: left; padding: 8px; font-weight: 600; }
.gtab td { border: 1px solid #D9DCDF; padding: 7px 8px; vertical-align: top; }
.gtab tbody tr:nth-child(even) td { background: #F4F4F3; }
html[data-theme="dark"] .gtab tbody tr:nth-child(even) td, body.dark .gtab tbody tr:nth-child(even) td { background: transparent; }
@media (max-width: 560px) { .gtab { font-size: .86em; } .gtab th, .gtab td { padding: 6px; } }
html[data-theme="dark"] .ghelp a, html[data-theme="dark"] .ghelp-toc a, html[data-theme="dark"] .ghelp h3, html[data-theme="dark"] .ghelp-toc h3 { color: #fff; }
html[data-theme="dark"] .ghelp code { background: rgba(255,255,255,.1); }

/* Matthew's standing rule (Oct 16, 2026): every G3 Construction button is red #CC2738 and ALL CAPS.
   Solid red for main actions; red outline for secondary (ghost) and caution (danger) buttons so the main one still stands out.
   Disabled buttons stay gray. Lives at the end so it wins over older per-screen colors (including the sub-portal orange). */
html body .btn { text-transform: uppercase; letter-spacing: .04em; }
html body .btn.primary, html body .btn.navy, html body .btn.moss, html body .btn.danger-fill, html body .btn.lw-red,
html body .sidebar a.btn.side-apps, html body .co-brand a.btn,
html body.is-sub .btn.primary, html[data-theme="dark"] body.is-sub .btn.primary,
html body.is-sub .sub-tools-home .btn, html body .sub-tools-home .sub-home-actions .btn.primary, html body .sub-tools-home .qline .btn.primary,
html body .sub-tools-home .calh .btn:first-child, html body .sub-tools-home .calh .btn:last-child,
html body.is-sub .sub-queue-tab .btn.primary, html body.is-sub .task-q .qitem .acts .btn.primary, html body.is-sub .sub-queue-tab .qline .btn.primary {
  background: #CC2738 !important; color: #fff !important; border: 0 !important; box-shadow: 0 4px 12px rgba(204,39,56,.25) !important; }
html body .btn.primary:hover, html body .btn.navy:hover, html body .btn.moss:hover, html body .btn.danger-fill:hover, html body .btn.lw-red:hover,
html body .sidebar a.btn.side-apps:hover, html body.is-sub .btn.primary:hover, html body .sub-tools-home .btn:hover { background: #A81F2E !important; color: #fff !important; }
html body .btn.ghost, html body .btn.danger, html body.is-sub .sub-queue-tab .btn.ghost, html body .sub-tools-home .btn.ghost {
  background: #fff !important; color: #CC2738 !important; border: 1.5px solid #CC2738 !important; box-shadow: none !important; }
html body .btn.ghost:hover, html body .btn.danger:hover { background: #FBE9EB !important; color: #A81F2E !important; }
html[data-theme="dark"] body .btn.ghost, html[data-theme="dark"] body .btn.danger { background: transparent !important; color: #fff !important; border-color: #CC2738 !important; }
html body .btn[disabled], html body .btn.disabled { background: #d9dde2 !important; color: #8a929a !important; border-color: transparent !important; box-shadow: none !important; }
html body .bottomnav a .fab { background: #CC2738; box-shadow: 0 6px 16px rgba(204,39,56,.3); }
html body .call-rec { background: #CC2738; text-transform: uppercase; letter-spacing: .04em; }
html body .call-rec.on { background: #8E1B1B; }
html body.is-sub .bottomnav a .fab, html[data-theme="dark"] body.is-sub .bottomnav a .fab { background: #CC2738; color: #fff; box-shadow: 0 6px 16px rgba(204,39,56,.3); }
html body.is-sub .bottomnav a .fab svg, html body.is-sub .bottomnav a.on .fab svg, html[data-theme="dark"] body.is-sub .bottomnav a .fab svg { color: #fff; }
/* Project contact tiles (Call, Email, Map, Upload, Directions) and call Transcript / Recording: red outline, ALL CAPS. */
html body .contact-row a, html body .contact-line button:not(.btn) { background: #fff !important; color: #CC2738 !important; border: 1.5px solid #CC2738 !important; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
html body .contact-row a svg, html body .contact-line button:not(.btn) svg { color: #CC2738 !important; }
html body .contact-row a:hover, html body .contact-line button:not(.btn):hover { background: #FBE9EB !important; }
html[data-theme="dark"] body .contact-row a, html[data-theme="dark"] body .contact-line button:not(.btn) { background: transparent !important; color: #fff !important; }
html[data-theme="dark"] body .contact-row a svg, html[data-theme="dark"] body .contact-line button:not(.btn) svg { color: #fff !important; }
/* v326 job money VIEW rows */
.lines li.jm-row{display:flex;align-items:flex-start;gap:10px}
.lines li.jm-row .desc{flex:1;min-width:0}
.jm-file{display:block;color:var(--slate);font-size:11px;word-break:break-all;margin-top:2px}
.jm-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}
.jm-view{background:#CC2738;color:#fff;border:0;border-radius:8px;padding:7px 12px;font-weight:700;font-size:12px;letter-spacing:.06em;text-transform:uppercase;min-height:34px;cursor:pointer}
.lines li.jm-nofile{opacity:.75}
.jm-badge{margin-top:10px}
