@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600&display=swap");
:root {
--accent-color: #562c2c;
--top-brd: #d0d0d0;
--header-color: #16404d;
--muted-background-color: #f5f5f5;
--link-color: #0a58ca;

/* Additional colors — original appearance preserved */
--text-color: #222222;
--page-background-color: #9fb2a0;
--white-color: #ffffff;
--header-globe-color: #30505c;
--nav-background-color: #131313;
--nav-border-color: #555555;
--black-color: #000000;
--nav-active-color: #2f2f2f;
--content-background-color: #fafafa;
--accent-hover-color: #990000;
--quick-link-active-border-color: #666666;
--footer-background-color: #f1edee;
--shadow-color: rgba(0, 0, 0, 0.25);
--title-shadow-color: rgba(0, 0, 0, 0.3);
--subtitle-color: rgba(255, 255, 255, 0.9);
}

/* Base page styles */
body {
padding-top: 2rem;
padding-bottom: 2rem;
color: var(--text-color);
background-color: var(--page-background-color);
font-family: "Source Sans 3", Helvetica, Arial, sans-serif;
font-size: 1.1rem;
font-weight: 400;
font-synthesis: weight style;
line-height: 1.7;
text-align: left;
-webkit-font-smoothing: antialiased;
isolation: isolate;
}

body::before {
content: "";
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;
background-image: url("gm-media/contour-lines.svg");
background-repeat: repeat;
background-size: 480px auto;
opacity: 0.33;
}

img {
height: auto;
}

.site-wrapper {
box-shadow: 0 0 30px var(--shadow-color);
}

/* Typography */
main p,
main li {
margin-bottom: 1rem;
}

h1,
h2,
h3,
h4 {
font-weight: 600;
}

h1 {
font-size: 2.5rem;
line-height: 1.2;
margin-bottom: 1rem;
}

h2 {
font-size: 1.75rem;
line-height: 1.25;
margin-bottom: .75rem;
}

h3 {
font-size: 1.75rem;
line-height: 1.3;
}

h4 {
margin-top: 3rem;
font-size: 1.5rem;
line-height: 1.4;
}

main ul,
main ol {
margin-bottom: 1rem;
}

main ul li,
main ol li {
margin-bottom: 0.5rem;
}

main ul li:last-child,
main ol li:last-child {
margin-bottom: 0;
}

main li > ul,
main li > ol {
margin-top: 0.75rem;
margin-bottom: 0;
}

/* Site header */
header.container {
padding: 3rem !important;
position: relative;
overflow: hidden;
color: var(--white-color);
background-color: var(--header-color);
}

header::after {
content: "";
position: absolute;
top: 0;
right: 0;
width: 75%;
aspect-ratio: 1;
background-color: var(--header-globe-color);
-webkit-mask: url("gm-media/globe.svg") center / contain no-repeat;
mask: url("gm-media/globe.svg") center / contain no-repeat;
transform: translate(8%, -24.5%);
pointer-events: none;
}

header > * {
position: relative;
z-index: 1;
}

.site-title {
margin: 0 0 0.25rem;
color: var(--white-color);
font-size: 2.75rem;
font-weight: 600;
line-height: 1.1;
letter-spacing: 0.01em;
text-shadow: 0 2px 4px var(--title-shadow-color);
}

.site-subtitle {
margin: 0;
color: var(--subtitle-color);
font-size: 1.15rem;
font-weight: 500;
line-height: 1.4;
letter-spacing: 0.04em;
text-shadow: 0 1px 3px var(--shadow-color);
}

/* Main navigation */
.site-nav {
padding: 0;
background-color: var(--nav-background-color);
}

.site-nav .navbar-nav {
width: 100%;
}

.site-nav .nav-item + .nav-item {
border-left: 1px solid var(--nav-border-color);
}

