/* Suppliers → Delivery → Delivery Rates: the rate sheet (rate-sheet.js; RATES_FINISH_PLAN Phase 3 PR 10, 2026-10-06).
   Alec picked option A (Home Depot density: the card as one sheet, zones down, load sizes across, a zone × load grid
   of what we pay and what the customer pays) with option B's plain-English sentence on top. Namespace rs-. Tokens
   only; hue only for status; the only green is the next step (Save card) and the Live pill. The save bar sticks over
   the scroll, so it wears the house glass (.cs-glassy). Recipe: .claude/skills/summa-design/components/rate-sheet.md. */
.rs { position: relative; }
.rs-muted { color: var(--ink-3); }
.rs-lbl { display: block; font-size: var(--t-micro); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.rs-title .rs-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: var(--t-small); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.rs-pill { font-size: var(--t-small); font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green-2); }
.rs-pill.is-off { background: var(--amber-bg); color: var(--amber); }
.rs-pub { color: var(--ink-3); font-weight: 500; }
.rs-pub.is-bad { color: var(--rust); font-weight: 600; }

/* the sentence (option B): the whole card in one paragraph */
.rs-sum { font-family: var(--font-serif); font-size: var(--t-title); line-height: 1.45; color: var(--ink); margin: 0 0 14px; letter-spacing: -.01em; max-width: 78ch; }
.rs-sum em { font-style: normal; font-weight: 700; }
.rs-quote { font-size: var(--t-small); color: var(--ink-2); border-left: 2px solid var(--line-strong); padding: 2px 0 2px 10px; margin: 0 0 14px; line-height: 1.5; max-width: 90ch; }
.rs-quote b { color: var(--ink-3); font-weight: 700; }

/* the facts strip */
.rs-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 0 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.rs-fact { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-small); color: var(--ink-2); }
.rs-fact b { color: var(--ink); font-weight: 700; }

/* segmented control: outline track, the chosen one an ink pill (tappable) */
.rs-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); }
.rs-seg button { font: inherit; font-size: var(--t-small); font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; min-height: 28px; }
.rs-seg button.is-on { background: var(--ink); color: var(--panel); }

/* inputs: quiet cells until hover / focus (a sheet, not a form) */
.rs-in { display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-sizing: border-box; font-variant-numeric: tabular-nums; vertical-align: middle; }
.rs-in:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-bg); }
.rs-in input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: var(--t-body); color: var(--ink); padding: 0; font-variant-numeric: tabular-nums; }
.rs-in .pre, .rs-in .suf { font-size: var(--t-small); color: var(--ink-3); flex: none; }
.rs-in.is-empty .suf { display: none; }
.rs-in.is-err { border-color: var(--rust); background: var(--rust-bg); }
.rs-in.is-default input { color: var(--ink-3); }
.rs-sheet .rs-in, .rs-grid .rs-in { border-color: transparent; background: transparent; }
@media (hover: hover) { .rs-sheet .rs-in:hover { border-color: var(--line); background: var(--panel); } }
.rs-sheet .rs-in:focus-within { background: var(--panel); }
.rs-sheet .rs-in.is-err { border-color: var(--rust); background: var(--rust-bg); }
.rs-val { font-variant-numeric: tabular-nums; color: var(--ink); }
.rs-val.is-default { color: var(--ink-3); }

