/* Matches the live gopnh.com header, fonts and footer */
:root {
    --brand: #3464eb;
    --brand-dark: #1a45c8;
    --header-bg: #333;
    --footer-bg: #383838;
    --bg: #f5f5f5;
    --card: #fff;
    --text: #555;
    --heading: #444;
    --muted: #777;
    --border: #e5e5e5;
    --divider: rgba(204, 204, 204, 0.5);
    --radius: 8px;
    --font-body: Roboto, Arial, "Helvetica Neue", sans-serif;
    --font-menu: Raleway, sans-serif;
}

* {
    box-sizing: border-box;
}

/* Make the hidden attribute win over classes that set display (e.g. .button) */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: var(--font-body);
    color: var(--heading);
    text-transform: uppercase;
}

a {
    color: var(--brand);
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100px;
}

.logo img {
    display: block;
    height: 100px;
    width: auto;
}

.site-nav {
    align-self: flex-end;
}

.site-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav li {
    position: relative;
}

/* Vertical separators between menu items, like the main site's menu-divider.png */
.site-nav li::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 36px;
    margin-top: -18px;
    background: var(--divider);
}

.site-nav a {
    display: block;
    padding: 27px 20px 32px;
    border-top: 5px solid transparent;
    color: #fff;
    font-family: var(--font-menu);
    font-weight: 700;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.current {
    background-color: var(--brand);
    border-top-color: rgba(0, 0, 0, 0.1);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.top-bar {
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    line-height: 33px;
}

.top-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 24px;
}

.top-bar-links {
    display: flex;
    gap: 30px;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* Hero */

.hero {
    background: linear-gradient(135deg, #1b2a52 0%, var(--brand-dark) 60%, var(--brand) 100%);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}

.hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 1.25rem;
}

/* Main */

main {
    flex: 1;
    padding: 40px 0 56px;
}

.section-title {
    margin: 0 0 20px;
    font-size: 30px;
    font-weight: 400;
}

.section-title span {
    color: var(--brand);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Job table */

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

.job-table th {
    text-align: left;
    font-family: var(--font-menu);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.job-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.job-table tbody tr:last-child td {
    border-bottom: none;
}

.job-table tbody tr:hover {
    background: #f9f9f9;
}

.job-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--heading);
}

.job-title a {
    color: inherit;
    text-decoration: none;
}

.job-title a:hover {
    color: var(--brand);
}

.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e8eefd;
    color: var(--brand-dark);
    white-space: nowrap;
}

.empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--muted);
}

.button {
    display: inline-block;
    padding: 10px 22px;
    border: 0;
    border-radius: var(--radius);
    background: var(--brand-dark);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #555;
    color: #fff;
}

.button:focus-visible {
    outline: 3px solid rgba(52, 100, 235, 0.45);
    outline-offset: 2px;
}

/* Large call-to-action button, e.g. "Apply Now" */
.button-lg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-menu);
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(26, 69, 200, 0.3);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.button-lg:hover {
    background: var(--brand);
    box-shadow: 0 6px 18px rgba(26, 69, 200, 0.35);
    transform: translateY(-1px);
}

.button-lg i {
    font-size: 18px;
    transition: transform 0.15s ease;
}

.button-lg:hover i {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .button-lg,
    .button-lg i {
        transition: none;
    }

    .button-lg:hover,
    .button-lg:hover i {
        transform: none;
    }
}

/* Job detail page */
.job-description {
    padding: 24px;
    line-height: 1.7;
}

.job-description p:first-child {
    margin-top: 0;
}

.job-description p:last-child {
    margin-bottom: 0;
}

/* Formatting from the Markdown job description */
.job-description code,
.job-description-body code {
    padding: 1px 4px;
    border-radius: 4px;
    background: #f1f3f5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.job-description h3,
.job-description-body h3,
.job-description h4,
.job-description-body h4 {
    margin: 1.5em 0 0.5em;
    color: var(--heading);
}

.job-description ul,
.job-description-body ul,
.job-description ol,
.job-description-body ol {
    padding-left: 1.5em;
}

.job-description li + li,
.job-description-body li + li {
    margin-top: 0.25em;
}

.job-description blockquote,
.job-description-body blockquote {
    margin: 1em 0;
    padding-left: 16px;
    border-left: 3px solid var(--border);
    color: var(--muted);
}

.job-description hr,
.job-description-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5em 0;
}

.job-description > :first-child,
.job-description-body > :first-child {
    margin-top: 0;
}

.job-description > :last-child,
.job-description-body > :last-child {
    margin-bottom: 0;
}

.apply-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 24px;
}

.apply-cta p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 575.98px) {
    .apply-cta .button-lg {
        width: 100%;
        justify-content: center;
    }
}

/* Collapsible job description on the apply page */

.job_desc {
    margin-bottom: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.job_desc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    font-family: var(--font-menu);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--heading);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

