:root {
    --blue: #0d4fa1;
    --blue-dark: #093a76;
    --blue-soft: #eaf2ff;
    --text: #122033;
    --muted: #5e6a7d;
    --line: #dce5f2;
    --white: #fff;
    --accent: #f28b1d;
    --shadow: 0 18px 50px rgba(13, 79, 161, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #f7faff;
    line-height: 1.58;
}

main {
    width: min(100%, 1240px);
    margin: 0 auto;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 10px clamp(16px, 4vw, 32px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: var(--blue);
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--blue);
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.menu-icon {
    display: grid;
    gap: 3px;
}

.menu-icon span {
    width: 16px;
    height: 2px;
    display: block;
    background: var(--blue);
}

.nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav a,
.nav-button {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 7px;
    white-space: nowrap;
}

.nav-button {
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.nav a:hover,
.nav a:focus,
.nav-button:hover,
.nav-button:focus {
    background: var(--blue-soft);
    color: var(--blue);
    outline: none;
}

.hero {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(22px, 5vw, 58px);
    padding: clamp(30px, 6vw, 64px) clamp(18px, 6vw, 72px) clamp(28px, 5vw, 52px);
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    border-radius: 0 0 18px 18px;
}

.hero h1 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(2.25rem, 7vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.lead {
    max-width: 650px;
    margin: 18px 0 0;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    color: var(--muted);
}

.hero-actions,
.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 26px;
}

.button {
    border: 1px solid var(--blue);
    border-radius: 8px;
    min-height: 46px;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 0.96rem;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: var(--blue);
    color: var(--white);
}

.button.ghost {
    background: var(--white);
    color: var(--blue);
}

.button.full {
    width: 100%;
    margin-top: 12px;
}

.hero-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 22px);
}

.hero-logos img {
    width: auto;
    max-width: min(46%, 230px);
    max-height: 190px;
    object-fit: contain;
    filter: drop-shadow(0 16px 25px rgba(13, 79, 161, 0.16));
}

.orientation,
.section,
.reflection-reader {
    padding: clamp(28px, 6vw, 64px) clamp(18px, 6vw, 72px);
}

.orientation {
    background: var(--blue);
    color: var(--white);
    border-radius: 18px;
    margin-top: 18px;
}

.orientation .eyebrow,
.orientation h2,
.orientation p {
    max-width: 980px;
}

.orientation h2 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.orientation p:last-child {
    margin-bottom: 0;
    font-size: 1.08rem;
}

.intro-details,
.days-details {
    max-width: 980px;
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.intro-details summary,
.days-details summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    font-weight: 900;
    cursor: pointer;
}

.intro-details summary::-webkit-details-marker,
.days-details summary::-webkit-details-marker {
    display: none;
}

.intro-details summary::after,
.days-details summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 999px;
    background: var(--white);
    color: var(--blue);
    font-size: 1.3rem;
    line-height: 1;
}

.intro-details[open] summary::after,
.days-details[open] summary::after {
    content: "-";
}

.intro-details summary span,
.days-details summary span {
    display: block;
}

.intro-details summary small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: none;
}

.intro-details div {
    padding: 0 16px 16px;
}

.intro-details p {
    margin: 12px 0 0;
}

.couple-note {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.admin-hero {
    padding: clamp(34px, 7vw, 76px) clamp(18px, 6vw, 72px);
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.admin-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--blue);
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1;
}

.admin-hero p:last-child {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.08rem;
}

.message {
    margin: 18px clamp(18px, 6vw, 32px) 0;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 700;
}

.message.error {
    background: #fff0f0;
    color: #8a1f1f;
}

.status-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    margin: 18px clamp(18px, 6vw, 32px) 0;
}

.status-band div {
    padding: 18px clamp(14px, 4vw, 34px);
    background: var(--white);
}

.status-band span,
.section-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-band strong {
    display: block;
    color: var(--blue);
    font-size: clamp(1rem, 3.5vw, 1.45rem);
}

.reflection-reader {
    display: grid;
    grid-template-columns: minmax(0, 980px);
    justify-content: center;
    gap: 18px;
    background: #fbfdff;
    padding-top: 24px;
    padding-bottom: 24px;
}

.reader-card,
.form-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.reader-card {
    padding: clamp(18px, 4vw, 28px);
    width: 100%;
}

.reader-card.highlight {
    border-color: var(--blue);
}

.reader-card h2,
.section-heading h2 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(1.55rem, 4vw, 2.3rem);
    line-height: 1.1;
}

.reader-card p {
    margin: 12px 0 0;
    font-size: 1.04rem;
}

.reading-reference {
    color: var(--blue-dark);
    font-weight: 800;
}

.reflection-text {
    margin-top: 16px;
    font-size: 1.06rem;
}

.button.compact {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 0.9rem;
}

.reflection-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    text-align: center;
}

.reflection-pager.bottom {
    grid-template-columns: 1fr 1fr;
    margin: 26px 0 0;
}

.reflection-pager strong {
    color: var(--blue-dark);
    font-size: 0.95rem;
}

.pager-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 7px;
    background: var(--white);
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.pager-link.previous {
    justify-content: flex-start;
}

.pager-link.next {
    justify-content: flex-end;
}

.pager-link span {
    font-size: 1.1rem;
    line-height: 1;
}

.pager-link:hover,
.pager-link:focus {
    background: var(--blue-soft);
    outline: none;
}

.pager-link.disabled {
    color: #9aa6b8;
}

