/* ============================================================
   Quality Viewership Initiative (QVI)
   Shared stylesheet
   Conservative institutional design, desktop-first.
   Intended to look consistent with a site maintained since 2015.
   No external dependencies. Web-safe / system fonts only.
   ============================================================ */

/* ---- Base / reset (light touch) ---- */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #2b2b2b;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

a {
    color: #2a5d8f;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

/* Visible keyboard focus for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #2a5d8f;
    outline-offset: 1px;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #1b3a5b;
    font-weight: normal;
    line-height: 1.25;
    margin: 0 0 0.5em 0;
}

h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

p {
    margin: 0 0 1em 0;
}

ul, ol {
    margin: 0 0 1em 0;
    padding-left: 1.4em;
}

/* ---- Layout container ---- */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   HEADER + NAVIGATION
   ============================================================ */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #1b3a5b;
}

.header-inner {
    padding-top: 14px;
    padding-bottom: 0;
}

/* Wordmark (CSS text logo, no external asset) */
.brand {
    display: inline-block;
    padding: 4px 0 10px 0;
    color: #1b3a5b;
    text-decoration: none;
}

.brand:hover,
.brand:focus {
    text-decoration: none;
}

.brand-mark {
    display: inline-block;
    background: #1b3a5b;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 1px;
    padding: 4px 9px;
    vertical-align: middle;
    margin-right: 10px;
}

.brand-name {
    display: inline-block;
    vertical-align: middle;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 20px;
    color: #1b3a5b;
}

