/* ===========================================================================
   rnd.css — R&D files (/admin/rnd.html, /admin/rnd-file.html). SQL 324 REV 2.
   Builds on ops.css's xd-* vocabulary (masthead, panels, ruled stats). Every
   rule is .rnd-* so nothing here reaches another page. Product photos sit on
   white in both themes — listings are shot on white, and a dark tile around
   them reads as a hole. Brand red = "your move" (the current step, the
   units still to type); status colours stay reserved for Confirmed/Denied.
   =========================================================================== */

.rnd-app { padding-bottom: 48px; }
.rnd-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-eyebrow a { color: inherit; }
.rnd-eyebrow a:hover { color: var(--it-red); text-decoration: none; }
.rnd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rnd-actions .it-btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.rnd-panel { margin-bottom: 16px; }
.rnd-link { background: none; border: 0; padding: 0; color: var(--it-red); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rnd-link:hover { text-decoration: underline; }
.rnd-link:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }
.rnd-muted { color: var(--text-secondary); }
.rnd-fine { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.rnd-spacer { flex: 1 1 auto; }
.rnd-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rnd-err { color: var(--ops-error); font-weight: 700; }
.rnd-gap { font-size: 11.5px; font-weight: 800; color: var(--ops-warn); text-transform: uppercase; letter-spacing: 0.04em; }

/* notices */
.rnd-notice { margin: 0 0 14px; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; line-height: 1.45; border: 1px solid var(--panel-border); }
.rnd-notice--ok { color: var(--ops-ok); border-color: color-mix(in srgb, var(--ops-ok) 35%, var(--panel-border)); background: color-mix(in srgb, var(--ops-ok) 7%, transparent); }
.rnd-notice--warn { color: var(--ops-warn); border-color: color-mix(in srgb, var(--ops-warn) 35%, var(--panel-border)); background: color-mix(in srgb, var(--ops-warn) 8%, transparent); }
.rnd-notice--error { color: var(--ops-error); border-color: color-mix(in srgb, var(--ops-error) 40%, var(--panel-border)); background: color-mix(in srgb, var(--ops-error) 7%, transparent); }
.rnd-notice a, .rnd-notice .rnd-link { color: inherit; text-decoration: underline; }

/* status chips + dots */
.rnd-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--text-secondary); background: color-mix(in srgb, var(--text-primary) 7%, transparent); }
.rnd-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.rnd-chip--awaiting_proposal, .rnd-chip--proposed, .rnd-chip--negotiating { color: var(--text-primary); background: color-mix(in srgb, var(--it-red) 10%, transparent); }
.rnd-chip--awaiting_proposal::before, .rnd-chip--proposed::before, .rnd-chip--negotiating::before { background: var(--it-red); opacity: 1; }
.rnd-chip--confirmed { color: var(--text-primary); background: color-mix(in srgb, var(--ops-ok) 12%, transparent); }
.rnd-chip--confirmed::before { background: var(--ops-ok); opacity: 1; }
.rnd-chip--denied { color: var(--text-muted); }
.rnd-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); margin-right: 6px; vertical-align: 1px; }
.rnd-dot--awaiting_proposal, .rnd-dot--proposed, .rnd-dot--negotiating { background: var(--it-red); }
.rnd-dot--confirmed { background: var(--ops-ok); }
.rnd-dot--denied { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.rnd-tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--panel-border); vertical-align: 1px; margin-right: 4px; }

/* thumbnails */
.rnd-thumb { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; border-radius: 8px; background: #fff; border: 1px solid var(--panel-border); overflow: hidden; }
.rnd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rnd-thumb__none { color: #b5b5b5; display: inline-flex; }
.rnd-thumb__none svg { width: 22px; height: 22px; }
.rnd-thumb--sm { width: 40px; height: 40px; border-radius: 6px; }

/* --- the files list ---------------------------------------------------------- */
.rnd-statusbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.rnd-statuschip { border: 1px solid var(--panel-border); background: var(--panel-bg); color: var(--text-secondary); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; }
.rnd-statuschip b { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.rnd-statuschip:hover { border-color: var(--text-muted); color: var(--text-primary); }
.rnd-statuschip.is-on { background: var(--text-primary); border-color: var(--text-primary); color: var(--panel-bg); }
.rnd-statuschip.is-on b { color: var(--panel-bg); }
.rnd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.rnd-bar .it-input { width: auto; min-height: 40px; padding: 7px 11px; font-size: 14.5px; }
.rnd-search { width: 260px !important; max-width: 100%; }
.rnd-files { border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel-bg); overflow: hidden; }
.rnd-grow { display: grid; grid-template-columns: 184px minmax(0, 1.6fr) repeat(3, minmax(90px, 0.55fr)) 110px; gap: 16px; align-items: center; padding: 14px 18px; color: inherit; border-top: 1px solid var(--panel-border); }
.rnd-grow:first-child { border-top: 0; }
.rnd-grow:hover { background: var(--hover-bg); text-decoration: none; }
.rnd-grow:hover .rnd-grow__name { color: var(--it-red); }
.rnd-mosaic { display: grid; grid-template-columns: repeat(4, 40px); gap: 4px; }
.rnd-grow__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rnd-grow__name { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 21px; font-weight: 800; line-height: 1.05; color: var(--text-primary); transition: color 0.15s ease; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnd-grow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--text-secondary); }
.rnd-need { color: var(--it-red); font-weight: 700; }
.rnd-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rnd-fig__label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.rnd-fig__val { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 20px; font-weight: 800; line-height: 1; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rnd-fig__sub { margin-top: 2px; font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnd-grow__when { font-size: 12px; color: var(--text-secondary); text-align: right; }
.rnd-empty { padding: 28px 20px; text-align: center; color: var(--text-secondary); font-size: 14.5px; }
.rnd-empty strong { display: block; margin-bottom: 6px; color: var(--text-primary); font-size: 16px; }

/* forms */
.rnd-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; }
.rnd-form--new { grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr); }
.rnd-form--units { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rnd-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rnd-field--wide { grid-column: 1 / -1; }
.rnd-field > span:first-child, .rnd-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-field .it-input { min-height: 40px; padding: 8px 11px; font-size: 15px; }
.rnd-field textarea.it-input { min-height: 72px; }
.rnd-field__hint { font-size: 12px; color: var(--text-secondary); min-height: 1em; }
.rnd-field__hint b { color: var(--text-primary); }
.rnd-field .it-input.is-invalid, .it-input.is-invalid { border-color: var(--ops-error); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ops-error) 18%, transparent); }
.rnd-formfoot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.rnd-affix { position: relative; display: block; }
.rnd-affix .it-input { width: 100%; box-sizing: border-box; padding-left: 24px; }
.rnd-affix::before { content: attr(data-affix); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); pointer-events: none; }

