@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #293d44;
  background: #edf2f2;
  font-size: 13px;
  --accent: #147d70;
  --border: #dce4e4;
  --muted: #7a8b90;
  --ink: #263d43;
  --white: #fbfcfc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  padding: 7px 11px;
  white-space: nowrap;
}
button:hover {
  background: #eaf0ef;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid #24a290;
  outline-offset: 2px;
}
button:disabled {
  color: #a2afb1;
  cursor: default;
  opacity: 0.7;
}
button:disabled:hover {
  background: transparent;
}
input,
select {
  min-width: 0;
  border: 1px solid #d1dddc;
  border-radius: 5px;
  background: white;
  padding: 8px 9px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #147d7014;
}
input[type='checkbox'] {
  accent-color: var(--accent);
}
[hidden] {
  display: none !important;
}
.appbar {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-family: Manrope, system-ui;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand > span > span {
  font-weight: 500;
  color: #56736e;
}
.brand small {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid #dce6e3;
  border-radius: 3px;
  padding: 2px 3px;
  align-self: flex-start;
  margin-top: 2px;
  color: #7d9390;
}
.bar-divider {
  height: 21px;
  width: 1px;
  background: var(--border);
  margin: 0 8px;
}
.project-name {
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-state {
  font-size: 11px;
  color: #84958f;
}
.app-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}
.connect-button i,
.bridge-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #b8c4c6;
  vertical-align: 1px;
}
/* not connected: the way CoreCAD works best, so it is the one button in the bar that stands out */
.connect-button.off {
  color: var(--accent);
  font-weight: 600;
  border-color: #b9d6cf;
}
.connect-button.off i {
  background: var(--accent);
}
.connect-button.on i,
.bridge-status.on i {
  background: #2f9e6b;
}
.connect-button.connecting i,
.connect-button.retrying i,
.bridge-status.connecting i,
.bridge-status.retrying i {
  background: #d9a441;
}
.bridge-status {
  font-weight: 600;
}
.bridge-address {
  display: block;
  margin: 12px 0;
}
.bridge-address input {
  display: block;
  width: 100%;
  margin-top: 5px;
  font: 12px ui-monospace, Consolas, monospace;
}
.bridge-note {
  color: #6b7b80;
  font-size: 12.5px;
}
.modal ol {
  margin: 10px 0;
  padding-left: 20px;
  line-height: 1.55;
}
.export-button {
  border: 1px solid #cddcd8;
  margin-left: 7px;
  font-weight: 600;
  background: #f4f8f6;
  min-width: 88px;
}
.export-button span {
  margin-left: 15px;
  color: var(--accent);
}
.icon-button {
  min-width: 30px;
  font-size: 18px;
  line-height: 20px;
  padding: 5px 7px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 17px;
  height: 72px;
  flex: none;
  border-bottom: 1px solid #d2dddd;
  background: #f9fbfb;
  padding: 0 18px;
}
.mode-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  color: var(--accent);
  border: 1px solid #bbd7d0;
  border-radius: 4px;
  background: #edf6f2;
  padding: 5px 9px;
  min-width: 64px;
  text-align: center;
}
.tool-items {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  min-width: 65px;
  padding: 7px 11px;
  font-size: 11px;
  color: #4c6369;
}
.tool svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool.active {
  background: #dfefea;
  color: #0e7b68;
}
.tool-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin: 0 10px;
}
.toolbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.primary:hover {
  background: #106b60;
}
.primary:disabled {
  background: #d5e2de;
  color: #91a49c;
  border-color: #d5e2de;
}
.finish {
  margin-left: 16px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 11px 15px;
}
main {
  display: flex;
  flex: 1;
  min-height: 0;
}
.browser {
  width: 232px;
  flex: none;
  border-right: 1px solid #d4dede;
  background: #fafcfc;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.browser-heading {
  height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #6f8388;
}
.units-tag {
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
  border: 1px solid #dce5e3;
  border-radius: 4px;
  padding: 3px 5px;
  color: #8c9c9d;
}
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 8px;
  color: #7b8d92;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}
.group-title b {
  font-size: 10px;
  background: #eaf0ef;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 500;
  letter-spacing: 0;
}
.empty-tree {
  margin: 8px 19px 15px;
  font-size: 12px;
  line-height: 1.7;
  color: #9aa9ac;
}
.tree-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 0;
  padding: 9px 17px;
  text-align: left;
  font-size: 12px;
  min-height: 36px;
  border-left: 3px solid transparent;
}
.tree-row .tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.tree-row.selected {
  background: #e7f2ee;
  border-left-color: var(--accent);
  color: #1b6e61;
}
.tree-row .feature-symbol {
  font-size: 14px;
  color: #7c9795;
  width: 17px;
  text-align: center;
}
.tree-row .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b9b87;
}
.tree-row.error .dot {
  background: #c66654;
}
.tree-row.warning .dot {
  background: #d8a350;
}
.tree-row.suppressed,
.tree-row.rolled {
  opacity: 0.45;
}
.tree-row.suppressed .tree-name {
  text-decoration: line-through;
}
.tree-section {
  padding-bottom: 10px;
  border-bottom: 1px solid #e4ebeb;
}
.tree-row .eye {
  padding: 1px 5px;
  font-size: 12px;
  margin-right: -7px;
}
.browser-foot {
  margin-top: auto;
  padding: 18px 17px;
  color: #9cacab;
  font-size: 8px;
  letter-spacing: 1.3px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tiny-mark {
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid #92b6ac;
  transform: rotate(30deg);
}
#browser-content {
  overflow: auto;
  min-height: 0;
}
#browser-actions {
  padding: 12px 14px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
