@font-face {
  font-family: Inter;
  src: local("Inter");
  font-display: swap;
}
:root {
  --bg: #f7f8fc;
  --paper: #fff;
  --ink: #172238;
  --muted: #778198;
  --line: #e4e7f0;
  --accent: #6758e8;
  --accent-soft: #eeebff;
  --teal: #159382;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  transition:
    background 0.14s,
    border-color 0.14s;
  min-height: 38px;
}
button:hover {
  border-color: #c3bcf8;
  background: #faf9ff;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #d9deea;
  border-radius: 9px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #6758e810;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #bdb5f7;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 19px;
  line-height: 1.5;
}
h3 {
  font-size: 14px;
}
p {
  overflow-wrap: anywhere;
}
[v-cloak] {
  display: none;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}
.primary:hover {
  background: #5848d9;
  color: #fff;
  border-color: #5848d9;
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.icon-button {
  background: transparent;
  border: 0;
  font-size: 22px;
  padding: 6px 10px;
  min-width: 38px;
  line-height: 1.2;
  color: #68718a;
}
.text-button,
.quiet-button {
  background: transparent;
  border: 0;
  color: var(--accent);
}
.quiet-button {
  color: #566078;
}
.text-button:hover,
.quiet-button:hover {
  background: var(--accent-soft);
}
.quiet {
  color: var(--muted);
  font-size: 12px;
}
.spacer {
  flex: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.topbar {
  height: 73px;
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 50px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  letter-spacing: -1px;
  font-weight: 780;
  color: #15213a;
}
.brand svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.3;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}
.topbar nav a {
  display: flex;
  align-items: center;
  padding: 7px 15px;
  color: #606a81;
  font-size: 14px;
  font-weight: 550;
  border-radius: 8px;
}
.topbar nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-tail {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.home {
  max-width: 1500px;
  margin: auto;
  padding: 74px 60px 38px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(380px, 0.86fr) minmax(500px, 1.3fr);
  align-items: center;
  gap: 65px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 19px;
}
.hero h1 {
  font-size: clamp(40px, 4.1vw, 62px);
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: -2px;
}
.hero h1 > span {
  color: var(--accent);
}
.hero-intro {
  font-size: 18px;
  color: #77819a;
  line-height: 1.8;
  margin-top: 24px;
}
.connect-card {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 8px 30px #25375e05;
}
.connect-card label {
  display: block;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 12px;
}
.command {
  display: flex;
  align-items: center;
  background: #f7f8fc;
  border: 1px solid #e8eaf2;
  border-radius: 8px;
  padding: 3px 7px 3px 12px;
}
.command code {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: #506078;
}
.connect-card .primary {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  min-height: 45px;
}
.agents {
  font-size: 12px;
  color: #78819a;
  margin-top: 12px;
}
.agents i {
  font-style: normal;
  padding: 0 9px;
  color: #b3b9c8;
}
.public-note {
  border-top: 1px solid #eef0f5;
  margin-top: 16px;
  padding-top: 15px;
  font-size: 11px;
  color: #8b93a6;
}
.import-link {
  padding-left: 0;
  margin-top: 13px;
  font-size: 13px;
}
.hero-preview {
  height: 515px;
  border: 1px solid #e0e4ef;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 55px #29396207;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.preview-heading {
  padding: 25px 27px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mini-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: #9ba2b3;
}
.preview-heading h2 {
  font-size: 21px;
  margin-top: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
}
.diagram-frame {
  border: 0;
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #fff;
}
.hero-preview .diagram-frame {
  pointer-events: none;
}
.hero-preview footer {
  display: flex;
  gap: 29px;
  padding: 17px 27px;
  border-top: 1px solid #f0f1f6;
  font-size: 12px;
  color: #858ea3;
}
.hero-preview footer b {
  font-weight: 500;
  color: #69a89b;
  margin-right: 6px;
}
.steps {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 1110px;
  margin: 65px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.steps > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.steps > div > span {
  font-weight: 650;
  color: var(--accent);
  background: #eeebff;
  border-radius: 50%;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.steps > div:nth-of-type(2) > span {
  background: #e0f3ee;
  color: #258b7a;
}
.steps strong {
  font-size: 13px;
  font-weight: 650;
}
.steps p {
  font-size: 11px;
  color: #929aae;
  margin-top: 3px;
}
.steps > i {
  font-style: normal;
  color: #bdc3d4;
}
.connect-details {
  margin: 65px auto 0;
  padding: 30px;
  max-width: 1000px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
}
.connect-details > p {
  margin-top: 12px;
  color: var(--muted);
}
.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  margin-top: 30px;
}
.detail-columns p {
  margin: 10px 0 17px;
  color: var(--muted);
  font-size: 13px;
}
.library-page {
  max-width: 1290px;
  padding: 48px 48px 35px;
  margin: auto;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.page-title .eyebrow {
  font-size: 11px;
  margin-bottom: 9px;
}
.page-title h1 {
  font-size: 30px;
}
.search {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px 6px 5px 17px;
  border: 1px solid #ddd8fb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 17px #6758e805;
}
.search > span {
  font-size: 29px;
  color: #7e86a2;
  line-height: 1;
}
.search input {
  border: 0;
  box-shadow: none;
  font-size: 16px;
  padding: 11px;
}
.search .primary {
  min-width: 80px;
}
.list-bar {
  display: flex;
  justify-content: space-between;
  color: #8a93a8;
  font-size: 12px;
  margin: 25px 1px 14px;
}
.result-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.result-card {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  color: var(--ink);
}
.result-card:hover {
  border-color: #c5bef2;
  box-shadow: 0 7px 24px #5f55ac08;
}
.thumbnail {
  width: 255px;
  height: 142px;
  flex: 0 0 255px;
  border: 1px solid #ecedf4;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #fcfcfe;
  display: grid;
  place-items: center;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  z-index: 1;
}
.thumb-fallback {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 0;
  opacity: 0.55;
}
.thumb-fallback span {
  width: 42px;
  height: 28px;
  border: 1px solid #aaa0e6;
  background: #eeebff;
  border-radius: 4px;
}
.thumb-fallback span:nth-of-type(2) {
  background: #e3f6f0;
  border-color: #8fc6bb;
}
.thumb-fallback i {
  width: 22px;
  height: 1px;
  background: #a7aec0;
}
.result-copy {
  flex: 1;
  min-width: 0;
}
.result-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.result-title h2 {
  font-size: 17px;
}
.public-tag {
  font-size: 11px;
  line-height: 1.8;
  border-radius: 5px;
  padding: 1px 8px;
  background: #e4f6ed;
  color: #258c62;
  white-space: nowrap;
}
.result-copy p {
  color: #7c869b;
  font-size: 12px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.match-label {
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 2px 5px;
  display: inline-block;
  margin-bottom: 7px;
}
mark {
  background: #fff0bc;
  color: #5d4e22;
  border-radius: 2px;
  padding: 0 1px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.tags span {
  font-size: 10px;
  color: #9199ac;
  background: #f5f6fa;
  padding: 2px 7px;
  border-radius: 4px;
}
.result-tail {
  align-self: stretch;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: #a0a7b8;
}
.result-tail time {
  font-size: 10px;
}
.result-tail > span {
  font-size: 24px;
  color: var(--accent);
  padding-right: 10px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
  font-size: 12px;
}
.library-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffffa6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 20px;
  margin-top: 28px;
  font-size: 12px;
}
.library-notice > span {
  font-size: 27px;
  color: var(--accent);
}
.library-notice p {
  color: #8e97aa;
  flex: 1;
}
.library-notice .text-button {
  font-size: 12px;
}
.connect-empty,
.empty {
  text-align: center;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 17px;
  padding: 50px 20px;
  color: var(--muted);
}
.connect-empty {
  border: 1px dashed #dcdfea;
  background: #ffffff9c;
  border-radius: 15px;
  min-height: 480px;
}
.empty h2,
.connect-empty h2 {
  color: #4d5972;
  font-size: 21px;
}
.empty p,
.connect-empty p {
  font-size: 13px;
  line-height: 1.9;
}
.empty-symbol {
  font-size: 50px;
  line-height: 1.2;
  color: #c6bff3;
}
.divider {
  width: 160px;
  height: 1px;
  background: var(--line);
  margin: 7px;
}
.small {
  min-height: 160px;
}
.error-box {
  padding: 25px;
  border: 1px solid #e9ced5;
  background: #fff5f7;
  border-radius: 12px;
  margin: 20px;
  color: #9b4054;
}
.error-box button {
  margin-top: 14px;
}
.error-text {
  color: #aa4358;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 15px;
  white-space: pre-wrap;
}
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.skeleton-list > div {
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(110deg, #fff 20%, #f0f1f7 45%, #fff 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite;
}
.work-page {
  padding: 28px 30px 14px;
  max-width: 1900px;
  margin: auto;
}
.work-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}
.title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.work-title h1 {
  font-size: 26px;
}
.work-title > div:first-child {
  min-width: 0;
}
.work-title p {
  font-size: 12px;
  color: #8790a4;
  margin-top: 9px;
  max-width: 800px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-badge {
  font-size: 11px;
  background: #fff0cf;
  padding: 2px 8px;
  border-radius: 5px;
  color: #9c7b2d;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.actions > button {
  white-space: nowrap;
}
.menu {
  position: relative;
  font-size: 13px;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 13px;
  color: #65708a;
}
.menu-items {
  position: absolute;
  z-index: 20;
  top: 43px;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 40px #1d2b4c15;
  padding: 6px;
  width: 185px;
  display: flex;
  flex-direction: column;
}
.menu-items button,
.menu-items a {
  display: block;
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 12px;
  color: #566179;
  background: #fff;
}
.menu-items button:hover,
.menu-items a:hover {
  background: #f2efff;
}
.menu-items .danger {
  color: #b25769;
}
.workspace {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 250px);
  min-height: 490px;
}
.workspace.expanded {
  grid-template-columns: 195px minmax(0, 1fr) 330px;
}
.diagram-tree,
.canvas-shell,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 0;
  overflow: hidden;
}
.diagram-tree {
  padding: 19px 12px;
  overflow-y: auto;
}
.diagram-tree h2 {
  font-size: 14px;
  padding: 0 9px 15px;
  display: flex;
  justify-content: space-between;
}
.diagram-tree h2 span {
  font-size: 11px;
  color: #a1a8ba;
  font-weight: 400;
}
.diagram-tree > button {
  display: flex;
  gap: 8px;
  text-align: left;
  width: 100%;
  border: 0;
  padding: 10px;
  font-size: 12px;
  margin-bottom: 3px;
  white-space: normal;
}
.diagram-tree > button.selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.diagram-tree > button.child {
  padding-left: 25px;
  font-size: 11px;
}
.diagram-tree > button span {
  color: #9b9fb6;
}
.context {
  margin: 24px 8px 0;
  padding-top: 20px;
  border-top: 1px solid #eef0f5;
}
.context summary {
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.context summary:before {
  content: "⌄";
  margin-right: 8px;
  color: #9b9fb6;
}
.context p {
  font-size: 11px;
  line-height: 1.9;
  color: #8b94a8;
  white-space: pre-wrap;
  margin-top: 12px;
}
.context h3 {
  font-size: 10px;
  margin-top: 15px;
  color: #748099;
}
.diagram-tree > .tags {
  padding: 0 8px;
}
.canvas-shell {
  display: flex;
  flex-direction: column;
}
.canvas-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #edf0f5;
  min-height: 57px;
  padding: 8px 13px;
}
.selected-tab {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f0ff;
  color: var(--accent);
  border-radius: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 45%;
}
.version-button {
  padding: 4px 3px;
  border: 0;
  color: #97a0b3;
  font-size: 10px;
  min-height: 25px;
}
.canvas-tabs .quiet-button {
  font-size: 11px;
  padding: 6px 8px;
}
.side-panel {
  padding: 21px;
  overflow-y: auto;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.panel-title h2 {
  font-size: 17px;
}
.panel-title .icon-button {
  font-size: 23px;
}
.tabs {
  display: flex;
  margin: 10px 0 22px;
  border-bottom: 1px solid #eceef5;
}
.tabs button {
  flex: 1;
  border: 0;
  border-radius: 0;
  padding: 12px 8px;
  color: #98a0b1;
  font-size: 12px;
}
.tabs button.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  font-weight: 650;
}
.panel-intro {
  font-size: 12px;
  line-height: 1.8;
  color: #8b94a8;
  margin-bottom: 20px;
}
.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.context-chips span {
  font-size: 10px;
  color: #7f73bd;
  background: #f3f0ff;
  padding: 5px 8px;
  border-radius: 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-panel textarea {
  font-size: 12px;
  background: #fff;
  min-height: 120px;
}
.handoff-summary {
  padding: 17px;
  background: #f8f9fc;
  border-radius: 9px;
  margin: 20px 0 7px;
}
.handoff-summary h3 {
  font-size: 12px;
  margin-bottom: 9px;
}
.handoff-summary p {
  font-size: 11px;
  margin: 7px 0;
  color: #7e899d;
}
.side-panel .primary {
  font-size: 12px;
}
.download-link {
  font-size: 11px;
  display: block;
  text-align: center;
  padding: 15px;
}
.small-note {
  font-size: 11px;
  color: #9aa2b3;
  line-height: 1.9;
  margin-top: 15px;
}
.work-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 14px 3px;
  color: #a0a8ba;
  font-size: 10px;
}
.work-footer button {
  font-size: 11px;
}
.job-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-top: 20px;
}
.job-card h3 {
  font-size: 15px;
  margin-bottom: 13px;
}
.job-card p {
  font-size: 11px;
  color: #8993a7;
  line-height: 1.9;
  margin-bottom: 12px;
}
.queue-count {
  display: block;
  font-size: 20px;
  margin: 10px 0 18px;
}
.job-card button {
  font-size: 12px;
}
.success-symbol {
  display: block;
  color: #249b78;
  font-size: 28px;
  margin-bottom: 10px;
}
.version-entry {
  border-left: 2px solid #eceaf5;
  padding: 2px 0 18px 15px;
  margin-bottom: 12px;
}
.version-entry.current {
  border-color: #9387ef;
}
.version-entry strong {
  display: block;
  font-size: 12px;
  margin: 8px 0;
}
.version-entry time {
  display: block;
  font-size: 10px;
  color: #a3aaba;
}
.version-entry .actions {
  margin-top: 9px;
  gap: 8px;
}
.version-entry button {
  font-size: 11px;
  padding: 4px 10px;
  min-height: 30px;
}
.workspace.editing {
  grid-template-columns: minmax(0, 1fr);
  height: calc(100vh - 192px);
  min-height: 500px;
}
.is-editing .work-title {
  margin-bottom: 18px;
}
.view-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #f3f4f8;
  border-radius: 8px;
  flex-shrink: 0;
}
.view-switch button {
  border: 0;
  background: transparent;
  color: #788197;
  padding: 5px 16px;
  min-height: 30px;
  border-radius: 6px;
  font-size: 12px;
}
.view-switch button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px #27304a12;
  font-weight: 600;
}
.canvas-tabs .snapshot-save {
  font-size: 12px;
  padding: 7px 16px;
  min-height: 36px;
}
.diagram-select {
  border: 0;
  background: #f3f0ff;
  color: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  padding: 7px 10px;
  max-width: 220px;
  width: auto;
}
.editor-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.editor-error {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: #fff6eb;
  color: #956c35;
  font-size: 12px;
  z-index: 1;
}
.editor-error span {
  flex: 1;
}
.editor-error button {
  font-size: 11px;
  padding: 5px 9px;
  min-height: 30px;
}
.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.account-button {
  font-size: 12px;
}
.employee-input {
  font-size: 22px;
  letter-spacing: 2px;
  padding: 14px 16px;
  margin-top: 8px;
}
.employee-input::placeholder {
  font-size: 16px;
  letter-spacing: 0;
}
.account-intro {
  margin-bottom: 22px;
}
.account-connections {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #788197;
  font-size: 12px;
}
.account-connections summary {
  cursor: pointer;
}
.editor-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 0;
}
.save-state {
  color: #9aa3b7;
  font-size: 11px;
}
.editor-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  background: #fff;
  color: #8993a7;
}
.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #edeafa;
  border-top-color: #8e80ea;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.small-spinner {
  width: 23px;
  height: 23px;
  margin-bottom: 12px;
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #d8d0f5;
  background: #fff;
  box-shadow: 0 8px 30px #40335814;
  color: #65578e;
  border-radius: 10px;
  padding: 12px 23px;
  font-size: 13px;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #17223848;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.modal {
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 17px;
  box-shadow: 0 30px 100px #19244125;
  padding: 26px;
  width: 480px;
  max-width: 100%;
  max-height: calc(100vh - 60px);
  overflow: auto;
}
.modal > p {
  font-size: 13px;
  color: #8a94a9;
  margin: 17px 0;
}
.modal > input,
.modal > textarea {
  margin-bottom: 10px;
}
.modal .wide {
  font-size: 13px;
}
.modal .text-button {
  font-size: 12px;
  margin-top: 10px;
}
.modal .panel-title {
  margin-bottom: 16px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: #75819a;
  margin: 18px 0 12px;
}
.field-label input,
.field-label textarea {
  display: block;
  margin-top: 8px;
}
.file-input {
  display: block;
  border: 1px dashed #c5bcec;
  background: #faf8ff;
  color: #8476b6;
  padding: 20px;
  border-radius: 9px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  margin-bottom: 15px;
}
.file-input input {
  display: block;
  border: 0;
  padding: 9px 0 0;
  font-size: 11px;
  background: transparent;
}

