:root {
  --mt-accent: #6554db;
  --mt-pale: #f3f0ff;
}
.mt-page {
  margin: 0;
  background: #f5f6fc;
  color: #26334c;
  font:
    16px/1.5 Arial,
    sans-serif;
}
.mt-shell {
  max-width: 1440px;
  margin: auto;
  padding: 32px;
}
.mt-top,
.mt-actions,
.mt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mt-top {
  justify-content: space-between;
  margin-bottom: 26px;
}
.mt-top h1 {
  font-size: 34px;
  margin: 8px 0;
}
.mt-muted {
  color: #748096;
  font-size: 14px;
}
.mt-page button,
.mt-dialog button,
.mt-link {
  font: inherit;
  cursor: pointer;
  border: 1px solid #dfe3f0;
  border-radius: 12px;
  padding: 10px 15px;
  background: #fff;
  color: #4b526b;
  text-decoration: none;
}
.mt-page button.primary,
.mt-dialog button.primary {
  background: #6554db;
  color: white;
  border-color: #6554db;
}
.mt-page button:disabled,
.mt-dialog button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.mt-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
}
.mt-sidebar,
.mt-card {
  background: white;
  border: 1px solid #e1e5f2;
  border-radius: 20px;
  padding: 20px;
}
.mt-sidebar {
  align-self: start;
  position: sticky;
  top: 20px;
  display: grid;
  gap: 8px;
}
.mt-sidebar button {
  text-align: left;
}
.mt-sidebar button.active {
  background: #f1eeff;
  color: #6554db;
}
.mt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.mt-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mt-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.mt-card .mt-actions {
  margin-top: auto;
}
.mt-thumb {
  height: 110px;
  background: var(--mt-pale);
  border-radius: 14px;
  padding: 18px;
  color: var(--mt-accent);
  overflow: hidden;
}
.mt-thumb span {
  display: block;
  width: 85%;
  height: 7px;
  border-radius: 9px;
  background: currentColor;
  opacity: 0.14;
  margin-top: 12px;
}
.mt-dialog {
  box-sizing: border-box;
  border: 1px solid #e1e5f2;
  border-radius: 24px;
  padding: 24px;
  color: #26334c;
  max-width: min(1450px, 96vw);
  max-height: 94vh;
  width: 1200px;
  box-shadow: 0 25px 90px #17264c30;
  font:
    16px/1.5 Arial,
    sans-serif;
}
.mt-dialog::backdrop {
  background: #19233c66;
  backdrop-filter: blur(3px);
}
.mt-editor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
  gap: 26px;
}
.mt-dialog input:not([type="checkbox"]),
.mt-dialog textarea,
.mt-dialog select,
.mt-page input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #dce1f0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: white;
  color: inherit;
}
.mt-dialog label {
  display: block;
  margin: 12px 0 5px;
  font-size: 14px;
  color: #65718a;
}
.mt-dialog textarea {
  min-height: 100px;
  resize: vertical;
}
.mt-block-editor {
  border: 1px solid #dfe3f0;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
}
.mt-block-editor .mt-actions {
  justify-content: space-between;
}
.mt-block-editor img {
  max-width: 100%;
  max-height: 180px;
}
.mt-preview {
  background: #f6f7fc;
  padding: 20px;
  border-radius: 18px;
  align-self: start;
  position: sticky;
  top: 0;
  max-height: 72vh;
  overflow: auto;
}
.mt-sheet {
  background: white;
  border-radius: 18px;
  border: 1px solid #e0e4ef;
  padding: 32px;
  overflow-wrap: anywhere;
}
.mt-sheet h2 {
  color: var(--mt-accent);
  margin-top: 0;
}
.mt-section {
  padding: 18px;
  background: var(--mt-pale);
  border-radius: 12px;
  margin: 16px 0;
  white-space: pre-wrap;
}
.mt-section h3 {
  margin: 0 0 9px;
  color: var(--mt-accent);
  font-size: 18px;
}
.mt-section p {
  margin: 0;
}
.mt-section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}
.mt-section.example {
  background: #edf5ff;
}
.mt-section.definition {
  background: #edf8f2;
}
.mt-section.warning {
  background: #fff5e8;
}
.mt-section.formula {
  overflow: auto;
  text-align: center;
}
.mt-error {
  color: #bd3548;
  white-space: pre-wrap;
  min-height: 24px;
}
.mt-empty {
  padding: 40px;
  text-align: center;
  color: #748096;
  grid-column: 1/-1;
}
.mt-preview-only {
  width: 900px;
}
.mt-picker {
  width: 950px;
}
.mt-picker .mt-preview {
  position: static;
  max-height: 45vh;
}
.mt-sticky-actions {
  position: sticky;
  bottom: -24px;
  padding: 14px 0;
  background: #fff;
}
.mt-page [hidden],
.mt-dialog [hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .mt-shell {
    padding: 16px;
  }
  .mt-layout,
  .mt-editor-layout {
    grid-template-columns: 1fr;
  }
  .mt-sidebar {
    position: static;
    display: flex;
    overflow: auto;
  }
  .mt-sidebar button {
    flex-shrink: 0;
  }
  .mt-dialog {
    padding: 16px;
  }
  .mt-preview {
    position: static;
  }
  .mt-sheet {
    padding: 20px;
  }
  .mt-top h1 {
    font-size: 28px;
  }
}
