/* navigator/static/css/style.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}
/* --- Variable Definitions --- */
:root {
    --primary-color: #197fe5;
    --secondary-color: #e2e8f0;
    --background-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-on-primary: #ffffff;
}

:root {
    --brand-primary: #1e3a8a; 
    --action-primary: #2563eb;
    --action-primary-hover: #1d4ed8;
    --text-dark: #111827;
    --text-body: #1f2937;
    --text-muted: #4b5563;
    --text-inverted: #ffffff;
    --bg-light: #ffffff;
    --bg-soft: #f9fafb;
    --bg-medium: #f3f4f6;
    --border-color: #e2e8f0;
    --border-radius: 4px;
    --box-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family-sans: "Public Sans", sans-serif;
    --font-family-icons: 'Material Icons';
}
:root {
    /* ... existing variables ... */
    --success-color: #16a34a;
    --success-surface-color: #f0fdf4;
    --destructive-color: #dc2626;
    --destructive-surface-color: #fef2f2;
}

/* --- Base Styles --- */
body {
    font-family: var(--font-family-sans);
    background-color: var(--bg-soft);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1280px; /* Corresponds to container mx-auto */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;  /* 16px */
    padding-right: 1rem; /* 16px */
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem; /* 24px */
        padding-right: 1.5rem; /* 24px */
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem; /* 32px */
        padding-right: 2rem; /* 32px */
    }
}


/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header__brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.header__brand-icon {
    font-size: 2.5rem; /* 40px */
    color: var(--brand-primary);
}
.header__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}
.header__subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}
.header__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.header__nav-link:hover {
    color: var(--action-primary);
}
.header__nav-link--external .material-icons {
    font-size: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: var(--action-primary);
    color: var(--text-inverted);
}
.btn-primary:hover { background-color: var(--action-primary-hover); }

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-medium);
    color: var(--text-dark);
}
.btn--large {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* --- Button Component --- */
.button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem; /* 6px */
    padding: 0 1rem; /* 16px */
    font-weight: 700;
    border: none;
    transition: all 0.2s ease-in-out;
    height: 3rem;
    text-decoration: none;
}

.button--primary {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.button--primary:hover {
    background-color: #2563eb; /* A darker blue */
}

.button--header {
    height: 2.5rem; /* 40px */
    font-size: 0.875rem; /* 14px */
}

.button--hero {
    height: 3rem; /* 48px */
    padding: 0 1.5rem; /* 24px */
    font-size: 1rem; /* 16px */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.button--hero:hover {
    transform: scale(1.05);
}


/* --- Main Content --- */
.main-content {
    flex-grow: 1;
}

.hero {
    background-color: var(--bg-light);
    padding: 4rem 0;
}
.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 3rem;
    text-align: center;
}
@media (min-width: 768px) {
    .hero__container {
        grid-template-columns: 1.2fr 1fr;
        text-align: left;
    }
}
.hero__heading {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
}
@media (min-width: 768px) { .hero__heading { font-size: 3.5rem; } }

.hero__subheading {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 1rem auto 2rem auto;
    max-width: 600px;
}
@media (min-width: 768px) { .hero__subheading { margin: 1rem 0 2rem 0; } }

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
@media (min-width: 768px) { .hero__actions { justify-content: flex-start; } }

.hero__image-wrapper { display: flex; justify-content: center; }
.hero__image { max-width: 100%; height: auto; }

/* ==========================================================================
   FEATURES SECTION ("HOW IT WORKS") - UPDATED
   ========================================================================== */
.features-section {
    padding: 5rem 0; /* Increased vertical padding */
    background-color: var(--bg-soft);
}

.features-section__header {
    text-align: center;
    margin-bottom: 3.5rem; /* Increased space */
}

.features-section__title {
    font-size: 2.5rem; /* Larger title */
    font-weight: 800; /* Bolder */
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.features-section__subtitle {
    font-size: 1.125rem; /* text-lg */
    color: var(--text-muted);
    margin-top: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.features-section__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem; /* Larger gap */
    margin-top: 3rem;
}
@media (min-width: 576px) { .features-section__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .features-section__grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px; /* ~rounded-xl */
    text-align: center;
    border: none; /* Removed border */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); /* ~shadow-lg */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px); /* ~-translate-y-2 */
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); /* More pronounced shadow on hover */
}

