/* =========================================================================
   pod.css — the pod's own panels: the kW trend, missions, the inspector,
   and the console's colours. Loaded after style.css; scrollbars stay
   hidden everywhere, as on the rest of the site.
   ========================================================================= */

/* ---------------------------------------------------------------- console */
#state-data .srow .v.hot {
  color: #c62f3b;
  font-weight: 700;
}
#state-data .srow .v.warn {
  color: #b86206;
  font-weight: 700;
}
#state-data .srow .v.good {
  color: #1a7f37;
}
#state-data .srow {
  font-size: 11.5px;
  margin-bottom: 4px;
}
#state-data .state-section {
  margin-bottom: 12px;
}
#state-data .sec-alarm .state-section-title {
  color: #c62f3b;
  font-weight: 700;
}
#state-data .srow.alarm span:first-child b {
  display: inline-block;
  min-width: 20px;
  padding: 0 3px;
  margin-right: 4px;
  border-radius: 3px;
  font-size: 9.5px;
  text-align: center;
  color: #fff;
  background: #8a97a3;
}
#state-data .srow.alarm.p1 span:first-child b {
  background: #c62f3b;
}
#state-data .srow.alarm.p2 span:first-child b {
  background: #d97706;
}
#state-data .srow.alarm span.v {
  max-width: 62%;
}
#state-data .cellgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 4px;
}
#state-data .cell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 6px;
  border-radius: 5px;
  font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef6f0;
  color: #1a7f37;
}
#state-data .cell i {
  font-style: normal;
  font-weight: 500;
  color: #6a737d;
}
#state-data .cell.warn {
  background: #fdf3e3;
  color: #b86206;
}
#state-data .cell.hot {
  background: #fde7e9;
  color: #c62f3b;
}
#state-data .cell.dead {
  background: #f1f3f5;
  color: #8a97a3;
}
.state-empty {
  font-size: 12px;
  line-height: 1.5;
  color: #57606a;
}

/* ------------------------------------------------------------ trend panel */
#timebase.trend {
  width: 360px;
  padding: 9px 11px 10px;
}
#timebase.trend .tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #7d8b98;
}
#timebase.trend .tr-min {
  width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #fff;
  color: #6b7885;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#timebase.trend .tr-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 4px;
}
#timebase.trend .tr-kw {
  font-size: 22px;
  font-weight: 800;
  color: #c62f3b;
  letter-spacing: -0.02em;
}
#timebase.trend .tr-kw.dead {
  color: #8a97a3;
}
#timebase.trend .tr-sub {
  color: #57606a;
  font-size: 10.5px;
}
#timebase.trend .tr-chart {
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
}
#timebase.trend .tr-legend {
  display: flex;
  gap: 10px;
  margin: 4px 0 6px;
  color: #57606a;
  font-size: 9.5px;
}
#timebase.trend .tr-legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
#timebase.trend .tr-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
#timebase.trend .tr-btn {
  min-width: 26px;
  height: 21px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid rgba(110, 130, 150, 0.34);
  background: rgba(255, 255, 255, 0.75);
  color: #35424e;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
#timebase.trend .tr-btn:hover {
  background: #fff;
  border-color: rgba(50, 130, 184, 0.6);
}
#timebase.trend .tr-btn.on {
  background: #1f2a35;
  border-color: #1f2a35;
  color: #fff;
}
#timebase.trend .tr-sep {
  flex: 1;
}
#timebase.trend .tr-lab {
  color: #7d8b98;
}
#timebase.trend .tr-weather {
  flex: 1;
  height: 22px;
  border: 1px solid rgba(110, 130, 150, 0.34);
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 10px;
  color: #1f2a35;
}
#timebase.trend .tr-clock {
  min-width: 64px;
  text-align: right;
  color: #57606a;
}
body.trend-hidden #timebase {
  display: none;
}
#trend-tab {
  position: absolute;
  top: 58px;
  right: 0;
  z-index: 60;
  display: none;
  padding: 9px 9px 9px 11px;
  border: 1px solid var(--border-color);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -2px 2px 10px rgba(15, 25, 40, 0.1);
  cursor: pointer;
  user-select: none;
}
body.trend-hidden #trend-tab {
  display: flex;
}
#trend-tab span {
  writing-mode: vertical-rl;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #6b7885;
}

/* --------------------------------------------------------------- missions */
#missions {
  position: absolute;
  top: 44px;
  left: 12px;
  z-index: 6;
  width: 300px;
  max-height: calc(100% - 120px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 10px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 130, 150, 0.28);
  box-shadow: 0 6px 18px rgba(20, 30, 40, 0.1);
  font: 11.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #24292e;
}
#missions::-webkit-scrollbar {
  display: none;
}
#missions .ms-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #57606a;
}
#missions .ms-head b {
  color: #1f2a35;
}
#missions .ms-cur {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
  color: #1a7f37;
  font-weight: 600;
}
#missions .ms-tog {
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 12px;
  cursor: pointer;
  color: #57606a;
}
#missions .ms-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
}
#missions .ms-item {
  text-align: left;
  border: 1px solid transparent;
  background: rgba(240, 244, 248, 0.9);
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit;
  cursor: pointer;
  color: #24292e;
}
#missions .ms-item:hover {
  border-color: rgba(26, 154, 224, 0.5);
  background: #fff;
}
#missions .ms-item.done {
  color: #1a7f37;
}
#missions .ms-hint {
  margin-top: 8px;
  font-size: 10.5px;
  color: #7d8b98;
}
#missions .ms-brief {
  margin: 8px 0;
  line-height: 1.45;
  color: #3b4855;
}
#missions .ms-goal {
  display: flex;
  gap: 6px;
  padding: 3px 0;
  line-height: 1.35;
  color: #3b4855;
}
#missions .ms-goal i {
  font-style: normal;
  width: 14px;
  color: #8a97a3;
}
#missions .ms-goal em {
  font-style: normal;
  color: #b86206;
  font-weight: 700;
}
#missions .ms-goal.ok {
  color: #1a7f37;
}
#missions .ms-goal.ok i {
  color: #1a7f37;
  font-weight: 800;
}
#missions .ms-acts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
#missions .ms-acts button {
  border: 1px solid rgba(110, 130, 150, 0.34);
  background: #fff;
  border-radius: 6px;
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
#missions .ms-acts .ms-setup {
  background: #1f2a35;
  color: #fff;
  border-color: #1f2a35;
}
#missions .ms-acts .ms-next {
  background: #1a7f37;
  color: #fff;
  border-color: #1a7f37;
}
/* the HUD moves under the missions' top edge */
#hud {
  z-index: 7;
}