.site-nav .nav-link {
display: block;
padding: 1rem 1.5rem;
color: var(--white-color);
font-size: 1.1rem;
font-weight: 600;
letter-spacing: 0.175em;
text-align: center;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
background-color: var(--black-color);
color: var(--page-background-color);
}

.site-nav .nav-link.active,
.site-nav .nav-link.active:hover,
.site-nav .nav-link.active:focus {
color: var(--white-color);
background-color: var(--nav-active-color);
}

.site-nav .navbar-toggler {
margin: 0.75rem 1rem;
}

@media (min-width: 992px) {
.site-nav .nav-item {
flex: 1 1 0;
}
}

@media (max-width: 991.98px) {
.site-nav .nav-item + .nav-item {
border-top: 1px solid var(--nav-border-color);
border-left: 0;
}

.site-nav .nav-link {
padding: 0.9rem 1rem;
}
}

/* Main content */
main.container {
padding: 3rem !important;
background-color: var(--content-background-color);
}

/* Main links */
main a {
color: var(--link-color);
}

main a:hover,
main a:focus {
color: var(--link-color);
}

/* Utility classes */

main .intro {
font-size: 1.2rem;
}

.top-brd {
margin-top: 3rem;
margin-bottom: 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--top-brd);
}

.top-brd-thick {
margin-top: 3rem;
margin-bottom: 1.5rem;
padding-top: 2rem;
border-top: 4px solid var(--top-brd);
}

.date {
color: var(--accent-color);
font-family: "Courier New", Courier, monospace;
}

.entry-title {
font-size: 1.2rem;
}

main a[href="#top"] {
display: inline-block;
margin-top: 1rem;
padding: 0.4rem 0.8rem;
color: var(--white-color);
background-color: var(--accent-color);
border-radius: 0.25rem;
text-decoration: none;
}

main a[href="#top"]:hover,
main a[href="#top"]:focus {
color: var(--white-color);
background-color: var(--accent-hover-color);
}

.accent-text {
margin: 0;
color: var(--accent-color);
font-size: 1.1rem;
font-weight: 600;
}

.quick-links {
margin: 0.75rem 0 2rem;
}

.quick-links ul {
display: flex;
align-items: stretch;
flex-wrap: wrap;
gap: 0.5rem;
margin: 0;
padding: 0;
list-style: none;
}

.quick-links li {
display: flex;
margin: 0;
padding: 0;
}

.quick-links a {
display: flex;
align-items: center;
height: 3.25rem;
padding: 0.4rem 0.75rem;
border: 1px solid var(--link-color);
border-radius: 0.25rem;
text-decoration: none;
white-space: nowrap;
}

.quick-links a:hover,
.quick-links a:focus {
color: var(--white-color);
background-color: var(--link-color);
}

.quick-links a.active {
color: var(--text-color);
background-color: var(--muted-background-color);
border-color: var(--quick-link-active-border-color);
}

/* Blockquotes */
main blockquote {
margin: 2rem 0;
padding: 1.5rem 2rem;
border-left: 4px solid var(--accent-color);
background-color: var(--muted-background-color);
}

main blockquote p:last-child {
margin-bottom: 0;
}

/* Publications */
.publication {
max-width: 90%;
margin-bottom: 2.5rem;
}

.publication h2 {
margin-top: 3rem;
margin-bottom: 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--top-brd);
font-size: 1.5rem;
line-height: 1.45;
}

.publication h3 {
margin-top: 3rem;
margin-bottom: 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--top-brd);
font-size: 1.5rem;
line-height: 1.45;
}

.publication h4 {
margin-top: 3rem;
margin-bottom: 1rem;
}

.publication h4::before {
content: "";
display: block;
width: 10%;
margin-bottom: 1.5rem;
border-top: 4px dotted var(--top-brd);
}

main .publication-meta {
margin-bottom: 1.25rem;
font-size: 1.1rem;
line-height: 1.5;
}

