/* Ranch overview ------------------------------------------------------------ */
.ranch { position: absolute; inset: 0; z-index: 1002; overflow: auto; background: var(--page); padding: 18px 22px 24px; }
.ranch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ranch-head h2 { font-size: 17px; text-transform: none; letter-spacing: -.01em; color: var(--ink); font-weight: 700; }
.ranch-head p { margin: 3px 0 0; display: flex; align-items: center; gap: 6px; }
.ranch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 16px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.rchip b { color: var(--ink); }
.rchip.warn { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 40%, var(--line)); }
.rchip.ok svg { width: 11px; height: 11px; color: var(--good-ink); }
.ranch-table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ranch-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ranch-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; background: var(--surface); position: sticky; top: 0; }
.ranch-table th:hover, .ranch-table th.sorted { color: var(--ink); }
.ranch-table th i { font-style: normal; font-size: 8px; margin-left: 4px; }
.ranch-table th:not([data-k]) { cursor: default; }
.ranch-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.ranch-table tr:last-child td { border-bottom: none; }
.ranch-table tbody tr { cursor: pointer; }
.ranch-table tbody tr:hover { background: var(--surface-2); }
.ranch-table tbody tr.active { box-shadow: inset 3px 0 0 var(--accent); }
.ranch-table tbody tr.attn td.blk b { color: var(--ink); }
.ranch-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranch-table td b { font-weight: 650; font-variant-numeric: tabular-nums; }
.ranch-table td small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; white-space: nowrap; }
.ranch-table td .badge { margin: 0 0 0 6px; vertical-align: 1px; }
.ranch-table td:nth-child(3) .badge { margin-left: 0; }
.ranch-table td.blk { display: flex; align-items: center; gap: 10px; white-space: normal; min-width: 220px; }
.ranch-table td.blk .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ranch-table td.blk small { white-space: normal; }
.ranch-table .muted { color: var(--muted); }
.ranch-table .wx { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-variant-numeric: tabular-nums; }
.ranch-table .wx.warn { color: var(--warning-ink); font-weight: 600; }
.ranch .fine { margin-top: 10px; }
.seg.units span { padding: 4px 9px; font-size: 12px; }
#btnRanch[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); }
/* the list: one line per block (dot colours from css/findings.css) */
.ranch-head .btns { display: flex; align-items: center; gap: 8px; }
.bl-headline { margin: 14px 0 8px; font-size: 14px; font-weight: 650; color: var(--ink); }
.bl-headline.warn { color: var(--warning-ink); }
.blist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.blist li { display: grid; grid-template-columns: 10px minmax(140px, 260px) minmax(0, 1fr) 14px; align-items: center; gap: 4px 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.blist li:last-child { border-bottom: none; }
.blist li.none { display: block; cursor: default; color: var(--muted); }
.blist li[data-id]:hover, .blist li:focus-visible { background: var(--surface-2); }
.blist li.active { box-shadow: inset 3px 0 0 var(--accent); }
.blist .find-dot { margin: 0; }
.blist li.warn .find-dot { background: var(--warning); }
.blist li.ok .find-dot { background: var(--good); }
.bl-name b { display: block; font-size: 14px; font-weight: 650; }
.bl-name small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.blist p { margin: 0; font-size: 13.5px; color: var(--muted); }
.blist li.warn p { color: var(--ink); font-weight: 550; }
.blist p .spin { display: inline-block; vertical-align: -2px; margin-right: 4px; }
.bl-go { color: var(--muted); font-size: 18px; line-height: 1; }
@media (max-width: 900px) {
  .blist li { grid-template-columns: 10px minmax(0, 1fr) 14px; }
  .blist li p { grid-column: 2; grid-row: 2; }
  .blist .bl-go { grid-column: 3; grid-row: 1 / span 2; }
  .ranch { position: fixed; top: 0; z-index: 1500; padding: 14px; }
  .seg.units { order: 5; }
  /* phone: one card per block instead of a wide table */
  .ranch-table { background: none; border: none; overflow: visible; }
  .ranch-table thead { display: none; }
  .ranch-table table, .ranch-table tbody { display: block; }
  .ranch-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; margin-bottom: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .ranch-table td { display: block; padding: 0; border: none; white-space: normal; text-align: left !important; }
  .ranch-table td.blk { grid-column: 1 / -1; min-width: 0; }
  .ranch-table td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .ranch-table td:nth-child(7) { grid-column: 1 / -1; }
}
