:root {
  --primary: #0e9cef;
  --primary-dark: #0b7cc0;
  --primary-soft: #e6f5fd;
  --text-main: #1f2933;
  --text-muted: #f0f6fb;
}

.page {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text-main);
  background: #f3f6fb;
  min-height: 100vh;
  padding: 32px 20px 60px;
}

.hero {
  max-width: 1800px;
  margin: 0 auto 24px;
  padding: 24px 28px;
  background: var(--primary);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  color: #ffffff;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.logo {
  height: 36px;
  width: auto;
}

.intro {
  margin: 0;
  color: var(--text-muted);
}

.accordions {
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.tabs {
  max-width: 1800px;
  margin: 0 auto 18px;
  display: flex;
  gap: 12px;
}

.tab-button {
  border: 1px solid transparent;
  background: #ffffff;
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.tab-button.active {
  background: var(--primary);
  color: #ffffff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.accordion {
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.accordion summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 22px;
  list-style: none;
  background: var(--primary-soft);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  float: right;
  font-size: 20px;
  color: var(--primary-dark);
}

.accordion[open] summary::after {
  content: "–";
}

.content {
  padding: 0 22px 20px;
  color: #364152;
}

.content p {
  margin: 12px 0;
}

.steps {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.steps li {
  line-height: 1.5;
}

.steps img {
  display: block;
  margin: 10px 0 0;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #e0e6ed;
}

.workflow-area {
  max-width: 2200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.workflow-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.workflow-toolbar label {
  font-weight: 600;
}

.workflow-toolbar select {
  min-width: 240px;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
  background: #ffffff;
  color: #1f2933;
}

.workflow-toolbar button {
  border: none;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.workflow-toolbar button.is-active {
  background: var(--primary-dark);
}

.workflow-toolbar button:disabled {
  opacity: 0.6;
  cursor: default;
}

.workflow-canvas {
  position: relative;
  height: 620px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.workflow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform 0.2s ease;
}

.workflow-shapes {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 0.2s ease;
}

.workflow-shape {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
  white-space: pre-line;
}

.workflow-shape.has-workflow {
  cursor: zoom-in;
}

.workflow-shape.has-workflow::after {
  content: "workflow";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.workflow-shape.has-workflow:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.workflow-shape.has-workflow:not(.has-mini)::after {
  content: "▤";
  font-size: 14px;
  padding: 2px 6px;
  opacity: 1;
  transform: none;
}

.workflow-shape.has-workflow:not(.has-mini):hover::after {
  opacity: 1;
  transform: none;
}

.shape-text {
  text-align: center;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.shape-workflow {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  position: absolute;
  right: 6px;
  bottom: 6px;
}

.workflow-shape.selected {
  outline: 3px solid var(--primary-dark);
  box-shadow: 0 0 0 4px rgba(14, 156, 239, 0.25);
}

.workflow-shape.round {
  border-radius: 18px;
}

.workflow-shape.circle {
  border-radius: 50%;
}

.workflow-shape.ellipse {
  border-radius: 999px;
}

.workflow-shape.diamond {
  border-radius: 12px;
  transform: rotate(45deg);
}

.workflow-shape.diamond .shape-text {
  transform: rotate(-45deg);
}

.workflow-shape.diamond .shape-workflow {
  transform: rotate(-45deg);
}

.workflow-shape.has-mini .shape-text {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  font-size: 12px;
}

.workflow-shape.has-mini.diamond .shape-text {
  transform: none;
}

.shape-mini {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 24px;
  pointer-events: none;
  z-index: 0;
}

.mini-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(31, 41, 51, 0.8);
  text-align: center;
  padding: 4px;
}

.shape-mini-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mini-shape {
  position: absolute;
  border-radius: 4px;
  pointer-events: none;
}

.mini-shape.round {
  border-radius: 10px;
}

.mini-shape.circle {
  border-radius: 50%;
}

.mini-shape.ellipse {
  border-radius: 999px;
}

.mini-shape.diamond {
  border-radius: 4px;
  transform: rotate(45deg);
}

.workflow-shape.group-box {
  background: rgba(14, 156, 239, 0.1);
  border: 2px dashed rgba(14, 156, 239, 0.5);
  color: #1f2933;
}

.workflow-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #52606d;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 16px;
}

.zone {
  position: absolute;
  border-radius: 16px;
  opacity: 0.92;
}

.zone.blue {
  background: #cfe3ef;
}

.zone.green {
  background: #bfe0d0;
}

.zone.purple {
  background: #d5b9df;
}

.zone-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-weight: 600;
  font-size: 13px;
  color: #1f2933;
}

.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #111111;
  border: none;
  padding: 10px 12px;
  cursor: pointer;
  text-align: center;
  min-width: 140px;
}

.node.light {
  background: #6aa5b5;
}

.node.pill {
  border-radius: 999px;
}

.node.rect {
  border-radius: 8px;
}

.node.doc {
  border-radius: 6px;
  position: absolute;
  padding-top: 14px;
}

.node.doc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: #2b2b2b;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.node.diamond {
  width: 120px;
  height: 120px;
  padding: 0;
  background: #1b1b1b;
  transform: translate(-50%, -50%) rotate(45deg);
}

.node.diamond span {
  display: block;
  padding: 12px;
  transform: rotate(-45deg);
}

.brick-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.brick-panel h3 {
  margin: 0 0 8px;
}

.brick-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334e68;
}

.brick-note {
  color: #52606d;
  margin: 6px 0 0;
}

.brick-json {
  white-space: pre-wrap;
  margin: 0;
  font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
  font-size: 12px;
  color: #334e68;
}

.brick-tutorial {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.brick-step,
.brick-substep {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid #e4e9f0;
}

.brick-step summary,
.brick-substep summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  list-style: none;
  background: var(--primary-soft);
}

.brick-step summary::-webkit-details-marker,
.brick-substep summary::-webkit-details-marker {
  display: none;
}

.brick-step summary::after,
.brick-substep summary::after {
  content: "+";
  float: right;
  font-size: 18px;
  color: var(--primary-dark);
}

.brick-step[open] summary::after,
.brick-substep[open] summary::after {
  content: "–";
}

.brick-step-body {
  padding: 10px 16px 14px;
  color: #334e68;
  display: grid;
  gap: 8px;
}

.brick-step-text {
  color: #334e68;
  line-height: 1.5;
}

.brick-step-text mark {
  background: #ffe08a;
  padding: 0 2px;
}

.brick-step-image {
  position: relative;
  margin: 0 auto;
}

.brick-substeps {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px dashed rgba(14, 156, 239, 0.35);
  display: grid;
  gap: 8px;
}

.brick-step-image img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid #e0e6ed;
}

.brick-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brick-overlay {
  position: absolute;
  border: 2px solid #ff3b30;
  border-radius: 6px;
  background: rgba(255, 59, 48, 0.05);
}

.brick-overlay.circle {
  border-radius: 999px;
}

.brick-overlay.pointer {
  border-radius: 0;
  clip-path: polygon(0 50%, 70% 0, 70% 30%, 100% 30%, 100% 70%, 70% 70%, 70% 100%);
  background: transparent;
}

.hidden {
  display: none !important;
}
