:root {
  --ink: #23262a;
  --wire: #66707a;
  --line: #d3d8dc;
  --paper: #eceff1;
  --panel: #ffffff;
  --amp: #e8742f;
  --amp-dark: #b4531a;
  --amp-soft: #fbe6d8;
  --go: #2e7a4d;
  --go-soft: #dcefe3;
  --stop: #ad3838;
  --stop-soft: #f6dddd;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaec; --wire: #9aa3ab; --line: #3a4046; --paper: #1b1e21; --panel: #25292d;
    --amp: #f08a4b; --amp-dark: #f6a675; --amp-soft: #3d2a1e;
    --go: #6cc08f; --go-soft: #1f3528; --stop: #e07c7c; --stop-soft: #3d2222;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.5 "Barlow", system-ui, sans-serif;
}
a { color: var(--amp-dark); }
h1, h2, h3 { font-family: "Barlow Semi Condensed", "Barlow", sans-serif; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
:focus-visible { outline: 3px solid var(--amp); outline-offset: 2px; }

/* top bar (phone and tablet); becomes a sidebar on wide screens, see the end of this file */
.top .grp, .top .who { display: none; }

.top {
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; gap: 1.25rem; padding: .5rem 1.25rem;
  padding-top: calc(.5rem + env(safe-area-inset-top, 0px));
  border-bottom: 4px solid var(--amp);
}
@media (prefers-color-scheme: dark) { .top { background: #111315; color: #e8eaec; } }
.top .brand { display: flex; align-items: center; }
.top .brand img { height: 40px; background: #fff; border-radius: 4px; padding: 2px 6px; }
.top nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.top nav a { color: inherit; text-decoration: none; padding: .4rem .7rem; border-radius: var(--radius); font-weight: 500; }
.top nav a:hover, .top nav a.on { background: rgba(255,255,255,.12); }
.top .new { background: var(--amp); color: #fff; }
.top .new:hover { background: var(--amp-dark) !important; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: .5rem; padding-left: .75rem; padding-right: .75rem; }
  .top .brand { flex: 1; }
  .top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -.25rem; }
  .top nav a { white-space: nowrap; }
  .top nav { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 2rem; }
}

main { max-width: 1060px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }  /* lets wide tables scroll inside their panel */
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.muted { color: var(--wire); }
.small { font-size: .9rem; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* readouts on the dashboard */
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.readouts > div { background: var(--panel); padding: 1rem 1.25rem; }
.readouts .v { font: 600 1.9rem/1.1 "Barlow Semi Condensed", sans-serif; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .readouts { grid-template-columns: 1fr; } }

/* buttons & forms */
.btn, button {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: .55rem 1rem; border-radius: var(--radius); cursor: pointer; text-decoration: none; min-height: 44px;
}
.btn:hover, button:hover { border-color: var(--wire); }
.btn.primary, button.primary { background: var(--amp); border-color: var(--amp); color: #fff; }
.btn.primary:hover, button.primary:hover { background: var(--amp-dark); border-color: var(--amp-dark); }
.btn.go, button.go { background: var(--go); border-color: var(--go); color: #fff; }
.btn.danger, button.danger { color: var(--stop); }
.btn.link, button.link { border: 0; background: none; padding: .3rem; min-height: 0; color: var(--amp-dark); }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
input, textarea, select {
  font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); min-height: 44px;
}
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 1rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.check input { width: auto; min-height: 0; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--wire); font-size: .9rem; border-bottom: 2px solid var(--line); padding: .5rem; }
td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--paper); }
.scroll { overflow-x: auto; }

/* status */
.tag { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .85rem; font-weight: 600;
  background: var(--paper); color: var(--wire); border: 1px solid var(--line); white-space: nowrap; }
.tag.sent { background: var(--amp-soft); color: var(--amp-dark); border-color: transparent; }
.tag.approved, .tag.paid { background: var(--go-soft); color: var(--go); border-color: transparent; }
.tag.invoiced { background: var(--ink); color: var(--paper); border-color: transparent; }
.tag.declined, .tag.fail, .tag.cancelled { background: var(--stop-soft); color: var(--stop); border-color: transparent; }
.tag.pass { background: var(--go-soft); color: var(--go); border-color: transparent; }
.tag.issues { background: var(--amp-soft); color: var(--amp-dark); border-color: transparent; }
.tag.fac { background: transparent; border-style: dashed; font-weight: 500; }

/* the job's progress, start to paid */
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: .75rem 0 1.25rem; }
.stages div { padding-top: .5rem; border-top: 6px solid var(--line); font-size: .85rem; color: var(--wire); font-weight: 500; }
.stages div.done { border-top-color: var(--amp); color: var(--ink); }
.stages div.now { border-top-color: var(--amp); font-weight: 700; color: var(--ink); }
.stages.declined div.now { border-top-color: var(--stop); }

/* line item editor */
.items td { border: 0; padding: .3rem .25rem; }
.items .desc { min-width: 220px; }
.items .qty { width: 80px; } .items .price { width: 120px; } .items .tax { width: 90px; } .items .tot { width: 110px; }
.items textarea { min-height: 44px; height: 44px; }
.totals { margin-left: auto; max-width: 320px; }
.totals div { display: flex; justify-content: space-between; padding: .3rem 0; }
.totals .grand { border-top: 2px solid var(--ink); font-weight: 700; font-size: 1.2rem; margin-top: .3rem; padding-top: .5rem; }
@media (max-width: 720px) {
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: .35rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .items td { padding: 0; }
  .items td.dcell { grid-column: 1 / -1; }
  .items td.tot { text-align: left; padding-top: .4rem; font-weight: 600; grid-column: 1 / 3; }
  .items td:last-child { text-align: right; }
  .items .qty, .items .price, .items .tax { width: 100%; }
}

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.photos figure { margin: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.photos img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photos figcaption { padding: .5rem; font-size: .9rem; }
.photos figcaption input { min-height: 36px; padding: .3rem .5rem; margin-bottom: .3rem; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; margin-bottom: 1rem; }
.drop.over { border-color: var(--amp); background: var(--amp-soft); }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--go-soft); color: var(--go); font-weight: 500; }
.flash.err { background: var(--stop-soft); color: var(--stop); }
details summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--wire); }

