.pto-aic-core-pattern-page {
  min-height: 100vh;
  margin: 0;
  background: #1f1f1f;
  color: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pto-aic-core-pattern-main {
  width: 100%;
  padding: 28px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pto-aic-core-pattern-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.pto-aic-core-pattern-subtitle {
  margin: 0;
  max-width: 980px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.6;
}

.pto-aic-core-pattern-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pto-aic-core-pattern-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pto-aic-core-pattern-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.74);
  font: 10px/1.2 var(--text-mono, ui-monospace, monospace);
}

.pto-aic-core-pattern-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.pto-aic-core-pattern-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.pto-aic-core-pattern-chip.memory {
  color: #4d97ff;
}

.pto-aic-core-pattern-chip.compute {
  color: #29c7a6;
}

.pto-aic-core-pattern-chip.cache {
  color: #a4b0bd;
}

.pto-aic-core-pattern-chip.transport {
  color: #ffcf59;
}

.pto-aic-core-pattern-stage {
  overflow-x: auto;
  overflow-y: hidden;
}

.pto-aic-core {
  box-sizing: border-box;
  width: 1000px;
  max-width: 1000px;
  padding: 28px 28px 32px;
  border-radius: 30px;
  background: #343434;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
}

.pto-aic-core__title {
  margin: 0 0 24px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.pto-aic-core__layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.pto-aic-core__top-row {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.pto-aic-core__transport-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pto-aic-core__buffer-lane {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pto-aic-core__bottom-row {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: 248px;
}

.pto-aic-core__cache-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pto-aic-core__queue-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pto-aic-core__transport-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffdf1f;
  border: 1px solid #ffdf1f;
  color: #111111;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.pto-aic-core__buffer {
  box-sizing: border-box;
  padding: 10px 10px 9px;
  border-radius: 16px;
  background: rgba(77, 151, 255, 0.16);
  border: 1px solid rgba(77, 151, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.pto-aic-core__buffer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pto-aic-core__buffer-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.pto-aic-core__buffer-capacity {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.pto-aic-core__grid {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: repeat(var(--pto-aic-grid-cols, 8), var(--pto-aic-grid-cell-size, 18px));
  grid-auto-rows: var(--pto-aic-grid-cell-size, 18px);
  gap: var(--pto-aic-grid-gap, 3px);
  width: max-content;
  padding: 0;
  background: none;
  box-shadow: none;
  align-self: flex-start;
  align-content: start;
  justify-content: start;
}

.pto-aic-core__cell {
  display: block;
  border-radius: 1px;
  background: #2d75df;
  box-shadow: inset 0 0 0 1px rgba(192, 232, 255, 0.72);
}

.pto-aic-core__cell.is-band {
  background: #2d75df;
  box-shadow: inset 0 0 0 1px rgba(192, 232, 255, 0.72);
}

.pto-aic-core__cube {
  box-sizing: border-box;
  border-radius: 18px;
  background: rgba(41, 199, 166, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.pto-aic-core__cube-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.pto-aic-core__cache {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(164, 176, 189, 0.16);
  border: 1px solid rgba(164, 176, 189, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 2;
}

.pto-aic-core__cache-label {
  color: #d7dee6;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.pto-aic-core__scalar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(41, 199, 166, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.pto-aic-core__scalar-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.pto-aic-core__scheduler {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 154, 84, 0.96);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  position: relative;
  z-index: 2;
}

.pto-aic-core__scheduler-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.pto-aic-core__queue {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 154, 84, 0.10);
  border: 1px solid rgba(255, 154, 84, 0.52);
  position: relative;
  z-index: 2;
}

.pto-aic-core__queue-label {
  color: #ffbf97;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.pto-aic-core__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.pto-aic-core__route {
  opacity: 0.92;
}

html[data-embed-preview='true'] .pto-aic-core-pattern-page {
  height: auto;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}

html[data-embed-preview='true'] .pto-aic-core-pattern-main {
  padding: 0;
  gap: 0;
}

html[data-embed-preview='true'] .pto-aic-core-pattern-title,
html[data-embed-preview='true'] .pto-aic-core-pattern-subtitle,
html[data-embed-preview='true'] .pto-aic-core-pattern-meta,
html[data-embed-preview='true'] .pto-aic-core-pattern-legend {
  display: none;
}

html[data-embed-preview='true'] .pto-aic-core-pattern-stage {
  overflow: visible;
}
