:root {
  color-scheme: light;
  --bg: #edf3f0;
  --panel: #f8faf8;
  --panel2: #e8f0ed;
  --scene: #dce9e6;
  --line: #cad8d2;
  --subline: #dbe5df;
  --ink: #263c43;
  --dim: #536b70;
  --muted: #637b7f;
  --blue: #3d6d89;
  --mint: #2e7664;
  --amber: #986829;
  --lilac: #7c668d;
  --font: Helvetica, sans-serif;
  font: 15px/1.4 var(--font);
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 290px;
  background: var(--panel);
  min-height: 100dvh;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
button:hover,
select:hover {
  border-color: var(--line);
  background-color: var(--panel2);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
a {
  color: var(--blue);
}
[hidden] {
  display: none !important;
}
.ico {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
}
.primary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}
.primary:hover {
  background: var(--panel);
}
.topbar,
main {
  max-width: 1850px;
  margin: 0 auto;
}
.topbar {
  padding: 0 21px;
  min-height: 57px;
  display: flex;
  align-items: center;
  gap: 17px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow:
    0 10px 30px #01070c28,
    inset 0 1px 0 #ffffff07;
}
.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1.2px;
  font-weight: 700;
  text-decoration: none;
}
.brand span {
  color: var(--blue);
}
.brand img {
  width: 29px;
  height: 30px;
  margin-right: 7px;
}
.partners {
  display: flex;
  gap: 11px;
  align-items: center;
  border-left: 1px solid var(--line);
  padding-left: 17px;
  color: var(--dim);
  font-size: 11px;
}
.partners img {
  width: 35px;
  height: 19px;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.58;
}
.views {
  display: flex;
  margin: auto;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
}
.views button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 29px;
  font-size: 12px;
  padding: 4px 10px;
}
.views button[aria-pressed='true'],
.cam-modes button[aria-pressed='true'] {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: inset 0 1px #ffffff90;
}
.views .ico {
  width: 15px;
  height: 15px;
}
.top-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.top-actions button {
  min-height: 32px;
}
.top-actions #notes {
  background: transparent;
  border-color: transparent;
}
.top-actions #count {
  font-size: 11px;
  color: var(--dim);
  font-weight: 500;
}
.top-actions #files,
.top-actions #full {
  background: transparent;
}
.top-actions .primary {
  margin-left: 4px;
}
body {
  padding: 12px 22px 6px;
}
main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.casehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 2px 0;
}
.kicker,
.minor-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.case-title .kicker {
  display: flex;
  gap: 5px;
  align-items: center;
}
.kicker .ico {
  width: 12px;
  height: 12px;
}
.case-title h1 {
  font-size: clamp(26px, 2.1vw, 36px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -1.3px;
  margin: 5px 0 3px;
}
.case-title h1 small {
  font-weight: 400;
  color: var(--ink);
  font-size: 0.68em;
  letter-spacing: -0.55px;
}
.case-title h1 span {
  color: var(--ink);
  font-size: 0.72em;
  font-weight: 400;
  margin: 0 4px;
}
.case-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.case-actions button,
.placement-select {
  min-height: 34px;
}
.placement-select,
.aerial-modes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
}
.placement-select > .ico:first-child {
  color: var(--mint);
}
.placement-select > .ico:last-child {
  width: 12px;
  pointer-events: none;
}
.placement-select select,
.aerial-modes select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  min-width: 0;
  max-width: 170px;
}
.placement-select select option,
.aerial-modes select option {
  background: var(--panel);
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(264px, 22vw, 330px);
  column-gap: 12px;
  min-height: 430px;
  height: calc(100dvh - 298px);
  max-height: 1100px;
}
.stage,
.analysis,
.design-tray {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow:
    inset 0 1px 0 #ffffff07,
    0 9px 36px #01060c24;
}
.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
}
#scene,
#map {
  position: absolute;
  inset: 0;
}
#map {
  background: var(--panel);
}
.stage-top,
.stage-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 820;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.stage-top > *,
.stage-bottom > * {
  pointer-events: auto;
}
.stage-top {
  top: 13px;
}
.stage-bottom {
  bottom: 13px;
}
.stage:has(#map:not([hidden])) .stage-bottom {
  bottom: 28px;
}
.stage-bottom button,
.stage-top button,
.aerial-modes {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  font-size: 12px;
  min-height: 31px;
  backdrop-filter: blur(10px);
}
.cam-modes,
.stage-tools,
.zoom {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  backdrop-filter: blur(10px);
  padding: 2px;
  box-shadow: 0 2px 7px #0002;
}
.cam-modes button,
.stage-tools button,
.zoom button {
  background: transparent;
  border: 1px solid transparent;
  min-height: 27px;
  padding: 5px 10px;
  font-weight: 500;
}
.cam-modes button[aria-pressed='false'] {
  color: var(--dim);
}
.stage-tools button[aria-pressed='true'] {
  background: var(--panel);
  color: var(--ink);
}
.zoom button {
  width: 29px;
  height: 27px;
  font-size: 18px;
  padding: 0;
}
.zoom .ico,
.stage-tools .ico {
  width: 15px;
  height: 15px;
}
.stage-tools button + button,
.zoom button + button {
  border-left-color: #394c58;
  border-radius: 0;
}
.stage-tools .icon-btn {
  width: 31px;
  height: 27px;
}
.layer-wrap {
  position: relative;
}
.popover {
  position: absolute;
  right: 0;
  top: 39px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 9px;
  border-radius: 7px;
  min-width: 165px;
  box-shadow: 0 10px 40px #27443822;
  z-index: 860;
}
.popover label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 3px;
  cursor: pointer;
}
.popover input {
  accent-color: var(--blue);
}
#loading {
  position: absolute;
  inset: 0;
  z-index: 630;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--dim);
  font-size: 14px;
}
#loading i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#modebar {
  position: absolute;
  z-index: 825;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 20px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 7px 8px;
  font-size: 12px;
  box-shadow: 0 5px 28px #2744381a;
}
#modebar button {
  font-size: 11px;
  padding: 5px 7px;
}
.mode-actions {
  display: flex;
  gap: 4px;
}
.analysis {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background: var(--panel);
  padding: 16px 16px 11px;
}
.analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.analysis-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  letter-spacing: -0.65px;
  font-weight: 650;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: var(--panel);
  box-shadow: 0 0 10px #75dbad44;
}
.analysis-head .icon-btn,
.inline-info {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 24px;
  height: 24px;
  padding: 3px;
}
.inline-info .ico {
  width: 14px;
  height: 14px;
}
.metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.analysis-metric {
  --tone: var(--blue);
  padding: clamp(9px, 1.4vh, 19px) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.analysis-metric.sound {
  --tone: var(--lilac);
}
.analysis-metric.parcel {
  --tone: var(--amber);
}
.metric-name {
  display: flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-align: left;
}
.metric-name .ico {
  width: 16px;
  height: 16px;
  color: var(--tone);
}
.metric-name:hover {
  background: transparent;
  text-decoration: underline;
}
.metric-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin: 5px 0;
}
.metric-line strong {
  font-size: clamp(26px, 2.3vw, 37px);
  font-weight: 500;
  letter-spacing: -1.25px;
  line-height: 1.04;
  font-variant-numeric: tabular-nums;
}
.metric-line strong small {
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0;
}
.change {
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}
.change.changed {
  color: var(--tone);
}
.meter {
  height: 3px;
  background: var(--panel);
  border-radius: 4px;
  position: relative;
  margin: 3px 0 7px;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--tone);
  border-radius: 4px;
  max-width: 100%;
}
.meter b {
  position: absolute;
  top: -2px;
  height: 7px;
  width: 1px;
  background: var(--panel);
}
.metric-caption {
  font-size: 11px;
  color: var(--dim);
}
.receiver {
  display: flex;
  align-items: center;
  gap: 4px;
}
.receiver select {
  font-size: 12px;
  max-width: 100%;
  padding: 1px 3px 1px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
}
.receiver option {
  background: var(--panel);
}
.resources {
  padding: 11px 0 12px;
}
.minor-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 4px;
}
.resource-grid > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.resource-grid b {
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.6px;
  font-weight: 500;
}
.resource-grid small {
  color: var(--dim);
  font-size: 11px;
}
.resource-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.evidence-link {
  font-size: 12px;
  color: var(--dim);
  justify-content: flex-start;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}