#browser-actions:empty {
  display: none;
}
#browser-actions button {
  font-size: 11px;
  padding: 5px 8px;
  border: 1px solid #dce5e3;
}
.browser-note {
  padding: 10px 18px;
  font-size: 11px;
  line-height: 1.6;
  color: #71888b;
}
.dof {
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.dof strong {
  font-family: Consolas, monospace;
  font-size: 20px;
  color: #2d82b3;
}
.dof.fully {
  color: #22735b;
}
.dof.fully strong {
  color: #22735b;
}
.constraint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 12px;
  gap: 4px;
}
.constraint-grid button {
  border: 1px solid #dde6e5;
  text-align: left;
  font-size: 11px;
  padding: 7px;
}
.constraint-grid button b {
  display: inline-block;
  color: #458a81;
  width: 20px;
}
.constraint-row {
  display: flex;
  align-items: center;
  padding: 7px 15px;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
}
.constraint-row:hover {
  background: #eaf0ee;
}
.constraint-row.selected {
  background: #deeee8;
}
.constraint-row .c-name {
  flex: 1;
}
.constraint-row .c-value {
  font-family: Consolas, monospace;
  color: #32736e;
}
.constraint-row .c-id {
  font-family: Consolas, monospace;
  color: #a0aeaf;
  font-size: 9px;
}
#viewport {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 48% 42%, #f5f8f8, #e7eeee);
}
.solid-surface,
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.solid-surface canvas {
  display: block;
}
.overlay {
  touch-action: none;
  outline: none;
}
.viewbar {
  position: absolute;
  top: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 3px;
  background: #fdfefee8;
  box-shadow: 0 2px 8px #2b4b4b05;
  border: 1px solid #dce5e5;
  border-radius: 6px;
  gap: 1px;
}
.viewbar button,
.viewbar select {
  font-size: 10px;
  color: #6a7f83;
  padding: 5px 8px;
}
.viewbar select {
  border: none;
  background: transparent;
  width: 56px;
  padding: 4px;
}
.viewbar > span {
  height: 15px;
  width: 1px;
  background: #dfe7e6;
  margin: 0 4px;
}
.viewbar button:first-child {
  color: #3e655f;
  font-weight: 500;
}
.welcome {
  position: absolute;
  top: 58px;
  bottom: 46px;
  left: 11%;
  width: min(520px, 82%);
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  pointer-events: none;
}
.welcome > * {
  pointer-events: auto;
}
/* The start screen offers an agent first (renderStart); without a relay, only the planes. */
.welcome .hand-only,
.welcome.no-agent .agent-only {
  display: none;
}
.welcome.no-agent .hand-only {
  display: block;
}
.agent-start {
  position: relative;
}
.bridge-cloud-offer {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.45;
}
.bridge-cloud {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.45;
}
.modal .bridge-cloud input {
  margin: 3px 0 0;
}
.start-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #7d948f;
  font-size: 19px;
  line-height: 1;
}
.start-close:hover {
  background: #e6efec;
  color: var(--ink);
}
.agent-start ol {
  margin: 0;
  padding: 14px 34px 14px 40px;
  border: 1px solid #cfdeda;
  border-radius: 8px;
  background: #f8fbfae8;
  box-shadow: 0 6px 24px #2c4d4810;
  color: #4d6662;
  font-size: 13px;
  line-height: 1.5;
}
.agent-start li {
  padding: 5px 0 7px;
}
.agent-start li::marker {
  color: #8fb0a6;
  font-weight: 600;
}
.agent-start li.now::marker {
  color: var(--accent);
}
.agent-start li.done::marker {
  color: #2f9e6b;
}
.agent-start b {
  color: #264d4a;
  font-weight: 600;
}
.agent-start .bridge-status {
  display: block;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: #6b8480;
}
.agent-start button.primary {
  margin-top: 8px;
  padding: 7px 18px;
}
.start-address {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.start-address input {
  flex: 1 1 200px;
  min-width: 0;
  font: 11.5px ui-monospace, Consolas, monospace;
  padding: 6px 8px;
}
.agent-start .start-address button.primary {
  margin: 0;
  padding: 5px 14px;
}
.bridge-status .start-link {
  margin-left: 4px;
}
.nowrap {
  white-space: nowrap;
}
.tree-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin-right: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
}
.tree-open .tree-toggle {
  background: #e4efec;
}
.start-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.eyebrow {
  font-size: 9px;
  color: #77928e;
  letter-spacing: 2.1px;
  font-weight: 600;
}
.welcome h1 {
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(30px, 3.1vw, 48px);
  font-weight: 500;
  letter-spacing: -2.4px;
  line-height: 1.16;
  margin: 16px 0;
  color: #264d4a;
}
.welcome p {
  color: #6f8784;
  line-height: 1.7;
  font-size: 13.5px;
  margin: 0 0 20px;
}
.plane-choices {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.plane-choices > span {
  font-size: 12px;
  color: #849895;
  margin-right: 4px;
}
/* beside an agent the planes are the second way in: smaller */
.welcome:not(.no-agent) .plane-choices button {
  width: auto;
  padding: 7px 12px;
  flex-direction: row;
  align-items: baseline;
}
.welcome:not(.no-agent) .plane-choices b {
  font-size: 14px;
}
.welcome:not(.no-agent) .plane-choices button span {
  display: none;
}
.plane-choices button {
  width: 94px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #cbdcd6;
  background: #f6faf9e8;
  align-items: flex-start;
  border-radius: 6px;
}
.plane-choices b {
  font-family: Manrope, system-ui;
  font-weight: 600;
  font-size: 18px;
  color: #3d766a;
}
.plane-choices button span {
  font-size: 10px;
  color: #8aa097;
}
.plane-choices button:hover {
  background: #e0efe7;
  border-color: #91baa9;
}
.welcome small {
  display: block;
  color: #9aaba8;
  font-size: 10px;
  margin-top: 23px;
}
.view-help {
  position: absolute;
  bottom: 20px;
  left: 22px;
  display: flex;
  gap: 5px;
  align-items: center;
  color: #97a9a9;
  font-size: 10px;
  pointer-events: none;
}
.view-help b {
  font-weight: 400;
  color: #7c9491;
}
.view-help span {
  margin: 0 7px;
}
.context-note {
  position: absolute;
  top: 63px;
  left: 21px;
  font-size: 11px;
  color: #6b8580;
  max-width: calc(100% - 350px);
  line-height: 1.6;
  pointer-events: none;
}
.panel {
  position: absolute;
  z-index: 5;
  right: 18px;
  top: 16px;
  width: 282px;
  max-height: calc(100% - 70px);
  overflow: auto;
  border: 1px solid #d0ded9;
  border-radius: 9px;
  background: #fcfefd;
  box-shadow: 0 10px 35px #284e4a10;
}
.panel-head {
  padding: 16px 17px;
  border-bottom: 1px solid #e2ebe7;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head h2 {
  font-family: Manrope, system-ui;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}
.panel-head .step-tag {
  color: #8fa7a0;
  font: 10px Consolas, monospace;
}
.panel-body {
  padding: 16px 17px;
}
.panel-body p {
  font-size: 11px;
  line-height: 1.6;
  color: #77928b;
  margin: 0 0 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 15px;
}
.field > span,
.field > label {
  font-size: 10px;
  font-weight: 600;
  color: #729087;
  letter-spacing: 0.25px;
}
.field input,
.field select {
  width: 100%;
  font-size: 12px;
}
.fields {
  display: flex;
  gap: 10px;
}
.fields > .field {
  flex: 1;
  min-width: 0;
}
.input-unit {
  display: flex;
  align-items: center;
  border: 1px solid #d1dddc;
  border-radius: 5px;
  overflow: hidden;
  background: white;
}
.input-unit:focus-within {
  border-color: var(--accent);
}
.input-unit input {
  border: 0;
  box-shadow: none;
  flex: 1;
  width: 10px;
}
.input-unit span {
  font: 10px Consolas, monospace;
  color: #91a69f;
  padding-right: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  margin: 10px 0;
  color: #607e74;
}
.panel-actions {
  padding: 13px 17px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e1ebe6;
}
.panel-actions button {
  font-size: 12px;
  padding: 8px 16px;
}
.panel-error {
  font-size: 11px;
  color: #af5e43;
  background: #fcf0e8;
  padding: 10px 12px;
  line-height: 1.6;
  border-radius: 5px;
  margin-top: 10px;
}
.preview-state {
  font-size: 10px;
  color: #719289;
  margin: 9px 0;
}
.profile-list,
.edge-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 5px 0 15px;
}
.profile-list button,
.edge-list button {
  border: 1px solid #dbe7e0;
  text-align: left;
  font-size: 11px;
  white-space: normal;
}
.profile-list button.active {
  border-color: #91c3af;
  color: #27765e;
  background: #edf6ef;
}
.edge-list button {
  display: flex;
  justify-content: space-between;
}
.panel-body h3 {
  font-size: 10px;
  letter-spacing: 0.4px;
  color: #779889;
  font-weight: 500;
  margin: 16px 0 8px;
}
.sketch-numbers {
  position: absolute;
  z-index: 4;
  bottom: 54px;
  left: 22px;
  display: flex;
  gap: 12px;
  background: #fbfefdef;
  padding: 10px 13px;
  border: 1px solid #d3e2dc;
  border-radius: 7px;
  box-shadow: 0 5px 14px #204c4210;
}
.sketch-numbers label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #779288;
  font-size: 10px;
}
.sketch-numbers input {
  width: 85px;
  font: 12px Consolas, monospace;
  padding: 7px;
}
.sketch-numbers small {
  font-size: 9px;
  color: #9bada5;
  align-self: center;
  margin-left: 2px;
}
.toast {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  max-width: 600px;
  min-width: 250px;
  background: #fffdf8;
  border: 1px solid #e7d6b9;
  color: #8d6c40;
  padding: 12px 17px;
  border-radius: 7px;
  box-shadow: 0 6px 24px #473e2310;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}
.statusbar {
  height: 30px;
  flex: none;
  background: #f9fcfa;
  border-top: 1px solid #d2dfda;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  font-size: 10px;
  color: #768e83;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b9e85;
}
.status-dot.busy {
  background: #cbaf6c;
  animation: pulse 1s infinite;
}
.status-dot.error {
  background: #cb775d;
}
.status-spacer {
  flex: 1;
}
.statusbar button {
  padding: 2px 8px;
  background: #e9f1e9;
  border: 1px solid #cedfcc;
  color: #667c56;
  font-size: 10px;
}
.status-mm {
  padding: 0 12px;
  border-left: 1px solid #d9e4de;
  color: #a0b1a6;
}
.statusbar #coordinates {
  font-family: Consolas, monospace;
  margin-right: 14px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #203b3b30;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fbfefc;
  width: 390px;
  max-width: calc(100vw - 30px);
  border: 1px solid #cddfd2;
  border-radius: 10px;
  box-shadow: 0 15px 65px #253e3a25;
  overflow: hidden;
}
.modal.wide {
  width: 530px;
}
.modal .panel-body {
  max-height: 70vh;
  overflow: auto;
}
.modal table {
  font-size: 12px;
  width: 100%;
  border-collapse: collapse;
}
.modal td {
  padding: 8px;
  border-bottom: 1px solid #e0eae4;
}
.modal td:first-child {
  font-family: Consolas, monospace;
  color: #27775d;
}
.modal p {
  font-size: 12px;
  color: #6b857a;
  line-height: 1.8;
}
.modal input {
  width: 100%;
}
.modal input:is([type='checkbox'], [type='radio']) {
  flex: none;
  width: auto;
}
.legend {
  display: flex;
  gap: 12px;
  padding: 8px 17px;
  font-size: 9px;
  color: #8a9e98;
}
.legend span:before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #287eb4;
  margin-right: 5px;
}
.legend span:last-child:before {
  background: #22735b;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 1000px) {
  .browser {
    width: 200px;
  }
  .tool {
    min-width: 52px;
    padding: 7px;
  }
  .toolbar {
    gap: 10px;
    padding: 0 10px;
  }
  .tool-divider {
    margin: 0 5px;
  }
  .viewbar {
    gap: 0;
  }
  .viewbar button {
    padding: 5px;
  }
  .panel {
    width: 260px;
    right: 10px;
  }
  .save-state {
    display: none;
  }
  .context-note {
    max-width: calc(100% - 290px);
  }
  .finish {
    margin-left: 5px;
    padding: 10px;
  }
  .welcome {
    left: 8%;
  }
}
@media (max-width: 760px) {
  .appbar {
    padding: 0 9px;
  }
  /* a phone: the bars keep every button and scroll sideways, and the page itself stays as wide as the screen */
  .brand {
    flex: none;
  }
  .app-actions,
  .viewbar {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .app-actions > *,
  .viewbar > * {
    flex: none;
  }
  /* on a phone the connection to an agent matters most: first in the bar */
  #connect-button {
    order: -1;
  }
  /* a phone: the tree of parts is a drawer over the view, opened by the button at the left of the bar */
  .tree-toggle {
    display: flex;
  }
  main {
    position: relative;
  }
  .browser {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    box-shadow: 4px 0 24px #1f3a3a24;
  }
  .tree-open .browser {
    transform: none;
  }
  .welcome {
    left: 16px;
    width: calc(100% - 32px);
  }
  .bar-divider,
  .brand small,
  .project-name {
    display: none;
  }
  .toolbar {
    overflow: auto;
    gap: 5px;
  }
  .mode-pill {
    display: none;
  }
  .tool {
    min-width: 49px;
    font-size: 10px;
  }
  .tool-items {
    gap: 0;
  }
  .viewbar {
    left: 8px;
    right: 8px;
    width: max-content;
    max-width: calc(100% - 16px);
  }
  .viewbar button {
    font-size: 9px;
  }
  .welcome h1 {
    font-size: 34px;
  }
  .plane-choices {
    gap: 4px;
  }
  .plane-choices button {
    width: 73px;
  }
  .panel {
    top: 62px;
    width: 240px;
  }
  .view-help {
    display: none;
  }
  .statusbar #metrics {
    display: none;
  }
}

