:root {
    /* Furman University Spatial Analysis Lab palette */
    --accent-dark: #201547;   /* Furman dark purple */
    --accent: #582c83;        /* Furman purple */
    --accent-hover: #46236a;
    --accent-light: rgba(88, 44, 131, 0.07);
    --accent-light-strong: rgba(88, 44, 131, 0.14);
    --gray: #a7a8aa;          /* Furman secondary gray */

    --bg-color: #f4f2f8;
    --panel-bg: #ffffff;
    --panel-border: #e4e0ec;
    --text-main: #241b35;
    --text-heading: #201547;
    --text-muted: #5b5568;
    --font-stack: 'Lato', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background: linear-gradient(180deg, #f6f4fa 0%, #ffffff 45%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-attachment: fixed;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 40px);
    padding: 0 20px 20px;
}

/* BRAND STRIP (top identification bar, echoes gis.furman.edu/sal) */
.brand-strip {
    width: 100%;
    background: var(--accent-dark);
    color: #ffffff;
}

.brand-strip-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 13px;
    letter-spacing: 0.3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
}

.brand-strip a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-strip a:hover {
    opacity: 1;
    text-decoration: underline;
}

.brand-strip .brand-tag {
    color: var(--gray);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 600;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(32, 21, 71, 0.06);
}

/* HEADER AREA */
.header-panel {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-top: 4px solid var(--accent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.title-area h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-section {
    flex: 1;
    max-width: 600px;
}

.info-section p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* TABS */
.tab-buttons {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-heading);
    background: var(--accent-light);
}

.tab-btn.active {
    color: var(--accent-dark);
    background: var(--accent-light-strong);
    box-shadow: inset 0 0 0 1px rgba(88, 44, 131, 0.3);
}

/* MAIN CONTENT */
.content-area {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.tab-content.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MAP WRAPPER */
.map-wrapper {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}


/* THEORY / EDU-RESOURCES SECTIONS */
.theory-wrapper {
    flex: 1;
    width: 100%;
    padding: 32px;
    overflow-y: auto;
}

.theory-wrapper h2 {
    font-size: 24px;
    margin-bottom: 6px;
    color: var(--text-heading);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--panel-border);
}

.theory-intro {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 16px 0 24px;
    max-width: 900px;
}

.section-kicker {
    grid-column: 1 / -1;
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.section-kicker h2 {
    font-size: 19px;
    color: var(--accent-dark);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.section-kicker .kicker-line {
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.theory-card {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(32, 21, 71, 0.1);
    border-color: rgba(88, 44, 131, 0.3);
}

.theory-card.full-width {
    grid-column: 1 / -1;
}

.theory-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theory-card h4 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 16px;
}

.theory-card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 16px;
}

.theory-card ul, .theory-card ol {
    list-style-position: outside;
    margin-left: 20px;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 15px;
}

.theory-card li {
    margin-bottom: 8px;
}

.theory-card li strong {
    color: var(--text-heading);
}

.theory-card a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.theory-card a:hover {
    text-decoration: underline;
}

/* sub-panels inside cards (satellite specs, etc.) */
.subpanel {
    background: var(--accent-light);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(88, 44, 131, 0.12);
    flex: 1;
    min-width: 300px;
}

.subpanel h4 {
    color: var(--accent);
    margin-bottom: 16px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subpanel ul {
    list-style-type: none;
    padding: 0;
    margin-left: 0;
}

.subpanel li strong {
    color: var(--text-heading);
}

.subpanel .subpanel-footer {
    margin-top: 16px;
    font-size: 14px;
    border-top: 1px solid rgba(88, 44, 131, 0.15);
    padding-top: 12px;
    color: var(--text-muted);
}

.subpanel-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* FORMULA / EQUATION CALLOUTS */
.formula-box {
    background: var(--accent-dark);
    color: #f4f2f8;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 14px 0;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    overflow-x: auto;
    line-height: 1.8;
}

.formula-box .formula-label {
    display: block;
    font-family: var(--font-stack);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 6px;
}

/* CALLOUT / NOTE BOX */
.callout {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 14.5px;
    color: var(--text-main);
    line-height: 1.6;
}

.callout strong {
    color: var(--accent-dark);
}

/* STEP LIST (numbered process) */
.step-list {
    counter-reset: step;
    list-style: none !important;
    margin-left: 0 !important;
}

.step-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 14px !important;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LITERATURE / CITATION CARDS */
.lit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.lit-card {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 16px 18px;
}

.lit-card .lit-region {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent);
    background: var(--accent-light-strong);
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.lit-card h4 {
    font-size: 15.5px;
    color: var(--text-heading);
    margin-bottom: 4px;
    line-height: 1.4;
}

.lit-card .lit-source {
    font-size: 12.5px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 8px;
    display: block;
}

.lit-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 8px;
}

.lit-card a {
    font-size: 13.5px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.lit-card a:hover {
    text-decoration: underline;
}

/* GLOSSARY */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.glossary-term {
    background: var(--accent-light);
    border-radius: 8px;
    padding: 14px 16px;
}

.glossary-term dt {
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 14.5px;
    margin-bottom: 4px;
}

.glossary-term dd {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* RESOURCE LINK LIST */
.resource-list {
    list-style: none !important;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--accent-light);
    border-radius: 8px;
    padding: 12px 14px;
}

.resource-list .resource-icon {
    font-size: 18px;
    line-height: 1.4;
}

.resource-list a {
    font-weight: 700;
}

.resource-list span.resource-desc {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* BIBLIOGRAPHY */
.bib-list {
    list-style: none !important;
    margin-left: 0 !important;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.bib-list li {
    padding-left: 28px;
    text-indent: -28px;
    margin-bottom: 10px !important;
}

.bib-list a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.bib-list a:hover {
    text-decoration: underline;
}

/* DISCUSSION QUESTIONS */
.discussion-list {
    list-style: none !important;
    margin-left: 0 !important;
}

.discussion-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px !important;
}

.discussion-list li::before {
    content: "❯";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ILLUSTRATIONS */
.illustration-container {
    width: 100%;
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.theory-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.img-caption {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    margin-top: -8px;
    margin-bottom: 16px;
}

/* RESPONSIVENESS */
@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .brand-strip {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}