.feature-card__icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;  /* Increased size ~w-20 */
    height: 80px; /* Increased size ~h-20 */
    background-color: #eef2ff; /* ~bg-indigo-100 */
    border-radius: 50%;
    margin-left: auto; /* Center the element */
    margin-right: auto;
    margin-bottom: 1.5rem; /* ~mb-6 */
}

.feature-card__icon {
    font-size: 40px; /* ~text-4xl */
    color: #4f46e5; /* ~text-indigo-600 */
}

.feature-card__title {
    font-size: 1.25rem; /* ~text-xl */
    font-weight: 700; /* ~font-bold */
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.feature-card__description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem; /* 48px */
    width: 3rem; /* 48px */
    border-radius: 9999px; /* full circle */
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    margin-bottom: 1rem; /* 16px */
    z-index: 10;
    border: 8px solid var(--background-color);
}

.step__number {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
}

.step__title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    color: var(--text-primary);
}

.step__description {
    margin-top: 0.25rem; /* 4px */
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--brand-primary);
    color: #e0e7ff; /* light indigo text */
    font-size: 0.9rem;
}
.footer__container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
}
@media (min-width: 768px) {
    .footer__container {
        flex-direction: row;
        text-align: left;
    }
}
.footer__brand { flex: 1; }
.footer__title {
    font-size: 1.25rem;
    color: var(--text-inverted);
    margin: 0 0 0.25rem 0;
}
.footer__tagline {
    margin: 0;
    max-width: 450px;
}
.footer__tagline a {
    color: var(--text-inverted);
    font-weight: 500;
    text-decoration: underline;
}
.footer__nav {
    display: flex;
    gap: 1.5rem;
}
.footer__link {
    color: #c7d2fe; /* slightly brighter for links */
    text-decoration: none;
    font-weight: 500;
}
.footer__link:hover {
    color: var(--text-inverted);
    text-decoration: underline;
}
.footer__bottom-bar {
    background-color: rgba(0,0,0,0.2);
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #a5b4fc; /* soft indigo */
}

/* --- Quiz Page --- */
.quiz-container {
    max-width: 42rem; /* 672px */
    margin: 3rem auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
}

@media (min-width: 640px) {
    .quiz-header__title {
        font-size: 2.25rem; /* 36px */
    }
}

.quiz-header__subtitle {
    margin-top: 0.75rem; /* 12px */
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
}

.quiz-card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.5rem; /* 8px */
    padding: 1.5rem; /* 24px */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
    .quiz-card {
        padding: 2rem; /* 32px */
    }
}

.quiz-question__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quiz-question__title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
}

