/* Parish Protect responsive theme with light/dark toggle */
:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-strong: #f1f3f9;
    --header-surface: color-mix(in srgb, var(--surface-strong) 86%, transparent);
    --border: #d6d8e0;
    --text: #1c2437;
    --muted: #4a5568;
    --accent: #c1121f;
    --accent-strong: #a30f1b;
    --accent-soft: #fdf2f2;
    --focus: #f3a712;
    --shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c111d;
    --surface: #141a29;
    --surface-strong: #1c2437;
    --header-surface: color-mix(in srgb, var(--surface) 86%, transparent);
    --border: #2a3246;
    --text: #e8edf5;
    --muted: #c6cfe0;
    --accent: #e24539;
    --accent-strong: #ff6b5f;
    --accent-soft: rgba(226, 69, 57, 0.12);
    --focus: #f3a712;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: inherit;
    background: radial-gradient(circle at 8% 10%, rgba(193, 18, 31, 0.05), transparent 30%),
        radial-gradient(circle at 92% 16%, rgba(243, 167, 18, 0.06), transparent 30%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 35%, var(--bg)), var(--header-surface));
    border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    padding: clamp(0.9rem, 1vw + 0.65rem, 1.25rem) clamp(1.1rem, 1vw + 0.9rem, 1.75rem);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
    transform: translateZ(0);
    transition: padding 0.28s ease, background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, transform 0.3s ease;
}

.site-header.shrink {
    padding: 0.7rem 1.1rem;
}

.site-header.is-collapsed {
    padding: 0.4rem 1rem;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    border-bottom-color: transparent;
    transform: translateY(-2px);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-title {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    transition: font-size 0.25s ease, padding 0.25s ease;
}

.site-header.shrink .site-title {
    font-size: 0.95rem;
    padding: 0.2rem 0.45rem;
}

.title-underline {
    display: inline-block;
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
}

.primary-nav {
    margin-left: 1rem;
    flex: 1 1 auto;
    min-width: 280px;
    max-height: 300px;
    transition: opacity 0.22s ease, max-height 0.28s ease, margin 0.22s ease;
}

.site-header nav ul,
.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.nav-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    transition: font-size 0.22s ease, padding 0.22s ease;
}

.site-header.shrink .nav-list a {
    font-size: 0.95rem;
    padding: 0.3rem 0.65rem;
}

.nav-list a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-height: 300px;
    transition: opacity 0.22s ease, max-height 0.28s ease, margin 0.22s ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header.shrink .theme-toggle {
    font-size: 0.93rem;
    padding: 0.35rem 0.8rem;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.toggle-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: 0.9rem;
    transition: transform 0.2s ease, font-size 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.site-header.shrink .toggle-icon {
    width: 22px;
    height: 22px;
    font-size: 0.82rem;
    transform: translateY(-1px);
}

.layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem 3rem;
}

.layout > * + * {
    margin-top: 1.6rem;
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 0.35rem;
}

h2 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

h3 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

p {
    margin: 0 0 0.85rem;
    line-height: 1.6;
    color: var(--text);
}

form {
    display: grid;
    gap: 1rem;
}

label {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--text);
}

input,
textarea,
select,
button,
.button,
.theme-toggle {
    font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    accent-color: var(--accent);
}

label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
}

.choice-list {
    display: grid;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.section-text {
    margin: 0.35rem 0 0.75rem;
    color: var(--text);
}

.highlight {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
    border-radius: 12px;
    font-weight: 700;
}

.callout {
    margin: 0 0 1.1rem;
    padding: 1rem 1.15rem;
    background: var(--surface-strong);
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

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

.card-grid {
    display: grid;
    gap: 1.25rem;
}

.card-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--surface);
    padding: 1.1rem 1.15rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.simple-list {
    margin: 0.25rem 0 0.25rem 1.2rem;
    padding: 0;
    line-height: 1.5;
}

.simple-list li + li {
    margin-top: 0.35rem;
}

.columns.two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.note,
.template-box {
    background: var(--surface-strong);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.list-tight {
    margin: 0.4rem 0 0.4rem 1.1rem;
    padding: 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.tag-item {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
}

.footer-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem 2rem;
    background: var(--surface-strong);
    color: var(--muted);
}

.footer-text {
    color: var(--muted);
.footer-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem 2rem;
    background: var(--surface-strong);
    color: var(--muted);
}

.footer-text {
    color: var(--muted);
    width: 100%;
    flex: 1 0 100%;
}

@media (min-width: 640px) {
    .footer-layout {
        display: grid;
        grid-template-columns: repeat(2, minmax(140px, auto));
        justify-content: center;
        align-items: center;
        gap: 0.75rem 1.25rem;
        text-align: center;
    }

    .footer-layout a {
        justify-self: center;
    }

    .footer-text {
        grid-column: 1 / -1;
    }
}

}

a {
    color: var(--accent);
    font-weight: 700;
}

a:hover,
a:focus-visible {
    color: var(--accent-strong);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.button:hover,
.button:focus-visible {
    background: var(--accent-strong);
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.crypto-address {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: var(--surface-strong);
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.site-header.is-collapsed .primary-nav,
.site-header.is-collapsed .header-actions {
    opacity: 0;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

.site-header.is-collapsed .header-inner {
    gap: 0.4rem;
}

.site-header.is-collapsed .site-title {
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .primary-nav {
        width: 100%;
        margin-left: 0;
    }

    .nav-list {
        justify-content: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
