/* Template contracts: see docs/frontend-template.md before editing. */
/* THEME: keep the four token blocks and group colors in sync. */

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --page: #f4f6fa;
  --surface: #ffffff;
  --ink: #0a1626;
  --ink-2: #475569;
  --ink-3: #64748b;
  --grid: #e2e8f0;
  --baseline: #a0a0a0;
  --border: rgba(10, 22, 38, 0.08);
  --accent: #1257ca;
  --accent-ink: #ffffff;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --s1: #4a3aa7; --s2: #0b8bb0; --s3: #b3369c; --s4: #7a5a43;
  --s5: #1257ca; --s6: #e34948; --s7: #e87ba4; --s8: #eb6834;
  --chrome: #ffffff;
  --footer: #07233b;
  --accent-hover: #1d6ff0;
  --shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #111111;
    --surface: #1a1a1a;
    --ink: #ffffff;
    --ink-2: #a0a0a0;
    --ink-3: #a0a0a0;
    --grid: #292929;
    --baseline: #454545;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #00a3ff;
    --good: #0ca30c;
    --s1: #9085e9; --s2: #28b4d8; --s3: #c45cc9; --s4: #a9876c;
    --s5: #00a3ff; --s6: #e66767; --s7: #d55181; --s8: #d95926;
    --chrome: #0b0b0b;
    --footer: #0b0b0b;
    --accent-hover: #00e5ff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="light"] {
  --chrome: #ffffff; --footer: #07233b; --accent-hover: #1d6ff0;
  --page: #f4f6fa; --surface: #ffffff; --ink: #0a1626; --ink-2: #475569;
  --ink-3: #64748b; --grid: #e2e8f0; --baseline: #a0a0a0;
  --border: rgba(10, 22, 38, 0.08); --accent: #1257ca;
  --s1: #4a3aa7; --s2: #0b8bb0; --s3: #b3369c; --s4: #7a5a43;
  --s5: #1257ca; --s6: #e34948; --s7: #e87ba4; --s8: #eb6834;
  --shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
}
:root[data-theme="dark"] {
  --chrome: #0b0b0b; --footer: #0b0b0b; --accent-hover: #00e5ff;
  --page: #111111; --surface: #1a1a1a; --ink: #ffffff; --ink-2: #a0a0a0;
  --ink-3: #a0a0a0; --grid: #292929; --baseline: #454545;
  --border: rgba(255, 255, 255, 0.08); --accent: #00a3ff;
  --s1: #9085e9; --s2: #28b4d8; --s3: #c45cc9; --s4: #a9876c;
  --s5: #00a3ff; --s6: #e66767; --s7: #d55181; --s8: #d95926;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
button, input, select { font: inherit; color: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px 64px; }
/* ── header ─────────────────────────────────────────── */
header.top {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 0 20px;
  background: var(--chrome);
  box-shadow: 0 0 0 100vmax var(--chrome);
  clip-path: inset(0 -100vmax);
  border-bottom: 1px solid var(--grid);
  margin-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { flex: none; display: block; }
.brand-logo img { display: block; width: 150px; height: auto; }
.brand-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.brand h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.5px; }
.brand .sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.top .spacer { flex: 1; }
.page-footer { max-width: 1200px; margin: 28px auto 0; padding: 24px 18px; border-radius: 20px; background: var(--footer); font-size: 12px; color: #c9d1d9; }
.page-footer .ask-by-address { margin: 0 0 10px; max-width: 72ch; line-height: 1.55; }
.page-footer .ask-by-address a { color: inherit; overflow-wrap: anywhere; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; flex: none; }
.header-actions a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
.header-actions a:hover { color: var(--accent); text-decoration: underline; }
/* Each help link and the mode switch stand apart from what precedes them. */
.header-actions a + a, .header-actions .switch { padding-left: 12px; border-left: 1px solid var(--border); }
.share-feedback { flex-basis: 100%; color: var(--ink-2); font-size: 12px; }
header.top:has(.share-feedback:not([hidden])) { flex-wrap: wrap; }
.theme-btn {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--ink-2);
}
.theme-btn:hover { border-color: var(--baseline); }
@media (max-width: 1100px) {
  header.top { flex-wrap: wrap; gap: 10px; }
  .top .brand { flex: 1; min-width: 0; flex-wrap: wrap; }
  .top .theme-btn { flex: none; }
  .top .spacer { display: none; }
}
@media (max-width: 720px) {
  .top .brand, .top .header-actions { flex-basis: 100%; }
  .header-actions { gap: 8px; }
  .header-actions a + a, .header-actions .switch { padding-left: 8px; }
  .header-actions .switch { white-space: nowrap; }
}

/* ── layout ─────────────────────────────────────────── */
.flow { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.flow > * { min-width: 0; }

.panel, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.card { padding: 16px 18px; }
.card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-head .spacer { flex: 1; }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.1px; }
.card-lead { color: var(--ink-3); font-size: 13px; }
/* The page's explanation where scripts do not run. */
.noscript { display: none; }
.noscript p { margin: 6px 0 0; max-width: 72ch; color: var(--ink-2); line-height: 1.55; }
.noscript a { color: var(--accent); }

/* ── the question ───────────────────────────────────── */
.need { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.need-option {
  position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 14px 18px 14px 46px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow);
}
.need-option input { position: absolute; left: 18px; top: 17px; margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.need-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.need-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.need-title { font-size: 15px; font-weight: 650; }
.need-sub { color: var(--ink-2); font-size: 13px; }
@media (max-width: 560px) { .need { grid-template-columns: 1fr; } }

/* ── hardware ───────────────────────────────────────── */
.hw-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.7fr); gap: 12px; margin-top: 12px; }
.hw-fields .field select, .hw-fields .field input[type="text"] { height: 36px; font-size: 14px; }
@media (max-width: 560px) { .hw-fields { grid-template-columns: 1fr; } }
/* Let the GPU count move below the name when they need more room. */
.device-control { display: flex; flex-wrap: wrap; gap: 8px; }
.device-control .filter-field { flex: 1 1 17rem; min-width: 0; }
.gpu-count { flex: none; }
.field .gpu-count label { font: inherit; color: inherit; text-transform: none; letter-spacing: 0; }
.seg.gpu-count span { padding: 7px 10px; font-size: 13px; }
/* A list narrowed by typing: the field, with a caret that says it is a list, and its options under it. */
.filter-field { position: relative; }
.filter-field input[type="text"] {
  padding-right: 28px; text-overflow: ellipsis;
  background: var(--page) no-repeat right 10px center / 10px 6px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23898781' stroke-width='1.5'/%3E%3C/svg%3E");
}
.filter-options {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: min(320px, 60vh); overflow: auto;
  list-style: none; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px;
}
.filter-group { padding: 8px 8px 2px; color: var(--ink-3); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.filter-option { padding: 6px 8px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.filter-option[aria-selected="true"] { font-weight: 600; }
.filter-option.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-empty { padding: 8px; color: var(--ink-3); }

.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink-2); font-size: 13px; user-select: none; }
.switch input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 30px; height: 18px; border-radius: 999px; background: var(--baseline); position: relative; transition: background 0.15s;
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s;
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(12px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── rows of cameras ────────────────────────────────── */
.groups { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.group { padding: 12px 14px; border: 1px solid var(--grid); border-radius: 10px; background: var(--surface); }
/* An operator's row: its colour, its presets in one line, and the button that removes it. */
.group.row { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) 26px; gap: 12px; align-items: end; padding: 10px 12px; }
/* The strip identifies related rows without adding an interactive control. */
.group.row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 10px 0 0 10px; background: var(--row-colour); pointer-events: none; }
.group.row:only-child::before { display: none; }
.group.row > .icon-btn { align-self: start; margin-top: 23px; }
.group.row .fields {
  grid-template-columns: 84px minmax(0, 1.2fr) 92px 84px minmax(0, 1.9fr) minmax(0, 1.5fr);
}
.group.row .group-errors { grid-column: 1 / -1; margin-top: 0; }
/* "I have hardware": how many of the row's cameras fit, under all of its fields, in the colour of the row's fit. */
.group.row .row-maximum { grid-column: 1 / -1; margin: -2px 0 0; color: var(--ink-2); font-size: 13px; }
.group.row .row-maximum:empty { display: none; }
.group.row .row-maximum[data-fit="yellow"] { color: color-mix(in srgb, var(--warning) 70%, var(--ink)); }
.group.row.over-budget .row-maximum { color: var(--critical); }
.group.row .row-maximum .badge { margin-left: 4px; }
/* A fixed setting, level with the inputs beside it. */
.field-value { display: flex; align-items: center; min-height: 32px; margin: 0; font-size: 14px; }
/* Keep the count buttons visible on touch screens too. */
.group.row input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.group.row input[type="number"]::-webkit-inner-spin-button,
.group.row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 980px) { .group.row .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* A phone: the short presets share a line, the long ones have a line each. */
@media (max-width: 560px) {
  .card { padding: 14px 12px; }
  .group.row { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 10px 10px 18px; }
  .group.row .fields { gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "count fps codec" "res res res" "scene scene scene" "an an an"; }
  .group.row .fields > :nth-child(1) { grid-area: count; }
  .group.row .fields > :nth-child(2) { grid-area: res; }
  .group.row .fields > :nth-child(3) { grid-area: fps; }
  .group.row .fields > :nth-child(4) { grid-area: codec; }
  .group.row .fields > :nth-child(5) { grid-area: scene; }
  .group.row .fields > :nth-child(6) { grid-area: an; }
}
@media (max-width: 360px) {
  .group.row .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "count fps" "res res" "codec codec" "scene scene" "an an"; }
}
.expert .groups { display: flex; flex-direction: column; }
.expert .group.row .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.count-control { display: flex; position: relative; min-width: 0; }
.field .count-control input { width: 100%; padding-right: 26px; }
.count-steps { position: absolute; right: 1px; top: 1px; bottom: 1px; display: flex; flex-direction: column; }
.count-steps button { flex: 1; width: 24px; padding: 0; border: 0; background: var(--grid); color: var(--ink); cursor: pointer; line-height: 1; }
.count-steps button:focus-visible { outline: 2px solid var(--accent); z-index: 1; }
@media (max-width: 560px) {
  .expert .group.row .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; }
  .expert .group.row .fields > .field { grid-area: auto; }
  .expert .group.row .fields > :nth-child(2), .expert .group.row .fields > :nth-child(5), .expert .group.row .fields > :nth-child(6) { grid-column: 1 / -1; }
}
.group-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
/* PINNED: geometry and responsive breakpoints are covered by browser checks. */
.gdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.group-h .gname { font-weight: 600; font-size: 13px; }
.group-h .spacer { flex: 1; }
.icon-btn {
  border: 0; background: none; cursor: pointer; color: var(--ink-3);
  border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--grid); color: var(--ink); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field-hint { grid-column: 1 / -1; margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.field label {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.field input[type="number"], .host-control input[type="number"], .field input[type="text"], .field select {
  height: 32px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--page); color: var(--ink);
  width: 100%;
}
.field input:focus-visible, .field select:focus-visible,
.seg input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.field input[aria-invalid="true"] { border-color: var(--critical); }
.range-control { display: flex; align-items: center; gap: 12px; min-width: 0; }
.range-control input[type="range"] { min-width: 0; flex: 1; }
.field input.slider-number, .host-control input.slider-number {
  flex: 0 0 35px; width: 35px; height: 32px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--page); color: var(--ink); font-variant-numeric: tabular-nums;
  appearance: textfield; -moz-appearance: textfield;
}
.host-control input.slider-number { width: 40px; }
.slider-number::-webkit-inner-spin-button,
.slider-number::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.host-control input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.host-control input[aria-invalid="true"] { border-color: var(--critical); }
.activity-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.activity-control input[type="range"] { width: 100%; min-width: 0; }
/* Slides with the thumb: aligned left at the first stop and right at the last. */
.activity-label {
  width: max-content; max-width: 100%;
  margin-left: calc(var(--position, 0) * 100%); transform: translateX(calc(var(--position, 0) * -100%));
  color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.activity-label b { color: var(--ink); font-weight: 600; }
.field-head { display: flex; align-items: center; gap: 6px; }
.info-btn {
  width: 16px; height: 16px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: var(--page); color: var(--ink-2); font: 600 10px/14px Georgia, serif; font-style: italic;
  cursor: pointer;
}
.info-btn:hover { color: var(--ink); border-color: var(--ink-3); }
/* The objects per hour each scene stands for (a light-dismiss popover). */
.activity-info {
  inset: 0; margin: auto; height: fit-content;
  width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 14px 18px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.5;
}
.activity-info::backdrop { background: rgb(0 0 0 / 0.25); }
.activity-info-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 14px; }
.activity-info p { margin: 8px 0; }
.scene-list { list-style: none; padding: 0; margin: 0; }
.scene-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--grid); }
.scene-list b { color: var(--ink); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.preset-control { display: grid; gap: 6px; min-width: 0; }
.custom-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.custom-dimensions input { width: 100%; min-width: 0; }
.custom-dimensions label { font-size: 11px; }
.preset-control > .field input { width: 100%; min-width: 0; }
.preset-control input[hidden] { display: none; }
.preserved-rate { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; }
.field .preserved-rate input[type="number"] { width: 72px; background: transparent; }
.group-errors, .share-status { color: var(--critical); font-size: 12px; margin-top: 10px; }
.share-status { padding: 0 16px 12px; }
.group-errors[hidden], .share-status[hidden] { display: none; }

.seg { display: flex; background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 2px; gap: 2px; }
.seg label { flex: 1; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; font-size: 12px; padding: 5px 2px;
  border-radius: 5px; cursor: pointer; color: var(--ink-2); white-space: nowrap;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(11,11,11,0.12); }

.ghint {
  margin-top: 10px; font-size: 11.5px; line-height: 1.45;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  border-radius: 10px; padding: 6px 9px;
}

.btn.add { min-height: 32px; height: auto; padding-top: 6px; padding-bottom: 6px; margin-top: 10px; border-color: var(--accent); color: var(--accent); }
.btn.subtle { color: var(--ink-2); font-weight: 500; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px;
}
.btn:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
#shareBtn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 18%, transparent); }
#shareBtn:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* Expert mode: the settings that apply to every device, below the hardware. */
.sizing { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--grid); }
.hardware .hw-fields[hidden] + .sizing { margin-top: 10px; padding-top: 0; border-top: 0; }
.sizing .filter-field { width: 100%; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 24px; align-items: start; }
.setting { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sizing .setting > label { flex-basis: 100%; }
.margin-setting .host-hint { flex-basis: 100%; }
.host-hint { color: var(--ink-3); font-size: 11px; }
.setting label { font-size: 12.5px; color: var(--ink-2); flex: 1; }
.setting output { font-weight: 600; font-variant-numeric: tabular-nums; width: 44px; text-align: right; }
.margin-setting .seg { flex: 0 0 auto; min-width: 92px; }
.margin-setting .seg label { flex: 1; flex-basis: auto; font-size: inherit; color: inherit; }
input[type="range"] { flex: 2; accent-color: var(--accent); }

/* ── results ────────────────────────────────────────── */
.expert-notice {
  font-size: 13px; color: var(--ink-2); border-radius: 10px; padding: 9px 12px;
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
}
/* A fit: green keeps the safety margin, yellow exceeds the target or uses part of the margin, red is beyond it. */
.fit-green { --fit: var(--good); }
.fit-yellow { --fit: var(--warning); }
.fit-over { --fit: var(--critical); }
.fit-none { --fit: var(--baseline); }
/* "I have hardware": the ballpark of the machine, and the reader's own cameras on it. */
#answer > h2 { font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.ballpark { margin-top: 12px; container-type: inline-size; --resolution-width: 4.75rem; }
.ballpark-scroll { overflow-x: auto; }
/* The scene the table is for, chosen from the same list as a row's. */
.ballpark > .field { max-width: 320px; margin-bottom: 12px; }
.ballpark table { border-spacing: 0; width: 100%; max-width: 560px; font-variant-numeric: tabular-nums; }
.ballpark caption { caption-side: top; text-align: left; color: var(--ink-3); font-size: 12.5px; padding-bottom: 6px; }
.ballpark th, .ballpark td { padding: 7px 10px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
.ballpark thead th { color: var(--ink-2); font-size: 12px; font-weight: 600; }
/* The resolutions stay in sight while a narrow screen scrolls the table across. */
.ballpark th[scope="row"], .ballpark thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 600; }
.ballpark td b { font-size: 15px; font-weight: 650; }
.ballpark .limit { display: block; white-space: normal; color: color-mix(in srgb, var(--warning) 70%, var(--ink)); font-size: 11px; font-weight: 600; line-height: 1.2; }
@container (width <= 560px) {
  .ballpark table { table-layout: fixed; }
  .ballpark thead th:first-child { width: var(--resolution-width); }
}
/* Allow wrapped captions, budgeting extra width only for rates with captions. On overflow, show three whole rates at each stop. */
@container (width <= 360px) {
  .ballpark-scroll:has(.limit) {
    scroll-padding-left: var(--resolution-width);
    scroll-snap-type: x mandatory;
  }
  .ballpark table:has(.limit) {
    width: calc(100cqw + (100cqw - var(--resolution-width)) / 3);
    --four-rate-width: calc(var(--resolution-width) + 14rem + var(--captioned-rates) * 0.875rem);
    width: calc(100% + max(0, sign(var(--four-rate-width) - 100cqw)) * (100cqw - var(--resolution-width)) / 3);
    max-width: none;
  }
  .ballpark table:has(.limit) thead th:not(:first-child) { scroll-snap-align: start; }
  .ballpark th { white-space: normal; }
}
.ballpark-note { margin-top: 6px; color: var(--ink-3); font-size: 12px; }
.btn.configure { margin-top: 14px; }
.mix { margin-top: 12px; }
.mix > .usage { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mix > .usage > .usage-track { flex: 1 1 160px; }
/* The machine's rounded usage, beside its bar rather than on the segments. */
.usage-readout { color: var(--ink-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-limit { margin-top: 6px; color: color-mix(in srgb, var(--warning) 70%, var(--ink)); font-size: 13px; font-weight: 600; }
.memory-warning { margin-top: 6px; color: var(--critical); font-size: 13px; font-weight: 600; }
.verdict { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--fit) 10%, transparent); border: 1px solid color-mix(in srgb, var(--fit) 45%, transparent); }
.verdict-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--fit); color: #fff; font-size: 12px; font-weight: 700; }
.fit-yellow .verdict-icon { color: #3b2a00; }
.verdict-text { font-size: 14.5px; font-weight: 600; }
.answer-note { font-size: 13px; }
.answer-empty { color: var(--ink-3); padding: 6px 0; }
.basis-key { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.basis-key b { color: var(--ink-2); font-weight: 600; }
/* "I need hardware": one card for each server to buy, with its fit as the colour of its edge. */
.card.results { padding: 0; overflow: hidden; }
.results > .card-title { padding: 16px 18px 6px; }
.results > .basis-key { margin: 0; padding: 10px 18px 14px; }
.devrows.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px 16px 16px; }
.devrows.cards > .empty { grid-column: 1 / -1; }
.option {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 12px 14px 12px 16px; border: 1px solid var(--grid); border-radius: 12px; background: var(--surface);
}
.option::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--fit); }
.option.pinned { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.icon { flex: none; width: 16px; height: 16px; color: var(--ink-3); }
.option-count { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding-right: 64px; color: var(--ink-2); font-size: 13px; }
/* An icon and its count wrap together. */
.option-count > span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.option-count .icon { width: 18px; height: 18px; }
.option-count .units, .option-count .gpus { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: var(--ink); font-variant-numeric: tabular-nums; }
.option-marks { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 4px; }
.basis-icon { display: inline-flex; padding: 3px; border-radius: 999px; cursor: help; }
.basis-icon .icon { width: 20px; height: 20px; }
.basis-icon.measured .icon { color: var(--good); }
.basis-icon.estimated .icon { color: var(--ink-3); opacity: 0.7; }
.basis-icon:focus-visible, .usage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.option-divider { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--ink-3); font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.option-divider::before, .option-divider::after { content: ''; flex: 1; height: 1px; background: var(--grid); }
.option-head .cards { font-weight: 700; color: var(--ink); }
.option-head .badge { margin-left: 6px; vertical-align: 1px; }
.option-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
a.option-name { text-decoration: none; }
a.option-name:hover { color: var(--accent); text-decoration: underline; }
.option-spec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.option-spec li { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
/* How much of each server the cameras use, in the camera rows' colours; the striped end is the safety margin to keep free. */
.usage { margin-top: 4px; border-radius: 6px; }
.option > .usage { margin-top: auto; padding-top: 4px; }
.usage-track { position: relative; height: 22px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--grid) 55%, transparent); }
.usage-fill { position: absolute; inset: 0 auto 0 0; display: flex; }
.usage-segm { height: 100%; min-width: 3px; box-sizing: border-box; border-right: 2px solid var(--surface); }
.usage-segm:last-child { border-right: 0; }
/* The utilization target, on the same scale as the fill. */
.usage-target { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 1px var(--surface); }
.usage-margin {
  position: absolute; inset: 0 0 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-left: 1px solid #875a45;
  background: repeating-linear-gradient(135deg, #ffe8dbb3 0 5px, #ffffff59 5px 10px);
}
.usage-margin span {
  padding: 0 2px; color: #593624; font-size: 8.5px; font-weight: 800; line-height: 1; text-align: center; text-transform: uppercase;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff;
}
.usage-margin, .usage-over { container-type: inline-size; }
@container (width < 2.75rem) { .usage-margin span { display: none; } }
@container (width < 2rem) { .usage-over span { display: none; } }
/* Cameras beyond the machine's full capacity: the end of the bar past it. */
.usage-over {
  position: absolute; inset: 0 0 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-left: 2px solid var(--critical);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--critical) 55%, transparent) 0 6px, transparent 6px 12px);
}
.usage-over span {
  padding: 0 2px; color: #fff; font-size: 8.5px; font-weight: 800; line-height: 1; text-transform: uppercase;
  text-shadow: 0 0 2px var(--critical), 0 0 2px var(--critical), 0 0 3px var(--critical);
}
/* Contrast themes replace the fills with the page colour: outline the track and draw the parts in system colours instead. */
@media (forced-colors: active) {
  .usage-track { border: 1px solid CanvasText; }
  .usage-segm, .usage-margin, .usage-over, .usage-target { forced-color-adjust: none; }
  .usage-segm { background: Highlight !important; border-right-color: Canvas; }
  .usage-target { background: CanvasText; box-shadow: 0 0 0 1px Canvas; }
  .usage-margin { border-left-color: CanvasText; background: repeating-linear-gradient(135deg, GrayText 0 2px, Canvas 2px 6px); }
  .usage-over { border-left-color: CanvasText; background: repeating-linear-gradient(135deg, CanvasText 0 3px, Canvas 3px 6px); }
  .usage-margin span, .usage-over span { background: Canvas; color: CanvasText; text-shadow: none; }
}
.option-note { color: var(--ink-2); font-size: 12.5px; }
.pin-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-2);
}
.pin-btn .icon { width: 15px; height: 15px; color: inherit; }
.pin-btn:hover { border-color: var(--accent); color: var(--accent); }
.pin-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pin-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* CVEDIA's own product: across the list, in CVEDIA's colour, with the way to order it or ask for it. */
.product {
  grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px 12px 20px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--grid)); border-radius: 14px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 70%);
}
.product::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; border-radius: 14px 0 0 14px; background: var(--fit); }
.product-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.product-brand { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.product-status { color: var(--ink-2); }
.about-good { color: var(--good); }
.product-name { font-family: var(--font-heading); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.product-fit { color: var(--ink-2); font-size: 13px; }
.product-action { flex: none; text-decoration: none; height: 36px; padding: 0 18px; }
.product.coming .product-action { background: var(--surface); color: var(--accent); }
/* A device with no tested setting to offer: what the reader can change instead. */
.recovery-none { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
@media (max-width: 560px) {
  .devrows.cards { grid-template-columns: 1fr; padding: 12px; }
  .ballpark th, .ballpark td { padding: 6px; }
}

/* ── device results (Expert mode) ───────────────────── */
.filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--grid);
}
.filters .spacer { flex: 1; }
.filters input[type="search"] {
  height: 30px; padding: 0 10px; width: 100%; flex: 1 1 140px; min-width: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--page); color: var(--ink);
}
.filters .switch { flex: none; }
.sort-control { display: flex; align-items: center; gap: 6px; flex: none; }
.sort-control label { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.filters select {
  width: 110px; max-width: 100%; flex: none; height: 30px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--page); color: var(--ink); padding: 0 6px; font-size: 12.5px;
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--grid); }
.legend .li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }

