/* K-Frame Menu control kit. Values come straight from the decompiled dictionaries:
   mms_colours.xaml (colours), mms_resources.xaml (Tahoma, Nav_Text_Size 13), MMSControlsResourceDictionary.xaml
   (toggleRadioButtonSmall* 68x40 / 54.4x49, mmsParameterGroupStyle 75x55, mmsJeweledToggleStyle), SWRResourceDictionary.xaml
   (swrPanelControlStyle nine-grid SWR_panel padding 10,20,20,10; knob 97x110; tabs 105x51),
   MMSSupportFilesResourceDictionary.xaml (navigationRadioButtonStyle 68x60). Geometry is the native 1280x768 chrome
   with the 1115x543 page, scaled to fit the window by transform. */
:root {
  /* Default (non-dark) theme, MMS_Window_Model.IsDarkTheme=false (MMS_Window_Model.cs:577-588): teal panels #0A3734, SWR #006861, nav #333333/#252525, stroke #6E6E6E 3 px. The dark set (#232b36/#365488/#333b46/#212834/black 1 px) is the mms_colours.xaml default only. */
  --OnAir:#B40000; --SWRPanel:#0A3734; --SWR:#006861; --NavPanel:#252525; --NavButton:#333333; --NavStroke:#6E6E6E;
  --MenuActive:#000; --MenuInvalid:#4D0000; --MenuUnsaved:#997300; --MenuInactive:#494949; --MenuStroke:#5A5A5A;
  --Selected:#00A7EC; --SelectedStroke:#00628A; --ToggleOn:#87E702; --ToggleHi:#ABEE4D;
  --TextActive:#FFF; --TextInactive:#A0A0A0; --TextSelected:#00A7EC; --TextUnselected:#6E6E6E; --Icons:#C8C8C8;
  --TextField:#494949; --NotPresent:#202020; --Bracket:#0072A1; --LightRed:#FFC0CB;
}
.kf * { box-sizing:border-box; }
.kf { font-family:Tahoma, "Segoe UI", Arial, sans-serif; font-size:14px; color:var(--TextActive); user-select:none; -webkit-user-select:none; }
.kf .abs { position:absolute; }

