/*
 * The Start Living Again Assessment: landing page, question flow and results.
 * Shares the home page palette and fonts (see css/styles.css). Mobile first.
 */

:root {
    --primary-blue: #6bbbdd;
    --light-blue: #c1e3f2;
    --pale-blue: #eaf6fb;
    --dark-blue: #2980b9;
    --deep-blue: #2C5F7C;
    --accent-green: #a8d8b9;
    --accent-pink: #f4c2c2;
    --soft-gold: #f3e2b3;
    --text-dark: #333333;
    --text-muted: #5f6b73;
    --text-light: #ffffff;
    --background-light: #f9f9f9;
    --card-shadow: 0 6px 24px rgba(41, 128, 185, 0.10);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body.asmt {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--background-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-blue);
}

a {
    color: var(--dark-blue);
}

.asmt-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.asmt-narrow {
    max-width: 720px;
}

.asmt-prose {
    max-width: 760px;
}

/* Header and footer ------------------------------------------------------- */

.asmt-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.asmt-header .asmt-container {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

.asmt-logo {
    height: 64px;
    width: auto;
    display: block;
}

.asmt-footer {
    margin-top: auto;
    padding: 28px 0;
    background: var(--deep-blue);
    color: var(--text-light);
    text-align: center;
    font-size: 0.9rem;
}

.asmt-footer a {
    color: var(--light-blue);
}

.asmt-footer p {
    margin: 0.3rem 0;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
    background: var(--dark-blue);
    border: 2px solid var(--dark-blue);
    border-radius: 999px;
    padding: 12px 28px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
    text-align: center;
}

.btn:hover,
.btn:focus-visible {
    background: var(--deep-blue);
    border-color: var(--deep-blue);
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.btn-outline {
    background: transparent;
    color: var(--dark-blue);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--pale-blue);
    color: var(--deep-blue);
}

.btn i {
    margin-right: 6px;
}

/* Cards ------------------------------------------------------------------- */

.asmt-main {
    padding: 24px 0 48px;
}

.asmt-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 28px 22px;
    margin-bottom: 20px;
}

.asmt-center {
    text-align: center;
}

.asmt-card h1 {
    font-size: 1.7rem;
    margin-bottom: 0.75rem;
}

.asmt-card p {
    margin-bottom: 1rem;
}

.asmt-card p:last-child {
    margin-bottom: 0;
}

.asmt-kicker {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.asmt-muted {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.asmt-error {
    color: #b23a48;
    font-weight: 600;
}

/* Progress ---------------------------------------------------------------- */

.asmt-progress {
    height: 10px;
    background: var(--light-blue);
    border-radius: 999px;
    overflow: hidden;
}

.asmt-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.asmt-progress-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 8px 0 16px;
    text-align: right;
}

/* Question screens -------------------------------------------------------- */

.asmt-screen h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.asmt-question-text {
    font-size: 1.3rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0.25rem 0 1.25rem;
}

.asmt-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.asmt-options {
    border: 0;
    display: grid;
    gap: 10px;
}

.asmt-options legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.asmt-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--light-blue);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1.4;
    transition: border-color 0.15s, background 0.15s;
}

.asmt-option:hover {
    border-color: var(--primary-blue);
    background: var(--pale-blue);
}

.asmt-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.asmt-option .asmt-radio {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
    background: #fff;
    position: relative;
}

.asmt-option input:checked ~ .asmt-radio {
    border-color: var(--dark-blue);
    background: var(--dark-blue);
    box-shadow: inset 0 0 0 4px #fff;
}

.asmt-option input:checked ~ .asmt-option-label {
    font-weight: 600;
    color: var(--deep-blue);
}

.asmt-option:has(input:checked) {
    border-color: var(--dark-blue);
    background: var(--pale-blue);
}

.asmt-option input:focus-visible ~ .asmt-radio {
    outline: 3px solid var(--accent-pink);
    outline-offset: 2px;
}

.asmt-other {
    margin-top: 10px;
}

.asmt-other label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.asmt-other input {
    width: 100%;
    font: inherit;
    padding: 12px 14px;
    border: 2px solid var(--light-blue);
    border-radius: 10px;
}