/* import preview */
.rnd-import table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rnd-import th, .rnd-import td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--panel-border); vertical-align: middle; }
.rnd-import th { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-import td .it-input { min-height: 36px; padding: 6px 9px; font-size: 14px; }
.rnd-import__warn { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ops-warn); }
.rnd-progress { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text-primary) 8%, transparent); overflow: hidden; margin: 10px 0 4px; }
.rnd-progress > i { display: block; height: 100%; background: var(--it-red); border-radius: 3px; transition: width 0.2s ease; }

/* --- the file: status stepper (RND-12) ------------------------------------------- */
.rnd-flow { padding: 14px 18px; gap: 12px; }
.rnd-flow__steps { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 8px; }
.rnd-step { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.rnd-step:hover { background: var(--hover-bg); color: var(--text-primary); }
.rnd-step i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; border: 1.5px solid var(--panel-border); color: var(--text-muted); background: var(--panel-bg); flex: none; }
.rnd-step.is-done { color: var(--text-secondary); }
.rnd-step.is-done i { border-color: var(--text-primary); background: var(--text-primary); color: var(--panel-bg); }
.rnd-step.is-now { color: var(--text-primary); }
.rnd-step.is-now i { border-color: var(--it-red); background: var(--it-red); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--it-red) 18%, transparent); }
.rnd-step--ok.is-now i { border-color: var(--ops-ok); background: var(--ops-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ops-ok) 18%, transparent); }
.rnd-step--no.is-now i { border-color: var(--text-secondary); background: var(--text-secondary); box-shadow: none; }
.rnd-step__line { flex: 1 1 18px; min-width: 14px; max-width: 64px; height: 2px; background: var(--panel-border); margin: 0 4px; }
.rnd-step__end { display: inline-flex; gap: 2px; padding: 2px; border: 1px dashed var(--panel-border); border-radius: 10px; }
.rnd-flow__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--panel-border); }
.rnd-flow__foot .rnd-fine { flex: 1 1 280px; }
.rnd-flow__foot .it-btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.rnd-flow__note { flex: 1 1 100%; }

/* tabs */
.rnd-tabs { display: flex; gap: 4px; margin: 4px 0 16px; border-bottom: 1px solid var(--panel-border); }
.rnd-tab { border: 0; background: none; padding: 10px 16px 11px; font: inherit; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 19px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-secondary); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.rnd-tab b { font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--text-primary) 8%, transparent); color: var(--text-secondary); letter-spacing: 0; }
.rnd-tab:hover { color: var(--text-primary); }
.rnd-tab.is-on { color: var(--text-primary); border-bottom-color: var(--it-red); }
.rnd-dirtydot { width: 8px; height: 8px; border-radius: 50%; background: var(--ops-warn); display: inline-block; }

