/* The root canvas remains visible beneath the long, positioned lesson layout. */
:root[data-theme="dark"] {
    background-color: var(--band);
}

:root[data-theme="dark"] body {
    background-color: var(--band);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---------------------------------------------------
MAIN
----------------------------------------------------- */

h4{
	font-size: 1.3rem;
	font-weight: bold;
	margin-top: var(--section-start);
	margin-bottom: 0.4rem;;
	text-align: center;
	font-variant: small-caps;
}

/* Use a full bold weight against the light reading text. */
#lesson-content :is(strong, b) {
    font-weight: 700;
}



/* ---------------------------------------------------
BUTTONS & LINKS
----------------------------------------------------- */

/* Lesson references use the same text-link treatment as the About page. */
main a[href]:not(.catalog-card) {
    --hover-background: transparent;
    --hover-color: var(--link-hover);
    background-color: transparent;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

main a[href]:not(.catalog-card):hover {
    color: var(--link-hover);
    text-decoration: underline;
}

#change-chapter .btn{
	--hover-background: transparent;
	font-weight: 400;
	font-size: 0.8rem;
	background-color: transparent;
	color: var(--ink);
	margin-top: 4rem;
	margin-bottom: 2rem;
}

#change-chapter .btn:hover{
	color: var(--link-hover);
	text-decoration: underline;
}



/* ---------------------------------------------------
CARDS
----------------------------------------------------- */

.example-card, .learning-goals-card{
	margin: auto 0;
	margin-top: 2rem;
	margin-bottom: 2rem;
	margin-left: auto 0;
	margin-right: auto 0;

}

/* Examples Card */
.card-body .lesson-bullets > li + li,
.lesson-sources > li + li {
    margin-top: 0.25rem;
}

.example-card{
	background-color: var(--surface);
	border-color: var(--color-logo-orange);
	font-size: 0.9rem;

}

.example-card .card-header{
	background-color: var(--color-logo-orange);
	color: var(--color-navy);
	font-weight: bold;
	font-size: 1rem;
}

/* Learning Goals Card */

.learning-goals-card{
	margin-left: 7vw;
	margin-right: 7vw;
	font-size: 0.9rem;
	background-color: var(--surface);
	border-color: var(--panel-edge);
	color: var(--ink);
}

.learning-goals-card .card-header{
	background-color: var(--color-navy);
	color: var(--color-white);
	font-weight: bold;
	font-size: 1rem;
}

/* Contents Card */
.contents-card{
	border-radius: var(--corner-radius);
	border-color: var(--panel-edge);
	padding-bottom: 1rem;
	font-size: 0.9rem;
	background-color: var(--surface);
	width: 265px;
	margin: auto;
}

.contents-card .card-header{
	font-size: 1rem;
	font-weight: bold;
	background-color: var(--band);
}

.contents-card img{
	height: 60px;
	width: 60px;
	margin: auto;
}


.contents-card ul{
	padding: 0rem;
	margin: 0;
}

.contents-card ul a{
    --hover-background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
	/*color: #0275d8;*/
	color: var(--ink);
	display: block;

	padding-left: 1rem;
	padding-right: 1rem;
	padding-bottom: 0.2rem;
	padding-top: 0.2rem;
}

.contents-card ul li.active>a,
a[aria-expanded="true"] {
	color: var(--color-white);
	background: var(--color-navy);
}

.contents-card ul a:hover{
	color: var(--color-white);
	background-color:  var(--color-navy);
	text-decoration: underline;
}



/* ---------------------------------------------------
BREADCRUMB
----------------------------------------------------- */

/* Style the list */
ul.breadcrumb {
    border: var(--border-width) solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 var(--corner-radius) var(--corner-radius);
	padding: 0.7rem;
	list-style: none;
	background-color: var(--surface);
}

/* Display list items side by side */
ul.breadcrumb li {
	display: inline;
	font-size: 0.9rem;
}

/* Chevrons separate breadcrumb levels. */
ul.breadcrumb li+li:before {
	padding: 5px;
	color: var(--ink);
	content: ">";
}

/* Add a color to all links inside the list */
ul.breadcrumb a[href] {
	--hover-background: transparent;
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Add a color on mouse-over */
ul.breadcrumb [aria-current="page"]:not(a[href]) { color: var(--ink); }

ul.breadcrumb a[href]:hover {
	color: var(--link-hover);
	text-decoration: underline;
}



/* ---------------------------------------------------
IMAGES, MEDIA & ANIMATIONS
----------------------------------------------------- */

#lesson-content :is(.card, .figure, .media-panel, .lesson-simulation) {
    border-width: 2px;
}

/* Match image and video frames to the lesson cards. */
.figure,
.media-panel {
    border-color: var(--color-border);
    background-color: var(--surface);
}

