:root {
    --waitlist-navy: #23435d;
    --waitlist-teal: #3b8582;
    --waitlist-teal-dark: #2c6765;
    --waitlist-gold: #c68b42;
    --waitlist-background: #f5f7f7;
    --waitlist-surface: #ffffff;
    --waitlist-border: #d8e0e1;
    --waitlist-text: #263943;
    --waitlist-muted: #60727b;
    --waitlist-error: #a83e3e;
    --waitlist-shadow: 0 8px 24px rgba(35, 67, 93, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    font-size: 18px;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--waitlist-background);
    color: var(--waitlist-text);
    font-family: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

button, input {
    font: inherit;
}

a {
    color: var(--waitlist-teal-dark);
    font-weight: 700;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 4px solid rgba(198, 139, 66, 0.6);
    outline-offset: 2px;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header, .site-main, .site-footer {
    width: min(100% - 2rem, 1180px);
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--waitlist-navy);
    text-decoration: none;
}

.site-brand-mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 0.6rem;
    background: var(--waitlist-teal);
    color: white;
    font-size: 1.65rem;
    font-weight: 700;
}

.site-brand strong, .site-brand small {
    display: block;
}

.site-brand strong {
    font-size: 1.35rem;
}

.site-brand small {
    color: var(--waitlist-muted);
    font-size: 0.85rem;
}

.header-phone {
    color: var(--waitlist-navy);
    text-decoration: none;
}

.site-main {
    flex: 1;
    padding: 2rem 0 4rem;
}

.waitlist-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.welcome-panel {
    padding-top: 2.5rem;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--waitlist-teal-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1, h2 {
    margin-top: 0;
    color: var(--waitlist-navy);
    line-height: 1.15;
}

h1 {
    max-width: 12ch;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
}

h2 {
    font-size: 1.8rem;
}

.lead-copy {
    max-width: 38rem;
    font-size: 1.2rem;
}

.rent-info {
    max-width: 38rem;
    margin: 2rem 0 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--waitlist-border);
    border-radius: 0.6rem;
    background: var(--waitlist-surface);
}

.rent-info h2,
.lihtc-notice h2 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.rent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.rent-item {
    display: flex;
    flex-direction: column;
    padding: 0.9rem;
    border-radius: 0.45rem;
    background: #eef6f5;
}

.rent-amount {
    color: var(--waitlist-navy);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.rent-label {
    margin-top: 0.25rem;
    color: var(--waitlist-muted);
    font-size: 0.95rem;
}

.rent-note {
    margin: 0.85rem 0 0;
    color: var(--waitlist-muted);
    font-size: 0.9rem;
}

.lihtc-notice {
    max-width: 38rem;
    margin: 1.5rem 0 2rem;
    padding: 1.25rem;
    border-left: 5px solid var(--waitlist-teal);
    background: #eef6f5;
}

.lihtc-notice p {
    margin: 0.65rem 0 0;
}

.help-box {
    max-width: 38rem;
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-left: 5px solid var(--waitlist-gold);
    background: #fffaf1;
}

.help-box p {
    margin: 0.35rem 0 0;
}

.simple-promise {
    display: grid;
    gap: 0.7rem;
    padding: 0;
    list-style: none;
}

.simple-promise li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.simple-promise span {
    color: var(--waitlist-teal-dark);
    font-weight: 700;
}

.form-card, .message-card {
    border: 1px solid var(--waitlist-border);
    border-radius: 0.8rem;
    background: var(--waitlist-surface);
    box-shadow: var(--waitlist-shadow);
}

.form-card {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.form-intro {
    margin-top: -0.5rem;
    color: var(--waitlist-muted);
}

.form-group {
    margin-top: 1.3rem;
}

.form-group label, .confirmation-choice legend {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--waitlist-navy);
    font-weight: 700;
}

.large-input {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.65rem 0.8rem;
    border: 2px solid var(--waitlist-border);
    border-radius: 0.45rem;
    color: var(--waitlist-text);
    background: var(--waitlist-surface);
}

.large-input:focus {
    border-color: var(--waitlist-teal);
    box-shadow: 0 0 0 3px rgba(59, 133, 130, 0.15);
    outline: 0;
}

.confirmation-choice {
    margin: 1.5rem 0 0;
    padding: 0;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 5rem;
    padding: 0.8rem;
    border: 2px solid var(--waitlist-border);
    border-radius: 0.45rem;
    cursor: pointer;
}

.choice-card:has(input:checked) {
    border-color: var(--waitlist-teal);
    background: #f0f8f7;
}

.choice-card input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    accent-color: var(--waitlist-teal);
}

.choice-card strong, .choice-card small {
    display: block;
}