.prayer-text,
.reflection-block {
    margin-top: 10px;
    margin-bottom: 24px;
    padding: clamp(16px, 4vw, 22px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    font-size: 1.05rem;
}

.reflection-block {
    border-color: rgba(13, 79, 161, 0.26);
    background: var(--white);
}

.pending-text {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 700;
}

.section-heading {
    margin-bottom: 22px;
}

.compact-days-section {
    padding-top: 10px;
    padding-bottom: 28px;
    background: #fbfdff;
}

.compact-days-section .days-details {
    margin: 0 auto;
    border-color: var(--line);
    background: var(--white);
    box-shadow: var(--shadow);
}

.day-chip-list {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
}

.day-chip-list a {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.day-chip-list a.active {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

.reflection-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.reflection-card {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    background: var(--white);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.reflection-card:hover,
.reflection-card.current {
    transform: translateY(-2px);
    border-color: var(--blue);
}

.reflection-card small {
    color: var(--accent);
    font-weight: 800;
}

.reflection-card strong {
    color: var(--blue);
    font-size: 1.12rem;
}

.reflection-card em {
    color: var(--blue-dark);
    font-style: normal;
    font-weight: 800;
}

.reflection-card span {
    color: var(--muted);
}

.schedule-section {
    background: #fbfdff;
}

.schedule-list,
.schedule-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.schedule-card,
.coordinator-box,
.admin-table {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.schedule-card,
.coordinator-box,
.admin-table {
    padding: 18px;
}

.schedule-card strong {
    display: block;
    color: var(--blue);
    font-size: 1.15rem;
}

.schedule-card p,
.coordinator-box p {
    margin: 8px 0 0;
    color: var(--muted);
}

.coordinator-box {
    margin-top: 16px;
}

.coordinator-box strong {
    color: var(--blue-dark);
}

.form-card {
    max-width: 780px;
    padding: 18px;
    margin: 0 auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}

.admin-table {
    margin-top: 18px;
}

.admin-table h2 {
    margin: 0 0 12px;
    color: var(--blue);
}

.logout-form {
    margin-top: 18px;
}

.admin-editor {
    margin-top: 28px;
}

.day-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.day-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.day-tabs a.active {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

.reflection-edit-form {
    max-width: 980px;
}

.reflection-edit-form label {
    margin-top: 14px;
}

.reflection-edit-form button {
    margin-top: 14px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--blue-dark);
    font-weight: 800;
}

input {
    flex: 1 1 240px;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--text);
    font-size: 1rem;
}

textarea {
    width: 100%;
    min-height: 280px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    resize: vertical;
}

input:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(13, 79, 161, 0.14);
}

textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(13, 79, 161, 0.14);
}

.form-note {
    margin: 12px 0 0;
    color: var(--muted);
}

code {
    color: var(--blue-dark);
    font-weight: 700;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 26px 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    text-align: center;
    width: min(100%, 1240px);
    margin: 0 auto 18px;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-logos img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.app-modal {
    width: min(92vw, 720px);
    max-height: 84vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: clamp(18px, 4vw, 28px);
    color: var(--text);
    box-shadow: 0 24px 80px rgba(9, 58, 118, 0.26);
}

.app-modal::backdrop {
    background: rgba(8, 24, 45, 0.54);
}

.app-modal p {
    font-size: 1.06rem;
}

.schedule-modal {
    width: min(94vw, 1060px);
}

.modal-close {
    float: right;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--blue);
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 880px) {
    .topbar {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .nav {
        width: 100%;
    }

    .hero {
        grid-template-columns: 1fr;
        border-radius: 0 0 16px 16px;
    }

    .hero {
        min-height: auto;
        text-align: center;
    }

    .hero-copy {
        max-width: 680px;
        margin: 0 auto;
        order: 2;
    }

    .hero-logos {
        order: 1;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .status-band {
        grid-template-columns: 1fr;
        margin-left: 14px;
        margin-right: 14px;
    }

    .schedule-list,
    .schedule-timeline {
        grid-template-columns: 1fr;
    }

    .schedule-card {
        padding: 16px;
    }

    .day-chip-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 520px) {
    body {
        font-size: 16px;
    }

    .topbar {
        position: sticky;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        padding: 10px 14px;
    }

    .hero,
    .orientation,
    .section,
    .reflection-reader,
    .content-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav {
        display: none;
        gap: 4px;
        flex-direction: column;
        order: 3;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a,
    .nav-button {
        width: 100%;
        padding: 11px 8px;
        text-align: left;
        font-size: 0.96rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .admin-link {
        display: none;
    }

    .hero {
        padding-top: 18px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-logos {
        width: 100%;
        gap: 16px;
        margin-bottom: 8px;
    }

    .hero-logos img {
        max-width: 43%;
        max-height: 82px;
    }

    .reader-card,
    .form-card,
    .schedule-card,
    .coordinator-box {
        box-shadow: none;
    }

    .reader-card h2,
    .section-heading h2 {
        font-size: 1.55rem;
    }

    .reflection-text {
        font-size: 1.02rem;
        line-height: 1.7;
    }

    .reflection-card {
        min-height: 136px;
    }

    .day-tabs {
        grid-template-columns: repeat(5, 1fr);
    }

    .reflection-pager {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 6px;
    }

    .reflection-pager.bottom {
        grid-template-columns: 1fr 1fr;
    }

    .pager-link {
        min-height: 40px;
        padding: 7px 8px;
        font-size: 0.88rem;
    }

    .prayer-text,
    .reflection-block {
        padding: 15px;
    }

    .day-chip-list {
        grid-template-columns: repeat(5, 1fr);
        padding: 0 12px 12px;
    }

    .button,
    .input-row .button {
        width: 100%;
    }

    .button.compact {
        width: 100%;
    }

    .app-modal {
        width: min(94vw, 420px);
        padding: 18px;
    }

    .footer-logos img {
        width: 48px;
        height: 48px;
    }
}