.quiz-question__text {
    font-size: 1rem; /* 16px */
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.quiz-question__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .quiz-question__actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.button-quiz {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem; /* 8px */
    border: 1px solid var(--secondary-color);
    background-color: white;
    padding: 0.75rem 1rem; /* 12px 16px */
    font-size: 1rem; /* 16px */
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.button-quiz:hover {
    background-color: #f0f9ff; /* A light blue */
    border-color: var(--primary-color);
}


/* --- Result Page --- */
.result-container {
    max-width: 42rem; /* 672px */
    margin: 4rem auto;
    text-align: center;
}

.result-container__title {
    font-size: 2rem;
    font-weight: 700;
    color: #16a34a; /* Green for success */
}

.result-container__title--danger {
    color: #dc2626; /* Red for danger/ineligible */
}

.result-container__text {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.result-container__reason {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fef2f2; /* Light red background */
    color: #991b1b; /* Darker red text */
    border: 1px solid #fecaca; /* Red border */
    border-radius: 0.5rem;
    font-weight: 500;
}

.result-container__cta {
    margin-top: 2rem;
}

.button--secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

.button--secondary:hover {
    background-color: #d1d5db; /* A darker gray */
}

/* --- Form Wizard --- */
.form-wizard {
    max-width: 48rem; /* 768px */
    margin: 3rem auto;
}

.form-wizard__header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-wizard__title {
    font-size: 2.25rem; /* 36px */
    font-weight: 800;
}

.form-wizard__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
}

.form-wizard__form {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem; /* 12px */
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

.form-wizard__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-color);
}


/* --- Progress Bar --- */
.progress-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.progress-bar__step {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--secondary-color);
    border-radius: 9999px; /* pill shape */
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.progress-bar__step--active {
    color: var(--text-on-primary);
    background-color: var(--primary-color);
    font-weight: 700;
}

.progress-bar__step--complete {
    color: var(--primary-color);
    background-color: #dbeafe; /* Lighter primary color */
    border-color: var(--primary-color);
}


/* --- Form Elements --- */
.form-section {
    margin-bottom: 2rem;
}

.form-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-section__description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
}

.form-input,
textarea,
select,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem; /* 6px */
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-input:focus,
textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 127, 229, 0.25);
}

.form-input--prefix-wrapper {
    position: relative;
    display: flex
;
    align-items: center;
}

.form-input--prefix-wrapper span {
    position: absolute;
    inset-y: 0;
    display: flex;           /* Add this line */
    align-items: center;
    left: 0;
    padding-left: 0.75rem;
    color: var(--text-secondary);
}

.form-input--prefix-wrapper input {
    padding-left: 2rem; /* Make space for the prefix */
}

/* --- Preview Page --- */
.preview-page {
    margin: 3rem 0;
}

.preview-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.preview-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.preview-page__subtitle {
    margin-top: 1rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.preview-page__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .preview-page__layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* --- Letter Preview Card --- */
.letter-preview {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

.letter-preview__header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--secondary-color);
}

.letter-preview__title {
    font-size: 1.125rem;
    font-weight: 600;
}

.letter-preview__body {
    padding: 1rem;
}

@media (min-width: 640px) {
    .letter-preview__body {
        padding: 1.5rem;
    }
}

.letter-preview__textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    background-color: #f9fafb; /* Lighter grey */
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 0.5rem;
    resize: vertical;
}

.letter-preview__textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 127, 229, 0.25);
    outline: none;
}

/* --- Actions Sidebar --- */
.preview-page__sidebar {
    position: sticky;
    top: 6rem; /* Align below sticky header */
}

.actions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.action-card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

.action-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.action-card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.action-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-card__buttons .button {
    width: 100%;
}

.action-card--note {
    background-color: #fefce8; /* Light yellow */
    border-color: #facc15; /* Yellow */
}

/* --- Document Preview Component --- */
.document-preview {
    background-color: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    border-radius: 0.25rem;
}

@media (max-width: 640px) {
    .document-preview {
        padding: 1rem 1.25rem;
    }
}

.document-preview__header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 1rem;
}

.document-preview__logo {
    max-width: 17rem; /* Control logo size */
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
}