/* Hide the browser's default triangle (Safari uses the -webkit marker) */
.job_desc summary::-webkit-details-marker {
    display: none;
}

/* Chevron that rotates when opened */
.job_desc summary::after {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.job_desc[open] summary::after {
    transform: rotate(-135deg);
}

.job_desc summary:hover {
    color: var(--brand);
}

.job_desc summary:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.job_desc[open] summary {
    border-bottom: 1px solid var(--border);
}

.job_desc > :not(summary) {
    margin: 16px 0;
    padding: 0 20px;
    line-height: 1.7;
}

/* Application form */

/* One form split across several cards: <form> wraps <section class="card form-section"> boxes */
.form-section {
    padding: 24px;
    margin-bottom: 24px;
}

.form-section h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
}

/* Text field labels: sit on their own line above the input */
.formentry {
    display: block;
    margin: 18px 0 6px;
    font-weight: 700;
    color: var(--heading);
}

.formentry:first-child,
.form-section h3 + .formentry,
.form-section h3 + fieldset {
    margin-top: 0;
}

.application_form input[type="text"],
.application_form input[type="email"],
.application_form input[type="tel"],
.application_form input[type="date"],
.application_form input[type="month"],
.application_form select,
.application_form textarea {
    display: block;
    width: 100%;
    max-width: 480px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.application_form input:focus,
.application_form select:focus,
.application_form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(52, 100, 235, 0.2);
}

/* Yes/No questions */
.application_form fieldset {
    margin: 24px 0 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.application_form legend {
    margin-bottom: 8px;
    padding: 0;
    font-weight: 700;
    color: var(--heading);
}

.section-intro {
    margin: 0 0 8px;
    color: var(--muted);
}

/* Fields side by side on wide screens, stacked on phones */
.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    max-width: 640px;
}

.field-row .formentry {
    margin-top: 18px;
}

.field-row input,
.application_form .field-row select {
    max-width: none;
}

/* City | State | ZIP */
.address-row {
    grid-template-columns: 2fr 1.4fr 1fr;
}

.field-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

/* A label wrapped in .field is still spaced from the field above it */
.field > .formentry:first-child {
    margin-top: 18px;
}

/* Employment history: one block per employer */
.application_form fieldset.employer {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fcfcfc;
}

.application_form fieldset.employer legend {
    padding: 0 6px;
    margin-left: -6px;
    font-family: var(--font-menu);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand);
}

.employer > legend + .field-row .formentry {
    margin-top: 0;
}

/* Line single fields up with the two-column rows */
.application_form .employer input,
.application_form .employer textarea {
    max-width: 640px;
}

.button-secondary {
    margin-top: 16px;
    background: #fff;
    color: var(--brand);
    border: 1px dashed var(--brand);
}

.button-secondary:hover {
    background: #e8eefd;
    color: var(--brand-dark);
}

@media (max-width: 575.98px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .employer > legend + .field-row .field + .field .formentry {
        margin-top: 18px;
    }

    /* City on its own line, State and ZIP side by side */
    .address-row {
        grid-template-columns: 1.4fr 1fr;
    }

    .address-row .field:first-child {
        grid-column: 1 / -1;
    }
}

/* Radio labels wrap their input: show them side by side as clickable options */
.formentry:has(input[type="radio"]),
.formentry:has(input[type="checkbox"]) {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 8px 8px 0;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
}

.formentry:has(input[type="radio"]):hover,
.formentry:has(input[type="checkbox"]):hover {
    border-color: var(--brand);
}

.formentry:has(input:checked) {
    border-color: var(--brand);
    background: #e8eefd;
    color: var(--brand-dark);
    font-weight: 700;
}

/* Hide the radio/checkbox circle but keep the input working: still clickable through the label,
   reachable by keyboard, read by screen readers, and validated (display: none would break all of that). */
.formentry input[type="radio"],
.formentry input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

/* The input is invisible, so show keyboard focus on the label instead */
.formentry:has(input:focus-visible) {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Long options with a description: stack them full width instead of side by side */
.option-list .formentry:has(input) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    margin: 0 0 8px;
    padding: 12px 16px;
}

.option-title {
    font-weight: 700;
    color: var(--heading);
}

.option-desc {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted);
}

.formentry:has(input:checked) .option-title {
    color: var(--brand-dark);
}

/* Voluntary self-identification: visibly set apart from the application itself */

.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 24px;
    font-family: var(--font-menu);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

.form-divider span {
    max-width: 70%;
}

.form-divider::before,
.form-divider::after {
    content: "";
    flex: 1;
    min-width: 24px;
    border-top: 2px dashed #ccc;
}

.form-section-voluntary {
    background: #fafafa;
    border: 1px dashed #bbb;
    box-shadow: none;
}

.form-section-voluntary h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e5e5e5;
    color: #555;
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.voluntary-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-left: 4px solid #2e7d4f;
    border-radius: 6px;
    background: #eaf6ee;
    color: #24543a;
}

.voluntary-notice i {
    font-size: 22px;
    line-height: 1;
}

