/*
 * manyos theme for the SMILEconnect docs (Docsify 4).
 *
 * Loaded after docsify's structural theme `pure.css` (layout, sidebar, cover,
 * mobile toggle — no colors, no external fonts) by docs/site/index.html and
 * docs/site/mcp/index.html. Look and palette follow https://manyos.it:
 * warm paper background, graphite text, orange accent, IBM Plex Sans/Mono,
 * square corners and hairline borders.
 *
 * Fonts are served locally from _media/fonts (SIL OFL, see fonts/OFL.txt).
 */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  /* manyos palette (manyos.it) */
  --m-primary: #ef7721;       /* orange accent: bars, markers, buttons */
  --m-primary-ink: #b5520e;   /* orange for text on paper (readable contrast) */
  --m-primary-soft: #fbe7d8;
  --m-paper: #fbfaf7;
  --m-ink: #1f1e1c;           /* headings */
  --m-text: #33322f;          /* body text */
  --m-graphite: #262523;      /* code blocks */
  --m-gray-50: #f6f4f0;
  --m-gray-100: #efece7;
  --m-gray-200: #e3dfd8;
  --m-gray-300: #cfcac2;
  --m-gray-400: #77726b;
  --m-gray-500: #5f5b55;
  --m-gray-600: #403f3d;
  --m-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --m-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* docsify theme variable: progress bar, search hits, toggle, copy-code button */
  --theme-color: var(--m-primary);
}

/* ---------- Base ---------- */

html, body, .sidebar { background-color: var(--m-paper); }

body {
  color: var(--m-text);
  font-family: var(--m-sans);
  font-size: 16px;
  line-height: 1.6;
}

::selection { background: var(--m-primary-soft); color: var(--m-ink); }

div#app { font-family: var(--m-mono); font-size: 14px; font-weight: 400; color: var(--m-gray-500); }

/* ---------- Sidebar ---------- */

.sidebar {
  border-right: 1px solid var(--m-gray-200);
  color: var(--m-text);
  padding-top: 28px;
  width: 300px;
}

.sidebar > h1 {
  margin: 0 24px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--m-gray-200);
  text-align: left;
  font-size: 1rem;
  font-weight: 400;
}

.sidebar > h1 a { color: var(--m-ink); display: block; }

/* name: '<img class="brand-logo"><span class="brand-product">SMILE<em>connect</em></span>' */
.sidebar > h1 .brand-logo { display: block; width: 116px; height: auto; margin-bottom: 14px; }
.sidebar > h1 .brand-product {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--m-ink);
}
.sidebar > h1 .brand-product em { font-style: normal; color: var(--m-primary-ink); }
.sidebar > h1 .brand-sub {
  display: block;
  margin-top: 6px;
  font-family: var(--m-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--m-gray-500);
}

.sidebar .sidebar-nav { padding: 0 0 48px; line-height: 1.5; }
.sidebar .sidebar-nav > ul { margin: 0 24px; }
.sidebar ul ul { margin: 0; padding: 0; }
.sidebar .sidebar-nav > ul > li > ul { padding-left: 15px; }   /* links line up with the group label text */
.sidebar ul ul ul { padding-left: 12px; }
.sidebar li { margin: 0; }

/* group labels ("Getting started", "Configuration", …): mono label with orange square, like manyos.it */
.sidebar li > p {
  margin: 22px 0 6px;
  font-family: var(--m-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--m-gray-500);
}
.sidebar li > p::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 8px 1px 0;
  background: var(--m-primary);
}
/* a top-level page link in a loose list (`- [Overview](README)` + blank line) is a link, not a label */
.sidebar li > p:has(> a) { margin: 0; font-family: var(--m-sans); letter-spacing: 0; }
.sidebar li > p:has(> a)::before { content: none; }
.sidebar .sidebar-nav > ul > li > p > a { margin-left: 0; }