.document-preview__title {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.document-preview__subtitle {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Fixing the "unstyled" textarea --- */
.letter-preview__textarea {
    /* Change font to look like a document, not code */
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.7;

    /* Make it blend in with the background */
    border: none;
    background-color: transparent;
    box-shadow: none;
    resize: none; /* Disable resizing to maintain document look */
    padding: 0;
}

.letter-preview__textarea:focus {
    /* Remove the default focus ring inside the document */
    outline: none;
    box-shadow: none;
}

.document-preview__footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #d1d5db;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Remove the old card styles now that we have the document view */
.letter-preview {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.letter-preview__header,
.letter-preview__body {
    padding: 0;
    border: none;
}

.progress-bar__step {
    /* ... existing styles ... */
    cursor: pointer; /* Default cursor for clickable items */
}

.progress-bar__step--active {
    color: var(--text-on-primary);
    background-color: var(--primary-color);
    font-weight: 700;
    border-color: var(--primary-color);
}

.progress-bar__step--complete {
    color: var(--primary-color);
    background-color: #dbeafe; /* Lighter primary color */
    border-color: var(--primary-color);
    text-decoration: none; /* Remove underline from links */
}
.progress-bar__step--complete:hover {
    background-color: #bfdbfe; /* Slightly darker on hover */
}

.progress-bar__step--disabled {
    color: var(--text-secondary);
    background-color: #e2e8f0; /* Grey for disabled */
    cursor: not-allowed;
    border-color: transparent;
}

.document-preview__text {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 1rem;
line-height: 1.7;
color: var(--text-primary);
white-space: pre-wrap; 
word-wrap: break-word;
}

/* --- Finalize Page --- */
.finalize-page {
    max-width: 42rem;
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.finalize-page__header {
    text-align: center;
}

.finalize-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.finalize-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.action-card__text--small {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* --- Signature Pad --- */
.signature-pad {
    border: 2px dashed var(--secondary-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.signature-pad__canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    display: block;
    border-radius: 0.5rem;
}

.signature-pad__actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* --- Waiting Period Page --- */
.waiting-page {
    max-width: 48rem;
    margin: 3rem auto;
}

.waiting-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.waiting-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.waiting-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.waiting-page__card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.waiting-page__card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.waiting-page__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.waiting-page__card-text--important {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fefce8;
    border-left: 4px solid #facc15;
    color: var(--text-primary);
}

.waiting-page__list {
    list-style-position: inside;
    margin: 1rem 0;
    color: var(--text-secondary);
}

.waiting-page__list li {
    margin-bottom: 0.5rem;
}

.waiting-page__footer {
    text-align: center;
    margin-top: 3rem;
}

.waiting-page__footer-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;}


/* --- Info Page --- */
.info-page {
    max-width: 48rem;
    margin: 3rem auto;
}

.info-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.info-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.info-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.info-page__card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.info-page__card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-page__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-page__card-text--important {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fefce8;
    border-left: 4px solid #facc15;
    color: var(--text-primary);
}

.info-page__actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .info-page__actions {
        flex-direction: row;
        justify-content: center;
    }
}

.form-field__warning {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #fefce8; /* Light yellow */
    color: #a16207; /* Dark yellow text */
    border: 1px solid #facc15; /* Yellow border */
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Page Wrapper --- */
.page-wrapper {
    width: 100%;
     display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper--centered {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}


/* --- Result Card --- */
.result-card {
    width: 100%;
    max-width: 32rem; /* 512px */
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .result-card {
        padding: 3rem;
    }
}

.result-card__icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 4rem; /* 64px */
    width: 4rem; /* 64px */
    border-radius: 9999px; /* full circle */
    margin-bottom: 1.5rem;
}

.result-card__icon-wrapper--success {
    background-color: var(--success-surface-color);
    color: var(--success-color);
}

.result-card__icon-wrapper--destructive {
    background-color: var(--destructive-surface-color);
    color: var(--destructive-color);
}

.result-card__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-card__subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.result-card__details-box {
    text-align: left;
    background-color: #f8fafc; /* light grey */
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--secondary-color);
}

.result-card__details-box--success {
    background-color: var(--success-surface-color);
    border-color: var(--success-color);
}

.result-card__details-text {
    color: var(--text-secondary);
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

.result-card__details-text strong {
    color: var(--text-primary);
}

.result-card__action .button {
    width: 100%;
    max-width: 20rem; /* 320px */
}

/* --- Document Preview Component --- */

.document-preview__address-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem; /* Space between the two blocks */
    margin-bottom: 2rem;
}

.document-preview__address-block {
    flex: 1; /* Each block will take up equal space */
}

/* This is just for semantic clarity, no specific styles needed for --to or --from */
.document-preview__address-block--to { }
.document-preview__address-block--from { }

.document-preview__main-content {
    padding-top: 1rem;
    border-top: 1px solid var(--secondary-color);
}

/* Update the existing text style for better readability */
.document-preview__text {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.9rem; /* Slightly smaller for document feel */
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.document-preview__text strong {
    font-weight: 700;
}

/* --- Page Layout --- */
.worksheet-container {
    max-width: 56rem; /* 896px, equivalent to max-w-4xl */
    margin: 0 auto;
    padding: 3rem 1rem; /* py-12 px-4 */
    font-family: 'Inter', sans-serif;
    color: #1f2937; /* text-gray-800 */
    background-color: #f9fafb; /* bg-gray-50 */
}

.worksheet-header {
    text-align: center;
    margin-bottom: 3rem; /* mb-12 */
}

.worksheet-header__title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #111827; /* text-gray-900 */
    margin-bottom: 0.5rem; /* mb-2 */
}

.worksheet-header__subtitle {
    font-size: 1.125rem; /* text-lg */
    color: #4b5563; /* text-gray-600 */
}

.worksheet-form-card {
    background-color: #ffffff;
    padding: 2rem; /* p-8 */
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
}

/* --- Form Structure --- */
.worksheet-form__section {
    margin-bottom: 2.5rem; /* space-y-10 on form */
}

.worksheet-form__section-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600; /* font-semibold */
    color: #111827; /* text-gray-900 */
    margin-bottom: 1.5rem; /* mb-6 */
    border-bottom: 1px solid #e5e7eb; /* border-b */
    padding-bottom: 1rem; /* pb-4 */
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) { /* md:grid-cols-2 */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-fieldset {
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem; /* p-4 */
}

.form-fieldset__legend {
    font-size: 1rem; /* text-base */
    font-weight: 500; /* font-medium */
    color: #111827; /* text-gray-900 */
    padding: 0 0.5rem; /* px-2 */
}

/* --- Readonly Info Display --- */
.readonly-group {
    padding: 1rem; /* p-4 */
    background-color: #f9fafb; /* bg-gray-50 */
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    margin-bottom: 1rem;
}

.readonly-group__label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #6b7280; /* text-gray-500 */
    margin-bottom: 0.25rem; /* mb-1 */
}

.readonly-group__text {
    font-size: 1rem; /* text-base */
    font-weight: 500; /* font-medium */
    color: #111827; /* text-gray-900 */
    line-height: 1.5;
}


/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
    margin-bottom: 0.25rem; /* mb-1 */
}

.form-help-text {
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    margin-bottom: 0.5rem; /* mb-2 */
}

/* Base styles for textareas and selects */
.worksheet-form textarea,
.worksheet-form select {
    width: 100%;
    padding: 0.75rem 1rem; /* p-3 / p-4 equivalent */
    background-color: #f9fafb; /* bg-gray-50 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.2s ease-in-out;
}

.worksheet-form textarea:focus,
.worksheet-form select:focus {
    outline: none;
    border-color: #4f46e5; /* focus:border-indigo-500 */
    box-shadow: 0 0 0 2px #c7d2fe; /* focus:ring-2 focus:ring-indigo-500/50 */
}

.worksheet-form__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.5rem; /* pt-6 */
    border-top: 1px solid #e5e7eb; /* border-t */
    margin-top: 2.5rem; /* mt-10 */
}

/* ==========================================================================
   Next Steps Page (New Design)
   ========================================================================== */

/* --- First, remove the old styles --- */
/* You can now safely delete these entire blocks from your CSS file:
.waiting-page { ... }
.waiting-page__header { ... }
.waiting-page__title { ... }
.waiting-page__subtitle { ... }
.waiting-page__card { ... }
.waiting-page__card-title { ... }
.waiting-page__card-text { ... }
.waiting-page__card-text--important { ... }
.waiting-page__list { ... }
.waiting-page__footer { ... }
.waiting-page__footer-text { ... }
*/


/* --- Container and Header --- */
.next-steps-container {
    max-width: 56rem; /* 896px */
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.next-steps-header {
    text-align: center;
    margin-bottom: 3rem; /* mb-12 */
}

.next-steps-header__title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #334155; /* text-gray-800 */
    margin-bottom: 1rem; /* mb-4 */
}

.next-steps-header__subtitle {
    font-size: 1.125rem; /* text-lg */
    color: #475569; /* text-gray-600 */
}

/* --- Content Area --- */
.next-steps-content {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* space-y-8 */
}

/* --- Step Card Component --- */
.step-card {
    background-color: #ffffff;
    padding: 2rem; /* p-8 */
    border-radius: 1rem; /* rounded-2xl */
    border: 1px solid #e2e8f0; /* border-gray-200 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.step-card__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem; /* space-x-6 */
}

.step-card__icon-wrapper {
    flex-shrink: 0;
    height: 3rem; /* h-12 */
    width: 3rem; /* w-12 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dbeafe; /* bg-blue-100 */
    color: #2563eb; /* text-blue-600 */
}

.step-card__content {
    flex-grow: 1;
}

.step-card__title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #334155; /* text-gray-800 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.step-card__text {
    color: #475569; /* text-gray-600 */
    margin-bottom: 1.5rem; /* mb-4 and mb-6 */
    line-height: 1.6;
}