.choice-card small, .field-help, .privacy-note {
    color: var(--waitlist-muted);
    font-size: 0.88rem;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.turnstile-area {
    min-height: 5rem;
    margin-top: 1.25rem;
}

.field-help {
    margin: 0.35rem 0 0;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1.25rem;
    cursor: pointer;
}

.consent-row input {
    width: 1.3rem;
    height: 1.3rem;
    flex: 0 0 auto;
    accent-color: var(--waitlist-teal);
}

.button {
    display: inline-flex;
    min-height: 3.2rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 0.45rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.button-primary {
    background: var(--waitlist-teal);
    color: white;
}

.button-primary:hover:not(:disabled) {
    background: var(--waitlist-teal-dark);
}

.button-secondary {
    border-color: var(--waitlist-teal);
    background: white;
    color: var(--waitlist-teal-dark);
}

.submit-button {
    width: 100%;
    margin-top: 1.35rem;
}

.privacy-note {
    margin: 0.8rem 0 0;
    text-align: center;
}

.validation-summary, .error-panel {
    color: var(--waitlist-error);
}

.validation-message {
    display: block;
    margin-top: 0.3rem;
    color: var(--waitlist-error);
    font-size: 0.9rem;
}

.error-panel {
    margin-top: 1rem;
    padding: 0.8rem;
    border: 2px solid #e4b3b3;
    border-radius: 0.45rem;
    background: #fff5f5;
}

.success-panel {
    padding: 2rem 0;
    text-align: center;
}

.success-icon {
    display: grid;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: var(--waitlist-teal);
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.admin-page {
    width: 100%;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-page-header h1 {
    max-width: none;
    margin-bottom: 0.5rem;
}

.admin-page-intro {
    margin: 0;
    color: var(--waitlist-muted);
}

.admin-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--waitlist-border);
    border-radius: 0.6rem;
    background: var(--waitlist-surface);
}

.admin-search {
    flex: 1 1 28rem;
}

.admin-status-filter {
    flex: 0 1 13rem;
}

.admin-search span, .admin-status-filter span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--waitlist-navy);
    font-weight: 700;
}

.admin-search input, .admin-status-filter select {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.5rem 0.7rem;
    border: 2px solid var(--waitlist-border);
    border-radius: 0.4rem;
    background: var(--waitlist-surface);
    color: var(--waitlist-text);
}

.admin-search input:focus, .admin-status-filter select:focus {
    border-color: var(--waitlist-teal);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 133, 130, 0.15);
}

.admin-summary {
    margin: 0 0 0.75rem;
    color: var(--waitlist-muted);
    font-size: 0.95rem;
}

.admin-grid-wrapper {
    overflow-x: auto;
    border: 1px solid var(--waitlist-border);
    border-radius: 0.6rem;
    background: var(--waitlist-surface);
    box-shadow: var(--waitlist-shadow);
}

.admin-grid {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-grid th, .admin-grid td {
    padding: 0.8rem 0.75rem;
    border-bottom: 1px solid var(--waitlist-border);
    text-align: left;
    vertical-align: top;
}

.admin-grid th {
    background: #eef6f5;
    color: var(--waitlist-navy);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.admin-grid tbody tr:last-child td {
    border-bottom: 0;
}

.admin-grid tbody tr:hover {
    background: #fbfdfd;
}

.admin-grid-empty {
    padding: 2rem !important;
    color: var(--waitlist-muted);
    text-align: center !important;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef6f5;
    color: var(--waitlist-teal-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 40rem) {
    .form-group-row {
        grid-template-columns: 1fr;
    }
}

.admin-rents {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #dbe7e5;
    border-radius: 0.6rem;
    background: white;
}

.admin-rents-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-rents-header p {
    margin: 0.15rem 0 0.9rem;
    color: #5b6b68;
    font-size: 0.9rem;
}

.admin-rents-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.admin-rents-fields label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-rents-fields input {
    width: 10rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid #c5d4d1;
    border-radius: 0.45rem;
    font-size: 1rem;
}

.admin-rents-status {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-rents-status.is-ok {
    color: var(--waitlist-teal-dark);
}

.admin-rents-status.is-error {
    color: #b3261e;
}

.admin-actions {
    white-space: nowrap;
}

.admin-actions .button-small {
    min-height: 2.2rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
}

.admin-actions .button + .button {
    margin-left: 0.4rem;
}

.button-danger {
    background: #b3261e;
    border-color: #b3261e;
    color: white;
}

.button-danger:hover:not(:disabled) {
    background: #8c1d17;
}

.button-danger-outline {
    background: white;
    border-color: #b3261e;
    color: #b3261e;
}

.button-danger-outline:hover:not(:disabled) {
    background: #fff5f5;
}

.message-card-error {
    padding: 1.5rem;
    border-color: #e4b3b3;
    background: #fff5f5;
}

.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;
}

.site-footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--waitlist-border);
    color: var(--waitlist-muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 800px) {
    .waitlist-grid {
        grid-template-columns: 1fr;
    }

    .welcome-panel {
        padding-top: 0;
    }

    h1 {
        max-width: none;
    }
}

@media (max-width: 560px) {
    html {
        font-size: 17px;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-main {
        padding-top: 1rem;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 1.1rem;
    }

    .rent-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-header, .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-page-header .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
