/* simple-override: technical documentation style
   Loaded after style.css. Only differences from the original theme. */

:root {
  --docs-accent: #1a5fb4;
  --docs-border: #cacbcf;
  --docs-th-bg: #f3f3f3;
  --docs-inline-code-bg: #eceef2;

  /* (6) accent: blue only */
  --color: var(--docs-accent);
  --link-color: var(--docs-accent);
  --link-color-hover: #12457f;

  /* (1) line height / (2) fonts */
  --line-height: 1.8;
  --body-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  --heading-font: var(--body-font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --docs-accent: #7ab7ff;
    --docs-border: #373737;
    --docs-th-bg: #242424;
    --docs-inline-code-bg: #2a2d34;
    --color: var(--docs-accent);
    --link-color: var(--docs-accent);
    --link-color-hover: #a9d0ff;
  }
}

/* (2) system fonts are not variable fonts: use real font-weight */
strong, b, dt, table th {
  font-variation-settings: normal;
  font-weight: 700;
}
h1, h2, h3, h4, h5, h6 {
  font-variation-settings: normal;
  font-weight: 700;
}

/* (1) reading width: ~38 full-width characters per line (1em = 1 char) */
.post-template .entry-wrapper,
.page-template .entry-wrapper {
  max-width: 38em;
}
.content__entry {
  line-break: strict;
  overflow-wrap: anywhere;
}

/* (3) headings: H2 underlined, H3 bold only */
.content__entry h2 {
  border-bottom: 2px solid var(--docs-accent);
  padding-bottom: 0.3em;
}
.content__entry h3 {
  border: 0;
  text-decoration: none;
}

/* (4) code blocks: dark, horizontal scroll, keep Prism colors/line-numbers */
pre {
  background-color: var(--prism-bg, #1e2128);
  color: var(--prism-text, #f6f6f9);
  border-radius: var(--border-radius);
  white-space: pre;
  word-wrap: normal;
  overflow-x: auto;
  max-width: 100%;
}
pre > code {
  color: inherit;
  background: none;
  white-space: inherit;
}
pre[class*="language-"] {
  padding-top: calc(var(--baseline) * 4);
  padding-bottom: calc(var(--baseline) * 4);
  padding-right: calc(var(--baseline) * 6);
}
:not(pre) > code {
  background-color: var(--docs-inline-code-bg);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

/* (5) tables: full borders, horizontal scroll at every width */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border: 0;
}
table th,
table td {
  border: 1px solid var(--docs-border);
  min-width: 6em;
}
table th {
  background: var(--docs-th-bg);
}
