/* ===================================================================
   EvoCloud 2.0 User Guide -- shared V2 design system
   -------------------------------------------------------------------
   One stylesheet for every guide in this folder so the whole set stays
   visually consistent. Colors, spacing, and the numbered-step / tip /
   note patterns mirror the in-app "Getting Started" pages
   (evo311_getting_started.html and friends). Light + dark modes.
   Pure ASCII. No framework -- CSS Grid / Flexbox only.
   =================================================================== */

:root {
    --eg-slate:        #344a5e;
    --eg-slate-deep:   #0f1a33;
    --eg-ink:          #263238;
    --eg-body-bg:      #ffffff;
    --eg-card-bg:      #f7f9f9;
    --eg-card-border:  #bebebe;
    --eg-note-bg:      #eef5fb;
    --eg-note-border:  #cfdef0;
    --eg-tip-bg:       #fff8e1;
    --eg-tip-border:   #f0b400;
    --eg-tip-ink:      #5f4a00;
    --eg-warn-bg:      #fdecea;
    --eg-warn-border:  #e0917f;
    --eg-warn-ink:     #7a2718;
    --eg-link:         #0a5a93;
    --eg-accent:       #4aa3e0;
    --eg-max:          880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #eef1f4;
    color: var(--eg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

/* ---- Page shell --------------------------------------------------- */
.eg_page {
    max-width: var(--eg-max);
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

/* ---- Top brand bar ------------------------------------------------ */
.eg_topbar {
    background: var(--eg-slate-deep);
    color: #fff;
    padding: 12px 20px;
}
.eg_topbar_inner {
    max-width: var(--eg-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eg_topbar_brand { font-weight: 700; letter-spacing: 0.2px; }
.eg_topbar_chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Breadcrumb --------------------------------------------------- */
.eg_crumbs {
    max-width: var(--eg-max);
    margin: 0 auto;
    padding: 12px 20px 0 20px;
    font-size: 13px;
    color: #6b7b8a;
}
.eg_crumbs a { color: var(--eg-link); text-decoration: none; }
.eg_crumbs a:hover { text-decoration: underline; }

/* ---- Header / hero ------------------------------------------------ */
.eg_header {
    padding: 18px 0 8px 0;
    border-bottom: 1px solid #dbe1e7;
    margin-bottom: 22px;
}
.eg_eyebrow {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 700;
    color: var(--eg-accent);
    margin: 0 0 6px 0;
}
.eg_header h1 {
    margin: 0 0 8px 0;
    font-size: 1.9rem;
    line-height: 1.2;
    color: var(--eg-slate);
}
.eg_lede {
    margin: 0;
    font-size: 1.05rem;
    color: #4a5a68;
}

/* ---- Generic prose ------------------------------------------------ */
.eg_page p { margin: 0 0 12px 0; color: var(--eg-ink); }
.eg_page ul, .eg_page ol { margin: 0 0 12px 0; padding-left: 22px; }
.eg_page li { margin-bottom: 7px; }
.eg_page h2 {
    font-size: 1.3rem;
    color: var(--eg-slate);
    margin: 30px 0 12px 0;
}
.eg_page h3 { font-size: 1.08rem; color: var(--eg-slate); margin: 20px 0 8px 0; }
.eg_page a { color: var(--eg-link); }

/* ---- "In this guide" quick nav ------------------------------------ */
.eg_toc {
    background: var(--eg-note-bg);
    border: 1px solid var(--eg-note-border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.eg_toc h2 { margin: 0 0 8px 0; font-size: 1.0rem; }
.eg_toc ul { margin: 0; padding-left: 20px; }
.eg_toc a { text-decoration: none; }
.eg_toc a:hover { text-decoration: underline; }

/* ---- Prerequisite callout ----------------------------------------- */
.eg_prereq {
    background: var(--eg-note-bg);
    border: 1px solid var(--eg-note-border);
    border-left: 4px solid var(--eg-accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.eg_prereq h2 { margin: 0 0 8px 0; font-size: 1.05rem; }
.eg_prereq p:last-child, .eg_prereq ul:last-child { margin-bottom: 0; }

/* ---- Numbered step cards ------------------------------------------ */
.eg_step {
    background: var(--eg-card-bg);
    border: 1px solid var(--eg-card-border);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.eg_step_head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--eg-slate);
}
.eg_step_num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--eg-slate);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex: 0 0 auto;
}
.eg_step p:last-child, .eg_step ul:last-child, .eg_step ol:last-child { margin-bottom: 0; }

/* ---- Callouts: tip / note / warning ------------------------------- */
.eg_tip, .eg_note, .eg_warn {
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin: 12px 0;
}
.eg_tip  { background: var(--eg-tip-bg);  border-left: 3px solid var(--eg-tip-border);  color: var(--eg-tip-ink); }
.eg_note { background: var(--eg-note-bg); border-left: 3px solid var(--eg-accent);      color: var(--eg-slate); }
.eg_warn { background: var(--eg-warn-bg); border-left: 3px solid var(--eg-warn-border); color: var(--eg-warn-ink); }
.eg_tip strong, .eg_note strong, .eg_warn strong { color: inherit; }

/* ---- Definition / field tables ------------------------------------ */
.eg_table { width: 100%; border-collapse: collapse; margin: 12px 0 18px 0; font-size: 0.95rem; }
.eg_table th, .eg_table td { text-align: left; padding: 9px 12px; border: 1px solid #d7dde3; vertical-align: top; }
.eg_table th { background: #eef2f6; color: var(--eg-slate); font-weight: 700; }
.eg_table tr:nth-child(even) td { background: #fafbfc; }

/* ---- Path / breadcrumb-in-text chip ------------------------------- */
.eg_path {
    display: inline-block;
    background: #eef2f6;
    border: 1px solid #d7dde3;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--eg-slate);
    white-space: nowrap;
}

/* ---- Next-steps footer -------------------------------------------- */
.eg_next {
    margin-top: 26px;
    padding: 16px 18px;
    border-left: 4px solid var(--eg-slate);
    background: #fff;
    border-radius: 0 8px 8px 0;
}
.eg_next h2 { margin: 0 0 8px 0; font-size: 1.1rem; }
.eg_next p:last-child { margin-bottom: 0; }

/* ---- Foot / help -------------------------------------------------- */
.eg_help {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #dbe1e7;
    font-size: 0.92rem;
    color: #6b7b8a;
}

/* ===================================================================
   Dark mode -- opt in via <html data-theme="dark"> or the OS setting.
   =================================================================== */
@media (prefers-color-scheme: dark) {
    body:not([data-force-light]) {
        background: #14171c;
        color: #e8eaed;
    }
    body:not([data-force-light]) .eg_page p,
    body:not([data-force-light]) .eg_page li { color: #e8eaed; }
    body:not([data-force-light]) .eg_header { border-color: #2b2f36; }
    body:not([data-force-light]) .eg_header h1,
    body:not([data-force-light]) .eg_page h2,
    body:not([data-force-light]) .eg_page h3 { color: #cfe0f2; }
    body:not([data-force-light]) .eg_lede { color: #b6c0ca; }
    body:not([data-force-light]) .eg_step { background: #252830; border-color: #3a3d44; }
    body:not([data-force-light]) .eg_step_head { color: #e8eaed; }
    body:not([data-force-light]) .eg_step_num { background: #3a4a5e; }
    body:not([data-force-light]) .eg_toc,
    body:not([data-force-light]) .eg_prereq { background: #1c2733; border-color: #2f4256; }
    body:not([data-force-light]) .eg_note { background: #1c2733; color: #cfe0f2; }
    body:not([data-force-light]) .eg_tip { background: #2e2a1c; border-left-color: #c79a2e; color: #f0e3c0; }
    body:not([data-force-light]) .eg_warn { background: #34211d; border-left-color: #c07059; color: #f2c9bd; }
    body:not([data-force-light]) .eg_table th { background: #222933; color: #cfe0f2; border-color: #39414c; }
    body:not([data-force-light]) .eg_table td { border-color: #39414c; }
    body:not([data-force-light]) .eg_table tr:nth-child(even) td { background: #1b2027; }
    body:not([data-force-light]) .eg_path { background: #222933; border-color: #39414c; color: #cfe0f2; }
    body:not([data-force-light]) .eg_next { background: #1c1f24; border-left-color: #6b86a8; }
    body:not([data-force-light]) .eg_page a,
    body:not([data-force-light]) .eg_crumbs a { color: #9ecbff; }
    body:not([data-force-light]) .eg_help { border-color: #2b2f36; color: #9aa6b2; }
}

/* Explicit dark theme (data-theme="dark") mirrors the media query. */
html[data-theme="dark"] body { background: #14171c; color: #e8eaed; }
html[data-theme="dark"] .eg_step { background: #252830; border-color: #3a3d44; }
html[data-theme="dark"] .eg_step_num { background: #3a4a5e; }

@media (max-width: 640px) {
    .eg_header h1 { font-size: 1.5rem; }
    .eg_page { padding: 0 14px 60px 14px; }
}