.voluntary-notice p {
    margin: 0;
}

/* Muted look for the options so they don't read as part of the application */
.form-section-voluntary .formentry:has(input) {
    background: #fff;
}

.form-section-voluntary .formentry:has(input:checked) {
    border-color: #777;
    background: #eee;
    color: var(--heading);
}

.form-section-voluntary .formentry:has(input:checked) .option-title {
    color: var(--heading);
}

/* Required legal wording (e.g. the VEVRAA invitation): readable but compact */
.legal-text {
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.legal-text p {
    margin: 0 0 10px;
}

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

.legal-text ul {
    margin: 0 0 10px;
    padding-left: 20px;
}

.legal-text li {
    margin-bottom: 6px;
}

.legal-text li ul {
    margin: 6px 0 0;
}

.option-list .legal-text + .formentry {
    margin-top: 4px;
}

.formentry .tag {
    margin-left: 8px;
    vertical-align: 1px;
}

/* File upload */
.application_form input[type="file"] {
    display: block;
    width: 100%;
    max-width: 480px;
    padding: 10px;
    border: 1px dashed #bbb;
    border-radius: 6px;
    background: #fafafa;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.application_form input[type="file"]:hover {
    border-color: var(--brand);
}

.application_form input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--brand-dark);
    color: #fff;
    font-family: var(--font-menu);
    font-weight: 700;
    cursor: pointer;
}

.application_form input[type="file"]:hover::file-selector-button {
    background: var(--brand);
}

/* Red * on required fields. Driven by the required attribute, so it stays accurate when
   conditional-fields.js turns a follow-up question's "required" on or off. Screen readers
   already announce "required" from the attribute, so the star itself is hidden from them. */
.formentry:has(+ input[required], + select[required], + textarea[required])::after,
fieldset:has(input[required]) > legend::after {
    content: " *";
    content: " *" / "";
    color: #c62828;
    font-weight: 700;
}

.required-mark {
    color: #c62828;
    font-weight: 700;
}

.required-note {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
}

/* reCAPTCHA widget above the submit button */
.g-recaptcha {
    margin-bottom: 24px;
}

/* Expired / error message under the reCAPTCHA box */
.captcha-status {
    max-width: 480px;
    margin: -12px 0 24px;
    padding: 10px 14px;
    border-left: 4px solid #c62828;
    border-radius: 6px;
    background: #fdecec;
    color: #7f1d1d;
    font-size: 14px;
}

/* Errors after a failed submit */
.form-errors {
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 1px solid #f1b5b5;
    border-left: 4px solid #c62828;
    border-radius: var(--radius);
    background: #fdecec;
    color: #7f1d1d;
}

.form-errors:focus {
    outline: 2px solid #c62828;
    outline-offset: 2px;
}

.form-errors h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #7f1d1d;
}

.form-errors ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.form-errors p {
    margin: 0;
    font-size: 13px;
}

.application_form [aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.formentry:has(input[aria-invalid="true"]) {
    border-color: #c62828;
}

/* Thank-you page */
.thanks {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

.thanks > i {
    font-size: 48px;
    color: #2e7d4f;
}

.thanks h2 {
    margin: 12px 0;
}

.thanks .button-lg {
    margin-top: 12px;
}

/* Footer */

.site-footer {
    background: var(--footer-bg);
    color: #ccc;
    border-top: 5px solid rgba(0, 0, 0, 0.2);
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    display: block;
    height: 80px;
    width: auto;
    margin-bottom: 16px;
}

.site-footer address {
    font-style: normal;
}

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

.footer-copy {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    padding: 20px 0;
}

.footer-copy a {
    color: rgba(255, 255, 255, 0.7);
}

/* Tablets and phones: the main site drops the dividers and stacks the header */

@media (max-width: 991px) {
    .site-header {
        position: static;
    }

    .site-nav {
        align-self: center;
    }

    .header-main {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding-top: 12px;
        padding-bottom: 4px;
        gap: 4px;
    }

    .logo img {
        height: 70px;
    }

    .site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-nav li::after {
        display: none;
    }

    .site-nav a {
        padding: 10px 12px;
        border-top: 0;
    }

    .site-nav a:hover,
    .site-nav a.current {
        background-color: transparent;
        color: var(--brand);
        text-shadow: none;
    }

    .top-bar .container {
        justify-content: center;
        text-align: center;
    }

    .top-bar-links {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .site-nav a {
        padding: 10px 8px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .hero {
        padding: 36px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 24px;
    }

    /* Stack the job table into cards */
    .job-table thead {
        display: none;
    }

    .job-table, .job-table tbody, .job-table tr, .job-table td {
        display: block;
        width: 100%;
    }

    .job-table tr {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }

    .job-table tbody tr:last-child {
        border-bottom: none;
    }

    .job-table td {
        padding: 2px 0;
        border: none;
    }

    .job-table td[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-size: 13px;
    }
}