.rs-x { width: 28px; height: 28px; border: 0; background: transparent; color: var(--ink-3); border-radius: 7px; cursor: pointer; display: inline-grid; place-items: center; vertical-align: middle; }
.rs-x svg { width: 15px; height: 15px; }
@media (hover: hover) { .rs-x:hover { background: var(--bg-2); color: var(--rust); } }
.rs-link { font: inherit; font-size: var(--t-small); font-weight: 600; color: var(--green-2); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.rs-link.rs-quietlink { color: var(--ink-2); }
@media (hover: hover) { .rs-link:hover { text-decoration: underline; } }
.rs-row-acts { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* the sheet */
.rs-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.rs-sheet { width: auto; min-width: 440px; border-collapse: collapse; font-size: var(--t-body); }
.rs-sheet th { text-align: left; font-size: var(--t-micro); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 6px 6px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.rs-sheet th .rs-in { height: 26px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.rs-sheet td { padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rs-sheet td.rs-served { font-size: var(--t-small); color: var(--ink-3); white-space: nowrap; }
.rs-sheet tr.is-quiet td { color: var(--ink-3); }
.rs-sheet .rs-zipn { font-variant-numeric: tabular-nums; }
.rs-sheet .rs-bands { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rs-sheet .rs-bands > span { display: inline-flex; align-items: center; gap: 2px; font-size: var(--t-small); color: var(--ink-3); }
.rs-ziprow td { background: var(--bg-2); }
.rs-zips { width: 100%; box-sizing: border-box; font-family: var(--font); font-size: var(--t-small); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); padding: 8px 10px; resize: vertical; }
.rs-ziplist { font-family: var(--font); font-size: var(--t-small); color: var(--ink-2); line-height: 1.6; }
.rs-beyond { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--t-small); color: var(--ink-2); margin-top: 8px; }

.rs-mtabs { display: flex; gap: 6px; align-items: center; margin: 2px 0 10px; flex-wrap: wrap; font-size: var(--t-small); }
.rs-mtab, .rs-chip { font: inherit; font-size: var(--t-small); font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-2); cursor: pointer; }
.rs-chip { padding: 3px 10px; }
.rs-mtab.is-on, .rs-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--panel); }

/* messages: rust = blocks the save, amber = worth knowing, grey = what a save would do */
.rs-msgs { margin-top: 10px; }
.rs-msg { font-size: var(--t-small); line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; max-width: 100ch; }
.rs-msg svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.rs-msg.is-err { color: var(--rust); }
.rs-msg.is-warn { color: var(--amber); }
.rs-msg.is-ok { color: var(--ink-3); }
.rs-msg b { font-weight: 700; }
.rs-msg .rs-link { padding: 0; }

.rs-block { margin-top: 22px; }
.rs-trucks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.rs-truck { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--t-body); }
.rs-truck small { display: block; font-size: var(--t-micro); color: var(--ink-3); }
.rs-fee { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rs-fee:first-of-type { border-top: 0; padding-top: 0; }
.rs-fee-name { font-weight: 600; font-size: var(--t-body); min-width: 130px; }
.rs-fee-body { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-small); color: var(--ink-2); }
.rs-sw { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); border: 0; cursor: pointer; transition: background .15s; padding: 0; }
.rs-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.rs-sw.is-on { background: var(--ink); }
.rs-sw.is-on::after { transform: translateX(16px); }

/* what checkout charges: the grid + the ticket */
.rs-grid { width: auto; min-width: 440px; border-collapse: collapse; font-size: var(--t-small); }
.rs-grid th { font-size: var(--t-micro); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: right; padding: 0 10px 6px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.rs-grid th:first-child { text-align: left; padding-left: 0; }
.rs-grid td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.rs-grid td:first-child { text-align: left; cursor: default; color: var(--ink-2); padding-left: 0; }
.rs-grid td b { display: block; font-size: var(--t-body); color: var(--ink); font-weight: 700; }
.rs-grid td span { color: var(--ink-2); }
.rs-grid td.is-sel { background: var(--bg-2); box-shadow: inset 0 -2px 0 var(--ink); }
.rs-grid td.is-none b { color: var(--ink-3); font-weight: 500; }
@media (hover: hover) { .rs-grid td:not(:first-child):hover { background: var(--bg-2); } }
.rs-ticket-wrap { margin-top: 14px; max-width: 560px; }
.rs-pv { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: var(--t-small); color: var(--ink-2); }
.rs-pv select { height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font: inherit; font-size: var(--t-body); color: var(--ink); padding: 0 8px; }
.rs-ticket { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; font-size: var(--t-small); }
.rs-ticket-where { color: var(--ink-3); margin-bottom: 6px; }
.rs-ticket table { width: 100%; border-collapse: collapse; }
.rs-ticket td { padding: 3px 0; color: var(--ink-2); }
.rs-ticket td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; padding-left: 12px; }
.rs-ticket .rs-tot td { border-top: 1px solid var(--line); padding-top: 7px; font-weight: 700; color: var(--ink); font-size: var(--t-body); }
.rs-ticket .rs-cust td { font-weight: 700; color: var(--ink); font-size: var(--t-body); }
.rs-ticket .rs-blocked { color: var(--rust); font-weight: 600; font-size: var(--t-small); text-align: left !important; }