/* gather */
.rnd-links { width: 100%; box-sizing: border-box; min-height: 84px !important; font-size: 14.5px; line-height: 1.45; }
.rnd-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.rnd-seg button { border: 1px solid var(--panel-border); background: var(--panel-bg); color: var(--text-secondary); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; min-height: 32px; }
.rnd-seg button:hover { color: var(--text-primary); border-color: var(--text-muted); }
.rnd-seg button.is-active { color: var(--panel-bg); background: var(--text-primary); border-color: var(--text-primary); }
.rnd-searchbar { display: flex; gap: 8px; }
.rnd-searchbar .it-input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px 11px; font-size: 15px; }
.rnd-searchbar .it-btn { flex: none; min-height: 40px; padding: 9px 16px; font-size: 13px; }
.rnd-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-top: 12px; }
.rnd-result { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--panel-border); border-radius: 10px; cursor: pointer; background: var(--panel-bg); }
.rnd-result:hover { border-color: var(--text-muted); }
.rnd-result.is-on { border-color: var(--it-red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--it-red) 22%, transparent); }
.rnd-result.is-in { opacity: 0.6; cursor: default; }
.rnd-result input { position: absolute; top: 12px; left: 12px; width: 18px; height: 18px; margin: 0; z-index: 1; }
.rnd-result__img { display: block; aspect-ratio: 1 / 1; background: #fff; border-radius: 7px; overflow: hidden; }
.rnd-result__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rnd-result__title { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rnd-result__meta { font-size: 11.5px; color: var(--text-secondary); }
.rnd-otherlinks { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.rnd-otherlinks__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.rnd-otherlinks__head .rnd-fine { margin: 0; }
.rnd-otherlink { display: flex; gap: 10px; align-items: center; font-size: 12.5px; }
.rnd-otherlink span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }

/* estimates */
.rnd-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
/* RND-21: two even rows — sales 3 across (6 stats), admin 4 across (8 stats) */
.rnd-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rnd-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rnd-stat--target { position: relative; }
.rnd-stat--target::before { content: ''; position: absolute; left: 0; top: -1px; width: 28px; height: 2px; background: var(--it-red); }
.rnd-divisor { background: none; border: 0; padding: 0 2px; font: inherit; color: var(--it-red); font-weight: 800; cursor: pointer; border-bottom: 1px dashed currentColor; }
.rnd-needs { margin: 12px 0 0; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; color: var(--text-primary); background: color-mix(in srgb, var(--it-red) 6%, transparent); border: 1px solid color-mix(in srgb, var(--it-red) 22%, var(--panel-border)); }

/* segments */
.rnd-segtable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rnd-segtable th, .rnd-segtable td { padding: 8px 10px; border-bottom: 1px solid var(--panel-border); text-align: right; white-space: nowrap; }
.rnd-segtable th:first-child, .rnd-segtable td:first-child { text-align: left; }
.rnd-segtable th { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-segtable tbody tr { cursor: pointer; }
.rnd-segtable tbody tr:hover { background: var(--hover-bg); }
.rnd-segtable tbody tr.is-on td:first-child { box-shadow: inset 3px 0 0 var(--it-red); }
.rnd-sharecell { width: 22%; min-width: 130px; }
.rnd-share { display: flex; align-items: center; gap: 8px; }
.rnd-share__track { flex: 1 1 auto; height: 10px; position: relative; }
.rnd-share__track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--it-red); }
.rnd-share b { width: 36px; text-align: right; font-weight: 700; font-size: 12.5px; }
.rnd-segwrap { overflow-x: auto; }

/* the competitor table */
.rnd-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.rnd-filters .it-input { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.rnd-tablewrap { overflow: auto; max-height: 76vh; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel-bg); }
.rnd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rnd-table th, .rnd-table td { padding: 8px 10px; border-bottom: 1px solid var(--panel-border); text-align: left; vertical-align: middle; }
.rnd-table th { position: sticky; top: 0; z-index: 2; background: var(--panel-bg); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; cursor: pointer; user-select: none; }
.rnd-table th[aria-sort="ascending"]::after { content: ' ▲'; font-size: 9px; }
.rnd-table th[aria-sort="descending"]::after { content: ' ▼'; font-size: 9px; }
.rnd-table th.rnd-num, .rnd-table td.rnd-num { text-align: right; }
.rnd-table th.rnd-unitshead { color: var(--text-primary); }
.rnd-table tbody tr { cursor: pointer; }
.rnd-table tbody tr:hover td { background: var(--hover-bg); }
.rnd-table .rnd-stick { position: sticky; left: 0; z-index: 1; background: var(--panel-bg); min-width: 300px; max-width: 400px; }
.rnd-table th.rnd-stick { z-index: 3; }
.rnd-table tr.is-fresh td { animation: rnd-fresh 2.4s ease-out 1; }
@keyframes rnd-fresh { from { background: color-mix(in srgb, var(--it-red) 12%, var(--panel-bg)); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .rnd-table tr.is-fresh td { animation: none; } }
.rnd-item { display: flex; gap: 10px; align-items: center; min-width: 0; }
.rnd-item__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rnd-item__title { font-weight: 700; color: var(--text-primary); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rnd-item__sub { font-size: 12px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.rnd-item__sub a { color: var(--text-secondary); font-weight: 700; }
/* source label on each listing (2026-10-17): a store-coloured dot, neutral chip so it reads in both themes */
.rnd-src { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px 0 6px; border-radius: 999px; border: 1px solid var(--panel-border); font-size: 11px; font-weight: 800; color: var(--text-primary); line-height: 17px; }
.rnd-src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); }
.rnd-src--amazon::before { background: #ff9900; }
.rnd-src--menards::before { background: #00843d; }
.rnd-src--homedepot::before { background: #f96302; }
.rnd-src--lowes::before { background: #004990; }
.rnd-src--walmart::before { background: #0071ce; }
.rnd-src--harborfreight::before { background: #c8102e; }
.rnd-src--hand { color: var(--text-secondary); }
.rnd-item__sub a:hover { color: var(--it-red); }
.rnd-unitscell { background: color-mix(in srgb, var(--it-red) 3%, transparent); }
.rnd-units { width: 92px; min-height: 36px; padding: 6px 8px; font: inherit; font-size: 14.5px; font-weight: 700; text-align: right; color: var(--input-text); background: var(--input-bg); border: 1px solid var(--it-border); border-radius: 7px; font-variant-numeric: tabular-nums; }
.rnd-units::placeholder { color: var(--text-muted); font-weight: 600; }
.rnd-units:placeholder-shown { border-color: color-mix(in srgb, var(--it-red) 40%, var(--it-border)); }
.rnd-units:focus { outline: none; border-color: var(--it-red); box-shadow: 0 0 0 3px var(--it-red-glow); }
.rnd-unitsnote { display: block; font-size: 11px; color: var(--text-secondary); min-height: 1.1em; margin-top: 2px; white-space: nowrap; }
.rnd-count { padding: 10px 2px 0; margin: 0; font-size: 12.5px; color: var(--text-secondary); }
/* tick listings to move or remove several at once (2026-10-06) */
.rnd-selbox { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; cursor: pointer; }
.rnd-selbox input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--it-red); }
.rnd-table th .rnd-selbox { vertical-align: middle; margin-right: 8px; }
.rnd-table tr.is-sel td { background: color-mix(in srgb, var(--it-red) 6%, var(--panel-bg)); }
.rnd-selbar { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel-bg); box-shadow: 0 10px 28px -14px rgba(0,0,0,0.45); }
.rnd-selbar__n { margin-right: auto; font-size: 13.5px; }
.rnd-selbar .it-btn { min-height: 36px; padding: 7px 14px; font-size: 13px; }
/* the "move to another file" drawer */
.rnd-mvitems { margin: 0; padding: 10px 12px 10px 28px; border-radius: 9px; background: color-mix(in srgb, var(--text-primary) 4%, transparent); font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.rnd-mvsec { display: flex; flex-direction: column; gap: 8px; }
.rnd-mvsec > .it-input { min-height: 40px; padding: 8px 11px; font-size: 15px; }
.rnd-mvlist { max-height: 300px; overflow: auto; border: 1px solid var(--panel-border); border-radius: 10px; }
.rnd-mvfile { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--panel-border); cursor: pointer; font-size: 14px; }
.rnd-mvfile:first-child { border-top: 0; }
.rnd-mvfile:hover { background: var(--hover-bg); }
.rnd-mvfile:has(input:checked) { background: color-mix(in srgb, var(--it-red) 7%, transparent); }
.rnd-mvfile input { width: 16px; height: 16px; margin: 0; accent-color: var(--it-red); }
.rnd-mvfile__name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }

/* --- drawer (a listing) ------------------------------------------------------- */
.rnd-drawer { position: fixed; inset: 0; z-index: 80; }
.rnd-drawer .ops-drawer__panel { display: flex; flex-direction: column; padding: 0; width: min(780px, 96vw); }
.rnd-drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--panel-border); }
.rnd-drawer__head h2 { margin: 0; font-size: 24px; line-height: 1.05; }
.rnd-drawer__head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-secondary); }
.rnd-drawer__body { flex: 1 1 auto; overflow: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.rnd-drawer__foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--panel-border); background: var(--panel-bg); }
.rnd-drawer__foot .it-btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.rnd-x { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--panel-border); background: var(--panel-bg); color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; }
.rnd-x:hover { color: var(--text-primary); border-color: var(--text-muted); }
.rnd-derived { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-secondary); padding: 10px 12px; border-radius: 9px; background: color-mix(in srgb, var(--text-primary) 4%, transparent); }
.rnd-derived b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rnd-pulled { border: 1px solid var(--panel-border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rnd-pulled__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rnd-pulled__head .rnd-link { margin-left: auto; }
.rnd-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13px; }
.rnd-dl dt { color: var(--text-secondary); font-weight: 700; }
.rnd-dl dd { margin: 0; color: var(--text-primary); }
.rnd-bullets { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }

/* picture slots — first = main */
.rnd-slots { display: grid; grid-template-columns: 148px repeat(auto-fill, minmax(84px, 84px)); gap: 8px; align-items: start; }
.rnd-slot { position: relative; width: 84px; height: 84px; border-radius: 9px; background: #fff; border: 1px solid var(--panel-border); overflow: hidden; }
.rnd-slot:first-child { width: 148px; height: 148px; grid-row: span 2; }
.rnd-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rnd-slot__main { position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: rgba(17,17,17,0.72); }
.rnd-slot__new { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #111; background: #f1c232; }
.rnd-slot__tools { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.12s ease; }
.rnd-slot:hover .rnd-slot__tools, .rnd-slot:focus-within .rnd-slot__tools { opacity: 1; }
.rnd-slot__tools button { width: 26px; height: 26px; border-radius: 6px; border: 0; background: rgba(17,17,17,0.72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rnd-slot__tools button:hover { background: var(--it-red); }
.rnd-drop { width: 84px; height: 84px; border-radius: 9px; border: 1.5px dashed var(--panel-border); background: transparent; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; text-align: center; line-height: 1.15; padding: 4px; }
.rnd-drop:first-child { width: 148px; height: 148px; grid-row: span 2; font-size: 12.5px; }
.rnd-drop svg { width: 20px; height: 20px; }
.rnd-drop:hover, .rnd-drop.is-over { border-color: var(--it-red); color: var(--it-red); background: color-mix(in srgb, var(--it-red) 5%, transparent); }
.rnd-pastehint { font-size: 12px; color: var(--text-secondary); margin: 6px 0 0; }
.rnd-pastehint kbd { font-family: var(--font-mono); font-size: 11px; padding: 0 4px; border: 1px solid var(--panel-border); border-radius: 4px; background: var(--panel-bg); }

/* --- the proposal ------------------------------------------------------------- */
.rnd-ptoolbar { position: sticky; top: var(--ops-topbar-h, 64px); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 14px; padding: 10px 0; background: var(--page-bg, var(--it-gray-light)); border-bottom: 1px solid var(--panel-border); }
.rnd-ptoolbar .it-btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.rnd-product { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px 24px; align-items: start; }
.rnd-product .rnd-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rnd-product .rnd-slot, .rnd-product .rnd-drop { width: auto; height: auto; aspect-ratio: 1 / 1; }
.rnd-product .rnd-slot:first-child, .rnd-product .rnd-drop:first-child { width: auto; height: auto; grid-column: 1 / -1; grid-row: auto; }
.rnd-dirty { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ops-warn); }
.rnd-dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rnd-saved { font-size: 12.5px; color: var(--text-secondary); }
.rnd-comps { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rnd-comps th { text-align: left; padding: 6px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); border-bottom: 1px solid var(--panel-border); white-space: nowrap; }
.rnd-comps td { padding: 4px 4px; border-bottom: 1px solid var(--panel-border); vertical-align: top; }
.rnd-comps td:first-child { width: 28px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; padding-top: 12px; }
.rnd-comps .it-input { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.rnd-comps .rnd-qty { width: 64px; text-align: right; }
.rnd-comps .rnd-rowtools { white-space: nowrap; width: 1%; padding-top: 6px; }
.rnd-iconbtn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--text-secondary); cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.rnd-iconbtn:hover { color: var(--text-primary); border-color: var(--panel-border); }
.rnd-iconbtn--x:hover { color: var(--it-red); }
.rnd-iconbtn:disabled { opacity: 0.3; cursor: default; }
.rnd-compwrap { overflow-x: auto; }
.rnd-comps-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.rnd-comps-foot b { color: var(--text-primary); }
.rnd-comps-foot .is-off { color: var(--ops-warn); font-weight: 700; }
.rnd-run { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 1.6fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto; gap: 8px; align-items: end; padding: 12px; border-radius: 10px; border: 1px dashed var(--panel-border); margin-top: 10px; }
.rnd-target { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 28px; align-items: start; }
.rnd-suggest { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.rnd-suggest b { color: var(--text-primary); }
.rnd-bench { display: flex; flex-direction: column; border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; }
.rnd-bench__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--panel-border); font-size: 13px; }
.rnd-bench__row:first-child { border-top: 0; }
.rnd-bench__row .rnd-item__title { -webkit-line-clamp: 1; font-size: 13px; }
.rnd-bench__fig { font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.rnd-bench__fig b { color: var(--text-primary); }
.rnd-bench__sum { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 9px 10px; font-size: 12.5px; color: var(--text-secondary); background: color-mix(in srgb, var(--text-primary) 4%, transparent); border-top: 1px solid var(--panel-border); }
.rnd-bench__sum b { color: var(--text-primary); }
.rnd-pick { max-height: 360px; overflow: auto; border: 1px solid var(--panel-border); border-radius: 10px; }
.rnd-pick label { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border-top: 1px solid var(--panel-border); cursor: pointer; font-size: 13px; }
.rnd-pick label:first-child { border-top: 0; }
.rnd-pick label:hover { background: var(--hover-bg); }
.rnd-pick input { width: 16px; height: 16px; margin: 0; }
.rnd-rfqopts { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13.5px; }
.rnd-rfqopts label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.rnd-rfqopts input { width: 16px; height: 16px; margin: 0; }
.rnd-rfqlist { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* --- responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .rnd-grow { grid-template-columns: 184px minmax(0, 1fr) repeat(2, minmax(80px, 0.5fr)); }
  .rnd-grow .rnd-fig--rev, .rnd-grow__when { display: none; }
}
@media (max-width: 860px) {
  .rnd-product, .rnd-target { grid-template-columns: 1fr; }
  .rnd-stats--3, .rnd-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rnd-run { grid-template-columns: 1fr 1fr; }
  .rnd-drawer .ops-drawer__panel { width: auto; max-height: 92vh; }
  .rnd-slots { grid-template-columns: 120px repeat(auto-fill, minmax(72px, 72px)); }
  .rnd-slot, .rnd-drop { width: 72px; height: 72px; }
  .rnd-slot:first-child, .rnd-drop:first-child { width: 120px; height: 120px; }
  .rnd-slot__tools { opacity: 1; }
  .rnd-step span { display: none; }
  .rnd-step.is-now span { display: inline; }
  .rnd-step__line { max-width: 24px; }
}
@media (max-width: 640px) {
  .rnd-grow { grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px; }
  .rnd-grow .rnd-mosaic, .rnd-grow__main { grid-column: 1 / -1; }
  .rnd-grow .rnd-fig--rev { display: flex; }
  .rnd-mosaic { grid-template-columns: repeat(4, 1fr); }
  .rnd-mosaic .rnd-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .rnd-form--new, .rnd-form--units { grid-template-columns: 1fr; }
  .rnd-search, .rnd-filters .rnd-search { width: 100% !important; }
  .rnd-table .rnd-stick { min-width: 210px; max-width: 230px; }
  .rnd-actions { width: 100%; }
  .rnd-run { grid-template-columns: 1fr; }
  .rnd-tab { font-size: 17px; padding: 10px 12px 11px; }
  .rnd-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rnd-searchbar { flex-wrap: wrap; }
  .rnd-searchbar .it-btn { flex: 1 1 auto; }
}

/* --- RND-16: specs to compare (SQL 327) ------------------------------------- */
.rnd-table td.rnd-speccell { padding: 4px 6px; }
.rnd-table th.rnd-speccol { color: var(--text-primary); }
.rnd-spec { width: 108px; min-height: 32px; padding: 4px 7px; font: inherit; font-size: 13.5px; color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--it-border); border-radius: 6px; }
.rnd-spec--num { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
select.rnd-spec { width: 76px; }
.rnd-spec::placeholder { color: var(--text-muted); }
.rnd-spec:focus { outline: none; border-color: var(--it-red); box-shadow: 0 0 0 3px var(--it-red-glow); }
.rnd-spec.is-ai { border-style: dashed; border-color: color-mix(in srgb, var(--it-blue, #1f6feb) 60%, var(--it-border)); background: color-mix(in srgb, var(--it-blue, #1f6feb) 7%, var(--input-bg)); }
.rnd-spec.is-invalid { border-color: var(--ops-error); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ops-error) 18%, transparent); }
.rnd-fillbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rnd-seg button.is-spec { font-style: italic; }
.rnd-speceditor { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--panel-border); }
.rnd-speceditor__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.rnd-specnote { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.rnd-speckeys { display: grid; gap: 8px; }
.rnd-speckey { display: grid; grid-template-columns: 1.4fr 120px 80px 1.6fr auto; gap: 8px; align-items: center; }
.rnd-speckey .it-input { min-height: 36px; padding: 6px 9px; font-size: 14px; }
.rnd-speckey--head { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 2px; }
.rnd-speckey .rnd-rowtools { display: flex; gap: 4px; }
@media (max-width: 720px) { .rnd-speckey { grid-template-columns: 1fr 1fr; } .rnd-speckey--head { display: none; } }

/* --- RND-17: what a sales login sees instead of an admin's control ------------- */
.rnd-step[disabled] { cursor: default; }
.rnd-step[disabled]:hover { background: none; color: inherit; }
.rnd-ro { margin: 0; min-height: 40px; display: flex; align-items: center; font-size: 14.5px; color: var(--text-secondary); }
.rnd-flow__decision { margin: 6px 0 0; font-size: 13.5px; color: var(--text-secondary); flex-basis: 100%; }
.rnd-flow__decision b { color: var(--text-primary); }

/* --- RND-18: units are optional for a listing that is not on Amazon ------------ */
.rnd-units--opt:placeholder-shown { border-color: var(--it-border); }
.rnd-units--opt::placeholder { font-weight: 500; font-style: italic; font-size: 12.5px; }

/* --- the list view: pipeline, groups, market bars (2026-09-30) --------------------
   The status filter IS the lifecycle: All · four open stages joined by arrows ·
   the two outcomes. Each stage = its count (big) + the market sitting in it.
   Selected = ink underline + tint; red stays the "your move" colour (dots on
   the stages that wait on the office, and the move line on a row). */
.rnd-pipe { display: grid; grid-template-columns: minmax(110px, 0.8fr) minmax(0, 4.6fr) minmax(0, 1.9fr); margin: 0 0 14px; border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel-bg); overflow: hidden; }
.rnd-pipe__all, .rnd-pipe__flow, .rnd-pipe__out { display: flex; min-width: 0; }
.rnd-pipe__flow { border-left: 1px solid var(--panel-border); border-right: 1px solid var(--panel-border); }
.rnd-pipe__flow .rnd-stage { flex: 1 1 0; }
.rnd-pipe__out .rnd-stage { flex: 1 1 0; }
.rnd-pipe__out .rnd-stage + .rnd-stage { border-left: 1px solid var(--panel-border); }
.rnd-pipe__all .rnd-stage { flex: 1 1 auto; }
.rnd-pipe__arrow { flex: none; display: flex; align-items: center; width: 12px; color: var(--text-muted); opacity: 0.7; }
.rnd-pipe__arrow svg { width: 12px; height: 24px; }
.rnd-stage {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0;
  padding: 11px 14px 12px; border: 0; background: none; font: inherit; color: var(--text-secondary); text-align: left; cursor: pointer;
}
.rnd-stage:hover { background: var(--hover-bg); color: var(--text-primary); }
.rnd-stage:focus-visible { outline: 2px solid var(--text-primary); outline-offset: -2px; }
.rnd-stage::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.rnd-stage.is-on { background: color-mix(in srgb, var(--text-primary) 5%, transparent); color: var(--text-primary); }
.rnd-stage.is-on::after { background: var(--text-primary); }
.rnd-stage__label { display: inline-flex; align-items: center; max-width: 100%; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnd-stage__label .rnd-dot { margin-right: 6px; flex: none; }
.rnd-stage__n { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 30px; font-weight: 800; line-height: 1; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rnd-stage__m { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rnd-stage.is-empty .rnd-stage__n { color: var(--text-muted); font-weight: 700; }
.rnd-stage--denied .rnd-stage__n { color: var(--text-secondary); }

.rnd-bar--list { gap: 10px 12px; }
.rnd-sort { display: inline-flex; align-items: center; gap: 8px; }
.rnd-sort > span { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-bar .rnd-sort .it-input { min-height: 40px; padding: 7px 30px 7px 11px; font-size: 14px; }
.rnd-bar__count { margin-left: auto; font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* stage heads inside the list (pipeline order, All) */
.rnd-ghead { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-top: 1px solid var(--panel-border); background: color-mix(in srgb, var(--text-primary) 3.5%, transparent);
  font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-ghead:first-child { border-top: 0; }
.rnd-ghead .rnd-dot { margin-right: 0; }
.rnd-ghead b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rnd-ghead span { margin-left: auto; font-weight: 700; letter-spacing: 0.02em; text-transform: none; font-size: 12px; font-variant-numeric: tabular-nums; }
.rnd-files--grouped .rnd-ghead + .rnd-grow { border-top: 1px solid var(--panel-border); }

/* row details */
.rnd-thumb--blank { background: transparent; border-style: dashed; }
.rnd-move { color: var(--it-red); font-weight: 700; }
.rnd-move--quiet { color: var(--ops-warn); font-weight: 600; }
.rnd-mbar { display: block; width: 100%; max-width: 132px; height: 4px; margin-top: 5px; border-radius: 2px; background: color-mix(in srgb, var(--text-primary) 8%, transparent); overflow: hidden; }
.rnd-mbar > i { display: block; height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--text-primary) 62%, transparent); }
.rnd-grow__when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rnd-grow__when > span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-grow--denied .rnd-mosaic, .rnd-grow--denied .rnd-fig { opacity: 0.55; }
.rnd-grow--denied .rnd-grow__name { color: var(--text-secondary); }

@media (max-width: 1100px) {
  .rnd-pipe { grid-template-columns: 1fr 1fr; }
  .rnd-pipe__all { border-bottom: 1px solid var(--panel-border); }
  .rnd-pipe__out { border-bottom: 1px solid var(--panel-border); border-left: 1px solid var(--panel-border); }
  .rnd-pipe__flow { grid-column: 1 / -1; grid-row: 2; border: 0; }
}
@media (max-width: 640px) {
  .rnd-pipe__flow { flex-wrap: wrap; }
  .rnd-pipe__flow .rnd-stage { flex: 1 1 50%; border-top: 1px solid var(--panel-border); }
  .rnd-pipe__flow .rnd-stage:nth-of-type(even) { border-left: 1px solid var(--panel-border); }
  .rnd-pipe__flow .rnd-stage:nth-of-type(-n+2) { border-top: 0; }
  .rnd-pipe__arrow { display: none; }
  .rnd-stage { padding: 10px 12px 11px; }
  .rnd-stage__n { font-size: 26px; }
  .rnd-bar--list .rnd-sort { flex: 1 1 auto; }
  .rnd-bar--list .rnd-sort .it-input { flex: 1 1 auto; width: 100%; }
  .rnd-bar__count { margin-left: 0; flex-basis: 100%; }
  .rnd-grow__when { display: none; }
  .rnd-ghead { padding: 9px 14px; }
}
@media (max-width: 640px) {
  /* phone: All, then the four open stages 2 x 2, then the outcomes; count + market share a line */
  .rnd-pipe { grid-template-columns: 1fr; }
  .rnd-pipe__all { grid-row: 1; border-bottom: 1px solid var(--panel-border); }
  .rnd-pipe__flow { grid-row: 2; }
  .rnd-pipe__out { grid-row: 3; border-left: 0; border-bottom: 0; border-top: 1px solid var(--panel-border); }
  .rnd-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: baseline; padding: 9px 12px 10px; }
  .rnd-stage__label { grid-column: 1 / -1; }
  .rnd-stage__n { font-size: 22px; }
}

/* --- list rows: each file its own card, light red glow (Atlas 2026-09-30) ------
   "Outline each R&D proposal with a light glowing red." A red-tinted rim plus a
   soft static glow (lighter than Visits' breathing "Upcoming & active"); the
   glow deepens on hover / keyboard focus. Stage heads sit between the cards. */
.rnd-files { border: 0; border-radius: 0; background: transparent; overflow: visible; display: flex; flex-direction: column; gap: 10px; }
.rnd-files .rnd-grow, .rnd-files .rnd-grow:first-child, .rnd-files--grouped .rnd-ghead + .rnd-grow {
  border: 1px solid color-mix(in srgb, var(--it-red) 42%, var(--panel-border));
  border-radius: 12px; background: var(--panel-bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--it-red) 10%, transparent), 0 0 14px 0 color-mix(in srgb, var(--it-red) 16%, transparent);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.rnd-files .rnd-grow:hover, .rnd-files .rnd-grow:focus-visible {
  background: var(--panel-bg); border-color: color-mix(in srgb, var(--it-red) 70%, var(--panel-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--it-red) 22%, transparent), 0 0 20px 2px color-mix(in srgb, var(--it-red) 26%, transparent);
  outline: none;
}
[data-theme="dark"] .rnd-files .rnd-grow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--it-red) 14%, transparent), 0 0 16px 0 color-mix(in srgb, var(--it-red) 22%, transparent); }
.rnd-files .rnd-ghead, .rnd-files .rnd-ghead:first-child { border: 0; background: transparent; padding: 10px 4px 0; }
.rnd-files .rnd-ghead:first-child { padding-top: 0; }
.rnd-files .rnd-empty { border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel-bg); }
@media (prefers-reduced-motion: reduce) { .rnd-files .rnd-grow { transition: none; } }

/* who created the file (2026-09-30): under the Updated time; in the meta line
   where the when column is hidden (<= 1100 px) */
.rnd-grow__when > .rnd-grow__by { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-secondary); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnd-grow__bym { display: none; }
@media (max-width: 1100px) { .rnd-grow__bym { display: inline; } }

/* --- the way back to the list (file page, 2026-09-30) --------------------------
   A real link, not a small-caps eyebrow: arrow + "R&D files", then the category
   and this file. */
.rnd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; font-size: 13.5px; color: var(--text-secondary); min-width: 0; }
.rnd-crumbs__back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; margin-left: -6px; border-radius: 8px; color: var(--text-primary); font-weight: 700; text-decoration: none; }
.rnd-crumbs__back svg { width: 16px; height: 16px; flex: none; }
.rnd-crumbs__back:hover { background: var(--hover-bg); color: var(--it-red); text-decoration: none; }
.rnd-crumbs__back:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.rnd-crumbs__sep { color: var(--text-muted); }
.rnd-crumbs__cat { font-weight: 600; }
.rnd-crumbs__here { color: var(--text-secondary); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- the Selection tab: funnel strip, winners, tiers, negotiation, lifecycle (RND-22..28) --- */
.rnd-funnel { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; row-gap: 10px; padding: 4px 0 2px; }
.rnd-funnel__stage { flex: 1 1 150px; min-width: 150px; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel-bg); position: relative; }
.rnd-funnel__stage + .rnd-funnel__stage { margin-left: 14px; }
.rnd-funnel__stage + .rnd-funnel__stage::before { content: ''; position: absolute; left: -14px; top: 50%; width: 14px; height: 2px; background: var(--panel-border); }
.rnd-funnel__stage.is-on { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.rnd-funnel__stage.is-empty { color: var(--text-muted); }
.rnd-funnel__n { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 26px; font-weight: 800; line-height: 1; color: var(--text-primary); }
.rnd-funnel__stage.is-empty .rnd-funnel__n { color: var(--text-muted); }
.rnd-funnel__label { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-funnel__sub { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }
.rnd-windows { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.rnd-window { border: 1px solid var(--panel-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rnd-window--diy { border-top: 3px solid var(--ops-ok); }
.rnd-window--storm { border-top: 3px solid var(--it-red); }
.rnd-window--none { border-style: dashed; color: var(--text-secondary); }
.rnd-window__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rnd-window__head h3 { margin: 0; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.rnd-window__bands { font-size: 12.5px; color: var(--text-secondary); }
.rnd-window__figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; font-variant-numeric: tabular-nums; }
.rnd-window__figs b { display: block; font-size: 16px; color: var(--text-primary); }
.rnd-window__figs span { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.rnd-window__reads { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rnd-window__reads li b { color: var(--text-primary); }
.rnd-window__foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.rnd-window__foot .it-btn { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.rnd-tierchip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.rnd-tierchip--diy { color: var(--ops-ok); background: color-mix(in srgb, var(--ops-ok) 12%, transparent); }
.rnd-tierchip--storm { color: var(--it-red); background: color-mix(in srgb, var(--it-red) 10%, transparent); }
.rnd-tierchip--none { color: var(--text-muted); background: color-mix(in srgb, var(--text-primary) 6%, transparent); }
.rnd-vtable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rnd-vtable th, .rnd-vtable td { padding: 7px 8px; border-bottom: 1px solid var(--panel-border); text-align: right; white-space: nowrap; vertical-align: middle; }
.rnd-vtable th:first-child, .rnd-vtable td:first-child, .rnd-vtable th.rnd-l, .rnd-vtable td.rnd-l { text-align: left; }
.rnd-vtable th { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-vtable td.rnd-vwhy { white-space: normal; min-width: 220px; width: 32%; }
.rnd-vtable .it-input { min-height: 34px; padding: 5px 8px; font-size: 13.5px; }
.rnd-vtable select.it-input { width: auto; min-width: 86px; }
.rnd-vtable tr.is-play td:first-child { box-shadow: inset 3px 0 0 var(--ops-ok); }
.rnd-vtable tr.is-avoid td:first-child { box-shadow: inset 3px 0 0 var(--text-muted); }
.rnd-vtable tr.is-avoid td { color: var(--text-secondary); }
.rnd-vtable tr.is-watch td:first-child { box-shadow: inset 3px 0 0 var(--ops-warn); }
.rnd-vsummary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; }
.rnd-vsummary li { padding: 8px 10px; border-radius: 9px; background: color-mix(in srgb, var(--text-primary) 4%, transparent); }
.rnd-vsummary li b { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 3px; }
.rnd-vsummary li span { display: block; }
.rnd-vsummary li i { color: var(--text-secondary); font-style: normal; }
.rnd-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.rnd-tier { display: flex; flex-direction: column; gap: 10px; }
.rnd-tier__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rnd-tier__head h3 { margin: 0; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.rnd-tier__head .rnd-fine { flex: 1 1 100%; }
.rnd-cand { border: 1px solid var(--panel-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--panel-bg); }
.rnd-cand.is-selected { border-color: color-mix(in srgb, var(--text-primary) 55%, var(--panel-border)); }
.rnd-cand.is-final { border-color: var(--ops-ok); box-shadow: inset 0 0 0 1px var(--ops-ok); }
.rnd-cand.is-dropped { opacity: 0.55; }
.rnd-cand__head { display: flex; align-items: flex-start; gap: 8px; }
.rnd-cand__name { font-weight: 800; font-size: 15px; line-height: 1.25; flex: 1 1 auto; min-width: 0; }
.rnd-cand__price { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 22px; font-weight: 800; line-height: 1; white-space: nowrap; }
.rnd-cand__sub { font-size: 12.5px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.rnd-reads { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.rnd-reads li { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--text-primary) 5%, transparent); color: var(--text-secondary); white-space: nowrap; }
.rnd-reads li b { color: var(--text-primary); }
.rnd-reads li.is-strong { background: color-mix(in srgb, var(--ops-ok) 12%, transparent); }
.rnd-reads li.is-weak { background: color-mix(in srgb, var(--ops-warn) 14%, transparent); }
.rnd-cand__why { margin: 0; font-size: 13.5px; line-height: 1.4; }
.rnd-cand__why i { color: var(--text-secondary); font-style: normal; }
.rnd-cand__foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rnd-cand__foot .it-btn { min-height: 32px; padding: 5px 11px; font-size: 12.5px; }
.rnd-cand__state { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.rnd-gaps { margin: 4px 0 0; padding: 10px 12px; border: 1px dashed var(--panel-border); border-radius: 10px; font-size: 13px; }
.rnd-gaps h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-gaps ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.rnd-gaps li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rnd-gaps li i { color: var(--text-secondary); font-style: normal; font-variant-numeric: tabular-nums; }
.rnd-gaps li .rnd-link { margin-left: auto; }
.rnd-negtable td .it-input { min-height: 34px; padding: 5px 8px; font-size: 13.5px; }
.rnd-negtable .rnd-vs { font-size: 11.5px; color: var(--text-secondary); display: block; }
.rnd-negtable .rnd-vs.is-over { color: var(--ops-error); font-weight: 700; }
.rnd-negtable .rnd-vs.is-under { color: var(--ops-ok); font-weight: 700; }
.rnd-launched { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.rnd-perf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; font-variant-numeric: tabular-nums; }
.rnd-perf b { display: block; font-size: 18px; }
.rnd-perf span { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.rnd-perf__bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text-primary) 8%, transparent); overflow: hidden; }
.rnd-perf__bar i { display: block; height: 100%; background: var(--ops-ok); }
.rnd-shelf td.rnd-l { white-space: normal; }
.rnd-shelf .rnd-ours { color: var(--it-red); font-weight: 800; font-size: 11px; letter-spacing: 0.05em; }
.rnd-slform { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.rnd-slform .rnd-field--wide { grid-column: 1 / -1; }
.rnd-benchpick { max-height: 220px; overflow: auto; border: 1px solid var(--panel-border); border-radius: 10px; padding: 4px 0; }
.rnd-benchpick label { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.rnd-benchpick label:hover { background: var(--hover-bg); }
.rnd-benchpick input { width: 15px; height: 15px; margin: 0; accent-color: var(--it-red); }
.rnd-benchpick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnd-benchpick i { margin-left: auto; font-style: normal; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) { .rnd-funnel__stage + .rnd-funnel__stage { margin-left: 0; } .rnd-funnel__stage + .rnd-funnel__stage::before { display: none; } .rnd-window__figs, .rnd-perf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* RND-29 — the Selected module on the R&D page: every selected item across the files, waiting to go to a supplier */
.rnd-selmod { border-color: color-mix(in srgb, var(--it-red) 28%, var(--panel-border)); }
.rnd-selmod .xd-panel__body { gap: 10px; }
.rnd-seltools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rnd-selall, .rnd-selopt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.rnd-selall input, .rnd-selopt input, .rnd-selrow__ck { width: 16px; height: 16px; margin: 0; accent-color: var(--it-red); cursor: pointer; }
.rnd-selall span { min-width: 64px; font-variant-numeric: tabular-nums; }
.rnd-seltools .rnd-sort select { min-width: 180px; }
.rnd-seltools__go { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.rnd-sellist { display: flex; flex-direction: column; gap: 12px; }
.rnd-sellist--prop { padding-top: 6px; border-top: 1px dashed var(--panel-border); }
.rnd-selsub { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.rnd-selgroup { border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.rnd-selgroup__head { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 17px; font-weight: 800; color: var(--text-primary); background: color-mix(in srgb, var(--text-primary) 4%, transparent); border-bottom: 1px solid var(--panel-border); }
.rnd-selgroup__head:hover { color: var(--it-red); text-decoration: none; }
.rnd-selgroup__head span { font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rnd-selrow { display: grid; grid-template-columns: 18px 40px minmax(0, 1fr) 96px 132px 150px; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--panel-border); }
.rnd-selrow:first-of-type { border-top: 0; }
.rnd-selgroup__head + .rnd-selrow { border-top: 0; }
.rnd-selrow.is-ticked { background: color-mix(in srgb, var(--it-red) 6%, transparent); }
.rnd-selrow.is-proposed { opacity: 0.78; }
.rnd-selrow__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rnd-selrow__name { font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnd-selrow__name:hover { color: var(--it-red); }
.rnd-selrow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--text-secondary); }
.rnd-selrow__when { font-size: 12px; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }
.rnd-selrow__when span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.rnd-selrow__act { justify-self: end; }
@media (max-width: 860px) {
  .rnd-selrow { grid-template-columns: 18px 40px minmax(0, 1fr) auto; }
  .rnd-selrow .rnd-fig, .rnd-selrow__when { display: none; }
  .rnd-seltools__go { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .rnd-selrow { grid-template-columns: 18px 40px minmax(0, 1fr); }
  .rnd-selrow__act { grid-column: 3; justify-self: start; }
  .rnd-selrow__act:empty { display: none; }
}
