/*! Lazuli (light) - a Textus theme by @CatVinci-Studio
 *  After Lapis by YiNN (MIT), https://github.com/YiNNx/typora-theme-lapis
 *  License: MIT
 *  Source: https://github.com/CatVinci-Studio/textus-themes
 */

/* Indigo and clear, after Lapis: a centred title, a solid blue band for level-2 headings, serif CJK headings. */

:root {
  --editor-bg: #ffffff;
  --editor-text: #40464f;
  --editor-muted: #8a8f96;
  --editor-border: #d9dfe4;
  --editor-quote-border: #4870ac;
  --editor-accent: #4870ac;
  --editor-code-bg: #f6f8fa;
  --editor-highlight-bg: rgba(255, 255, 181, 0.76);
  --editor-font: Cantarell, -apple-system, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --theme-heading-font: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  --theme-mono: var(--font-mono, monospace);
  --theme-link: #4870ac;
  --theme-strong: #4870ac;
  --theme-quote-bg: #f6f8fa;
  --theme-quote-text: #8a8f96;
  --theme-code-text: #40464f;
  --theme-pre-bg: #f6f8fa;
  --theme-th-bg: transparent;
  --theme-th-text: #4870ac;
  --theme-selection: rgba(255, 255, 181, 0.76);
  --theme-h1: #4870ac;
  --theme-h2: #ffffff;
  --theme-h3: #4870ac;
  --theme-h4: #4870ac;
  --theme-h5: #4870ac;
  --theme-h6: #4870ac;
  --theme-band: #4870ac;
  --theme-marker: #a2b6d4;
}

body {
  background-color: var(--editor-bg);
  color: var(--editor-text);
}

#write {
  color: var(--editor-text);
  font-family: var(--editor-font);
  font-size: 1.0625rem;
  line-height: 1.75;
  color-scheme: light;
  --token-keyword: #4870ac;
  --token-function: #6f42c1;
  --token-string: #428485;
  --token-number: #a88652;
  --token-tag: #4870ac;
  --token-comment: #a8a8a9;
}

#write h1,
#write h2,
#write h3,
#write h4,
#write h5,
#write h6 {
  font-family: var(--theme-heading-font);
  font-weight: 700;
  line-height: 1.3;
}

#write h1 { font-size: 2.1em; color: var(--theme-h1); }
#write h2 { font-size: 1.55em; color: var(--theme-h2); }
#write h3 { font-size: 1.25em; color: var(--theme-h3); }
#write h4 { font-size: 1.08em; color: var(--theme-h4); }
#write h5 { font-size: 1em; color: var(--theme-h5); }
#write h6 { font-size: 0.92em; color: var(--theme-h6); }

#write a {
  color: var(--theme-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

#write strong {
  color: var(--theme-strong);
}

#write blockquote {
  margin: 1.2em 0;
  padding: 0.5em 1.1em;
  border: 0;
  border-left: 3px solid var(--editor-quote-border);
  background-color: var(--theme-quote-bg);
  color: var(--theme-quote-text);
}

#write code {
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background-color: var(--editor-code-bg);
  color: var(--theme-code-text);
  font-family: var(--theme-mono);
  font-size: 0.88em;
}

#write pre,
#write .md-fences {
  background-color: var(--theme-pre-bg);
  border: 1px solid var(--editor-border);
  border-radius: 8px;
  font-family: var(--theme-mono);
}

#write pre code {
  padding: 0;
  background: transparent;
  color: var(--editor-text);
}

#write table {
  border-collapse: collapse;
}

#write th,
#write td {
  padding: 0.5em 0.85em;
  border: 1px solid var(--editor-border);
}

#write th {
  background-color: var(--theme-th-bg);
  color: var(--theme-th-text);
  font-weight: 600;
}

#write hr {
  height: 1px;
  border: 0;
  background-color: var(--editor-border);
}

#write mark {
  background-color: var(--editor-highlight-bg);
  color: inherit;
}

#write input[type="checkbox"] {
  accent-color: var(--editor-accent);
}

#write ::selection {
  background-color: var(--theme-selection);
}

#write h1 { text-align: center; }
#write h2 { display: inline-block; padding: 0.1em 0.6em; border-radius: 4px; background: var(--theme-band); }
#write li::marker { color: var(--theme-marker); }
#write ul ul { list-style-type: square; }
