:root {
  color-scheme: dark;
  --bg: #080d16;
  --bg-2: #0d1420;
  --panel: #111925;
  --panel-raised: #151f2d;
  --panel-soft: #192435;
  --line: #263247;
  --line-soft: #1d293a;
  --text: #f2f5f9;
  --muted: #8996a8;
  --muted-2: #667387;
  --accent: #f5b942;
  --accent-strong: #ffc957;
  --accent-soft: rgba(245, 185, 66, 0.13);
  --cyan: #55d6c2;
  --blue: #62a5ff;
  --danger: #ff6978;
  --left-width: 252px;
  --right-width: 292px;
  --topbar-h: 66px;
  --toolstrip-h: 54px;
  --font-ui: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
}

body.landing-active {
  overflow: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[draggable="true"] {
  -webkit-user-select: none;
  user-select: none;
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: var(--topbar-h) var(--toolstrip-h) minmax(0, 1fr);
  opacity: 1;
  transition: opacity 240ms ease;
}

.app-shell.workspace-hidden {
  display: none;
  opacity: 0;
}

.topbar {
  display: grid;
  grid-template-columns: var(--left-width) minmax(280px, 1fr) auto;
  align-items: center;
  background: #0c121d;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  border-right: 1px solid var(--line);
}

.workspace-brand {
  width: 100%;
  border-top: none;
  border-bottom: none;
  border-left: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #111720;
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 7px 18px rgba(245, 185, 66, 0.13);
}

.brand-mark svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.11em;
  font-size: 14px;
}

.brand-tag {
  color: var(--accent);
  font: 700 8px/1 var(--font-mono);
  letter-spacing: 0.08em;
  border: 1px solid rgba(245, 185, 66, 0.45);
  padding: 3px 4px;
  border-radius: 3px;
}

.project-meta {
  min-width: 0;
  padding-left: 20px;
}

.project-path {
  color: var(--muted-2);
  font-size: 10px;
  margin-bottom: 3px;
}

.project-path span {
  color: var(--muted);
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

#project-title {
  width: min(390px, 50vw);
  border: none;
  padding: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 15px;
  font-weight: 650;
}

.save-state {
  color: var(--muted-2);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(85, 214, 194, 0.1);
}

.save-state.saving .save-dot {
  background: var(--accent);
}

.top-actions {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.btn {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--panel);
  color: #dbe2eb;
}

.btn-ghost:hover {
  background: var(--panel-soft);
  border-color: #39485e;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #10151d;
  font-weight: 750;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn svg,
.tool-action svg,
.search-box svg {
  width: 15px;
  height: 15px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--line);
}

.icon-btn.small {
  width: 27px;
  height: 27px;
}

.toolstrip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 15;
}

.tool-group {
  display: flex;
  align-items: center;
}

.primary-tools {
  height: 100%;
  gap: 2px;
}

.tool-btn {
  height: 41px;
  min-width: 48px;
  padding: 5px 8px 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.tool-btn svg {
  width: 17px;
  height: 17px;
}

.tool-btn small {
  font-size: 9px;
}

.tool-btn:hover,
.tool-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.compact {
  gap: 2px;
}

.divider {
  height: 25px;
  width: 1px;
  background: var(--line);
}

.layout-group {
  gap: 5px;
}

.tool-action {
  height: 33px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #bac4d1;
  border-radius: 7px;
  cursor: pointer;
}

.tool-action:hover {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--text);
}

kbd {
  color: var(--muted-2);
  background: #0b111b;
  border: 1px solid #2b3749;
  border-bottom-color: #3a475a;
  border-radius: 4px;
  padding: 2px 5px;
  font: 9px/1.1 var(--font-mono);
}

.toolstrip-spacer {
  flex: 1;
}