.publication-summary {
margin: 1rem 0;
padding: 1.25rem 1.5rem;
border-left: 4px solid var(--top-brd);
background-color: var(--muted-background-color);
font-size: 0.98rem;
}

.publication-summary p {
margin-bottom: 0.5rem;
line-height: 1.75;
}

.publication-summary ul,
.publication-summary ol {
margin-bottom: 0.5rem;
}

.publication-summary li {
margin-bottom: 0.25rem;
line-height: 1.75;
}

.publication-summary li:last-child,
.publication-summary p:last-child {
margin-bottom: 0;
}

.book-meta li {
margin-bottom: 0.25rem;
}

/* Chapter components */
.chapter-title {
margin-top: 3rem;
margin-bottom: 1.5rem;
padding-top: 2rem;
}

.chapter-number,
.chapter-name {
display: block;
}

.chapter-number {
margin-bottom: 0.25rem;
font-size: 0.75em;
letter-spacing: 0.04em;
font-weight: 400;
}

/* Anchor target spacing */
main h2[id],
main h3[id] {
scroll-margin-top: 1rem;
}

/* Chapter navigation */
main .chapter-nav {
margin-bottom: 0;
}

main .chapter-nav li {
margin-bottom: 0.35rem;
line-height: 1.5;
}

main .chapter-nav li:last-child {
margin-bottom: 0;
}

.chapter h4 {
margin-top: 3rem;
padding-top: 0;
border-top: 0;
}

.chapter h4::before {
content: "";
display: block;
width: 10%;
border-top: 4px dotted var(--top-brd);
margin-bottom: 1.5rem;
}

/* Book components */
.book-cover {
width: 100%;
max-width: 300px;
height: auto;
}

.book-title {
margin-bottom: 1rem;
font-size: 2rem;
font-weight: 600;
line-height: 1.2;
color: var(--header-color);
}

.book-subtitle {
margin-bottom: 1.5rem;
font-size: 1.5rem;
font-weight: 500;
line-height: 1.3;
}

.book-details p {
margin-bottom: 0.35rem;
line-height: 1.5;
}

.book-details p:last-child {
margin-bottom: 0;
}

.book-index-link {
width: fit-content;
margin-top: 1rem;
margin-bottom: 0;
padding: 0.75rem 1rem;
border: 1px solid var(--top-brd);
border-radius: 0.25rem;
font-size: 1.2rem;
}

.book-index-link a {
font-weight: 600;
text-decoration: underline;
}

.book-index-link a:hover,
.book-index-link a:focus {
text-decoration: underline;
}

main .book-section {
margin-top: 3rem;
margin-bottom: 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--top-brd);
}

main .book-section + .book-section {
margin-top: 1.5rem;
}

/* Figures and text boxes */
main figure img,
main figure > .text-box-content {
border: 1px solid var(--accent-color);
background-color: white;
}

main figure img {
display: block;
width: 80%;
max-width: 1200px;
height: auto;
}

main figure > .text-box-content {
padding: 1rem;
}

main figure > .text-box-content > :last-child {
margin-bottom: 0;
}

main .figure-caption {
font-size: .95rem;
}

.spanish main .chapter-figure {
width: 60%;
max-width: 100%;
height: auto;
}

@media (max-width: 767px) {
main figure img,
.spanish main .chapter-figure {
width: 100%;
}
}

/* Chapter tables */
.chapter .table-box {
padding: 0;
border: 0;
background: transparent;
}

.chapter .table-responsive {
max-width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

.chapter .table-wide {
min-width: 56rem;
}

/* Site footer */
footer {
color: var(--text-color);
background-color: var(--footer-background-color);
border-bottom: 12px solid var(--top-brd);
}

footer a {
color: var(--link-color);
}

.site-footer {
padding: 1rem 2rem;
}

.footer-image {
display: block;
width: 180px;
max-width: 100%;
height: auto;
}

.footer-contact {
font-size: 1.1rem;
}

.footer-contact p:last-child {
margin-bottom: 0;
}
