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

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

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

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

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

.pto-aiv-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-aiv-core-pattern-stage {
  overflow-x: auto;
  overflow-y: hidden;
}

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

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

.pto-aiv-core__layout {
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.pto-aiv-core__layout > * {
  flex: 0 0 auto;
}

.pto-aiv-core__cache-stack,
.pto-aiv-core__center-stack,
.pto-aiv-core__exec-stack {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.pto-aiv-core__cache-stack {
  gap: 28px;
}

.pto-aiv-core__center-stack {
  gap: 20px;
}

.pto-aiv-core__exec-stack {
  gap: 24px;
}

.pto-aiv-core__cache,
.pto-aiv-core__buffer,
.pto-aiv-core__exec {
  box-sizing: border-box;
  padding: 14px 14px 12px;
  border-radius: 18px;
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.pto-aiv-core__cache {
  background: rgba(164, 176, 189, 0.18);
  border: 1px solid rgba(164, 176, 189, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pto-aiv-core__cache-label,
.pto-aiv-core__buffer-label,
.pto-aiv-core__exec-label,
.pto-aiv-core__buffer-capacity,
.pto-aiv-core__scalar-label,
.pto-aiv-core__vector-label {
  font-size: 14px;
}

.pto-aiv-core__cache-label,
.pto-aiv-core__exec-label,
.pto-aiv-core__buffer-label {
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}

.pto-aiv-core__scalar {
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(48, 139, 48, 0.95);
  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;
  flex: 0 0 auto;
}

.pto-aiv-core__scalar-label,
.pto-aiv-core__vector-label {
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
}

.pto-aiv-core__buffer {
  background: rgba(77, 151, 255, 0.16);
  border: 1px solid rgba(77, 151, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pto-aiv-core__buffer-header,
.pto-aiv-core__exec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.pto-aiv-core__exec {
  background: rgba(164, 176, 189, 0.18);
  border: 1px solid rgba(164, 176, 189, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pto-aiv-core__exec-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pto-aiv-core__exec-chip.is-control {
  background: rgba(255, 154, 84, 0.95);
  color: #ffffff;
}

.pto-aiv-core__exec-chip.is-compute {
  background: rgba(48, 139, 48, 0.95);
  color: #ffffff;
}

.pto-aiv-core__vector {
  box-sizing: border-box;
  border-radius: 18px;
  background: rgba(29, 192, 108, 0.95);
  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;
  flex: 0 0 auto;
}

.pto-aiv-core__grid {
  display: inline-grid;
  grid-template-columns: repeat(var(--pto-aiv-grid-cols, 8), var(--pto-aiv-grid-cell-size, 12px));
  grid-auto-rows: var(--pto-aiv-grid-cell-size, 12px);
  gap: var(--pto-aiv-grid-gap, 1px);
  width: max-content;
  align-self: flex-start;
}

.pto-aiv-core__cell {
  display: block;
  border-radius: 1px;
}

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

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

.pto-aiv-core__cell--cache {
  background: #778190;
  box-shadow: inset 0 0 0 1px rgba(239, 244, 249, 0.82);
}

.pto-aiv-core__cell--cache.is-band {
  background: #7f8998;
}

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

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

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

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

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

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