/* Parts: every part has its own history under it; children are indented under their parent. */
.tree-row {
  padding-left: calc(17px + var(--depth, 0) * 14px);
}
.part-row {
  cursor: pointer;
  font-weight: 600;
  gap: 6px;
  color: #33484d;
}
.part-row:hover {
  background: #f1f6f5;
}
.part-row.selected:hover {
  background: #e7f2ee;
}
.part-row .twist {
  width: 14px;
  min-width: 14px;
  padding: 0;
  font-size: 10px;
  color: #7c9795;
  text-align: center;
}
.part-row.used .tree-name,
.part-row.used .feature-symbol,
.part-row.hidden-part .tree-name,
.part-row.hidden-part .feature-symbol {
  opacity: 0.5;
}
.part-note {
  font-size: 10px;
  font-weight: 400;
  color: #8aa0a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}
.group-title .eye {
  padding: 1px 6px;
  font-size: 13px;
  margin-right: -7px;
}
.turns {
  display: flex;
  gap: 6px;
  margin: 2px 0 12px;
}
.turns button {
  flex: 1;
  font-size: 11px;
  padding: 6px 4px;
  border: 1px solid #dce5e3;
}
.tool-list {
  margin-bottom: 10px;
}
.part-row .tree-name {
  white-space: nowrap;
  min-width: 3em;
}
.part-note {
  flex-shrink: 2;
}
/* The steps of a part's history sit a little closer than the parts themselves. */
#browser-content .tree-row[data-feature],
#browser-content .body-row {
  min-height: 31px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.part-row.drop {
  outline: 2px dashed var(--accent);
  outline-offset: -3px;
}
#browser-content.drop {
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Numbers on the model: the toggles in the view bar, and the box a number is typed over in. */
.viewbar button.on {
  background: #dfefea;
  color: #0e7b68;
}
/* An agent is at work in the model: a frame round the view and a line that says what it does. */
#viewport.agent-active::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #d98a2b;
  pointer-events: none;
  z-index: 3;
}
.agent {
  position: absolute;
  left: 18px;
  bottom: 44px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #6b4a16;
  background: #fff6e6f2;
  border: 1px solid #ecc88f;
  border-radius: 999px;
  box-shadow: 0 2px 10px #5b3c0a14;
}
.agent[hidden] {
  display: none;
}
.agent i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d98a2b;
}
.agent.busy i {
  animation: agent-pulse 0.9s ease-in-out infinite;
}
@keyframes agent-pulse {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}
.connect-button.working i {
  background: #d98a2b;
}
.bridge-second {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid #dfe7e8;
  border-radius: 8px;
  background: #f7fafa;
}
.bridge-second canvas {
  width: 260px;
  height: 260px;
  flex: none;
  image-rendering: pixelated;
  background: #fff;
  cursor: zoom-in;
}
.qr-big {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  cursor: zoom-out;
}
.qr-big canvas {
  width: min(84vh, 84vw);
  height: min(84vh, 84vw);
  image-rendering: pixelated;
}
.bridge-second p {
  margin: 0 0 6px;
}
.bridge-second input {
  width: 100%;
  font: 11px 'SFMono-Regular', Consolas, monospace;
}
.bridge-recent {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: #5d7378;
  font-family: Consolas, monospace;
}
.bridge-recent li.refused {
  color: #a8572c;
}
/* Looking inside: where the cut is, under the view bar. */
.sectionbar {
  position: absolute;
  top: 56px;
  left: 18px;
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 3px 5px;
  background: #fdfefee8;
  box-shadow: 0 2px 8px #2b4b4b05;
  border: 1px solid #dce5e5;
  border-radius: 6px;
  gap: 2px;
  font-size: 10px;
  color: #6a7f83;
}
.sectionbar[hidden] {
  display: none;
}
.sectionbar button {
  font-size: 10px;
  color: #6a7f83;
  padding: 5px 8px;
}
.sectionbar button.on {
  background: #dfefea;
  color: #0e7b68;
}
.sectionbar .bar-label {
  padding: 0 6px 0 4px;
}
.sectionbar input[type='range'] {
  width: 170px;
  margin: 0 8px;
  accent-color: var(--accent);
}
.sectionbar .bar-field {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
}
.sectionbar .bar-field input {
  width: 58px;
  font-size: 11px;
  padding: 3px 5px;
}
#viewport.sectioning .context-note {
  top: 100px;
}
.dim-input {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 92px;
  padding: 4px 6px;
  font: 12px 'SFMono-Regular', Consolas, monospace;
  text-align: center;
  color: #17443d;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 5px;
  outline: none;
  box-shadow: 0 3px 12px #1d3b3b33;
}