/* history + the JSON (advanced) */
.rs-more { margin-top: 22px; border-top: 1px solid var(--line); }
.rs-more details { border-bottom: 1px solid var(--line); }
.rs-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 2px; font-size: var(--t-body); font-weight: 600; color: var(--ink); }
.rs-more summary::-webkit-details-marker { display: none; }
.rs-more summary .rs-muted { font-weight: 500; font-size: var(--t-small); }
.rs-more summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s; }
.rs-more details[open] summary::after { transform: rotate(45deg); }
.rs-hist { width: 100%; border-collapse: collapse; font-size: var(--t-small); margin-bottom: 12px; }
.rs-hist td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.rs-hist td:first-child { font-weight: 700; white-space: nowrap; }
.rs-hist td:last-child { text-align: right; white-space: nowrap; }
.rs-hist .btn.rs-armed { border-color: var(--rust); color: var(--rust); }
.rs-json { width: 100%; box-sizing: border-box; min-height: 280px; font-family: var(--font); font-size: var(--t-small); border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--ink); padding: 10px 12px; margin-bottom: 12px; resize: vertical; }

/* no card yet */
.rs-copy { display: inline-flex; gap: 6px; align-items: center; }
.rs-copyin { height: 34px; width: 260px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font: inherit; font-size: var(--t-body); color: var(--ink); padding: 0 10px; }

/* the save bar: house glass, held over the scroll while there are unsaved changes */
.rs-savebar { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px; box-shadow: var(--shadow-md); }
.rs-sb-txt { flex: 1; min-width: 0; font-size: var(--t-body); color: var(--ink); }
.rs-sb-txt b { font-weight: 700; }
.rs-sb-txt span { color: var(--ink-2); font-size: var(--t-small); display: block; }
.rs-note { height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 10px; font: inherit; font-size: var(--t-body); width: 240px; background: var(--panel); color: var(--ink); }
.rs-note.is-err { border-color: var(--rust); box-shadow: 0 0 0 2px var(--rust-bg); }
.rs-savebar .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* phone (≤768): Suppliers is read-only there (mobile.css). The sheet renders as text; the quote stays usable. */
@media (max-width: 768px) {
  .rs-sum { font-size: var(--t-sub); }
  .rs-sheet, .rs-grid { min-width: 0; }
  .rs-grid td, .rs-grid th { padding-left: 6px; padding-right: 6px; }
  #detail .rs-pv select, #detail .rs-pv input { pointer-events: auto !important; font-size: 16px !important; }
  #detail .rs-pv select { background: var(--panel) !important; border: 1px solid var(--line) !important; padding: 0 8px !important; height: 44px; }
  #detail .rs-pv .rs-in { height: 44px; }
  #detail .rs-pv .rs-in input { background: transparent !important; border: 0 !important; padding-left: 0 !important; }
  #detail .rs-grid td { pointer-events: auto; }
}

/* phone: the pill only in the title row */
@media (max-width: 768px) { .rs-title .rs-status > span:last-child { display: none; } }

/* Suppliers list: the red "Not quoting" flag (step 5, 2026-10-06) — a read-only status tint, not a button */
.sup-nq { display: inline-block; margin-left: 6px; font-size: var(--t-micro); font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--rust-bg); color: var(--rust); vertical-align: middle; }

/* Delivery Schedule (2026-10-06): the same sheet look, its own Save (suppliers.js renderDeliverySchedule) */
.rs-select, .rs-date { height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font: inherit; font-size: var(--t-body); color: var(--ink); padding: 0 8px; }
.rs-select:focus, .rs-date:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 2px var(--green-bg); }
.rs-sheet.rs-sched td { height: 38px; }
.rs-sheet.rs-sched td:first-child { min-width: 110px; }
.rs-chip.is-date { display: inline-flex; align-items: center; gap: 2px; cursor: default; font-family: var(--font); background: var(--panel); }
.rs-chip.is-date .rs-x { width: 22px; height: 22px; font-size: 14px; }
@media (max-width: 768px) {
  .rs-sheet.rs-sched td:first-child { min-width: 0; }
  .rs-sheet.rs-sched th, .rs-sheet.rs-sched td { padding-left: 4px; padding-right: 4px; font-size: var(--t-small); }
}
