:root {
  color: #172033;
  background: #f3f6fa;
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.editor-page {
  width: 100%;
  min-height: 100vh;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.editor-page .page-header {
  margin: 0 0 12px;
}

.page-header,
.header-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header {
  justify-content: space-between;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
}

.page-subtitle {
  max-width: 820px;
  margin: 8px 0 0;
  color: #53627a;
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 5px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.card,
.empty-state,
.feature-tile {
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.table-card {
  overflow-x: auto;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.feature-tile {
  padding: 16px;
}

.feature-tile strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 17px;
}

.feature-tile p {
  margin-bottom: 0;
  color: #53627a;
  line-height: 1.45;
}

.distribution-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.meta-label {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

code {
  font-family: Consolas, monospace;
}

.distribution-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.distribution-links a {
  color: #174ea6;
  font-weight: 700;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7ebf0;
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.actions-heading {
  text-align: right;
}

.actions {
  justify-content: flex-end;
}

.actions form {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #c8d0dc;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.button.danger {
  color: #b42318;
}

.editor-card,
.preview-card {
  padding: 18px;
}

.editor-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-card #editor {
  flex: 1;
  min-height: calc(100vh - 250px);
  display: flex;
  flex-direction: column;
}

.editor-card #editor > .rbe-shell,
.editor-card #editor > .rbe {
  flex: 1;
  min-height: calc(100vh - 250px);
}

.editor-card .rbe-canvas,
.editor-card .rbe-editor {
  min-height: calc(100vh - 340px);
}

.preview-card {
  position: relative;
  overflow: visible;
}

.blockwriteai-preview {
  min-height: 120px;
  overflow: visible;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.title-input {
  width: 100%;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid #c8d0dc;
  border-radius: 7px;
  font: inherit;
}

.icon-button {
  width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #667085;
}

@media (max-width: 700px) {
  .editor-page {
    padding: 8px;
  }

  .page-header {
    align-items: flex-start;
  }

  th:nth-child(2),
  td:nth-child(2) {
    display: none;
  }

  .actions {
    flex-wrap: wrap;
  }

  .distribution-card {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .distribution-links {
    justify-content: flex-start;
  }
}