/* -------------------------------------------------------------- inspector */
.pod-inspector {
  position: fixed;
  z-index: 200;
  width: 320px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(110, 130, 150, 0.3);
  box-shadow: 0 12px 34px rgba(20, 30, 40, 0.22);
  font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #24292e;
}
.pod-inspector::-webkit-scrollbar {
  display: none;
}
.pod-inspector .ins-head {
  display: flex;
  gap: 6px;
}
.pod-inspector .ins-tag {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 2px 4px;
  font: 800 15px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #1f2a35;
  background: transparent;
}
.pod-inspector .ins-tag:hover,
.pod-inspector .ins-tag:focus {
  border-color: rgba(110, 130, 150, 0.4);
  background: #fff;
  outline: none;
}
.pod-inspector .ins-x {
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #6a737d;
}
.pod-inspector .ins-name {
  margin: 0 4px 8px;
  color: #57606a;
  font-size: 11.5px;
}
.pod-inspector .ins-read {
  border-top: 1px solid #eef1f4;
  padding-top: 6px;
}
.pod-inspector .ins-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}
.pod-inspector .ins-row span {
  color: #6a737d;
}
.pod-inspector .ins-row b {
  text-align: right;
  font: 700 11.5px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pod-inspector .ins-row b.hot {
  color: #c62f3b;
}
.pod-inspector .ins-row b.warn {
  color: #b86206;
}
.pod-inspector .ins-row b.good {
  color: #1a7f37;
}
.pod-inspector .ins-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0;
}
.pod-inspector .ins-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #f1f3f5;
  font: 600 10.5px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #57606a;
}
.pod-inspector .ins-pin i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4cdd6;
}
.pod-inspector .ins-pin.on i {
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}
.pod-inspector .ins-pin em {
  font-style: normal;
  font-weight: 500;
  color: #8a97a3;
}
.pod-inspector .ins-fields {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid #eef1f4;
}
.pod-inspector .ins-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pod-inspector .ins-field span {
  color: #3b4855;
}
.pod-inspector .ins-field em {
  font-style: normal;
  color: #8a97a3;
}
.pod-inspector .ins-field input,
.pod-inspector .ins-field select {
  width: 120px;
  height: 24px;
  border: 1px solid rgba(110, 130, 150, 0.4);
  border-radius: 5px;
  padding: 0 6px;
  font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fff;
}
.pod-inspector .ins-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0;
  border-top: 1px solid #eef1f4;
}
.pod-inspector .ins-acts button {
  border: 1px solid rgba(110, 130, 150, 0.34);
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.pod-inspector .ins-acts button:hover {
  border-color: #1a9ae0;
  color: #0b6aa0;
}
.pod-inspector .ins-info {
  padding-top: 8px;
  border-top: 1px solid #eef1f4;
  line-height: 1.5;
  color: #57606a;
  font-size: 11.5px;
}

.pod-inspector .ins-manual {
  margin-top: 8px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #0b6aa0;
  cursor: pointer;
}
.pod-inspector .ins-manual:hover {
  text-decoration: underline;
}

/* the pod field manual: show-on-board and mission links */
.wiki-onboard {
  margin: 4px 0 14px;
}
.wiki-showkind {
  border: 1px solid #1a9ae0;
  background: #eef8fe;
  color: #0b6aa0;
  border-radius: 6px;
  padding: 6px 12px;
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}
.wiki-showkind:hover {
  background: #1a9ae0;
  color: #fff;
}
.wiki-link.wiki-show::before {
  content: "◎ ";
  font-size: 0.85em;
}
.wiki-link.wiki-mission::before {
  content: "▶ ";
  font-size: 0.8em;
}

/* the toolbox gets more sections than it used to */
.inv-section {
  white-space: nowrap;
}

/* phones: the read-only viewer keeps the trend, drops the missions */
.phone #missions {
  display: none;
}
body.studio #missions {
  display: none;
}

/* assembly slots carry the pod's own badge */
.slot.assembly-slot::after {
  content: "KIT";
}

/* the pod switcher in the toolbar */
.tool-select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231f2a35'/%3E%3C/svg%3E") no-repeat right 11px center;
  -webkit-appearance: none;
  appearance: none;
  font-size: 13px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #24292e;
  cursor: pointer;
}
.tool-select:hover {
  border-color: #1a9ae0;
}
body.studio .tool-select {
  display: none;
}
