/* ---------- this page: the filter column and the results ---------- */
  .brand { color:var(--txt); text-decoration:none; min-width:0; }
  .tag { flex:0 0 auto; }
  .main { flex:1; min-width:0; max-width:1180px; }
  .empty { padding:36px 24px; }

  body.locked { overflow:hidden; }
  input, .price, .stat .val, .data-status, .row-meta { font-variant-numeric:tabular-nums; }
  .brand .name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .data-status { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--dim); }
  .data-status .dot { width:6px; height:6px; border-radius:50%; background:var(--green); flex:0 0 auto; }
  .data-status.stale { color:var(--amber); }
  .data-status.stale .dot { background:#f59e0b; }
  .acct { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
  .acct a { font-size:13px; text-decoration:none; color:var(--acc); }
  .acct a.enter { background:var(--acc); color:#fff; border-radius:8px; padding:8px 12px;
                  font-weight:500; }
  .acct a.enter:hover { background:var(--acc-d); }
  .acct a.quiet { color:var(--dim); padding:8px 6px; border-radius:8px; }
  .acct a.quiet:hover { color:var(--txt); background:var(--bg); }
  .acct-mail { font-size:13px; font-weight:500; max-width:170px; overflow:hidden;
               text-overflow:ellipsis; white-space:nowrap; }

  /* the top bar's readiness control: one pill between the data status and the account */
  .ready { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto;
           font-size:12px; font-weight:600; text-decoration:none; border-radius:8px;
           padding:7px 10px; border:1px solid var(--line); background:var(--bg);
           color:var(--dim); white-space:nowrap; }
  .ready span { font-weight:700; }
  .ready.ok { background:var(--green-bg); border-color:var(--green-line); color:#047857; }
  .ready.part { background:var(--amber-bg); border-color:var(--amber-line); color:var(--amber); }
  .ready:hover { filter:brightness(.97); }

  .warn-bar { background:var(--amber-bg); border-bottom:1px solid var(--amber-line);
              color:#78350f; padding:10px 16px; font-size:13px; }

  /* ---------- the readiness banner above the summary card ---------- */
  .banner { display:flex; align-items:center; justify-content:space-between; gap:14px;
            flex-wrap:wrap; background:var(--amber-bg); border:1px solid var(--amber-line);
            border-radius:var(--radius); padding:14px 16px; margin-bottom:16px; }
  .banner-text { min-width:0; }
  .banner-text .head { margin:0; font-size:14px; font-weight:600; color:#7c2d12; }
  .banner-text .note { margin:3px 0 0; font-size:12.5px; color:#92400e; line-height:1.4; }
  .btn.amber { background:#b45309; border:1px solid #b45309; color:#fff; min-height:38px;
               font-size:12.5px; flex:0 0 auto; }
  .btn.amber:hover { background:#92400e; border-color:#92400e; }

  /* ---------- layout ---------- */
  .shell { display:flex; align-items:flex-start; gap:24px; max-width:1520px;
           margin:0 auto; padding:20px 16px 60px; }
  .main { align-self:stretch; }
  /* The column stays under the bar and scrolls inside itself: the card's body scrolls, its
     bottom two buttons do not. The height leaves room for the bar above (56px), the frame's own
     padding AND the snapshot warning strip, which can sit between the bar and the column. */
  .sidebar { width:320px; flex:0 0 320px; position:sticky; top:76px;
             max-height:calc(100vh - 136px); display:flex; }

  /* ---------- filters ---------- */
  .filters { padding:0; display:flex; flex-direction:column; min-height:0; flex:1 1 auto;
             overflow:hidden; }
  .filters-head { display:flex; align-items:center; justify-content:space-between; gap:8px;
                  padding:14px 16px 10px; flex:0 0 auto; }
  .filters h2 { margin:0; font-size:16px; font-weight:600; }
  .drawer-close { display:none; border:1px solid var(--line); background:#fff; color:var(--dim);
                  border-radius:6px; width:30px; height:30px; font-size:13px; cursor:pointer; }
  .filters-body { min-height:0; overflow-y:auto; padding:0 16px; flex:1 1 auto; }
  .fgroup { padding:12px 0; border-top:1px solid var(--line); }
  .fgroup.first { border-top:none; padding-top:2px; }
  .flabel { display:flex; align-items:center; justify-content:space-between; gap:8px;
            font-size:13px; font-weight:500; margin:0 0 8px; }
  .flabel .link { font-size:12px; font-weight:400; color:var(--acc); background:none;
                  border:none; padding:0; cursor:pointer; text-decoration:none; }
  .flabel .link:hover { text-decoration:underline; }

  .seg { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; padding:2px;
         background:var(--bg); border:1px solid var(--line); border-radius:8px; margin-bottom:8px; }
  .seg button { border:1px solid transparent; background:transparent; font:inherit;
                font-size:12px; font-weight:500; color:var(--dim); padding:6px 2px;
                border-radius:6px; cursor:pointer; overflow:hidden; text-overflow:ellipsis;
                white-space:nowrap; }
  .seg button.on { background:#fff; border-color:var(--line); color:var(--txt); font-weight:600; }

  .range { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .field { position:relative; }
  .field input { width:100%; height:40px; padding:0 26px 0 12px; font:inherit; font-size:14px;
                 color:var(--txt); background:#fff; border:1px solid var(--line);
                 border-radius:8px; -moz-appearance:textfield; }
  .field input::-webkit-outer-spin-button,
  .field input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
  .field input:hover { border-color:#cbd2df; }
  .field input:focus { outline:none; border-color:var(--acc);
                       box-shadow:0 0 0 3px rgba(47,107,255,.12); }
  .field .unit { position:absolute; right:10px; top:50%; transform:translateY(-50%);
                 font-size:12px; color:var(--dim); pointer-events:none; }

  .chips { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
  /* Rooms are toggle buttons: `aria-pressed` is the state, `.on` is how it looks, and all four
     pressed is the neutral, unfiltered row. */
  .chip { height:40px; border:1px solid var(--line); border-radius:8px; background:#fff;
          font:inherit; font-size:14px; font-weight:500; color:var(--txt); cursor:pointer; }
  .chip:hover { background:var(--bg); }
  .chip.on { background:var(--acc-soft); border-color:var(--acc); color:var(--acc);
             font-weight:600; }
  .chips.all .chip.on { background:#fff; border-color:var(--line); color:var(--txt);
                        font-weight:500; }
  .chip:focus-visible { outline:2px solid var(--acc); outline-offset:2px; }

  .radio-row { display:flex; align-items:center; gap:10px; min-height:36px; padding:0 8px;
               border-radius:6px; cursor:pointer; font-size:14px; }
  .radio-row:hover { background:var(--bg); }
  .radio-row input { width:16px; height:16px; accent-color:var(--acc); margin:0; }

  .dist { border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; }
  .dist-list { max-height:220px; overflow-y:auto; }
  .dd-item { display:flex; align-items:center; gap:8px; padding:8px 12px; cursor:pointer;
             font-size:13px; border-bottom:1px solid var(--line2); margin:0; }
  .dd-item:last-child { border-bottom:none; }
  .dd-item:hover { background:var(--bg); }
  .dd-item input { width:16px; height:16px; accent-color:var(--acc); flex:0 0 auto; margin:0; }
  .dd-item .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .dd-item .cnt { font-size:12px; color:var(--dim); font-weight:600; font-variant-numeric:tabular-nums; }
  .dd-foot { display:flex; align-items:center; justify-content:space-between; gap:8px;
             padding:8px 12px; background:var(--bg); font-size:12px; color:var(--dim); }
  .dd-foot a { color:var(--acc); text-decoration:none; cursor:pointer; }
  .dd-foot a:hover { text-decoration:underline; }

  .na-row { display:flex; align-items:center; justify-content:space-between; gap:8px;
            font-size:13px; color:var(--dim2); padding:3px 0; }
  .na-row .s { text-decoration:line-through; }
  .na { font-size:11px; padding:1px 6px; border-radius:4px; border:1px solid var(--line);
        background:var(--bg); color:var(--dim); flex:0 0 auto; }

  /* the bottom of the card: two buttons that are always there, under the scrolling body */
  .filters-foot { flex:0 0 auto; padding:12px 16px 14px; border-top:1px solid var(--line);
                  background:#fafbfc; }
  .actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .actions .btn { font-size:12.5px; padding:0 8px; }
  .btn { min-height:40px; display:inline-flex; align-items:center; justify-content:center;
         gap:6px; font:inherit; font-size:13px; font-weight:500; border-radius:8px;
         cursor:pointer; padding:0 12px; }
  .btn.primary { background:var(--acc); color:#fff; border:1px solid var(--acc); }
  .btn.primary:hover { background:var(--acc-d); border-color:var(--acc-d); }
  .btn.ghost { background:#fff; color:var(--txt); border:1px solid var(--line); }
  .btn.ghost:hover { background:var(--bg); }
  .save-hint { font-size:12px; color:var(--dim); margin-top:8px; }
  .save-hint.good { color:var(--green); }
  .save-hint.bad { color:var(--red); }
  .drawer-apply { display:none; width:100%; margin-top:10px; }

  .mobile-filter-btn { display:none; width:100%; min-height:44px; align-items:center;
                       justify-content:center; gap:8px; background:#fff;
                       border:1px solid var(--line); border-radius:8px; font:inherit;
                       font-size:14px; font-weight:500; color:var(--txt); cursor:pointer; }
  .mobile-filter-btn .badge-n { background:var(--acc-soft); color:var(--acc);
                                border-radius:6px; padding:0 6px; font-size:12px;
                                font-weight:600; }
  .overlay { display:none; position:fixed; inset:0; background:rgba(22,26,32,.4); z-index:55; }

  /* ---------- summary ---------- */
  .summary { padding:16px 20px; }
  .summary-top { display:flex; align-items:flex-start; justify-content:space-between;
                 gap:12px; flex-wrap:wrap; }
  .big { margin:0; font-size:22px; font-weight:600; letter-spacing:-.2px; }
  .sub { margin:2px 0 0; font-size:13px; color:var(--dim); }
  .honest { font-size:12px; color:var(--dim); background:var(--bg);
            border:1px solid var(--line); border-radius:8px; padding:6px 10px; max-width:330px; }
  .honest b { color:var(--txt); font-weight:500; }
  .tags { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:12px;
          padding-top:12px; border-top:1px solid var(--line); }
  .tags .lead { font-size:12px; color:var(--dim); margin-right:2px; }
  .tags .pills { display:inline-flex; flex-wrap:wrap; gap:6px; }
  .pill { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500;
          padding:3px 4px 3px 10px; border-radius:6px; background:var(--acc-soft);
          color:var(--acc); border:1px solid rgba(47,107,255,.2); }
  .pill-x { border:none; background:transparent; color:inherit; font:inherit; font-size:14px;
            line-height:1; cursor:pointer; width:18px; height:18px; border-radius:4px;
            display:inline-flex; align-items:center; justify-content:center; padding:0; }
  .pill-x:hover { background:rgba(47,107,255,.18); }
  .tags a { font-size:12px; color:var(--dim); text-decoration:underline; cursor:pointer; }

  .breakdowns { display:grid; grid-template-columns:repeat(3,1fr); gap:12px;
                margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
  .bd { background:#fafbfc; border:1px solid var(--line); border-radius:8px; padding:12px; }
  .bd h4 { margin:0 0 8px; font-size:12px; font-weight:500; color:var(--dim);
           display:flex; justify-content:space-between; gap:8px; }
  .stat { font-size:12px; margin-bottom:7px; }
  .stat:last-child { margin-bottom:0; }
  .stat .line { display:flex; justify-content:space-between; gap:8px; }
  .stat .bar { height:6px; background:var(--line); border-radius:99px; overflow:hidden;
               margin-top:3px; }
  .stat .bar i { display:block; height:100%; background:var(--acc); border-radius:99px; }
  .stat .val { color:var(--dim); }
  .stat .name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

  /* ---------- list ---------- */
  .list-head { display:flex; align-items:center; justify-content:space-between; gap:12px;
               margin:20px 0 8px; flex-wrap:wrap; }
  .list-head h2 { margin:0; font-size:14px; font-weight:600; }
  .list-head .n { color:var(--dim); font-weight:400; }
  .sort { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--dim); }
  .sort select { height:38px; font:inherit; font-size:13px; font-weight:500; color:var(--txt);
                 background:#fff; border:1px solid var(--line); border-radius:8px; padding:0 8px; }

  .row { display:flex; align-items:center; justify-content:space-between; gap:16px;
         background:#fff; border:1px solid var(--line); border-radius:10px;
         padding:14px 16px; margin-bottom:8px; }
  .row:hover { border-color:#cbd2df; }
  .row-main { min-width:0; }
  .row-top { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .row-addr { font-size:15px; font-weight:600; }
  .row-dist { font-size:13px; color:var(--dim); }
  .row-src { font-size:12px; font-weight:500; color:var(--dim); background:var(--bg);
             border:1px solid var(--line); border-radius:4px; padding:1px 8px; }
  .row-badges { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
  .badge { font-size:11px; font-weight:500; padding:2px 8px; border-radius:6px;
           border:1px solid var(--line); background:var(--bg); color:var(--txt); }
  .badge.wbs { background:var(--acc-soft); border-color:rgba(47,107,255,.2); color:var(--acc); }
  .badge.muted { color:var(--dim); font-weight:400; }
  .badge.ok { background:var(--green-bg); border-color:var(--green-line); color:#047857; }
  .badge.warn { background:var(--amber-bg); border-color:var(--amber-line); color:var(--amber); }
  .badge.bad { background:var(--red-bg); border-color:var(--red-line); color:var(--red); }
  .row-found { font-size:12px; color:var(--dim2); }
  .row-meta { margin-top:6px; font-size:13px; color:var(--dim); }
  .row-meta b { color:var(--txt); font-weight:600; }
  .row-meta .muted { color:var(--dim); }
  .row-meta .dot-sep { color:#cbd2df; }
  .row-side { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end;
              justify-content:center; gap:6px; text-align:right; }
  .price { font-size:19px; font-weight:600; line-height:1.1; }
  .price-type { font-size:11px; color:var(--dim); }
  .price-none { font-size:13px; color:var(--dim); background:var(--bg);
                border:1px solid var(--line); border-radius:6px; padding:3px 8px; }
  .row-link { font-size:12.5px; font-weight:500; color:var(--acc); text-decoration:none;
              background:var(--acc-soft); border:1px solid rgba(47,107,255,.2);
              border-radius:6px; padding:5px 9px; white-space:nowrap; }
  .row-link:hover { background:var(--acc); color:#fff; border-color:var(--acc); }
  .empty .ico { width:40px; height:40px; border-radius:50%; background:var(--bg);
                border:1px solid var(--line); color:var(--dim); margin:0 auto 12px;
                display:flex; align-items:center; justify-content:center; }
  .empty h3 { margin:0 0 6px; font-size:15px; font-weight:600; }
  .empty p { margin:0 auto 14px; font-size:13px; color:var(--dim); max-width:420px; }

  .limits { margin:0; }
  .limits summary { font-size:12px; color:var(--acc); cursor:pointer; list-style:none; }
  .limits summary::-webkit-details-marker { display:none; }
  .limits summary:hover { text-decoration:underline; }
  .limits table { width:100%; border-collapse:collapse; margin-top:8px; font-size:12px; }
  .limits th, .limits td { text-align:left; padding:5px 6px; border-bottom:1px solid var(--line2); }
  .limits th { color:var(--dim); font-weight:500; }
  .limits .note { margin:8px 0 0; font-size:11.5px; color:var(--dim); line-height:1.4; }

  @media (max-width:1023px) {
    .shell { padding:12px; gap:0; display:block; }
    .main { max-width:none; }
    /* the same card, as a drawer: it slides in from the left, full height */
    .sidebar { position:fixed; top:0; bottom:0; left:0; width:min(360px,88vw);
               max-height:none; height:100%; z-index:60; background:#fff;
               border-right:1px solid var(--line); transform:translateX(-100%);
               transition:transform .2s ease; display:flex; overflow:hidden; }
    .sidebar.open { transform:none; }
    .filters { border:none; border-radius:0; width:100%; }
    .filters-body { padding:0 16px; overflow-y:auto; }
    .overlay.open { display:block; }
    .mobile-filter-btn { display:flex; margin-bottom:12px; }
    .drawer-close { display:block; }
    .drawer-apply { display:inline-flex; }
    .breakdowns { grid-template-columns:1fr; }
    .summary { padding:16px; }
    .honest { max-width:none; }
    .row { flex-direction:column; align-items:stretch; gap:10px; }
    .row-side { flex-direction:row; align-items:center; justify-content:space-between;
                border-top:1px solid var(--line); padding-top:10px; text-align:left; }
    .row-side .price-block { text-align:left; }
    .data-status { display:none; }
    .tag { display:none; }
    .ready { font-size:11.5px; padding:6px 8px; }
  }

  @media (max-width:520px) {
    .shell { padding:10px; }
    /* the bar keeps every part of itself: nothing is cut off at 390px, it wraps instead */
    .topbar { height:auto; min-height:56px; padding:8px 12px; flex-wrap:wrap; row-gap:6px; }
    .acct { margin-left:auto; }
    .acct a.enter { padding:7px 10px; font-size:12px; }
    .brand { font-size:14px; }
    .big { font-size:19px; }
    .banner { padding:12px; }
    .btn.amber { width:100%; }
    .list-head { align-items:flex-start; }
    .sort { width:100%; }
    .sort select { flex:1; }
  }