/* public page */
.public { max-width: 820px; }
.public .head { text-align: center; margin-bottom: 1rem; }
.public .head img { max-width: 320px; width: 70%; }
@media (prefers-color-scheme: dark) { .public .head img, .login img { background: #fff; border-radius: 8px; padding: 8px; } }
.login { max-width: 380px; margin: 8vh auto; }
.login img { width: 100%; margin-bottom: 1.5rem; }
@media print { .top, .noprint { display: none !important; } body { background: #fff; } .panel { border: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- shared bits added with compliance ---------- */
.nowrap { white-space: nowrap; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1rem; }
@media (max-width: 720px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr; } }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .pad { padding: 1.25rem 1.25rem 0; }
.panel.flush .empty { padding: 2rem 1.25rem; }
.panel.flush .scroll table th:first-child, .panel.flush .scroll table td:first-child { padding-left: 1.25rem; }
form.narrow { max-width: 720px; }
.btn.small-btn { min-height: 36px; padding: .3rem .75rem; font-size: .92rem; }
tr.off td { opacity: .55; }
h1.portal { text-align: center; font-size: 1.4rem; margin: -.75rem 0 1.25rem; }
.readouts > a.gen { color: inherit; text-decoration: none; background: var(--panel); display: block; padding: 1rem 1.25rem; }
.readouts > a.gen:hover { background: var(--paper); }
.readouts > a.gen.alarm { box-shadow: inset 4px 0 var(--stop); }
.readouts .over { color: var(--stop); font-weight: 600; }

/* status chips: one per requirement */
.chip { display: inline-block; padding: .12rem .55rem; border-radius: 4px; font-size: .85rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; }
.chip.ok { background: var(--go-soft); color: var(--go); }
.chip.soon { background: var(--amp-soft); color: var(--amp-dark); }
.chip.overdue { background: var(--stop); color: #fff; }
.chip.never { background: var(--paper); color: var(--wire); border-color: var(--line); }
.chip.na { background: none; color: var(--wire); font-weight: 400; padding-left: 0; padding-right: 0; }
.tally { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 1rem; }

/* list rows that lead with a status stripe: dashboard, customer page */
.duelist { list-style: none; margin: 0; padding: 0; }
.duelist li { border-left: 4px solid var(--line); margin-bottom: .4rem; background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; }
.duelist li.overdue { border-left-color: var(--stop); }
.duelist li.soon { border-left-color: var(--amp); }
.duelist li.ok { border-left-color: var(--go); }
.duelist a { display: block; padding: .5rem .75rem; color: inherit; text-decoration: none; }
.duelist a:hover { background: var(--line); }
.duelist .who-line, .duelist .what { display: block; }
.duelist .what { font-size: .92rem; }
.duelist li.overdue .what { color: var(--stop); font-weight: 600; }

/* generator list: cards on a phone, aligned columns on a computer */
.genlist { list-style: none; margin: 0; padding: 0; }
.genlist li { padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; }
.genlist li:last-child { border-bottom: 0; }
.genlist .genhead { display: none; }
.genlist .gname { flex: 1 0 100%; color: inherit; text-decoration: none; }
.genlist .gname strong, .genlist .gname > span { display: block; }
.genlist .gname:hover strong, .genlist .gname:hover > span { color: var(--amp-dark); }
.genlist .cell .chip.na { display: none; }
.genlist .cell:not(.epa):not(.act) { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--wire); }
.genlist .cell:not(.epa):not(.act)::before { content: attr(data-label); }
.genlist .cell:has(.chip.na) { display: none; }
.genlist .epa { font-size: .9rem; color: var(--wire); }
.genlist .epa::before { content: "EPA "; }
.genlist .epa::after { content: " h"; }
.genlist .epa.warn { color: var(--amp-dark); font-weight: 600; }
.genlist .act { margin-left: auto; }

/* generator page */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1rem 0 1.25rem; }
.facts > div { background: var(--panel); padding: .6rem 1rem; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: .85rem; color: var(--wire); }
.facts dd { margin: 0; font-weight: 600; }
.logbtns { display: flex; flex-wrap: wrap; gap: .5rem; }
.reqs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.reqs li { border: 1px solid var(--line); border-top: 5px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; display: grid; gap: .3rem; align-content: start; }
.reqs li.ok { border-top-color: var(--go); }
.reqs li.soon { border-top-color: var(--amp); }
.reqs li.overdue { border-top-color: var(--stop); }
.rq-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.meter { height: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--go); }
.reqs li.soon .meter span { background: var(--amp); }
.reqs li.overdue .meter span { background: var(--stop); }
.flag { font-size: .8rem; font-weight: 600; color: var(--amp-dark); border: 1px solid var(--amp); border-radius: 4px; padding: 0 .35rem; }

/* test form */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .25rem 1.5rem; margin-bottom: .5rem; }
.ckrow { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: .45rem 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ckrow legend { float: left; padding: 0; font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.seg label { margin: 0; font-weight: 500; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; }
.seg span { display: block; padding: .5rem .8rem; min-width: 3.2rem; text-align: center; border-left: 1px solid var(--line); }
.seg label:first-child span { border-left: 0; }
.seg input:focus-visible + span { outline: 3px solid var(--amp); outline-offset: -3px; }
.seg input[value=ok]:checked + span, .seg input[value=pass]:checked + span { background: var(--go); color: #fff; }
.seg input[value=issue]:checked + span, .seg input[value=fail]:checked + span { background: var(--stop); color: #fff; }
.seg input[value=issues]:checked + span { background: var(--amp); color: #fff; }
.seg input[value=na]:checked + span { background: var(--wire); color: #fff; }
.seg.big { display: flex; }
.seg.big label { flex: 1; }
.seg.big span { padding: .7rem .5rem; }
.readings td { border: 0; padding: .25rem; }
.readings input { min-width: 70px; }
.readings td:first-child input { min-width: 130px; }
.readings .pct { color: var(--wire); padding-top: .8rem; min-width: 3rem; }
.panel.sign { border-top: 4px solid var(--amp); }

/* test record */
.result-band { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; padding: .8rem 1.1rem; border-radius: var(--radius);
  margin: 1rem 0; background: var(--go-soft); color: var(--go); }
.result-band strong { font: 700 1.35rem/1.1 "Barlow Semi Condensed", sans-serif; }
.result-band span { color: var(--ink); }
.result-band.issues { background: var(--amp-soft); color: var(--amp-dark); }
.result-band.fail { background: var(--stop-soft); color: var(--stop); }
.kv td { padding: .4rem .25rem; }
.cklist { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 2rem; }
.cklist li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.cklist li.issue span:first-child { color: var(--stop); font-weight: 600; }
.co-lines { border-top: 1px dashed var(--line); padding-top: .75rem; margin-bottom: 1rem; }
.co-lines h3 { margin-bottom: 0; }
.tag.draft { background: var(--paper); }


/* tap to call, tap for directions */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.tel { white-space: nowrap; }
a.addr { display: inline-flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit; }
a.addr > span:first-child { white-space: pre-line; }
a.addr .dir { color: var(--amp-dark); font-weight: 600; font-size: .92rem; }
a.addr .dir::before { content: "\2197\00a0"; }
a.addr:hover .dir { text-decoration: underline; }
a.addr.big { display: flex; padding: .75rem .9rem; border: 1px solid var(--line); border-left: 4px solid var(--amp); border-radius: var(--radius); margin-bottom: .75rem; }
.kv { margin-top: .6rem; }
.plainlist { margin: .25rem 0 0; padding-left: 1.1rem; }
.note { font-style: italic; }
.terms p { margin: 0 0 .6rem; }
.checks { display: grid; gap: .4rem; }

/* visits */
.tag.requested { background: var(--amp-soft); color: var(--amp-dark); border-color: transparent; }
.tag.scheduled { background: var(--ink); color: var(--paper); border-color: transparent; }
.tag.done, .tag.active { background: var(--go-soft); color: var(--go); border-color: transparent; }
.tag.ended { background: var(--paper); color: var(--wire); }
.visits { list-style: none; margin: 0; padding: 0; }
.visits li { border-bottom: 1px solid var(--line); }
.visits li:last-child { border-bottom: 0; }
.visits li > a, .visits li > div { display: grid; grid-template-columns: 8.5rem 1fr auto; gap: .2rem .75rem; align-items: baseline;
  padding: .55rem .25rem; color: inherit; text-decoration: none; }
.visits li > a:hover { background: var(--paper); }
.visits li.cancelled, .visits li.done { opacity: .6; }
.visits .meta { text-align: right; font-size: .92rem; }
@media (max-width: 560px) {
  .visits li > a, .visits li > div { grid-template-columns: 1fr auto; }
  .visits .what { grid-column: 1 / -1; grid-row: 2; }
}
.today-panel h2 { margin: 0; }
.today-panel .row.between { margin-bottom: .5rem; }
.nudges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.nudge { padding: .35rem .7rem; border-radius: var(--radius); background: var(--amp-soft); color: var(--amp-dark); font-weight: 600; text-decoration: none; font-size: .95rem; }
.nudge.quiet { background: var(--paper); color: var(--ink); font-weight: 500; }
.rq-act { margin-top: .2rem; }
.rq-act .booked { font-size: .9rem; font-weight: 600; color: var(--go); }
a.chiplink { text-decoration: none; }
a.chiplink .chip { box-shadow: 0 1px 0 var(--wire); }
a.chiplink:hover .chip { filter: brightness(.95); text-decoration: underline; }

/* schedule */
.requests { border-left: 4px solid var(--amp); }
.requests .count { display: inline-block; min-width: 1.6rem; text-align: center; background: var(--amp); color: #fff; border-radius: 99px; font-size: .9rem; padding: 0 .4rem; vertical-align: middle; }
.reqlist { list-style: none; margin: 0; padding: 0; }
.reqlist li { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.reqlist li:last-child { border-bottom: 0; }
.reqlist .rq-main a { color: inherit; }
.weekbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin: 1.25rem 0 .75rem; }
.weekbar .wk { font: 600 1.2rem/1.2 "Barlow Semi Condensed", sans-serif; margin-left: .35rem; }
.weekbar select { width: auto; min-height: 36px; padding: .3rem .5rem; }
.week { display: grid; gap: .6rem; margin-bottom: 1rem; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .6rem .6rem; }
.day header { display: flex; align-items: baseline; gap: .35rem; padding-bottom: .35rem; }
.day .dn { font-weight: 600; } .day .dd { font: 600 1.15rem/1 "Barlow Semi Condensed", sans-serif; }
.day .tdy { font-size: .8rem; font-weight: 600; color: #fff; background: var(--amp); border-radius: 4px; padding: 0 .35rem; }
.day .add { margin-left: auto; text-decoration: none; font-weight: 700; font-size: 1.25rem; line-height: 1; padding: .1rem .5rem; border-radius: var(--radius); color: var(--amp-dark); }
.day .add:hover { background: var(--amp-soft); }
.day.today { border-color: var(--amp); box-shadow: inset 0 3px var(--amp); }
.day.empty.past { display: none; }
.day.empty { padding-bottom: .35rem; }
.day.empty header { padding-bottom: 0; }
.day .none { display: none; }
.appt { display: grid; gap: 0; margin-top: .35rem; padding: .45rem .6rem; border-radius: 4px; text-decoration: none; color: inherit;
  background: var(--paper); border-left: 4px solid var(--ink); font-size: .95rem; line-height: 1.3; }
.appt:hover { background: var(--line); }
.appt .tm { font-size: .85rem; font-weight: 600; color: var(--wire); }
.appt .tech { font-size: .85rem; color: var(--wire); }
.appt.unassigned { border-left-color: var(--amp); }
.appt.unassigned .tech { color: var(--amp-dark); font-weight: 600; }
.appt.done { border-left-color: var(--go); opacity: .7; }
.when-block { margin: 1rem 0 1.25rem; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--ink); }
.when-block .big { font: 700 1.5rem/1.15 "Barlow Semi Condensed", sans-serif; }
.when-block.requested { border-left-color: var(--amp); }
.when-block.done { border-left-color: var(--go); }
.when-block.cancelled { border-left-color: var(--stop); }
.askbox { border-left: 4px solid var(--amp); display: grid; gap: .25rem; }
.mini-status { list-style: none; margin: 0 0 .5rem; padding: 0; }
.mini-status li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }


/* sales */
@media (max-width: 640px) { .readouts.two { grid-template-columns: 1fr 1fr; } .readouts.two .v { font-size: 1.6rem; } .readouts.two > div { padding: .8rem 1rem; } }
.lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.lead { font-size: .75rem; font-weight: 600; color: var(--amp-dark); border: 1px dashed var(--amp); border-radius: 4px; padding: 0 .3rem; vertical-align: middle; }
.tag.ps-new { background: var(--paper); }
.tag.ps-contacted { background: var(--panel); }
.tag.ps-interested { background: var(--amp-soft); color: var(--amp-dark); border-color: transparent; }
.tag.ps-meeting { background: var(--ink); color: var(--paper); border-color: transparent; }
.tag.ps-won { background: var(--go-soft); color: var(--go); border-color: transparent; }
.tag.ps-lost, .tag.ps-dnc { background: var(--stop-soft); color: var(--stop); border-color: transparent; }
.tally a.chip { text-decoration: none; background: var(--panel); color: var(--ink); border-color: var(--line); }
.tally a.chip.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters { margin-bottom: 1rem; gap: .5rem; }
.filters select { width: auto; }
.over { color: var(--stop); font-weight: 600; }
.pager { justify-content: center; padding: .9rem 1rem; border-top: 1px solid var(--line); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist .phead { display: none; }
.plist .pname { flex: 1 0 100%; color: inherit; text-decoration: none; }
.plist .pname strong, .plist .pname span { display: block; }
.plist .pname:hover strong { color: var(--amp-dark); }
.plist .pphone a { font-weight: 600; }
.calllist { list-style: none; margin: .5rem 0 0; padding: 0; }
.calllist li { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; border-top: 1px solid var(--line); border-left: 4px solid transparent; }
.calllist li.late { border-left-color: var(--stop); }
.calllist .cl-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: grid; gap: .1rem; }
.calllist .cl-main:hover strong { color: var(--amp-dark); }
.calllist .cl-call a.btn { text-decoration: none; }
.queuebar { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; background: var(--ink); color: var(--paper);
  padding: .55rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.queuebar span { font-weight: 600; margin-right: auto; }
.queuebar a { color: var(--paper); }
.bigcall { display: flex; justify-content: center; font-size: 1.15rem; width: 100%; padding: .8rem 1rem; text-decoration: none; }
.callcard .kv:first-of-type { margin-top: .9rem; }
.outcomes { border: 0; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.outcomes label, .fuchips label { margin: 0; font-weight: 500; cursor: pointer; }
.outcomes input, .fuchips input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
.outcomes span, .fuchips span { display: inline-block; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: .95rem; }
.outcomes input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.outcomes input[value=interested]:checked + span, .outcomes input[value=booked]:checked + span { background: var(--go); border-color: var(--go); color: #fff; }
.outcomes input[value=not_interested]:checked + span, .outcomes input[value=dnc]:checked + span { background: var(--stop); border-color: var(--stop); color: #fff; }
.fuchips { display: flex; flex-wrap: wrap; gap: .35rem; }
.fuchips span { font-size: .88rem; padding: .3rem .6rem; }
.fuchips input:checked + span { background: var(--amp-soft); border-color: var(--amp); color: var(--amp-dark); font-weight: 600; }
.outcomes input:focus-visible + span, .fuchips input:focus-visible + span { outline: 3px solid var(--amp); outline-offset: 2px; }
.calllog { list-style: none; margin: 0; padding: 0; }
.calllog li { border-left: 3px solid var(--line); padding: .35rem 0 .6rem .8rem; }
.calllog li.o-interested, .calllog li.o-booked { border-left-color: var(--go); }
.calllog li.o-not_interested, .calllog li.o-dnc { border-left-color: var(--stop); }
.calllog li.o-talked { border-left-color: var(--amp); }
.calllog .cl-head { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.inline-checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; margin: 1rem 0; }
.tplcard { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--amp); border-radius: var(--radius); color: inherit; text-decoration: none; }
.tplcard:hover { border-color: var(--amp); }
.tplcard ul { margin: .25rem 0; padding-left: 1.1rem; font-size: .92rem; }
.tplcard .price { margin-top: auto; font: 600 1.25rem/1.2 "Barlow Semi Condensed", sans-serif; }
.tplcard.blank { border-top-color: var(--line); border-style: dashed; justify-content: center; }


/* site maps */
.sitemap { position: relative; width: 100%; background: #2b2f33; border-radius: var(--radius); overflow: hidden; user-select: none; -webkit-user-select: none; }
.sitemap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.sitemap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sitemap .smempty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bbb; }
[hidden] { display: none !important; }
.smscroll { overflow: auto; max-height: 78vh; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.smscroll .sitemap { border-radius: 0; }
.smzoom { display: flex; gap: .3rem; align-items: center; margin-bottom: .4rem; }
.smzoom button { min-height: 32px; padding: .15rem .6rem; font-size: .88rem; }
.smzoom button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sitemap.editing svg { touch-action: pan-x pan-y; cursor: default; }
.sitemap.editing .mk { touch-action: none; cursor: grab; }
.sitemap.editing.placing svg { cursor: crosshair; touch-action: none; }
.sitemap .m-sym { stroke: #fff; stroke-width: 3; }
.sitemap .m-abbr { fill: #fff; font-weight: 700; font-family: "Barlow", sans-serif; pointer-events: none; }
.sitemap .m-abbr.dark { fill: #23262a; }
.sitemap .m-text { fill: #fff; font-weight: 600; font-family: "Barlow", sans-serif; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 4; stroke-linejoin: round; pointer-events: none; }
.sitemap .m-text.big { pointer-events: auto; }
.sitemap .m-outline { fill: rgba(255,255,255,.12); stroke: #fff; stroke-dasharray: 12 8; }
.sitemap .m-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sitemap .k-electric { stroke: #e8742f; }
.sitemap .k-gas { stroke: #f2c94c; stroke-dasharray: 18 10; }
.sitemap .k-other { stroke: #fff; stroke-dasharray: 4 8; }
.sitemap .m-measure { fill: none; stroke: #7fd1ff; stroke-dasharray: 6 6; }
.sitemap .hit { fill: transparent; stroke: transparent; }
.sitemap polygon.hit { fill: rgba(0,0,0,0); }
.sitemap .mk.sel .m-sym, .sitemap .mk.sel .m-line, .sitemap .mk.sel .m-outline { filter: drop-shadow(0 0 6px #7fd1ff); }
.sitemap .handle { fill: #7fd1ff; stroke: #fff; stroke-width: 3; cursor: grab; }
.sitemap .draft { fill: rgba(127,209,255,.15); stroke: #7fd1ff; stroke-dasharray: 10 6; }
.sitemap polyline.draft { fill: none; }
.smtools { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 1rem 0 .4rem; }
.smtools .tgroup { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.smtools button { min-height: 36px; padding: .3rem .65rem; font-size: .9rem; }
.smtools button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.smtools select { width: auto; min-height: 36px; padding: .25rem .4rem; font-size: .9rem; }
.smhint { margin: 0 0 .6rem; color: var(--wire); font-size: .92rem; }
@media (max-width: 720px) {
  .smtools { flex-direction: column; gap: .35rem; }
  .smtools .tgroup { min-width: 0; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .15rem; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 1.5rem; }
  .smtools button, .smtools select { flex-shrink: 0; }
}
.smwrap { display: grid; gap: 1rem; }
.smside .panel { margin-bottom: 1rem; }
.smthumb { display: block; position: relative; margin-top: .4rem; text-decoration: none; }
.smthumb .sitemap { pointer-events: none; }
.smthumb > span { position: absolute; left: .4rem; top: .4rem; background: rgba(0,0,0,.6); color: #fff; font-size: .78rem; font-weight: 600; padding: 0 .4rem; border-radius: 3px; }
.smthumb.wide { margin: 0 0 .75rem; }
.printonly { display: none; }
@media print { .printonly { display: block; } .smwrap { display: block; } .sitemap { border-radius: 0; } }
@media (min-width: 1024px) { .smwrap { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }

/* transfer switches */
.swrows { display: grid; gap: .5rem; margin-bottom: .5rem; }
.swrow { display: grid; grid-template-columns: 1.4fr 1.2fr .7fr 1fr auto; gap: .5rem; align-items: end; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.swrow .field { margin: 0; }
.swrow .link { margin-bottom: .55rem; }
@media (max-width: 720px) { .swrow { grid-template-columns: 1fr 1fr; } .swrow .field:first-child { grid-column: 1 / -1; } }
.swlist { list-style: none; margin: 0; padding: 0; }
.swlist li { padding: .15rem 0; }
.genlist .svconly { color: var(--wire); font-size: .92rem; }
@media (min-width: 1024px) { .genlist .svconly { grid-column: span 6; } }

/* saved items, documents, repair, hours */
.addlines { margin: .5rem 0 1rem; gap: .5rem; }
.savedpick select { width: auto; max-width: 100%; }
.credlist { list-style: none; margin: 0; padding: 0; }
.credlist li { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); }
.credlist li:last-child { border-bottom: 0; }
.credlist li.cs-expired { border-left-color: var(--stop); }
.credlist li.cs-soon { border-left-color: var(--amp); }
.credlist li.cs-ok { border-left-color: var(--go); }
.credlist .cl-main { display: grid; gap: .1rem; min-width: 0; }
.credlist .cl-main a { color: inherit; }
.credlist .cl-edit { grid-column: 1 / -1; }
.credform { display: grid; gap: 0; margin: .75rem 0; padding-top: .75rem; border-top: 1px dashed var(--line); }
.hourwarn { grid-column: 1 / -1; margin: -.25rem 0 .75rem; padding: .5rem .75rem; border-radius: var(--radius); background: var(--amp-soft); color: var(--amp-dark); font-weight: 600; font-size: .92rem; }
.repairbox { border-left: 4px solid var(--stop); }

/* addresses */
.addrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; margin: .9rem 0 1rem; }
.addrcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.addrcard .sv { position: relative; aspect-ratio: 16 / 10; background: var(--paper); }
.addrcard .sv img { display: block; width: 100%; height: 100%; object-fit: cover; }
.addrcard .sv .svdate { position: absolute; right: .4rem; bottom: .35rem; font-size: .72rem; color: #fff; background: rgba(0,0,0,.55); padding: 0 .35rem; border-radius: 3px; }
.addrcard .sv .svfail { display: none; }
.addrcard .sv.failed img, .addrcard .sv.failed .svdate { display: none; }
.addrcard .sv.failed .svfail, .addrcard .svnone { display: flex; height: 100%; align-items: center; justify-content: center; text-align: center;
  padding: 1rem; color: var(--wire); font-size: .9rem; }
.addrbody { padding: .75rem .9rem .8rem; display: grid; gap: .3rem; }
.addracts { gap: .4rem .8rem; margin-top: .2rem; }
.addracts .link { padding: 0; }
.addracts a { font-weight: 600; text-decoration: none; color: var(--amp-dark); }
.svvisit { display: block; margin: 0 0 .75rem; border-radius: var(--radius); overflow: hidden; }
.svvisit img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

/* travel */
.travelbox.over { border-left: 4px solid var(--stop); }
.travelnote { margin: -.25rem 0 1rem; color: var(--wire); }
.travelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 1rem; }
.unit { display: flex; align-items: center; gap: .4rem; }
.unit span { color: var(--wire); }

/* jobs */
.jobstages { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.jobstages a { display: flex; align-items: baseline; gap: .4rem; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: inherit; text-decoration: none; font-weight: 500; font-size: .95rem; }
.jobstages a .n { font: 600 1.15rem/1 "Barlow Semi Condensed", sans-serif; font-variant-numeric: tabular-nums; }
.jobstages a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jobstages a.st-done:not(.on) { border-color: var(--go); }
.tag.js-approved { background: var(--amp-soft); color: var(--amp-dark); border-color: transparent; }
.tag.js-scheduled { background: var(--ink); color: var(--paper); border-color: transparent; }
.tag.js-in_progress { background: var(--panel); border-color: var(--amp); color: var(--amp-dark); }
.tag.js-done { background: var(--go); color: #fff; border-color: transparent; }
.tag.js-invoiced { background: var(--paper); color: var(--wire); }
.joblist { list-style: none; margin: 0; padding: 0; }
.joblist li { border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); }
.joblist li:last-child { border-bottom: 0; }
.joblist li.st-approved { border-left-color: var(--amp); }
.joblist li.st-scheduled, .joblist li.st-in_progress { border-left-color: var(--ink); }
.joblist li.st-done { border-left-color: var(--go); }
.joblist a { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .7rem 1.1rem; color: inherit; text-decoration: none; }
.joblist a:hover { background: var(--paper); }
.joblist .jl-main strong, .joblist .jl-main .small { display: block; }
.joblist .jl-main .small { margin-top: .1rem; }
.joblist .jl-when { grid-column: 1; }
.joblist .jl-amt { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
.joblist .jl-tag { grid-column: 2; grid-row: 2; text-align: right; }
.over-soft { color: var(--amp-dark); font-weight: 600; }
.jobpanel { border-top: 4px solid var(--ink); }
.jobbar { margin: .75rem 0 1rem; }
.worklist { list-style: none; margin: 0; padding: 0; }
.worklist li { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.worklist li::before { content: "\25A1"; color: var(--wire); margin-right: .1rem; }
.worklist li span:first-child { flex: 1; }
.signed-off { display: grid; gap: .5rem; padding: .75rem .9rem; background: var(--go-soft); border-radius: var(--radius); }
.sigimg { max-width: 320px; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.sigtext { font-weight: 600; }
#signbox .seg input:checked + span { background: var(--ink); color: var(--paper); }
.sigpad { position: relative; border: 2px dashed var(--wire); border-radius: var(--radius); background: #fff; margin: .25rem 0; touch-action: none; }
.sigpad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sigpad .sighint { position: absolute; left: 0; right: 0; bottom: 2.2rem; text-align: center; color: #888; pointer-events: none; border-top: 1px solid #ccc; margin: 0 1.25rem; padding-top: .3rem; font-size: .9rem; }

/* ---------- computers: sidebar layout. Nothing below changes phones or tablets. ---------- */
.top .m-only { display: inline-block; }
@media (min-width: 1024px) {
  body { padding-left: 248px; }
  .top {
    position: fixed; top: 0; bottom: 0; left: 0; width: 248px; z-index: 5;
    flex-direction: column; align-items: stretch; gap: .75rem; overflow-y: auto;
    padding: calc(1.25rem + env(safe-area-inset-top, 0px)) .9rem 1rem;
    border-bottom: 0; border-right: 4px solid var(--amp);
  }
  .top .brand img { height: auto; width: 100%; padding: 6px 10px; border-radius: 6px; }
  .top .new { order: 1; justify-content: center; margin-top: .25rem; }
  .top nav { order: 2; flex-direction: column; flex-wrap: nowrap; flex: 1; gap: 1px; }
  .top nav a { padding: .5rem .75rem; }
  .top nav a.on { background: rgba(255,255,255,.1); box-shadow: inset 3px 0 var(--amp); }
  .top .grp { display: block; font-size: .8rem; font-weight: 600; color: rgba(236,239,241,.5); margin: 1.1rem .75rem .3rem; }
  .top .grp:first-child { margin-top: .5rem; }
  .top .m-only { display: none; }
  .top .who { order: 3; display: flex; flex-direction: column; gap: .25rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .75rem; }
  .top .who a { color: inherit; text-decoration: none; padding: .4rem .75rem; border-radius: var(--radius); }
  .top .who a:hover, .top .who a.on { background: rgba(255,255,255,.1); }
  .top .who strong { display: block; }
  .top .who span { display: block; font-size: .85rem; color: rgba(236,239,241,.6); }
  .top .who .out { font-size: .92rem; color: rgba(236,239,241,.75); }

  main { max-width: 1320px; margin: 0; padding: 2rem 2.5rem 4rem; }
  main.public { max-width: 820px; margin: 0 auto; }
  h1 { font-size: 2.1rem; }
  td.right.num, td.right.muted, .panel table td:first-child a { white-space: nowrap; }
  .readouts .v { font-size: 2.1rem; }
  .readouts > div, .readouts > a { padding: 1.1rem 1.4rem; }

  /* dashboard: money on the left, what needs doing on the right */
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem; align-items: start; }
  .dash .grid2 { grid-template-columns: 1fr; gap: 0; }
  .dash-side { position: sticky; top: 1.5rem; }

  /* generator list as aligned columns */
  .genlist li { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(5, minmax(0, 1fr)) 5rem 6.5rem; gap: .75rem; padding: .75rem 1.25rem; }
  .genlist .genhead { display: grid; font-size: .85rem; font-weight: 600; color: var(--wire); background: var(--paper); padding-top: .6rem; padding-bottom: .6rem; }
  .genlist .gname { flex: none; }
  .genlist .cell .chip.na { display: inline-block; }
  .genlist .cell:has(.chip.na) { display: inline-flex; }
  .genlist .cell:not(.epa):not(.act)::before { content: none; }
  .genlist .epa::before, .genlist .epa::after { content: none; }
  .genlist .epa { font-size: 1rem; }
  .genlist .act { margin: 0; text-align: right; }
}
@media (min-width: 1024px) {
  .joblist a { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 7rem 10rem; align-items: center; }
  .joblist .jl-when, .joblist .jl-amt, .joblist .jl-tag { grid-column: auto; grid-row: auto; }
  .plist li { display: grid; grid-template-columns: minmax(240px, 2fr) 10rem 8.5rem 6.5rem 6rem; gap: .75rem; padding: .65rem 1.25rem; }
  .plist .phead { display: grid; font-size: .85rem; font-weight: 600; color: var(--wire); background: var(--paper); }
  .plist .pname { flex: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .genlist li { grid-template-columns: minmax(170px, 1.4fr) repeat(5, minmax(0, 1fr)) 4rem 6rem; gap: .5rem; }
  .genlist .chip { white-space: normal; }
}
@media (min-width: 1024px) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
  .day { border: 0; border-radius: 0; min-height: 14rem; }
  .day.empty.past { display: block; }
  .day.past { background: var(--paper); }
  .day .none { display: block; color: var(--wire); font-size: .85rem; margin: .5rem 0 0; }
  .day.empty { padding-bottom: .6rem; }
  .day.today { box-shadow: inset 0 4px var(--amp); }
  .appt { font-size: .9rem; }
}
@media print { body { padding-left: 0 !important; } }
.fuelwarn { margin: .35rem 0 0; padding: .35rem .6rem; border-radius: var(--radius); background: var(--amp-soft); color: var(--amp-dark); font-weight: 600; }
.fuelspec { margin-bottom: .5rem; }

/* ---------- profiles and messages (1.9) ---------- */
.badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--amp); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.3em; text-align: center; vertical-align: 1px; }
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; overflow: hidden; background: var(--amp-soft); color: var(--amp-dark); font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.sm { width: 2rem; height: 2rem; font-size: .8rem; }
.av.lg { width: 7rem; height: 7rem; font-size: 2.2rem; }
.top .who a.me { display: flex; align-items: center; gap: .6rem; }
.top .who .av { display: inline-flex; font-size: .8rem; color: var(--amp-dark); }
.top .who .me-t span { display: block; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); }
.people li { background: var(--panel); }
.people a { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; color: inherit; text-decoration: none; }
.people a:hover { background: var(--paper); }
.people .p-t { min-width: 0; flex: 1; }
.people .p-t strong, .people .p-t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.person-head h1 { margin: 0; }
.profile-photo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li + li { border-top: 1px solid var(--line); }
.inbox a { display: flex; gap: .85rem; align-items: center; padding: .8rem 1rem; color: inherit; text-decoration: none; }
.inbox a:hover { background: var(--paper); }
.inbox .i-t { flex: 1; min-width: 0; }
.inbox .i-t strong, .inbox .i-t .snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .snip { color: var(--wire); font-size: .92rem; }
.inbox .unread strong { font-weight: 700; }
.inbox .unread .snip { color: var(--ink); font-weight: 600; }
.inbox .i-when { font-size: .8rem; color: var(--wire); white-space: nowrap; align-self: flex-start; padding-top: .2rem; }
.inbox .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--amp); flex: none; }
.avstack { display: inline-flex; flex: none; }
.avstack .av + .av { margin-left: -.9rem; box-shadow: 0 0 0 2px var(--panel); }
.thread { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; }
.msg { display: flex; gap: .6rem; align-items: flex-end; max-width: 85%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: var(--paper); border-radius: 14px 14px 14px 4px; padding: .5rem .8rem; min-width: 0; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--amp); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg .meta { font-size: .75rem; color: var(--wire); margin-bottom: .15rem; }
.msg.mine .meta { color: rgba(255,255,255,.85); }
.msg .text { white-space: pre-wrap; }
.msg img.mphoto { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin-top: .35rem; }
.newmark { text-align: center; font-size: .78rem; color: var(--amp-dark); font-weight: 700; display: flex; gap: .5rem; align-items: center; }
.newmark::before, .newmark::after { content: ""; flex: 1; border-top: 1px solid var(--amp-soft); }
.composer { position: sticky; bottom: 0; display: flex; gap: .5rem; align-items: flex-end; padding: .75rem; border-top: 1px solid var(--line); background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); }
.composer textarea { flex: 1; min-height: 2.6rem; max-height: 10rem; resize: none; margin: 0; }
.composer .attach { cursor: pointer; padding: .5rem .6rem; border-radius: var(--radius); border: 1px solid var(--line); line-height: 1; }
.composer .attach input { display: none; }
.composer .attach.has { border-color: var(--amp); color: var(--amp-dark); }
.pickpeople { display: grid; gap: .25rem; max-height: 22rem; overflow-y: auto; }
.pickpeople label { display: flex; align-items: center; gap: .65rem; padding: .4rem .5rem; border-radius: var(--radius); cursor: pointer; }
.pickpeople label:hover { background: var(--paper); }
