/* kakemono documentation: warm accent from the logo, a comfortable reading column,
   tables and code that stay readable. Variables are mdBook's own. */

:root {
  --content-max-width: 52rem;
  --kk-accent: #b5481c;
  --kk-accent-soft: #fbeee3;
}

.light {
  --links: #a8410f;
  --sidebar-active: #b5481c;
  --sidebar-bg: #fbf8f4;
  --sidebar-non-existant: #8a8178;
  --searchbar-border-color: #d9cfc4;
  --inline-code-color: #8c3410;
  --quote-bg: #fbf3ea;
  --quote-border: #e8b98e;
  --table-border-color: #e6ddd3;
  --table-header-bg: #f6efe7;
  --table-alternate-bg: #fcfaf7;
}

.navy, .coal, .ayu {
  --links: #f0a43a;
  --sidebar-active: #f0a43a;
  --inline-code-color: #f5c47f;
  --kk-accent: #f0a43a;
  --kk-accent-soft: #3a2a1a;
}

body { font-size: 1.5rem; }
.content main { line-height: 1.6; }
.content p { margin: 0 0 .9em; }

/* Headings: a clear hierarchy, the first one with a rule under it. */
.content h1 { font-size: 2.6rem; margin: 0 0 .7em; padding-bottom: .3em; border-bottom: 2px solid var(--kk-accent); }
.content h2 { font-size: 2.1rem; margin: 1.8em 0 .6em; padding-bottom: .2em; border-bottom: 1px solid var(--table-border-color); }
.content h3 { font-size: 1.7rem; margin: 1.5em 0 .5em; }
.content h4 { font-size: 1.5rem; margin: 1.3em 0 .4em; color: var(--fg); opacity: .85; }
.content h1 a.header, .content h2 a.header, .content h3 a.header, .content h4 a.header { color: inherit; }
.content h1 a.header:target::before, .content h2 a.header:target::before,
.content h3 a.header:target::before, .content h4 a.header:target::before { color: var(--kk-accent); }

/* Prose */
.content p, .content li { overflow-wrap: break-word; }
.content li + li { margin-top: .15em; }
.content ul, .content ol { margin: 0 0 .9em; }
.content a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.content hr { border: 0; border-top: 1px solid var(--table-border-color); margin: 1.8em 0; }

/* Code */
.content pre { border-radius: 8px; border: 1px solid var(--table-border-color); }
.content pre > code { padding: .9rem 1.2rem; font-size: .88em; line-height: 1.55; }
.content :not(pre) > code { padding: .05em .2em; margin: 0; border-radius: 4px; font-size: .9em; }

/* Tables: the width of the column, a header, light rows; long words and options wrap. */
.content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95em; line-height: 1.45; }
.content table th, .content table td { padding: .4em .7em; border: 1px solid var(--table-border-color); vertical-align: top; overflow-wrap: break-word; }
.content table code { white-space: normal; overflow-wrap: break-word; }
.content table td:first-child { min-width: 13rem; }
.content table td:first-child code { overflow-wrap: anywhere; }
.content table thead th { background: var(--table-header-bg); text-align: left; font-weight: 600; }
.content table tbody tr:nth-child(2n) { background: var(--table-alternate-bg); }

/* Quotes read as notes. */
.content blockquote { border-inline-start: 4px solid var(--kk-accent); border-radius: 0 6px 6px 0; margin: 1em 0; padding: .4em 1.1em; }

/* The introduction's header (logo, title, tagline). */
.content div[align="center"] { margin-bottom: 1.6rem; }
.content div[align="center"] p { margin: .3em 0; }
.content div[align="center"] h1 { border: 0; margin: .15em 0 .1em; padding: 0; }
.content div[align="center"] p { font-size: 1.15em; color: var(--fg); opacity: .85; }
.content div[align="center"] strong { font-weight: 500; }
.content img { max-width: 100%; height: auto; }

/* Sidebar: the part titles as small headings, the current page marked. */
.sidebar .chapter li.part-title { margin: 1.6em 0 .4em; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.sidebar .chapter li.chapter-item { line-height: 1.5; }

/* The changelog is long: keep its lists compact. */
@media (max-width: 620px) { body { font-size: 1.5rem; } .content h1 { font-size: 2.3rem; } }
