:root {
    --accent-color: #006747;
    --bg-color: #ffffff;
    --text-color: #333333;
    --sidebar-bg: #f8f9fa;
    --nav-bg: #2c3e50;
    --focus-outline: #4a90e2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Improved focus styles for accessibility */
*:focus {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --accent-color: #c02b00;
        --text-color: #000000;
        --bg-color: #ffffff;
    }
}

/* Dark mode disabled - light mode only */

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    position: relative;
}

.site-logo {
    flex-shrink: 0;
    max-width: 100%;
}

.site-logo img {
    height: 60px;
    width: auto;
    max-width: 100%;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 0.5rem;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.search-nav-item {
    display: flex;
    align-items: center;
}

.search-nav-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 50%;
    background: var(--sidebar-bg);
}

.search-nav-item a:hover {
    background: var(--accent-color);
    color: white;
}

/* Skip to main content link for keyboard users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.main-content {
    grid-column: 1;
    padding: 2rem;
    overflow-x: hidden;
    width: 100%;
}

.sidebar {
    grid-column: 2;
    background: var(--sidebar-bg);
    padding: 1.5rem;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    height: fit-content;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
}

.header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 2rem;
}

.header img {
    max-width: 400px;
    height: auto;
}

.logos {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.logos img {
    height: 60px;
    width: auto;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

h1, h2 {
    font-family: 'Lora', serif;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

h2 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar h2 {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.course-diagram {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 2rem auto;
    display: block;
}

.course-diagram svg {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .course-diagram {
        margin: 1.5rem auto;
    }
}

/* Lists */
.main-content ul,
.main-content ol {
    margin-left: 2.5rem;
    margin-bottom: 1.5rem;
}

.main-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-size: 1.1rem;
}

.main-content li > ul,
.main-content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Tables - Core styles */
.table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0 2.5rem 0;
    padding-bottom: 1.0rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

thead {
    border-top: 2px solid #ddd;
}

th, td {
    padding: 0.75rem;
    text-align: left;
}

td {
    border-bottom: 1px solid #eee;
}

/* Last row gets thicker border */
tr:last-child td {
    border-bottom: 2px solid #ddd;
}