.devrows { display: flex; flex-direction: column; }
.devrow { border-bottom: 1px solid var(--grid); }
.devrow:last-child { border-bottom: 0; }
.devrow-main {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 112px 20px;
  gap: 10px; align-items: center;
  padding: 12px 16px; cursor: pointer;
}
.devrow-main:hover { background: color-mix(in srgb, var(--grid) 30%, transparent); }
@media (max-width: 720px) { .devrow-main { grid-template-columns: 1fr 90px 24px; } .devrow .barcell { display: none; } }

.dev-id { min-width: 0; }
.dev-id .nm { overflow-wrap: anywhere; font-weight: 600; font-size: 13.5px; }
.dev-id .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dev-id .dev-note { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; overflow-wrap: anywhere; }
.basis-indicators, .bottleneck-indicators { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bench-count {
  border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 2px; border-radius: 3px;
}
.bench-count:hover { text-decoration-style: solid; }
.bottleneck-icon { display: inline-flex; align-items: center; color: var(--ink-2); cursor: help; border-radius: 3px; }
.bottleneck-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bottleneck-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.capacity-summary { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.capacity-summary > span { display: block; margin-top: 2px; }
.capacity-summary strong { font-weight: 700; }
/* Host RAM of a device: a line under its capacities, and, in the open row, how it is made up. */
.ram-summary { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.ram-summary strong { font-weight: 700; }
.ram-summary .ram-range { white-space: nowrap; }
.ram-summary .ram-warning { display: block; margin-top: 2px; color: var(--ink-2); }
.devrow-ram { display: none; min-width: 0; padding: 0 16px 16px; }
.devrow.open .devrow-ram { display: block; }
.ram-title { margin: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ram-lines { max-width: 560px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ram-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.ram-line > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.ram-line b { flex: none; font-weight: 600; text-align: right; }
.ram-line.total { font-weight: 650; }
.ram-line .ram-range { margin-left: 6px; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.ram-basis { margin-top: 8px; max-width: 760px; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }
.margin-unknown { color: var(--ink-3); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 650; letter-spacing: 0.04em;
  padding: 1.5px 7px; border-radius: 999px; text-transform: uppercase;
}
.badge.measured { background: color-mix(in srgb, var(--good) 7%, transparent); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); }
.badge.modeled { background: color-mix(in srgb, var(--ink-3) 7%, transparent); color: var(--ink-3); border: 1px solid var(--baseline); }

.barcell { min-width: 0; }
.bar {
  position: relative; height: 22px; border-radius: 6px;
  background: color-mix(in srgb, var(--grid) 55%, transparent);
  overflow: hidden;
  display: flex;
}
/* 2px gap carved out of each segment (border-box) so widths stay geometrically
   exact — a flex gap would silently shrink the occupied fraction */
.bar .segm { height: 100%; min-width: 3px; box-sizing: border-box; border-right: 2px solid var(--surface); }
.bar .segm.last { border-right: 0; }
.bar .segm:first-child { border-radius: 4px 0 0 4px; }
.bar .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--surface); opacity: 0.9; pointer-events: none; }
.bar-caption { font-size: 11px; color: var(--ink-3); margin-top: 4px; text-align: right; font-variant-numeric: tabular-nums; }

.gpucell { text-align: right; }
.gpucell .n { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.gpucell .n .x { font-size: 12px; font-weight: 550; color: var(--ink-3); margin-left: 2px; }
.gpucell .sizing-unavailable { font-size: 13px; font-weight: 600; }
.gpucell .rng { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chev { color: var(--ink-3); transition: transform 0.15s; }
.devrow.open .chev { transform: rotate(90deg); }

.devrow-detail { display: none; min-width: 0; overflow-x: auto; padding: 4px 16px 16px; }
.devrow.open .devrow-detail { display: block; }
.bench-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 0 12px; }
.bench-picker label { font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.bench-picker select {
  height: 32px; padding: 0 8px; min-width: 0; max-width: 100%; flex: 1 1 240px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--page); color: var(--ink);
}
.bench-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bench-picker select.bench-target { flex: 0 1 auto; min-width: min(100%, 144px); }
.dtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dtable th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--grid);
}
.dtable td { padding: 7px 8px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
.dtable td:first-child { white-space: nowrap; }
.dtable-group { display: inline-flex; align-items: center; gap: 7px; }
.dtable .num { text-align: right; }
.dtable th.num { text-align: right; }
.flag { color: var(--warning); font-weight: 600; }

.empty { padding: 40px; text-align: center; color: var(--ink-3); }

/* ── tooltip ────────────────────────────────────────── */
#tip {
  position: fixed; z-index: 10; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; display: none; max-width: min(260px, calc(100vw - 16px));
}
@media (max-height: 400px) {
  #tip { max-width: min(340px, calc(100vw - 16px)); }
}
#tip .t { font-weight: 600; margin-bottom: 2px; }
#tip .r { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
#tip .r b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── about the results, and the methodology (Expert mode) ── */
details.method, details.about { color: var(--ink-2); font-size: 12.5px; }
details.method summary, details.about summary {
  cursor: pointer; font-weight: 600; color: var(--ink-3); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 0;
}
details.method .box, details.about .box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; line-height: 1.6;
}
details.method p, details.about p { margin: 6px 0; }
details.method b, details.about b { color: var(--ink); font-weight: 600; }
details.about { font-size: 13px; }

/* Unavailable devices stay separate from sizing results. */
.card.unavailable-devices { padding: 0; color: var(--ink-2); font-size: 12px; }
.unavailable-devices > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; }
.unavailable-device { padding: 10px 16px; border-top: 1px solid var(--grid); }
.unavailable-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.unavailable-note { margin-top: 2px; color: var(--ink-3); overflow-wrap: anywhere; }
.unavailable-device .bench-picker { padding: 6px 0 0; }
.unavailable-reason { margin-top: 4px; }
.unavailable-explanation { padding: 10px 16px; border-top: 1px solid var(--grid); }
button:focus-visible, summary:focus-visible, .devrow-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .dtable thead { display: none; }
  .dtable, .dtable tbody, .dtable tr { display: block; }
  .dtable tr { padding: 8px 0; border-bottom: 1px solid var(--grid); }
  .dtable td, .dtable td:first-child { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border: 0; text-align: right; }
  .dtable td::before { content: attr(data-label); flex: none; color: var(--ink-3); text-align: left; }
  .dtable td:first-child { justify-content: flex-end; }
  .dtable td:first-child::before { margin-right: auto; }
  .empty { padding: 24px 16px; }
  .setting { flex-wrap: wrap; gap: 8px; }
  .setting label { flex-basis: 100%; }
  .wrap { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 420px) {
  .field:has(.seg[aria-label="Analytics"]) { grid-column: 1 / -1; }
  .cameras-field { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .seg span { font-size: 10.5px; padding-left: 1px; padding-right: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

body:not(.expert) .expert-about, body.expert .operator-about { display: none; }

/* ── accelerator pairing (public/accelerator-pairing.mjs, Expert mode only): the host and accelerator fields and the pair's results ── */
.pairing-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pairing-fields .field select { height: 36px; font-size: 14px; text-overflow: ellipsis; }
.pairing-host-hint { margin-top: 2px; }
@media (max-width: 560px) { .pairing-fields { grid-template-columns: 1fr; } }
.pairing-results { margin-top: 12px; }
.pairing-results:empty { display: none; }
.pairing-pair { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.pairing-idle { color: var(--ink-3); }
.pairing-rows { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.pairing-row { min-width: 0; padding: 10px 12px; border: 1px solid var(--grid); border-radius: 10px; }
.pairing-row[data-reference] { border-style: dashed; }
.pairing-row-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.pairing-row p { margin-top: 4px; overflow-wrap: anywhere; }
.pairing-capacity strong { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.pairing-source { color: var(--ink-3); font-size: 12px; }
.pairing-gate { padding-left: 8px; border-left: 3px solid var(--warning); color: var(--ink-2); font-size: 12.5px; }
.pairing-limit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink-2); }
.pairing-unavailable { color: var(--ink-2); }
.pairing-feed { padding-left: 8px; border-left: 3px solid var(--baseline); color: var(--ink-2); }
.pairing-feed[data-feed="feeds"] { border-left-color: var(--good); }
.pairing-feed[data-feed="short"], .pairing-feed[data-feed="tight"] { border-left-color: var(--warning); }
.pairing-feed-label { display: block; color: var(--ink-3); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.pairing-total { margin-top: 10px; font-weight: 650; overflow-wrap: anywhere; }
.pairing-note { margin-top: 8px; color: var(--ink-3); font-size: 12.5px; overflow-wrap: anywhere; }
.pairing-terms { margin-top: 8px; }
.pairing-compared { color: var(--ink-3); font-size: 12px; }
details.pairing-about { margin-top: 10px; color: var(--ink-2); font-size: 12.5px; }
details.pairing-about summary { cursor: pointer; font-weight: 600; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 0; }
details.pairing-about p { margin: 6px 0; line-height: 1.55; overflow-wrap: anywhere; }
details.pairing-about .pairing-alternatives { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
details.pairing-about .pairing-alternatives li { line-height: 1.55; overflow-wrap: anywhere; }
