:root {
    --background_color: #172B3A;
    --control_color: #087F8C;
}

/* General Styles */
html, body {
  height: 100%;
  margin: 0;
}

body {
    /* font-family: Arial, sans-serif; */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Shared button typography and shape; size and colors belong to each feature. */
.site-button {
    font-family: inherit;
    font-weight: 600;
    line-height: 1.5;
    border-style: solid;
    border-radius: 8px;
    cursor: pointer;
}

/* Logo Styling */
.logo {
    height: 44px;
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* Barnfish Title */
h1 {
    flex: 1;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
}
/* Navigation Menu */
nav ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Main Content */
main {
    padding: 40px;
    text-align: center;
    flex: 1;   /* pushes footer down */
}

form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #f4f4f4;
    border-radius: 8px;
}

label {
    display: block;
    margin: 10px 0 5px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


/* Flexbox to align logo, title, and menu */
.header-container {
    display: flex;
    align-items: center;
    gap: 16px;
    /* justify-content: space-between; */
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
header.site-head-foot {
    position: relative;
    background-color: var(--background_color) !important;
    color: white;
    padding: 20px, 32px;
    text-align: center;
}

/* Footer */
footer.site-head-foot {
    position: relative;
    background-color: var(--background_color);
    color: white;
    text-align: center;
    padding: 0px;
    bottom: 0;
    width: 100%;
}

.site-head-foot button {
    display: block;
    width: 100%;
    background-color: var(--background_color);
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.site-head-foot button:hover {
    background-color: #003366;
}

/* Put navigation on a second row on smaller screens */
@media (max-width: 900px) {
    header.site-head-foot {
        padding: 16px 20px;
    }

    .header-container {
        flex-wrap: wrap;
    }

    .header-container h1 {
        font-size: 24px;
    }

    .header-container nav {
        width: 100%;
    }
}

/* Reusable password gate styles. */
.docs-auth {
    display: grid;
    gap: 10px;
    margin: 0 20px 18px;
    padding: 12px;
    min-width: 0;
    border: 1px solid #dce4e8;
    border-radius: 12px;
    background: #edf1f4;
    text-align: left;
}
.docs-auth label { margin: 0; font-size: 13px; font-weight: 600; }
.docs-auth input { box-sizing: border-box; min-width: 0; width: 100%; margin: 0; }
.docs-auth [hidden] { display: none; }
.docs-auth-status { margin: 0; color: #52616b; font-size: 13px; line-height: 1.5; }
.docs-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.docs-controls:disabled input,
.docs-controls:disabled button { opacity: .5; cursor: not-allowed; }

.password-gate-dialog {
    width: min(380px, calc(100vw - 40px));
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid #dce4e8;
    border-radius: 12px;
    color: #172b3a;
}
.password-gate-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.password-gate-dialog .docs-auth { margin: 0; }
.password-gate-dialog label { display: grid; gap: 8px; }
.password-gate-dialog button { padding: 9px 12px; cursor: pointer; }
.password-gate-dialog [hidden] { display: none; }
