.textformat-app {
  display: grid;
  grid-template-areas:
    "header header"
    "side center"
    "side code";
  grid-template-columns: 280px 1fr 320px;
  grid-template-rows: auto 1fr;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

.textformat-main {
  display: contents;
}

.textformat-side {
  grid-area: side;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.textformat-center {
  grid-area: center;
}

.textformat-code {
  grid-area: code;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.textformat-viz {
  min-height: 200px;
}

.text-demo {
  background: var(--surface-solid);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  font-size: 18px;
}

.text-demo .bold,
.text-demo strong {
  font-weight: 700;
}

.text-demo .italic,
.text-demo em,
.text-demo i {
  font-style: italic;
}

.text-demo .underline,
.text-demo u {
  text-decoration: underline;
}

.text-demo .strike,
.text-demo s,
.text-demo del {
  text-decoration: line-through;
  color: var(--text-muted);
}

.text-demo .small,
.text-demo small {
  font-size: 13px;
}

.text-demo ins {
  text-decoration: underline;
  color: var(--success);
}

.text-demo mark {
  background: var(--warning);
  color: var(--bg-page);
  padding: 2px 4px;
  border-radius: 3px;
}

@media (max-width: 1024px) {
  .textformat-app {
    grid-template-areas:
      "header"
      "side"
      "center"
      "code";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  
  .textformat-side,
  .textformat-center,
  .textformat-code {
    position: static;
  }
}