th {
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

/* Table variations */
.table-minimal {
    border: none;
}

.table-minimal th {
    background: none;
}

.table-minimal tr:hover {
    background: none;
}

.table-schedule {
    min-width: 800px; /* Minimum width to prevent squishing */
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    table {
        font-size: 0.9rem;
    }
}

/* Footnotes and Legend */
.footnote, 
.footnotes,
.legend {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
    margin-bottom: 0rem;
}

.legend strong,
.footnotes strong {
    font-weight: 600;
}

.legend code,
.footnotes code {
    background: none;
    padding: 0;
    font-family: inherit;
    font-weight: 600;
}

/* Footer */
.footer {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 4rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}

.footer nav {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.footer p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.footer a {
    color: #666;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.footer a:hover {
    color: var(--accent-color);
}

/* Responsive table */
@media (max-width: 600px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.menu-toggle:hover {
    color: var(--accent-color);
}

/* Responsive design improvements */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 1rem;
    }

    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        text-align: center;
    }

    .site-logo {
        width: 100%;
        text-align: center;
    }

    .site-logo img {
        height: 50px;
    }

    .main-nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 0.5rem;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .main-nav li {
        display: inline-block;
        text-align: center;
    }

    .main-nav a {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
        display: block;
        white-space: nowrap;
    }

    .main-content {
        padding: 1rem;
    }

    .sidebar {
        grid-column: 1;
        position: static;
        margin-top: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    .main-content ul,
    .main-content ol {
        margin-left: 1.5rem;
    }

    .main-content li {
        font-size: 1rem;
    }

    .logos {
        flex-wrap: wrap;
    }

    .logos img {
        height: 40px;
    }

    .table-wrapper {
        overflow-x: auto;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    .breadcrumbs {
        font-size: 0.9rem;
        margin: 0.5rem 0;
        padding: 0.5rem 0;
    }

    .breadcrumbs ol {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .site-logo img {
        max-height: 40px;
    }

    .main-content {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .footer nav a {
        padding: 0.35rem 0.5rem;
    }
}

/* Print styles */
@media print {
    .main-nav,
    .sidebar,
    .footer {
        display: none;
    }

    body {
        grid-template-columns: 1fr;
        padding: 0;
    }

    a {
        text-decoration: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive Tables */
.schedule-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    padding-bottom: 0.5rem;
}

.schedule-table table {
    margin: 0;
    min-width: 800px; /* Minimum width to prevent squishing */
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.course-card {
    background: var(--bg-color);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.course-card-content {
    padding: 1.5rem;
}

.course-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.course-semester {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.course-description {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.course-stats span {
    color: var(--text-color);
}

.course-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.course-link:hover {
    background: var(--accent-color);
    opacity: 0.9;
    text-decoration: none;
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
}

/* Header layout */
.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 0.25rem 0;
    margin-top: -3rem;
    font-size: 0.8rem;
    color: #666;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 0.35rem;
    color: #999;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumbs [aria-current="page"] {
    color: #999;
    font-weight: normal;
}

@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.15rem 0;
        margin-top: -0.25rem;
        font-size: 0.75rem;
    }
}

/* 404 Error Page */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    width: 100%;
    padding: 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    line-height: 1;
    opacity: 0.9;
}

.error-page h2 {
    font-size: 2.5rem;
    margin: 0.5rem 0 1.5rem;
    color: var(--text-color);
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.error-actions {
    margin-top: 3rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .error-page {
        padding: 1.5rem;
        min-height: calc(100vh - 150px);
    }
    
    .error-page h1 {
        font-size: 5rem;
    }
    
    .error-page h2 {
        font-size: 1.75rem;
    }
    
    .error-page p {
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-button {
        width: 100%;
        padding: 0.75rem 1rem;
    }
} 
/* ===================================================================
   ISE 307 additions - materials pages
   =================================================================== */

/* Archive note */
.archive-note {
    max-width: 62ch;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: #5c6660;
    line-height: 1.65;
}

.term-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-color);
}

/* Pill-style download links */
.pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
    border: 1.5px solid var(--accent-color);
    border-radius: 999px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.pill:hover {
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
}

.pill.pill-muted {
    border-color: #c9c9c9;
    color: #999;
    cursor: default;
    pointer-events: none;
}

/* Video placeholder badge */
.video-soon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    margin: 0.15rem 0;
    border-radius: 999px;
    background: #f4f4f4;
    color: #8a8a8a;
    font-size: 0.85rem;
    white-space: nowrap;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    margin: 0.15rem 0;
    border-radius: 999px;
    background: #cc0000;
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.video-link:hover {
    background: #a30000;
    color: #fff;
    text-decoration: none;
}

/* Lecture list */
.unit-heading {
    font-family: 'Lora', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #e6e6e6;
}

.lecture-list {
    list-style: none;
    margin: 0 !important;
    padding: 0;
}

.lecture-item {
    display: grid;
    grid-template-columns: 3.2rem 1fr auto;
    gap: 0.35rem 1rem;
    align-items: center;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #eee;
}

.lecture-item:hover {
    background: #fafcfb;
}

.lecture-num {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
}

.lecture-info {
    min-width: 0;
}

.lecture-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
}

.lecture-meta {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

.lecture-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

@media (max-width: 700px) {
    .lecture-item {
        grid-template-columns: 2.4rem 1fr;
    }

    .lecture-links {
        grid-column: 2;
        justify-content: flex-start;
    }
}

/* Materials tables (homework, quizzes, practice) */
.materials-table {
    min-width: 0 !important;
}

.materials-table td:first-child {
    font-weight: 600;
    white-space: nowrap;
}

/* Textbook chapter list */
.chapter-list {
    list-style: none;
    margin: 0 0 1.5rem 0 !important;
    padding: 0;
}

.chapter-item {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #eee;
}

.chapter-num {
    font-family: 'Lora', serif;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 2rem;
    text-align: right;
    flex-shrink: 0;
}

.chapter-title {
    flex: 1 1 auto;
    min-width: 0;
}

.chapter-status {
    flex-shrink: 0;
}

.coming-soon {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #f4f4f4;
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .chapter-item {
        flex-wrap: wrap;
    }

    .chapter-status {
        margin-left: 2.9rem;
    }
}

/* Home section index */
.section-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    column-gap: 3.5rem;
    row-gap: 0;
    margin: 1.5rem 0 2.5rem;
}

.index-item {
    display: block;
    padding: 1.15rem 0 1.3rem;
    border-top: 1px solid #e9e9e9;
    text-decoration: none;
    color: inherit;
    font-weight: 400;
}

.index-item:hover {
    text-decoration: none;
}

.index-title {
    display: block;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.15s;
}

.index-title::after {
    content: "\2192";
    display: inline-block;
    margin-left: 0.4em;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s, transform 0.15s;
    color: var(--accent-color);
}

.index-item:hover .index-title {
    color: var(--accent-color);
}

.index-item:hover .index-title::after {
    opacity: 1;
    transform: translateX(0);
}

.index-desc {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.95rem;
    color: #6e6e6e;
    line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    .index-title::after {
        transition: none;
    }
}

/* Primary call-to-action button */
.cta-button {
    display: inline-block;
    margin: 0.5rem 0 1rem;
    padding: 1rem 2.25rem;
    background: var(--accent-color);
    color: #fff;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.cta-button:hover {
    background: #00543a;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.cta-button .cta-arrow {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.15s;
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

@media (max-width: 600px) {
    .cta-button {
        display: block;
        text-align: center;
        padding: 1rem 1.25rem;
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-button,
    .cta-button .cta-arrow {
        transition: none;
    }
}
