/* ==========================================================================
   MIRELIO USER GUIDES - documentation theme
   Loaded after each guide template's own <style> block and scoped to .mdoc.
   Keeps the guides' markup, search and scroll-spy working; changes the look only.
   ========================================================================== */
.mdoc {
  --primary: #6D0E2B; --dark-blue: #560B22; --navy: #430819; --orange: #6D0E2B; --orange-dark: #560B22;
  --teal: #6D0E2B; --teal-dark: #560B22;
  --light-bg: #F6F4F3; --card-bg: #fff; --text: #1F1A1C; --text-muted: #5E5558; --border: #E8E3E4;
  --shadow: none; --shadow-lg: none; --shadow-xl: none; --radius: 12px; --radius-lg: 16px;
  --m-primary: #6D0E2B; --m-primary-hover: #560B22; --m-primary-50: #FAF3F5; --m-primary-100: #F3E6EA;
  --m-ink: #1F1A1C; --m-text: #3E3739; --m-muted: #6B6266; --m-border: #E8E3E4; --m-surface: #F6F4F3;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--m-surface); color: var(--m-text); line-height: 1.7; -webkit-font-smoothing: antialiased;
}
.mdoc a { color: var(--m-primary); }
.mdoc :where(a, button, input, summary):focus-visible { outline: 2px solid var(--m-primary); outline-offset: 2px; }

