/* Same console as the Planning demo: a head with the title and the tools, then the picture. */
.rb{container:camera-audit / inline-size;margin:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);
  /* One colour per class, shared by the boxes and the legend. Red is kept for wrong answers. */
  --c-person:#39c8f5;--c-car:#ffd23f;--c-cat:#c79bff;--c-dog:#57e08f;--c-raccoon:#f4f4f4;--c-rat:#ffa8d8;--c-wrong:#ff3b30}
.rb [hidden]{display:none!important}
.rb:focus{outline:none}
.rb button{touch-action:manipulation;cursor:pointer;font-family:var(--sans)}
.rb button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.rb-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem 1.25rem;padding:.7rem clamp(.85rem,2.1cqi,1.75rem)}
.rb-location{display:flex;align-items:center;gap:.7rem;flex:1 1 auto;min-width:0}
.rb-location svg{flex:none;width:2.25rem;height:2.25rem;color:var(--ink);stroke-width:1.5;stroke-linecap:round}
.rb-led{fill:var(--accent);stroke:none}
.rb-eyebrow{display:block;margin:0 0 .16rem;color:var(--ink);font:550 .58rem/1.4 var(--mono);letter-spacing:.125em;text-transform:uppercase}
.rb-location strong{display:block;font:600 1.08rem/1.18 var(--display);letter-spacing:-.022em;text-wrap:balance}
.rb-tools{display:flex;align-items:center;gap:1rem;flex:none}
/* The tools keep to the right at every width; the sentence beside them wraps instead.
   A switch: off is the default detector, on the hardened one. */
