:root {
    --navy: #16354d;
    --blue: #24658a;
    --green: #4f8d72;
    --ink: #17232d;
    --muted: #61717e;
    --line: #dbe4e9;
    --soft: #f4f8fa;
    --white: #ffffff;
    --danger: #9f2f2f;
    --success: #256b49;
    --shadow: 0 18px 45px rgba(22, 53, 77, 0.10);
}

* { box-sizing: border-box; }

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

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow { width: min(780px, calc(100% - 40px)); }

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: var(--white);
    font-size: 13px;
    letter-spacing: .06em;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-nav a, .link-button {
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.header-nav form { margin: 0; }
.link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.hero {
    color: var(--white);
    background:
        radial-gradient(circle at 85% 20%, rgba(79, 141, 114, .45), transparent 28%),
        linear-gradient(135deg, #102e45, #245f7f);
    padding: 88px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.45fr .7fr;
    align-items: center;
    gap: 64px;
}

h1, h2 { line-height: 1.15; margin-top: 0; }

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    max-width: 840px;
    margin-bottom: 22px;
}

.hero-copy {
    max-width: 690px;
    font-size: 1.15rem;
    color: rgba(255,255,255,.84);
}

.hero-note {
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 26px;
}

.hero-note p { margin-bottom: 0; color: rgba(255,255,255,.78); }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: .78rem;
    font-weight: 850;
    color: var(--green);
    margin-bottom: 10px;
}

.hero .eyebrow { color: #a9dfc2; }

.section { padding: 72px 0; }

.section-heading { margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 10px; }
.section-heading p:last-child { color: var(--muted); }

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

.form-card { padding: clamp(24px, 5vw, 46px); }

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

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

.field { margin-bottom: 22px; }
.field label {
    display: block;
    font-weight: 750;
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #c8d5dc;
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--white);
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(36,101,138,.12);
}

.field textarea { resize: vertical; }

.checkbox-field {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 11px;
    margin: 10px 0 24px;
}

.checkbox-field input { margin-top: 5px; }

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    min-height: 48px;
    padding: 0 20px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    border: 0;
    background: var(--navy);
    color: var(--white);
}

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

.secondary-button {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--navy);
}

.full-width { width: 100%; }

.error {
    display: block;
    color: var(--danger);
    font-size: .88rem;
    margin-top: 6px;
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.flash-stack { padding-top: 18px; }
.flash {
    border-radius: 12px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    background: var(--white);
}
.flash-error { border-color: #e8baba; color: var(--danger); }
.flash-success { border-color: #b8dcc8; color: var(--success); }

.success-card {
    text-align: center;
    padding: 54px 34px;
}

.success-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: #e8f5ee;
    color: var(--success);
    font-size: 2rem;
    font-weight: 900;
}

.login-wrap { width: min(500px, calc(100% - 40px)); }
.login-card { padding: 38px; }
.login-card h1 { margin-bottom: 8px; }
.login-card > p:not(.eyebrow) { color: var(--muted); margin-bottom: 28px; }

.dashboard-section { min-height: calc(100vh - 74px); }

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 30px;
}

.page-heading h1 { font-size: 2.8rem; margin-bottom: 8px; }
.page-heading p:last-child { color: var(--muted); margin-bottom: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}

.stat-card span { display: block; color: var(--muted); font-weight: 700; }
.stat-card strong { display: block; font-size: 2rem; color: var(--navy); }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }

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

th, td {
    text-align: left;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

td small { display: block; color: var(--muted); margin-top: 3px; }
.table-link { font-weight: 800; color: var(--navy); text-decoration: none; }
.table-link:hover { text-decoration: underline; }

.status-pill {
    display: inline-flex;
    border-radius: 999px;
    background: #eaf2f6;
    color: var(--navy);
    padding: 5px 10px;
    font-size: .82rem;
    font-weight: 800;
}

.empty-state { padding: 55px 30px; text-align: center; }
.empty-state p { color: var(--muted); }

.back-link {
    display: inline-block;
    color: var(--blue);
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 22px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .65fr);
    gap: 24px;
    align-items: start;
}

.applicant-card { padding: 34px; }

.applicant-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.applicant-heading h1 { margin-bottom: 7px; }
.applicant-heading p:last-child { color: var(--muted); margin: 0; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.detail-grid span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: 4px;
}

.detail-grid strong { overflow-wrap: anywhere; }

.response-section { padding-top: 24px; }
.response-section h2 { font-size: 1rem; margin-bottom: 8px; }
.response-section p { white-space: pre-wrap; color: #344653; }

.review-card {
    padding: 26px;
    position: sticky;
    top: 98px;
}
.review-card h2 { margin-bottom: 24px; }

@media (max-width: 850px) {
    .hero-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .review-card { position: static; }
}

@media (max-width: 620px) {
    .container, .narrow, .login-wrap { width: min(100% - 24px, 1160px); }
    .header-inner { min-height: 64px; }
    .brand span:last-child { display: none; }
    .hero { padding: 62px 0; }
    .hero h1 { font-size: 2.6rem; }
    .section { padding: 48px 0; }
    .two-column,
    .stat-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .page-heading,
    .applicant-heading {
        align-items: stretch;
        flex-direction: column;
    }
    .form-card,
    .applicant-card,
    .login-card {
        padding: 24px;
    }
    th, td { padding: 14px 15px; }
}
.form-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.form-fieldset legend {
    font-weight: 800;
    margin-bottom: 12px;
}

.required {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
}

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

.checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    padding: 9px 13px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
}

.checkbox-option:hover {
    border-color: var(--blue);
}

.checkbox-option input {
    width: auto;
    margin: 0;
    accent-color: var(--blue);
}

.acknowledgement-block {
    margin: 8px 0 26px;
}

.acknowledgement-title {
    font-weight: 800;
    margin-bottom: 10px;
}

.acknowledgement-option {
    border-radius: 13px;
    align-items: flex-start;
    width: 100%;
    line-height: 1.4;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.response-tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    background: #eaf2f6;
    color: var(--navy);
    font-size: .86rem;
    font-weight: 800;
}
