:root {
  --ink: #050b13;
  --navy: #071423;
  --panel: #0b1b2d;
  --panel-2: #10263d;
  --line: #274761;
  --line-bright: #3a6c91;
  --text: #f5f9ff;
  --muted: #91abc1;
  --sky: #48bfff;
  --blue: #236acb;
  --green: #37d889;
  --amber: #ffcf27;
  --red: #ff5a63;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

html { background: var(--ink); }

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 75% -10%, rgba(30, 91, 139, .4), transparent 35%),
    linear-gradient(145deg, #07111e, #03070c 72%);
}

button,
input,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

.workstation-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100vh;
}

.workstation-header {
  display: grid;
  grid-template-columns: 190px minmax(250px, .8fr) minmax(660px, 1.4fr);
  align-items: center;
  gap: 22px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 15, 26, .96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

.brand {
  display: block;
  padding-right: 20px;
  border-right: 1px solid var(--line);
  color: var(--sky);
  text-decoration: none;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
}

.brand img {
  display: block;
  width: 155px;
  max-width: 100%;
  margin-bottom: 7px;
}

.title-block .eyebrow,
.connection-copy small,
.publisher-field span,
.tool-group > span,
.control-card header small,
.select-field > span,
.command-status > span {
  color: var(--sky);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.title-block h1 {
  margin: 4px 0 3px;
  font-size: clamp(22px, 2vw, 31px);
  line-height: 1;
}

.title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.connection-cluster {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, .9fr) auto auto;
  align-items: end;
  gap: 9px;
}

.connection-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
  min-width: 0;
  padding-bottom: 3px;
}

.connection-copy strong { font-size: 12px; }

.connection-copy small {
  grid-column: 2;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #687789;
  box-shadow: 0 0 0 4px rgba(104, 119, 137, .16);
}

.status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 14px var(--green), 0 0 0 4px rgba(55, 216, 137, .14);
}

.publisher-field { display: block; }

.publisher-field span,
.select-field > span {
  display: block;
  margin-bottom: 5px;
  color: #bdd1e3;
  letter-spacing: 1px;
}

.publisher-field input,
.select-field select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #31536e;
  border-radius: 4px;
  outline: none;
  color: #fff;
  background: #030b13;
}

.publisher-field input:focus,
.select-field select:focus { border-color: var(--sky); }

.connect-button,
.program-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #4983ad;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(#2478b9, #155282);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.output-override-group {
  border-left: 1px solid #294761;
  position: relative;
}

.output-control-menu > summary { min-width: 145px; }

.output-control-panel {
  position: absolute;
  z-index: 130;
  top: calc(100% + 13px);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #3b769e;
  border-radius: 5px;
  background: #071522;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .58);
}

.output-control-panel {
  left: 0;
  width: min(360px, calc(100vw - 24px));
}

.output-control-panel > header {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid #294b65;
}

.output-control-panel > header strong {
  color: #f3f9ff;
  font-size: 11px;
  letter-spacing: .8px;
}

.output-control-panel > header small {
  color: #8caabd;
  font-size: 8px;
  line-height: 1.4;
}

.output-layout-control {
  display: grid;
  gap: 3px;
  min-width: 132px;
}

.output-layout-control > span {
  color: #83a6bf;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.output-layout-control select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #315b79;
  border-radius: 3px;
  color: #eef8ff;
  background: #071522;
  font-size: 9px;
  font-weight: 850;
}

.media-position-control input[type="range"] {
  width: 100%;
  accent-color: var(--sky);
}

