:root {
    --ink: #24113f;
    --muted: #6d6477;
    --line: #e7def4;
    --paper: #ffffff;
    --panel: #ffffff;
    --accent: #6d28d9;
    --accent-dark: #4c1d95;
    --accent-soft: #f4efff;
    --gold: #c9a227;
    --sage: #7c3aed;
    --sky: #f7f2ff;
    --shadow: 0 18px 44px rgba(76, 29, 149, .11);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: rgba(255, 255, 255, .93);
    border-bottom: 1px solid rgba(231, 222, 244, .95);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: clamp(168px, 18vw, 230px);
    height: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
}

.nav a,
.link-button {
    color: var(--muted);
    text-decoration: none;
}

.nav a:hover,
.nav .is-active,
.link-button:hover {
    color: var(--ink);
}

.nav-cta {
    padding: 9px 14px;
    color: #fff !important;
    background: var(--accent);
    border-radius: 6px;
}

.inline-form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

main {
    min-height: 68vh;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(54px, 8vw, 92px) clamp(18px, 6vw, 84px) 44px;
}

.hero-copy h1,
.page-title h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    font-weight: 850;
}

.hero-copy p,
.page-title p {
    max-width: 700px;
    font-size: 19px;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent) !important;
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions,
.form-footer,
.service-card-footer,
.wide-card-side,
.admin-row-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.button.primary:hover {
    background: var(--accent-dark);
}

.button.secondary {
    color: var(--ink);
    background: var(--panel);
    border-color: var(--line);
}

.hero-panel,
.info-box,
.form-card,
.timeline-card,
.wide-card,
.service-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: clamp(24px, 4vw, 36px);
    border-top: 5px solid var(--gold);
    background: linear-gradient(180deg, #fff, var(--accent-soft));
}

.hero-panel h2,
.section-heading h2,
.band h2,
.wide-card h2,
.timeline-card h2,
.form-card h2,
.steps h2,
.info-box h2 {
    margin: 0 0 10px;
    line-height: 1.1;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    padding: 5px 9px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.check-list {
    padding: 0;
    margin: 20px 0 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 24px;
    margin: 10px 0;
}

.check-list li::before {
    position: absolute;
    left: 0;
    content: "+";
    color: var(--accent);
    font-weight: 900;
}

.section,
.steps,
.form-shell,
.client-view,
.admin-detail,
.admin-list {
    padding: 44px clamp(18px, 6vw, 84px);
}

.section-heading,
.page-title,
.admin-title {
    padding: 54px clamp(18px, 6vw, 84px) 22px;
}

.page-title.compact {
    padding-bottom: 20px;
}

.page-title.compact h1 {
    font-size: clamp(38px, 5vw, 62px);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.service-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: 22px;
}

.service-card p {
    color: var(--muted);
}

.service-card-footer {
    justify-content: space-between;
    margin-top: auto;
}

.service-card-footer strong,
.service-card-footer span:first-child,
.price {
    font-size: 22px;
    font-weight: 900;
}

.service-card-footer a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.muted {
    color: var(--muted);
}

.band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 28px clamp(18px, 6vw, 84px) 54px;
    padding: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-dark), #2f175c);
    border-radius: 8px;
}

.band.subtle {
    color: var(--ink);
    background: var(--sky);
}

.service-list {
    display: grid;
    gap: 16px;
}

.wide-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
}

.wide-card p,
.timeline-card p,
.form-card p,
.info-box p,
.legal-page p {
    color: var(--muted);
}

.two-columns,
.form-shell,
.admin-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: start;
}

.info-box,
.form-card,
.timeline-card {
    padding: 24px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.steps article {
    padding: 26px;
    background: var(--panel);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
}

.steps span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 18px;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    font-weight: 900;
}

label {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
    font-weight: 800;
}

input,
textarea {
    width: 100%;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}

textarea {
    resize: vertical;
}

fieldset {
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

legend {
    margin-bottom: 12px;
    font-weight: 900;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.topic-card {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: 116px;
    margin: 0;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.topic-card input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--accent);
}

.topic-card span {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.topic-card strong {
    font-size: 17px;
}

.topic-card small {
    color: var(--muted);
    font-weight: 500;
    line-height: 1.35;
}

.topic-card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
}

.question-modal {
    display: none;
    margin: 22px 0;
    padding: 20px;
    background: var(--sky);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.question-modal.is-open {
    display: block;
}

.question-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 10px;
}

.question-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-row {
    grid-template-columns: 18px 1fr;
    align-items: start;
    font-weight: 500;
}

.checkbox-row input {
    width: 18px;
    margin-top: 5px;
}

.error,
.error-alert {
    color: #9f2636;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    background: #fdecef;
}

.success-alert {
    color: #236241;
    background: #edf9f1;
}

.form-footer {
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.client-header,
.admin-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.client-view {
    display: grid;
    gap: 18px;
    max-width: 1040px;
    margin: 0 auto;
}

.timeline-card.highlighted {
    border-color: #d1b779;
}

.preline {
    white-space: pre-line;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 0;
}

.details div {
    padding: 12px;
    background: var(--accent-soft);
    border-radius: 6px;
}

.details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.details dd {
    margin: 3px 0 0;
    font-weight: 700;
}

.reading-image {
    display: block;
    width: min(100%, 720px);
    margin-top: 18px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.reading-image.small {
    max-width: 260px;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding: 32px 18px;
}

.login-card {
    width: min(100%, 420px);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters a {
    padding: 8px 12px;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
}

.filters .is-active {
    color: #fff;
    background: var(--accent);
}

.admin-list {
    display: grid;
    gap: 12px;
}

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-row h2 {
    margin: 8px 0 2px;
}

.admin-row p {
    margin: 0;
    color: var(--muted);
}

.empty {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.legal-page {
    max-width: 860px;
    padding: 54px clamp(18px, 6vw, 84px);
}

.legal-page h1 {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.05;
    font-weight: 850;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(18px, 4vw, 56px);
    color: #ffffff;
    background: #24113f;
}

.site-footer p {
    max-width: 620px;
    margin: 8px 0 0;
    color: #d9cfff;
}

.site-footer nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer a {
    color: #fff;
}

.debug-box {
    overflow: auto;
    padding: 18px;
    color: #fff;
    background: #241d21;
    border-radius: 8px;
}

@media (max-width: 940px) {
    .hero,
    .two-columns,
    .form-shell,
    .admin-detail,
    .wide-card {
        grid-template-columns: 1fr;
    }

    .service-grid,
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-header,
    .site-footer,
    .client-header,
    .admin-title,
    .admin-row,
    .band {
        align-items: stretch;
        flex-direction: column;
    }

    .nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .brand-logo {
        width: 178px;
    }

    .hero-copy h1,
    .page-title h1 {
        font-size: 42px;
    }

    .service-grid,
    .steps,
    .topic-grid,
    .details,
    .form-grid.two,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .topic-card {
        min-height: auto;
        padding: 14px;
    }

    .form-footer,
    .wide-card-side,
    .admin-row-side {
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    button.button {
        width: 100%;
    }
}
