@import url("https://bootlib.ascoos.com/dist/fonts/bootlib/animation.min.css");
@import url("https://bootlib.ascoos.com/dist/fonts/bootlib/bfi.min.css");

/* -----------------------------------------
       1. ΧΡΩΜΑΤΙΚΗ ΠΑΛΕΤΑ ΜΕ light-dark()
    ----------------------------------------- */

:root {
	color-scheme: light dark;
	--bg: light-dark(#ffffff, #0b0c10);
	--text: light-dark(#1a1a1a, #e6e6e6);
	--text-soft: light-dark(#444, #b0b0b0);
	--border: light-dark(#d0d0d0, #222);
	--card: light-dark(#f7f7f7, #11141b);
	--accent: light-dark(#005bbb, #9fd3ff);
	--accent-soft: light-dark(#0077cc, #7fc4ff);
	--highlight: light-dark(#aa5500, #ffdd88);
}

/* -----------------------------------------
       2. ΒΑΣΙΚΟ LAYOUT
    ----------------------------------------- */

body {
	background: var(--bg);
	color: var(--text);
	font-family:
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

main {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
}

h1,
h2,
h3,
h4 {
	color: var(--text);
}

h1 {
	font-size: 2.4rem;
	margin-bottom: 0.3rem;
}

h2 {
	margin-top: 2.2rem;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.3rem;
}

h3 {
	margin-top: 1.4rem;
}

/* -----------------------------------------
       3. CODE BLOCKS
    ----------------------------------------- */

pre {
	background: var(--card);
	padding: 0.9rem 1rem;
	border-radius: 6px;
	overflow-x: auto;
	border: 1px solid var(--border);
	font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

/* -----------------------------------------
       4. DECORATIVE ELEMENTS
    ----------------------------------------- */

.tagline {
	color: var(--accent);
	font-size: 1.05rem;
	margin-bottom: 1.5rem;
}

.pill {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: 0.8rem;
	border: 1px solid var(--border);
	margin-right: 0.3rem;
	color: var(--text-soft);
}

.section-note {
	font-size: 0.9rem;
	color: var(--text-soft);
}

.highlight {
	color: var(--highlight);
	font-weight: 600;
}

.observable {
	color: var(--accent);
	font-weight: 600;
}

.diagram {
	border-left: 3px solid var(--border);
	padding-left: 0.8rem;
	margin: 1rem 0;
	font-size: 0.92rem;
	color: var(--text-soft);
}

a {
	color: var(--accent-soft);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 2rem 0;
}

.toc ul {
	list-style: none;
	padding-left: 0;
}

.toc a {
	font-size: 0.9rem;
}

math {
	font-size: 1.5em;
	font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

img {
	width: 100%;
	max-height: 340px;
}
img.flags {
  width: 24px !important;
  height: 18px !important;
}

.toc-toggle-btn {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 101;
	background: #3140af;
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.3s ease;
}

.toc-toggle-btn:hover {
	background: #2f21f7;
}

.toc-container {
	position: relative;
}

.sticky-toc {
	position: fixed;
	top: 4rem;
	/* Exactly below button */
	right: 1rem;
	z-index: 100;
	width: fit-content;
	/* Fixed width for nav */
	background: white;
	padding: 1rem;
	border: 1px solid #ddd;
	border-radius: 0 0 0.5rem 0.5rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	max-height: 0;
	overflow: hidden;
	transition:
		max-height 0.3s ease,
		opacity 0.3s ease;
	opacity: 0;
}

.sticky-toc.open {
	min-width: 300px;
	max-height: 400px;
	/* Adjust based on content */
	opacity: 1;
	overflow-y: auto;
	scrollbar-width: thin;
}

.sticky-toc ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sticky-toc ul>li>ul {
	list-style: none;
	padding: 0;
	margin-left: 15px;
}

.sticky-toc a {
	color: inherit;
	text-decoration: none;
	padding: 0.5rem 0;
}

.sticky-toc a:hover {
	color: #3140af;
}




.bl-h-li-icon-before-book::before {
    content: "📑 ";
    margin-right: 6px;
    color: #007bff
}
.bl-txt-decor-none {
    text-decoration-line: none
}

.bl-flex {
    display: flex;
    gap: var(--blib-spacing)
}
.bl-flex-row {
    display: flex;
    flex-direction: row
}

.bl-flex-column {
    display: flex;
    flex-direction: column
}
.bl-flex-space-between {
    justify-content: space-between
}

@media (max-width:1024px) {
    .bl-flex-row {
        flex-direction: column
    }

    .bl-flex-space-between {
        justify-content: space-around
    }
}

@media (max-width:576px) {
    .blib-flex {
        flex-direction: column;
        align-items: stretch
    }

    @media (min-width:480px) {
        .bl-flex-small {
            flex-direction: column
        }
    }
}