/*! Compact (light) - a Textus theme by @CatVinci-Studio
 *  Density after Shimmering Focus by Chris Grieser (MIT), https://github.com/chrisgrieser/shimmering-focus - our own CSS
 *  License: MIT
 *  Source: https://github.com/CatVinci-Studio/textus-themes
 */

/* More on a screen: smaller type, tight lines and paragraphs, small headings - for lists, logs and quick notes. */

:root {
  --editor-bg: #fbf1c7;
  --editor-text: #3c3836;
  --editor-muted: #665c54;
  --editor-border: #e5d5a8;
  --editor-quote-border: #427b58;
  --editor-accent: #108189;
  --editor-code-bg: #f2e5bc;
  --editor-highlight-bg: rgba(250, 189, 47, 0.35);
  --editor-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --theme-heading-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --theme-mono: var(--font-mono, monospace);
  --theme-link: #108189;
  --theme-strong: #9d0006;
  --theme-quote-bg: transparent;
  --theme-quote-text: #504945;
  --theme-code-text: #3c3836;
  --theme-pre-bg: #f2e5bc;
  --theme-th-bg: #f2e5bc;
  --theme-th-text: #3c3836;
  --theme-selection: rgba(250, 189, 47, 0.35);
  --theme-h1: #af3a03;
  --theme-h2: #79740e;
  --theme-h3: #b57614;
  --theme-h4: #9d0006;
  --theme-h5: #427b58;
  --theme-h6: #076678;
  --tone-blue: #076678;
  --tone-green: #79740e;
  --tone-orange: #af3a03;
  --tone-purple: #8f3f71;
  --tone-red: #9d0006;
  --tone-teal: #427b58;
  --tone-yellow: #b57614;
  --tone-pink: #b16286;
  --tone-gray: #7c6f64;
}

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

#write {
  color: var(--editor-text);
  font-family: var(--editor-font);
  font-size: 15px;
  line-height: 1.5;
  color-scheme: light;
  --token-keyword: #8f3f71;
  --token-function: #076678;
  --token-string: #79740e;
  --token-number: #af3a03;
  --token-tag: #9d0006;
  --token-comment: #928374;
}

#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 { --doc-gap: 0.45em; --doc-list-gap: 0.15em; }
#write p { margin: 0.45em 0; }
#write h1 { font-size: 1.5em; margin: 1em 0 0.4em; }
#write h2 { font-size: 1.25em; margin: 1em 0 0.35em; }
#write h3 { font-size: 1.1em; margin: 0.9em 0 0.3em; }
#write h4, #write h5, #write h6 { font-size: 1em; margin: 0.8em 0 0.25em; }
#write ul, #write ol { padding-left: 1.3em; }
#write pre { padding: 0.6em 0.9em; }
#write blockquote { padding: 0.15em 0.9em; }
#write th, #write td { padding: 0.3em 0.75em; }
#write th > p, #write td > p { margin: 0; }
