#demo .masthead { grid-template-columns: max-content minmax(0, 1fr) max-content; }
#demo .file-actions { display: flex; }
#demo .button { text-decoration: none; }
#demo .brand-wordmark { display: grid; gap: .12rem; }
.demo-mode { color: var(--muted); font-size: .75rem; font-weight: 500; }
.demo-header-actions, .demo-navigation { display: flex; align-items: center; gap: .28rem; }
.demo-navigation a[aria-current="page"] { background: var(--accent); color: var(--primary); }
.demo-return { margin-inline-start: .1rem; }
.demo-locked-actions { margin-top: .75rem; }
#demo .report-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .45rem; flex-wrap: wrap; }
#demo .field-navigation, #demo .toolbar { flex-wrap: wrap; }
#demo .toolbar { gap: .25rem; }
#demo .toolbar .tool-group { padding-inline-end: .2rem; }
#demo .toolbar .button { min-height: 2.05rem; padding-inline: .5rem; }
#demo .toolbar .icon-button { width: 1.85rem; }
#demo .tool-group:last-child { border: 0; }
#demo .diagram-name p { color: var(--muted); font-size: .8rem; }
#demo .diagram-name h2 { font-size: clamp(1.21rem, 2vw, 1.62rem); letter-spacing: -.045em; margin: .08rem 0 .38rem; }
#demo .diagram-header { align-items: flex-start; }
#demo .diagram-header nav { width: max-content; max-width: 100%; }
#demo .layer-row { display: flex; justify-content: space-between; align-items: center; gap: .35rem; }
.demo-layer { background: var(--accent); color: var(--primary); border-radius: .45rem; flex: 1; padding: .42rem .52rem; font-size: .84rem; }
#demo .shape-list button { opacity: .66; }
#demo .shape-list button span:first-child { font-size: 1.15rem; line-height: 1; }
#demo.sidebar-compact .shape-list span:first-child { display: inline; }
#demo .arrange-options .button { justify-content: flex-start; white-space: normal; }
#demo .arrange-options { min-width: min(13rem, 48vw); }
#demo .main-pane { grid-template-rows: auto auto minmax(0, 1fr) auto; }
#demo .canvas-shell { min-height: 21rem; }
#graph { scrollbar-width: thin; }
#graph.panning { cursor: grabbing; }
#diagram-canvas { position: relative; width: 880px; height: 486px; }
#diagram-canvas > svg { position: absolute; inset: 0; }
#diagram-canvas text { font: 12px system-ui, sans-serif; fill: #505975; paint-order: stroke; stroke: #f8f9fc; stroke-width: 4; }
.demo-edge .edge-line { fill: none; stroke: #59627b; stroke-width: 1.7; }
.demo-edge .edge-target { fill: none; stroke: transparent; stroke-width: 18; cursor: pointer; }
.demo-edge:is(:hover, :focus-visible, .selected) .edge-line { stroke: #5069a8; stroke-width: 3; }
.demo-node { position: absolute; inset: var(--y) auto auto var(--x); width: 176px; height: 72px; padding: .48rem;
  background: #e8eaf3; border: 1.5px solid #7887b1; border-radius: .6rem; font-size: .9rem; font-weight: 550;
  color: var(--ink); overflow-wrap: anywhere; }
.demo-node.start { border-color: #78aeb1; background: #e6f5f3; border-radius: 28px; }
.demo-node.end { border-color: #78a996; background: #e4f4ec; border-radius: 28px; }
.demo-node.document { border-color: #86a4c2; background: #e8f0fa; border-style: dashed; border-radius: 0; }
.demo-node.decision { background: transparent; border: 0; padding: 0 2rem; isolation: isolate; }
.demo-node.decision::before, .demo-node.decision::after { position: absolute; inset: 0; content: ''; z-index: -1;
  background: #b47d22; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.demo-node.decision::after { inset: 2px 4px; background: #f5e5c5; }
.demo-node:is(:hover, [aria-pressed="true"]) { outline: 2px solid #657baa; outline-offset: 2px; }
.demo-data { display: grid; gap: .45rem; margin: .6rem 0; }
.demo-data div { min-width: 0; }
.demo-data dt { color: var(--muted); font-size: .78rem; }
.demo-data dd { margin: .15rem 0 0; padding: .36rem .52rem; background: #f5f6fa; border: 1px solid #e4e8f2;
  border-radius: .43rem; font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.demo-action { border-bottom: 1px solid var(--line); padding: .55rem 0; }
.demo-action summary { cursor: pointer; font-size: .9rem; line-height: 1.6; }
.demo-action .field-action-state { margin-inline-start: .45rem; }
.demo-action button { margin-top: .55rem; }
#demo #field-report-list .button { text-align: left; white-space: normal; padding-inline: .25rem; }
#demo .field-actions-controls label { display: grid; gap: .2rem; color: var(--muted); font-size: .8rem; }
#demo .field-actions-controls select { min-height: 2.45rem; padding: .3rem; border: 1px solid var(--line); border-radius: .45rem; background: white; }
#demo .report-paper-wrap { overflow: hidden; }
#demo #report-paper { object-fit: contain; }
#attachment-dialog .dialog-heading { align-items: center; }
#attachment-dialog img { display: block; max-width: 100%; max-height: 72dvh; object-fit: contain; }
@media (max-width: 1080px) { #demo .masthead-project { display: none; } #demo .masthead { grid-template-columns: auto 1fr; } }
@media (max-width: 780px) {
  #demo .masthead { grid-template-columns: 1fr; gap: .3rem; padding: .55rem .65rem; }
  #demo .brand { padding: 0; }
  #demo .demo-header-actions { flex-wrap: wrap; justify-content: flex-start; }
  #demo { grid-template-rows: auto minmax(0, 1fr); }
}
@media (max-width: 650px) {
  #demo { grid-auto-rows: auto; }
  #demo .left-top { justify-content: flex-start; }
  #demo .left-pane { order: 3; }
  #demo .main-pane { order: 1; min-height: 27rem; }
  #demo .right-pane { order: 2; padding-bottom: .5rem; border-top: 1px solid var(--line); }
  #demo .inspector-heading { padding-block: .55rem; }
  #demo .main-pane .canvas-shell { min-height: 18rem; }
  #demo .shape-list { overflow-x: auto; }
  #demo .toolbar .arrange-options { left: 0; right: auto; }
  #demo .toolbar .quick-menu:last-of-type .arrange-options { left: auto; right: 0; }
}
@media (max-width: 430px) {
  #demo .file-actions :is(.button, .icon-button) { padding: .15rem .42rem; font-size: .8rem; min-height: 2rem; }
  #demo .diagram-name { padding-inline: .2rem; }
}
