/* ==========================================================================
   Review Mode — every rule is scoped to html.review-on, which is only set when
   the URL contains ?review=1. With review off, nothing in this file matches.
   ========================================================================== */
html.review-on {
  --rv-preserved: #5F6368; --rv-modified: #1D4ED8; --rv-new: #15803D;
  --rv-removed: #B42318; --rv-deferred: #8A5A00; --rv-approval: #7E22CE;
  --rv-ink: #111; --rv-paper: #fff;
}
html.review-on body { padding-bottom: 64px; }
html.review-on .rv-target { outline: 2px dashed var(--rv-c); outline-offset: -2px; }
html.review-on .rv-target.rv-relative { position: relative; }
html.review-on .rv-Preserved { --rv-c: var(--rv-preserved); }
html.review-on .rv-Modified { --rv-c: var(--rv-modified); }
html.review-on .rv-New { --rv-c: var(--rv-new); }
html.review-on .rv-Removed { --rv-c: var(--rv-removed); }
html.review-on .rv-Deferred { --rv-c: var(--rv-deferred); }
html.review-on .rv-NeedsApproval { --rv-c: var(--rv-approval); }

html.review-on .rv-pin {
  position: absolute; top: 8px; left: 8px; z-index: 50;
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 16px);
  padding: 4px 10px 4px 4px; min-height: 30px;
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none;
  color: #fff; background: var(--rv-c); border: 2px solid #fff; border-radius: 999px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.review-on .rv-pin:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
html.review-on .rv-pin__code { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--rv-c); align-items: center; justify-content: center; font-size: 11px; flex: none; }
html.review-on .rv-pin__decision { font-weight: 500; opacity: .9; }
html.review-on .site-header .rv-pin { top: auto; bottom: -15px; }

/* Toolbar */
html.review-on .rv-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; min-height: 56px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px;
  background: #111; color: #fff; font: 500 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}
html.review-on .rv-bar strong { font-weight: 700; }
html.review-on .rv-bar a, html.review-on .rv-bar button { color: #fff; font: inherit; }
html.review-on .rv-bar button, html.review-on .rv-bar a.rv-btn { background: transparent; border: 1px solid rgba(255,255,255,.5); padding: 6px 10px; min-height: 36px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
html.review-on .rv-bar button:hover, html.review-on .rv-bar a.rv-btn:hover { border-color: #fff; }
html.review-on .rv-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; margin: 0; padding: 0; }
html.review-on .rv-legend li { display: inline-flex; align-items: center; gap: 5px; }
html.review-on .rv-swatch { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: #fff; color: var(--rv-c); border: 2px solid var(--rv-c); }
html.review-on .rv-bar__spacer { flex: 1; }
html.review-on .rv-offpage { opacity: .85; }

/* Panel */
html.review-on .rv-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 2100; width: min(460px, 100vw);
  margin: 0; max-height: none; height: 100%; padding: 0; border: 0; border-left: 4px solid var(--rv-c, #111);
  background: var(--rv-paper); color: var(--rv-ink); box-shadow: -8px 0 24px rgba(0,0,0,.18);
  font: 400 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; overflow-y: auto;
}
html.review-on .rv-panel::backdrop { background: rgba(0,0,0,.25); }
html.review-on .rv-panel__inner { padding: 20px 22px 32px; }
html.review-on .rv-panel h2 { font: 700 18px/1.3 system-ui, sans-serif; margin: 0 0 4px; letter-spacing: 0; }
html.review-on .rv-panel h3 { font: 700 11px/1.3 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #555; margin: 18px 0 4px; }
html.review-on .rv-panel p, html.review-on .rv-panel li { margin: 0; font-size: 14px; }
html.review-on .rv-panel ul { padding-left: 18px; margin: 0; }
html.review-on .rv-status { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; background: var(--rv-c); font-weight: 700; font-size: 12px; }
html.review-on .rv-meta { color: #555; font-size: 13px; margin: 6px 0 0 !important; }
html.review-on .rv-close { position: sticky; top: 0; float: right; margin: 10px 10px 0 0; width: 40px; height: 40px; border: 1px solid #111; background: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
html.review-on .rv-decision { margin-top: 22px; padding-top: 16px; border-top: 1px solid #ddd; }
html.review-on .rv-decision fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
html.review-on .rv-decision legend { font-weight: 700; margin-bottom: 6px; }
html.review-on .rv-decision label { display: flex; align-items: center; gap: 8px; min-height: 32px; }
html.review-on .rv-decision textarea { width: 100%; min-height: 90px; margin-top: 8px; padding: 8px; border: 1px solid #999; font: inherit; }
html.review-on .rv-note { font-size: 12px !important; color: #666; margin-top: 8px !important; }
html.review-on .rv-saved { color: #15803D; font-weight: 600; font-size: 12px; min-height: 18px; }

@media (max-width: 767px) {
  html.review-on .rv-legend { display: none; }
  html.review-on .rv-pin { max-width: 70vw; }
}
@media print { html.review-on .rv-bar, html.review-on .rv-pin { display: none; } }

/* Internal notes are visible only in Review Mode */
html.review-on .dev-note {
  display: inline-block !important; margin: 0.35rem 0; padding: 3px 9px;
  font: 600 12px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none; font-style: normal;
  color: #fff; background: var(--rv-approval); border-radius: 4px; max-width: 100%;
}
html.review-on .dev-note::before { content: "Review note: "; font-weight: 700; }
html.review-on [data-dev-only] { display: block !important; }
