:root {
    --bg: white;
    --text: black;
    --text-secondary: #777;
    --text-muted: #555;
    --surface: #EEE;
    --surface-alt: #f4f4f4;
    --border: #aaa;
    --link: #0070f3;
    --nav-active: coral;
    --heading-color: #000;
    --shadow: rgba(0, 0, 0, 0.1);
}

:root.dark {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --text-secondary: #999;
    --text-muted: #aaa;
    --surface: #2a2a2a;
    --surface-alt: #2a2a2a;
    --border: #444;
    --link: #4db8ff;
    --nav-active: coral;
    --heading-color: #FFF;
    --shadow: rgba(0, 0, 0, 0.3);
}

html {
    scrollbar-gutter: stable;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.55em;
    font-size: 1.15em;
    margin: 0;
    min-height: 100%;
    background-color: var(--bg);
    color: var(--text);
}

h1, h2, h3 {
    font-weight: 550;
}

h1 {
    font-size: 1.6em;
}

h2 {
    font-size: 1.4em;
    margin-top: 1.4em;
}

h3 {
    font-size: 1em;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px;
}

header {
    margin-bottom: 50px;
    border-bottom: 1px solid var(--border);
    padding: 20px;
    background-color: var(--surface);
    text-align: center;

    #site-title {
        a {
            text-decoration: none;
            color: var(--heading-color);
            font-weight: bold;
            font-size: 1.7em;
        }
        margin: 0 0 5px 0;
    }

    #site-nav {
        margin: 15px 0 0 0;
        padding: 0 0 2px 0;
        line-height: 1em;

        ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        li {
            display: inline-block;
        }

        a {
            font-size: 1.1em;
            margin-right: 20px;
            text-decoration: none;
        }

        @media (max-width: 600px) {
            a {
                font-size: 0.9em;
                margin-right: 10px;
            }
        }

        a:hover {
            color: #9bd6f8;
        }
        a.active {
            color: var(--nav-active);
        }

        li::after {
            display: block;
            content: attr(title);
            font-weight: bold;
            height: 1px;
            color: transparent;
            overflow: hidden;
            visibility: hidden;
        }
    }
}

footer {
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--border);
    background-color: var(--surface);
    padding: 25px;

    p {
        margin: 0 0 20px 0;
    }

    svg {
        padding: 0 5px;
    }
}

.social-links a:hover {
    text-decoration: none;
}

.theme-toggle {
    display: inline-grid;
    place-items: center;
    background: none;
    border: none;
    padding: 4px;
    color: var(--text-muted);
    cursor: pointer;
}

.theme-toggle:hover {
    color: coral;
}

.theme-toggle svg {
    padding: 0;
}

.tpusa-hero {
    display: block;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 40px;
}

.tpusa-photo {
    float: right;
    width: 250px;
    height: auto;
    margin: 0 0 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow);
}

@media (max-width: 600px) {
    .tpusa-photo {
        width: 120px;
        margin: 0 0 8px 12px;
    }
}

.cta-button {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: #cc4a1a;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.cta-button:visited {
    color: white;
}

.cta-button:hover {
    color: white;
    text-decoration: underline;
}

.scripture {
    margin: 50px 0 28px 0;
    padding: 14px 18px;
    background: var(--surface-alt);
    border-left: 3px solid #cc4a1a;
    border-radius: 6px;
}

.scripture-text {
    margin: 0 0 6px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.2em;
    line-height: 1.5;
}

.scripture-ref {
    margin: 0;
    font-size: 0.8em;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.event {
    padding: 14px 18px;
    margin-bottom: 12px;
    background: var(--surface-alt);
    border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
    border-radius: 6px;
}

.event-date {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.event a {
    font-size: 1.1em;
}

.empty-note {
    padding: 14px 18px;
    background: var(--surface-alt);
    border-radius: 6px;
    color: var(--text-muted);
}

.event-location {
    font-size: 0.9em;
    color: var(--text-muted);
}

.event-details {
    font-size: 0.9em;
    margin: 8px 0 0 0;
    padding-left: 1.2em;
    overflow-wrap: anywhere;
}
