/* css/report-layout-v2.css — loaded by js/report-layout-v2.js only while flag report_layout_v2 is on (rpt1, 2026-10-22).
 * Design tokens only (css/styles.css is frozen), so light and dark both inherit. Pane rules are scoped to
 * #results-section, so the PDF export clone (pdf-snapshot.js drops the id) is unaffected. */

/* ── width: the report uses the room it has ─────────────────────────────────────────────────────────── */
body.rl2-on.rl2-report main.page-content { max-width: 1560px; }
body.rl2-on #results-section #anav-nav { display: none !important; }
body.rl2-on #results-section #anav-body { display: block; }
body.rl2-on #results-section #anav-pane { width: 100%; padding-bottom: 72px; }   /* room so the floating button never covers the last line */

/* every section of the open tab, one under the other */
body.rl2-on #results-section #anav-pane .anav-group.rl2-show { display: block; margin-bottom: 26px; }
body.rl2-on #results-section #anav-pane .anav-group:not(.rl2-show) { display: none; }

/* ── tabs ───────────────────────────────────────────────────────────────────────────────────────────── */
#rl2-bar { margin: 0 0 14px; position: sticky; top: 0; z-index: 30; background: var(--bg-primary, var(--card-bg)); padding-top: 4px; }
/* jumps: land on the heading, below the pinned tab bar; never animate (styles.css makes html smooth-scroll) */
html.rl2-jumping { scroll-behavior: auto !important; }
body.rl2-on #results-section #anav-pane .anav-group,
body.rl2-on #results-section #anav-pane .anav-pane-h { scroll-margin-top: calc(var(--rl2-sticky, 0px) + 8px); }
.rl2-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border-color); }
.rl2-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 14px; font: 600 14px/1.3 var(--font); color: var(--text-secondary); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rl2-tab:hover { color: var(--text); background: var(--sidebar-hover); }
.rl2-tab.rl2-tab-on { color: var(--text); border-bottom-color: var(--primary); }
.rl2-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.rl2-tab-n { font: 500 11px/1 var(--font-mono); color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-color); border-radius: 999px; padding: 2px 6px; }
.rl2-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.rl2-chips-k { font-size: 12px; color: var(--text-secondary); margin-right: 2px; }
.rl2-chip {
  display: inline-flex; align-items: baseline; gap: 6px; cursor: pointer;
  font: 500 12px/1.3 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-color); border-radius: 999px; padding: 4px 11px;
}
.rl2-chip:hover { border-color: var(--primary); }
.rl2-chip.rl2-chip-on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

/* ── floating section list (bottom-right, fixed: outside the content column) ─────────────────────────── */
#rl2-jump-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  font: 600 13px/1 var(--font); color: #fff; background: var(--primary);
  border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer; box-shadow: var(--shadow-md);
}
#rl2-jump-btn::before { content: "\2630"; margin-right: 7px; }
#rl2-jump-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
#rl2-jump-menu {
  position: fixed; right: 18px; bottom: 64px; z-index: 901; width: 280px; max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border-color); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 6px;
}
#rl2-jump-menu[hidden] { display: none; }
.rl2-jm-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: var(--radius-sm);
  padding: 7px 10px; font: 13px/1.35 var(--font); color: var(--text); cursor: pointer; }
.rl2-jm-item:hover { background: var(--sidebar-hover); }
.rl2-jm-top { font-weight: 600; border-bottom: 1px solid var(--border-color); border-radius: 0; margin-bottom: 4px; }
.rl2-jm-on { font-weight: 600; box-shadow: inset 2px 0 0 var(--primary); }
.rl2-jm-tab { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: var(--radius-sm); cursor: pointer; font: 600 13px/1.35 var(--font); color: var(--text); padding: 7px 10px; }
.rl2-jm-tab:hover { background: var(--sidebar-hover); }
.rl2-jm-tab-on { color: var(--primary); cursor: default; }
.rl2-jm-n { font: 500 11px/1 var(--font); color: var(--text-secondary); }
.rl2-jm-sub { padding-left: 22px; }
body:not(.rl2-report) #rl2-jump-btn, body:not(.rl2-report) #rl2-jump-menu { display: none !important; }

@media (max-width: 700px) {
  .rl2-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rl2-tab { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
  .rl2-chips-k { display: none; }
  #rl2-jump-btn { right: 12px; bottom: 12px; padding: 12px; }
  #rl2-jump-btn .rl2-jb-t { display: none; }
  #rl2-jump-menu { right: 12px; left: 12px; width: auto; bottom: 60px; }
}

/* ── Code compliance cards (js/code-cards-v2.js). Not scoped to #results-section: the PDF should get them too. ── */
.cc2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.cc2-card { background: var(--surface); border: 1px solid var(--border-color); border-left: 3px solid var(--green); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.cc2-card.cc2-confirm { border-left-color: var(--yellow); }
.cc2-card.cc2-unknown { border-left-color: var(--red); }
.cc2-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 4px; }
.cc2-value { display: block; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
.cc2-detail { font-size: 12.5px; color: var(--text); opacity: .85; line-height: 1.5; margin-top: 5px; }
.cc2-source { font-size: 11.5px; color: var(--text-secondary); margin-top: 6px; }
.cc2-source a { color: var(--primary); }

/* Analysis Confidence: each score explains itself */
body.rl2-on .rl2-why { margin-top: 6px; font-size: 12px; color: var(--text-secondary); }
body.rl2-on .rl2-why > summary { cursor: pointer; color: var(--primary); font-weight: 600; }
body.rl2-on .rl2-why ul { margin: 6px 0 2px; padding-left: 0; list-style: none; }
body.rl2-on .rl2-why li { margin: 2px 0; line-height: 1.35; }
body.rl2-on .rl2-why-pts { display: inline-block; min-width: 52px; font-weight: 600; color: var(--text); }
body.rl2-on .rl2-why-note { font-weight: 500; color: var(--text-secondary); }
body.rl2-on .rl2-why-foot { margin-top: 4px; font-style: italic; }

/* Mark Won / Mark Lost restored under report_layout_v2 (RB 7:38 PM): beats demo-polish-r15's html.ac-nocost [data-ac="cost"] and .ac-hide */
html body.rl2-on .outcome-controls[data-ac="cost"][data-rl2-restored] { display: inline-flex !important; }
