/* Composer Benchmark: the Houses page (manager.html → Houses in the design artifact). Every rule sits under .cb.
   Tokens come from composer_benchmark_tokens.css. */
.cb.cbh { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.5; padding: 20px; border-radius: 16px; -webkit-font-smoothing: antialiased; }
.cbh *, .cbh *::before, .cbh *::after { box-sizing: border-box; }
.cbh h1, .cbh h2, .cbh h3, .cbh p, .cbh dl { margin: 0; }
.cbh :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cbh .mono { font-family: var(--mono); }
.cbh .small { font-size: 0.75rem; color: var(--muted); }
.cbh .sub { color: var(--muted); font-size: 0.88rem; }
.cbh .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cbh .row.spread { justify-content: space-between; }
.cbh .lowt { color: var(--warn); font-weight: 600; }

/* Page */
.cbh .mgr { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cbh .pagehead { display: flex; flex-direction: column; gap: 4px; }
.cbh .pagehead h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.cbh .card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cbh .card h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.cbh .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cbh .kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.cbh .kl { font-size: 0.76rem; color: var(--muted); }
.cbh .kv2 { font-family: var(--mono); font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.cbh .ks { font-size: 0.74rem; color: var(--muted); }
.cbh .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.cbh .stack2 { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Buttons, links, fields */
.cbh .btn { display: inline-block; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.85rem; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.cbh .btn:hover { background: var(--sunk); }
.cbh .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cbh .btn.primary:hover { filter: brightness(1.1); }
.cbh .btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cbh .linkbtn { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: 0.85rem; }
.cbh .linkbtn.small { font-size: inherit; }
.cbh .field { display: flex; flex-direction: column; gap: 5px; font-size: 0.82rem; font-weight: 500; }
.cbh input.other { font: inherit; font-weight: 400; font-size: 0.84rem; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }
.cbh .impform { align-items: flex-end; }
.cbh .impform .grow { flex: 1 1 240px; min-width: 0; }

/* Chips */

/* Tags */
.cbh .tag { display: inline-block; width: fit-content; font-size: 0.68rem; font-weight: 600; border-radius: 4px; padding: 0 5px; border: 1px solid var(--line-strong); color: var(--muted); }
.cbh .tag.unsure { color: var(--gold); border-color: var(--gold); }
.cbh .tag.note { color: var(--accent); border-color: var(--accent); }
.cbh .tag.ready { color: var(--good); border-color: var(--good); }

/* Coverage and sampler */
.cbh .gridwrap { overflow-x: auto; }
.cbh table.cov { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 560px; font-variant-numeric: tabular-nums; }
.cbh .cov th { font-size: 0.72rem; font-weight: 500; color: var(--muted); padding: 2px 4px; }
.cbh .cov th.rowh { text-align: right; white-space: nowrap; }
.cbh .cov td { position: relative; height: 40px; border-radius: 6px; background: var(--sunk); overflow: hidden; text-align: center; font-family: var(--mono); font-size: 0.8rem; }
.cbh .cov td::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: var(--fill); background: var(--accent); opacity: 0.35; }
.cbh .cov td span { position: relative; }
.cbh .cov td i { font-style: normal; color: var(--muted); font-size: 0.7rem; }
.cbh .cov td.short { box-shadow: inset 0 0 0 1.5px var(--warn); }
.cbh .cov td.short span { color: var(--warn); font-weight: 600; }
.cbh .kv { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 4px 16px; font-size: 0.86rem; }
.cbh .kv dt { color: var(--muted); }
.cbh .kv dd { margin: 0; font-weight: 500; }

/* House tiles: the photo opens the house, with its number top left and labelling status bottom left */
.cbh .houses { display: flex; flex-direction: column; gap: 14px; }
.cbh .filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cbh .filters select { font: inherit; font-weight: 400; font-size: 0.84rem; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }
.cbh .hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cbh .htile { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--sunk); min-width: 0; text-decoration: none; }
.cbh a.htile:hover, .cbh a.htile:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cbh .ph { position: relative; }
.cbh .hph { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 8px; background: var(--sunk); }
.cbh .htile .hph { border-radius: 0; }
.cbh .hph-empty { display: flex; align-items: center; justify-content: center; }
.cbh .src { position: absolute; left: 6px; bottom: 6px; font-size: 0.6rem; font-weight: 600; background: var(--paper); color: var(--muted); border-radius: 4px; padding: 0 5px; }
.cbh .ov { position: absolute; background: var(--paper); border-radius: 6px; }
.cbh .ov.tl { top: 8px; left: 8px; padding: 2px 7px; font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.cbh .ov.bl { bottom: 8px; left: 8px; padding: 1px 6px; font-size: 0.72rem; }

/* Import preview */
.cbh .consequence { background: var(--sunk); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cbh .preview { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.cbh .radios { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cbh .radio { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--line-strong); background: var(--paper); border-radius: 12px; padding: 12px; cursor: pointer; }
.cbh .radio input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cbh .radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.cbh .radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cbh .radio:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.cbh .radio .rt { font-weight: 600; font-size: 0.9rem; }
.cbh .radio .cs { font-size: 0.76rem; color: var(--muted); }

@media (max-width: 1100px) { .cbh .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .cb.cbh { padding: 16px; }
  .cbh .kpis, .cbh .radios, .cbh .preview { grid-template-columns: minmax(0, 1fr); }
  .cbh .kv { grid-template-columns: minmax(0, 1fr); }
  .cbh .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* Sampler log */
.cbh .samplerlog { margin: 0; max-height: 320px; overflow: auto; background: var(--sunk); border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
