/* ---------------------------------------------------------------------------
   control-room.css — the interactive US map and Control Room™ panel.
   ---------------------------------------------------------------------------
   Ported from the design's state-map.html, which ran in an iframe. It now
   renders inline, so every rule is scoped under .cr, and the iframe's
   viewport media queries became container queries on .cr: the breakpoints
   still measure the widget's own width, as they did inside the frame.
--------------------------------------------------------------------------- */

.cr { container-type: inline-size; position: relative; width: 100%; display: flex; flex-direction: column; gap: 16px; color: #000; font-family: var(--font-body); }
.cr-body { display: flex; flex-direction: column; gap: 40px; }
.cr-upper { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center; }
.cr-blurb { font-size: 20px; line-height: 1.5; color: #000; margin: 0; max-width: 40ch; text-align: left; }

/* Map */
.cr-map { width: 100%; aspect-ratio: 960 / 600; position: relative; }
.cr-map svg { width: 100%; height: 100%; display: block; }
.cr-st { fill: transparent; stroke: #000; stroke-width: 1; cursor: pointer; transition: fill 120ms cubic-bezier(.2,0,0,1); }
.cr-st:hover { fill: rgba(0,0,0,.14); }
.cr-st.sel { fill: #000; stroke: #000; stroke-width: 1.5; cursor: default; }
.cr-tip { position: absolute; pointer-events: none; background: #000; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity 120ms cubic-bezier(.2,0,0,1); }
.cr-tip.show { opacity: 1; }
.cr-callout { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 8px; background: #000; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px; pointer-events: none; transition: opacity 180ms cubic-bezier(.2,0,0,1); }
.cr-callout .cr-ico { color: #FFF927; }
.cr.touched .cr-callout { opacity: 0; }

/* Panel */
.cr-panel { width: 100%; background: #000; color: #fff; border-radius: 8px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; }
.cr-panel h4 { margin: 0; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.015em; line-height: 1.1; text-transform: uppercase; }
.cr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.cr-title { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #FFF927; line-height: 1.4; }
.cr-title sup { font-size: 7px; vertical-align: top; margin-left: 1px; }
.cr-eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #9E9E9E; display: flex; align-items: center; gap: 6px; flex: none; }
.cr:not(.touched) .cr-eyebrow { background: #fff; color: #000; padding: 6px 8px; border-radius: 8px; font-size: 9px; }
.cr-grp { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #9E9E9E; margin-top: 6px; }

.cr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.25); }
.cr-label { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cr-label small { display: block; flex-basis: 100%; font-family: var(--font-body); font-weight: 400; font-size: 10px; letter-spacing: 0; text-transform: none; color: #9E9E9E; }
.cr-chev { color: #9E9E9E; transition: transform 120ms cubic-bezier(.2,0,0,1); }
.cr-chev.open { transform: rotate(180deg); color: #FFF927; }
.cr-row.off .cr-label { color: #B0B0B0; }
.cr-row.sub { padding: 6px 0 6px 14px; border-top: 1px dashed #333; }
.cr-row.sub .cr-label { font-size: 10px; color: #D0D0D0; }

/* Switches. Real buttons (role="switch"), with the design's pill styling. */
.cr-tg { appearance: none; border: 0; padding: 0; margin: 0; width: 40px; height: 22px; border-radius: 999px; background: #333; position: relative; cursor: pointer; flex: none; transition: background 120ms cubic-bezier(.2,0,0,1); }
.cr-tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 120ms cubic-bezier(.2,0,0,1); }
.cr-tg:hover { background: #4A4A4A; }
.cr-tg.on { background: #FFF927; }
.cr-tg.on:hover { background: #FFC600; }
.cr-tg.on::after { transform: translateX(18px); background: #000; }
.cr-row.off .cr-tg { opacity: .4; cursor: not-allowed; }
.cr-row.off .cr-tg:hover { background: #333; }
.cr-row.sub .cr-tg { width: 32px; height: 18px; }
.cr-row.sub .cr-tg::after { width: 12px; height: 12px; }
.cr-row.sub .cr-tg.on::after { transform: translateX(14px); }

/* Footer: interaction hint and the regulatory note */
.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.25); }
.cr-hint { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #000; }
.cr-note { font-size: 12px; color: #000; }

@container (max-width: 760px) {
  .cr-upper { grid-template-columns: 1fr; }
}
/* The design also had a max-width: 640px rule enlarging the switches for
   thumbs, but it sat before the base rules and so never took effect; the
   approved design shows the standard size on phones, which is kept here. */
