/*
 * Block editor styles.
 *
 * A trimmed reflection of NexT's reading column so drafting matches the
 * published article: same measure, same heading rhythm, same code block look.
 */

.editor-styles-wrapper {
  --next-text: #555;
  --next-muted: #666;
  --next-rule: #eee;
  --next-code-bg: #f3f3f3;
  --next-code-fg: #444;

  color: var(--next-text);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 2;
}

@media (prefers-color-scheme: dark) {
  .editor-styles-wrapper {
    --next-text: #ccc;
    --next-muted: #bbb;
    --next-rule: #444;
    --next-code-bg: #1c1b1b;
    --next-code-fg: #fff;
  }
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-weight: bold;
  line-height: 1.5;
  margin: 30px 0 15px;
}

.editor-styles-wrapper h1 { font-size: 1.5em; }
.editor-styles-wrapper h2 { font-size: 1.375em; }
.editor-styles-wrapper h3 { font-size: 1.25em; }
.editor-styles-wrapper h4 { font-size: 1.125em; }
.editor-styles-wrapper h5 { font-size: 1em; }
.editor-styles-wrapper h6 { font-size: 0.875em; }

.editor-styles-wrapper p {
  margin: 0 0 20px;
}

.editor-styles-wrapper blockquote {
  border-left: 4px solid var(--next-rule);
  color: var(--next-muted);
  margin: 0 0 20px;
  padding: 0 15px;
}

.editor-styles-wrapper hr {
  background-image: repeating-linear-gradient(-45deg, var(--next-rule), var(--next-rule) 4px, transparent 4px, transparent 8px);
  border: 0;
  height: 3px;
  margin: 20px 0;
}

.editor-styles-wrapper pre,
.editor-styles-wrapper code {
  background: var(--next-code-bg);
  color: var(--next-code-fg);
  font-family: consolas, Menlo, monospace, "PingFang SC", "Microsoft YaHei";
}

.editor-styles-wrapper code {
  border-radius: 3px;
  font-size: 0.875em;
  padding: 2px 4px;
}

.editor-styles-wrapper pre {
  line-height: 1.6;
  overflow: auto;
  padding: 10px;
}

.editor-styles-wrapper table {
  border-collapse: collapse;
  width: 100%;
}

.editor-styles-wrapper table th,
.editor-styles-wrapper table td {
  border: 1px solid var(--next-rule);
  padding: 8px 16px;
}

.editor-styles-wrapper .wp-block-image figcaption {
  color: var(--next-muted);
  font-size: 0.875em;
  text-align: center;
}