.rb-switch{display:inline-flex;align-items:center;gap:.55rem;min-height:44px;padding:0;border:0;background:none;color:var(--ink);font:550 .82rem var(--sans);white-space:nowrap}
.rb-switch i{position:relative;flex:none;width:2.15rem;height:1.2rem;border:1.5px solid var(--ink);border-radius:1rem;transition:background .15s}
.rb-switch i::after{content:'';position:absolute;inset:2px auto 2px 2px;width:.78rem;border-radius:50%;background:var(--ink);transition:translate .15s ease-out,background .15s}
.rb-switch[aria-pressed="true"] i{background:var(--ink)}.rb-switch[aria-pressed="true"] i::after{translate:.94rem 0;background:var(--plane)}
.rb-switch:disabled,.rb-play:disabled{opacity:.5;cursor:default}
.rb-play{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;width:6rem;flex:none;padding:.36rem .72rem .36rem .44rem;border:1px solid var(--ink);border-radius:0;color:var(--plane);background:var(--ink);font:600 .82rem var(--sans)}
.rb-disc{display:grid;place-items:center;width:1.8rem;height:1.8rem}.rb-disc svg{width:1rem;height:1rem}
.rb-play .rb-go,.rb[data-paused] .rb-play .rb-hold{display:none}.rb[data-paused] .rb-play .rb-go{display:inline}
.rb-scene{position:relative;overflow:hidden;background:var(--surface);border-block:1px solid var(--line);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.rb-pan{overflow-x:auto;overscroll-behavior-x:contain}
.rb-map{display:block;width:100%;aspect-ratio:752/400}
/* The picture is what the camera records, so its colours do not follow the page theme. */
.rb-skyline{fill:#5d6875}.rb-wall{fill:#a79f92}.rb-trim{fill:#8d8579}.rb-panes rect{fill:#5c6875}.rb-doors{fill:#51463c}.rb-awning{fill:#8a3f33}
.rb-pavement{fill:#8e9195}.rb-kerb{fill:#6b6f74}.rb-road{fill:#41464d}.rb-lane{fill:none;stroke:#c9ccd0;stroke-width:3;opacity:.55}.rb-post{fill:#2b3037}
.rb-shadow{fill:#1b1e24;opacity:.28}.rb-head{fill:#c79a79}.rb-legs{fill:#272b33}
.rb-wears-pale .rb-coat{fill:#ded5c5}.rb-wears-dark .rb-coat{fill:#272c35}.rb-wears-navy .rb-coat{fill:#2f4466}.rb-wears-red .rb-coat{fill:#a8362c}.rb-wears-hat .rb-coat{fill:#56705a}
.rb-wears-vest .rb-coat{fill:#e9dc3c}.rb-wears-vest .rb-legs{fill:#39485a}.rb-bands{fill:none;stroke:#f7f7f2;stroke-width:4}
.rb-wears-print .rb-coat{fill:url(#rb-print);stroke:#15171c;stroke-width:.8}
.rb-hat{fill:#ffd21f;stroke:#ffd21f;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.rb-cat{fill:#2a2d33}.rb-dog{fill:#9a6a3c}.rb-raccoon{fill:#6f7178}.rb-stripes{fill:none;stroke:#23252b;stroke-width:3}.rb-mask{fill:#1c1e23}.rb-rat{fill:#5a5560}.rb-tail{fill:none;stroke:#b98f8f;stroke-width:1.6;stroke-linecap:round}
/* The raccoon and the rats only come out at night. */
.rb-night-only{display:none}.rb[data-weather="night"] .rb-night-only{display:inline}
.rb-car{fill:#c2412d}.rb-glass{fill:#bcd3e0}.rb-wheel{fill:#1d2026}.rb-hub{fill:#9aa0a8}.rb-lamp{fill:#fff3c4}.rb-beam{fill:#ffe9a8;opacity:.4}
/* Each weather is its own set of layers; only the chosen one is drawn. */
.rb-w{display:none}
.rb[data-weather="clear"] .rb-w-clear,.rb[data-weather="sun"] .rb-w-sun,.rb[data-weather="fog"] .rb-w-fog,.rb[data-weather="rain"] .rb-w-rain,.rb[data-weather="night"] .rb-w-night{display:inline}
.rb-sun{fill:#ffb866}.rb-shade,.rb-dark{fill:#04060f}.rb-dark{opacity:.9}.rb-streak{fill:#fff;opacity:.5}.rb-ghost{fill:#ffe8b0;opacity:.2}
.rb-stars circle{fill:#eef2ff}.rb-moon{fill:#f1f3fb}.rb-lit rect{fill:#ffd98a}.rb-grain{fill:#000;opacity:.42;mix-blend-mode:screen}
@media (prefers-reduced-motion:no-preference){
  .rb-rain{animation:rb-fall .5s linear infinite}.rb[data-paused] .rb-rain{animation-play-state:paused}
}
@keyframes rb-fall{to{translate:-12.58px 50.46px}}
/* What the detector reports: a box, a label and a confidence, in the colour of the class it names.
   Dashed when it is unsure, red when the answer is wrong or the thing was missed. */
.rb-tag{--tag:var(--c-person)}.rb-tag[data-label="car"]{--tag:var(--c-car)}.rb-tag[data-label="cat"]{--tag:var(--c-cat)}.rb-tag[data-label="dog"]{--tag:var(--c-dog)}
.rb-tag[data-label="raccoon"]{--tag:var(--c-raccoon)}.rb-tag[data-label="rat"]{--tag:var(--c-rat)}.rb-tag[data-wrong]{--tag:var(--c-wrong)}
.rb-marks{fill:none;stroke:var(--tag);stroke-width:2.2;stroke-linecap:square}
.rb-label{fill:var(--tag);font:700 11px var(--mono);letter-spacing:.3px;text-transform:uppercase;paint-order:stroke;stroke:#05070d;stroke-width:3;stroke-linejoin:round}
.rb-tag[data-style="unsure"] .rb-marks,.rb-tag[data-style="missed"] .rb-marks{stroke-dasharray:3 4;stroke-width:1.8}
.rb-finder{fill:none;stroke:#fff;stroke-width:1.5;opacity:.55}
.rb-noscript{margin:0;padding:.6rem clamp(.75rem,2vw,1.35rem)}
/* What is laid over the picture belongs to the camera, not the page: the same dark
   on-screen display in either theme and at any width. */
.rb-osd,.rb-legend{position:absolute;inset-block-start:.75rem;display:flex;align-items:center;margin:0;padding:0;background:rgb(9 11 17/.8);border:1px solid rgb(255 255 255/.18);color:#fff}
.rb-osd{inset-inline-start:.75rem}
.rb-conditions{display:flex;align-items:center}
.rb-conditions button{position:relative;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;background:none;color:rgb(255 255 255/.78);transition:background .15s,color .15s}
.rb-conditions svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rb-conditions button:hover{color:#fff;background:rgb(255 255 255/.12)}
.rb-conditions button[aria-pressed="true"]{background:#fff;color:#0a0a0b}
.rb-conditions button:disabled{cursor:default;opacity:.6}
.rb-conditions button:focus-visible{outline:2px solid #7db4f5;outline-offset:-2px}
/* The chosen condition fills up until the picture moves on to the next one. */
.rb-conditions button[aria-pressed="true"]::after{content:'';position:absolute;inset:auto 0 0 0;height:2px;background:#ff3b2f;transform-origin:0 50%;transform:scaleX(var(--rb-progress,0))}
.rb-now{min-width:4.6rem;padding-inline:.7rem;border-inline-start:1px solid rgb(255 255 255/.18);font:550 .64rem/36px var(--mono);letter-spacing:.09em;text-transform:uppercase}
.rb-legend{inset-inline-end:.75rem;flex-wrap:wrap;gap:.2rem .85rem;min-height:38px;max-width:calc(100% - 1.5rem);padding:.3rem .65rem;list-style:none;font:550 .6rem/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;pointer-events:none}
.rb-legend li{display:flex;align-items:center;gap:.38rem}
.rb-legend i{width:.62rem;height:.62rem;border:2px solid var(--swatch)}
.rb-c-person{--swatch:var(--c-person)}.rb-c-car{--swatch:var(--c-car)}.rb-c-cat{--swatch:var(--c-cat)}.rb-c-dog{--swatch:var(--c-dog)}.rb-c-raccoon{--swatch:var(--c-raccoon)}.rb-c-rat{--swatch:var(--c-rat)}.rb-c-wrong{--swatch:var(--c-wrong)}
.rb-legend .rb-night-only{display:none}.rb[data-weather="night"] .rb-legend .rb-night-only{display:flex}
@container camera-audit (max-width:719px){
  /* Not enough sky for both: the legend drops under the conditions. */
  .rb-legend{inset-inline:.75rem auto;inset-block-start:calc(.75rem + 38px + .35rem);min-height:0}
}
@container camera-audit (max-width:619px){
  /* With little room the tools shrink to a short label and an icon, so the sentence keeps its space. */
  .rb-tools{gap:.6rem}.rb-wide{display:none}
  .rb-play{position:relative;width:44px;justify-content:center;padding:0}
  .rb-play [data-rb-pause-label]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@container camera-audit (max-width:519px){
  /* Phones keep the labels readable and let the picture scroll sideways under its controls. */
  .rb-map{width:46rem}.rb-pan{scrollbar-width:thin}
  .rb-head{padding:.6rem .7rem}
  .rb-location svg{display:none}.rb-location strong{font-size:.94rem}
  .rb-osd{inset-inline-start:.5rem;inset-block-start:.5rem}
  .rb-legend{inset-inline:.5rem auto;inset-block-start:calc(.5rem + 38px + .3rem);max-width:calc(100% - 1rem)}
  .rb-now{display:none}
}