.evidence-link:hover {
  background: transparent;
  color: var(--ink);
}
.evidence-link .ico {
  width: 14px;
}
.design-tray {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 15px;
  background: var(--panel);
  min-height: 92px;
}
.tray-title {
  min-width: 148px;
}
.tray-title h2 {
  font-size: 17px;
  letter-spacing: -0.6px;
  margin: 3px 0 0;
}
.tray-title .kicker {
  font-size: 9px;
}
.tray-title > span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.design-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
}
.design-card {
  position: relative;
  background: var(--panel);
  display: grid;
  align-items: center;
  grid-template-columns: minmax(40px, 70px) 1fr 12px;
  text-align: left;
  gap: 7px;
  min-width: 0;
  min-height: 64px;
  padding: 5px 9px;
  border-color: var(--line);
  border-radius: 7px;
}
.design-card[aria-pressed='true'] {
  background: var(--panel);
  border-color: var(--line);
}
.design-card img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 48px;
}
.design-card strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.design-card small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink);
  margin-top: 3px;
}
.design-card > .radio {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.design-card[aria-pressed='true'] > .radio {
  border: 3.5px solid var(--line);
  background: var(--panel);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  padding: 0 2px 4px;
  margin-top: -4px;
}
footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
footer b {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--panel);
  border-radius: 50%;
}
footer i {
  padding: 0 4px;
  font-style: normal;
  color: var(--ink);
}
dialog {
  width: min(490px, calc(100vw - 28px));
  max-height: 84dvh;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 30px 100px #27443826;
  overflow: auto;
}
dialog::backdrop {
  background: var(--panel);
}
dialog.large {
  width: min(940px, calc(100vw - 28px));
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 13px 17px;
}
.dialog-head h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
  margin: 0;
}
.dialog-head .icon-btn {
  border: 0;
  background: transparent;
}
#dialog-body {
  padding: 17px 18px 20px;
  font-size: 14px;
}
#dialog-body > :first-child {
  margin-top: 0;
}
.hint,
.ref p,
.minor {
  color: var(--dim);
  line-height: 1.5;
}
.minor {
  font-size: 12px;
}
.field {
  display: grid;
  font-weight: 600;
  font-size: 13px;
  gap: 6px;
  margin: 12px 0;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}