.sidebar ul li a {
  color: var(--m-gray-600);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 12px 4px 13px;
  margin-left: -15px;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.sidebar ul li a:hover { color: var(--m-ink); text-decoration: none; border-left-color: var(--m-gray-300); }
.sidebar ul li.active > a {
  color: var(--m-ink);
  font-weight: 500;
  border-right: 0;
  border-left-color: var(--m-primary);
}

/* page headings below the active page (subMaxLevel) */
.sidebar .app-sub-sidebar { margin-left: 0; padding-left: 12px; }
.sidebar .app-sub-sidebar li::before { content: none; }
.sidebar .app-sub-sidebar li a { font-size: 13px; color: var(--m-gray-500); }

.sidebar-toggle { background-color: rgba(251, 250, 247, .9); }
.sidebar-toggle span { background-color: var(--m-gray-600); }

/* ---------- Content ---------- */

.content { left: 300px; }

.markdown-section { max-width: 880px; padding: 40px 40px 64px; }

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6,
.markdown-section strong { color: var(--m-ink); font-weight: 600; }

.markdown-section h1 { font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 1.25rem; }
.markdown-section h2 {
  font-size: 1.625rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 56px 0 .9rem;
  padding-top: 28px;
  border-top: 1px solid var(--m-gray-200);
}
/* pages that already separate sections with `---` get no second line */
.markdown-section hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.markdown-section h3 { font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; margin: 36px 0 .6rem; }
.markdown-section h4 { font-size: 1.0625rem; margin: 28px 0 .5rem; }
.markdown-section h5 { font-size: 1rem; }
.markdown-section h6 { font-size: .9375rem; color: var(--m-gray-500); }

.markdown-section .anchor span { color: var(--m-ink); }
.markdown-section .anchor:hover { text-decoration: none; }
.markdown-section .anchor:hover span { color: var(--m-primary-ink); }

.markdown-section p,
.markdown-section ul,
.markdown-section ol { line-height: 1.7; word-spacing: normal; }
.markdown-section p, .markdown-section figure { margin: 1em 0; }
.markdown-section ul, .markdown-section ol { padding-left: 1.5rem; }
.markdown-section li { margin: .2em 0; }
.markdown-section ul > li::marker { color: var(--m-primary); }

.markdown-section a {
  color: var(--m-primary-ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(181, 82, 14, .3);
  transition: border-color .15s, color .15s;
}
.markdown-section a:hover { color: var(--m-ink); border-bottom-color: var(--m-primary); }
.markdown-section a.anchor { border-bottom: 0; color: inherit; font-weight: inherit; }

.markdown-section em { color: inherit; }

.markdown-section hr { border: 0; border-bottom: 1px solid var(--m-gray-200); margin: 2.5em 0; }

.markdown-section img { border: 1px solid var(--m-gray-200); background: #fff; }

.markdown-section blockquote {
  margin: 1.75em 0;
  padding: 2px 20px;
  color: var(--m-gray-600);
  background: var(--m-gray-50);
  border-left: 3px solid var(--m-primary);
}
.markdown-section blockquote p { font-weight: 400; }

/* docsify helpers: `!> ` (tip) and `?> ` (warn) */
.markdown-section p.tip {
  background: var(--m-primary-soft);
  border-left: 3px solid var(--m-primary);
  border-radius: 0;
  padding: 12px 20px 12px 28px;
}
.markdown-section p.tip::before { background: var(--m-primary); color: var(--m-ink); border-radius: 0; font-family: var(--m-mono); }
.markdown-section p.tip em { color: inherit; }
.markdown-section p.tip code { background: rgba(255, 255, 255, .6); }
.markdown-section p.warn { background: var(--m-gray-50); border: 1px solid var(--m-gray-200); border-radius: 0; padding: 1rem 1.25rem; }

/* ---------- Tables ---------- */

.markdown-section table { margin: 1.5em 0; font-size: .9375rem; }
.markdown-section thead th { border-top: 1px solid var(--m-ink); }
.markdown-section tr { border-top: 0; background: transparent; }
.markdown-section tr:nth-child(2n) { background: transparent; }
.markdown-section th,
.markdown-section td { border: 0; border-bottom: 1px solid var(--m-gray-200); padding: 9px 16px 9px 0; text-align: left; vertical-align: top; }
.markdown-section th + th, .markdown-section td + td { padding-left: 16px; }
.markdown-section th {
  font-family: var(--m-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--m-gray-500);
  border-bottom-color: var(--m-gray-300);
}
.markdown-section tbody tr:hover { background: var(--m-gray-50); }

/* ---------- Code ---------- */

.markdown-section code,
.markdown-section pre,
.markdown-section output::after { font-family: var(--m-mono); }

.markdown-section code {
  background: var(--m-gray-100);
  color: var(--m-ink);
  border-radius: 2px;
  margin: 0 1px;
  padding: .1em .35em;
  white-space: pre-wrap;
}
/* inline and block code: 85 % of the surrounding text (block: 13.6px) */
.markdown-section > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code { font-size: .85em; }

.markdown-section pre,
.markdown-section output { position: relative; margin: 1.5em 0; }

.markdown-section pre {
  background: var(--m-graphite);
  border-radius: 2px;
  padding: 0 1.25rem;
  line-height: 1.6;
  overflow: auto;
  word-wrap: normal;
}
.markdown-section pre > code {
  display: block;
  background: transparent;
  color: var(--m-gray-100);
  padding: 1.6em 0;
  margin: 0;
  border-radius: 0;
  max-width: inherit;
  overflow: inherit;
  white-space: inherit;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
}
.markdown-section pre::after,
.markdown-section output::after {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  height: 15px;
  line-height: 15px;
  padding: 6px 12px 0;
  text-align: right;
  color: var(--m-gray-400);
  font-family: var(--m-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.markdown-section output { display: block; padding: 1.5rem 1.25rem; border: 1px dashed var(--m-gray-300); }
.markdown-section output > :first-child { margin-top: 0; }
.markdown-section output > :last-child { margin-bottom: 0; }
.markdown-section iframe { margin: 1em 0; }
code .token { min-height: 1.5rem; position: relative; left: auto; -webkit-font-smoothing: initial; }

/* Prism tokens, tuned for the graphite background */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #918b82; font-style: italic; }
.token.punctuation { color: #b4aea5; }
.token.namespace { opacity: .7; }
.token.property, .token.tag, .token.attr-name, .token.selector { color: #f6a868; }
.token.string, .token.char, .token.attr-value, .token.inserted { color: #e3cf9f; }
.token.number, .token.boolean, .token.constant, .token.symbol { color: #9fd0d6; }
.token.keyword, .token.atrule, .token.important { color: #ff9a4d; }
.token.function, .token.class-name { color: #f4ede2; font-weight: 500; }
.token.operator, .token.entity, .token.url, .token.regex, .token.variable, .token.placeholder { color: #c9c3b9; }
.token.control, .token.directive, .token.unit, .token.statement { color: #ff9a4d; }
.language-css .token.string, .style .token.string { color: #e3cf9f; }
.token.deleted { color: #f19a8f; }

/* docsify-copy-code button */
.markdown-section pre .docsify-copy-code-button {
  background: var(--m-primary);
  color: var(--m-ink);
  border-radius: 2px;
  font-family: var(--m-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
}
.markdown-section pre .docsify-copy-code-button .label { color: inherit; }

/* ---------- Cover ---------- */

section.cover { background: var(--m-paper) !important; color: var(--m-text); }
section.cover.has-mask .mask { background-color: var(--m-paper); }
section.cover .cover-main { max-width: 760px; margin: 0 auto; padding: 0 24px; text-align: left; }
section.cover .cover-main > p:first-child img { width: 200px; max-width: 60%; height: auto; margin-left: -8px; }

section.cover h1 {
  margin: 1.25rem 0 1.25rem;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--m-ink);
  text-align: left;
}
section.cover h1 a { display: inline; color: inherit; }

section.cover blockquote { margin: 0 0 1.5rem; font-size: 1.25rem; line-height: 1.5; color: var(--m-gray-600); text-align: left; }
section.cover blockquote > p { margin: 0; }

section.cover ul { margin: 0 0 2.25rem; max-width: none; line-height: 1.6; color: var(--m-text); }
section.cover ul li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px solid var(--m-gray-200); }
section.cover ul li:first-child { border-top: 1px solid var(--m-gray-200); }
section.cover ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 7px;
  height: 7px;
  background: var(--m-primary);
}

section.cover .cover-main > p:last-child { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
section.cover .cover-main > p:last-child a {
  margin: 0;
  padding: 12px 20px;
  border: 1px solid var(--m-gray-300);
  border-radius: 2px;
  background: transparent;
  color: var(--m-ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}
section.cover .cover-main > p:last-child a:hover { border-color: var(--m-ink); color: var(--m-ink); opacity: 1; }
section.cover .cover-main > p:last-child a:last-child {
  background: var(--m-primary);
  border-color: var(--m-primary);
  color: var(--m-ink);
}
section.cover .cover-main > p:last-child a:last-child:hover { background: #f38a3d; border-color: #f38a3d; color: var(--m-ink); }
section.cover .cover-main > p:last-child a:last-child::after { content: " \2192"; }

/* ---------- Search plugin (if enabled later) ---------- */

.search input { font-family: var(--m-sans); background: #fff; border: 1px solid var(--m-gray-200); border-radius: 2px; }
.search .search-keyword { color: var(--m-primary-ink); }

/* ---------- Narrow screens ---------- */

@media screen and (max-width: 768px) {
  .sidebar { left: -300px; }
  .content { left: 0; }
  .markdown-section { padding: 24px 20px 48px; }
  .markdown-section h1 { font-size: 1.875rem; }
  .markdown-section h2 { font-size: 1.375rem; margin-top: 40px; padding-top: 22px; }
  .markdown-section pre { padding: 0 1rem; }
  .sidebar-toggle { background-color: transparent; }
  body.close .sidebar-toggle { background-color: rgba(251, 250, 247, .95); }
  section.cover .cover-main { padding: 0 20px; }
  section.cover blockquote { font-size: 1.0625rem; }
}

@media print {
  html, body { background: #fff; }
  .markdown-section pre { background: var(--m-gray-50); border: 1px solid var(--m-gray-200); }
  .markdown-section pre > code { color: var(--m-ink); }
}
