:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  color: #e8f2ef;
  background: #09161d;
  --panel: #0e2029;
  --panel2: #112934;
  --edge: #28434d;
  --mint: #52d3b9;
  --text: #e9f5f2;
  --mute: #94adb3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #9de8d9;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  transition: background 0.16s;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
.top {
  height: 62px;
  background: #0a171e;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 19px;
  border-bottom: 1px solid var(--edge);
}
.logo {
  font-weight: 850;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  font-size: 14px;
}
.logo b {
  color: #74dfc2;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  background: #19ad84;
  border-radius: 9px;
  color: #0b1d20;
  padding: 8px;
  margin-right: 9px;
}
.top-label {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.13em;
  margin-left: 20px;
}
.top-label small {
  display: block;
  color: #93a9aa;
  font-size: 9px;
  letter-spacing: 0.12em;
}
.top nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 12px;
}
.top button {
  font-size: 12px;
}
.ghost,
.prominent {
  border: 1px solid #36515b;
  color: #e9f6f1;
  background: #122932;
  border-radius: 7px;
  padding: 10px 13px;
}
.ghost:hover {
  background: #1b3a43;
}
.prominent {
  background: #36c9a5;
  border-color: #36c9a5;
  color: #04241e;
  font-weight: 850;
}
.prominent:hover {
  background: #83edce;
}
.truth {
  padding: 8px 24px;
  background: #213529;
  border-bottom: 1px solid #365743;
  color: #bfdac6;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.truth b {
  color: #e1efdf;
}
.workspace {
  display: grid;
  grid-template-columns: 250px minmax(450px, 1fr) 300px;
  height: calc(100vh - 102px);
  min-height: 610px;
}
.left-rail,
.right-rail {
  background: #0b1b22;
  overflow: auto;
  min-height: 0;
}
.left-rail {
  border-right: 1px solid var(--edge);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.right-rail {
  border-left: 1px solid var(--edge);
}
.rail-title {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #10242d;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--edge);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.rail-title span {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mute);
  font-size: 11px;
}
.visibility-block {
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge);
}
.visibility-block .section-heading {
  margin-bottom: 7px;
}
.visibility-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.visibility-controls button {
  border: 1px solid #37616a;
  border-radius: 5px;
  background: #1d4b4b;
  color: #e4fff8;
  padding: 7px 3px;
  font-size: 10px;
  font-weight: 750;
}
.visibility-controls button[aria-pressed="false"] {
  background: #0a1a21;
  color: #718c91;
  text-decoration: line-through;
  border-color: #233c44;
}
.tree {
  padding: 8px;
  flex: 1;
  min-height: 180px;
  overflow: auto;
  font-size: 12px;
}
.tree details {
  padding-left: 8px;
}
.tree summary {
  cursor: pointer;
  color: #94ded2;
  padding: 6px;
}
.tree button {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
  padding: 6px 7px;
  color: #c9e0de;
  font-size: 12px;
}
.tree button:hover,
.tree button.active {
  background: #214944;
  color: #e6fff9;
}
.tree .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.rail-block {
  padding: 14px;
  border-top: 1px solid var(--edge);
}
.sketch-block {
  flex: 0 0 auto;
}
.section-heading {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mint);
  font-weight: 900;
  margin: 0 0 10px;
}
.rail-action {
  display: block;
  width: 100%;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: #142d36;
  color: #d7ecea;
  margin: 7px 0;
  padding: 9px 11px;
  text-align: left;
  font-size: 12px;
}
.rail-action:hover {
  background: #234a50;
}
.rail-action.warn {
  color: #fab0ae;
}
.rail-action.prominent {
  text-align: center;
  color: #06251d;
}
.tiny {
  font-size: 10px;
  color: var(--mute);
  line-height: 1.55;
}
.left-rail canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #2c4951;
  background: #051319;
  touch-action: none;
}
.work-center {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #07161f;
}
.ribbon {
  background: #152a34;
  border-bottom: 1px solid var(--edge);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  justify-content: space-between;
}
.toolgroup {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.ribbon button,
.dock-tab {
  font-size: 11px;
  font-weight: 650;
  color: #b8d2d3;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  padding: 9px 10px;
}
.ribbon button:hover,
.ribbon button.selected,
.dock-tab.active {
  background: #2e716b;
  color: #edfffa;
}
.canvas-area {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
}
.canvas-area canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.viewtag {
  position: absolute;
  top: 14px;
  left: 16px;
  background: #09202acc;
  border: 1px solid #356871;
  padding: 8px 12px;
  border-radius: 8px;
  pointer-events: none;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.viewtag small {
  display: block;
  margin-top: 4px;
  color: #83b7b6;
}
.view-instruct {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  pointer-events: none;
  color: #b4c6c9;
  font-size: 11px;
}
.view-axes {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-weight: 850;
  color: #75dff8;
  font-size: 12px;
}
.view-axes span {
  color: #7fe0a4;
}
.statusbar {
  background: #15313b;
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 11px;
  color: #bed9d9;
  border-top: 1px solid var(--edge);
}
.dock {
  background: #091b23;
  min-height: 180px;
  border-top: 1px solid #35515a;
}
.dock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--edge);
  font-size: 11px;
  letter-spacing: 0.09em;
}
.dock-top button {
  letter-spacing: normal;
}
.results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  max-height: 158px;
  overflow: auto;
}
.metric {
  padding: 10px 11px;
  border: 1px solid #2e4f58;
  background: #102b35;
  border-radius: 6px;
  min-width: 0;
}
.metric small {
  font-size: 10px;
  color: #9cb8b9;
  display: block;
}
.metric b {
  font-size: 17px;
  color: #e5fff9;
  font-variant-numeric: tabular-nums;
}
.note-list {
  grid-column: 1/-1;
  color: #debf9d;
  font-size: 11px;
  line-height: 1.5;
}
.note-list.ok {
  color: #98e3bf;
}
.right-rail section {
  padding: 12px 15px;
}
.right-rail label {
  display: block;
  font-size: 11px;
  color: #a9bdc0;
  margin: 10px 0 5px;
}
.right-rail input,
.right-rail select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 7px;
  background: #0a1b23;
  border: 1px solid #3a5861;
  color: #eef9f7;
  border-radius: 6px;
  min-width: 0;
  font-size: 12px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.right-rail .section-heading {
  padding-top: 12px;
}
.right-rail .rail-action {
  text-align: center;
}
.property-title {
  font-size: 13px;
  color: #fff;
  font-weight: 750;
  margin: 8px 0;
}
.property-message {
  padding: 9px 10px;
  background: #122e33;
  color: #afcec7;
  font-size: 11px;
  line-height: 1.6;
  border-radius: 6px;
}
.property-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1d343c;
  font-size: 11px;
}
.property-line span {
  color: #aac2c2;
}
.bottom-disclaimer {
  font-size: 11px;
  color: #9bc0b6;
  padding: 12px 22px;
  background: #071319;
  border-top: 1px solid #233d43;
  line-height: 1.5;
}
#webglError {
  position: absolute;
  inset: 0;
  background: #142e36;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: #f2b5ad;
}
#webglError[hidden] {
  display: none;
}
.selected-outline {
  border: 1px solid #49d4b7;
}
.help {
  font-size: 11px;
  color: #8eb2b5;
  line-height: 1.5;
}
.inline-row {
  display: flex;
  gap: 8px;
}
.inline-row button {
  width: 50%;
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 190px minmax(340px, 1fr) 260px;
  }
  .top-label {
    display: none;
  }
  .top nav {
    gap: 8px;
  }
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 850px) {
  .top {
    height: auto;
    flex-wrap: wrap;
    padding: 10px;
  }
  .top nav {
    width: 100%;
    order: 3;
    justify-content: center;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .work-center {
    order: 1;
    height: 700px;
  }
  .left-rail {
    order: 2;
    max-height: none;
    border-right: 0;
    display: block;
    overflow: auto;
  }
  .right-rail {
    order: 3;
    max-height: none;
  }
  .tree {
    max-height: 300px;
  }
  .rail-block {
    max-width: none;
  }
  .canvas-area {
    min-height: 340px;
  }
  .dock {
    min-height: 170px;
  }
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 150px;
  }
  .truth {
    padding: 8px;
  }
  .top nav a {
    font-size: 11px;
  }
}
@media (max-width: 480px) {
  .toolgroup button {
    padding: 8px 7px;
    font-size: 10px;
  }
  .ribbon {
    gap: 3px;
  }
  .canvas-area {
    min-height: 330px;
  }
  .work-center {
    height: 730px;
  }
  .top .ghost {
    padding: 7px;
  }
  .top .prominent {
    padding: 7px;
  }
}