.canvas-toggles {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-label {
  color: var(--muted);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-label span {
  width: 25px;
  height: 14px;
  background: #263144;
  border-radius: 20px;
  position: relative;
  transition: 150ms ease;
}

.toggle-label span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: 150ms ease;
}

.toggle-label input:checked + span {
  background: rgba(245, 185, 66, 0.35);
}

.toggle-label input:checked + span::after {
  left: 14px;
  background: var(--accent);
}

.zoom-pill {
  height: 28px;
  min-width: 51px;
  padding: 0 9px;
  background: #0c131f;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font: 10px var(--font-mono);
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: var(--left-width) minmax(320px, 1fr) var(--right-width);
}

.left-panel,
.right-panel {
  min-height: 0;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.left-panel {
  border-right: 1px solid var(--line);
}

.right-panel {
  border-left: 1px solid var(--line);
}

.panel-heading {
  min-height: 65px;
  padding: 14px 15px 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow {
  display: block;
  color: var(--accent);
  font: 700 8px/1 var(--font-mono);
  letter-spacing: 0.14em;
  margin-bottom: 7px;
}

.panel-heading h2,
.modal-header h2 {
  margin: 0;
  color: #e8edf3;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.search-box {
  height: 34px;
  margin: 0 14px 10px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 10px;
  gap: 8px;
  border: 1px solid var(--line);
  background: #0d141f;
  border-radius: 7px;
  color: var(--muted-2);
}

.search-box:focus-within {
  border-color: rgba(245, 185, 66, 0.65);
  box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.08);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-box input::placeholder {
  color: #59667a;
}

.library {
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 16px;
  scrollbar-width: thin;
  scrollbar-color: #344154 transparent;
}

.library-section {
  border-top: 1px solid var(--line-soft);
  padding: 11px 4px 5px;
}

.library-section:first-child {
  border-top: none;
}

.library-section-title {
  width: 100%;
  padding: 2px 4px 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9ba7b7;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.library-section-title span:last-child {
  transition: transform 150ms ease;
}

.library-section.collapsed .library-section-title span:last-child {
  transform: rotate(-90deg);
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.library-section.collapsed .shape-grid {
  display: none;
}

.shape-item {
  min-width: 0;
  height: 65px;
  border: 1px solid transparent;
  background: #0d151f;
  color: #9aa7b7;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: grab;
  transition: 130ms ease;
}

.shape-item:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(245, 185, 66, 0.33);
  transform: translateY(-1px);
}

.shape-item:active {
  cursor: grabbing;
}

.shape-item svg {
  width: 27px;
  height: 27px;
}

.shape-item span {
  max-width: 100%;
  overflow: hidden;
  padding: 0 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.left-footer {
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #0f1722;
}

.left-footer button {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(245, 185, 66, 0.2);
  border-radius: 7px;
  background: linear-gradient(115deg, rgba(245, 185, 66, 0.12), rgba(245, 185, 66, 0.035));
  color: var(--accent);
  display: grid;
  grid-template-columns: 23px 1fr 18px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.left-footer svg {
  width: 15px;
}

.left-footer b,
.left-footer small {
  display: block;
}

.left-footer b {
  font-size: 10px;
}

.left-footer small {
  color: var(--muted-2);
  font-size: 8px;
  margin-top: 3px;
}

.canvas-area {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0b111b;
}

#stage {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
  cursor: default;
}

#stage[data-tool="hand"] {
  cursor: grab;
}

#stage[data-tool="hand"].is-panning {
  cursor: grabbing;
}

#stage[data-tool="connect"] {
  cursor: crosshair;
}

.canvas-badge {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  background: rgba(12, 19, 30, 0.82);
  border: 1px solid rgba(55, 70, 91, 0.75);
  border-radius: 5px;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.canvas-badge span:nth-child(2) {
  color: var(--cyan);
  font: 700 8px var(--font-mono);
  letter-spacing: 0.09em;
}

.canvas-badge b {
  padding-left: 7px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 500 8px var(--font-mono);
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(85, 214, 194, 0.1);
}

.canvas-hint {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 50%;
  transform: translate(-50%, -10px);
  opacity: 0;
  pointer-events: none;
  height: 35px;
  padding: 0 10px;
  background: #151f2d;
  border: 1px solid rgba(245, 185, 66, 0.42);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d8dee7;
  font-size: 10px;
  transition: 160ms ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.canvas-hint.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.canvas-hint svg {
  width: 15px;
  color: var(--accent);
}

.minimap-wrap {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 14px;
  width: 214px;
  background: rgba(13, 20, 31, 0.92);
  border: 1px solid #2b3749;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.minimap-title {
  height: 27px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.minimap-title button {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 8px;
  cursor: pointer;
}

#minimap {
  display: block;
  width: 100%;
  height: 120px;
  background: #0a111b;
}

.zoom-controls {
  position: absolute;
  z-index: 5;
  left: 14px;
  bottom: 14px;
  height: 34px;
  display: flex;
  overflow: hidden;
  border: 1px solid #2c384a;
  background: rgba(13, 20, 31, 0.94);
  border-radius: 7px;
}

.zoom-controls button {
  width: 34px;
  border: none;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.zoom-controls button:last-child {
  border-right: none;
}

.zoom-controls button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.zoom-controls svg {
  width: 14px;
}

.right-heading {
  border-bottom: 1px solid var(--line-soft);
}

#inspector {
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 24px;
  scrollbar-width: thin;
  scrollbar-color: #344154 transparent;
}

.inspect-empty {
  padding: 44px 14px;
  color: var(--muted-2);
  text-align: center;
}

.inspect-empty .empty-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border: 1px dashed #354258;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #57657a;
}

.inspect-empty svg {
  width: 22px;
}

.inspect-empty b {
  display: block;
  color: #aab4c2;
  margin-bottom: 6px;
  font-size: 11px;
}

.inspect-empty p {
  margin: 0;
  font-size: 9px;
  line-height: 1.7;
}

.inspect-section {
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.inspect-section:last-child {
  border-bottom: none;
}

.inspect-section-title {
  margin-bottom: 11px;
  color: #8592a5;
  font: 700 8px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.field {
  display: block;
  margin-bottom: 10px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.field input,
.field textarea,
.field select,
.field-row input,
.field-row select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  background: #0d141f;
  color: #dce2ea;
  border-radius: 5px;
  padding: 7px 8px;
  font-size: 10px;
}

.field textarea {
  resize: vertical;
  min-height: 61px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.field-row input:focus,
.field-row select:focus {
  border-color: rgba(245, 185, 66, 0.65);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.field-row label {
  color: var(--muted);
  font-size: 9px;
}

.field-row input,
.field-row select {
  margin-top: 5px;
}

.color-field {
  display: flex;
  gap: 7px;
  align-items: center;
}

.color-field input[type="color"] {
  width: 34px;
  height: 30px;
  flex: 0 0 auto;
  padding: 3px;
}

.color-field input[type="text"] {
  flex: 1;
  font-family: var(--font-mono);
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 185, 66, 0.24);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 9px;
}

.type-chip svg {
  width: 15px;
}

.property-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.property-badges span {
  padding: 4px 6px;
  border-radius: 4px;
  background: #192435;
  color: #8694a7;
  font: 8px var(--font-mono);
}

.danger-action {
  width: 100%;
  border: 1px solid rgba(255, 105, 120, 0.3);
  background: rgba(255, 105, 120, 0.07);
  color: #ff8590;
  border-radius: 5px;
  padding: 7px;
  cursor: pointer;
  font-size: 9px;
}

.dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 7px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  background: #151e2b;
  border: 1px solid #354257;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: 130ms ease;
}

.dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-wrap {
  position: relative;
}

.dropdown button {
  width: 100%;
  border: none;
  border-radius: 5px;
  padding: 8px 9px;
  background: transparent;
  color: #c5ceda;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-size: 10px;
}

.dropdown button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.export-menu button {
  display: grid;
  grid-template-columns: 60px 1fr;
}

.export-menu button b {
  color: #e9edf2;
  font: 700 9px var(--font-mono);
}

.export-menu button span {
  color: var(--muted-2);
  font-size: 8px;
}

.layout-menu {
  left: 0;
  right: auto;
  min-width: 135px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 6vh 22px;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(850px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #121b28;
  border: 1px solid #344157;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(10px) scale(0.99);
  transition: transform 180ms ease;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 23px 25px 18px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 18px;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.modal-close:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  padding: 18px 20px 22px;
}

.template-card {
  min-height: 174px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c141f;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.template-card:hover {
  border-color: rgba(245, 185, 66, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.template-preview {
  position: relative;
  height: 105px;
  overflow: hidden;
  background-color: #0a111b;
  background-image: linear-gradient(#1a2534 1px, transparent 1px),
    linear-gradient(90deg, #1a2534 1px, transparent 1px);
  background-size: 12px 12px;
}

.preview-node {
  position: absolute;
  min-width: 34px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border: 1px solid var(--preview-color, #62a5ff);
  background: color-mix(in srgb, var(--preview-color, #62a5ff) 13%, #0e1723);
  color: var(--preview-color, #62a5ff);
  border-radius: 3px;
  font: 5px var(--font-mono);
}

.preview-line {
  position: absolute;
  height: 1px;
  transform-origin: 0 0;
  background: #59677b;
}

.template-info {
  padding: 11px 12px 12px;
}

.template-info b {
  display: block;
  color: #dfe5ed;
  font-size: 11px;
  margin-bottom: 5px;
}

.template-info span {
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.quick-dialog {
  width: min(720px, 100%);
}

.tabs {
  height: 45px;
  padding: 0 24px;
  display: flex;
  gap: 19px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  height: 100%;
  padding: 0 2px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.quick-editor {
  margin: 18px 23px 10px;
  min-height: 190px;
  display: grid;
  grid-template-columns: 38px 1fr;
  border: 1px solid #2d3a4e;
  border-radius: 7px;
  overflow: hidden;
  background: #090f18;
}

.editor-gutter {
  padding-top: 14px;
  border-right: 1px solid #202b3c;
  color: #46546a;
  text-align: center;
  font: 11px/1.7 var(--font-mono);
  user-select: none;
}

.quick-editor textarea {
  min-height: 190px;
  padding: 14px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: #dbe3ed;
  caret-color: var(--accent);
  font: 12px/1.7 var(--font-mono);
}

.quick-tips {
  padding: 0 24px;
  color: var(--muted-2);
  font-size: 9px;
}

.quick-tips code {
  color: var(--accent);
  font-family: var(--font-mono);
}

.modal-actions {
  padding: 18px 23px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.help-dialog {
  width: min(470px, 100%);
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 11px 22px;
  align-items: center;
  padding: 22px 25px 28px;
  color: #aab5c4;
  font-size: 10px;
}

.shortcut-grid kbd {
  min-width: 78px;
  text-align: center;
  padding: 5px 8px;
}

.toast-region {
  position: fixed;
  z-index: 500;
  top: 78px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.toast {
  min-width: 210px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #172231;
  border: 1px solid #38465b;
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  color: #dbe2eb;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.34);
  font-size: 10px;
  animation: toast-in 180ms ease both;
}

.toast.warn {
  border-left-color: var(--accent);
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes toast-in {
  from {
    transform: translateX(12px);
    opacity: 0;
  }
}

/* SVG styles */
.edge {
  cursor: pointer;
}

.edge .edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
}

.edge .edge-line {
  fill: none;
  stroke: #67778c;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.edge.selected .edge-line {
  stroke: var(--accent);
}

.edge-label-bg {
  fill: #121b28;
  stroke: #303d50;
  stroke-width: 1;
}

.edge-label {
  fill: #9eabbc;
  font: 9px var(--font-ui);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.node {
  cursor: move;
  filter: url(#node-shadow);
}

.node.locked {
  cursor: not-allowed;
}

.node-body {
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.node.selected .node-body,
.node.connect-source .node-body {
  stroke: var(--accent) !important;
  stroke-width: 2.2;
}

.node.connect-source .node-body {
  stroke-dasharray: 5 3;
}

.node-title {
  fill: #edf1f5;
  font-family: var(--font-ui);
  font-weight: 650;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}

.node-subtitle {
  fill: #8190a4;
  font: 8px var(--font-mono);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}

.node-icon {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.port {
  fill: #111925;
  stroke: var(--accent);
  stroke-width: 1.4;
  cursor: crosshair;
  opacity: 0;
  transition: opacity 100ms ease;
}

.node.selected .port,
.node:hover .port,
#stage[data-tool="connect"] .port {
  opacity: 1;
}

.selection-box {
  fill: rgba(245, 185, 66, 0.08);
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
}

.alignment-guide {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.75;
  vector-effect: non-scaling-stroke;
}

.connection-preview {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

body.left-collapsed .workspace {
  grid-template-columns: 0 minmax(320px, 1fr) var(--right-width);
}

body.right-collapsed .workspace {
  grid-template-columns: var(--left-width) minmax(320px, 1fr) 0;
}

body.left-collapsed.right-collapsed .workspace {
  grid-template-columns: 0 minmax(320px, 1fr) 0;
}

body.left-collapsed .left-panel,
body.right-collapsed .right-panel {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {
  :root {
    --left-width: 225px;
    --right-width: 265px;
  }

  .tool-action kbd,
  .tool-btn small,
  .toggle-label {
    display: none;
  }

  .tool-btn {
    min-width: 35px;
  }
}

@media (max-width: 820px) {
  :root {
    --left-width: 0px;
    --right-width: 0px;
  }

  .left-panel,
  .right-panel {
    display: none;
  }

  .topbar {
    grid-template-columns: 176px 1fr auto;
  }

  .brand {
    padding: 0 10px;
  }

  .project-meta {
    padding-left: 10px;
  }

  .save-state,
  .top-actions .btn-ghost,
  #help-btn,
  .layout-group {
    display: none;
  }

  .toolstrip {
    padding: 0 6px;
  }

  .canvas-toggles {
    gap: 5px;
  }

  .minimap-wrap {
    display: none;
  }
}

/* ─── Product landing ─────────────────────────────────────────────── */
.landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 79% 42%, rgba(48, 125, 145, 0.1), transparent 31%),
    radial-gradient(circle at 24% 32%, rgba(245, 185, 66, 0.055), transparent 30%),
    #070b12;
  color: var(--text);
  isolation: isolate;
  transition: opacity 360ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.landing.leaving {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

.landing-grid {
  position: absolute;
  inset: 0;
  z-index: -4;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(74, 91, 115, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 91, 115, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.9) 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.9) 68%, transparent 100%);
}

.landing-grid::before,
.landing-grid::after {
  content: "";
  position: absolute;
  background: rgba(245, 185, 66, 0.34);
}

.landing-grid::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 1px;
  opacity: 0.22;
}

.landing-grid::after {
  right: 0;
  left: 0;
  top: 50%;
  height: 1px;
  opacity: 0.13;
}

.landing-noise {
  position: absolute;
  inset: 0;
  z-index: 20;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.aurora {
  position: absolute;
  z-index: -3;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  animation: aurora-drift 10s ease-in-out infinite alternate;
}

.aurora-one {
  width: 500px;
  height: 380px;
  right: 4%;
  top: 20%;
  background: rgba(50, 132, 154, 0.1);
}

.aurora-two {
  width: 360px;
  height: 300px;
  left: 12%;
  top: 30%;
  background: rgba(245, 185, 66, 0.055);
  animation-delay: -4s;
}

@keyframes aurora-drift {
  to {
    transform: translate3d(35px, -24px, 0) scale(1.13);
  }
}

.landing-nav {
  position: relative;
  z-index: 12;
  width: min(1440px, calc(100% - 72px));
  height: 84px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(91, 108, 132, 0.23);
}

.landing-brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.landing-brand .brand-mark {
  width: 35px;
  height: 35px;
}

.landing-brand .brand-name {
  font-size: 14px;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav-links a {
  position: relative;
  color: #8895a7;
  text-decoration: none;
  font-size: 10px;
  transition: color 150ms ease;
}

.landing-nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 150ms ease;
}

.landing-nav-links a:hover {
  color: var(--text);
}

.landing-nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #556276;
  font: 700 8px var(--font-mono);
  letter-spacing: 0.09em;
}

.nav-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(85, 214, 194, 0.07);
}

.landing-nav-cta {
  justify-self: end;
  height: 35px;
  padding: 0 4px 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-bottom: 1px solid rgba(245, 185, 66, 0.45);
  background: transparent;
  color: #d8dee7;
  cursor: pointer;
  font-size: 10px;
}

.landing-nav-cta svg {
  width: 14px;
  color: var(--accent);
  transition: transform 150ms ease;
}

.landing-nav-cta:hover svg {
  transform: translateX(4px);
}

.landing-main {
  width: min(1440px, calc(100% - 72px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 686px;
  display: grid;
  grid-template-columns: minmax(500px, 0.92fr) minmax(520px, 1.08fr);
  align-items: center;
  border-right: 1px solid rgba(91, 108, 132, 0.16);
  border-left: 1px solid rgba(91, 108, 132, 0.16);
}

.hero-copy {
  position: relative;
  z-index: 5;
  padding: 54px 0 46px 54px;
}

.hero-kicker {
  margin-bottom: 27px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font: 700 8px var(--font-mono);
  letter-spacing: 0.12em;
}

.hero-kicker b {
  margin-left: 7px;
  color: #4f5b6f;
  font-weight: 500;
}

.kicker-line {
  width: 34px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.5);
}

.hero h1 {
  margin: 0;
  color: #f3f5f7;
  font-size: clamp(55px, 5.15vw, 82px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 span {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(218, 226, 236, 0.62);
}

.hero h1 span::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(245, 185, 66, 0.65);
}

.hero-lead {
  margin: 27px 0 0;
  color: #8794a6;
  font-size: 13px;
  line-height: 1.9;
}

.prompt-composer {
  width: min(610px, calc(100% - 42px));
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(69, 84, 105, 0.76);
  border-radius: 2px;
  background: rgba(11, 18, 28, 0.9);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.prompt-composer:focus-within {
  border-color: rgba(245, 185, 66, 0.62);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(245, 185, 66, 0.045);
}

.prompt-topline {
  height: 34px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(47, 60, 78, 0.68);
  color: #4f5d71;
  font: 700 7px var(--font-mono);
  letter-spacing: 0.09em;
}

.prompt-topline span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
}

.prompt-topline i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 5px rgba(85, 214, 194, 0.1);
  }
}

#landing-prompt {
  width: 100%;
  min-height: 86px;
  padding: 16px 16px 8px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: #dfe5ec;
  caret-color: var(--accent);
  font: 12px/1.75 var(--font-mono);
}

.prompt-actions {
  min-height: 48px;
  padding: 7px 8px 8px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompt-suggestions {
  display: flex;
  gap: 5px;
}

.prompt-suggestions button {
  padding: 4px 7px;
  border: 1px solid #273348;
  border-radius: 3px;
  background: #101927;
  color: #627085;
  cursor: pointer;
  font-size: 8px;
  transition: 130ms ease;
}

.prompt-suggestions button:hover {
  color: var(--accent);
  border-color: rgba(245, 185, 66, 0.35);
}

.generate-hero-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 7px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #0e141c;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.generate-hero-btn svg {
  width: 14px;
}

.generate-hero-btn kbd {
  margin-left: 3px;
  border-color: rgba(15, 22, 31, 0.28);
  background: rgba(14, 20, 28, 0.12);
  color: #2d3032;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-primary {
  position: relative;
  min-width: 148px;
  height: 46px;
  padding: 0 10px 0 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #48566b;
  border-radius: 2px;
  background: rgba(15, 23, 35, 0.85);
  color: #e9edf2;
  cursor: pointer;
  font-size: 11px;
  transition: 150ms ease;
}

.hero-primary::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.button-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #111720;
}

.button-arrow svg {
  width: 14px;
}

.hero-primary:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-note {
  color: #546174;
  font-size: 9px;
}

.hero-visual {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 620px;
  transform-style: preserve-3d;
  transition: transform 100ms ease-out;
}

.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10% 3%;
  background: radial-gradient(circle, rgba(40, 101, 119, 0.08), transparent 66%);
}

.visual-coordinate {
  position: absolute;
  color: #364256;
  font: 7px var(--font-mono);
  letter-spacing: 0.12em;
}

.visual-coordinate.top {
  top: 24px;
  left: 50%;
}

.visual-coordinate.side {
  top: 49%;
  right: 10px;
  writing-mode: vertical-rl;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(92, 111, 137, 0.19);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(245, 185, 66, 0.55);
  background: #0a111a;
  transform: rotate(45deg);
}

.orbit::before {
  left: 14%;
  top: 10%;
}

.orbit::after {
  right: 5%;
  bottom: 25%;
}

.orbit-large {
  width: 530px;
  height: 530px;
  animation: orbit-spin 42s linear infinite;
}

.orbit-medium {
  width: 390px;
  height: 390px;
  border-style: dashed;
  animation: orbit-spin 30s linear infinite reverse;
}

.orbit-small {
  width: 230px;
  height: 230px;
  opacity: 0.75;
  animation: orbit-spin 22s linear infinite;
}

@keyframes orbit-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.radar-sweep {
  position: absolute;
  left: calc(50% - 210px);
  top: calc(50% - 210px);
  width: 420px;
  height: 420px;
  border-radius: 50%;
  opacity: 0.22;
  background: conic-gradient(from 30deg, transparent 0 77%, rgba(85, 214, 194, 0.18) 94%, rgba(85, 214, 194, 0.5) 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 12%, black 75%);
  mask-image: radial-gradient(circle, transparent 0 12%, black 75%);
  animation: radar 8s linear infinite;
}

@keyframes radar {
  to {
    transform: rotate(360deg);
  }
}

.visual-crosshair {
  position: absolute;
  color: #59677c;
  font: 15px var(--font-mono);
}

.crosshair-a {
  left: 17%;
  top: 19%;
}

.crosshair-b {
  right: 12%;
  bottom: 18%;
}

.hero-node {
  position: absolute;
  z-index: 4;
  min-width: 165px;
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #4a5b70;
  border-radius: 3px;
  background: rgba(12, 20, 31, 0.88);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.34), inset 0 0 25px rgba(98, 165, 255, 0.025);
  backdrop-filter: blur(10px);
}

.hero-node::before,
.hero-node::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: var(--node-color, #62a5ff);
}

.hero-node::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.hero-node::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.hero-node-icon {
  width: 29px;
  height: 29px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--node-color, #62a5ff) 35%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--node-color, #62a5ff) 8%, transparent);
  color: var(--node-color, #62a5ff);
}

.hero-node-icon svg {
  width: 15px;
}

.hero-node b,
.hero-node small {
  display: block;
  white-space: nowrap;
}

.hero-node b {
  margin-bottom: 4px;
  color: #dce2e9;
  font: 700 9px var(--font-mono);
  letter-spacing: 0.03em;
}

.hero-node small {
  color: #647187;
  font: 7px var(--font-mono);
}

.node-port {
  position: absolute;
  right: -4px;
  top: calc(50% - 3px);
  width: 7px;
  height: 7px;
  border: 1px solid var(--node-color, #62a5ff);
  border-radius: 50%;
  background: #0a111a;
}

.node-camera {
  --node-color: #9c83ff;
  left: 3%;
  top: 22%;
}

.node-detect {
  --node-color: #62a5ff;
  left: 38%;
  top: 38%;
}

.node-flight {
  --node-color: #ff8e6e;
  right: 0;
  top: 57%;
}

.node-ground {
  --node-color: #55d6c2;
  left: 32%;
  bottom: 13%;
}

.hero-links {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero-link {
  fill: none;
  stroke: #46566c;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.packet {
  fill: var(--accent);
  filter: url(#hero-glow);
}

.packet-c {
  fill: var(--cyan);
}

.visual-readout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #455267;
  font: 7px var(--font-mono);
  letter-spacing: 0.08em;
}

.visual-readout b {
  color: var(--cyan);
  font-size: 8px;
}

.readout-top {
  top: 13%;
  right: 7%;
}

.readout-bottom {
  right: 5%;
  bottom: 7%;
}

.visual-caption {
  position: absolute;
  left: 4%;
  bottom: 5%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4d5a6d;
  font: 7px var(--font-mono);
  letter-spacing: 0.09em;
}

.visual-caption i {
  width: 23px;
  height: 1px;
  background: #4d5a6d;
}

.capability-strip {
  min-height: 112px;
  display: grid;
  grid-template-columns: 150px repeat(4, 1fr);
  border: 1px solid rgba(91, 108, 132, 0.19);
}

.capability-index {
  padding-left: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(91, 108, 132, 0.19);
}

.capability-index span {
  color: var(--accent);
  font: 400 20px var(--font-mono);
}

.capability-index b {
  margin-top: 5px;
  color: #465368;
  font: 700 7px var(--font-mono);
  letter-spacing: 0.12em;
}

.capability-strip article {
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-right: 1px solid rgba(91, 108, 132, 0.19);
  transition: background 160ms ease;
}

.capability-strip article:last-child {
  border-right: none;
}

.capability-strip article:hover {
  background: rgba(245, 185, 66, 0.035);
}

.capability-strip article > span {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #2a3648;
  color: var(--accent);
}

.capability-strip article svg {
  width: 15px;
}

.capability-strip b,
.capability-strip small {
  display: block;
}

.capability-strip b {
  margin-bottom: 6px;
  color: #bdc6d2;
  font-size: 10px;
}

.capability-strip small {
  color: #556276;
  font-size: 8px;
  line-height: 1.5;
}

.landing-footer {
  width: min(1440px, calc(100% - 72px));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #3f4b5e;
  font: 7px var(--font-mono);
  letter-spacing: 0.08em;
}

.landing-footer div {
  display: flex;
  gap: 25px;
}

.landing-footer b {
  color: #536075;
  font-weight: 600;
}

.landing-footer > span:last-child {
  justify-self: end;
}

@media (max-width: 1180px) {
  .landing-nav,
  .landing-main,
  .landing-footer {
    width: min(100% - 36px, 1100px);
  }

  .hero {
    grid-template-columns: minmax(470px, 1fr) minmax(420px, 0.9fr);
  }

  .hero-copy {
    padding-left: 36px;
  }

  .orbit-large {
    width: 440px;
    height: 440px;
  }

  .hero-node {
    min-width: 150px;
  }

  .capability-strip {
    grid-template-columns: 115px repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .landing-nav {
    grid-template-columns: 1fr auto;
  }

  .landing-nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 70px 30px 30px;
  }

  .hero h1 {
    font-size: clamp(50px, 11vw, 75px);
  }

  .prompt-composer {
    width: 100%;
  }

  .hero-visual {
    width: min(660px, 100%);
    height: 560px;
    margin: 0 auto;
  }

  .capability-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .capability-index {
    display: none;
  }

  .capability-strip article {
    min-height: 95px;
    border-bottom: 1px solid rgba(91, 108, 132, 0.19);
  }
}

@media (max-width: 600px) {
  .landing-nav,
  .landing-main,
  .landing-footer {
    width: calc(100% - 20px);
  }

  .landing-nav {
    height: 70px;
  }

  .landing-brand .brand-tag,
  .landing-nav-cta {
    display: none;
  }

  .hero-copy {
    padding: 55px 17px 30px;
  }

  .hero-kicker b,
  .prompt-topline span:last-child,
  .prompt-suggestions {
    display: none;
  }

  .prompt-actions {
    justify-content: flex-end;
  }

  .hero-actions {
    justify-content: space-between;
  }

  .hero-visual {
    height: 440px;
    transform: scale(0.84);
    transform-origin: center top;
    margin-bottom: -70px;
  }

  .orbit-large {
    width: 400px;
    height: 400px;
  }

  .hero-node {
    min-width: 142px;
  }

  .node-flight {
    right: 2%;
  }

  .capability-strip {
    grid-template-columns: 1fr;
  }

  .capability-strip article {
    border-right: none;
  }

  .landing-footer {
    grid-template-columns: 1fr 1fr;
  }

  .landing-footer div {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .orbit,
  .radar-sweep,
  .prompt-topline i {
    animation: none;
  }
}

/* ─── Expanded landing narrative ────────────────────────────────── */
.landing-section {
  position: relative;
  padding: 118px 56px;
  border-right: 1px solid rgba(91, 108, 132, 0.16);
  border-bottom: 1px solid rgba(91, 108, 132, 0.19);
  border-left: 1px solid rgba(91, 108, 132, 0.16);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 52px;
}

.section-heading.compact-heading {
  max-width: 930px;
}

.section-index {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font: 700 8px var(--font-mono);
  letter-spacing: 0.14em;
}

.section-heading h2,
.export-copy h2,
.landing-cta h2 {
  margin: 0;
  color: #eef2f6;
  font-size: clamp(34px, 3.3vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-heading p,
.export-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #748196;
  font-size: 12px;
  line-height: 1.9;
}

.diagram-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #223047;
  border-left: 1px solid #223047;
}

.diagram-type-card {
  position: relative;
  min-height: 245px;
  padding: 27px;
  overflow: hidden;
  border-right: 1px solid #223047;
  border-bottom: 1px solid #223047;
  background: rgba(10, 16, 25, 0.55);
  transition: transform 200ms ease, background 200ms ease;
}

.diagram-type-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -90px;
  bottom: -90px;
  border: 1px solid rgba(85, 214, 194, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(85, 214, 194, 0.025), 0 0 0 58px rgba(85, 214, 194, 0.018);
  transition: transform 300ms ease;
}

.diagram-type-card:hover {
  z-index: 2;
  background: rgba(19, 29, 43, 0.84);
  transform: translateY(-4px);
}

.diagram-type-card:hover::after {
  transform: scale(1.2);
}

.diagram-type-card.featured {
  background: linear-gradient(145deg, rgba(245, 185, 66, 0.075), rgba(10, 16, 25, 0.7));
}

.type-card-top {
  display: flex;
  justify-content: space-between;
  color: #46546a;
  font: 8px var(--font-mono);
}

.type-card-top i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #2b394f;
  color: var(--accent);
  font-style: normal;
}

.type-card-top svg {
  width: 15px;
}

.diagram-type-card h3 {
  margin: 42px 0 12px;
  color: #dbe2ea;
  font-size: 17px;
}

.diagram-type-card p {
  max-width: 310px;
  margin: 0;
  color: #657287;
  font-size: 10px;
  line-height: 1.8;
}

.mini-flow {
  margin-top: 28px;
  display: flex;
  align-items: center;
}

.mini-flow b {
  padding: 7px 8px;
  border: 1px solid #35516a;
  background: #101a28;
  color: #7d90a8;
  font: 6px var(--font-mono);
}

.mini-flow b.risk {
  border-color: rgba(255, 105, 120, 0.55);
  color: var(--danger);
}

.mini-flow i {
  width: 24px;
  height: 1px;
  background: #3b4c62;
}

.feature-timeline {
  background:
    linear-gradient(90deg, rgba(85, 214, 194, 0.025), transparent 45%),
    rgba(8, 13, 22, 0.56);
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #243147;
  border: 1px solid #243147;
}

.industry-grid article {
  min-height: 285px;
  padding: 28px 24px;
  background: #0b121d;
  transition: background 180ms ease;
}

.industry-grid article:hover {
  background: #101a28;
}

.industry-code {
  color: var(--cyan);
  font: 7px var(--font-mono);
  letter-spacing: 0.13em;
}

.industry-grid h3 {
  margin: 66px 0 14px;
  color: #dce3eb;
  font-size: 20px;
}

.industry-grid p {
  min-height: 55px;
  margin: 0 0 25px;
  color: #657287;
  font-size: 10px;
  line-height: 1.8;
}

.industry-grid article div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.industry-grid article b {
  padding: 5px 7px;
  border: 1px solid #273449;
  border-radius: 3px;
  color: #7d8aa0;
  font-size: 7px;
  font-weight: 550;
}

.export-section {
  min-height: 515px;
  display: grid;
  grid-template-columns: 1fr 470px;
  align-items: center;
  gap: 80px;
  overflow: hidden;
}

.format-orbit {
  position: relative;
  width: 390px;
  height: 390px;
  margin: auto;
  border: 1px solid rgba(98, 165, 255, 0.2);
  border-radius: 50%;
  animation: orbit-spin 34s linear infinite;
}

.format-orbit::before,
.format-orbit::after {
  content: "";
  position: absolute;
  inset: 54px;
  border: 1px dashed rgba(85, 214, 194, 0.18);
  border-radius: 50%;
}

.format-orbit::after {
  inset: 122px;
  border-style: solid;
  background: radial-gradient(circle, rgba(85, 214, 194, 0.08), transparent 70%);
}

.format-orbit span {
  position: absolute;
  min-width: 52px;
  padding: 7px 9px;
  border: 1px solid #334158;
  border-radius: 3px;
  background: #0d1622;
  color: #93a0b2;
  text-align: center;
  font: 7px var(--font-mono);
  animation: orbit-spin 34s linear infinite reverse;
}

.format-orbit span:nth-child(1) { left: calc(50% - 27px); top: -14px; }
.format-orbit span:nth-child(2) { right: -12px; top: 27%; }
.format-orbit span:nth-child(3) { right: 30px; bottom: 16px; }
.format-orbit span:nth-child(4) { left: 24px; bottom: 23px; }
.format-orbit span:nth-child(5) { left: -20px; top: 31%; }

.format-orbit b {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cyan);
  text-align: center;
  font: 700 11px/1.6 var(--font-mono);
  letter-spacing: 0.16em;
  animation: orbit-spin 34s linear infinite reverse;
}

.landing-cta {
  min-height: 570px;
  padding: 120px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(91, 108, 132, 0.16);
  border-left: 1px solid rgba(91, 108, 132, 0.16);
  background:
    radial-gradient(circle at 50% 70%, rgba(245, 185, 66, 0.075), transparent 33%),
    linear-gradient(rgba(8, 13, 22, 0.35), rgba(8, 13, 22, 0.92));
  text-align: center;
}

.landing-cta > span {
  margin-bottom: 24px;
  color: var(--accent);
  font: 8px var(--font-mono);
  letter-spacing: 0.14em;
}

.landing-cta .hero-primary {
  margin-top: 38px;
  min-width: 190px;
}

/* ─── Template center ────────────────────────────────────────────── */
.template-center {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 10%, rgba(85, 214, 194, 0.075), transparent 26%),
    radial-gradient(circle at 15% 55%, rgba(98, 165, 255, 0.055), transparent 25%),
    #080d16;
  color: var(--text);
}

.template-center.workspace-hidden {
  display: none;
}

.template-center-grid {
  position: fixed;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 91, 115, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 91, 115, 0.14) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black, transparent 78%);
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 78%);
}

.template-center-nav {
  position: relative;
  z-index: 4;
  width: min(1380px, calc(100% - 70px));
  height: 84px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(91, 108, 132, 0.24);
}

.template-center-nav .nav-status {
  justify-self: end;
}

.template-back {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: none;
  background: transparent;
  color: #748196;
  cursor: pointer;
  font-size: 9px;
}

.template-back:hover {
  color: var(--text);
}

.template-back svg {
  width: 14px;
  color: var(--accent);
}

.template-center-main {
  position: relative;
  z-index: 2;
  width: min(1380px, calc(100% - 70px));
  margin: 0 auto;
  padding: 76px 0 110px;
}

.template-hero {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 0.9fr);
  gap: 80px;
  align-items: end;
}

.template-hero h1 {
  margin: 0;
  color: #f1f4f7;
  font-size: clamp(45px, 5vw, 74px);
  line-height: 1;
  letter-spacing: -0.058em;
}

.template-hero p {
  max-width: 560px;
  margin: 23px 0 0;
  color: #718096;
  font-size: 11px;
  line-height: 1.85;
}

.template-natural {
  border: 1px solid #334258;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(12, 20, 31, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.27);
}

.template-natural textarea {
  width: 100%;
  min-height: 98px;
  padding: 16px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: #dce3eb;
  caret-color: var(--accent);
  font: 11px/1.75 var(--font-mono);
}

.template-prompt-bottom {
  min-height: 48px;
  padding: 8px 9px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #263349;
}

.template-prompt-bottom > span {
  color: #66748a;
  font-size: 8px;
}

.template-prompt-bottom button {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #111720;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.template-prompt-bottom svg {
  width: 13px;
}

.template-filter {
  margin: 64px 0 22px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.template-filter button {
  height: 31px;
  padding: 0 13px;
  border: 1px solid #2b384c;
  border-radius: 3px;
  background: #0d1521;
  color: #718096;
  cursor: pointer;
  font-size: 8px;
}

.template-filter button.active,
.template-filter button:hover {
  border-color: rgba(245, 185, 66, 0.5);
  background: rgba(245, 185, 66, 0.07);
  color: var(--accent);
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #28364a;
  border-radius: 6px;
  background: rgba(12, 19, 30, 0.86);
  color: inherit;
  cursor: pointer;
  text-align: left;
  animation: gallery-in 480ms both;
  animation-delay: var(--delay);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

@keyframes gallery-in {
  from { opacity: 0; transform: translateY(14px); }
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--template-accent) 60%, #334158);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.3);
}

.gallery-preview {
  position: relative;
  height: 185px;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 50%, color-mix(in srgb, var(--template-accent) 9%, transparent), transparent 40%),
    linear-gradient(#1a2534 1px, transparent 1px),
    linear-gradient(90deg, #1a2534 1px, transparent 1px),
    #0a111b;
  background-size: auto, 16px 16px, 16px 16px, auto;
}

.gallery-preview::after {
  content: "";
  position: absolute;
  left: 27px;
  right: 27px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--template-accent) 45%, #42536a), transparent);
}

.gallery-tag,
.gallery-count {
  position: absolute;
  z-index: 3;
  top: 14px;
  color: var(--template-accent);
  font: 7px var(--font-mono);
  letter-spacing: 0.1em;
}

.gallery-tag { left: 15px; }
.gallery-count { right: 15px; color: #4d5a6e; }

.gallery-schematic {
  position: absolute;
  inset: 24px 18px 14px;
}

.gallery-schematic i {
  position: absolute;
  z-index: 2;
  height: 18px;
  border: 1px solid var(--card-node);
  border-radius: 3px;
  background: color-mix(in srgb, var(--card-node) 10%, #0f1824);
  box-shadow: 0 0 14px color-mix(in srgb, var(--card-node) 8%, transparent);
}

.gallery-info {
  min-height: 96px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.gallery-info h3 {
  margin: 0 0 7px;
  color: #dce3eb;
  font-size: 13px;
}

.gallery-info p {
  margin: 0;
  color: #657287;
  font-size: 8px;
}

.gallery-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #2b394e;
  color: var(--template-accent);
}

.gallery-arrow svg {
  width: 14px;
}

/* ─── Workspace hierarchy and data view ─────────────────────────── */
.workspace-nav {
  height: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  border-right: 1px solid var(--line);
}

.workspace-nav .workspace-brand {
  border-right: none;
  padding: 0 11px;
}

.workspace-back {
  border: none;
  border-right: 1px solid var(--line);
  background: #0a111b;
  color: #78869a;
  cursor: pointer;
}

.workspace-back:hover {
  color: var(--accent);
  background: #111b28;
}

.workspace-back svg {
  width: 15px;
}

.tool-action.active {
  border-color: rgba(85, 214, 194, 0.5);
  background: rgba(85, 214, 194, 0.08);
  color: var(--cyan);
}

.data-view {
  position: absolute;
  z-index: 15;
  inset: 0;
  display: none;
  padding: 48px 42px 42px;
  overflow: auto;
  background:
    linear-gradient(rgba(11, 17, 27, 0.97), rgba(9, 15, 24, 0.98)),
    linear-gradient(#243044 1px, transparent 1px),
    linear-gradient(90deg, #243044 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}

.data-view.show {
  display: block;
}

#stage.view-hidden {
  visibility: hidden;
}

.canvas-area.data-mode .canvas-badge,
.canvas-area.data-mode .minimap-wrap,
.canvas-area.data-mode .zoom-controls {
  display: none;
}

.data-view-head {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.data-view-head h2 {
  margin: 6px 0 0;
  color: #e1e6ed;
  font-size: 21px;
}

.data-view-head > span {
  color: #657389;
  font: 8px var(--font-mono);
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid #2a374b;
  border-radius: 6px;
  background: #0c141f;
}

.data-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.data-table-wrap th,
.data-table-wrap td {
  padding: 13px 15px;
  border-right: 1px solid #222f42;
  border-bottom: 1px solid #222f42;
  color: #92a0b3;
  font-size: 9px;
  text-align: left;
  vertical-align: middle;
}

.data-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111b28;
  color: #627086;
  font: 700 7px var(--font-mono);
  letter-spacing: 0.08em;
}

.data-table-wrap tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.data-table-wrap tbody tr:hover {
  background: rgba(98, 165, 255, 0.045);
}

.data-table-wrap td:first-child b,
.data-table-wrap td:first-child small {
  display: block;
  margin-left: 18px;
}

.data-table-wrap td:first-child b {
  color: #d6dde6;
  font-size: 10px;
}

.data-table-wrap td:first-child small {
  margin-top: 3px;
  color: #526075;
  font: 7px var(--font-mono);
}

.table-node-dot {
  float: left;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--dot);
  box-shadow: 0 0 8px color-mix(in srgb, var(--dot) 50%, transparent);
}

.status-cell {
  padding: 4px 6px;
  border: 1px solid #324159;
  border-radius: 3px;
  color: #8391a6;
}

.status-cell.high-risk {
  border-color: rgba(255, 105, 120, 0.45);
  color: var(--danger);
}

.data-table-wrap pre {
  margin: 0;
  white-space: pre-wrap;
  color: #78869a;
  font: 8px/1.5 var(--font-mono);
}

.risk-badge rect {
  fill: rgba(255, 105, 120, 0.12);
  stroke: rgba(255, 105, 120, 0.6);
}

.risk-badge text {
  fill: #ff8995;
  font: 6px var(--font-mono);
  text-anchor: middle;
  dominant-baseline: middle;
}

.gantt-track {
  fill: #26354a;
}

.gantt-progress {
  fill: var(--cyan);
}

@media (max-width: 1000px) {
  .diagram-type-grid,
  .template-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .template-hero,
  .export-section {
    grid-template-columns: 1fr;
  }

  .format-orbit {
    width: 330px;
    height: 330px;
  }
}

@media (max-width: 650px) {
  .landing-section,
  .landing-cta {
    padding: 76px 20px;
  }

  .diagram-type-grid,
  .industry-grid,
  .template-gallery {
    grid-template-columns: 1fr;
  }

  .template-center-nav,
  .template-center-main {
    width: calc(100% - 24px);
  }

  .template-center-nav {
    grid-template-columns: 1fr auto;
  }

  .template-center-nav .landing-brand {
    display: none;
  }

  .template-center-main {
    padding-top: 48px;
  }

  .template-hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .template-filter {
    overflow-x: auto;
  }
}

/* ─── Diagram ora professional expansion ─────────────────────────── */
.nav-text-button,
.landing-doc-link {
  border: none;
  background: transparent;
  color: #77859a;
  cursor: pointer;
  font: 9px var(--font-mono);
}

.nav-text-button:hover,
.landing-doc-link:hover {
  color: var(--accent);
}

.landing-final-start {
  min-width: 340px !important;
  height: 64px !important;
  padding: 0 28px !important;
  justify-content: space-between !important;
  font-size: 14px !important;
  box-shadow: 0 24px 70px rgba(245, 185, 66, 0.18);
}

.landing-doc-link {
  margin-top: 18px;
}

.product-motion {
  background:
    radial-gradient(circle at 76% 30%, rgba(85, 214, 194, 0.07), transparent 27%),
    rgba(7, 12, 20, 0.72);
}

.motion-console {
  min-height: 520px;
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border: 1px solid #2a394e;
  border-radius: 8px;
  background: #09101a;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.36), 0 0 80px rgba(85, 214, 194, 0.035);
}

.motion-sidebar {
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #243147;
  background: #0c141f;
}

.motion-sidebar b {
  margin-bottom: 32px;
  color: var(--accent);
  font: 800 11px var(--font-mono);
  letter-spacing: .13em;
}

.motion-sidebar span {
  padding: 12px;
  border: 1px solid transparent;
  color: #536178;
  font: 8px var(--font-mono);
}

.motion-sidebar span.active {
  border-color: rgba(85, 214, 194, .35);
  background: rgba(85, 214, 194, .06);
  color: var(--cyan);
}

.motion-stage {
  min-width: 0;
  padding: 26px;
  display: grid;
  grid-template-rows: 48px 1fr 42px;
  background-image:
    linear-gradient(rgba(52, 69, 92, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 69, 92, .18) 1px, transparent 1px);
  background-size: 24px 24px;
}

.motion-command,
.motion-status {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #2c3a50;
  background: rgba(11, 18, 29, .92);
  color: #8e9bad;
  font: 8px var(--font-mono);
}

.motion-command {
  padding: 0 14px;
}

.motion-command i,
.motion-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(85, 214, 194, .08);
}

.motion-command span {
  flex: 1;
}

.motion-command b {
  padding: 6px 9px;
  border: 1px solid rgba(245, 185, 66, .4);
  color: var(--accent);
}

.motion-graph {
  position: relative;
  min-height: 330px;
}

.motion-graph svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.motion-graph path {
  fill: none;
  stroke: #476078;
  stroke-width: 1.4;
  stroke-dasharray: 6 4;
}

.motion-graph circle {
  fill: var(--cyan);
  filter: drop-shadow(0 0 5px var(--cyan));
}

.motion-node {
  position: absolute;
  z-index: 2;
  width: 120px;
  padding: 13px;
  border: 1px solid #42617a;
  border-radius: 4px;
  background: #101a27;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.motion-node small {
  display: block;
  margin-bottom: 7px;
  color: #596980;
  font: 6px var(--font-mono);
}

.motion-node b {
  color: #d9e3ec;
  font-size: 11px;
}

.mn-a { left: 2%; top: 42%; }
.mn-b { left: 29%; top: 42%; border-color: #dfae45; }
.mn-c { left: 58%; top: 42%; border-color: #4fbba9; }
.mn-d { right: 0; top: 42%; border-color: #7763bd; }

.motion-status {
  padding: 0 14px;
  gap: 20px;
}

.motion-status span:first-child {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
}

.industry-grid {
  grid-template-columns: repeat(4, 1fr);
}

.template-nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.template-nav-actions > button,
.docs-start {
  border: none;
  background: transparent;
  color: #758399;
  cursor: pointer;
  font-size: 9px;
}

.template-nav-actions > button:hover {
  color: var(--accent);
}

.gallery-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.empty-template-library {
  grid-column: 1 / -1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #304057;
  background: rgba(11, 18, 29, .55);
  color: #66748a;
  text-align: center;
}

.empty-template-library svg {
  width: 36px;
  margin-bottom: 18px;
  color: var(--cyan);
}

.empty-template-library b {
  color: #d6dee7;
  font-size: 14px;
}

.empty-template-library p {
  max-width: 440px;
  color: #68768a;
  font-size: 9px;
}

.delete-custom-template {
  position: relative;
  z-index: 8;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #3a2e3a;
  color: #a2707c;
  font-size: 16px;
}

.delete-custom-template:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Documentation center */
.docs-center {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 8%, rgba(98, 165, 255, .075), transparent 28%),
    #080d16;
  color: var(--text);
}

.docs-center.workspace-hidden {
  display: none;
}

.docs-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 91, 115, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 91, 115, .11) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 65% 20%, black, transparent 75%);
  mask-image: radial-gradient(circle at 65% 20%, black, transparent 75%);
}

.docs-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  width: min(1380px, calc(100% - 70px));
  height: 84px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(91, 108, 132, .25);
  background: rgba(8, 13, 22, .78);
  backdrop-filter: blur(18px);
}

.docs-start {
  justify-self: end;
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 185, 66, .45);
  color: var(--accent);
}

.docs-start svg {
  width: 13px;
}

.docs-layout {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 70px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 80px;
  padding: 70px 0 130px;
}

.docs-sidebar {
  position: sticky;
  top: 120px;
  height: max-content;
}

.docs-sidebar h2 {
  margin: 8px 0 25px;
  font-size: 25px;
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
}

.docs-sidebar nav button {
  min-height: 42px;
  padding: 0 12px;
  border: none;
  border-left: 1px solid #29364a;
  background: transparent;
  color: #69778c;
  text-align: left;
  cursor: pointer;
  font-size: 9px;
}

.docs-sidebar nav button.active,
.docs-sidebar nav button:hover {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(245, 185, 66, .08), transparent);
  color: var(--accent);
}

.docs-local {
  margin-top: 36px;
  padding: 14px;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 5px 8px;
  border: 1px solid #263449;
  background: rgba(12, 19, 30, .7);
}

.docs-local i {
  width: 6px;
  height: 6px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--cyan);
}

.docs-local b {
  color: var(--cyan);
  font: 7px var(--font-mono);
}

.docs-local span {
  grid-column: 2;
  color: #5f6c80;
  font-size: 8px;
  line-height: 1.6;
}

.docs-content {
  min-width: 0;
}

.docs-article {
  padding: 28px 0 100px;
  scroll-margin-top: 100px;
  border-bottom: 1px solid #202d40;
}

.docs-article:first-child {
  padding-top: 0;
}

.doc-index {
  color: var(--accent);
  font: 7px var(--font-mono);
  letter-spacing: .14em;
}

.docs-article h1 {
  max-width: 780px;
  margin: 18px 0 24px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.docs-article h2 {
  margin: 18px 0 22px;
  font-size: 34px;
  letter-spacing: -.035em;
}

.docs-article p {
  max-width: 760px;
  color: #748196;
  font-size: 11px;
  line-height: 1.9;
}

.docs-lead {
  font-size: 13px !important;
}

.tutorial-steps {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid #263449;
  border-left: 1px solid #263449;
}

.tutorial-steps > div {
  min-height: 160px;
  padding: 24px;
  display: flex;
  gap: 18px;
  border-right: 1px solid #263449;
  border-bottom: 1px solid #263449;
  background: rgba(11, 18, 29, .72);
}

.tutorial-steps > div > b {
  color: var(--cyan);
  font: 8px var(--font-mono);
}

.tutorial-steps span {
  display: flex;
  flex-direction: column;
}

.tutorial-steps strong {
  margin-bottom: 12px;
  color: #dce4ec;
  font-size: 15px;
}

.tutorial-steps small {
  color: #68768b;
  font-size: 9px;
  line-height: 1.8;
}

.docs-example {
  margin: 30px 0;
  padding: 22px;
  border: 1px solid #2d3e54;
  border-left: 3px solid var(--cyan);
  background: #090f18;
}

.docs-example code {
  white-space: pre-wrap;
  color: #a9bacb;
  font: 11px/1.8 var(--font-mono);
}

.doc-card-grid,
.export-doc-table {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.doc-card-grid div,
.export-doc-table span {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid #27364b;
  background: rgba(12, 19, 30, .7);
}

.doc-card-grid b,
.export-doc-table b {
  color: #dbe3ec;
  font-size: 12px;
}

.doc-card-grid span,
.export-doc-table small {
  color: #68768b;
  font: 8px var(--font-mono);
}

/* Workspace pages and professional dialogs */
.toolstrip {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}

.toolstrip::-webkit-scrollbar {
  display: none;
}

.top-utility {
  padding: 0 10px;
}

.pagebar {
  position: absolute;
  z-index: 25;
  left: 122px;
  right: 245px;
  bottom: 14px;
  height: 34px;
  padding: 0 5px 0 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #2c384a;
  border-radius: 7px;
  background: rgba(13, 20, 31, .95);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.pagebar-label {
  padding-right: 7px;
  color: #536178;
  font: 7px var(--font-mono);
  letter-spacing: .1em;
}

.page-tabs {
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs button,
.page-add,
.page-menu-button {
  height: 25px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #738096;
  cursor: pointer;
  white-space: nowrap;
  font-size: 8px;
}

.page-tabs button {
  max-width: 160px;
  padding: 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-tabs button span {
  margin-right: 6px;
  color: #46556a;
  font: 7px var(--font-mono);
}

.page-tabs button.active {
  border-color: rgba(85, 214, 194, .38);
  background: rgba(85, 214, 194, .07);
  color: var(--cyan);
}

.page-add,
.page-menu-button {
  flex: 0 0 26px;
  width: 26px;
  border-color: #29374b;
}

.page-add:hover,
.page-menu-button:hover {
  color: var(--accent);
  border-color: rgba(245, 185, 66, .45);
}

.page-menu {
  position: absolute;
  right: 0;
  bottom: 40px;
  width: 160px;
  padding: 5px;
  display: none;
  border: 1px solid #344157;
  border-radius: 6px;
  background: #121b28;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}

.page-menu.open {
  display: block;
}

.page-menu button {
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: #8491a3;
  text-align: left;
  cursor: pointer;
  font-size: 9px;
}

.page-menu button:hover {
  background: #1a2636;
  color: #e0e6ed;
}

.professional-dialog {
  width: min(720px, 100%);
}

.version-create {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  border-bottom: 1px solid #263348;
}

.version-create input,
.template-save-field input,
.template-save-field textarea,
.paper-options select {
  width: 100%;
  border: 1px solid #324057;
  border-radius: 6px;
  outline: none;
  background: #0b121d;
  color: #dce3eb;
}

.version-create input {
  padding: 0 12px;
}

.version-list {
  max-height: 430px;
  padding: 12px 18px 22px;
  overflow-y: auto;
}

.version-item {
  min-height: 64px;
  padding: 10px 10px 10px 14px;
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #243146;
}

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.version-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.version-item b {
  color: #dce3eb;
  font-size: 10px;
}

.version-item small {
  color: #647187;
  font: 7px var(--font-mono);
}

.version-item button {
  height: 27px;
  padding: 0 9px;
  border: 1px solid #324057;
  background: transparent;
  color: #91a0b2;
  cursor: pointer;
  font-size: 8px;
}

.version-item .version-delete {
  color: #916d75;
}

.empty-professional,
.validation-perfect {
  padding: 55px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #66748a;
  text-align: center;
}

.empty-professional > span svg,
.validation-perfect > svg {
  width: 35px;
  margin-bottom: 15px;
  color: var(--cyan);
}

.empty-professional b,
.validation-perfect b {
  color: #ccd5df;
  font-size: 12px;
}

.empty-professional p,
.validation-perfect p {
  font-size: 9px;
}

.validation-score {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #263348;
}

.validation-score > div {
  --score: 100;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--score) * 1%), #243147 0);
  box-shadow: inset 0 0 0 9px #121b28;
}

.validation-score b {
  font: 800 20px var(--font-mono);
}

.validation-score span {
  display: none;
}

.validation-score p {
  color: #79869a;
  font-size: 10px;
}

.validation-list {
  max-height: 420px;
  padding: 12px 20px;
  overflow-y: auto;
}

.validation-item {
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 11px;
  border: none;
  border-bottom: 1px solid #253247;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.validation-item > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #405069;
  border-radius: 50%;
  color: #91a0b2;
  font: 800 10px var(--font-mono);
}

.validation-item.error > span {
  border-color: rgba(255, 105, 120, .6);
  color: var(--danger);
}

.validation-item.warning > span {
  border-color: rgba(245, 185, 66, .6);
  color: var(--accent);
}

.validation-item div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.validation-item b {
  color: #d8e0e8;
  font-size: 10px;
}

.validation-item small {
  color: #68768a;
  font-size: 8px;
}

.validation-item > i {
  color: #526077;
  font: 7px var(--font-mono);
}

.template-save-field {
  margin: 18px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #78869a;
  font-size: 9px;
}

.template-save-field input,
.template-save-field textarea {
  padding: 11px 12px;
  resize: vertical;
}

.paper-options {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.paper-options label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #78869a;
  font-size: 9px;
}

.paper-options select {
  height: 38px;
  padding: 0 10px;
}

.paper-options .paper-check {
  flex-direction: row;
  align-items: center;
}

.paper-preview {
  margin: 0 24px;
  min-height: 130px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #cfd3d8;
  background: #fff;
  color: #111;
}

.paper-preview span,
.paper-preview small {
  color: #777;
  font: 7px var(--font-mono);
}

.paper-preview b {
  margin: 16px 0;
  font: 20px Georgia, serif;
}

/* SVG specialised shapes and simulation */
.uml-stereotype,
.uml-title,
.formula-kicker,
.formula-text {
  text-anchor: middle;
}

.uml-stereotype {
  fill: #728096;
  font: 7px var(--font-mono);
}

.uml-title {
  fill: #e2e8ef;
  font-size: 11px;
  font-weight: 700;
}

.uml-divider {
  fill: none;
  stroke: #42536a;
  stroke-width: 1;
}

.uml-line {
  fill: #a7b3c1;
  font: 8px var(--font-mono);
}

.formula-kicker {
  fill: #8795a8;
  font: 7px var(--font-mono);
}

.formula-text {
  fill: #edf1f5;
  font: 13px Georgia, "Times New Roman", serif;
}

.node.sim-active .node-body {
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(245, 185, 66, .75));
}

.edge.sim-active .edge-line {
  stroke: var(--cyan);
  stroke-width: 4;
  filter: drop-shadow(0 0 6px rgba(85, 214, 194, .7));
  stroke-dasharray: 9 5;
  animation: sim-flow .45s linear infinite;
}

@keyframes sim-flow {
  to { stroke-dashoffset: -14; }
}

@media (max-width: 1360px) {
  .top-actions .top-utility {
    font-size: 0;
    width: 34px;
    padding: 0;
  }

  .tool-action {
    padding: 0 7px;
    font-size: 9px;
  }
}

@media (max-width: 1000px) {
  .motion-console {
    grid-template-columns: 1fr;
  }

  .motion-sidebar {
    display: none;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-sidebar nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .docs-sidebar nav button {
    border-left: none;
    border-bottom: 1px solid #29364a;
    white-space: nowrap;
  }

  .pagebar {
    right: 14px;
  }
}

@media (max-width: 650px) {
  .landing-final-start {
    min-width: 100% !important;
  }

  .motion-stage {
    padding: 12px;
  }

  .motion-node {
    width: 92px;
  }

  .mn-a { left: 0; }
  .mn-b { left: 25%; }
  .mn-c { left: 50%; }
  .mn-d { right: 0; }

  .motion-status span:not(:first-child) {
    display: none;
  }

  .docs-nav,
  .docs-layout {
    width: calc(100% - 24px);
  }

  .docs-nav {
    grid-template-columns: 1fr auto;
  }

  .docs-nav .landing-brand {
    display: none;
  }

  .tutorial-steps,
  .doc-card-grid,
  .export-doc-table,
  .paper-options {
    grid-template-columns: 1fr;
  }

  .docs-article h1 {
    font-size: 42px;
  }

  .pagebar {
    left: 14px;
  }
}