/* ----- header band ------------------------------------------------------- */
.mdoc .hero { background: linear-gradient(180deg, #fff 0%, var(--m-primary-50) 100%); border-bottom: 1px solid var(--m-border); padding: 64px 24px 56px; text-align: center; }
.mdoc .hero::before { display: none; }
.mdoc .hero-badge { background: var(--m-primary-50); color: var(--m-primary); border: 1px solid var(--m-primary-100); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px; margin-bottom: 18px; }
.mdoc .hero h1 { color: var(--m-ink); text-shadow: none; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 14px; }
.mdoc .hero p { color: var(--m-text); font-size: 1.125rem; max-width: 40rem; margin: 0 auto 20px; }
.mdoc .hero-meta { gap: 20px; }
.mdoc .hero-meta-item { color: var(--m-muted); font-size: .85rem; }
.mdoc .hero-meta-item .dot { background: var(--m-primary); }

/* ----- layout: sticky contents + article --------------------------------- */
.mdoc .page-layout { display: grid !important; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; max-width: 1280px; margin: 0 auto; padding: 32px 24px 72px; align-items: start; }
.mdoc .toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border: 1px solid var(--m-border); border-radius: 14px; box-shadow: none; width: auto; min-width: 0; }
.mdoc .toc-inner { padding: 18px 8px 14px; }
.mdoc .toc-header { padding: 0 14px 10px; margin-bottom: 6px; color: var(--m-primary); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--m-border); }
.mdoc .toc-icon { display: none; }
.mdoc .toc-list li a { display: block; padding: 6px 14px; margin: 1px 6px; border-radius: 8px; color: var(--m-text); font-size: .86rem; line-height: 1.4; text-decoration: none; border-left: 0; transition: background .15s, color .15s; }
.mdoc .toc-list li a:hover { background: var(--m-primary-50); color: var(--m-primary); }
.mdoc .toc-list li a.active-toc { background: var(--m-primary-50); color: var(--m-primary); font-weight: 600; }
.mdoc .toc-level-1 a { margin-top: 12px; color: var(--m-ink); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.mdoc .toc-level-2 a { font-weight: 500; }
.mdoc .toc-level-3 a { padding-left: 28px; color: var(--m-muted); font-size: .82rem; }
.mdoc .toc-level-4 a { padding-left: 42px; color: var(--m-muted); font-size: .8rem; }
.mdoc .toc::-webkit-scrollbar-thumb { background: #D9D2D4; border-radius: 10px; }

/* ----- search ------------------------------------------------------------ */
.mdoc .doc-search-input { border: 1px solid var(--m-border); border-radius: 10px; background: #fff; color: var(--m-ink); font-family: inherit; box-shadow: none; }
.mdoc .doc-search-input:focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(109,14,43,.14); outline: none; }
.mdoc .csr-search-dropdown { border: 1px solid var(--m-border); border-radius: 12px; box-shadow: 0 18px 40px -22px rgba(31,26,28,.35); }
.mdoc .csr-search-mark { background: var(--m-primary-100); color: var(--m-primary); }

/* ----- article ----------------------------------------------------------- */
.mdoc .main-content { min-width: 0; }
.mdoc .chapter-banner { background: none; box-shadow: none; border-radius: 0; padding: 8px 0 10px; margin: 36px 0 16px; border-bottom: 2px solid var(--m-primary); }
.mdoc .chapter-banner:first-of-type { margin-top: 20px; }
.mdoc .chapter-title { color: var(--m-ink); font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.mdoc .doc-section { background: #fff; border: 1px solid var(--m-border); border-radius: 16px; box-shadow: none; padding: 32px 36px; margin: 0 0 20px; }
.mdoc .section-heading { color: var(--m-ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--m-border); }
.mdoc .section-heading::before { display: none; }
.mdoc .section-content { color: var(--m-text); }
.mdoc .sub-heading { color: var(--m-ink); font-weight: 650; letter-spacing: -.005em; margin: 30px 0 10px; }
.mdoc .sub-heading.level-2 { font-size: 1.25rem; }
.mdoc .sub-heading.level-3 { font-size: 1.1rem; padding-top: 6px; }
.mdoc .sub-heading.level-4 { font-size: 1rem; color: var(--m-text); }
.mdoc .doc-para { color: var(--m-text); font-size: 1rem; line-height: 1.7; margin: 0 0 12px; }
.mdoc .overview-label, .mdoc .requirements-label { display: inline-block; color: var(--m-primary); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mdoc .overview-label { background: var(--m-primary-50); border: 1px solid var(--m-primary-100); border-radius: 999px; padding: 2px 10px; margin-right: 6px; }
.mdoc p.doc-para > .requirements-label { margin: 14px 0 2px; }

/* numbered steps */
.mdoc ol.steps-list { list-style: none !important; padding-left: 0 !important; margin: 8px 0 18px !important; counter-reset: st; display: grid; gap: 10px; }
.mdoc ol.steps-list > li { counter-increment: st; position: relative; margin: 0; padding: 12px 16px 12px 56px; background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 12px; }
.mdoc ol.steps-list > li::before { content: counter(st); position: absolute; left: 14px; top: 11px; width: 28px; height: 28px; border-radius: 50%; background: var(--m-primary); color: #fff; font-size: .82rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mdoc ol.steps-list > li ul, .mdoc ol.steps-list > li ol { margin-top: 8px !important; }
.mdoc ul[style*="disc"] { list-style: disc !important; }
.mdoc ul[style*="disc"] > li::marker { color: var(--m-primary); }

/* callouts: one calm style, colour used only for meaning */
.mdoc .callout { background: var(--m-surface); border: 1px solid var(--m-border); border-left: 4px solid #B9AEB2; border-radius: 12px; padding: 14px 18px; margin: 16px 0; box-shadow: none; }
.mdoc .callout p { margin: 0; color: var(--m-text); font-size: .975rem; }
.mdoc .callout-important, .mdoc .callout-warning, .mdoc .callout-alert, .mdoc .callout-security { background: var(--m-primary-50); border-color: var(--m-primary-100); border-left-color: var(--m-primary); }
.mdoc .callout-success { background: #F3F8F5; border-color: #D7E8DE; border-left-color: #1E7B4F; }
.mdoc .callout-tip, .mdoc .callout-note, .mdoc .callout-info { background: #fff; border-left-color: #8B8286; }

/* tables */
.mdoc .professional-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0 20px; border: 1px solid var(--m-border); border-radius: 12px; overflow: hidden; font-size: .94rem; background: #fff; }
.mdoc .professional-table thead th { background: var(--m-surface); color: var(--m-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--m-border); }
.mdoc .professional-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--m-border); color: var(--m-text); vertical-align: top; }
.mdoc .professional-table tbody tr:last-child td { border-bottom: 0; }
.mdoc .professional-table tbody tr:nth-child(even) td { background: #fff; }
.mdoc .professional-table tbody tr:hover td { background: var(--m-primary-50); }

/* introduction cards */
.mdoc .doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.mdoc .doc-card { background: var(--m-surface); border: 1px solid var(--m-border); border-top: 3px solid var(--m-primary); border-radius: 14px; padding: 18px 20px; }
.mdoc .doc-card h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 650; color: var(--m-ink); }
.mdoc .doc-card p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--m-text); }

/* ----- responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
  .mdoc .page-layout { grid-template-columns: 1fr; padding: 20px 16px 56px; gap: 20px; }
  .mdoc .toc { position: static; max-height: 280px; }
  .mdoc .doc-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mdoc .hero { padding: 44px 18px 40px; }
  .mdoc .doc-section { padding: 22px 18px; border-radius: 14px; }
  .mdoc .section-heading { font-size: 1.3rem; }
  .mdoc ol.steps-list > li { padding: 12px 12px 12px 50px; }
  .mdoc .professional-table { display: block; overflow-x: auto; }
}

/* ----- refinements (v1.1) ------------------------------------------------ */
.mdoc .chapter-banner { border-left: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
.mdoc .section-content { padding: 0 !important; }
.mdoc .toc-list li a.active-toc { background: var(--m-primary-50) !important; color: var(--m-primary) !important; border-left: 0 !important; }
.mdoc .toc-level-1 a.active-toc { color: var(--m-primary) !important; }
.mdoc .doc-section > *:last-child { margin-bottom: 0; }
