/* Report sidebar, ported from the "Design Interactive Dashboard" sidebar reference.
   Every selector sits under .rs so nothing leaks in or out. Colours come from the theme tokens in style.css. */
.rs-backdrop { position: fixed; inset: 0; background: rgba(5, 12, 18, .45); z-index: 40; opacity: 0; transition: opacity .2s; }
.rs-backdrop.on { opacity: 1; }
.rs { position: fixed; z-index: 41; top: 16px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; transform: translateX(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease; font-family: inherit; }
.rs.on { transform: none; opacity: 1; }
.rs * { box-sizing: border-box; }
.rs-scroll { overflow-y: auto; flex: 1; }
.rs-head { padding: 20px 22px 18px; border-bottom: 1px solid var(--line); }
.rs-eyebrow { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; }
.rs-close { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.rs-close:hover { color: var(--ink); background: var(--panel-2); }
.rs-select { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; }
.rs-title { font-size: 22px; font-weight: 700; margin: 16px 0 4px; line-height: 1.2; }
.rs-loc { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rs-sec { padding: 16px 22px; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rs-label { font-size: 13.5px; color: var(--ink-2); }
.rs-years { display: flex; gap: 4px; }
.rs-years button { border: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.rs-years button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.rs-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 18px; }
.rs-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 9px; border-radius: 9px; cursor: pointer; }
.rs-tabs button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.rs-h { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 10px; }
.rs-h b { font-size: 14.5px; }
.rs-phase { display: flex; gap: 2px; }
.rs-phase button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; padding: 3px 7px; border-radius: 6px; cursor: pointer; }
.rs-phase button[aria-pressed="true"] { color: var(--ink); background: var(--panel-2); font-weight: 600; }
.rs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs-card { text-align: left; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; min-width: 0; }
.rs-card:hover { background: var(--panel-2); }
.rs-card[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-soft); }
.rs-card .k { font-size: 12px; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-card .v { font-size: 22px; font-weight: 600; display: block; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rs-card .u { font-size: 11.5px; color: var(--muted); }
.rs-card.breach .v { color: var(--crit-text); }
.rs-card.breach .v::before { content: "▲ "; font-size: 12px; }
.rs-card.missing .v { color: var(--data-text); font-size: 14px; font-weight: 700; margin: 9px 0 6px; }
.rs-detail { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; }
.rs-detail .t { font-size: 15px; font-weight: 700; } .rs-detail .s { font-size: 12.5px; color: var(--muted); }
.rs-bda { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; text-align: center; }
.rs-bda div { background: var(--panel-2); border-radius: 8px; padding: 8px 4px; }
.rs-bda b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.rs-bda span { font-size: 12px; color: var(--muted); }
.rs-delta { font-size: 13px; color: var(--ink-2); }
.rs-alert { margin-top: 12px; font-size: 13.5px; }
.rs-alert ul { margin: 6px 0 0; padding-left: 18px; }
.rs-foot { border-top: 1px solid var(--line); padding: 14px 22px 18px; background: var(--panel); }
.rs-foot .rs-row { margin-bottom: 10px; }
.rs-opts { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rs-opts button { border: 0; background: var(--panel); color: var(--ink-2); font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; }
.rs-opts button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.rs-scope { font-size: 13px; color: var(--ink-2); display: flex; gap: 12px; flex-wrap: wrap; }
.rs-scope label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.rs-go { width: 100%; border: 0; border-radius: 10px; padding: 12px; font: inherit; font-size: 15px; font-weight: 700; background: var(--accent); color: var(--accent-ink); cursor: pointer; margin-top: 4px; }
.rs-go[disabled] { opacity: .6; cursor: progress; }
.rs-progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.rs-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.rs-msg { font-size: 13px; margin-top: 8px; min-height: 1em; }
.rs-msg.err { color: var(--crit-text); font-weight: 600; }
.rs-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.rs :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 760px) {
  .rs { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border: 0; }
  .rs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .rs, .rs-backdrop, .rs-progress i { transition: none; } }
