/* Compare any firms (/compare/build/) — js/compare-build.js. Design system v2: orange = actions only, blue = data and
   links, band colours = Transparency Index only. Bars use the same look as the head-to-head pages (build-vs.py). */
.cb-hero { padding: calc(var(--header-height) + 24px) 0 8px; }
.cb-lede { font-size: var(--fs-md); line-height: 1.55; color: var(--text-secondary); max-width: 68ch; margin: 0 0 20px; }
.cb-noscript { max-width: 68ch; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--bg-card); }
.cb-noscript a { color: var(--link); text-decoration: underline; }

/* picker */
.cb-pick { max-width: 760px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; padding: 18px 20px; }
.cb-combo { position: relative; }
.cb-label { display: block; font-weight: 600; font-size: var(--fs-base); color: var(--text-primary); margin: 0 0 8px; }
.cb-label-n { font-weight: 400; font-size: var(--fs-sm); color: var(--text-tertiary); }
.cb-field { position: relative; }
.cb-field-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }
.cb-input { width: 100%; min-height: 48px; padding: 10px 14px 10px 42px; border-radius: 12px; border: 1px solid var(--border-light);
  background: var(--bg-primary); color: var(--text-primary); font: inherit; font-size: 16px; }
.cb-input::placeholder { color: var(--text-tertiary); opacity: 1; }
.cb-input:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
.cb-input:disabled { opacity: .7; cursor: not-allowed; }
.cb-help { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--text-tertiary); }
.cb-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 18px); margin: 0; padding: 6px; list-style: none;
  max-height: 320px; overflow-y: auto; background: #10141b; border: 1px solid var(--border-light); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.cb-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--text-primary); font-size: var(--fs-sm); }
.cb-opt:hover, .cb-opt.is-active { background: rgba(124,196,250,.12); }
.cb-opt.is-active { outline: 1px solid var(--link); }
.cb-opt-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-opt-m { font-size: var(--fs-xs); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.cb-opt--none { cursor: default; color: var(--text-secondary); }
.cb-opt--none:hover { background: none; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.cb-chips[hidden] { display: none; }
.cb-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 6px; border: 1px solid var(--border-light); border-radius: 12px;
  background: rgba(255,255,255,.03); color: var(--text-primary); font-weight: 600; font-size: var(--fs-sm); }
.cb-chip-x { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none;
  color: var(--text-secondary); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cb-chip-x:hover { background: rgba(255,255,255,.08); color: var(--text-primary); }
.cb-chip-x:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.cb-status { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--text-secondary); min-height: 1.4em; }
.cb-start { margin: 4px 0 0; }
.cb-start-t { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--text-tertiary); }
.cb-start-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cb-pair { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-light); border-radius: 10px;
  color: var(--text-secondary); text-decoration: none; font-size: var(--fs-sm); background: rgba(255,255,255,.02); }
.cb-pair:hover { border-color: var(--link); color: var(--text-primary); }
.cb-vs { color: var(--text-tertiary); font-size: var(--fs-xs); }