.settings-actions {
  display: grid;
  gap: 9px;
}
.settings-actions button {
  text-align: left;
  font-size: 13px;
}
.wide-modal {
  width: 1100px;
}
.candidate-stage {
  height: 55vh;
  min-height: 300px;
  border: 1px solid var(--line);
  margin: 16px 0;
  display: flex;
}
.modal select {
  max-width: 350px;
  font-size: 12px;
}
.modal .error-text {
  color: #aa4358;
}
.modal .small-note {
  font-size: 11px;
  color: #9aa2b3;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}
@media (min-width: 1600px) {
  .home {
    padding-top: 100px;
  }
  .hero-preview {
    height: 580px;
  }
  .hero {
    gap: 85px;
  }
  .workspace.expanded {
    grid-template-columns: 225px minmax(0, 1fr) 360px;
  }
}
@media (max-width: 1190px) {
  .topbar {
    padding: 0 25px;
    gap: 30px;
  }
  .home {
    padding: 50px 35px;
  }
  .hero {
    gap: 35px;
    grid-template-columns: minmax(340px, 0.9fr) minmax(430px, 1.2fr);
  }
  .hero-preview {
    height: 490px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero-intro {
    font-size: 15px;
  }
  .workspace.expanded {
    grid-template-columns: 150px minmax(0, 1fr) 295px;
  }
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .work-page {
    padding: 23px 20px 10px;
  }
  .side-panel {
    padding: 17px;
  }
  .work-title h1 {
    font-size: 23px;
  }
  .work-title p {
    max-width: 560px;
  }
  .diagram-tree {
    padding: 15px 7px;
  }
  .diagram-tree > button {
    font-size: 11px;
  }
  .context {
    margin-left: 7px;
    margin-right: 7px;
  }
  .result-card {
    gap: 18px;
  }
  .thumbnail {
    width: 210px;
    flex-basis: 210px;
    height: 130px;
  }
  .library-page {
    padding: 35px 30px;
  }
  .result-title {
    gap: 9px;
  }
  .result-title h2 {
    font-size: 15px;
  }
  .result-tail {
    min-width: 85px;
  }
  .work-title .actions {
    gap: 3px;
  }
  .work-title .actions button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .work-title p {
    font-size: 11px;
  }
}
@media (max-width: 900px) {
  .nav-tail .quiet {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-copy {
    max-width: 550px;
    margin: auto;
    width: 100%;
  }
  .hero-preview {
    height: 450px;
  }
  .home {
    padding: 35px 25px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .steps {
    margin-top: 35px;
    gap: 15px;
  }
  .steps > i {
    display: none;
  }
  .steps > div {
    gap: 8px;
  }
  .steps p {
    display: none;
  }
  .topbar {
    gap: 20px;
    padding: 0 20px;
  }
  .topbar nav {
    gap: 1px;
  }
  .topbar nav a {
    font-size: 12px;
    padding: 7px 11px;
  }
  .workspace.expanded {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .workspace.expanded .diagram-tree {
    display: none;
  }
  .work-title {
    align-items: flex-start;
  }
  .work-title > div:first-child {
    max-width: 55%;
  }
  .work-title h1 {
    font-size: 21px;
  }
  .thumbnail {
    width: 160px;
    flex-basis: 160px;
    height: 110px;
  }
  .result-tail {
    display: none;
  }
  .library-notice {
    flex-wrap: wrap;
  }
  .library-notice p {
    flex-basis: 50%;
  }
  .result-title {
    flex-wrap: wrap;
  }
  .result-title h2 {
    width: 100%;
  }
  .detail-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 63px;
    padding: 0 14px;
    gap: 14px;
  }
  .brand {
    font-size: 22px;
    gap: 5px;
  }
  .brand svg {
    width: 27px;
  }
  .topbar nav a {
    font-size: 11px;
    padding: 6px 7px;
  }
  .nav-tail {
    display: none;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-intro {
    font-size: 15px;
  }
  .hero-preview {
    height: 380px;
  }
  .steps {
    align-items: flex-start;
  }
  .steps > div {
    flex-direction: column;
    text-align: center;
  }
  .steps strong {
    font-size: 11px;
  }
  .library-page {
    padding: 28px 18px;
  }
  .page-title h1 {
    font-size: 24px;
  }
  .page-title button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .result-card {
    padding: 13px;
    gap: 13px;
  }
  .thumbnail {
    width: 90px;
    flex-basis: 90px;
    height: 90px;
  }
  .result-title h2 {
    font-size: 14px;
  }
  .result-title .quiet {
    font-size: 10px;
  }
  .result-copy p {
    font-size: 11px;
  }
  .result-copy .tags {
    display: none;
  }
  .work-page {
    padding: 20px 12px;
  }
  .work-title {
    flex-direction: column;
    gap: 14px;
  }
  .work-title > div:first-child {
    max-width: 100%;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 260px);
    min-height: 450px;
  }
  .diagram-tree {
    display: none;
  }
  .canvas-shell {
    flex: 1;
    min-height: 380px;
  }
  .workspace.expanded .side-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    max-height: 78vh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 60px #1b2c4722;
  }
  .work-footer > span {
    max-width: 65%;
  }
  .modal-backdrop {
    padding: 15px;
  }
  .modal {
    padding: 20px;
  }
  .is-editing .canvas-tabs {
    gap: 8px;
    flex-wrap: wrap;
  }
  .is-editing .save-state {
    flex-basis: 100%;
    order: 2;
  }
  .library-notice p {
    flex-basis: 100%;
  }
  .steps > div > span {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  .context-chips span {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Presentation reuses the current viewer; no editor or document reload. */
.present-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.present-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
body.presenting {
  overflow: hidden;
}
.is-presenting .workspace {
  display: block;
  min-height: 0;
  height: 100vh;
}
.canvas-shell.presenting,
.canvas-shell.presenting:fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0 0 72px;
}
.canvas-shell.presenting .diagram-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
}
.presentation-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 32px);
  padding: 6px 8px;
  border: 1px solid #e4e7ef;
  border-radius: 12px;
  background: #ffffffed;
  box-shadow: 0 4px 24px #172b4d0a;
}
.presentation-controls select {
  max-width: min(420px, 45vw);
  min-width: 100px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
}
.presentation-controls button {
  border: 0;
  white-space: nowrap;
  font-size: 13px;
  min-height: 36px;
}
.presentation-controls .icon-button {
  font-size: 25px;
  width: 36px;
}
.presentation-controls button:disabled {
  opacity: 0.25;
}
.presentation-controls kbd {
  margin-left: 6px;
  color: #939bab;
  font: 10px system-ui;
}
.presentation-count {
  color: #8892a5;
  white-space: nowrap;
  font-size: 11px;
  padding: 0 5px;
}
.presentation-divider {
  width: 1px;
  height: 20px;
  background: #e4e7ef;
  margin: 0 3px;
}
.presentation-title {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Collaboration stays in the existing single canvas toolbar. */
.collab-people{display:flex;align-items:center;gap:0;flex-shrink:0}
.collab-avatar{display:grid;place-items:center;width:27px;height:27px;border:2px solid #fff;border-radius:50%;color:#fff;font-size:10px;font-weight:700;margin-left:-5px;box-shadow:0 1px 4px #17203c14}
.collab-avatar:first-child{margin-left:0}
.collab-count{margin-left:6px;font-size:11px;color:var(--muted,#75819b);white-space:nowrap}
.collab-invite-button{white-space:nowrap}
.collab-link{width:100%;font:12px ui-monospace,monospace;padding:12px;border:1px solid #dedfec;border-radius:8px;background:#f8f8fc;color:#616b80;box-sizing:border-box}
.collab-end{margin-top:22px;font-size:12px}
@media(max-width:1100px){.collab-people .collab-avatar:nth-child(n+4){display:none}.collab-count{display:none}.canvas-tabs:has(.collab-people) .save-state{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