.asmt-other input:focus {
    outline: none;
    border-color: var(--dark-blue);
}

.asmt-field-error {
    color: #b23a48;
    font-size: 0.95rem;
    margin-top: 12px;
    min-height: 1.4em;
}

.asmt-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.asmt-nav .btn {
    flex: 1 1 0;
}

.asmt-intro ul,
.asmt-opening ul,
.asmt-closing ul {
    margin: 0 0 1rem 1.25rem;
}

/* Results page ------------------------------------------------------------ */

.asmt-hero {
    background: linear-gradient(160deg, var(--pale-blue), #fff 70%);
    padding: 36px 0 28px;
    text-align: center;
}

.asmt-hero h1 {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.asmt-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.asmt-greeting {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--deep-blue);
}

.asmt-results .asmt-main {
    padding-top: 0;
}

.asmt-results .asmt-container.asmt-prose {
    padding-top: 24px;
}

.asmt-prose h2 {
    font-size: 1.45rem;
    margin: 0 0 0.75rem;
}

.asmt-prose h3 {
    font-size: 1.1rem;
    margin: 1.6rem 0 0.5rem;
    color: var(--deep-blue);
}

.asmt-prose p {
    margin-bottom: 0.9rem;
}

.asmt-prose .quote,
.asmt-prose .question {
    font-style: italic;
    color: var(--deep-blue);
}

.asmt-prose .reflect {
    margin: 0 0 1rem 0;
    padding-left: 1.3rem;
}

.asmt-prose .reflect li {
    margin-bottom: 0.4rem;
    font-style: italic;
    color: var(--deep-blue);
}

.asmt-prose .scripture {
    margin: 1rem 0 1.2rem;
    padding: 14px 18px;
    border-left: 4px solid var(--accent-green);
    background: #f4faf6;
    border-radius: 0 10px 10px 0;
}

.asmt-prose .scripture p {
    margin-bottom: 0.3rem;
    font-style: italic;
}

.asmt-prose .scripture cite {
    display: block;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.asmt-prose .tier-def strong {
    color: var(--deep-blue);
}

/*
 * Tier badges. Deliberately one hue, not red/yellow/green: the tiers are a
 * snapshot, not grades. Emerging = white, Developing = light blue,
 * Strong = dark blue, all with the dark blue border.
 */
.asmt-badge {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 999px;
    border: 2px solid var(--dark-blue);
    background: #fff;
    color: var(--dark-blue);
    line-height: 1.5;
}

.tier-emerging .asmt-badge {
    background: #fff;
    color: var(--dark-blue);
}

.tier-developing .asmt-badge {
    background: var(--pale-blue); /* same shade as .asmt-summary-text */
    color: var(--dark-blue);
}

.tier-strong .asmt-badge {
    background: var(--dark-blue);
    color: #fff;
}

.asmt-summary ol {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.asmt-summary a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-dark);
}

.asmt-summary-letter,
.asmt-area-letter {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
    background: var(--dark-blue);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

.asmt-summary-title {
    flex: 1 1 auto;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.asmt-area-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.asmt-area-header h2 {
    margin: 0;
}

.asmt-area-question {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.asmt-result-line {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 1rem;
}

.asmt-result-line .asmt-badge {
    margin-left: 6px;
    vertical-align: middle;
}

.asmt-summary-text {
    padding: 14px 18px;
    background: var(--pale-blue);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.asmt-summary-text p:last-child {
    margin-bottom: 0;
}

/* Results Conversation reservation --------------------------------------- */

.asmt-reserve {
    border: 2px solid var(--light-blue);
    background: linear-gradient(180deg, #fff, var(--pale-blue));
}

.asmt-reserve-lead {
    font-weight: 500;
}

.asmt-slots {
    margin: 0 0 1rem;
}

.asmt-slots .asmt-option-label {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.asmt-slots small {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.asmt-reserve .btn-block {
    margin-top: 0.5rem;
}

.asmt-booked {
    text-align: center;
    padding: 18px;
    background: #fff;
    border-radius: 12px;
}

.asmt-booked h3 {
    margin-top: 0;
}

.asmt-booked-when {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--deep-blue);
}

.asmt-cta {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-blue);
}

.asmt-cta-note {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.asmt-footnote {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Landing page ------------------------------------------------------------ */

.asmt-landing .asmt-hero {
    padding: 44px 0 36px;
}

.asmt-landing .asmt-hero .asmt-subtitle {
    max-width: 640px;
    margin: 0 auto 1.25rem;
}

.asmt-areas {
    list-style: none;
    display: grid;
    gap: 18px;
    margin-top: 1.25rem;
}

.asmt-areas li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.asmt-areas h3 {
    margin: 0 0 0.1rem;
}

.asmt-areas .asmt-area-question {
    margin-bottom: 0.4rem;
}

.asmt-areas p:last-child {
    margin-bottom: 0;
    font-size: 0.98rem;
}

.asmt-checklist {
    list-style: none;
    margin: 0 0 1.25rem;
    display: grid;
    gap: 10px;
}

.asmt-checklist li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.asmt-checklist i {
    color: #1f5e3a;
    background: var(--accent-green);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-top: 2px;
}

.asmt-begin {
    border: 2px solid var(--light-blue);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--light-blue);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--dark-blue);
}

.btn-block {
    display: block;
    width: 100%;
}

.form-message {
    margin-top: 14px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
}

.form-message:empty {
    display: none;
}

.form-message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.form-message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.asmt-secure {
    margin-top: 1rem;
    text-align: center;
}

.asmt-secure i {
    font-size: 1.3rem;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--dark-blue);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

/* Admin dashboard --------------------------------------------------------- */

.asmt-admin {
    font-size: 0.98rem;
}

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}

.admin-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-decoration: none;
    color: var(--deep-blue);
}

.admin-brand span {
    color: var(--text-muted);
    font-weight: 400;
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.admin-login {
    margin: 24px auto;
}

.admin-head h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.admin-head {
    margin-bottom: 16px;
}

.admin-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eef3f6;
    vertical-align: top;
}

.admin-table th {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--pale-blue);
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-results td,
.admin-answers td {
    padding: 8px 10px;
}

.nowrap {
    white-space: nowrap;
}

.status-completed {
    color: #1f5e3a;
    font-weight: 600;
}

.status-pending_payment,
.status-expired {
    color: var(--text-muted);
}

.asmt-badge-none {
    background: #eee;
    color: #999;
}

.call-booked {
    color: #1f5e3a;
    font-weight: 600;
}

.call-none {
    color: #999;
}

.call-overdue {
    color: #c0392b;
    font-size: 1.3rem;
    line-height: 1;
}

.admin-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 18px;
    margin-bottom: 1rem;
}

.admin-facts dt {
    font-weight: 600;
    color: var(--text-muted);
}

.admin-facts dd {
    margin: 0;
    word-break: break-word;
}

.admin-pager {
    text-align: center;
    color: var(--text-muted);
}

.asmt-admin h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.asmt-admin h3 {
    font-size: 1rem;
    margin: 1.2rem 0 0.4rem;
    color: var(--deep-blue);
}

/* Larger screens ---------------------------------------------------------- */

@media (min-width: 600px) {
    .asmt-card {
        padding: 36px 40px;
    }

    .asmt-logo {
        height: 80px;
    }

    .asmt-hero h1 {
        font-size: 2.4rem;
    }

    .asmt-card h1 {
        font-size: 2rem;
    }

    .asmt-question-text {
        font-size: 1.45rem;
    }

    .asmt-nav .btn {
        flex: 0 0 auto;
        min-width: 160px;
    }
}

/* Desktop: let the results breathe so the page is not a long narrow column. */
@media (min-width: 900px) {
    .asmt-prose {
        max-width: 1000px;
    }

    .asmt-results .asmt-card {
        padding: 44px 56px;
    }

    .asmt-results .asmt-prose p,
    .asmt-results .asmt-prose li {
        font-size: 1.1rem;
    }

    .asmt-prose h2 {
        font-size: 1.7rem;
    }

    .asmt-prose h3 {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .asmt-progress-bar,
    .btn {
        transition: none;
    }
}