/* Navigation bar */
.nav-toggle {
    display: none; /* only shown on small screens when JS is available */
    float: right;
    margin: -44px 0 8px 0;
    padding: 6px 12px;
    background: #1b3a5b;
    color: #ffffff;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.site-nav {
    background: #1b3a5b;
    margin: 0 -20px; /* bleed nav bar to container edges */
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-nav li {
    display: inline-block;
}

.site-nav a {
    display: block;
    color: #eef2f6;
    padding: 11px 16px;
    font-size: 14px;
    text-decoration: none;
    border-right: 1px solid #2c4d70;
}

.site-nav a:hover,
.site-nav a:focus {
    background: #2a5d8f;
    color: #ffffff;
    text-decoration: none;
}

.site-nav a.active {
    background: #2a5d8f;
    color: #ffffff;
    font-weight: bold;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
main {
    padding: 26px 0 40px 0;
}

.page-title {
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 10px;
    margin-bottom: 22px;
}

section {
    margin-bottom: 30px;
}

/* Sub-page intro paragraph */
.lead {
    font-size: 16px;
    color: #3a3a3a;
}

/* Light panel used for boxed sections */
.panel {
    background: #f4f6f8;
    border: 1px solid #d7dde3;
    padding: 18px 20px;
}

.panel h2,
.panel h3 {
    margin-top: 0;
}

/* ---- Hero (deliberately restrained) ---- */
.hero {
    background: #f4f6f8;
    border: 1px solid #d7dde3;
    border-top: 3px solid #2a5d8f;
    padding: 24px 26px;
    margin-bottom: 30px;
}

.hero h1 {
    margin-top: 0;
    font-size: 27px;
}

.hero p {
    max-width: 720px;
}

.btn {
    display: inline-block;
    background: #2a5d8f;
    color: #ffffff;
    padding: 8px 16px;
    border: 1px solid #1b3a5b;
    font-size: 14px;
    text-decoration: none;
}

.btn:hover,
.btn:focus {
    background: #1b3a5b;
    color: #ffffff;
    text-decoration: none;
}

/* ---- Two/three column helpers ---- */
.row {
    display: block;
    overflow: hidden; /* contain floated columns */
    margin: 0 -12px;
}

.col {
    float: left;
    padding: 0 12px;
    margin-bottom: 12px;
}

.col-2 { width: 50%; }
.col-3 { width: 33.33%; }

.row:after {
    content: "";
    display: table;
    clear: both;
}

/* Bordered info card (kept square/plain, not "startup" rounded) */
.card {
    border: 1px solid #d7dde3;
    background: #ffffff;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.card h3 {
    margin-top: 0;
    border-bottom: 1px solid #e4e8ec;
    padding-bottom: 6px;
}

/* ============================================================
   FEEDBACK LOOP DIAGRAM (HTML/CSS only)
   ============================================================ */
.loop {
    text-align: center;
    margin: 10px 0 4px 0;
}

.loop .step {
    display: inline-block;
    vertical-align: middle;
    background: #ffffff;
    border: 1px solid #2a5d8f;
    color: #1b3a5b;
    padding: 10px 14px;
    margin: 4px 2px;
    font-size: 14px;
    min-width: 130px;
}

.loop .arrow {
    display: inline-block;
    vertical-align: middle;
    color: #2a5d8f;
    font-size: 18px;
    padding: 0 4px;
}

/* ---- Timeline ---- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 3px solid #2a5d8f;
}

.timeline li {
    padding: 4px 0 14px 16px;
    margin-left: 4px;
}

.timeline .year {
    font-weight: bold;
    color: #1b3a5b;
    display: block;
}

/* ============================================================
   TABLES (membership etc.)
   ============================================================ */
table.data {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16px;
    font-size: 14px;
}

table.data caption {
    text-align: left;
    color: #555;
    padding-bottom: 6px;
}

table.data th,
table.data td {
    border: 1px solid #d0d7de;
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}

table.data th {
    background: #eef2f6;
    color: #1b3a5b;
}

/* ============================================================
   FORMS
   ============================================================ */
form.qvi-form {
    max-width: 620px;
}

.form-row {
    margin-bottom: 14px;
}

.form-row label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.form-row .optional {
    font-weight: normal;
    color: #777;
    font-size: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #b9c2cc;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-note {
    font-size: 13px;
    color: #666;
    background: #f4f6f8;
    border: 1px solid #e0e5ea;
    padding: 10px 12px;
    margin-bottom: 14px;
}

button.submit,
input.submit {
    background: #2a5d8f;
    color: #ffffff;
    border: 1px solid #1b3a5b;
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
}

button.submit:hover,
input.submit:hover {
    background: #1b3a5b;
}

/* Members login block */
.login-box {
    max-width: 380px;
    border: 1px solid #d0d7de;
    background: #f7f9fb;
    padding: 20px;
    margin-top: 16px;
}

.notice {
    background: #fbf6e6;
    border: 1px solid #e6d9a8;
    padding: 12px 14px;
    font-size: 14px;
    margin: 14px 0;
    color: #5a4b1f;
}

/* status line for the demo members form (populated by script.js) */
.login-status {
    margin-top: 12px;
    font-size: 14px;
    min-height: 1.2em;
}

.login-status.error { color: #a12626; }
.login-status.ok { color: #1f6b34; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #eef1f4;
    border-top: 3px solid #1b3a5b;
    color: #45505c;
    font-size: 13px;
    padding: 22px 0 26px 0;
    margin-top: 20px;
}

.site-footer h4 {
    color: #1b3a5b;
    margin: 0 0 8px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 4px;
}

.footer-cols {
    overflow: hidden;
}

.footer-cols .fcol {
    float: left;
    width: 33.33%;
    padding-right: 20px;
}

.footer-org {
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #1b3a5b;
    font-size: 15px;
}

.copyright {
    clear: both;
    border-top: 1px solid #d7dde3;
    margin-top: 16px;
    padding-top: 12px;
    color: #6a7581;
    font-size: 12px;
}

/* ============================================================
   RESPONSIVE
   Site resembles a mid-2010s layout but remains mobile-usable.
   Nav wraps/stacks on small screens; with JS it can collapse.
   ============================================================ */
@media screen and (max-width: 720px) {

    body { font-size: 15px; }

    .brand-name { font-size: 17px; }

    /* Columns collapse to a single column */
    .col-2,
    .col-3 {
        float: none;
        width: 100%;
    }

    .footer-cols .fcol {
        float: none;
        width: 100%;
        padding-right: 0;
        margin-bottom: 16px;
    }

    /* Navigation stacks full width (fully usable without JavaScript) */
    .site-nav li {
        display: block;
    }

    .site-nav a {
        border-right: none;
        border-bottom: 1px solid #2c4d70;
    }

    /* Feedback loop arrows read better stacked on narrow screens */
    .loop .step {
        display: block;
        margin: 4px auto;
        max-width: 260px;
    }

    .loop .arrow {
        display: block;
        transform: rotate(90deg);
        padding: 2px 0;
    }

    /* Progressive enhancement: when JavaScript is enabled, show a
       "Menu" button and collapse the nav until it is pressed.
       Without JS the nav simply stays visible (see rules above). */
    html.js .nav-toggle {
        display: inline-block;
    }

    html.js .site-nav {
        display: none;
    }

    html.js .site-nav.open {
        display: block;
    }
}
