/*
 * The Contractor Portal — the Soft coastal look Tyler approved (10 November
 * 2026): a navy header, a cream page, soft blue headings, gentle green totals
 * and warm gold accents. The colours come from tokens.css (loaded first); the
 * names below are the portal's own and every page and fork reads them. One
 * stylesheet, its own: the contractors' side is not the desk. Every text pair
 * is 4.5:1 or better and every field's border is too (WCAG 1.4.3 and 1.4.11).
 */
:root {
  --paper: var(--bg, #f5f4ef); --sheet: var(--card, #ffffff); --sheet-2: #eef2f0;
  --ink-2: #3d5568; --ink-3: var(--muted, #526a7a);
  --rule: var(--line, #dce5e7); --rule-2: #e8eeef; --field: #587080;
  --accent-gold: var(--accent, #c4a15a);
  --brand: var(--green, #23755f); --brand-hover: #1a5c4a; --on-brand: #ffffff; --brand-soft: var(--soft, #eaf5ed); --brand-ink: #1a5c4a;
  --paid: #1a5c4a; --paid-soft: #e3f3e8; --amber-line: #c4a15a; --amber-soft: var(--tint-gold, #fbf3e3);
  --red: var(--danger, #a13232); --red-soft: #fbeceb; --blue: var(--heading, #2a5f86); --blue-soft: var(--tint-blue, #eef5fa);
  --head-bg: var(--navy, #19384e); --head-ink: #ffffff; --head-dim: #d4e1e7;
  --serif: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tabh: 0px; --page: 1080px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; color: var(--heading, #2a5f86); }
h1 { font: 700 28px/1.2 var(--sans); }
h2 { font: 700 20px/1.3 var(--sans); }
h3 { font: 700 16px/1.35 var(--sans); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small.muted, .tiny.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ---- the shell: a navy header, a tab bar that never wraps, a cream page ---- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell.bare { display: block; }
.top { background: var(--head-bg); color: var(--head-ink); }
.top .in { max-width: var(--page); margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; font-size: 17px; color: #fff; }
.brand .mark { width: 36px; height: 36px; flex: none; border-radius: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35);
  display: grid; place-items: center; color: #efd394; font-weight: 800; font-size: 14px; }
.brand .co { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; font-weight: 400; color: var(--head-dim); font-size: 12px; }
.top .spacer { flex: 1; }
.needhelp, .top .signout { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 600; font-size: 14px;
  color: #fff; text-decoration: none; white-space: nowrap; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.needhelp:hover, .top .signout:hover { background: rgba(255,255,255,.12); }
.top form { margin: 0; }
nav.tabs { background: var(--head-bg); border-top: 1px solid rgba(255,255,255,.14); }
nav.tabs .in { max-width: var(--page); margin: 0 auto; display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
nav.tabs .in::-webkit-scrollbar { display: none; }
nav.tabs a { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 14px; color: var(--head-dim);
  text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
nav.tabs a:hover { color: #fff; }
nav.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent-gold); }
nav.tabs a.photos { color: #efd394; }
nav.tabs a.photos[aria-current="page"] { color: #fff; }
nav.tabs a:focus-visible, .top a:focus-visible, .top button:focus-visible { outline-color: #fff; outline-offset: -3px; }
.main { flex: 1; min-width: 0; width: 100%; max-width: var(--page); margin: 0 auto; padding-block: 24px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.shell.bare .main { max-width: 640px; }
.wrap { max-width: 1000px; }
.foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }
/* The shared "Powered by" line carries its own pale inline colour (views/customer/partials/powered-by.ejs); here it is held to 4.5:1. */
.foot .powered-by, .foot .powered-by a, .foot .powered-by b { color: var(--ink-2) !important; }
/* A link standing on its own line is a 44px target; one inside a sentence stays inline. */
.signin p > a:only-child, .sec-h a.n { display: inline-flex; align-items: center; min-height: 44px; }
.signin p.small a { display: inline-block; padding: 12px 2px; margin: -12px 0; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 8px; border: 1.5px solid var(--field); background: var(--sheet); color: var(--brand-ink); font-weight: 650;
  font-size: 16px; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center; }
.btn:hover { background: var(--brand-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { border-color: var(--red); color: var(--red); background: var(--sheet); }
.btn.danger:hover { background: var(--red-soft); }
.btn.link { border: 0; background: transparent; color: var(--brand-ink); padding: 0 4px; min-height: 44px; text-decoration: underline; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btns form { display: contents; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--brand-ink); margin-bottom: 6px; }

/* ---- chips ---- */
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--rule); border-radius: 4px; padding: 2px 8px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--ink-2); background: var(--sheet); }
/*
 * One colour per meaning, always with its words (audit finding 13; status.js):
 * blue sent to the office, amber review or correction needed, teal approved
 * and awaiting payment, green paid, gray closed or not sent, red failed. The
 * dot is the colour for anyone who cannot tell the borders apart.
 */
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip.sent { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.chip.warn { border: 1.5px solid var(--amber-line); color: var(--amber); background: var(--amber-soft); }
.chip.appr { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.chip.paid, .chip.ok { border: 1.5px solid var(--paid); color: var(--paid); background: var(--paid-soft); }
.chip.paid { text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; }
.chip.done { background: var(--sheet-2); color: var(--ink-3); }
.chip.bad { border: 1.5px solid var(--red); color: var(--red); background: var(--red-soft); }
/* A job folder's status is not a payment's: outlined, a folder mark, never a payment colour (finding 5). */
.chip.folder { border: 1px dashed var(--ink-3); color: var(--ink); background: transparent; }
.chip.folder::before { width: 10px; height: 8px; border-radius: 1px 3px 1px 1px; background: transparent; border: 1.5px solid currentColor; }
.chip.folder.closed { color: var(--ink-3); }
.stamp { display: inline-block; border: 3px double var(--paid); color: var(--paid); padding: 6px 14px 5px; border-radius: 5px;
  transform: rotate(-4deg); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 15px; text-align: center; }
.stamp small { display: block; font-size: 11px; letter-spacing: .06em; font-weight: 600; }

/* ---- sections, rows, notes ---- */
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.lede { color: var(--ink-2); margin-top: 4px; }
.sec { margin-top: 30px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 6px; margin-bottom: 2px; }
.sec-h h2 { font: 700 13px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--heading); }
.sec-h .n { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; min-height: 56px; border-bottom: 1px solid var(--rule-2);
  text-decoration: none; color: var(--ink); }
a.row:hover { background: var(--sheet-2); }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-weight: 600; }
.row .t2 { font-size: 14px; color: var(--ink-2); }
.row .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
.counts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.count.tone-sent { border-top: 3px solid var(--blue); background: var(--blue-soft); }
.count.tone-appr { border-top: 3px solid var(--accent-gold); background: var(--amber-soft); }
.count.tone-paid { border-top: 3px solid var(--paid); background: var(--tint-green); }
/* Home's Working On: what the job is, then what can be done on it. */
.workcard { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--rule-2); }
.workcard .wc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.workcard .wc-main .t1 { font-weight: 700; }
.workcard .wc-main .t2 { font-size: 14px; color: var(--ink-2); }
.workcard .wc-s { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.workcard .wc-acts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: none; }
.paygroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.pg-h { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-size: 13px; }
.pg-h .n { color: var(--ink-3); }
a.n { text-decoration: none; }
/* Crew money: whose request is whose (finding 14). */
.crewsum { margin-top: 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); overflow: hidden; }
.crewsum div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule-2); }
.crewsum div:last-child { border-bottom: 0; }
.crewsum .mine { font-weight: 700; }
.crewsum .all { color: var(--ink-3); font-size: 14px; }
.crewsum .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.count { border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.count b { display: block; font: 700 24px/1.1 var(--serif); color: var(--paid); font-variant-numeric: tabular-nums; }
.count span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.note { border: 1px solid var(--rule); border-left: 4px solid var(--ink-3); border-radius: 8px; background: var(--sheet); padding: 12px 14px; margin-top: 14px; font-size: 15px; }
.note.amber { border-color: var(--amber-line); background: var(--amber-soft); }
.note.teal { border-color: var(--brand); background: var(--brand-soft); }
.note.green { border-color: var(--paid); background: var(--paid-soft); }
.note.lock { border-color: var(--blue); background: var(--blue-soft); }
.note.bad { border-color: var(--red); background: var(--red-soft); }
.note b.h { display: block; margin-bottom: 2px; }
.empty { border: 1px dashed var(--field); border-radius: 10px; padding: 18px; color: var(--ink-3); margin-top: 12px; }

/* ---- jobs list and the folder ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 14px 0 8px; }
.seg { display: inline-flex; border: 1.5px solid var(--field); border-radius: 8px; overflow: hidden; background: var(--sheet); }
.seg a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; border-right: 1px solid var(--rule); }
.seg a:last-child { border-right: 0; }
.seg a[aria-current="true"] { background: var(--navy); color: #fff; }
.jobcard { display: block; text-decoration: none; color: var(--ink); padding: 14px 12px 14px 14px; border-bottom: 1px solid var(--rule-2);
  border-left: 3px solid transparent; background: var(--sheet); }
.jobcard:hover { border-left-color: var(--accent-gold); }
.jobcard .p { font-weight: 700; }
.jobcard .m { font-size: 13.5px; color: var(--ink-3); }
.jobcard .j { margin-top: 4px; font-size: 15px; }
.jobcard .s { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.folder-head .addr { font: 700 28px/1.15 var(--serif); color: var(--heading); margin-top: 2px; }
.folder-head .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.sibling { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--field); border-radius: 8px; font-size: 14.5px; color: var(--ink-2); }
.ftabs { display: flex; gap: 2px; margin-top: 20px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.ftabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; text-decoration: none;
  color: var(--ink-2); font-weight: 600; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; margin-bottom: -1px; background: var(--sheet-2); }
.ftabs a[aria-current="page"] { background: var(--sheet); color: var(--ink); border-color: var(--rule); border-top: 3px solid var(--accent-gold); }
.fsheet { background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 10px 10px; padding: 22px 24px 26px; }
.dl { display: grid; grid-template-columns: 190px 1fr; margin: 0; }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px solid var(--rule-2); margin: 0; }
.dl dt { color: var(--ink-3); font-size: 14.5px; font-weight: 600; padding-right: 12px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl th { text-align: left; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 2px solid var(--accent-gold); padding: 8px 10px 6px 0; font-weight: 700; }
.tbl td { border-bottom: 1px solid var(--rule-2); padding: 11px 10px 11px 0; vertical-align: top; }
.tbl .r { text-align: right; }

/* ---- the tracker ---- */
.trk { margin-top: 16px; }
.trk ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trk li { position: relative; padding: 28px 8px 0 0; font-size: 13.5px; line-height: 1.3; color: var(--ink-3); }
.trk li::before { content: ""; position: absolute; top: 9px; left: 18px; right: 0; height: 2px; background: var(--rule); }
.trk li:last-child::before { display: none; }
.trk li::after { content: ""; position: absolute; top: 1px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--rule); background: var(--sheet); }
.trk li.done::before { background: var(--brand); }
.trk li.done::after { background: var(--brand); border-color: var(--brand); }
.trk li.now::after { border-color: var(--accent-gold); background: var(--amber-soft); box-shadow: 0 0 0 4px var(--amber-soft); }
.trk li.done .lab, .trk li.now .lab { color: var(--ink); font-weight: 700; }
.trk .when { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.trk.paidall li::after { background: var(--paid); border-color: var(--paid); }
.trk.paidall li::before { background: var(--paid); }
.amtpair { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 12px; }
.amtpair div b { display: block; font: 700 24px var(--serif); color: var(--paid); font-variant-numeric: tabular-nums; }
.amtpair div span { font-size: 13px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.field label, .lbl { font-weight: 650; font-size: 15px; color: var(--navy); }
.field .help { font-size: 13.5px; color: var(--ink-3); }
.field .help.bad { color: var(--red); font-weight: 600; }
.inp { min-height: 46px; border: 1.5px solid var(--field); border-radius: 8px; background: var(--sheet); padding: 10px 12px; width: 100%; font-size: 16px; }
.inp:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(42, 95, 134, .25); outline: 2px solid transparent; }
.inp::placeholder { color: #5a7180; }
.inp[aria-invalid="true"] { border-color: var(--red); }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; min-height: 48px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--field);
  border-radius: 8px; color: var(--navy); font-weight: 700; cursor: pointer; background: var(--sheet); }
.choice input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.signin { max-width: 440px; margin: 6vh auto 0; }
.signin .card { border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); padding: 26px 24px; margin-top: 20px; }
.morelist { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 560px; }
.morebtn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 0 16px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--sheet); color: var(--navy); font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer; text-align: left; }
.morebtn small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-3); }
.morebtn .grow { flex: 1; }
details.faq { border-bottom: 1px solid var(--rule-2); }
details.faq summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font-weight: 600; padding: 8px 0; }
details.faq p { padding: 0 0 14px 4px; color: var(--ink-2); }
.bigcards { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bigcard { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 14px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--sheet); color: var(--ink); text-decoration: none; }
.bigcard .a { display: block; font: 700 19px/1.25 var(--serif); color: var(--heading); }
.bigcard .m { display: block; font-size: 14px; color: var(--ink-3); }

/* ---- the phone ---- */
@media (max-width: 760px) {
  .main { padding-top: 18px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .brand { font-size: 15px; }
  .btn { min-height: 48px; font-size: 16px; }
  .btn.big, .btn.block.primary { min-height: 56px; font-size: 18px; }
  .btn.link { min-height: 44px; }
  .row { min-height: 64px; }
  .chip { white-space: normal; }
  h1 { font-size: 26px; }
  .home-grid, .two { grid-template-columns: 1fr; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two tiles side by side, Approved — Awaiting Payment across the row under them, so no label is squeezed. */
  .counts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .counts.three .count.tone-appr { grid-column: 1 / -1; order: 3; }
  .counts.three .count { padding: 10px 12px; }
  .counts.three .count b { font-size: 20px; }
  .counts.three .count span { font-size: 13px; line-height: 1.3; display: block; }
  .paygroups { grid-template-columns: 1fr; }
  .workcard { flex-wrap: wrap; }
  .workcard .wc-acts { flex-direction: row; width: 100%; }
  .workcard .wc-acts .btn { flex: 1 1 auto; min-height: 44px; font-size: 16px; }
  .workcard .wc-acts .btn.link { flex: 0 0 auto; }
  .folder-head .addr { font-size: 25px; }
  .ftabs { border-bottom: 0; background: var(--sheet-2); border-radius: 10px; padding: 4px; gap: 4px; }
  .ftabs a { border: 0; border-radius: 6px; min-height: 48px; padding: 0 14px; background: transparent; margin: 0; }
  .ftabs a[aria-current="page"] { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--accent-gold); }
  /* Every tab in sight on a phone, wrapped onto a second row, never off the edge to be swiped to (8bb6f02d audit, finding 4). */
  .ftabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); overflow: visible; }
  .ftabs a { justify-content: center; text-align: center; padding: 4px 8px; line-height: 1.2; }
  /* A draft's details first, Continue Draft under them (finding 5). */
  .row.stack { flex-wrap: wrap; }
  .row.stack .grow { flex: 1 1 100%; }
  .row.stack .btn { flex: 1 1 100%; }
  .fsheet { border: 0; padding: 16px 0 10px; background: transparent; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .dl dd { padding-top: 2px; }
  .trk li { font-size: 12px; padding-right: 4px; }
  .signin { margin-top: 2vh; }
  .btns .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .stamp { transform: none; } }

/* Which company a row is of (11 November 2026): every company's rows together, each tagged. Navy on a soft tint, a different tint each. */
.cotag { display: inline-block; border: 1px solid var(--navy); border-radius: 999px; padding: 1px 10px; margin-right: 6px;
  font-size: 12.5px; font-weight: 650; line-height: 1.5; color: var(--navy); background: var(--tint-blue); white-space: nowrap; }
.cotag-qcc { background: var(--tint-gold); }
.cotag-allegiance { background: var(--tint-green); }
.demo-co { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 2px dashed var(--accent-gold); background: var(--tint-gold);
  color: var(--ink); font-size: 14.5px; }
/* View Their Portal (17 November 2026): an office visit, look only — a navy bar across the top of every page. */
.view-bar { background: var(--navy); color: #fff; }
.view-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.view-bar p { margin: 0; font-size: 14.5px; flex: 1 1 280px; }
.view-bar form { margin: 0; }
.view-bar .btn { background: #fff; color: var(--navy); }

/* ---- part 3: a job's photos ---------------------------------------------------- */
.ph-phase { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ph-phase legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; width: 100%; }
.ph-phase label { flex: 1 1 90px; }
.ph-phase input { position: absolute; opacity: 0; }
.ph-phase span { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--field);
  border-radius: 8px; font-weight: 600; font-size: 17px; background: var(--sheet); cursor: pointer; }
.ph-phase input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.ph-phase input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.ph-btn { position: relative; cursor: pointer; }
.ph-queue { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--rule); border-left: 4px solid var(--ink-3);
  border-radius: 6px; background: var(--sheet); }
.ph-item[data-state="sending"] { border-left-color: var(--blue); }
.ph-item[data-state="saved"] { border-left-color: var(--paid); background: var(--paid-soft); }
.ph-item[data-state="failed"], .ph-item[data-state="refused"] { border-left-color: var(--red); background: var(--red-soft); }
.ph-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex: none; background: var(--sheet-2); }
.ph-body { flex: 1; min-width: 0; }
.ph-st { font-weight: 700; }
.ph-item[data-state="saved"] .ph-st { color: var(--paid); }
.ph-item[data-state="failed"] .ph-st, .ph-item[data-state="refused"] .ph-st { color: var(--red); }
.ph-bar { height: 6px; background: var(--sheet-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.ph-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.ph-item[data-state="saved"] .ph-bar span { background: var(--paid); }
.ph-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ph-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ph-grid li { display: flex; flex-direction: column; gap: 4px; }
.ph-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); background: var(--sheet-2); }
.ok-mark { color: var(--paid); font-weight: 700; }

/* ---- part 4: a payment request ---------------------------------------------------- */
.rq-money { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 14px; }
.rq-pick label { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.rq-pick input { width: 22px; height: 22px; }
.rq-pick input:checked + img { outline: 3px solid var(--brand); outline-offset: 1px; }
.rq-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; padding: 14px 0;
  border-top: 2px solid var(--accent-gold); font-size: 18px; }
.rq-total b { font: 700 24px/1 var(--serif); color: var(--paid); font-variant-numeric: tabular-nums; }

.tel { white-space: nowrap; }

/* The first-time tour on Home (3 November 2026). */
.tour { position: fixed; inset: 0; z-index: 50; background: rgba(25, 56, 78, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tour-box { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; max-width: 440px; width: 100%; max-height: 90vh; overflow: auto; padding: 24px; }
.tour-steps { list-style: none; margin: 14px 0; padding: 0; }
.tour-steps li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.tour-steps li[hidden] { display: none; }
.tour-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.tour-bar [hidden] { display: none; }

/* Inspections the office asked for (My Jobs): their own blue edge and label, apart from repair and grass folders. */
.askrow .chip.sent { text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }

/* The Job Photos card on a job's Photos tab: collapsible, the heading is the whole tap target. */
.jobphotos > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 6px; min-height: 44px; cursor: pointer; list-style: none; }
.jobphotos > summary::-webkit-details-marker { display: none; }
.jobphotos > summary h2 { font: 700 13px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--heading); }
.jobphotos > summary h2::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.jobphotos[open] > summary h2::before { transform: rotate(90deg); }
.jobphotos > summary .n { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.jobphotos > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Home (Tyler, 12 November 2026): short, one thing to do next ---- */
.home h1 { margin-top: 6px; }
.home-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.home-go .btn { flex: 1 1 220px; min-height: 56px; font-size: 18px; }
.counts .count .eyebrow { display: block; margin-bottom: 4px; color: var(--ink-2); }
.counts .count .why { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--ink-2); line-height: 1.3; }
.home-clear { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 4px; font-weight: 700; color: var(--paid); font-size: 18px; }
.home-clear .ic { width: 24px; height: 24px; }
.home-task { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--rule-2); }
.home-task .task-no { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--amber-soft); border: 1.5px solid var(--amber-line); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.home-task .task-copy { flex: 1; min-width: 0; }
.home-task .task-copy b { display: block; }
.home-task .task-copy p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.home-job { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 2px; border-bottom: 1px solid var(--rule-2); }
.home-job .hj-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.home-job .hj-main .t1 { font-weight: 700; font-size: 17px; }
.home-job .hj-main .t2 { font-size: 14px; color: var(--ink-2); }
.home-job .hj-pay { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.home-job .hj-pay small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.home-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; padding: 14px 16px; background: var(--blue-soft); border: 1px solid var(--rule); border-radius: 12px; }
.home-help p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) {
  .home-go .btn { flex-basis: 100%; }
  .home-task { flex-wrap: wrap; }
  .home-task .btn, .home-job .hj-acts, .home-job .hj-acts .btn { width: 100%; }
  .home-task .btn { min-height: 48px; }
  .home-help { flex-wrap: wrap; }
  .home-help .btn { width: 100%; min-height: 48px; }
}

/* Did We Take Possession? on an inspection's property (project page and My Jobs → Inspections). The code, beds and
   baths show only once Yes is checked; the server ignores them on No and on land either way. */
.pos { border: 0; margin: 8px 0 0; padding: 0; }
.pos legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 4px; }
.pos > label.check { display: inline-flex; gap: 6px; align-items: center; margin-right: 18px; min-height: 40px; }
.pos .pos-more { display: none; margin-top: 6px; }
.pos .pos-more label { display: block; margin-top: 8px; font-size: 14px; }
.pos:has(input[value="yes"]:checked) .pos-more { display: block; }
/* A browser that can't read :has() shows the three boxes always, rather than never. */
@supports not selector(:has(*)) { .pos .pos-more { display: block; } }
