/* filled in by the screens */

/* ---- price list ---------------------------------------------------------------------------------
   views/price-list.js and views/price-list/*.js. Every class starts with "pl-". */

.pl.has-bar { padding-bottom: calc(var(--pl-bar-height, 92px) + 20px); }
.pl-head .page-head { margin-bottom: 10px; }
.pl-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.pl-stamp > span { display: inline-flex; align-items: center; gap: 6px; }
.pl-stamp .icon { width: 16px; height: 16px; }
.pl-stamp > .icon { margin-right: -12px; }
.pl-intro { color: var(--muted); max-width: 78ch; }
.pl-note { color: var(--muted); font-size: 14.5px; background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.pl-gap-s { gap: 12px; }
.pl-sub { font: 600 12.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.pl-label, .pl-change-row .field > label { font-weight: 600; font-size: 14px; }
.pl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pl-card-head .card-title { margin: 0 0 4px; }
.pl-card-sub { color: var(--muted); font-size: 14px; margin: -6px 0 12px; max-width: 70ch; }
.pl-card-head .pl-card-sub { margin: 0; }
.pl-card-link { margin: -4px 0 6px; }
.pl-card-link .btn-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.pl-count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.pl-cards { columns: 2 430px; column-gap: 18px; }
.pl-cards > .card { break-inside: avoid; margin-bottom: 18px; }
.pl-empty-line { color: var(--muted); font-size: 14.5px; padding: 6px 0 2px; }

/* tabs: a red count on a tab with something to fix */
.pl-tabs { margin-bottom: 20px; }
.pl-tab-flag { display: inline-block; min-width: 19px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11.5px; line-height: 19px; text-align: center; }

/* problems, said next to the box */
.pl-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-msgs:empty { display: none; }
.pl-msgs li { display: flex; align-items: flex-start; gap: 7px; color: var(--bad); font-size: 14px; font-weight: 500; line-height: 1.35; }
.pl-msgs li .icon { width: 16px; height: 16px; margin-top: 1px; }
.pl-msgs-list { gap: 8px; }
[data-msgs="buildings"]:not(:empty) { background: var(--bad-bg); border-radius: var(--radius); padding: 12px 14px; }

/* a price box: "$" inside on the left, words after */
.pl-price { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pl-price-sign { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pl-price input.pl-price-input { width: 128px; padding-left: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.pl-price.pct input.pl-price-input { padding-left: 12px; padding-right: 28px; width: 104px; }
.pl-price-pct { position: absolute; left: 82px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pl-price-suffix { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pl-price.off input.pl-price-input { background: var(--bg); color: var(--faint); border-style: dashed; }
.pl-price.off .pl-price-sign { color: var(--faint); }
.pl-price.pl-bad input.pl-price-input, .pl input.pl-bad, .pl select.pl-bad {
  border-color: var(--bad); background-color: #FFF8F7; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}
.pl-price input::-webkit-outer-spin-button, .pl-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pl-price input[type=number] { -moz-appearance: textfield; }

.pl-icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer;
}
.pl-icon-btn:hover { background: var(--bad-bg); color: var(--bad); }

/* "Sell this" */
.pl-sell { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14.5px; white-space: nowrap; }
.pl-sell input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-header); }
.pl-std { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--good); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: help; }
.pl-std .icon { width: 17px; height: 17px; }

/* ---- Buildings ---- */
.pl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.pl-toolbar-words { color: var(--muted); }
.pl-toolbar-words strong { color: var(--ink); }
/* Cards stay open. One card is one large Edit target. */
.pl-page-title { font: 500 25px/1.2 var(--head); color: var(--ink); margin: 0 0 6px; }
.pl-tab .btn-link { min-width: 44px; min-height: 44px; }
.pl-building-group { min-width: 0; }
.pl-building-group > .pl-group-title { font: 500 16px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pl-building-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.pl-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card, #fff); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink); }
a.pl-card:hover { border-color: var(--gold); }
.pl-card-info { display: grid; align-content: start; gap: 4px; padding: 12px 14px 14px; min-width: 0; flex: 1; }
.pl-card-name { display: flex; align-items: center; gap: 8px; font: 600 17px/1.3 var(--body); margin: 0; overflow-wrap: anywhere; }
.pl-card-meta { color: var(--muted); font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.pl-card-version { font-size: 13px; color: var(--gold-deep); margin: 0; }
.pl-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-card-chips:empty { display: none; }
.pl-card-chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-ink, var(--gold-deep)); }
.pl-card-chip.pending { background: var(--bg); color: var(--muted); }
.pl-card-edit { margin-top: 7px; width: 100%; }
.pl-card.off .pl-pic { filter: grayscale(.7); opacity: .7; }
.pl-card.off .pl-card-name { color: var(--muted); }
.pl-flag-dot { display: none; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; }
.pl-flagged .pl-flag-dot { display: block; }
.pl-miss { color: var(--bad); font-weight: 600; font-size: 14px; margin: 0; }
.pl-own { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-deep); background: var(--gold-soft); border-radius: 5px; padding: 2px 7px; }
.pl-pic { position: relative; display: block; aspect-ratio: 4 / 3; width: 100%; background: #E9E9E5; overflow: hidden; }
.pl-pic-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pl-pic-none { position: absolute; inset: 0; display: none; place-items: center; color: #635D52; }
.pl-pic.none .pl-pic-none { display: grid; }
.pl-pic-none .icon { width: 64px; height: 64px; }
.pl-picture-note { color: var(--muted); font-size: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.pl-all-built, .pl-stop { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pl-all-built > div, .pl-stop > div { flex: 1; min-width: min(100%, 220px); }
.pl-all-built p, .pl-stop p { margin: 0; font-size: 14.5px; }
.pl-edit-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.pl-edit-title { align-self: center; }
.pl-edit-picture { margin: 0; width: 100%; max-width: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card, #fff); }
.pl-pic-caption { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding: 10px 14px; }
.pl-style-body { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card, #fff); display: grid; gap: 4px; min-width: 0; }
.pl-style-namefield { max-width: 520px; }
.pl-style-namefield input { max-width: 380px; }
.pl-opening-size { max-width: 280px; margin-top: 12px; }
.pl-layout-list { padding-left: 20px; margin: 0 0 16px; display: grid; gap: 8px; overflow-wrap: anywhere; }
.pl-layout-card .hint { margin-top: 12px; }
.pl-gallery-actions { padding: 0 14px 14px; display: grid; gap: 8px; }
.pl-card-status { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0; }
.pl-card-status.good { color: var(--good); }
@media (min-width: 1024px) { .pl-edit-head { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); } }
@media (max-width: 520px) {
  .pl-building-cards { grid-template-columns: minmax(0, 1fr); }
  .pl-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; }
  .pl-card-info { padding: 10px 12px; }
  .pl-card-name { font-size: 16px; }
  .pl-card-meta { font-size: 13.5px; }
  .pl-card .pl-pic { align-self: start; height: 99px; }
  .pl-card-edit { padding: 6px 10px; }
  .pl-gallery-actions { grid-column: 1 / -1; padding: 0 12px 12px; }
  .pl-style-body { padding: 16px; }
}

.pl-sizes { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 36px; }
.pl-size-row {
  display: grid; grid-template-columns: 70px minmax(0, 170px) 44px; justify-content: start; align-items: center; gap: 10px; padding: 5px 0;
  border-bottom: 1px solid var(--line); break-inside: avoid;
}
.pl-size { font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-size-row .pl-price, .pl-size-row input.pl-price-input { width: 100%; }
.pl-sizes-empty { color: var(--muted); padding: 8px 0; }
.pl-new { animation: pl-glow 2.2s ease-out; }
@keyframes pl-glow { from { background: #FFF1C9; } to { background: transparent; } }

.pl-add-size { margin-top: 14px; padding: 12px 14px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fff; display: grid; gap: 8px; }
.pl-add-title { font-weight: 600; font-size: 14px; }
.pl-add-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pl-add-w select { width: 150px; }
.pl-times { color: var(--muted); font-size: 18px; }
.pl-add-l { display: inline-flex; align-items: center; gap: 8px; }
.pl-add-size .pl-add-l input { width: 92px; }
.pl-unit { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pl-add-msg { color: var(--bad); font-size: 14px; font-weight: 500; }
.pl-add-msg:empty { display: none; }

.pl-opens-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 16px; max-width: 640px; }
.pl-opens-fields.three { max-width: 820px; }
.pl-select-swatch { position: relative; display: block; }
.pl-select-swatch .pl-swatch { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; }
.pl-select-swatch select { padding-left: 42px; }

/* Change prices, Add a building style (pop-ups) */
.pl-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.pl-seg-item { position: relative; cursor: pointer; }
.pl-seg-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-seg-item span { display: flex; align-items: center; min-height: 38px; padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.pl-seg-item input:checked + span { background: #fff; color: var(--brand-header); box-shadow: 0 1px 3px rgba(22, 19, 14, .15); }
.pl-seg-item input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.pl-change-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px 18px; }
.pl-amount { position: relative; display: block; max-width: 200px; }
.pl-amount input[type=number] { padding-left: 26px; }
.pl-amount.pct input[type=number] { padding-left: 12px; padding-right: 30px; }
.pl-amount-sign { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pl-amount.pct .pl-amount-sign { left: auto; right: 12px; }
.pl-preview { border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; padding: 14px 16px; display: grid; gap: 10px; min-height: 72px; }
.pl-preview-head { font-size: 16px; }
.pl-preview-none { color: var(--muted); }
.pl-preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-preview-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.pl-preview-list li:last-child { border-bottom: 0; }
.pl-preview-what { flex: 1 1 180px; }
.pl-preview-was { color: var(--muted); text-decoration: line-through; }
.pl-preview-nums { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.pl-preview-list .icon { width: 16px; height: 16px; color: var(--muted); }
.pl-preview-range { color: var(--muted); font-size: 14.5px; }
.pl-preview-held { color: var(--warn); font-size: 14.5px; }
.pl-add-panel { display: grid; gap: 12px; }
.pl-pick-groups { display: grid; gap: 14px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px; }
.pl-pick-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.pl-pick-group legend { font: 600 12.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.pl-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.pl-pick { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: #fff; }
.pl-pick:hover { border-color: var(--brand-header); }
.pl-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-header); flex: none; }
.pl-pick:has(input:checked) { border-color: var(--brand-header); background: var(--cream); box-shadow: inset 0 0 0 1px var(--brand-header); }
.pl-pick-words { display: grid; line-height: 1.25; }
.pl-pick-words small { color: var(--muted); font-size: 13px; }
.pl-pick-sizes { color: var(--ink); font-size: 14.5px; background: var(--cream); border-radius: 8px; padding: 10px 12px; }

/* the price sheet (dealers and managers) */
.pl-sheet-tools { max-width: 460px; }
.pl-sheet-none { color: var(--muted); }
.pl-sheet-group { display: grid; gap: 12px; }
.pl-sheet-title { font: 500 17px/1.2 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-header); margin-top: 6px; }
.pl-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; align-items: start; }
.pl-sheet-card h3 { font: 500 20px/1.2 var(--head); color: var(--brand-header); letter-spacing: .02em; }
.pl-sheet-meta { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.pl-sheet-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.pl-sheet-rows li { display: flex; align-items: baseline; padding: 5px 0; font-variant-numeric: tabular-nums; border-radius: 6px; }
.pl-sheet-rows.wide li { padding: 8px 0; }
.pl-sheet-size { font-weight: 500; display: grid; }
.pl-sheet-size small { color: var(--muted); font-size: 13px; font-weight: 400; }
.pl-sheet-dots { flex: 1 1 20px; border-bottom: 2px dotted var(--line-strong); margin: 0 8px; min-width: 16px; transform: translateY(-4px); }
.pl-sheet-price { font-weight: 600; white-space: nowrap; }
.pl-hit { background: var(--cream); box-shadow: -6px 0 0 var(--cream), 6px 0 0 var(--cream); }

/* ---- How it's built (views/price-list/built.js) ---- */
.pl-built { margin-top: 18px; padding-top: 4px; border-top: 1px dashed var(--line-strong); display: grid; gap: 8px; }
.pl-built .pl-sub { margin-top: 14px; }
.pl-built-intro { color: var(--muted); font-size: 14.5px; max-width: 70ch; }
.pl-built-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px 20px; align-items: start; }
.pl-built-field { gap: 5px; }
.pl-built-field .hint { font-size: 13px; }
.pl-built-wide { grid-column: 1 / -1; }
.pl input.pl-built-input { max-width: 240px; font-variant-numeric: tabular-nums; }
.pl-built-widths { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px 12px; }
.pl-built-width { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.pl-built-width input.pl-built-input { max-width: none; }
.pl-built-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-built-chip {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 6px 14px; border-radius: 22px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.pl-built-chip[aria-pressed=true] { background: var(--brand-header); border-color: var(--brand-header); color: #fff; }
.pl-built-chip.std[aria-pressed=true] { background: var(--gold-soft); border-color: var(--gold-deep); color: #5E480C; }
.pl-built-from { display: block; margin-top: 2px; color: var(--ink); font-weight: 500; }
.pl-built-chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pl-built-check { display: grid; gap: 10px; margin-top: 6px; }
.pl-built-check-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.pl-built-check-row .hint { flex: 1 1 240px; }
.pl-built-checking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; }
.pl-built-result:empty { display: none; }
.pl-built-result, .pl-built-notes, .pl-built-saved { display: grid; gap: 10px; }
.pl-built-notes:empty, .pl-built-saved:empty { display: none; }
.pl-built-box { border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; font-size: 14.5px; min-width: 0; }
.pl-built-box.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #F0C4BF; }
.pl-built-box.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #F1D29A; }
.pl-built-box.good { background: var(--good-bg); color: var(--good); border: 1px solid #BFDFC0; }
.pl-built-box.note { background: var(--hover); color: var(--muted); border: 1px solid var(--line); }
.pl-built-box-title { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.pl-built-box-title .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.pl-built-box ul { margin: 0; padding-left: 26px; display: grid; gap: 4px; color: var(--ink); overflow-wrap: anywhere; }
.pl-built-card .pl-built-group + .pl-built-group { margin-top: 6px; }
.pl-built-card .pl-sub { margin-top: 10px; }
.pl-built-saved { padding-left: 44px; }
.pl-built-saved-line { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; }
.pl-built-saved-line > .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--good); }
.pl-built-ro { margin-top: 10px; border-top: 1px solid var(--line); }
.pl-built-ro summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 14.5px; color: var(--gold-deep); }
.pl-built-ro ul { list-style: none; margin: 0; padding: 0 0 4px; display: grid; gap: 2px; font-size: 14px; }
.pl-built-ro li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pl-built-ro-what { color: var(--muted); }
.pl-built-ro-value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .pl-built-saved { padding-left: 0; }
  .pl input.pl-built-input { max-width: none; }
}

/* ---- Doors & windows, Options: a row per thing ---- */
.pl-list-card .card-title { margin-bottom: 6px; }
.pl-rows { display: grid; }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.pl-rows > .pl-row:first-child { border-top: 0; }
.pl-row > .pl-msgs { grid-column: 1 / -1; }
.pl-row-main { min-width: 0; }
.pl-row-side { display: flex; align-items: center; gap: 14px; justify-content: flex-end; }
.pl-row-side input.pl-price-input { width: 118px; }
.pl-row.off .pl-name-text { color: var(--muted); }
.pl-row-desc, .pl-lock-words { color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.pl-name { display: grid; gap: 1px; min-width: 0; }
.pl-name-line { display: flex; align-items: center; gap: 2px; min-height: 40px; }
.pl-name-text { font-weight: 600; }
.pl-name-was { color: var(--muted); font-size: 12.5px; }
.pl-rename { width: 44px; height: 44px; margin: -4px 0; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.pl-rename:hover { color: var(--brand-header); background: var(--bg); }
.pl-rename .icon { width: 17px; height: 17px; }
.pl-name-input { max-width: 340px; min-height: 40px !important; padding: 7px 10px !important; }

.pl-extra { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pl-rows > .pl-extra:first-child { border-top: 0; padding-top: 4px; }
.pl-extra-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.1fr) 44px; gap: 12px; align-items: end; }
.pl-extra-fields .pl-price, .pl-extra-fields input.pl-price-input { width: 100%; }
.pl-extra-rm { padding-bottom: 0; }
.pl-extra-built { max-width: 640px; }
.pl-extra-more { display: grid; gap: 10px; }
.pl-extra-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--gold-deep); font-weight: 600; }
.pl-extra-more[open] { padding-bottom: 4px; }
.pl-extra-warn { margin: 0; padding: 10px 12px; border-radius: var(--radius-small); background: var(--warn-bg); color: var(--warn); border: 1px solid #F1D29A; font-size: 14.5px; max-width: 640px; }
.pl-extra-warn[hidden] { display: none; }

/* ---- Colors ---- */
.pl-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pl-color {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 12px 5px 6px; border-radius: 24px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; font-size: 14.5px; font-weight: 500;
}
.pl-swatch { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pl-color-check { width: 16px; height: 16px; color: var(--good); stroke-width: 2.4; }
.pl-color[aria-pressed=true] { border-color: var(--brand-header); box-shadow: inset 0 0 0 1px var(--brand-header); }
.pl-color[aria-pressed=false] { background: var(--bg); border-style: dashed; color: var(--muted); }
.pl-color[aria-pressed=false] .pl-swatch { opacity: .35; }
.pl-color[aria-pressed=false] .pl-color-check { visibility: hidden; }
.pl-color.static { cursor: default; padding-right: 14px; }
.pl-color-own { cursor: default; padding-right: 2px; }
.pl-color-own .pl-own { font-size: 10.5px; }
.pl-color-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pl-color-x:hover { background: var(--bad-bg); color: var(--bad); }
.pl-color-x .icon { width: 16px; height: 16px; }
.pl-add-details > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: #5E480C; font-weight: 600; list-style: none; }
.pl-add-details > summary::-webkit-details-marker { display: none; }
.pl-add-details > summary .icon { width: 18px; height: 18px; }
.pl-add-color { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 12px; align-items: end; padding: 12px 0 0; }
.pl-add-color .form-status { grid-column: 1 / -1; }
.pl-hex { padding: 4px !important; height: 44px; cursor: pointer; }

/* ---- History ---- */
.pl-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pl-history-entry { display: grid; gap: 10px; }
.pl-history-entry.now { box-shadow: var(--shadow), inset 4px 0 0 var(--good); }
.pl-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pl-history-when { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pl-history-when span { color: var(--muted); }
.pl-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14.5px; }
.pl-changes li { position: relative; padding: 3px 0 3px 16px; }
.pl-changes li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 6px; border-radius: 50%; background: var(--kraft); }
.pl-more { margin-top: 2px; justify-self: start; }

/* ---- Saved ---- */
.pl-saved { background: var(--good-bg); border: 1px solid #BFDFC0; border-radius: var(--radius); padding: 14px 16px 14px 18px; margin-bottom: 18px; display: grid; gap: 10px; }
.pl-saved-head { display: flex; align-items: flex-start; gap: 12px; }
.pl-saved-head > div { flex: 1; min-width: 0; }
.pl-saved-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; flex: none; }
.pl-saved-head h2 { font: 500 19px/1.25 var(--head); color: var(--good); letter-spacing: .02em; margin-top: 3px; }
.pl-saved-head p { color: var(--ink); font-size: 14px; margin-top: 2px; }
.pl-saved .pl-changes { padding-left: 44px; }
.pl-saved .pl-more { margin-left: 44px; }
.pl-banner-x { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--good); cursor: pointer; display: grid; place-items: center; margin: -6px -6px 0 0; }
.pl-banner-x:hover { background: rgba(46, 125, 50, .1); }

/* ---- the bar at the bottom ---- */
.pl-bar {
  position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 25; color: #fff;
  background-color: var(--brand-header);
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 22px 22px; box-shadow: 0 -6px 24px rgba(22, 19, 14, .22);
  padding: 12px clamp(16px, 3vw, 40px); animation: pl-up .2s ease-out;
}
@keyframes pl-up { from { transform: translateY(100%); } }
.pl-bar-inner { max-width: 1240px; display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.pl-bar-status { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; min-width: 0; }
.pl-bar-count { display: inline-flex; align-items: baseline; gap: 10px; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px 0; min-height: 44px; font-size: 16px; }
.pl-bar-count strong { font: 500 19px/1 var(--head); letter-spacing: .04em; }
.pl-bar-see { font-size: 14px; color: rgba(255, 255, 255, .8); text-decoration: underline; text-underline-offset: 3px; }
.pl-bar-count:disabled { cursor: default; }
.pl-bar-count:disabled .pl-bar-see { display: none; }
.pl-bar-trouble { display: inline-flex; align-items: center; gap: 7px; color: #FFCFC8; font-weight: 600; font-size: 14.5px; }
.pl-bar-trouble .icon { width: 18px; height: 18px; }
.pl-bar-show { background: none; border: 0; color: #fff; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; min-height: 44px; padding: 0 4px; }
.pl-bar-actions { display: flex; gap: 10px; }
.pl-bar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.pl-bar .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
body.pl-bar-on .toasts { bottom: 96px; }

@media (max-width: 760px) {
  .pl.has-bar { padding-bottom: calc(var(--pl-bar-height, 124px) + 20px); }
  .pl-bar { left: 0; bottom: calc(58px + env(safe-area-inset-bottom)); padding: 8px 12px 10px; }
  .pl-bar-inner { gap: 4px; }
  .pl-bar-status { width: 100%; justify-content: space-between; gap: 0 12px; }
  .pl-bar-count { min-height: 44px; }
  .pl-bar-actions { width: 100%; }
  .pl-bar-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  body.pl-bar-on .toasts { bottom: calc(190px + env(safe-area-inset-bottom)); }
  .pl-toolbar .actions { width: 100%; }
  .pl-toolbar .actions .btn { flex: 1; }
  .pl-add-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .pl-add-w select, .pl-add-size .pl-add-l input { width: 100%; }
  .pl-add-l { min-width: 0; }
  .pl-add-p, .pl-add-fields > .btn { grid-column: 1 / -1; }
  .pl-add-p .pl-price, .pl-add-p input.pl-price-input { width: 100%; }
  .pl-row { grid-template-columns: minmax(0, 1fr); }
  .pl-row-side { justify-content: space-between; }
  .pl-extra-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .pl-extra-fields > .field:first-child { grid-column: 1 / -1; }
  .pl-add-color { grid-template-columns: minmax(0, 1fr) 84px; }
  .pl-add-color > .btn { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .pl-size-row { grid-template-columns: 62px minmax(0, 1fr) 44px; }
}

/* ---- lots ---------------------------------------------------------------------------------------
   views/lots.js (#/lots and #/lots/<link name>). Every class starts with "lots-". */

.lots-list { display: grid; gap: 20px; }
.lots-card { padding: 0; overflow: hidden; }
.lots-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FCFBF8, #F8F6F0);
}
.lots-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.lots-name { font: 500 24px/1.15 var(--head); letter-spacing: .03em; color: var(--brand-header); min-width: 0; overflow-wrap: anywhere; }
.lots-card.big .lots-name { font-size: clamp(28px, 3.2vw, 34px); }
.lots-name a { color: inherit; text-decoration: none; }
.lots-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.lots-state.open { color: var(--good); background: var(--good-bg); }
.lots-state.shut { color: var(--stage-lost); background: var(--stage-lost-bg); }
.lots-tools .btn-quiet { color: var(--muted); }
.lots-tools .btn-quiet:hover { color: var(--bad); background: var(--bad-bg); }
.lots-closed-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 20px; font-size: 14.5px;
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #F1D29A;
}
.lots-closed-note .icon { margin-top: 1px; }
.lots-card.closed .lots-head { background: #F3F1EC; }
.lots-card.closed .lots-name { color: var(--muted); }

.lots-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.lots-col { padding: 18px 20px 20px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.lots-col + .lots-col { border-left: 1px solid var(--line); background: #FDFCFA; }
.lots-sub {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font: 500 13.5px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-header);
}
.lots-sub .icon { width: 17px; height: 17px; color: var(--kraft); }
.lots-sub.small-sub { margin-top: 6px; color: var(--muted); }

.lots-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lots-facts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; line-height: 1.4; }
.lots-facts .icon { color: var(--faint); margin-top: 1px; }
.lots-facts a { overflow-wrap: anywhere; }
.lots-hours { white-space: pre-line; }

.lots-numbers { display: grid; gap: 8px; }
.lots-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lots-tile {
  display: grid; gap: 2px; align-content: start; padding: 11px 12px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--line); min-width: 0;
}
.lots-tile strong { font: 500 25px/1.05 var(--head); color: var(--brand-header); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lots-tile.money strong { color: var(--good); }
.lots-tile span { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.lots-see { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 40px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.lots-see .icon { width: 16px; height: 16px; }
.lots-see:hover { text-decoration: underline; }

.lots-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lots-faces li { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 30px; background: #fff; }
.lots-faces small { display: block; color: var(--muted); font-size: 12px; line-height: 1.1; }
.lots-faces li > span:last-child { line-height: 1.2; font-weight: 500; font-size: 14.5px; }
.lots-face {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-header); color: #fff; font: 600 12px/1 var(--body); letter-spacing: .03em;
}
.lots-everyone { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.lots-link { display: grid; gap: 10px; }
.lots-link .lots-sub { margin: 0; }
.lots-url {
  font: 500 14.5px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--brand-header);
  background: var(--cream); border: 1px solid var(--gold-line); border-radius: 8px; padding: 9px 12px;
  overflow-wrap: anywhere; user-select: all;
}
.lots-link.off .lots-url { color: var(--faint); background: var(--bg); border-color: var(--line); text-decoration: line-through; }
.lots-link-note { color: var(--muted); font-size: 14px; }

.lots-web { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lots-web > summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--brand-header); border-radius: 10px;
}
.lots-web > summary::-webkit-details-marker { display: none; }
.lots-web > summary:hover { background: var(--hover); }
.lots-web > summary > .icon:first-child { color: var(--kraft); }
.lots-web-count { margin-left: auto; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.lots-chev { color: var(--muted); transition: transform .15s; }
.lots-web[open] > summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.lots-web[open] .lots-chev { transform: rotate(180deg); }
.lots-web-body { padding: 14px; display: grid; gap: 12px; }
.lots-web.open { border: 0; background: none; display: grid; gap: 12px; }
.lots-web.open > .lots-sub { margin: 0; }
.lots-web-intro { font-size: 15px; }
.lots-code {
  margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--brand-header); color: #EDE3C8;
  font: 13px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: all;
}
.lots-sites { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.lots-sites li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; min-height: 48px; border-top: 1px solid var(--line); }
.lots-sites li:first-child { border-top: 0; }
.lots-sites li > .icon { color: var(--faint); width: 18px; height: 18px; }
.lots-site-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.lots-sites .btn-quiet { color: var(--muted); }
.lots-sites .btn-quiet:hover { color: var(--bad); background: var(--bad-bg); }
li.lots-sites-none { color: var(--muted); font-size: 14px; padding: 10px 12px; }
.lots-site-add .form { gap: 8px; }
.lots-site-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.lots-site-row > .btn { margin-top: 27px; }
.lots-suggest {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px;
  border-radius: 8px; background: var(--gold-soft); color: #5E480C; border: 1px solid var(--gold-line); font-size: 14.5px;
}
.lots-suggest > span { flex: 1 1 200px; }

.lots-link-preview { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.lots-link-preview .icon { width: 17px; height: 17px; margin-top: 1px; flex: none; }
.lots-link-preview strong { color: var(--brand-header); overflow-wrap: anywhere; font-weight: 600; }
.lots-addr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }

@media (max-width: 1000px) {
  .lots-body { grid-template-columns: minmax(0, 1fr); }
  .lots-col + .lots-col { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .lots-head { padding: 14px 16px; }
  .lots-col { padding: 16px; }
  .lots-closed-note { padding: 10px 16px; }
  .lots-tools { width: 100%; }
  .lots-tools .btn { flex: 1; min-height: 44px; }
  .lots-tile { padding: 10px; }
  .lots-tile strong { font-size: 22px; }
  .lots-addr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lots-addr > .field:first-child { grid-column: 1 / -1; }
  .lots-link .actions .btn, .lots-web-body > .actions .btn, .lots-web.open > .actions .btn { flex: 1; min-height: 44px; }
  .lots-site-row { grid-template-columns: minmax(0, 1fr); }
  .lots-site-row > .btn { margin-top: 0; }
  .lots-web-count { display: none; }
}
.lots-tile.zero strong { color: var(--faint); }

/* ---- team ---------------------------------------------------------------------------------------
   views/team.js (#/team). Every class starts with "team-". */

.team-card .card-head { padding: 16px 20px 0; margin-bottom: 6px; }
.team-count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 3px 10px; }
.team-card-note { color: var(--muted); font-size: 14px; padding: 0 20px 6px; }
.team-group { font: 600 12.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 20px 6px; border-top: 1px solid var(--line); }
.team-rows { display: grid; }
.team-row {
  display: grid; align-items: center; gap: 4px 16px; padding: 13px 20px; border-top: 1px solid var(--line);
  grid-template-columns: 42px minmax(0, 1.5fr) 104px minmax(0, 1.3fr) minmax(0, 1.2fr) auto;
  grid-template-areas: "av who role lots seen act";
}
.team-rows > .team-row:first-child { border-top: 0; }
.team-avatar {
  grid-area: av; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-header); color: #fff; font: 600 14px/1 var(--body); letter-spacing: .03em;
}
.team-avatar.ghost { background: #fff; color: var(--brand-header); border: 2px dashed var(--line-strong); }
.team-who { grid-area: who; display: grid; min-width: 0; line-height: 1.3; }
.team-who strong { display: flex; align-items: center; gap: 8px; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.team-who a { color: var(--muted); font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-who a:hover { text-decoration: underline; color: #5E480C; }
.team-you { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #5E480C; background: var(--gold-soft); border-radius: 5px; padding: 1px 7px; }
.team-meta { display: contents; }
.team-role-cell { grid-area: role; }
.team-lots { grid-area: lots; }
.team-seen { grid-area: seen; }
.team-lots, .team-seen { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; color: var(--ink); min-width: 0; line-height: 1.35; }
.team-seen { color: var(--muted); }
.team-lots .icon, .team-seen .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--faint); }
.team-act { grid-area: act; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.team-act .btn-quiet { color: var(--muted); }
.team-act .btn-quiet:hover { color: var(--bad); background: var(--bad-bg); }
.team-role.owner { color: var(--gold-bright); background: var(--brand-header); }
.team-role.manager { color: #5E480C; background: var(--gold-soft); }
.team-role.dealer { color: #4A443A; background: #ECE8DF; }
.team-role.gone { color: var(--stage-lost); background: var(--stage-lost-bg); }
.team-row.removed .team-avatar { background: #BDB5A6; }
.team-row.removed .team-who strong, .team-row.removed .team-lots { color: var(--muted); }
.team-row.invite {
  grid-template-columns: 42px minmax(0, 1.6fr) 104px minmax(0, 1.2fr) auto;
  grid-template-areas: "av who role lots act" "av seen role lots act";
}
.team-row.invite .team-seen { font-size: 13.5px; }

.team-hello { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(135deg, #fff, var(--cream)); }
.team-hello-icon { width: 44px; height: 44px; color: var(--kraft); stroke-width: 1.4; }
.team-hello h2 { font: 500 22px/1.2 var(--head); color: var(--brand-header); }
.team-hello p { color: var(--muted); margin: 4px 0 12px; max-width: 60ch; }

/* the pop-ups */
.team-jobs, .team-lots-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.team-jobs legend, .team-lots-pick legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.team-job-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.team-job {
  position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; min-height: 64px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer;
}
.team-job:hover { border-color: var(--brand-header); }
.team-job input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-header); flex: none; }
.team-job:has(input:checked) { border-color: var(--brand-header); background: var(--cream); box-shadow: inset 0 0 0 1px var(--brand-header); }
.team-job:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.team-job-words { display: grid; gap: 2px; line-height: 1.3; }
.team-job-words strong { font-size: 16px; color: var(--brand-header); }
.team-job-words small { color: var(--muted); font-size: 13px; }
.team-lot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.team-lot {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 14px 6px 10px;
  border: 1px solid var(--line-strong); border-radius: 24px; background: #fff; cursor: pointer; font-weight: 500;
}
.team-lot input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-header); }
.team-lot:has(input:checked) { border-color: var(--brand-header); background: var(--cream); }
.team-lot small { color: var(--muted); font-weight: 400; }
.team-all-lots { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.team-all-lots .icon { width: 17px; height: 17px; }
.team-dialog { display: grid; gap: 14px; }
.team-dialog-email { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; }
.team-dialog-email .icon { width: 17px; height: 17px; }
.team-danger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line);
}
.team-danger strong { color: var(--bad); }
.team-danger > .form-status { flex-basis: 100%; }
.team-added { display: flex; align-items: flex-start; gap: 12px; }
.team-added-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; flex: none; }
.team-added p { font-size: 16px; margin-top: 4px; }
textarea.team-message { background: var(--cream); border-color: var(--gold-line); font-size: 15.5px; min-height: 104px; }
.team-local-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #5E480C; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 8px; padding: 10px 12px; }
.team-local-note .icon { width: 17px; height: 17px; margin-top: 1px; flex: none; }

@media (max-width: 1100px) {
  .team-row, .team-row.invite {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-areas: "av who act" "av meta meta";
  }
  .team-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px; }
}
@media (max-width: 760px) {
  .team-card .card-head { padding: 14px 16px 0; }
  .team-card-note, .team-group { padding-left: 16px; padding-right: 16px; }
  .team-row, .team-row.invite { padding: 12px 16px; gap: 4px 12px; grid-template-areas: "av who act" "meta meta meta"; }
  .team-meta { gap: 6px 14px; }
  .team-row.invite { grid-template-areas: "av who who" "meta meta meta" "act act act"; }
  .team-row.invite .team-act { justify-content: stretch; margin-top: 6px; }
  .team-row.invite .team-act .btn { flex: 1; min-height: 44px; }
  .team-act .btn-small { min-height: 44px; }
  .team-job-list { grid-template-columns: minmax(0, 1fr); }
  .team-hello { flex-direction: column; gap: 10px; }
}

/* ---- settings -----------------------------------------------------------------------------------
   views/settings.js (#/settings). Every class starts with "set-". */

.set.has-bar { padding-bottom: 96px; }
.set-jump { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.set-jump .chip { min-height: 38px; }
.set-cards { display: grid; gap: 18px; }
.set-card { display: grid; gap: 14px; align-content: start; }
.set-card > .card-title { margin: 0; }
.set-card > .card-title .icon { color: var(--kraft); }
.set-intro { color: var(--muted); margin-top: -6px; max-width: 72ch; }
.set-block { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.set-sub { font: 600 15px/1.3 var(--body); color: var(--ink); }
.set-label { font-weight: 600; font-size: 14px; }
.set-problem { color: var(--bad); font-size: 14px; font-weight: 500; }
.set-problem:empty { display: none; }
.set-bad input { border-color: var(--bad) !important; background: #FFF8F7; }
.set-warn { color: var(--warn); font-size: 14px; font-weight: 500; }
.set-warn:empty { display: none; }
.set-callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); border: 1px solid #F1D29A; }
.set-callout .icon { margin-top: 1px; }
.set-icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer;
}
.set-icon-btn:hover { background: var(--bad-bg); color: var(--bad); }

/* logo */
.set-logo-preview {
  display: grid; place-items: center; min-height: 150px; padding: 16px; border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: repeating-conic-gradient(#F1EEE7 0% 25%, #fff 0% 50%) 50% / 18px 18px;
}
.set-logo-preview img { max-width: 100%; max-height: 140px; object-fit: contain; }
.set-logo-none { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 14px; text-align: center; background: rgba(255, 255, 255, .85); padding: 10px 14px; border-radius: 8px; }
.set-logo-none .icon { width: 26px; height: 26px; color: var(--kraft); }

/* colors */
.set-preview { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #F4F2ED; }
.set-preview-bar {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: #fff;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.set-preview-badge {
  width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--brand-accent); color: #fff; font: 600 16px/1 var(--head); letter-spacing: .04em;
}
.set-preview-badge.logo { background: #fff; object-fit: contain; padding: 3px; }
.set-preview-badge-wrap { display: contents; }
.set-preview-words { display: grid; line-height: 1.15; min-width: 0; }
.set-preview-words strong { font: 600 17px/1.15 var(--head); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-preview-words span { font-size: 12px; color: rgba(255, 255, 255, .72); }
.set-preview-page { display: grid; gap: 8px; padding: 14px; justify-items: start; }
.set-preview-line { width: 70%; height: 9px; border-radius: 5px; background: #E3DED3; }
.set-preview-line.short { width: 45%; }
.set-preview-btn { margin-top: 4px; color: #fff; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 7px; }
.set-colors { display: grid; gap: 10px; }
.set-color { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.set-color input[type=color] { width: 52px; height: 44px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
.set-color label { display: grid; line-height: 1.3; cursor: pointer; }
.set-color label small { color: var(--muted); font-size: 13px; }
.set-hex { font: 500 13.5px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
.set-card .btn-link { justify-self: start; min-height: 40px; }

/* choice cards */
.set-choices { display: grid; gap: 10px; }
.set-choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.set-choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.set-choice {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; cursor: pointer; min-height: 64px;
}
.set-choice:hover { border-color: var(--brand-header); }
.set-choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-header); flex: none; }
.set-choice:has(input:checked) { border-color: var(--brand-header); background: var(--cream); box-shadow: inset 0 0 0 1px var(--brand-header); }
.set-choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.set-choice.is-suspended:has(input:checked) { border-color: var(--warn); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn); }
.set-choice.is-active:has(input:checked) { border-color: var(--good); background: var(--good-bg); box-shadow: inset 0 0 0 1px var(--good); }
.set-choice-words { display: grid; gap: 3px; line-height: 1.35; min-width: 0; }
.set-choice-words strong { font-size: 16px; color: var(--brand-header); }
.set-choice-words small { color: var(--muted); font-size: 13.5px; }
.set-eg {
  justify-self: start; margin-top: 6px; font: 600 15px/1 var(--head); letter-spacing: .03em; color: var(--brand-header);
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
}
.set-eg-line { color: var(--muted); font-size: 14px; }
.set-rto { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.set-rto .check { align-items: center; min-height: 44px; }
.set-rto-term { display: inline-flex; align-items: center; gap: 8px; }
.set-rto-term select { width: auto; min-width: 140px; }
.set-notes { display: grid; gap: 8px; }
.set-note { display: grid; grid-template-columns: 104px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.set-note-w { font-weight: 600; font-variant-numeric: tabular-nums; }
.set-note-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.set-note-add select { width: auto; min-width: 150px; }
.set-open-on { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 16px; max-width: 620px; }

/* the quote form */
.set-ask { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.set-ask-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 8px 14px; border-top: 1px solid var(--line); }
.set-ask-row:first-child { border-top: 0; background: #FBFAF7; }
.set-ask-label { font-weight: 600; }
.set-always { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 600; font-size: 14px; min-height: 44px; padding-right: 6px; }
.set-always .icon { width: 17px; height: 17px; }
.set-seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.set-seg-item { position: relative; cursor: pointer; }
.set-seg-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.set-seg-item span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.set-seg-item input:checked + span { background: #fff; color: var(--brand-header); box-shadow: 0 1px 3px rgba(22, 19, 14, .15); }
.set-seg-item input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

/* the save bar */
.set-bar {
  position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 25; color: #fff;
  background-color: var(--brand-header);
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 22px 22px; box-shadow: 0 -6px 24px rgba(22, 19, 14, .22);
  padding: 12px clamp(16px, 3vw, 40px); animation: set-up .2s ease-out;
}
@keyframes set-up { from { transform: translateY(100%); } }
.set-bar-inner { max-width: 1240px; display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.set-bar-words { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; min-width: 0; flex: 1 1 260px; }
.set-bar-words strong { font: 500 19px/1 var(--head); letter-spacing: .04em; }
.set-bar-words > span { color: rgba(255, 255, 255, .8); font-size: 14.5px; }
.set-bar-error { display: flex; align-items: flex-start; gap: 8px; color: #FFD7D1; font-weight: 600; font-size: 14.5px; }
.set-bar-error .icon { width: 18px; height: 18px; margin-top: 1px; }
.set-bar-actions { display: flex; gap: 10px; }
.set-bar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.set-bar .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
body.set-bar-on .toasts { bottom: 96px; }

@media (max-width: 900px) {
  .set-choices.three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .set.has-bar { padding-bottom: 150px; }
  .set-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
  .set-jump .chip { flex: none; }
  .set-choices.two { grid-template-columns: minmax(0, 1fr); }
  .set-ask-row { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  .set-ask-row:first-child { grid-template-columns: minmax(0, 1fr) auto; }
  .set-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set-seg-item span { padding: 6px 4px; font-size: 13.5px; }
  .set-note { grid-template-columns: minmax(0, 1fr) 44px; }
  .set-note-w { grid-column: 1 / -1; margin-bottom: -4px; font-size: 14px; }
  .set-open-on { grid-template-columns: minmax(0, 1fr); }
  .set-bar { left: 0; bottom: calc(58px + env(safe-area-inset-bottom)); padding: 10px 12px; }
  .set-bar-inner { gap: 8px; }
  .set-bar-actions { width: 100%; }
  .set-bar-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  body.set-bar-on .toasts { bottom: calc(190px + env(safe-area-inset-bottom)); }
}
.set-card input.set-file { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.set-card label.btn:has(+ .set-file:focus-visible), .set-card .actions:has(+ .set-file:focus-visible) label.btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.set textarea.set-grow { min-height: 44px; resize: none; field-sizing: content; }

/* ---- Getting started ------------------------------------------------------------------------
   views/getting-started.js: the owner's card at the top of Today, from the
   first sign-in until it is done or hidden. Every class starts with "gs-".
   Black and gold: a black band with the gold title, then the steps, each a
   whole-row link with its tick. */

.crm-today > .gs-card { margin-bottom: 18px; }
.gs-card { padding: 0; overflow: hidden; border-color: var(--gold-line); }
.gs-top { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--brand-header); color: #fff; }
.gs-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--brand-accent); color: var(--brand-header); }
.gs-mark .icon { width: 22px; height: 22px; }
.gs-titles { min-width: 0; flex: 1; }
.gs-titles h2 { font: 500 21px/1.2 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-bright); margin: 0; }
.gs-titles p { color: var(--side-text); font-size: 14.5px; margin-top: 3px; line-height: 1.4; }
.gs-count { flex: none; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(201, 162, 39, .6); color: var(--gold-bright); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.gs-bar { height: 5px; background: var(--gold-soft); }
.gs-bar-fill { display: block; height: 100%; background: var(--brand-accent); transition: width .3s; }
.gs-steps { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 4px 8px; }
.gs-step { min-width: 0; }
.gs-link {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none;
}
.gs-link:hover { background: var(--hover); }
.gs-link:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.gs-tick { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--brand-accent); display: grid; place-items: center; background: #fff; }
.gs-tick .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.gs-step.done .gs-tick { background: var(--brand-accent); color: var(--brand-header); }
.gs-words { display: grid; gap: 2px; min-width: 0; flex: 1; line-height: 1.35; }
.gs-words strong { font-weight: 600; color: var(--brand-header); font-size: 15.5px; }
.gs-words span { color: var(--muted); font-size: 14px; }
.gs-step.done .gs-words strong { color: var(--muted); }
.gs-go { flex: none; color: var(--gold-deep); display: grid; place-items: center; }
.gs-go .icon { width: 18px; height: 18px; }
.gs-done { font-size: 13px; font-weight: 600; color: var(--gold-deep); }
.gs-foot { display: flex; justify-content: flex-end; padding: 2px 12px 10px; }
.gs-foot .gs-hide { min-height: 44px; }
/* no business name yet: Business name and Start */
.gs-form { padding: 16px 20px 18px; }
.gs-name-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.gs-name-row .field { flex: 1 1 260px; min-width: 0; margin: 0; }
.gs-name-row .gs-start { flex: none; }
@media (max-width: 760px) {
  .gs-top { padding: 14px 16px; gap: 8px 12px; align-items: flex-start; flex-wrap: wrap; }
  .gs-mark { width: 34px; height: 34px; }
  .gs-titles { flex: 1 1 calc(100% - 46px); }
  .gs-titles h2 { font-size: 19px; }
  .gs-count { margin-left: 46px; }
  .gs-steps { padding: 6px 4px; }
  .gs-link { padding: 10px; }
  .gs-form { padding: 14px 16px 16px; }
  .gs-name-row .gs-start { width: 100%; }
}
/* the "I have read and agree to the Barnwright Terms and Conditions"
   banner's button, whose words wrap on a phone instead of running off the
   screen */
.banner.terms .btn { white-space: normal; text-align: left; line-height: 1.3; }

/* ---- the Barnwright plan's open lots (Lots) and Help from Barnwright (Settings) ---- */
.lots-plan { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; color: var(--muted); font-size: 14.5px; }
.lots-plan svg { width: 18px; height: 18px; flex: none; }
.lots-plan.full { color: var(--warn); }
.help-state { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-small); background: var(--bg); }
.help-state.on { background: var(--good-bg); color: var(--good); }
.help-state svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
/* who agreed to the Barnwright terms (server/office/terms.js) */
.help-terms { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: var(--muted); font-size: 14px; }
.help-terms svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.help-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.help-log time { color: var(--ink); font-weight: 500; margin-right: 6px; }

.pl-layout-left-off { color: var(--warn); }
.pl-layout-warnings { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--warn); background: var(--warn-bg); font-size: 14px; }
.pl-layout-warnings p { margin: 0 0 6px; }
.pl-layout-warnings p:last-child { margin-bottom: 0; }

@media (prefers-color-scheme: dark) {
  .pl-add-size, .pl-edit-picture, .pl-style-body { background: var(--card); }
  .pl-price.pl-bad input.pl-price-input, .pl input.pl-bad, .pl select.pl-bad { background: var(--bad-bg); }
  .pl-seg, .pl-preview, .pl-pick-group { background: var(--card); }
  .pl-preview-head, .pl-preview-nums strong, .pl-sheet-title { color: var(--ink); }
  .pl-card-name, .pl-page-title { color: var(--ink); }
  .pl-saved-mark { background: #2E7D32; }
  /* Chips follow the dark cards: an unpicked chip is light words on a dark
     pill; a picked chip is filled light (gold when it comes from the
     standard) with dark words, so picked and unpicked never look alike. */
  .pl-built-chip { background: var(--card); }
  .pl-built-chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #16130E; }
  .pl-built-chip.std[aria-pressed=true] { background: var(--gold-deep); border-color: var(--gold-deep); color: #16130E; }
}

/* A layout reset keeps both choices above the save bar, with room for a
   phone app's header. Native dialogs stay above the page in either theme. */
.pl-layout-confirm { max-height: calc(100dvh - var(--pl-obscured-bottom, 0px) - 132px); }
@media (max-width: 760px) {
  .dialog.pl-layout-confirm { margin-bottom: calc(var(--pl-obscured-bottom, 58px) + 12px); }
  .pl-layout-confirm .actions > .btn { flex: 1 1 100%; }
}
.dialog-x { min-width: 44px; min-height: 44px; }
.pl-own-building-dialog { max-height: calc(100dvh - var(--pl-obscured-bottom, 0px) - 132px); }
.pl-tab .check, .pl-own-building-dialog .check { min-height: 44px; align-items: center; }
@media (max-width: 760px) {
  .dialog.pl-own-building-dialog { margin-bottom: calc(var(--pl-obscured-bottom, 58px) + 12px); }
  .pl-own-building-dialog .actions > .btn { flex: 1 1 100%; }
}
@media (prefers-color-scheme: dark) {
  .pl-layout-confirm, .pl-own-building-dialog,
  .pl-layout-confirm .dialog-head, .pl-own-building-dialog .dialog-head { background: var(--card); color: var(--ink); }
  .pl-layout-confirm .dialog-head h2, .pl-own-building-dialog .dialog-head h2 { color: var(--ink); }
}

/* ---- Settings, Your software (views/software.js) ---- */
.sw-summary { list-style: none; margin: 0 0 18px; display: grid; gap: 8px; }
.sw-sum { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.sw-sum.on { color: var(--ink); }
.sw-sum .icon { flex: none; width: 20px; height: 20px; }
.sw-sum.on .icon { color: var(--stage-sold); }
.sw-what { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.sw-what legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.sw-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sw-label { font-weight: 600; }
.sw-secret code, .sw-key { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); padding: 6px 10px; border-radius: var(--radius-small); overflow-wrap: anywhere; word-break: break-all; min-width: 0; max-width: 100%; }
.sw-key { display: block; font-size: 15px; padding: 12px 14px; user-select: all; }
.sw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-small); }
.sw-row-main { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.sw-row-main small { color: var(--muted); overflow-wrap: anywhere; }
.sw-changes { margin: 0; padding-left: 20px; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