.step-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* space-y-3 */
}

.step-card__list-item {
    display: flex;
    align-items: flex-start;
}
.material-icons {
    font-family: var(--font-family-icons);
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
}

.step-card__list-item .material-icons {
    color: var(--text-muted);
    margin-right: 0.75rem; /* mr-3 */
    margin-top: 0.25rem; /* mt-1 */
}

.step-card__list-item span {
    color: #475569; /* text-gray-600 */
}

.step-card__list-strong {
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
}

.step-card__link {
    color: #2563eb; /* text-blue-600 */
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.step-card__link:hover {
    color: #1d4ed8; /* darker blue */
}

/* Ensure the button in the last card matches the design */
.step-card .button--primary {
    background-color: #2563eb; /* bg-blue-600 */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    font-weight: 500; /* font-medium */
    transition: background-color 0.3s ease-in-out;
}

.step-card .button--primary:hover {
    background-color: #1d4ed8; /* hover:bg-blue-700 */
}
/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

/* --- Generic Page Header --- */
.page-header {
    background-color: var(--bg-medium);
    padding: 3rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin: 0;
}

.page-header__subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0.75rem auto 0 auto;
}

/* --- About Section Layout --- */
.about-section {
    padding: 3rem 0 4rem 0;
    background-color: var(--bg-light);
}

.about-content {
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto;
}

.about-content__heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
/* No top margin for the very first heading */
.about-content h2:first-of-type {
    margin-top: 0;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--text-body);
}

.about-content a {
    color: var(--action-primary);
    font-weight: 500;
    text-decoration: none;
}
.about-content a:hover {
    text-decoration: underline;
}

/* --- Feature List (Upcoming Tools) --- */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-list__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.feature-list__icon {
    color: var(--brand-primary);
}

/* --- Disclaimer Box --- */
.disclaimer-box {
    background-color: #fffbeb; /* A soft yellow */
    border: 1px solid #fde68a; /* A matching yellow border */
    border-radius: var(--border-radius);
    margin: 2.5rem 0;
    padding: 1.5rem;
}

.disclaimer-box__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.disclaimer-box__icon {
    color: #f59e0b; /* Amber/yellow for warning */
    font-size: 1.75rem;
}

.disclaimer-box__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #b45309; /* Darker amber */
    margin: 0;
}

.disclaimer-box__content p {
    font-size: 0.95rem;
    color: #92400e; /* Darker amber text for readability */
    line-height: 1.6;
    margin: 0;
}

.disclaimer-box__content strong {
    font-weight: 700;
}