.media-position-control output { color: #fff; }

.broadcast-apply-button {
  display: grid !important;
  width: 100%;
  min-height: 44px;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid #3b6583 !important;
  border-radius: 4px;
  color: #bdd5e7 !important;
  background: linear-gradient(180deg, #17334a, #0c2031) !important;
  text-align: left;
  cursor: pointer;
}

.broadcast-apply-button strong {
  font-size: 10px;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.broadcast-apply-button small {
  color: #89a9bf;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.broadcast-apply-button.staged {
  border-color: #55d990 !important;
  color: #f2fff8 !important;
  background: linear-gradient(180deg, #167146, #0a482c) !important;
  box-shadow: 0 0 16px rgba(66, 225, 137, .34);
}

.broadcast-apply-button:disabled {
  cursor: not-allowed;
  filter: saturate(.55);
  opacity: .58;
}

.broadcast-override-button {
  display: grid !important;
  width: 100%;
  min-height: 48px;
  gap: 2px;
  padding: 8px 11px;
  border-style: solid;
  border-width: 1px;
  border-radius: 4px;
  border-color: #cc9d25 !important;
  color: #fff7cf !important;
  background: linear-gradient(180deg, #795913, #4a3307) !important;
  text-align: left;
  cursor: pointer;
}

.broadcast-override-button strong {
  font-size: 10px;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.broadcast-override-button small {
  color: #e8cd78;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.broadcast-override-button.override-active {
  border-color: #ff6b72 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #b72a35, #72141d) !important;
  box-shadow: 0 0 18px rgba(255, 67, 79, .38), inset 0 0 0 1px rgba(255, 255, 255, .14) !important;
}

.broadcast-override-button.override-active small { color: #ffd8da; }

.broadcast-override-button.override-unavailable {
  border-color: #53687a !important;
  color: #aebdca !important;
  background: #142231 !important;
}

.program-button {
  border-color: #b89017;
  color: #fff8d2;
  background: linear-gradient(#766017, #4b3b0b);
}

.tool-ribbon {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 70px;
  border-bottom: 1px solid #2d5371;
  background: linear-gradient(180deg, #102540, #0a1728);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .28);
  z-index: 30;
  overflow: visible;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-right: 1px solid #294761;
}

.tool-group > span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #6f91ad;
  letter-spacing: 1px;
}

.tool-group > button,
.ribbon-dropdown > summary,
.mission-link {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #2d587b;
  border-radius: 3px;
  color: #dcecff;
  background: #0d2035;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .25px;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.tool-group > button:hover,
.tool-group > button:focus-visible,
.tool-group > button.active,
.tool-group > button[aria-pressed="true"],
.ribbon-dropdown > summary:hover,
.ribbon-dropdown > summary:focus-visible,
.ribbon-dropdown[open] > summary {
  border-color: #78c9ff;
  color: #fff;
  background: linear-gradient(#2378bc, #175084);
  box-shadow: inset 0 -3px var(--sky);
}

.tool-group > button.drawing-active {
  border-color: var(--amber);
  color: #fff7c7;
  background: #6d5711;
  box-shadow: inset 0 -3px var(--amber);
}

.drawing-tools { position: relative; }

.drawing-tools .analyze-icon,
.analysis-symbol-menu > summary {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #2d587b;
  border-radius: 3px;
  color: #e8f5ff;
  background: #0d2035;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.analysis-symbol-menu { position: relative; }
.analysis-symbol-menu > summary::-webkit-details-marker { display: none; }
.analysis-symbol-menu[open] > summary,
.analysis-symbol-menu > summary:hover,
.analysis-symbol-menu > summary:focus-visible {
  border-color: #78c9ff;
  background: linear-gradient(#2378bc, #175084);
  box-shadow: inset 0 -3px var(--sky);
}

.analysis-symbol-grid {
  position: absolute;
  z-index: 120;
  top: calc(100% + 12px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 7px;
  width: 330px;
  padding: 10px;
  border: 1px solid #3b769e;
  border-radius: 5px;
  background: #071522;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .58);
  transform: translateX(-50%);
}

.analysis-symbol-grid button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid #315b79;
  border-radius: 3px;
  color: #dcecff;
  background: #0d2035;
  text-align: left;
  cursor: pointer;
}

.analysis-symbol-grid button:hover,
.analysis-symbol-grid button:focus-visible,
.analysis-symbol-grid button.drawing-active {
  border-color: #78c9ff;
  background: #174f7a;
}

.analysis-symbol-grid b { font-size: 24px; text-align: center; }
.analysis-symbol-grid span { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.met-high, .met-warm { color: #ef3340; }
.met-low, .met-cold { color: #397dff; }
.met-occluded, .met-stationary { color: #b86ce3; }
.met-dry { color: #e39a43; }
.met-jet { color: #5cd2ff; }

.tool-ribbon .danger-tool { color: #ffb5b9; }

.layer-menu-group { position: relative; }

.ribbon-dropdown { position: relative; }

.ribbon-dropdown > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 160px;
  list-style: none;
  text-transform: uppercase;
}

.ribbon-dropdown > summary::-webkit-details-marker { display: none; }

.ribbon-dropdown > summary::after {
  content: "\25BE";
  margin-left: auto;
  color: var(--sky);
  font-size: 11px;
}

.ribbon-dropdown[open] > summary::after { transform: rotate(180deg); }

.ribbon-dropdown > summary small {
  color: #80cffa;
  font-size: 7px;
  letter-spacing: .6px;
}

.ribbon-dropdown > .map-data-layer-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 13px);
  left: 0;
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 185px);
  margin: 0;
  overflow-y: auto;
  border-color: #3b769e;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .58);
  scrollbar-color: #365f7d #07121f;
}

.ribbon-dropdown > .map-data-layer-panel > header { display: none; }

.ribbon-dropdown > .map-data-layer-panel .switch-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mission-link {
  display: flex;
  align-items: center;
  margin: 12px 14px 12px auto;
}

.workstation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  min-height: 0;
  padding: 12px;
  gap: 12px;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto auto auto;
  align-self: start;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #37617f;
  border-radius: 6px;
  background: #02070d;
  box-shadow: 0 15px 45px rgba(0, 0, 0, .5);
}

.preview-heading,
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 13px;
  border-bottom: 1px solid #274761;
  background: #081626;
}

.preview-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-flag {
  padding: 4px 7px;
  border-radius: 3px;
  color: #06100b;
  background: var(--green);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1px;
}

.preview-heading strong,
.preview-heading output {
  color: #dff3ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.preview-frame-wrap {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1616 / 906;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.preview-frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 1616px;
  height: 906px;
  border: 0;
  transform-origin: top left;
  will-change: transform;
}

.preview-frame-wrap.preview-radar-pip iframe {
  z-index: 8;
  box-sizing: border-box;
  border: 9px solid #fff;
  border-radius: 15px;
  box-shadow: 0 28px 78px rgba(0, 0, 0, .58);
}

.output-framing-guide {
  position: absolute;
  inset: 0;
  --output-pip-inset-x: 2%;
  --output-pip-inset-y: 2%;
  --output-pip-width: 45%;
  --output-pip-height: 45.151%;
  z-index: 7;
  display: none;
  pointer-events: none;
}

.output-framing-guide.visible { display: flex; }

.output-framing-radar,
.output-framing-media {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.output-framing-radar {
  flex: 0 0 66.6667%;
  border-right: 4px solid rgba(255, 255, 255, .96);
  box-shadow: inset 0 0 0 2px rgba(78, 198, 255, .75);
}

.output-framing-media {
  flex: 1 1 auto;
  background: #071421;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36);
}

.output-framing-media > img,
.output-framing-media > video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: #071421;
  object-fit: cover;
  object-position: var(--media-position-x, 50%) center;
  pointer-events: none;
}

.output-framing-media > .output-framing-sponsor {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  left: auto;
  display: block;
  width: min(25%, 96px);
  height: auto;
  max-height: 22%;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 7px 16px rgba(0, 0, 0, .42));
}

.output-framing-media > .output-framing-sponsor[hidden] { display: none; }

.output-framing-media.media-image > img,
.output-framing-media.media-video > video { display: block; }

.output-framing-media::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(2, 8, 14, .12), transparent 35%);
}

.output-framing-radar > span,
.output-framing-media > strong {
  position: absolute;
  z-index: 2;
  top: 18px;
  padding: 8px 11px;
  border: 1px solid rgba(180, 225, 255, .65);
  color: #fff;
  background: rgba(4, 14, 24, .86);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .35);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.output-framing-radar > span { left: 18px; }
.output-framing-media > strong { left: 18px; max-width: calc(70% - 36px); }
.output-framing-guide.radar-half .output-framing-radar { flex-basis: 50%; }
.output-framing-guide.radar-one-third .output-framing-radar { flex-basis: 33.3333%; }
.output-framing-guide.layout-webcam .output-framing-radar { display: none; }
.output-framing-guide.layout-webcam .output-framing-media { flex-basis: 100%; }
.output-framing-guide.layout-pip.pip-media .output-framing-radar {
  flex-basis: 100%;
  border-right: 0;
}
.output-framing-guide.layout-pip.pip-media .output-framing-media,
.output-framing-guide.layout-pip.pip-radar .output-framing-radar {
  position: absolute;
  width: var(--output-pip-width);
  height: var(--output-pip-height);
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  border: 4px solid #fff;
  border-radius: 5px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .55);
}
.output-framing-guide.layout-pip.pip-radar .output-framing-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.output-framing-guide.layout-pip.pip-radar .output-framing-radar {
  display: none;
}
.output-framing-guide.layout-pip.pip-media.pip-top-left .output-framing-media,
.output-framing-guide.layout-pip.pip-radar.pip-top-left .output-framing-radar { top: var(--output-pip-inset-y); left: var(--output-pip-inset-x); }
.output-framing-guide.layout-pip.pip-media.pip-top-right .output-framing-media,
.output-framing-guide.layout-pip.pip-radar.pip-top-right .output-framing-radar { top: var(--output-pip-inset-y); right: var(--output-pip-inset-x); }
.output-framing-guide.layout-pip.pip-media.pip-bottom-left .output-framing-media,
.output-framing-guide.layout-pip.pip-radar.pip-bottom-left .output-framing-radar { bottom: var(--output-pip-inset-y); left: var(--output-pip-inset-x); }
.output-framing-guide.layout-pip.pip-media.pip-bottom-right .output-framing-media,
.output-framing-guide.layout-pip.pip-radar.pip-bottom-right .output-framing-radar { bottom: var(--output-pip-inset-y); right: var(--output-pip-inset-x); }
.output-framing-guide.layout-pip.pip-media .output-framing-media > img,
.output-framing-guide.layout-pip.pip-media .output-framing-media > video { object-fit: contain; }

.preview-corner-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 8px;
  border: 1px solid rgba(130, 183, 222, .55);
  border-radius: 3px;
  color: #c7deef;
  background: rgba(3, 10, 17, .78);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.2px;
  pointer-events: none;
}

.preview-nws-text-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #8ed8ff;
  border-radius: 4px;
  color: #06111d;
  background: linear-gradient(180deg, #dff5ff, #7bcfff);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 255, 255, .6);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.preview-nws-text-button:hover,
.preview-nws-text-button:focus-visible {
  outline: none;
  border-color: #fff;
  filter: brightness(1.1);
}

.preview-nws-text-button[hidden],
.nws-text-modal[hidden],
.nws-rewrite-result[hidden],
.nws-rewrite-result ul[hidden] { display: none !important; }

.nws-text-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 5, 10, .82);
  backdrop-filter: blur(5px);
}

.nws-text-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1240px, calc(100vw - 48px));
  height: min(840px, calc(100vh - 48px));
  max-height: min(840px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #5181a2;
  border-radius: 7px;
  background: #f4f1e8;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .72);
}

.nws-text-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  color: #fff;
  background: linear-gradient(115deg, #0a2135, #123c5d);
  border-bottom: 4px solid var(--sky);
}

.nws-text-heading > div { min-width: 0; }

.nws-text-heading span,
.nws-text-heading small {
  display: block;
  color: #a8dfff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.nws-text-heading strong {
  display: block;
  overflow: hidden;
  margin: 4px 0;
  font-size: 23px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nws-text-heading small {
  overflow: hidden;
  color: #c7dceb;
  letter-spacing: .55px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nws-text-heading button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .2);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.nws-text-body {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  min-height: 0;
  overflow: hidden;
}

.nws-official-panel,
.nws-rewrite-panel {
  min-width: 0;
  min-height: 0;
}

.nws-official-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #9ba7ac;
}

.nws-text-section-heading {
  display: grid;
  gap: 2px;
  padding: 11px 16px 9px;
  border-bottom: 1px solid #aab5ba;
  color: #1b3346;
  background: #dce5e8;
  text-transform: uppercase;
}

.nws-text-section-heading span,
.nws-text-section-heading small {
  color: #537187;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1.15px;
}

.nws-text-section-heading strong {
  font-size: 15px;
  line-height: 1.05;
}

.nws-official-panel pre {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 22px 26px 28px;
  color: #101418;
  background:
    linear-gradient(rgba(10, 33, 53, .04) 1px, transparent 1px),
    #f4f1e8;
  background-size: 100% 24px;
  font-family: "Courier New", Courier, ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.42;
  tab-size: 8;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.nws-rewrite-panel {
  overflow-y: auto;
  color: #eaf6ff;
  background:
    radial-gradient(circle at 100% 0, rgba(54, 178, 237, .18), transparent 38%),
    #071523;
}

.nws-rewrite-heading {
  border-color: #2b5d7f;
  color: #fff;
  background: #0c263a;
}

.nws-rewrite-heading span { color: #70d4ff; }
.nws-rewrite-heading small { color: #ffce5b; }

.nws-rewrite-controls {
  display: grid;
  gap: 12px;
  padding: 16px 18px 8px;
}

.nws-rewrite-controls fieldset {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.nws-rewrite-controls legend {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 7px;
  color: #8baec5;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1.1px;
}

.nws-rewrite-controls input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.nws-rewrite-controls label {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 7px 5px;
  border: 1px solid #315b79;
  border-radius: 4px;
  color: #bcd3e3;
  background: #0b1f30;
  cursor: pointer;
  text-transform: uppercase;
}

.nws-rewrite-controls label strong { font-size: 10px; }
.nws-rewrite-controls label small { color: #7fa4bd; font-size: 8px; font-weight: 900; }

.nws-rewrite-controls input:focus-visible + label {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nws-rewrite-controls input:checked + label {
  border-color: #75d8ff;
  color: #05111c;
  background: linear-gradient(180deg, #c9f0ff, #65c8f1);
  box-shadow: 0 0 16px rgba(61, 193, 245, .28);
}

.nws-rewrite-controls input:checked + label small { color: #193a50; }

.nws-rewrite-generate,
.nws-rewrite-result button {
  min-height: 42px;
  border: 1px solid #f5c84b;
  border-radius: 4px;
  color: #171000;
  background: linear-gradient(180deg, #ffe98e, #f2bb28);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .85px;
  text-transform: uppercase;
  cursor: pointer;
}

.nws-rewrite-generate:hover,
.nws-rewrite-generate:focus-visible,
.nws-rewrite-result button:hover,
.nws-rewrite-result button:focus-visible {
  outline: none;
  border-color: #fff;
  filter: brightness(1.08);
}

.nws-rewrite-status {
  min-height: 34px;
  margin: 0;
  padding: 2px 18px 12px;
  color: #9eb9cb;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.nws-rewrite-status[data-state="working"] { color: #ffe07a; }
.nws-rewrite-status[data-state="error"] { color: #ff9393; }
.nws-rewrite-status[data-state="ready"] { color: #92e7ae; }

.nws-rewrite-result {
  margin: 0 18px 14px;
  overflow: hidden;
  border: 1px solid #4a83a8;
  border-radius: 5px;
  color: #eef9ff;
  background: rgba(4, 15, 24, .88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}

.nws-rewrite-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #315c78;
  color: #ffdc67;
  background: #0e2b40;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.nws-rewrite-result-heading strong { color: #9fe4ff; }

.nws-rewrite-result > p {
  margin: 0;
  padding: 16px 16px 13px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.38;
}

.nws-rewrite-result ul {
  margin: 0 16px 13px;
  padding: 10px 12px 10px 26px;
  border-left: 4px solid #f1bc28;
  color: #ffe79a;
  background: rgba(241, 188, 40, .09);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.nws-rewrite-result button {
  width: calc(100% - 32px);
  min-height: 34px;
  margin: 0 16px 16px;
  border-color: #70c9ef;
  color: #eaf8ff;
  background: #123c57;
}

.nws-rewrite-safety {
  margin: 0;
  padding: 0 18px 18px;
  color: #7997aa;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.nws-text-window > footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid #9ba7ac;
  color: #203545;
  background: #dce5e8;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.preview-footer {
  border-top: 1px solid #274761;
  border-bottom: 0;
  color: #8ca8bd;
  font-size: 10px;
}

.preview-footer span:first-child { color: #d5e7f4; }

.inspector {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #365f7d #07121f;
}

.control-card,
.command-status {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(16, 39, 62, .97), rgba(7, 19, 32, .98));
  box-shadow: 0 9px 28px rgba(0, 0, 0, .24);
}

.control-card header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.control-card header > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #3c6b8c;
  border-radius: 50%;
  color: var(--sky);
  font-size: 10px;
  font-weight: 900;
}

.control-card header h2 {
  margin: 2px 0 0;
  font-size: 16px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.segmented.three-up { grid-template-columns: repeat(3, 1fr); }

.radar-source-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.radar-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.radar-products button[data-product-unavailable] {
  border-style: dashed;
  color: #8398aa;
  background: #09131e;
}

.product-source-note {
  display: block;
  margin-top: 7px;
  color: #7f9bb0;
  font-size: 8px;
  line-height: 1.35;
}

.broadcast-radar-loop {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #315b7a;
  border-radius: 5px;
  background: #071522;
}

.broadcast-radar-loop-heading,
.broadcast-radar-loop-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #8eabc0;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .65px;
}

.broadcast-radar-loop-heading strong {
  color: #d9f0ff;
  text-align: right;
}

.broadcast-radar-transport {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.broadcast-radar-transport button {
  min-height: 34px;
  padding: 5px 3px;
  border: 1px solid #315b7a;
  border-radius: 4px;
  color: #d8e9f6;
  background: #0a1b2c;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.broadcast-radar-transport button.playing {
  border-color: #43d38b;
  background: #175d42;
}

.broadcast-radar-loop button:disabled,
.broadcast-radar-loop input:disabled,
.broadcast-radar-loop select:disabled {
  opacity: .42;
  cursor: not-allowed;
}

#radarAnimationTimeline {
  width: 100%;
  margin: 0;
  accent-color: var(--sky);
}

.broadcast-radar-loop-options label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.broadcast-radar-loop-options select {
  min-height: 28px;
  border: 1px solid #315b7a;
  border-radius: 4px;
  color: #d8e9f6;
  background: #0a1b2c;
  font-size: 8px;
  font-weight: 850;
}

.broadcast-radar-loop-options time {
  overflow: hidden;
  max-width: 45%;
  color: #d9f0ff;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented button {
  min-height: 39px;
  padding: 7px;
  border: 1px solid #315b7a;
  border-radius: 4px;
  color: #d8e9f6;
  background: #0a1b2c;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.segmented button:hover,
.segmented button.active {
  border-color: var(--sky);
  color: #fff;
  background: #185887;
  box-shadow: inset 0 -2px var(--sky);
}

.select-field {
  display: block;
  margin: 12px 0;
}

.switch-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.switch-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #284b65;
  border-radius: 4px;
  color: #d0e2ef;
  background: #071522;
  font-size: 10px;
  font-weight: 750;
}

.switch-list input {
  width: 17px;
  height: 17px;
  accent-color: var(--sky);
}

.warning-type-control {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid #315d7b;
  border-radius: 4px;
  background: #071522;
}

.warning-type-control > summary {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 8px 10px;
  color: #e3f3ff;
  font-size: 10px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.warning-type-control > summary::-webkit-details-marker { display: none; }

.warning-type-control > summary::before {
  content: ">";
  margin-right: 8px;
  color: var(--amber);
  transition: transform .15s ease;
}

.warning-type-control[open] > summary::before { transform: rotate(90deg); }

.warning-type-control > summary small {
  margin-left: auto;
  color: #8ed5ff;
  font-size: 7px;
  letter-spacing: .7px;
}

.warning-type-control-body {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-top: 1px solid #294e68;
  background: #050f19;
}

.warning-master-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #355f7b;
  border-radius: 4px;
  color: #ffffff;
  background: #0d2940;
  font-size: 9px;
  font-weight: 900;
}

.warning-master-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--amber);
}

.warning-filter-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.warning-filter-action-row button {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #3a6786;
  border-radius: 3px;
  color: #e2f1fb;
  background: #0b263b;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.warning-type-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.warning-type-group {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid #203f55;
  border-radius: 4px;
  background: #081a29;
}

.warning-type-group legend {
  padding: 0 5px;
  color: var(--sky);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.warning-type-group label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 4px 2px;
  color: #c9dce9;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.25;
}

.warning-type-group input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--amber);
}

.label-density-control {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #274b65;
  border-radius: 4px;
  background: #071522;
}

.label-density-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a9c3d5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .65px;
}

.label-density-heading output {
  color: #ffffff;
  font-size: 9px;
}

.label-density-control input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--sky);
  cursor: pointer;
}

.label-density-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  color: #66869d;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
}

.label-density-scale span:first-child { text-align: left; }
.label-density-scale span:last-child { text-align: right; }

.impact-filter-controls {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.impact-filter-control {
  overflow: hidden;
  border: 1px solid #284b65;
  border-radius: 4px;
  background: #06121e;
}

.impact-filter-control > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  color: #d6e9f6;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .65px;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.impact-filter-control > summary::-webkit-details-marker { display: none; }

.impact-filter-control > summary::before {
  content: ">";
  color: var(--sky);
  transition: transform .15s ease;
}

.impact-filter-control[open] > summary::before { transform: rotate(90deg); }

.impact-filter-control > summary small {
  margin-left: auto;
  color: #75c8f5;
  font-size: 7px;
}

.impact-filter-control-body {
  display: grid;
  gap: 7px;
  padding: 8px;
  border-top: 1px solid #213e53;
}

.impact-filter-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.impact-filter-action-row button {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #315b7a;
  border-radius: 3px;
  color: #d8e9f6;
  background: #0a2135;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.impact-filter-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.impact-filter-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 7px;
  border: 1px solid #203e54;
  border-radius: 3px;
  color: #c6dbe9;
  background: #091a29;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
}

.impact-filter-checks input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--sky);
}

.impact-severity-select {
  display: grid;
  gap: 5px;
  color: #9fb7c9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.impact-severity-select select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #31536e;
  border-radius: 3px;
  color: #fff;
  background: #030b13;
  font-size: 9px;
  text-transform: none;
}

.annotation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.analysis-text-field {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  color: #bdd1e3;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.analysis-text-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #31536e;
  border-radius: 4px;
  outline: none;
  color: #fff;
  background: #030b13;
  text-transform: none;
}

.analysis-text-field input:focus { border-color: var(--sky); }

.analysis-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 11px 0;
}

.analysis-style-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #294b65;
  border-radius: 4px;
  background: #071522;
}

.analysis-style-grid .analysis-style-wide { grid-column: 1 / -1; }

.analysis-style-grid span,
.analysis-publish-toggle strong {
  color: #b9d0e0;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .7px;
}

.analysis-style-grid input[type="color"] {
  width: 100%;
  height: 28px;
  padding: 2px;
  border: 1px solid #446b85;
  border-radius: 3px;
  background: #02080e;
}

.analysis-style-grid input[type="range"] { width: 100%; accent-color: var(--sky); }

.analysis-publish-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  padding: 10px;
  border: 1px solid #356282;
  border-radius: 4px;
  background: #0a1c2c;
}

.analysis-publish-toggle input { width: 18px; height: 18px; accent-color: var(--green); }
.analysis-publish-toggle span { display: grid; gap: 3px; }
.analysis-publish-toggle small { color: #819db1; font-size: 8px; line-height: 1.3; }

.publish-staged-button {
  width: 100%;
  min-height: 39px;
  margin-bottom: 10px;
  border: 1px solid #50d38c;
  border-radius: 4px;
  color: #04150c;
  background: linear-gradient(#7aefad, #37c779);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
}

.publish-staged-button span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 7px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #071522;
}

.publish-staged-button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .48; }

.social-static-card p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.social-static-build-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.social-static-build-actions button,
.social-static-export-actions button,
.social-static-export-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 37px;
  padding: 7px 9px;
  border: 1px solid #3c7195;
  border-radius: 4px;
  color: #e6f5ff;
  background: linear-gradient(#174d74, #0d304c);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.social-static-build-actions button:hover,
.social-static-export-actions button:hover,
.social-static-export-actions a:hover {
  border-color: var(--sky);
  color: #fff;
}

.social-static-preview {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid #315b7a;
  border-radius: 5px;
  background: #02080e;
}

.social-static-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #02070c;
}

.social-static-preview-meta {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-top: 1px solid #284b65;
}

.social-static-preview-meta strong {
  color: #f0f8ff;
  font-size: 10px;
  letter-spacing: .35px;
}

.social-static-preview-meta small {
  color: #8fb0c7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .45px;
}

.social-static-export-actions {
  display: grid;
  grid-template-columns: 1.35fr 1fr auto;
  gap: 5px;
  padding: 0 9px 9px;
}

.social-static-export-actions #exportSocialStaticMap {
  border-color: #279c68;
  color: #e9fff4;
  background: linear-gradient(#16865a, #0d5238);
}

.social-static-export-actions .quiet {
  border-color: #40586a;
  color: #a9bdcb;
  background: #0a1722;
}

.social-static-export-actions a[aria-disabled="true"] {
  opacity: .42;
  pointer-events: none;
}

.social-static-status {
  display: block;
  margin-top: 9px;
  padding: 8px 9px;
  border-left: 3px solid #49728f;
  color: #9eb8ca;
  background: rgba(4, 15, 25, .72);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .65px;
  line-height: 1.35;
}

.social-static-status[data-state="working"] {
  border-left-color: var(--sky);
  color: #dff4ff;
}

.social-static-status[data-state="ready"] {
  border-left-color: var(--green);
  color: #cffff0;
}

.social-static-status[data-state="error"] {
  border-left-color: var(--red);
  color: #ffd5d8;
}

.annotation-status {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #c6d9e8;
  font-size: 10px;
}

.annotation-status strong {
  color: var(--amber);
  font-size: 24px;
}

.command-status {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--sky);
}

.command-status strong { font-size: 12px; }
.command-status small { color: var(--muted); font-size: 9px; line-height: 1.35; }

button:disabled,
select:disabled,
input:disabled {
  opacity: .42;
  cursor: not-allowed;
}

@media (max-width: 1380px) {
  .workstation-header { grid-template-columns: 150px minmax(210px, .7fr) minmax(570px, 1.4fr); }
  .brand img { width: 130px; }
  .workstation-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .tool-group > button,
  .ribbon-dropdown > summary { padding-inline: 9px; }
}

@media (max-width: 1120px) {
  .workstation-header { grid-template-columns: 150px 1fr; }
  .connection-cluster { grid-column: 1 / -1; }
  .workstation-shell { min-height: 100vh; height: auto; }
  .workstation-grid { grid-template-columns: 1fr; }
  .preview-frame-wrap { height: auto; }
  .inspector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; overflow: visible; }
  .control-card, .command-status { margin: 0; }
  .tool-ribbon { overflow-x: auto; overflow-y: visible; }
  .ribbon-dropdown > .map-data-layer-panel { width: min(660px, calc(100vw - 18px)); }
}

@media (max-width: 900px) {
  .nws-text-body {
    display: block;
    overflow-y: auto;
  }
  .nws-official-panel {
    display: block;
    border-right: 0;
    border-bottom: 1px solid #9ba7ac;
  }
  .nws-official-panel pre {
    height: auto;
    min-height: 300px;
    max-height: 50vh;
  }
  .nws-rewrite-panel { overflow: visible; }
}

@media (max-width: 720px) {
  .workstation-header { grid-template-columns: 1fr; }
  .brand { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
  .connection-cluster { grid-template-columns: 1fr 1fr; }
  .connection-copy { grid-column: 1 / -1; }
  .workstation-grid { padding: 7px; }
  .inspector { grid-template-columns: 1fr; }
  .preview-heading, .preview-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ribbon-dropdown > .map-data-layer-panel .switch-list,
  .warning-type-filters { grid-template-columns: 1fr; }
  .nws-text-modal { padding: 8px; }
  .nws-text-window {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  .nws-text-heading strong { font-size: 18px; }
  .nws-text-window > footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}