/* Colours: the dot of a part in the list, and the swatches of the Colour panel. */
.tree-row .swatch {
  width: 12px;
  min-width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background: var(--c, transparent);
  border: 1px solid #9fb0b0;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 4px 0 14px;
}
.swatch-button {
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: var(--c);
  border: 1px solid #0000002b;
}
.swatch-button.on {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#colour-custom {
  height: 30px;
  padding: 2px;
}

/* Turning a part: an angle and the three axes to turn it about; how it is turned now. */
.turn-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.turn-row > .field {
  flex: 0 0 88px;
  margin-bottom: 0;
}
.turn-row > .turns {
  flex: 1;
  margin: 0;
}
.turned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 14px;
  font-size: 11px;
  color: #6a7f83;
}
.turned button {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid #dce5e3;
}

/* A group in the list: a container, not a shape. */
.part-row.group-row .feature-symbol {
  color: #5c7f8f;
}
.part-row.group-row .tree-name {
  letter-spacing: 0.2px;
}

/* A newer CoreCAD is published: the way to get it. */
.update-button {
  border: 1px solid #e3c98a;
  background: #fff8e6;
  color: #7a5a12;
  font-weight: 600;
}
.update-button[hidden] {
  display: none;
}

/* A drawing, over the model: the sheet as it will print. */
.sheet {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  background: #dfe6e6;
}
.sheet[hidden] {
  display: none;
}
.sheet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--muted);
  background: #fcfefd;
  border-bottom: 1px solid #d0ded9;
}
.sheet-bar strong {
  color: #22413d;
  font-size: 12px;
}
.sheet-bar .grow {
  flex: 1;
}
.sheet-bar button {
  font-size: 11px;
  padding: 5px 8px;
}
.sheet-note {
  color: #a0562b;
}
.sheet-paper {
  flex: 1;
  min-height: 0;
  padding: 18px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.sheet-paper svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 10px #284e4a22);
}
.sheet-problem {
  color: #a0562b;
  font-size: 12px;
  align-self: center;
}
.drawing-row .part-note {
  margin-left: auto;
}
/* A named number: its name, the formula it is worked out from, its value; typed over in place. */
.number-row .feature-symbol {
  font-weight: 600;
}
.number-row .part-note {
  margin-left: auto;
  max-width: 50%;
}
.number-row .number-value {
  margin-left: 8px;
  font: 11px 'SFMono-Regular', Consolas, monospace;
  color: var(--ink, #27403f);
  white-space: nowrap;
}
.number-row .part-note + .number-value {
  margin-left: 6px;
}
.number-row .tree-name + .number-value {
  margin-left: auto;
}
.number-row .number-input {
  margin-left: auto;
  width: 60%;
  font: 12px 'SFMono-Regular', Consolas, monospace;
  padding: 2px 6px;
}

.sheet-bar select {
  font-size: 11px;
  padding: 4px 6px;
}
.sheet-bar button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.sheet-bar .bar-gap {
  width: 1px;
  height: 16px;
  background: #d0ded9;
}
/* the help line lies over the top of the paper, so that the paper does not move when it comes and goes */
.sheet-help-slot {
  position: relative;
  height: 0;
  z-index: 2;
}
.sheet-help {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 7px 16px;
  font-size: 11px;
  color: #22413d;
  background: #eef6f3;
  border-bottom: 1px solid #d0ded9;
}
.sheet-help[hidden] {
  display: none;
}
.sheet-help input {
  width: 90px;
  font-size: 11px;
  margin-left: 4px;
}
.sheet-paper svg .mark {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
}
.sheet-paper svg .ghost {
  fill: #147d7008;
  stroke: var(--accent);
  stroke-width: 0.5;
  stroke-dasharray: 3 1.5;
  pointer-events: none;
}
.sheet-paper svg .ghost.bad {
  fill: #c0392b10;
  stroke: #c0392b;
}
.sheet-paper svg .guide {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.3;
  stroke-dasharray: 1.5 1.5;
  pointer-events: none;
}
.sheet-paper svg .mark-box {
  fill: #147d7010;
  stroke: var(--accent);
  stroke-width: 0.4;
  stroke-dasharray: 2 1;
}
.sheet-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.sheet-form .wide {
  grid-column: 1 / -1;
}
.sheet-form textarea {
  width: 100%;
  font: 12px system-ui;
  resize: vertical;
}
/* the Shared dialog: places, a folder's contents, a file's versions, links */
.share-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 0 0 4px;
}
.share-crumb {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--accent);
  border-radius: 4px;
}
.share-crumb:hover,
.share-name:is(button):hover {
  background: #e6f0ed;
}
.modal .share-note {
  margin: 4px 0 8px;
  line-height: 1.6;
}
.modal .share-sub {
  margin: 12px 0 2px;
  font-weight: 600;
  color: var(--ink);
}
.share-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 4px 0 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e0eae4;
  border-radius: 6px;
}
.share-row {
  display: grid;
  grid-template-columns: minmax(28px, auto) minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  font-size: 12px;
}
.share-row + .share-row {
  border-top: 1px solid #edf3f0;
}
.share-row button {
  font-size: 11.5px;
  padding: 3px 8px;
}
.share-kind {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}
.share-name {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 3px 4px;
  border-radius: 4px;
}
.share-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.share-binned {
  opacity: 0.55;
}
.modal .share-empty {
  margin: 8px 10px;
}
/* descriptions: what a thing is and why, as a comment in code */
.described {
  flex-basis: 100%;
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #4f6668;
  white-space: pre-wrap;
  max-height: 9em;
  overflow: auto;
  cursor: pointer;
}
.described:hover {
  color: #25646b;
}
.description-field textarea {
  width: 100%;
  font: 12px/1.45 system-ui;
  resize: vertical;
  min-height: 90px;
}
.modal .hint {
  margin: -8px 0 4px;
  font-size: 11px;
  line-height: 1.5;
  color: #71888b;
}
/* a joint, moved by hand in a part's actions */
.joint-row {
  flex-basis: 100%;
  min-width: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 11px;
  color: #7a4a0c;
}
.joint-row input[type='range'] {
  flex: 1 1 0;
  width: 0;
  min-width: 40px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: #c27a1f;
}
.joint-row .joint-free {
  flex: 1;
}
.joint-row .joint-name {
  flex: 0 0 34%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.joints-under {
  flex-basis: 100%;
  min-width: 0;
}
.joint-together {
  margin: -2px 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.joint-row .joint-value {
  flex: none;
  width: 52px;
  font-size: 11px;
  padding: 3px 5px;
}
/* The start screen on a short window (a laptop, a small tab): the connection steps keep their room. */
@media (max-height: 820px) {
  .welcome {
    top: 52px;
    bottom: 34px;
    justify-content: safe center;
  }
  .welcome .eyebrow,
  .welcome small {
    display: none;
  }
  .welcome h1 {
    font-size: 30px;
    letter-spacing: -1.4px;
    margin: 0 0 10px;
  }
  .welcome p {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 12px;
  }
  .agent-start ol {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .agent-start li {
    padding: 3px 0 4px;
  }
  .plane-choices {
    margin-top: 10px;
  }
  /* how to orbit says nothing yet on an empty project, and its line is needed by the planes */
  .welcome:not([hidden]) ~ .view-help {
    display: none;
  }
}
/* Folders: the explorer of shared folders and files (src/share/explorer.js). */
.modal.files {
  width: min(1180px, calc(100vw - 30px));
  height: min(760px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
}
.modal.files .panel-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
}
.modal.files .panel-actions:empty {
  display: none;
}
.fx {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 290px;
  outline: none;
}
.fx svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.fx-side {
  border-right: 1px solid #e2ebe7;
  background: #f4f8f7;
  padding: 12px 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fx-side h3 {
  font-size: 9.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #7d948f;
  margin: 14px 6px 4px;
}
.fx-account {
  padding: 10px;
  border: 1px solid #d8e5e0;
  border-radius: 8px;
  background: white;
  margin-bottom: 8px;
}
.fx-account p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #5d7378;
}
.fx-account.on p:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  overflow: hidden;
}
.fx-account.on p:first-child b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-account i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f9e6b;
  flex: none;
}
.fx-account button {
  width: 100%;
  padding: 6px 10px;
}
.fx-account button:not(.primary) {
  border-color: #d8e5e0;
}
.fx-meter {
  height: 5px;
  border-radius: 3px;
  background: #e4edea;
  overflow: hidden;
  margin: 2px 0 5px;
}
.fx-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.fx-small {
  font-size: 11.5px;
  color: #6b8480;
  line-height: 1.5;
}
.fx-account .fx-small {
  font-size: 11px;
}
.fx-none {
  margin: 0 8px;
}
.fx-err {
  color: #a8572c;
}
.fx-place {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  color: #36524f;
}
.fx-place span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-place small {
  font-size: 10px;
  color: #8aa19c;
}
.fx-place svg {
  color: #6f9a8f;
}
.fx-place.here {
  background: #e0efe9;
  color: #1d4f47;
  font-weight: 600;
}
.fx-open {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 4px;
}
.fx-open input {
  flex: 1;
  font-size: 11.5px;
  padding: 6px 7px;
}
.fx-open button {
  padding: 5px 9px;
  border-color: #d1dddc;
  background: white;
}
.fx-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.fx-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid #e8efec;
}
.fx-bar > button {
  padding: 5px 6px;
  color: #4b6965;
}
.fx-crumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 8px;
  padding: 3px 6px;
  border: 1px solid #dfe8e5;
  border-radius: 6px;
  background: white;
  overflow: hidden;
  white-space: nowrap;
}
.fx-crumbs button {
  padding: 2px 5px;
  color: var(--accent);
}
.fx-crumbs b {
  padding: 2px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-crumbs > span {
  color: #a9bab6;
}
#fx-filter {
  width: 140px;
  padding: 5px 8px;
  font-size: 12px;
}
.fx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px 10px;
  min-height: 43px;
  border-bottom: 1px solid #e8efec;
}
.fx-actions button,
.fx-menu button,
.fx-do button {
  padding: 5px 11px;
  border-color: #d6e2de;
  background: white;
  font-size: 12px;
}
.fx-actions button.primary,
.fx-menu button.primary,
.fx-do button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.fx-armed {
  background: #b5532a !important;
  border-color: #b5532a !important;
  color: white !important;
}
.fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.fx-toggle svg {
  width: 13px;
  height: 13px;
}
.fx-toggle.on {
  background: #f3ebe4 !important;
}
.fx-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  outline: none;
  padding-bottom: 8px;
}
.fx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px 8px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 34px;
  font-size: 12.5px;
  color: #6b8480;
  cursor: default;
  user-select: none;
}
.fx-row:not(.fx-head):hover {
  background: #f1f7f5;
}
.fx-row.sel {
  background: #dcefe8;
}
.fx-list:focus .fx-row.sel {
  box-shadow: inset 2px 0 0 var(--accent);
}
.fx-row.binned {
  opacity: 0.55;
}
.fx-head {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 28px;
  background: #fbfefc;
  border-bottom: 1px solid #e8efec;
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: #8aa19c;
}
.fx-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
}
.fx-cell svg {
  color: #6f9a8f;
}
.fx-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-rename {
  flex: 1;
  padding: 3px 6px;
  font-size: 12.5px;
}
.fx-tag {
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 9px;
  background: #efe7df;
  color: #8a5a3a;
  white-space: nowrap;
}
.fx-tag.on {
  background: #dcefe8;
  color: #1d6a5c;
}
.fx-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 10px;
  padding: 8px 10px;
  border: 1px solid #cfe2db;
  border-radius: 7px;
  background: #f4faf8;
  font-size: 12px;
}
.fx-form input {
  flex: 1;
  padding: 5px 8px;
}
.fx-form button {
  padding: 5px 11px;
}
.fx-form button:not(.primary) {
  border-color: #d6e2de;
  background: white;
}
.fx-empty {
  margin: 30px 16px;
  text-align: center;
  color: #8aa19c;
}
.fx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-top: 1px solid #e8efec;
  font-size: 11px;
  color: #8aa19c;
}
.fx-foot button {
  padding: 5px 14px;
  border-color: #d6e2de;
  font-size: 12px;
}
.fx-detail {
  border-left: 1px solid #e2ebe7;
  padding: 18px 16px;
  overflow: auto;
  background: #fbfdfc;
}
.fx-big svg {
  width: 38px;
  height: 38px;
  color: #6f9a8f;
  stroke-width: 1.2;
}
.fx-detail h3 {
  font-family: Manrope, system-ui;
  font-size: 15px;
  margin: 6px 0 4px;
  color: #264d4a;
  overflow-wrap: anywhere;
}
.fx-detail h4 {
  margin: 16px 0 6px;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7d948f;
}
.fx-detail p {
  margin: 0 0 6px;
}
.fx-do {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.fx-versions,
.fx-links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.fx-versions li,
.fx-links li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #edf3f0;
}
.fx-grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #4d6662;
}
.fx-versions small,
.fx-links small {
  color: #8aa19c;
}
.fx-links button {
  padding: 3px 8px;
  font-size: 11px;
  border-color: #e0e8e5;
}
.fx-chip {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 9px;
  background: #e8f0ee;
  color: #46655f;
  white-space: nowrap;
}
.fx-chip.owner {
  background: #dcefe8;
  color: #1d6a5c;
}
.fx-chip.edit {
  background: #f0eadf;
  color: #7a5a2e;
}
.fx-share,
.fx-made {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.fx-share select,
.fx-share input,
.fx-made input {
  min-width: 0;
  font-size: 11.5px;
  padding: 5px 6px;
}
.fx-share input,
.fx-made input {
  flex: 1;
}
.fx-share button,
.fx-made button {
  padding: 5px 9px;
  font-size: 11.5px;
  border-color: #d6e2de;
  background: white;
}
.fx-made button.primary {
  background: var(--accent);
  color: white;
}
.fx-made input {
  font-family: ui-monospace, Consolas, monospace;
}
.fx-menu {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  min-width: 170px;
  background: white;
  border: 1px solid #d6e2de;
  border-radius: 8px;
  box-shadow: 0 10px 30px #253e3a30;
}
.fx-menu button {
  text-align: left;
  border-color: transparent;
}
.fx-menu .fx-toggle {
  margin-left: 0;
}
/* Folders on a tablet or a phone: one column that scrolls as a whole. The bar stays on top (the path on a
   line of its own) and Close at the foot; at Home, the sign-in and Paste a link come first (the places are
   the list); under the list, what is chosen or where one is: its versions, its links, making a link. */
@media (max-width: 980px) {
  .fx {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .fx-main {
    display: contents;
  }
  .fx-bar {
    order: 1;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-wrap: wrap;
    row-gap: 6px;
    background: #fbfefc;
  }
  .fx-crumbs {
    order: 9;
    flex: 1 0 100%;
    margin: 0;
  }
  #fx-filter {
    flex: 1;
    width: auto;
    min-width: 0;
    margin-left: 8px;
  }
  .fx-side {
    display: none;
  }
  .fx-at-home .fx-side {
    order: 2;
    display: flex;
    border-right: 0;
    border-bottom: 1px solid #e2ebe7;
  }
  .fx-at-home .fx-side > :not(.fx-account, .fx-open) {
    display: none;
  }
  .fx-actions {
    order: 3;
    min-height: 0;
  }
  .fx-actions:empty {
    display: none;
  }
  .fx-list {
    order: 4;
    flex: none;
    overflow: visible;
  }
  .fx-head {
    position: static;
  }
  .fx-row {
    grid-template-columns: minmax(0, 1fr) auto auto 0;
    gap: 10px;
    height: 40px;
  }
  .fx-detail {
    order: 5;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid #e2ebe7;
  }
  .fx-foot {
    order: 6;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
    background: #fbfefc;
  }
}
@media (max-width: 760px) {
  /* a phone: Folders fills the screen */
  .modal.files {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  /* a dialog's buttons: four in a row */
  .panel-actions {
    gap: 6px;
    padding: 12px 12px;
  }
  .panel-actions button {
    flex: 1 1 auto;
    padding: 9px 11px;
  }
}