/* result */
.cb-result { padding: 28px 0 48px; }
.cb-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; max-width: 1100px; margin: 0 0 6px; }
.cb-result-head h2 { font-size: var(--fs-lg); margin: 0; }
.cb-result-head h2:focus { outline: none; }
.cb-result-head h2:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 4px; }
.cb-share { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--action);
  background: transparent; color: var(--action); font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.cb-btn:hover, .cb-btn:focus-visible { background: var(--action); color: #0b0f17; }
.cb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cb-btn:disabled { opacity: .6; cursor: progress; }
.cb-btn[hidden] { display: none; }
.cb-share-msg { margin: 0 0 8px; min-height: 1.4em; font-size: var(--fs-sm); color: var(--text-secondary); overflow-wrap: anywhere; }
.cb-writeups { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; font-size: var(--fs-sm); }
.cb-writeups a { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cb-writeups a:hover { color: var(--link-hover); }

.cb-scroll { position: relative; max-width: 1100px; border: 1px solid var(--border-light); border-radius: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cb-scroll:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.cb-scroll-hint { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--text-tertiary); }
.cb-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.cb-table th, .cb-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: top;
  font-size: var(--fs-sm); line-height: 1.5; color: var(--text-primary); overflow-wrap: anywhere; }
.cb-table thead th { background: rgba(255,255,255,.035); border-bottom-color: var(--border-light); }
.cb-table thead th:first-child, .cb-table tbody th { width: 190px; }
.cb-table tbody th { color: var(--text-tertiary); font-weight: 500; background: #0d1117; }
.cb-table tbody tr:last-child th, .cb-table tbody tr:last-child td { border-bottom: 0; }
.cb-th { display: flex; align-items: center; gap: 10px; }
.cb-th-n { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); line-height: 1.25; }
.cb-ti { display: inline-flex; align-items: center; gap: 8px; }
.cb-ti a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.cb-ti span[class^="band-text"] { font-weight: 600; }
.cb-muted { color: var(--text-tertiary); font-size: var(--fs-xs); }
.cb-np { color: var(--text-tertiary); font-style: italic; }
.cb-yes, .cb-no { display: inline-flex; align-items: center; gap: 6px; }
.cb-yes .ico { color: var(--data); }
.cb-no { color: var(--text-secondary); }
.cb-no .ico { color: var(--text-tertiary); }
.cb-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-review, .cb-visit { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 6px 12px; border-radius: 8px;
  font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.cb-review { border: 1px solid var(--border-light); color: var(--text-primary); font-weight: 500; }
.cb-review:hover { border-color: var(--text-tertiary); background: var(--bg-elevated); }
.cb-visit { background: var(--action); border: 1px solid var(--action); color: #000; font-weight: 700; }
.cb-visit:hover { background: var(--action-hover); border-color: var(--action-hover); color: #000; }
.cb-visit .mpg-ad { border-color: currentColor; }

/* bars: same as the head-to-head pages */
.cb-table .vs-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); margin: 4px 0 8px; max-width: 180px; }
.cb-table .vs-bar i { display: block; height: 100%; border-radius: 3px; background: var(--text-tertiary); opacity: .55; }
.cb-table .vs-bar--win i { background: var(--data); opacity: 1; }
.cb-table .vs-bar--excellent i { background: var(--band-excellent); } .cb-table .vs-bar--good i { background: var(--band-good); }
.cb-table .vs-bar--mixed i { background: var(--band-mixed); } .cb-table .vs-bar--poor i { background: var(--band-poor); }
.cb-table :is(.vs-bar--excellent, .vs-bar--good, .vs-bar--mixed, .vs-bar--poor):not(.vs-bar--win) i { opacity: .45; }
.cb-table .vs-win { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid rgba(56,189,248,.45); border-radius: 6px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--data); line-height: 1.5; vertical-align: 1px; }

.cb-note, .cb-disclosure { max-width: 1100px; font-size: var(--fs-sm); color: var(--text-tertiary); line-height: 1.6; margin: 14px 0 0; }
.cb-note a { color: var(--link); text-decoration: underline; }
.cb-note strong { color: var(--text-secondary); }

@media (max-width: 768px) {
  .cb-lede { font-size: var(--fs-base); }
  .cb-pick { padding: 14px; }
  .cb-result { padding: 20px 0 36px; }
  .cb-result-head h2 { font-size: var(--fs-md); }
  .cb-table th, .cb-table td { padding: 10px 8px; }
  .cb-table thead th:first-child, .cb-table tbody th { width: 96px; }
  /* first column stays put while the firm columns scroll */
  .cb-table tbody th, .cb-table thead th:first-child { position: sticky; left: 0; z-index: 1; }
  .cb-table thead th:first-child { background: #12161d; }
  .cb-table.cb-n3 { min-width: 600px; }
  .cb-th { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cb-th .mono--md { width: 34px; height: 34px; font-size: var(--fs-xs); border-radius: 9px; }
  .cb-th-n { font-size: var(--fs-sm); }
  .cb-ti { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cb-table .vs-win { margin-left: 0; }
  .cb-links { flex-direction: column; }
  .cb-review, .cb-visit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cb-opt, .cb-btn { transition: none; } }