/* ── Chrome (1280x768 design canvas) ───────────────────────────────────────── */
.chrome-host { position:relative; width:100%; height:100%; overflow:hidden; background:#000; }
.chrome-box { position:relative; overflow:hidden; }   /* sized to the transformed canvas so scrolling never exposes unscaled bounds */
.chrome { position:absolute; left:0; top:0; width:1280px; height:768px; transform-origin:0 0; background:#0b0f14 url("assets/swr_background.png") center/cover no-repeat; overflow:hidden; }
.chrome > .navframe { display:none; }   /* user 2026-09-08: no outlines for parts that are not implemented — the nav band is plain grey */
.msgwin { position:absolute; top:0; width:513px; height:58px; }
.msgwin .box { position:absolute; left:3px; top:3px; width:506px; height:52px; border:3px solid #3D3D3D; border-radius:6px; background:var(--NavPanel); color:var(--TextActive); font-size:14px; display:flex; align-items:center; padding:0 12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.msgwin.main { right:0; } .msgwin.main .box { justify-content:center; }
.msgwin.sec { left:254px; }
.page-host { position:absolute; left:165px; top:80px; width:1115px; height:543px; }
.page { position:absolute; left:0; top:0; width:1115px; height:543px; overflow:hidden; }

/* Bottom navigation: 140 px band, two rows of 68x60 buttons on a 70 px pitch, from x = 226 */
.nav { position:absolute; left:0; bottom:0; width:1280px; height:140px; background:var(--NavPanel); }
.nav .row { position:absolute; left:234px; display:flex; gap:2px; height:60px; }   /* real menu: main row starts at x≈79; the sub row is centred under the active main button (renderNav) */
.nav .row.main { bottom:5px; gap:0; }   /* 15 real main buttons on a 68 px pitch end at x≈1254 like the screenshots */ .nav .row.sub { top:5px; }
.nav .row.sub:empty::before { content:""; }
.navbtn { width:68px; height:60px; border:3px solid var(--NavStroke); border-radius:6px; background:var(--NavButton); color:var(--TextActive); font:13px Tahoma, sans-serif; display:flex; align-items:center; justify-content:center; text-align:center; line-height:1.15; padding:2px; cursor:pointer; }
.navbtn.on { background:var(--SWR); border:3px solid var(--SWR); }
.navbtn.dim { color:var(--TextInactive); cursor:default; }
.navbtn.blank { visibility:hidden; }
.mode-toggles { position:absolute; left:3px; bottom:6px; height:60px; display:flex; gap:4px; }
.mode-toggles .navbtn.edpm { border-radius:12px 0 0 12px; background:#AE5B23; width:68px; }
.mode-toggles .navbtn.swr { border-radius:12px; }
.mode-toggles .help { display:none; }
.mode-toggles .help b { font-size:11px; color:var(--TextActive); }
.droptab { display:none; }
.droptab .tab { position:absolute; top:40px; width:65px; height:27px; border:1px solid #3D3D3D; border-bottom:0; border-radius:6px 6px 0 0; background:var(--NavPanel); color:var(--TextInactive); font-size:11px; display:flex; align-items:center; justify-content:center; }

/* ── Panels ─────────────────────────────────────────────────────────────────── */
.panel { position:absolute; }
.panel::before { content:""; position:absolute; inset:0; border:20px solid transparent; border-left-width:10px; border-bottom-width:10px; border-image:url("assets/swr_panel.png") 20 20 10 10 fill stretch; pointer-events:none; }
.panel > .content { position:absolute; left:0; top:0; width:100%; height:100%; }
.bevel { position:absolute; border:7px solid transparent; border-image:url("assets/swr_bevel.png") 12 3 3 12 fill stretch; background:transparent; }
.scroll { position:absolute; overflow-y:auto; overflow-x:hidden; background:var(--SWRPanel); scrollbar-width:thin; scrollbar-color:var(--MenuStroke) var(--TextField); }
.label { position:absolute; font-size:14px; color:var(--TextActive); white-space:nowrap; }
.label.title { font-size:16px; }
.label.dim { color:var(--TextInactive); }
/* Group bracket: 4 px bracket colour, rounded 6, drawn as an L-shaped border */
.bracket { position:absolute; border:4px solid var(--Bracket); border-radius:6px; pointer-events:none; }
.bracket.v { border-right:0; border-radius:6px 0 0 6px; width:15px; }
.bracket.h { border-bottom:0; border-radius:6px 6px 0 0; height:12px; }
.bracket .bl { position:absolute; left:2px; top:-24px; font-size:14px; color:var(--TextActive); white-space:nowrap; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; justify-content:center; text-align:center; cursor:pointer; background:var(--MenuActive); color:var(--TextActive); border:3px solid var(--MenuStroke); border-radius:6px; box-shadow:0 3px 4.5px rgba(0,0,0,.65); line-height:1.1; overflow:hidden; }
.btn.on { background:var(--Selected); border-color:var(--Selected); box-shadow:none; }
.btn.off-air { background:var(--MenuActive); }
.btn.dis { background:var(--MenuInactive); color:var(--TextInactive); cursor:default; box-shadow:none; }
.btn.not-present { background:var(--NotPresent); }
.btn-src { width:68px; height:40px; font-size:13px; padding:0 3px; }              /* toggleRadioButtonSmallStyle */
.btn-src.blank { visibility:hidden; }
.btn-me { width:54.4px; height:49px; border-radius:0; font-size:13px; margin-top:4px; }  /* toggleRadioButtonSmallME* */
.btn-me.top { border-radius:12px 12px 0 0; } .btn-me.bottom { border-radius:0 0 12px 12px; }
.btn-trans { width:69px; height:62px; font-size:13px; } .btn-trans.left { border-radius:6px 0 0 6px; } .btn-trans.right { border-radius:0 6px 6px 0; } .btn-trans.mid { border-radius:0; }
.btn-plain { height:40px; padding:0 12px; font-size:13px; }                       /* buttonStyle */
.btn-src.rleft { border-radius:6px 0 0 6px; } .btn-src.rright { border-radius:0 6px 6px 0; }   /* radioButtonLeft/RightStyle */
/* Parameter group (mmsParameterGroupStyle): 13 px title, 14 px fields, 6 px radius */
.pgroup { position:relative; width:75px; height:55px; border:3px solid var(--MenuStroke); border-radius:6px; background:var(--MenuActive); box-shadow:0 3px 4.5px rgba(0,0,0,.65); cursor:pointer; padding:2px 4px; display:flex; flex-direction:column; justify-content:center; overflow:hidden; }
.pgroup .t { font-size:13px; color:var(--TextActive); text-align:center; white-space:normal; overflow:hidden; line-height:1.05; }   /* Button_Label: TextAlignment Center */
.pgroup .f { font-size:14px; color:var(--TextActive); text-align:right; white-space:normal; overflow:hidden; line-height:1.05; word-break:break-word; }   /* field/value: TextAlignment Right, Wrap */
.pgroup .f.dim { color:var(--TextInactive); }
.pgroup.left .t, .pgroup.left .f { text-align:left; }   /* ME_Trans status boxes: left-aligned lines */
.btn.two { white-space:pre-line; }
.pgroup.on { border-color:var(--Selected); background:var(--Selected); box-shadow:none; }
.pgroup.dis { background:var(--MenuInactive); cursor:default; } .pgroup.dis .t, .pgroup.dis .f { color:var(--TextInactive); }
.pgroup.aux { width:90px; height:62px; }
/* Jeweled toggle (mmsJeweledToggleStyle): outer jewel strip 15 px, inner black plate, 50 min height */
.jewel { position:relative; display:inline-flex; align-items:center; height:50px; min-width:50px; border-radius:6px; background:var(--MenuStroke); box-shadow:0 3px 4.5px rgba(0,0,0,.65); cursor:pointer; }
.jewel .plate { position:absolute; left:15px; top:3px; right:3px; bottom:3px; border-radius:3px; background:var(--MenuActive); }
.jewel .txt { position:relative; margin:0 2px 0 15px; padding:0 4px; width:calc(100% - 17px); text-align:center; font-size:14px; color:var(--TextActive); }
.jewel.on { background:linear-gradient(to bottom, var(--ToggleOn) 0%, var(--ToggleHi) 50.4%, var(--ToggleOn) 100%); }
.jewel.dis .plate { background:var(--MenuInactive); } .jewel.dis .txt { color:var(--TextInactive); }
.jewel.unsaved .plate { background:var(--LightRed); }
.jewel.simple { height:50px; width:80px; }
/* Knob (swrKnobControlStyle): 97x110 bitmap, label 14 px on top, value in the window */
.knob { position:relative; width:97px; height:110px; background:url("assets/swr_knob.png") no-repeat; cursor:pointer; }
.knob .l { position:absolute; left:0; top:0; width:97px; text-align:center; font-size:14px; }
.knob .v { position:absolute; left:25px; bottom:28px; height:20px; width:60px; font-size:14px; }
.knob.off { filter:grayscale(1) brightness(.7); }
/* Text box (swrTextBoxStyle-ish) */
.tbox { position:absolute; background:var(--TextField); border:1px solid var(--MenuStroke); border-radius:3px; color:var(--TextActive); display:flex; align-items:center; justify-content:center; }
/* Tabs (swrTabItemStyle): 105x51 bitmaps */
.tabs { position:absolute; left:10px; top:0; height:45px; display:flex; gap:6px; }
/* Real-menu tabs hang BELOW their panel (screenshots 2026-09-08): rounded bottom corners, drawn in CSS instead of the top-tab bitmaps */
.tab { min-width:105px; height:45px; padding:0 10px; border:2px solid #1c4a47; border-top:0; border-radius:0 0 10px 10px; background:var(--SWRPanel); color:var(--TextInactive); font-size:13px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.tab.on { border-color:#3f8f88; color:var(--TextActive); }
.tabpanel { position:absolute; left:0; top:0; }
.tabpanel::before { content:""; position:absolute; inset:0; border:15px solid transparent; border-right-width:20px; border-bottom-width:20px; border-image:url("assets/swr_panel.png") 20 20 10 10 fill stretch; pointer-events:none; }
/* Aux bus rows */
.auxrow { display:flex; align-items:center; height:66px; padding:2px; }
.auxrow .jewel { width:70px; margin:2px 2px 2px 8px; }
.auxrow .lbl { width:24px; margin:2px; font-size:14px; text-align:center; }
.auxrow .pgroup { margin:2px; }
.auxrow.hidden { display:none; }
.corner { position:absolute; width:8px; height:8px; border:2px solid var(--Bracket); }

/* Lab source-readback progress; independent of unavailable editing knobs. */
.source-loading { color:#b9cdd8; font:12px/1.4 sans-serif; white-space:pre-line; }
.source-loading[hidden] { display:none; }
.source-loading progress { width:88px; height:8px; margin-top:8px; accent-color:#59c7d5; }