.dialog-actions,
.nudge-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 17px;
}
.nudge-row {
  justify-content: flex-start;
}
.wide {
  width: 100%;
}
.filechoice,
.note-card {
  width: 100%;
  margin: 5px 0;
  padding: 11px 12px;
  text-align: left;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}
.filechoice b,
.filechoice small,
.note-card span,
.note-card small {
  display: block;
}
.filechoice small,
.note-card small {
  font-size: 12px;
  font-weight: 400;
  color: var(--dim);
  margin-top: 2px;
}
.note-card {
  display: block;
  border-left: 2px solid var(--mint);
}
.note-card p {
  font-size: 14px;
  font-weight: 400;
  margin: 4px 0;
}
.note-card span {
  font-size: 11px;
  color: var(--mint);
}
.note-full,
.note-card {
  overflow-wrap: anywhere;
}
.note-full {
  white-space: pre-wrap;
}
.ref,
.method {
  border-top: 1px solid var(--subline);
  padding: 12px 0;
}
.ref h3,
.method h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.ref p,
.method p {
  margin: 4px 0;
}
.ref a {
  font-weight: 600;
}
.empty {
  padding: 14px 0;
}
.empty h3 {
  font-size: 16px;
  margin: 5px 0;
}
.empty .ico {
  color: var(--mint);
}
.error {
  font-size: 13px;
  color: var(--amber);
}
.model-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.scrolltable {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
td,
th {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--dim);
  font-size: 11px;
}
td small {
  display: block;
  color: var(--muted);
}
td:not(:first-child) {
  white-space: nowrap;
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3000;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 4px 20px #27443822;
}
@media (min-width: 1700px) {
  .workbench {
    height: calc(100dvh - 288px);
  }
}
@media (max-width: 1100px) {
  .partners span {
    display: none;
  }
  .topbar {
    gap: 10px;
    padding-inline: 13px;
  }
  .design-tray {
    gap: 10px;
  }
  .tray-title {
    min-width: 130px;
  }
  .design-card {
    grid-template-columns: 45px 1fr 10px;
    gap: 5px;
    padding: 5px;
  }
  .design-card strong {
    font-size: 13px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 255px;
  }
  .analysis {
    padding: 12px;
  }
  .case-actions button {
    font-size: 12px;
  }
}
@media (max-width: 840px) {
  body {
    padding: 7px 9px;
  }
  .topbar {
    min-height: 49px;
  }
  .partners {
    display: none;
  }
  .top-actions #full {
    display: none;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .analysis-head > div {
    font-size: 17px;
  }
  .case-title h1 {
    font-size: 25px;
  }
  .design-tray {
    display: block;
  }
  .tray-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }
  .tray-title h2 {
    font-size: 14px;
  }
  .tray-title .kicker {
    display: none;
  }
  .tray-title > span {
    margin: 0;
  }
  .design-card {
    min-height: 52px;
  }
  .design-card img {
    height: 36px;
  }
  .design-choices {
    gap: 5px;
  }
  .case-actions {
    gap: 4px;
  }
  .metric-line strong {
    font-size: 27px;
  }
  .stage-top,
  .stage-bottom {
    left: 8px;
    right: 8px;
  }
  .stage-top {
    top: 8px;
  }
  .stage-bottom {
    bottom: 8px;
  }
  .views button {
    padding: 4px 7px;
  }
}
@media (max-width: 690px) {
  body {
    padding: 6px 7px;
  }
  .topbar {
    padding: 0 8px;
    gap: 6px;
    flex-wrap: wrap;
    border-radius: 9px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 24px;
  }
  .views {
    gap: 0;
    margin: 0 auto;
    padding: 2px;
  }
  .views .ico {
    display: none;
  }
  .views button {
    font-size: 11px;
    padding: 4px 6px;
    min-height: 26px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-actions #notes span,
  .top-actions #files {
    display: none;
  }
  .top-actions #notes {
    padding: 4px 1px;
    gap: 2px;
  }
  .top-actions .primary {
    font-size: 11px;
    min-height: 28px;
    padding: 4px 5px;
    gap: 3px;
    margin: 0;
  }
  .top-actions .ico {
    width: 14px;
  }
  .casehead {
    flex-wrap: wrap;
    padding: 9px 2px 0;
    gap: 8px;
  }
  .case-title h1 {
    font-size: 24px;
    margin: 3px 0 0;
  }
  .case-title .kicker {
    font-size: 9px;
  }
  .case-actions .ico {
    width: 13px;
  }
  .case-actions {
    margin-left: auto;
  }
  .case-actions #save span {
    display: none;
  }
  .case-actions #save {
    width: 28px;
    padding: 3px;
  }
  .case-actions button,
  .placement-select {
    font-size: 11px;
    min-height: 28px;
    padding: 4px 6px;
  }
  .placement-select {
    gap: 3px;
  }
  .placement-select select {
    font-size: 11px;
    max-width: 112px;
  }
  main {
    gap: 8px;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 8px;
  }
  .stage {
    height: clamp(330px, 49svh, 540px);
    flex: none;
    border-radius: 9px;
  }
  .analysis {
    display: block;
    overflow: visible;
    padding: 9px 10px;
    border-radius: 9px;
  }
  .analysis-head {
    padding-bottom: 5px;
  }
  .analysis-head > div {
    font-size: 15px;
  }
  .analysis-head .icon-btn {
    height: 20px;
  }
  .metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .analysis-metric {
    padding: 9px 0 7px;
    justify-content: flex-start;
    min-width: 0;
  }
  .metric-name {
    font-size: 12px;
    min-height: 30px;
    align-items: center;
    gap: 3px;
  }
  .metric-name .ico {
    width: 13px;
  }
  .metric-line {
    display: block;
    margin: 3px 0;
  }
  .metric-line strong {
    font-size: 24px;
  }
  .metric-line strong small {
    font-size: 11px;
  }
  .change {
    display: block;
    min-height: 14px;
    white-space: normal;
  }
  .metric-caption,
  .receiver select {
    font-size: 10px;
  }
  .receiver select {
    white-space: normal;
  }
  .resources {
    display: flex;
    gap: 7px;
    align-items: center;
    padding: 5px 0;
  }
  .resources .minor-title {
    font-size: 8px;
    max-width: 89px;
  }
  .resource-grid {
    margin: 0;
  }
  .resource-grid > div {
    padding-right: 6px;
  }
  .resource-grid b {
    font-size: 15px;
  }
  .resource-grid span {
    font-size: 9px;
  }
  .evidence-link {
    width: 100%;
    font-size: 11px;
    min-height: 25px;
    padding-top: 4px;
  }
  .design-tray {
    border-radius: 9px;
    min-height: 0;
    padding: 8px;
  }
  .design-card {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    gap: 2px;
    padding: 5px 7px;
  }
  .design-card img {
    width: 55px;
    height: 30px;
  }
  .design-card > .radio {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 10px;
    height: 10px;
  }
  .design-card strong {
    font-size: 12px;
  }
  .design-card small {
    font-size: 10px;
    margin-top: 2px;
  }
  .tray-title > span {
    font-size: 10px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 9px;
    gap: 3px;
    padding: 4px 0;
  }
  .case-actions {
    width: 100%;
    margin-left: 0;
  }
  .stage-bottom button,
  .stage-top button {
    font-size: 11px;
  }
  .cam-modes button {
    padding: 4px 7px;
  }
  .stage-top button,
  .stage-bottom button {
    min-height: 24px;
  }
  .dialog-head h2 {
    font-size: 17px;
  }
}
@media (max-width: 365px) {
  .topbar {
    gap: 3px;
  }
  .metric-name .ico {
    display: none;
  }
  .metric-name {
    font-size: 11px;
  }
  .design-card strong {
    font-size: 11px;
  }
}
@media (max-height: 720px) and (min-width: 691px) {
  .workbench {
    min-height: 395px;
  }
  .analysis-metric {
    padding: 6px 0;
  }
  .analysis {
    padding-top: 9px;
  }
  .metric-line strong {
    font-size: 25px;
  }
  .analysis-head {
    padding-bottom: 4px;
  }
  .resources {
    padding: 4px 0 8px;
  }
  .casehead {
    padding-top: 7px;
  }
  .design-tray {
    min-height: 74px;
    padding: 8px 12px;
  }
  .design-card {
    min-height: 53px;
  }
  main {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  #loading i {
    animation: none;
  }
}

.gesture-hint {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--panel);
  border-radius: 4px;
  padding: 3px 7px;
  pointer-events: none;
}
.gesture-hint b {
  color: var(--ink);
  padding: 0 3px;
}
.stage:has(#map:not([hidden])) .gesture-hint,
.stage:has(#modebar:not([hidden])) .gesture-hint,
.stage:has(.ds-dragging) .gesture-hint {
  visibility: hidden;
}
@media (max-width: 820px) {
  .gesture-hint {
    font-size: 10px;
    position: absolute;
    left: 0;
    bottom: 39px;
  }
}

@media (max-width: 490px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    padding: 5px 8px;
  }
  .top-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 5px;
  }
  .top-actions #notes span,
  .top-actions #files {
    display: inline-flex;
  }
  .top-actions #files {
    width: 24px;
    height: 25px;
    padding: 4px;
  }
  .views {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
  }
  .views button {
    flex: 1;
  }
  .views .ico {
    display: block;
    width: 13px;
    height: 13px;
  }
}
