/* Global Reset & Base Styles */
body {
    background-color: #333333;
    font-family: Georgia, times, serif;
    font-size: 14pt;
    color: #ACB47D;
    margin: 0;
    padding: 0;
    /* Center the content on large screens while maintaining left alignment feel */
    display: flex;
    justify-content: flex-start; 
    padding-left: 100px; /* Original design margin */
}

/* Container to manage width and responsiveness */
.main-container {
    width: 100%;
    max-width: 800px; /* Prevents lines from getting too long on huge screens */
    box-sizing: border-box;
}

/* Typography */
h2 {
    font-family: Geneva, Arial, Helvetica, sans-serif;
    margin-top: 20px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 10pt;
    color: #C58A69;
    letter-spacing: 0.1em;
    display: block; /* Forces break in modern HTML instead of <br> inside span */
    margin-top: 5px;
}

p {
    margin-bottom: 0; /* Reset default margin to control spacing manually as per original design */
}

/* Indented Text Blocks */
p.indent {
    margin-left: 50px;
    margin-top: 50px;
    letter-spacing: 0.1em;
    line-height: 18pt;
}

/* Images */
p.image-block {
    margin: 0;
    padding: 0;
}

img {
    padding: 10px;
    border: 1px solid #656565;
    margin-top: 50px;
    margin-bottom: 0;
    background-color: #444444;
    /* Responsive Image Logic */
    max-width: 100%;
    height: auto;
    width: auto; /* Overrides old fixed width/height attributes in HTML */
    box-sizing: border-box;
}

/* Navigation Links */
.top-nav {
    text-align: right;
    margin-right: 10%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.link1 {
    font: normal 8pt Arial, Helvetica, sans-serif;
    text-decoration: none;
    letter-spacing: 0.1em;
    color: #777777;
}

a.link1:visited {
    color: #777777;
}

a.link1:hover {
    color: #9E669F;
    text-decoration: underline;
}

a.link1:active {
    color: #FFFFFF;
}

/* Spacers */
p.spacer {
    height: 20px; /* Fallback for &nbsp; block */
    line-height: 0;
    font-size: 0;
}

/* Anchor Script Container */
.anchor-container {
    width: 680px;
    text-align: left;
    margin-top: 20px;
    max-width: 100%; /* Ensure it doesn't overflow on small screens */
}

/* Attribution Style */
.attrib {
    font-family: 'Times New Roman', serif;
    font-size: 12pt;
    color: #FFC26C;
    font-style: italic;
    margin: 5% 7% 5% 0%;
    padding: 3%;
    border: 1px solid #666;
}

/* Bottom Navigation (Preserved & Enhanced) */
.bottom-nav {
    width: 90%;
    max-width: 920px;
    margin: 5px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 55px;
    padding: 12px 0;
    text-align: center;
}

.bottom-nav .content {
    margin: 0;
    padding: 0;
    border: 1px solid #5783C4;
    background: rgba(20, 8, 6, 0.95);
}

.bottom-nav a {
    white-space: nowrap;
}

.bottom-nav .link1 {
    font: normal 10pt Arial, Helvetica, sans-serif !important;
    color: #E6DFB8;
}

.bottom-nav a:hover {
    color: #FBDA45;
    text-decoration: underline;
}

/* ---------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   Adapts the 23-year-old fixed layout to mobile/tablet
   --------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding-left: 20px; /* Reduce heavy left margin on tablets */
    }

    p.indent {
        margin-left: 20px; /* Reduce indent on smaller screens */
        margin-top: 30px;
        line-height: 1.4; /* Slightly tighter line height for readability on mobile */
    }

    .top-nav {
        margin-right: 20px; /* Reduce right margin */
        text-align: right;
    }

    img {
        margin-top: 30px;
    }
}

@media (max-width: 640px) {
    body {
        padding-left: 15px; /* Minimal padding for phones */
        padding-right: 15px;
    }

    p.indent {
        margin-left: 0; /* Remove indent on very small screens to maximize width */
        margin-top: 25px;
        font-size: 12pt; /* Slightly smaller text for mobile fit */
    }

    .bottom-nav {
        gap: 16px 28px;
        padding: 18px 0;
    }
    
    .bottom-nav .link1 {
        font-size: 8pt;
    }

    .anchor-container {
        width: 100%; /* Allow script container to fill mobile width */
    }
    
    h2 {
        font-size: 1.2em; /* Scale down header if needed */
    }
}