/* Keep panel spacing consistent despite the shared figure reset and utilities. */
.figure,
.media-panel,
.lesson-simulation {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Figures */
.figure{
	padding: auto 0;
	width: auto;
	height: auto;

}

.figure-img{
	width: auto;
	margin: 0;
	padding: 1rem;
	padding-bottom: 0rem;
	background-color: var(--band);

}

.figure-caption{
	border-top: var(--border-width) solid var(--color-border);
	background-color: var(--surface);
	padding: 1rem;
	color: var(--ink);
	margin: auto 0;
	text-align: left;
	font-weight: bold;
}

/* Images Wrapped Around Text */
.image-wrapper figure{
	padding: 0;
	width: 30vw;
	height: auto;
	margin: auto 0;
}

#embedded-media{
	margin-left: 0;
	margin-right: 0;
	height: auto;

}

#jscode{
	padding: 0;
	background-color: var(--band);
	margin: 0rem;
	height: 50vh;
}

#animation{
	background-color: var(--band);

}



/*---------------------------------------------------
CONTENT & COLUMNS
---------------------------------------------------*/
p {
    text-indent: 0;
}

#content {
	width: 100%;
	padding: 0;

	min-height: 100vh;
	transition: all 0.3s;
	position: absolute;
	top: 0;
	right: 0;
	margin: auto 0;
}

.container {
   width: 95%;
   margin: 30px auto 0;
}

.container h1{
	text-align: center;
	font-size: var(--title-size);
    line-height: 1.15;
    text-wrap: balance;
	font-weight: 600;
	margin-bottom: var(--page-title-gap);
}

.container h2{
	font-size: 1.3rem;
	font-weight: bold;
	margin-top: var(--section-start);
	margin-bottom: var(--section-heading-gap);
}

.simulation-lesson .lesson-section > h2 {
    font-size: var(--section-title-size);
    font-weight: 600;
    line-height: 1.4;
}

.applet-container1{
	margin: 0rem;
	text-align: center;

}

.applet-container2{
	margin: 0rem;
	text-align: center;

}

.col{
	background: var(--band);
	padding: 0rem;
	text-align: center;
	justify-content: center;

	margin-top: 2rem;
	margin-bottom: 2rem;
}

.text-left-not-xs, .text-left-not-sm, .text-left-not-md, .text-left-not-lg {
    text-align: left;
}
.text-center-not-xs, .text-center-not-sm, .text-center-not-md, .text-center-not-lg {
    text-align: center;
}
.text-right-not-xs, .text-right-not-sm, .text-right-not-md, .text-right-not-lg {
    text-align: right;
}
.text-justify-not-xs, .text-justify-not-sm, .text-justify-not-md, .text-justify-not-lg {
    text-align: justify;
}

@media (max-width: 767px) {
    .text-left-not-xs, .text-center-not-xs, .text-right-not-xs, .text-justify-not-xs {
        text-align: inherit;
    }
    .text-left-xs {
        text-align: left;
    }
    .text-center-xs {
        text-align: center;
    }
    .text-right-xs {
        text-align: right;
    }
    .text-justify-xs {
        text-align: justify;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .text-left-not-sm, .text-center-not-sm, .text-right-not-sm, .text-justify-not-sm {
        text-align: inherit;
    }
    .text-left-sm {
        text-align: left;
    }
    .text-center-sm {
        text-align: center;
    }
    .text-right-sm {
        text-align: right;
    }
    .text-justify-sm {
        text-align: justify;
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .text-left-not-md, .text-center-not-md, .text-right-not-md, .text-justify-not-md {
        text-align: inherit;
    }
    .text-left-md {
        text-align: left;
    }
    .text-center-md {
        text-align: center;
    }
    .text-right-md {
        text-align: right;
    }
    .text-justify-md {
        text-align: justify;
    }
}
@media (min-width: 1200px) {
    .text-left-not-lg, .text-center-not-lg, .text-right-not-lg, .text-justify-not-lg {
        text-align: inherit;
    }
    .text-left-lg {
        text-align: left;
    }
    .text-center-lg {
        text-align: center;
    }
    .text-right-lg {
        text-align: right;
    }
    .text-justify-lg {
        text-align: justify;
    }
}

/* Lesson navigation and media actions share the same text-link treatment. */
#change-chapter .btn,
main .simulation-toolbar .btn,
main .figure-caption a {
    --hover-background: transparent;
    background: transparent !important;
    color: var(--ink);
    border: 0;
    box-shadow: none;
    font-size: 0.8rem;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#change-chapter .btn:hover,
main .simulation-toolbar .btn:hover,
main .figure-caption a:hover {
    color: var(--link-hover) !important;
    text-decoration: underline;
}

/* Let successive paragraphs wrap alongside the cards until the section ends. */
.illustrated-section::after {
    content: "";
    display: block;
    clear: both;
}

.figure.atomic-model {
    float: right;
    clear: right;
    width: 30%;
    height: auto;
    margin: 0 0 .75rem 1.25rem !important;
}

.atomic-model img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 575px) {
    .figure.atomic-model {
        display: block;
        float: none;
        width: min(100%, 13rem);
        margin: 0 auto 1rem !important;
    }
}
