:root {
    /* Colors – Light Mode */
    --brand-color: rgb(127, 21, 23);
    --dark-header-bg: #f2f2f2;
    /* soft off-white */
    --header-text-color: #f8f3f3;
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #5f6368;
    --color-border: #dcdcdc;
    --color-primary: #005fcc;
    --color-thumb: #1a1a1a;
    /* Summons card panels (WHEN / REPORT TO) */
    --sc-panel-bg: #ffffff;
    --sc-panel-border: #e3e1e0;
    --sc-panel-text: #2b2b2b;
    --sc-panel-muted: #6b6663;
    /* Surface */
    --color-surface: #f1f3f5;
    /* header / panels */
    --color-surface-strong: #e9ecef;
    /* Typography */
    --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.5;
/*     Spacing (4pt scale) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 2.5rem;
    --space-7: 3rem;
    /* Layout */
    --content-max-width: 75rem;
    /* ~960px */
    --content-padding: 1rem;
    /* Navigation */
    --nav-height: 64px;
    /* Focus */
    --focus-ring-dark-surface: 0px 0px 3px rgba(255, 255, 0, .95);
    --focus-ring-light-surface: 0 0 0 3px rgba(255, 69, 0, 0.95);
    --focus-outline-dark: 3px solid rgba(17, 17, 17, 0.95); /* for light surfaces */
    --focus-outline-light: 3px solid rgba(255, 255, 255, 0.95); /* for dark surfaces */
    --focus-color: #ffffff;
    --action-bg: var(--brand-color);
    --action-text: #ffffff;
}

/* baseline: applies everywhere unless overridden */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid transparent;
    outline-offset: 3px;
    box-shadow: var(--focus-ring-light-surface);
    border-radius: 6px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
    /*  top: 0;*/
}

    #main-content:has(.login-page),
    #main-content:has(.home-hero) {
        max-width: none;
        margin: 0;
        padding: 0;
    }

html[data-theme="light"] {
    --sc-panel-bg: #ffffff;
    --sc-panel-border: #e3e1e0;
    --sc-panel-text: #2b2b2b;
    --sc-panel-muted: #6b6663;
    --color-bg: #ffffff;
    --color-surface: #f1f3f5;
    --header-text-color: #f8f3f3;
    --color-surface-strong: #e9ecef;
    --color-thumb: #1a1a1a;
    --color-text: #1a1a1a;
    --color-muted: #5f6368;
    --color-border: #dcdcdc;
    --color-primary: #005fcc;
    --focus-color: #111111;
    --focus-ring: #005fcc;
    --focus-ring-dark-surface: 0 0 0 3px rgba(255, 255, 0, 0.95);
    --focus-ring-light-surface: 0 0 0 3px rgba(255, 69, 0, 0.95);
}

    html[data-theme="light"] .site-header,
    html[data-theme="light"] .site-footer {
        border-color: rgba(0, 0, 0, 0.15);
    }

    html[data-theme="light"] .theme-switch-track {
        background-color: var(--color-border);
        border: solid 1px var(--color-muted);
    }

    html[data-theme="light"] .theme-switch-thumb {
        background-color: var(--color-thumb);
        left: 1.5px;
    }

    html[data-theme="light"] .sun {
        opacity: 1;
    }

    html[data-theme="light"] .moon {
        opacity: .3;
        color: var(--header-text-color);
    }

    html[data-theme="light"] .site-header a:focus-visible,
    html[data-theme="light"] .site-header button:focus-visible,
    html[data-theme="light"] .site-footer a:focus-visible,
    html[data-theme="light"] .site-footer button:focus-visible {
        outline: 2px solid transparent;
        outline-offset: 3px;
        box-shadow: var(--focus-ring-dark-surface);
    }

    html[data-theme="light"] .nav-menu a:focus-visible,
    html[data-theme="light"] .nav-menu button:focus-visible {
        outline: 2px solid transparent;
        outline-offset: 3px;
        box-shadow: var(--focus-ring-dark-surface);
    }

html[data-theme="light"] .faq-category:focus-visible,
html[data-theme="light"] .faq-question:focus-visible,
html[data-theme="light"] .input :focus-visible {
    box-shadow: inset var(--focus-ring-light-surface);
    border-radius: 10px;
}

html[data-theme="dark"] {
    /* Summons panels in dark mode. The red and navy accent bars stay as they are
       -- they read fine against a dark panel and they are brand colours. */
    --sc-panel-bg: #23262b;
    --sc-panel-border: #3a3d43;
    --sc-panel-text: #f0eeec;
    --sc-panel-muted: #a9a49f;
    --color-bg: #191919;
    --color-surface: #2d2925;
    --color-surface-strong: #2a2a2a;
    --header-text-color: #0b0909;
    --color-thumb: #f1f1f1;
    --color-text: #f1f1f1;
    --color-muted: #a1a1a1;
    --color-border: #2a2a2a;
    --color-primary: #4d9cff;
    --action-bg: #f2f2f2;
    --action-text: #f2f2f2;
    --focus-color: #f2f2f2;
    --focus-ring: 0 0 0 3px var(--focus-color);
    --focus-ring-dark-surface: 0 0 0 3px rgba(255, 255, 0, 0.95);
    --focus-ring-light-surface: 0 0 0 3px rgba(255, 69, 0, 0.95);
}

    html[data-theme="dark"] .site-header,
    html[data-theme="dark"] .site-footer {
        background: linear-gradient(to right, color-mix(in srgb, var(--dark-header-bg) 96%, black), var(--dark-header-bg), color-mix(in srgb, var(--dark-header-bg) 96%, white));
        color: var(--header-text-color);
        border-color: rgba(255, 255, 255, 0.15);
    }

    html[data-theme="dark"] .theme-switch-track {
        background-color: var(--color-surface);
        border: solid 1px var(--color-text);
    }

    html[data-theme="dark"] .theme-switch-thumb {
        transform: translateX(28px);
        background-color: var(--color-thumb);
    }


    html[data-theme="dark"] .sun {
        opacity: 0.3;
    }

    html[data-theme="dark"] .moon {
        opacity: 1;
    }

    html[data-theme="dark"] .site-header a:focus-visible,
    html[data-theme="dark"] .site-header button:focus-visible,
    html[data-theme="dark"] .site-footer a:focus-visible,
    html[data-theme="dark"] .site-footer button:focus-visible {
        outline: 2px solid transparent;
        outline-offset: 3px;
        box-shadow: var(--focus-ring-light-surface);
    }

    html[data-theme="dark"] .faq-category:focus-visible,
    html[data-theme="dark"] .faq-question:focus-visible,
    html[data-theme="dark"] .input :focus-visible {
        box-shadow: inset var(--focus-ring-light-surface);
        border-radius: 10px;
    }

    html[data-theme="dark"] .nav-menu a:focus-visible,
    html[data-theme="dark"] .nav-menu button:focus-visible {
        outline: 2px solid transparent;
        outline-offset: 3px;
        box-shadow: var(--focus-ring-light-surface);        
    }

.theme-switch {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}


.theme-switch-track {
    position: relative;
    width: 62px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px;
    transition: opacity 0.3s 0.3s ease;
}

.switch-icon {
    height: 14px;
    width: 14px;
    fill: none;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease stroke 0.3s ease;
}


.theme-switch-thumb {
    width: 26px;
    height: 26px;
    background-color: var(--color-thumb);
    border-radius: 50%;
    position: absolute;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.switch-icon.sun {
    height: 18px;
    width: 18px;
}

.switch-icon.moon {
    fill: currentColor;
    stroke: currentColor;
    height: 18px;
    width: 18px;
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-bg);
}

    body.menu-open {
        overflow: hidden;
    }

.site-header {
    position: fixed;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: linear-gradient(to right, color-mix(in srgb, var(--brand-color) 85%, black), var(--brand-color), color-mix(in srgb, var(--brand-color) 96%, white));
    color: var(--header-text-color);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    padding-block: 0.5rem;

    height: var(--nav-height);
    padding-inline: var(--content-padding);
}

    .site-header,
    .site-header .nav,
    .site-header .nav-menu {
        overflow: visible;
    }

        .site-header .nav-menu a {
            padding: 0.5rem 0.75rem; /* increases click + focus area */
            border-radius: 8px; /* makes the focus ring look intentional */
        }

        .site-header a,
        .site-footer a {
            color: inherit;
        }

        .site-header svg,
        .site-footer svg {
            fill: currentColor;
        }

        .site-header a:focus-visible,
        .site-footer a:focus-visible,
        .site-header button:focus-visible,
        .site-footer button:focus-visible {
            outline: 2px solid transparent;
            outline-offset: 3px;
            box-shadow: var(--focus-ring-light-surface);
            border-radius: 6px;
        }

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--nav-height);
    padding: 0 1rem;
}

.site-title {
    color: var(--header-text-color);
    font-size: 1.25rem;
    font-weight: 600;
}


.nav-toggle {
    color: var(--header-text-color);
    right: 1rem;
    top: 0.75rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    gap: var(--space-4);
    display: none;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--color-bg);
    overflow-y: auto;
    z-index: 999;
}

    .nav-menu.is-open {
        display: flex;
    }

.nav-menu[hidden] {
    display: none !important;
}

.nav-menu li {
    border-top: 1px solid var(--color-border);
    padding-top: .75rem;
}

.nav-menu a,
.nav-menu button {
    display: block;
    padding: var(--space-2) var(--space-3);
    min-height: 55px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 1.50rem;
    font-weight: 600;
}

a,
button {
    font: inherit;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-weight: 600;
    margin-top: var(--space-4);
    padding: 0.75rem 1.25rem;
    background-color: var(--color-primary);
    color: var(--action-text);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid transparent;
}

    .primary-action:hover {
        text-decoration: underline;
    }

@media (hover: hover) {

    .primary-action:hover,
    .login-button:hover {
        filter: brightness(1.25);
        text-decoration: none;
    }
}

.primary-action:focus-visible,
.login-button:focus-visible,
button.primary-action:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 3px;
    box-shadow: var(--focus-ring-light-surface);
    border-color: currentColor;
}

.status-button {
    font-weight: 600;
    color: var(--color-primary);
}

.header-image {
    display: block;
    margin: 1.25rem auto;
    margin-bottom: var(--space-4);
    max-width: 220px;
    height: auto;
}

main {
    max-width: var(--content-max-width);
    margin: calc(var(--nav-height) + 1rem) auto 0;
    padding: 1rem var(--content-padding) 2rem;
    padding-top: 0;
}

    .main > * + * {
        margin-top: 2rem;
    }

.home-page-header,
.home-page-access {
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
    text-align: center;
}

    .home-page-header h1,
    .home-page-header h2,
    .home-page-access h2 {
        text-align: center;
    }
    .home-page-header .welcome-title {
        margin: 0 0 1rem 0;
    }

    .home-page-header .header-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-page-header .header-image {
        order: -1;
        justify-self: center;
        height: auto;
    }

    .home-page-header .header-text {
        text-align: center;
        
    }

        .home-page-header .header-text p {
            margin: 0.25rem 0;
            font-size: 1rem;
        }

#main-content h1[tabindex="-1"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

.home #main-content h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.home-page-header p,
.home-page-access p {
    text-align: left;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    margin: 0.5rem auto;
}

section > * + * {
    margin-top: 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

h2 {
    font-size: 1.50rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
}

h1,
h2,
h3 {
    color: var(--color-text);
}

p {
    margin-bottom: var(--space-3);
}

.site-footer {
    background: linear-gradient(to right, color-mix(in srgb, var(--brand-color) 85%, black), var(--brand-color), color-mix(in srgb, var(--brand-color) 96%, white));
    color: var(--header-text-color);
    padding: 0.85rem 1rem;
    margin: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--color-border);
    z-index: 900;
}

/* The footer previously held a single link, so neither child was styled. With more than
   one, the links need separating and pushing to the right or they run together. */
.site-footer-copy {
    margin-right: auto;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 560px) {
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
    .site-footer-copy { margin-right: 0; }
    .site-footer-links { justify-content: flex-start; }
}

main.login-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* =========================
   Login Page
   ========================= */

.login-shell {
    margin-top: var(--nav-height);
    display: grid;
    grid-template-columns: 1fr;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--color-bg);
}

.login-card {
    display: flex;
    flex-direction: column; 
    width: 100%;
    max-width: 520px;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: .75rem;
}

.login-logo {
    max-width: 150px;
    height: auto;
}

.client-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.client-sub {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.county-title {
    font-size: 1.25rem;
    font-weight: 600;
}

    .county-title p {
        margin: 0;
    }

.county-info {
    margin: 0;
    margin-top: 0;
}

.login-instructions {
    margin: 0;
}

.login-form {
    display: grid;
    gap: 0.75rem;
}

.field {
    display: grid;
    gap: 0.375rem;
}

#jurorIdHelp {
    display: none;
}

#eSignatureHelp {
    display: none;
}

.login-page label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.login-page .input,
.login-page select {
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
}

    .login-page .input:focus-visible,
    .login-page select:focus-visible {
        box-shadow: var(--focus-ring-light-surface);
    }

.help-text {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

.login-page .dob-selects {
    display: flex;
    gap: 0.75rem;
}

.login-page .dob-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.login-page .dob-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-align: center;
    color: var(--color-muted);
}

.login-alert {
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(180, 0, 0, 0.35);
    background: rgba(180, 0, 0, 0.1);
}

/* =========================
   FAQ Page
   ========================= */

.faq-page {
    max-width: var(--content-max-width);
    margin-inline: auto;
}

.faq-hero {
    text-align: center;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
}

.faq-client-logo {
    display: block;
    margin: 0 auto var(--space-2);
    max-width: 160px;
    height: auto;
}

.faq-client-name {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-muted);
}

.faq-category-select {
    display: block;
    margin-bottom: var(--space-3);
}

.faq-category-select-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.faq-category-select-control {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

    .faq-category-select-control:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring-light-surface);
    }

.faq-category-buttons {
    display: none;
}

.faq-categories {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-3);
    margin-bottom: var(--space-4);
}

.faq-category {
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

    .faq-category.is-active {
        border-color: var(--color-primary);
        border-color: color-mix( in srgb, var(--color-primary) 60%, var(--color-border) 40% );
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
        box-shadow: 0 0 0 2px color-mix( in srgb, var(--color-primary) 25%, transparent );
    }
    .faq-category:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--focus-ring-light-surface);
    }

.faq-question:focus-visible {
    outline: none;
}

.faq-section-title {
    margin-top: var(--space-4);
}

.faq-accordion {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-bg);
}

.faq-item {
    border-top: 1px solid var(--color-border);
}

    .faq-item:first-child {
        border-top: none;
    }

.faq-question {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: 1rem;
    background: var(--color-bg);
    color: var(--color-text);
    border: 0;
    cursor: pointer;
    text-align: left;
}

.faq-question-text {
    font-weight: 600;
}

/* Hover highlight on desktop only (and only where hover exists) */
@media (hover: hover) and (min-width: 768px) {
    .faq-question:hover {
        background: color-mix(in srgb, var(--color-surface) 65%, transparent);
    }
}

.faq-answer {
    background: var(--color-surface);
}

    .faq-answer:focus-visible {
        outline: 2px solid transparent;
        outline-offset:3px;
/*        box-shadow: var(--focus-ring-light-surface); */
    }

.faq-answer-inner {
    padding: 1rem 1rem 1rem 1rem;
    color: var(--color-text);
}

    .faq-answer-inner a {
        color: var(--color-primary);
    }

    .faq-answer-inner p:first-child {
        margin-top: 0;
    }

    .faq-answer-inner ul {
        margin-left: 1.25rem;
    }

.faq-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .faq-icon svg {
        width: 28px;
        height: 28px;
        display: block;
    }

.faq-question[aria-expanded="false"] .faq-icon-circle {
    fill: var(--color-text);
}

.faq-question[aria-expanded="false"] .faq-icon-line {
    stroke: var(--color-bg);
}

.faq-icon-line {
    stroke-linecap: round;
}

.faq-question[aria-expanded="true"] .faq-icon-circle {
    fill: var(--color-bg);
    stroke: var(--color-text);
}

.faq-question[aria-expanded="true"] .faq-icon-line {
    stroke: var(--color-text);
}

.faq-question[aria-expanded="true"] .faq-icon-v {
    opacity: 0;
}

/*Mobile Media Query*/
@media (max-width: 767px) {
    .nav-menu.is-open {
        display: flex;
        flex-direction: column;
    }

    .nav-login {    
        margin-top:0;
        padding-top: var(--space-4);
        display:flex;
        justify-content: center;
    }

    .nav-login-link {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        width:100%;
        max-width: 24rem;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        background: var(--color-primary);
        color: var(--action-text) !important;
        text-decoration: none;
        font-weight: 700;
        box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    }

        .nav-login-link:hover {
            text-decoration: none;
        }

        .nav-login-link:focus-visible {
            outline: 2px solid transparent;
            outline-offset: 3px;
            box-shadow: var(--focus-ring-l  -surface);
        }
}

/*Desktop Media Query*/
@media (min-width: 768px) {
    /* =========================
   Header/Navigation
   ========================= */
    .nav-toggle {
        display: none;
    }

    .nav-menu[hidden] {
        display: flex !important;
    }

    .nav-menu {
        position: static;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        height: 100%;
        width: auto;
        padding: 0%;
        margin-left: 0;
        background: none;
    }

        .nav-menu li {
            padding: 0;
        }

        .nav-menu a {
            color: var(--header-text-color);
            text-decoration: none;
            font-size: 1.125rem;
        }

            .nav-menu a[aria-current="page"] {
                font-weight: 600;
                background-color: var(--color-bg);
                color: var(--color-text);           
                border-radius: 15px;
                
            }

            .nav-menu a:focus-visible,
            .nav-menu button:focus-visible {
                outline: 2px solid transparent;
                outline-offset: 3px;
                box-shadow: var(--focus-ring-dark-surface);
            }

        .nav-menu a,
        .nav-menu button {
            display: flex;
            align-items: center;
            height: 100%;
            padding: 0 var(--space-3);
        }

        .nav-menu li {
            border: none;
        }

    /* =========================
   HomePage
   ========================= */
    .header-content {
        max-width: 43rem;
    }

    .home-page-header .header-content {
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 1rem;
        align-items:center;
    }

    .home-page-header .header-image {
        order: 0;
        justify-self: end; 
    }

    .home-page-header .header-text {
        text-align: left;
    }

        .home-page-header .header-text p {
            font-size: 1.20rem;
        }

        /* =========================
   Desktop Login Page
   ========================= */
        .login-shell {
            grid-template-columns: minmax(320px, 25%) 1fr;
        }

    .login-card {
        max-width: 420px;
        padding: 1.125rem;
    }

    .login-visual {
        display: block;
        filter: blur(2px);
        position: relative;
        background-size: cover;
        background-position: center;
        border-left: 1px solid var(--color-border);
    }

    .visual-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient( to left, rgba(0,0,0,0.1), rgba(0,0,0,0.35) );
    }

    /* =========================
   Desktop FAQ Page
   ========================= */

    .faq-category-select {
        display: none;
    }

    .faq-category-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .faq-categories {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .faq-category {
        text-align: center;
    }
}

/* (Device dark-mode colours removed: the juror portal is light-themed only.) */

/* =========================
   Register / Verify-Email Pages (Phase 1)
   ========================= */

main.register-page,
main.verify-email-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.register-shell,
.verify-shell {
    margin-top: var(--nav-height);
    display: grid;
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem 3rem;
    background: var(--color-bg);
}

.register-card,
.verify-card {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.register-header h1,
.verify-card h1 {
    margin: 0 0 .35rem;
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--brand-color);
}

.register-subtitle {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.5;
}

.register-card .field { display: grid; gap: .35rem; }
.register-card label  { font-size: .9rem; font-weight: 600; color: var(--color-text); }

.register-card .input {
    padding: .75rem .85rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.4;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.register-card .input:hover { border-color: #b9b9b9; }
.register-card .input:focus-visible {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(127, 21, 23, .18);
}
.register-card .help-text { font-size: .8rem; color: var(--color-muted); }
.register-card .validation-message { color: #b30019; font-size: .85rem; margin-top: .15rem; }

.legal-section {
    margin: .5rem 0 0;
    padding: 1rem 1.1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.legal-section legend { padding: 0 .4rem; font-weight: 600; color: var(--brand-color); font-size: .95rem; }
.legal-section-intro { margin: 0 0 .5rem; color: var(--color-muted); font-size: .9rem; }

.legal-doc-block {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    overflow: hidden;
    transition: border-color .15s;
}
.legal-doc-block:has(.legal-doc-accept input:checked) {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 1px var(--brand-color) inset;
}
.legal-doc-summary {
    list-style: none; cursor: pointer;
    padding: .75rem 1rem;
    display: flex; align-items: center; gap: .6rem;
    font-weight: 500; user-select: none;
}
.legal-doc-summary::-webkit-details-marker { display: none; }
.legal-doc-summary::before {
    content: ""; width: 0; height: 0;
    border-left: 6px solid var(--brand-color);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform .15s ease;
    flex-shrink: 0;
}
.legal-doc-collapsible[open] .legal-doc-summary::before { transform: rotate(90deg); }
.legal-doc-title { font-weight: 600; }
.legal-doc-version { color: var(--color-muted); font-size: .8rem; font-weight: 400; }
.legal-doc-toggle-hint { margin-left: auto; color: var(--color-muted); font-size: .8rem; font-weight: 400; }
.legal-doc-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    max-height: 320px; overflow-y: auto;
    font-size: .95rem; line-height: 1.55;
}
.legal-doc-body h2, .legal-doc-body h3, .legal-doc-body h4 {
    color: var(--brand-color); margin-top: 1rem; margin-bottom: .35rem;
}
.legal-doc-body h2 { font-size: 1.1rem; }
.legal-doc-body h3 { font-size: 1rem; }
.legal-doc-body h4 { font-size: .92rem; }
.legal-doc-body p { margin: .5rem 0; color: var(--color-text); }
.legal-doc-loading { padding: .9rem 1rem; color: var(--color-muted); font-style: italic; }
.legal-doc-accept {
    display: flex; align-items: flex-start; gap: .55rem;
    padding: .7rem 1rem .85rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    cursor: pointer; font-size: .92rem; line-height: 1.4;
}
.legal-doc-accept input[type="checkbox"] {
    margin-top: 2px; accent-color: var(--brand-color);
    width: 1.05rem; height: 1.05rem; flex-shrink: 0;
}

.form-actions {
    display: flex; gap: .75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .4rem;
    padding: .7rem 1.25rem;
    border-radius: 10px;
    font-size: .95rem; font-weight: 600; line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    min-width: 120px;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}
.btn-primary:hover:not(:disabled) {
    background: rgb(108, 17, 19);
    border-color: rgb(108, 17, 19);
}
.btn-secondary {
    background: transparent;
    color: var(--brand-color);
    border-color: var(--brand-color);
}
.btn-secondary:hover:not(:disabled) {
    background: rgba(127, 21, 23, .07);
}
.btn-block { width: 100%; }
.btn-link {
    background: none; border: none;
    color: var(--brand-color);
    text-decoration: underline;
    cursor: pointer; padding: 0;
    font-size: .9rem; font-weight: 500;
}
.btn-link:disabled { color: var(--color-muted); cursor: not-allowed; }
.btn-link:hover:not(:disabled) { color: rgb(108, 17, 19); }

.alert {
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}
.alert h3 { margin: 0 0 .5rem; color: var(--brand-color); font-size: 1.15rem; }
.alert p  { margin: .5rem 0; line-height: 1.5; }
.alert-success {
    border-color: rgba(34, 113, 53, .35);
    background: rgba(34, 113, 53, .07);
}
.alert-success h3 {
    color: rgb(28, 95, 44);
    display: flex; align-items: center; gap: .5rem;
}
.alert-success h3::before {
    content: "✓";
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem;
    border-radius: 50%;
    background: rgb(34, 113, 53);
    color: #fff; font-size: 1rem;
    flex-shrink: 0;
}
.error-text { color: #b30019; margin: 0 0 1rem; }

.loader {
    width: 36px; height: 36px;
    border: 4px solid var(--color-border);
    border-top-color: var(--brand-color);
    border-radius: 50%;
    margin: 1.25rem auto 0;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn,
    .form-actions a.btn { width: 100%; }
}

/* =========================
   Login Page extras (Phase 2)
   ========================= */

.login-aux-links {
    margin: .25rem 0 .75rem;
    font-size: .9rem;
}
.login-aux-links a {
    color: var(--brand-color);
    text-decoration: none;
}
.login-aux-links a:hover { text-decoration: underline; }

.login-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    color: var(--color-muted);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.login-card .btn-block {
    width: 100%;
    margin-top: .5rem;
}

/* =========================
   MFA Pages (Phase 3)
   ========================= */

/* The 6-digit code field — large monospace, generous spacing */
.mfa-code-field { display: grid; gap: .35rem; }

.mfa-code-input {
    font-family: ui-monospace, "SF Mono", "Courier New", monospace !important;
    font-size: 1.6rem !important;
    letter-spacing: .5rem;
    text-align: center;
    padding: .85rem 1rem !important;
    /* Visually communicate "6 digits" by widening */
    max-width: 14rem;
    margin: 0 auto;
}

.mfa-aux-actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: .25rem;
    font-size: .9rem;
}
.mfa-aux-sep {
    color: var(--color-muted);
}

/* Method selection cards on /mfa-setup */
.mfa-method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    margin: .75rem 0;
    transition: border-color .15s, box-shadow .15s;
}
.mfa-method-card:hover {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 1px var(--brand-color) inset;
}
.mfa-method-card-body {
    flex: 1;
    min-width: 0;
}
.mfa-method-card-body strong {
    display: block;
    font-size: 1rem;
    margin-bottom: .25rem;
}
.mfa-method-card-body p {
    margin: 0;
    color: var(--color-muted);
    font-size: .9rem;
    line-height: 1.4;
}
.mfa-method-card .btn { min-width: 110px; }

@media (max-width: 480px) {
    .mfa-method-card {
        flex-direction: column;
        align-items: stretch;
    }
    .mfa-method-card .btn { width: 100%; }
    .mfa-code-input {
        font-size: 1.4rem !important;
        letter-spacing: .35rem;
        max-width: 100%;
    }
}

/* Recovery code display block — fixed-width, easy to read */
.recovery-codes {
    list-style: none;
    margin: .75rem 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .5rem 1.25rem;
}
.recovery-codes li {
    margin: 0;
    text-align: center;
}
.recovery-codes code {
    font-family: ui-monospace, "SF Mono", "Courier New", monospace;
    font-size: 1.05rem;
    letter-spacing: .12em;
    color: var(--color-text);
}


/* =========================
   Dashboard (Phase 4)
   ========================= */

main.dashboard-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.dashboard-shell {
    margin-top: var(--nav-height);
    padding: .9rem 1rem 3rem;
    background: var(--color-bg);
    min-height: calc(100vh - var(--nav-height));
}

.dashboard-header {
    max-width: 960px;
    margin: 0 auto 1.5rem;
}

.dashboard-header h1 {
    margin: 0 0 .25rem;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--brand-color);
}

.dashboard-subtitle {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.5;
}

.dashboard-grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dashboard-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-strong);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s, transform .05s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.dashboard-card:hover:not(.dashboard-card-disabled) {
    border-color: var(--brand-color);
    box-shadow: 0 6px 18px rgba(127, 21, 23, .12);
}

.dashboard-card:active:not(.dashboard-card-disabled) {
    transform: translateY(1px);
}

.dashboard-card-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.dashboard-card h3 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
    color: var(--brand-color);
}

.dashboard-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: .9rem;
    line-height: 1.5;
}

.dashboard-card em {
    color: var(--color-muted);
    font-style: italic;
    font-size: .85rem;
}

.dashboard-card-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.dashboard-footer {
    max-width: 960px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}


/* =========================

/* ===========================================================
   Phase 5a — Questionnaire page
   Layout matches the legacy Montgomery County Online Juror Profile
   screens — section headers in navy, two-column rows with question
   text on the left and Yes/No radios on the right, gray instruction
   blocks between questions.
   =========================================================== */

main.questionnaire-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.questionnaire-shell {
    margin-top: var(--nav-height);
    padding: 1.25rem 1rem 3rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    background: var(--color-bg);
    min-height: calc(100vh - var(--nav-height));
}

/* ---- header card ---- */
.qheader-card {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.qheader-card h1 {
    margin: 0 0 .25rem;
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
    color: var(--brand-color);
}
.qheader-intro {
    margin: 0;
    color: var(--color-muted);
    font-size: .92rem;
}
.qheader-saveindicator {
    margin: .5rem 0 0;
    color: var(--color-muted);
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.saveindicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.saveindicator-dot.idle   { background: var(--color-border); }
.saveindicator-dot.saving { background: #f5a623; animation: qpulse 1.2s infinite; }
.saveindicator-dot.saved  { background: #2ec27e; }
.saveindicator-dot.error  { background: var(--color-danger, #c0392b); }
@keyframes qpulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .4; }
}

/* ---- section card ---- */
.qsection {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.qsection-header {
    background: #2c3e50;          /* dark navy from screenshot */
    color: #fff;
    padding: .85rem 1rem;
    text-align: center;
}
.qsection-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 1rem;
}

.qsection-instructions {
    padding: .85rem 1rem;
    color: #2b2b2b;
    font-size: .9rem;
    line-height: 1.55;
    background: #fafafa;
    border-bottom: 1px solid var(--color-border);
}

/* ---- question rows ---- */
.qrow {
    border-bottom: 1px solid var(--color-border);
    padding: .85rem 1rem;
}
.qrow:last-child { border-bottom: 0; }

.qrow-error {
    background: rgba(192, 57, 43, .04);
}

/* INLINE rows: question text left, radios right (matches screenshots) */
.qrow-inline {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.qrow-inline .qrow-label {
    flex: 1 1 auto;
    line-height: 1.45;
    font-weight: 600;
    color: #2b2b2b;
    font-size: .95rem;
}
.qrow-inline .qrow-input {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* STACK rows: long-form inputs (textarea, dropdown, text) wrap below label */
.qrow-stack .qrow-label {
    line-height: 1.45;
    font-weight: 600;
    color: #2b2b2b;
    font-size: .95rem;
    margin-bottom: .5rem;
    display: block;
}
.qrow-stack .qrow-input {
    display: block;
}

.qrow-label strong {
    color: #2b2b2b;
    margin-right: .35rem;
}
.qrow-req {
    color: var(--color-danger, #c0392b);
    font-weight: 700;
    margin-right: .15rem;
}
.qrow-help {
    color: var(--color-muted);
    font-size: .82rem;
    line-height: 1.5;
    margin-top: .35rem;
    font-weight: 400;
}
.qrow-errortext {
    color: var(--color-danger, #c0392b);
    font-size: .82rem;
    margin-top: .35rem;
}

/* ---- gray instruction block (Section 2 Q8/Q9 and Q10-16 preambles) ---- */
.qrow-info {
    background: #6b7280;
    color: #fff;
    padding: 1rem 1.25rem;
    margin: 0;
    font-style: italic;
    font-size: .88rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--color-border);
}

/* ---- Yes/No row ---- */
.yesno-row {
    display: inline-flex;
    gap: 1.25rem;
    align-items: center;
}
.yesno-option, .radio-option {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    font-size: .95rem;
    color: #2b2b2b;
    user-select: none;
}
.yesno-option input,
.radio-option input {
    margin: 0;
    accent-color: var(--brand-color);
    width: 16px;
    height: 16px;
}

/* ---- General radio group ---- */
.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
}
/* Radio choices with long text: one per line, text wraps */
.radio-row-vertical {
    flex-direction: column;
    gap: .6rem;
}
.radio-row-vertical .radio-option {
    align-items: flex-start;
    white-space: normal;
    line-height: 1.4;
}
.radio-row-vertical .radio-option input {
    flex: 0 0 auto;
    margin-top: .15rem;
}

/* ---- form controls ---- */
.qrow-input .form-control {
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
}
.qrow-input textarea.form-control {
    resize: vertical;
    min-height: 90px;
}
.qrow-input select.form-control {
    width: 240px;
    max-width: 100%;
    padding: .4rem .5rem;
}
.qrow-input .date-input,
.qrow-input .number-input {
    width: 200px;
}
.char-counter {
    color: var(--color-muted);
    font-size: .78rem;
    margin-top: .35rem;
}

/* ---- signature block ---- */
.qsignature {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.signature-label {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    cursor: pointer;
    line-height: 1.5;
    color: var(--color-danger, #b32b1f);
    font-weight: 600;
    font-size: .92rem;
}
.signature-label input[type="checkbox"] {
    margin-top: .15rem;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-color);
}

/* ---- action bar ---- */
.qactions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}
.qactions .btn {
    min-width: 160px;
}

/* ---- inline alert (submit errors) ---- */
.alert {
    padding: .75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: .92rem;
}
.alert-error {
    background: #fdecea;
    border: 1px solid #f5c2bd;
    color: #8b1a13;
}

/* ===========================================================
   Dashboard status card additions (live questionnaire badge)
   =========================================================== */

.dashboard-card-action {
    border-color: var(--brand-color);
}
.dashboard-card-done {
    border-color: #2ec27e;
    background: linear-gradient(180deg, rgba(46, 194, 126, .04) 0%, transparent 100%);
}
.dashboard-card-done h3 {
    color: #1a8e5a;
}
.dashboard-badge {
    display: inline-block;
    margin-left: .5rem;
    padding: .15rem .5rem;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 999px;
    vertical-align: middle;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.dashboard-badge-todo {
    background: var(--brand-color);
    color: white;
}
.dashboard-badge-progress {
    background: #f5a623;
    color: #5a3a05;
}

/* ---- Mobile narrow layout ---- */
@media (max-width: 600px) {
    .qrow-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
    .qrow-input,
    .qrow-input .form-control,
    .qrow-input select.form-control,
    .qrow-input .date-input,
    .qrow-input .number-input {
        width: 100%;
    }
    .qactions {
        flex-direction: column-reverse;
    }
    .qactions .btn {
        width: 100%;
    }
}


/* ===========================================================
   Phase 5a — Privacy Policy / Terms of Use page (/terms)
   Required-acknowledgments block on questionnaire submit
   =========================================================== */

main.terms-page,
section.terms-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.terms-shell {
    margin-top: var(--nav-height);
    padding: 1.5rem 1rem 3rem;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    background: var(--color-bg);
    min-height: calc(100vh - var(--nav-height));
}

.terms-header {
    margin-bottom: 1rem;
}
.terms-header h1 {
    margin: 0 0 .25rem;
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    color: var(--brand-color);
}
.terms-effective {
    margin: 0;
    color: var(--color-muted);
    font-size: .85rem;
}

.terms-card {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    line-height: 1.6;
    color: #2b2b2b;
    font-size: .95rem;
}
.terms-card h2 {
    color: var(--brand-color);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: .35rem;
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}
.terms-card h2.terms-section-divider {
    margin-top: 2.5rem;
}
.terms-card h2:first-child {
    margin-top: 0;
}
.terms-card h3 {
    color: #2b2b2b;
    margin: 1.25rem 0 .5rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.terms-card p {
    margin: 0 0 .75rem;
}
/* ol was never styled — the Terms page uses only bullets. The SMS consent page has a
   numbered opt-in sequence, which would otherwise lose its indent. */
.terms-card ul,
.terms-card ol {
    margin: 0 0 .75rem;
    padding-left: 1.5rem;
}
.terms-card ul ul {
    margin: .25rem 0 .25rem;
}
.terms-card li {
    margin-bottom: .25rem;
}
.terms-allcaps {
    font-weight: 600;
    letter-spacing: .01em;
}
.terms-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ---- multi-checkbox acknowledgment block on questionnaire submit ---- */

.qsignature {
    background: #fff8e1;            /* soft yellow to draw attention */
    border: 1px solid #f0d375;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
.qsignature-title {
    margin: 0 0 .85rem;
    font-size: 1rem;
    color: #6b4f00;
    font-weight: 700;
}

.signature-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    cursor: pointer;
    line-height: 1.5;
    color: #2b2b2b;
    font-size: .92rem;
    margin-bottom: .75rem;
    padding: .35rem 0;
    border-radius: 4px;
    transition: background .12s;
}
.signature-check:last-child { margin-bottom: 0; }
.signature-check:hover { background: rgba(0,0,0,.025); }
.signature-check input[type="checkbox"] {
    margin-top: .15rem;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-color);
    flex: 0 0 auto;
}
.signature-check span {
    flex: 1 1 auto;
}
.signature-check a {
    color: var(--brand-color);
    text-decoration: underline;
}

.signature-check-error {
    background: #fdecea;
    color: var(--color-danger, #8b1a13);
}
.signature-check-error a { color: var(--color-danger, #8b1a13); }


/* ===========================================================
   Phase 5a — Summons banner + reporting info on dashboard
   =========================================================== */

/* ---- summons banner (date/time/panel) ---- */

.summons-banner {
    background: linear-gradient(180deg, #fff8d8 0%, #ffefb3 100%);
    border: 2px solid #d4a017;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 20px rgba(212,160,23,0.25);
    text-align: center;
}

.summons-banner-loading {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem;
    color: var(--color-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.summons-banner-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #5a3a05;
    margin-bottom: .35rem;
    letter-spacing: .01em;
}

.summons-banner-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2b2b2b;
    letter-spacing: .04em;
    margin-bottom: 1rem;
}

.summons-banner-lede {
    margin: 0 0 1rem;
    color: #2b2b2b;
    font-size: 1rem;
}

.summons-datetime-box {
    display: inline-flex;
    background: #fff;
    border: 2px solid #b32b1f;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summons-datetime-cell {
    padding: 1rem 1.5rem;
    color: #b32b1f;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.2;
}

.summons-date {
    border-right: 2px solid #b32b1f;
}

.summons-banner-panel {
    margin: 0 0 1rem;
    color: #b32b1f;
    font-weight: 600;
    font-size: 1rem;
}

.summons-location {
    background: #fff;
    border-radius: 6px;
    padding: .85rem 1rem;
    margin-top: .5rem;
    text-align: left;
    border: 1px solid #d4a017;
}

.summons-location-label {
    font-weight: 700;
    color: #5a3a05;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .04em;
    margin-bottom: .35rem;
}

.summons-location-body {
    color: #2b2b2b;
    line-height: 1.5;
    font-size: .95rem;
}

.summons-special {
    background: #fff;
    border-left: 4px solid #d4a017;
    padding: .65rem .85rem;
    margin-top: .85rem;
    text-align: left;
    color: #5a3a05;
    font-size: .9rem;
    border-radius: 4px;
}

/* ---- reporting info section ---- */

.reporting-info {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.reporting-info-title {
    margin: 0 0 1rem;
    color: var(--brand-color);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: .5rem;
}

.reporting-info h3 {
    margin: 1.25rem 0 .35rem;
    color: #2b2b2b;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
}

.reporting-info p {
    margin: 0 0 .65rem;
    line-height: 1.55;
    color: #2b2b2b;
    font-size: .92rem;
}

.reporting-info ol,
.reporting-info ul {
    margin: 0 0 .65rem;
    padding-left: 1.5rem;
}

.reporting-info li {
    line-height: 1.55;
    color: #2b2b2b;
    margin-bottom: .25rem;
    font-size: .92rem;
}

.reporting-alert {
    background: #fdecea;
    border: 1px solid #f5c2bd;
    border-radius: 6px;
    padding: .85rem 1rem;
    color: #8b1a13;
    font-weight: 600;
    margin: 0 0 1rem;
}

.prohibited-list li {
    color: #b32b1f;
    font-weight: 600;
}

/* ---- mobile ---- */
@media (max-width: 640px) {
    .summons-datetime-box {
        flex-direction: column;
    }
    .summons-date {
        border-right: 0;
        border-bottom: 2px solid #b32b1f;
    }
    .summons-datetime-cell {
        font-size: 1.2rem;
        padding: .75rem 1rem;
    }
    .summons-banner-name {
        font-size: 1.2rem;
    }
}


/* ===========================================================
   Phase 5a Stage 2.3 — SUMMONS CARD (front and center)
   Bigger, bolder, unmissable. The juror sees this first when
   they sign in if they have a SummonsPanelID + AppearanceDateTime.
   =========================================================== */

.summonscard {
    background: #fff;
    border: 3px solid #b32b1f;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 8px 28px rgba(179, 43, 31, 0.22);
}

.summonscard-band {
    background: #b32b1f;
    color: #fff;
    padding: .55rem 1rem;
    letter-spacing: .02em;
    font-size: clamp(.85rem, 1.4vw, .98rem);
    font-weight: 700;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.summonscard-band-juror {
    text-transform: none;
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .02em;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
}

.summonscard-band-sep { margin: 0 .15rem; opacity: .6; }

/* Narrow screens: the band stacks and centres rather than squeezing. */
@media (max-width: 640px) {
    .summonscard-band {
        justify-content: center;
        text-align: center;
    }
    .summonscard-band-juror { white-space: normal; }
}

/* WHEN and WHERE side by side. This is the change that recovers most of the
   height -- two padded full-width boxes stacked pushed the action cards below
   the fold on a 1080p screen. */
.summonscard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .75rem;
    align-items: stretch;
}

/* .summonscard-section carries max-width:560px and margin:0 auto from when these
   were stacked full width. Inside a grid column that shrinks each box and floats
   it in the middle of its own cell. Override both so they fill and match. */
.summonscard-grid .summonscard-section {
    max-width: none;
    margin: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.summonscard-grid .summonscard-location-address,
.summonscard-grid .summonscard-location-phone,
.summonscard-grid .summonscard-location-name,
.summonscard-grid .summonscard-date,
.summonscard-grid .summonscard-time,
.summonscard-grid .summonscard-section-label {
    text-align: left;
}

/* Pin the countdown and the directions link to the bottom of their box so the
   two columns line up along their base regardless of address length. */
.summonscard-grid .summonscard-countdown,
.summonscard-grid .summonscard-directions {
    align-self: flex-start;
    margin-top: auto;
}

@media (max-width: 860px) {
    .summonscard-grid { grid-template-columns: minmax(0, 1fr); }
}

.summonscard-band-text {
    display: inline-block;
}

.summonscard-body {
    padding: .75rem;
    text-align: center;
}

.summonscard-name {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    color: #2b2b2b;
    letter-spacing: .03em;
    margin-bottom: .65rem;
}

.summonscard-statusrow {
    margin-bottom: 1.25rem;
}

.summonscard-status-badge {
    display: inline-block;
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ---- WHEN ---- */

.summonscard-section {
    margin: 0 auto 1.5rem;
    max-width: 560px;
}

.summonscard-section:last-child {
    margin-bottom: 0;
}

.summonscard-section-label {
    font-size: .72rem;
    font-weight: 800;
    color: var(--sc-panel-muted);
    letter-spacing: .13em;
    margin-bottom: .4rem;
}

.summonscard-when {
    background: var(--sc-panel-bg);
    border: 2px solid var(--sc-panel-border);
    border-left: 6px solid #b32b1f;
    /* No radius on the accented edge -- a rounded corner on a single-sided
       border leaves a visible notch where the thick edge meets the thin one. */
    border-radius: 0 10px 10px 0;
    padding: .85rem .9rem;
}

.summonscard-date {
    font-size: clamp(1.1rem, 1.9vw, 1.45rem);
    font-weight: 800;
    color: var(--sc-panel-text);
    line-height: 1.1;
    margin-bottom: .25rem;
    letter-spacing: -.01em;
}

.summonscard-time {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 800;
    color: #b32b1f;
    line-height: 1.1;
    margin-bottom: .85rem;
    letter-spacing: -.01em;
}

.summonscard-countdown {
    display: inline-block;
    padding: .4rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .05em;
}

.summonscard-countdown-today {
    background: #b32b1f;
    color: #fff;
    animation: summons-pulse 1.6s infinite;
}

/* Urgency escalates solid red -> pale red -> outline -> grey. The gold pills
   read as a warning and clashed once the panel went white with a red accent. */
.summonscard-countdown-soon {
    background: #F7C1C1;
    color: #791F1F;
}

.summonscard-countdown-far {
    background: transparent;
    border: 1px solid var(--sc-panel-border);
    color: var(--sc-panel-muted);
    font-weight: 600;
}

.summonscard-countdown-past {
    background: #efe6e4;
    color: #6b3a35;
    font-weight: 600;
}

html[data-theme="dark"] .summonscard-countdown-past {
    background: #3a3230;
    color: #d8c4c0;
}

html[data-theme="dark"] .summonscard-countdown-soon {
    background: #501313;
    color: #F7C1C1;
}

@keyframes summons-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* ---- WHERE ---- */

.summonscard-where {
    background: var(--sc-panel-bg);
    border: 2px solid var(--sc-panel-border);
    border-left: 6px solid #2c3e50;
    border-radius: 0 10px 10px 0;
    padding: .85rem .9rem;
}

.summonscard-location-name {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 800;
    color: #1f2d3d;
    margin-bottom: .35rem;
}

.summonscard-location-address {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.5;
    color: #2b2b2b;
    font-weight: 500;
}

.summonscard-location-phone {
    margin-top: .65rem;
    font-size: .92rem;
    color: #2b2b2b;
}

/* ---- panel + special instructions ---- */

.summonscard-panelrow {
    margin: 0 auto;
    padding: .65rem 1rem;
    background: #f0f3f7;
    border-radius: 8px;
    color: #1f2d3d;
    font-size: .95rem;
    max-width: 560px;
    margin-bottom: .85rem;
}

.summonscard-panelrow strong {
    color: #b32b1f;
}

.summonscard-special {
    margin: 0 auto;
    max-width: 560px;
    padding: .75rem 1rem;
    background: #fff8e1;
    border-left: 4px solid #d4a017;
    border-radius: 4px;
    color: #5a3a05;
    text-align: left;
    font-size: .92rem;
}

/* ---- compact welcome header (when summonscard is at top) ---- */

.dashboard-header-compact {
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-header-compact h2 {
    margin: 0 0 .15rem;
    font-size: 1.15rem;
    color: #2b2b2b;
    font-weight: 600;
}

.dashboard-header-compact .dashboard-subtitle {
    margin: 0;
    color: var(--color-muted);
    font-size: .9rem;
}

/* ---- mobile ---- */

@media (max-width: 640px) {
    .summonscard-body {
        padding: 1.25rem 1rem 1.5rem;
    }
    .summonscard-when,
    .summonscard-where {
        padding: 1rem .75rem;
    }
}


/* ===========================================================
   Phase 5a Stage 3 — Hero welcome, Get Directions button,
   action cards, request/contact form pages
   =========================================================== */

/* ---- Hero welcome ---- */
.dashboard-hero {
    background: linear-gradient(135deg, #1f2d3d 0%, #2c3e50 60%, #4a5d72 100%);
    color: #fff;
    border-radius: 10px;
    padding: .6rem 1.1rem;
    margin-bottom: .75rem;
    box-shadow: 0 4px 14px rgba(31,45,61,0.15);
}

/* Greeting and subtitle share one line on desktop. Stacked they cost ~160px to
   say what the red band below says again, louder. */
.dashboard-hero-greeting {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .1rem .6rem;
}

.dashboard-hero-greeting h1 {
    margin: 0;
    white-space: nowrap;
    font-size: clamp(1.1rem, 1.7vw, 1.35rem);
    font-weight: 600;
    color: #fff;
    letter-spacing: -.005em;
}

.dashboard-hero-name {
    color: #ffd166;
    font-weight: 800;
    letter-spacing: .02em;
}

.dashboard-hero-subtitle {
    margin: 0;
    font-size: .92rem;
    color: rgba(255,255,255,0.85);
}

.dashboard-hero-subtitle strong { color: #fff; }

/* ---- Section title above the card grid ---- */
.dashboard-section-title {
    margin: 1.5rem 0 .85rem;
    font-size: 1.15rem;
    color: #2b2b2b;
    font-weight: 700;
    letter-spacing: -.005em;
}

/* ---- Action card grid (3-up on desktop) ---- */
.dashboard-grid-3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .dashboard-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .dashboard-grid-3 { grid-template-columns: 1fr; }
}

.dashboard-card {
    text-decoration: none;
}

.dashboard-card-pending {
    border-color: #f5a623;
    background: linear-gradient(180deg, rgba(245, 166, 35, .04) 0%, transparent 100%);
}

/* ---- Get Directions button on the summons card ---- */
.summonscard-directions {
    display: inline-block;
    margin-top: .6rem;
    padding: 0;
    background: none;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: none;
    transition: color .12s;
}

.summonscard-directions:hover { text-decoration: underline; }

.summonscard-directions:hover {
    background: #1558b0;
    box-shadow: 0 4px 10px rgba(26,115,232,0.32);
    transform: translateY(-1px);
}

/* ===========================================================
   Form pages (excuse / deferral / contact update)
   =========================================================== */

main.formpage,
section.formpage {
    max-width: none;
    margin: 0;
    padding: 0;
}

.formpage-shell {
    margin-top: var(--nav-height);
    padding: 1.5rem 1rem 3rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    background: var(--color-bg);
    min-height: calc(100vh - var(--nav-height));
}

.formpage-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--brand-color);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
}
.formpage-back:hover { text-decoration: underline; }

.formpage-header h1 {
    margin: 0 0 .35rem;
    color: var(--brand-color);
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
}

.formpage-subtitle {
    margin: 0 0 1.25rem;
    color: var(--color-muted);
    font-size: .95rem;
    line-height: 1.55;
}

.formpage-card {
    padding: 1.5rem 1.5rem 1.25rem;
}

.formpage-section-title {
    margin: 1.5rem 0 .75rem;
    font-size: 1rem;
    color: #2b2b2b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: .35rem;
}
.formpage-card .formpage-section-title:first-child { margin-top: 0; }

.form-row {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2b2b2b;
    margin-bottom: .35rem;
    font-size: .92rem;
}

.form-row-grid2 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-row-grid3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: 2fr 1fr 1fr;
}
@media (max-width: 600px) {
    .form-row-grid2,
    .form-row-grid3 { grid-template-columns: 1fr; }
}

.formpage-hint {
    color: var(--color-muted);
    font-size: .82rem;
    margin-top: .25rem;
    line-height: 1.45;
}

.formpage-note {
    background: #fff8e1;
    border-left: 4px solid #d4a017;
    padding: .75rem .9rem;
    margin: 1rem 0;
    color: #5a3a05;
    font-size: .9rem;
    border-radius: 4px;
}

.formpage-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.formpage-actions .btn {
    min-width: 180px;
}
@media (max-width: 600px) {
    .formpage-actions {
        flex-direction: column-reverse;
    }
    .formpage-actions .btn {
        width: 100%;
    }
}

.formpage-success {
    text-align: center;
    padding: 2rem 1.5rem;
}

.formpage-success h2 {
    margin: .5rem 0;
    color: #1a8e5a;
}


/* ===========================================================
   Phase 5a Stage 3.1 — Modern form control redesign
   Overrides the older compact .form-control / .btn rules.
   Targets every input, textarea, and select that uses
   .form-control across the portal — questionnaire, contact
   update, excuse, deferral, registration, sign-in.
   =========================================================== */

:root {
    --field-bg: #ffffff;
    --field-border: #d4d9e1;
    --field-border-hover: #a6afbd;
    --field-border-focus: var(--brand-color);
    --field-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --field-shadow-focus: 0 0 0 4px color-mix(in srgb, var(--brand-color) 18%, transparent);
    --field-radius: 10px;
    --field-pad-y: .75rem;
    --field-pad-x: 1rem;
}

/* ---------- Labels ---------- */
.form-label,
.qrow-label > strong,
.qsection-instructions strong {
    color: #1f2937;
}

.form-label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 600;
    font-size: .95rem;
    color: #1f2937;
    letter-spacing: -.005em;
}

/* ---------- Form row spacing ---------- */
.form-row {
    margin-bottom: 1.25rem;
}

/* ---------- Inputs / textareas / selects ---------- */
input.form-control,
select.form-control,
textarea.form-control,
.qrow-input input[type='text'],
.qrow-input input[type='email'],
.qrow-input input[type='tel'],
.qrow-input input[type='number'],
.qrow-input input[type='date'],
.qrow-input select,
.qrow-input textarea {
    width: 100%;
    min-height: 48px;
    padding: var(--field-pad-y) var(--field-pad-x);
    background: var(--field-bg);
    border: 1.5px solid var(--field-border);
    border-radius: var(--field-radius);
    font-size: 1rem;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.4;
    box-shadow: var(--field-shadow);
    transition: border-color .18s ease,
                box-shadow .18s ease,
                background-color .18s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea.form-control,
.qrow-input textarea {
    min-height: 120px;
    line-height: 1.55;
    resize: vertical;
}

/* Custom dropdown arrow for selects */
select.form-control,
.qrow-input select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='M5 7.5L10 12.5L15 7.5' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: 18px 18px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Placeholder color */
input.form-control::placeholder,
textarea.form-control::placeholder,
.qrow-input input::placeholder,
.qrow-input textarea::placeholder {
    color: #9aa3b2;
    opacity: 1;
}

/* Hover */
input.form-control:hover:not(:focus):not(:disabled):not([readonly]),
select.form-control:hover:not(:focus):not(:disabled),
textarea.form-control:hover:not(:focus):not(:disabled):not([readonly]),
.qrow-input input:hover:not(:focus):not(:disabled):not([readonly]),
.qrow-input select:hover:not(:focus):not(:disabled),
.qrow-input textarea:hover:not(:focus):not(:disabled):not([readonly]) {
    border-color: var(--field-border-hover);
}

/* Focus */
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.qrow-input input:focus,
.qrow-input select:focus,
.qrow-input textarea:focus {
    outline: none;
    border-color: var(--field-border-focus);
    box-shadow: var(--field-shadow-focus);
    background: #fff;
}

/* Read-only & disabled */
input.form-control[readonly],
.qrow-input input[readonly] {
    background: #f3f4f7;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
}

input.form-control:disabled,
select.form-control:disabled,
textarea.form-control:disabled {
    background: #f3f4f7;
    color: #9aa3b2;
    cursor: not-allowed;
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Date / number sized constraint inputs — still respect the new height */
.qrow-input .date-input,
.qrow-input .number-input,
input[type='date'].form-control,
input[type='number'].form-control {
    min-height: 48px;
}

/* Sized variants used on the questionnaire (date / number show in-line) */
.qrow-input .date-input { width: 240px; max-width: 100%; }
.qrow-input .number-input { width: 220px; max-width: 100%; }
.qrow-inline .qrow-input .date-input,
.qrow-inline .qrow-input .number-input { width: 240px; }

/* Char counter spacing */
.char-counter {
    color: #6b7280;
    font-size: .8rem;
    margin-top: .4rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.005em;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease,
                box-shadow .18s ease,
                background-color .18s ease,
                border-color .18s ease,
                color .18s ease;
    user-select: none;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-color) 22%, transparent),
                0 1px 2px rgba(15,23,42,0.06);
}

.btn:disabled,
.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Primary */
.btn-primary {
    background: linear-gradient(180deg,
                color-mix(in srgb, var(--brand-color) 96%, white) 0%,
                var(--brand-color) 60%,
                color-mix(in srgb, var(--brand-color) 88%, black) 100%);
    color: #fff;
    border-color: color-mix(in srgb, var(--brand-color) 92%, black);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--brand-color) 28%, transparent),
                inset 0 1px 0 rgba(255,255,255,0.18);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--brand-color) 32%, transparent),
                inset 0 1px 0 rgba(255,255,255,0.20);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--brand-color) 22%, transparent);
}

/* Secondary */
.btn-secondary {
    background: #ffffff;
    color: #1f2937;
    border-color: var(--field-border);
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: var(--field-border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15,23,42,0.08);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
    background: #f3f4f7;
}

/* Make form action buttons fill more comfortably */
.formpage-actions .btn,
.qactions .btn {
    min-width: 200px;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

/* ---------- Checkboxes (signature acknowledgments) ---------- */
.signature-check input[type='checkbox'],
input[type='checkbox'].form-check {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    accent-color: var(--brand-color);
    flex-shrink: 0;
}

/* ---------- Radios on the questionnaire ---------- */
.yesno-option input[type='radio'],
.radio-option input[type='radio'] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-color);
}

.yesno-option,
.radio-option {
    padding: .35rem .65rem;
    border-radius: 8px;
    transition: background-color .15s ease;
    cursor: pointer;
}

.yesno-option:hover,
.radio-option:hover {
    background: rgba(15,23,42,0.04);
}

/* ---------- Card padding bump on form pages ---------- */
.formpage-card {
    padding: 1.75rem 1.75rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06),
                0 1px 2px rgba(15,23,42,0.04);
    border: 1px solid #eef0f4;
}

.formpage-section-title {
    margin-top: 1.75rem;
    font-size: .85rem;
    color: #6b7280;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid #eef0f4;
    padding-bottom: .55rem;
    margin-bottom: 1rem;
}

/* ---------- Notes / hints ---------- */
.formpage-hint {
    color: #6b7280;
    font-size: .85rem;
    margin-top: .4rem;
    line-height: 1.5;
}

.formpage-note {
    background: linear-gradient(180deg, #fffaeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-left-width: 4px;
    border-left-color: #d97706;
    border-radius: 10px;
    padding: .9rem 1.1rem;
    margin: 1.25rem 0;
    color: #78350f;
    font-size: .9rem;
    line-height: 1.55;
}

/* ---------- Alerts ---------- */
.alert {
    padding: .85rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: .95rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.alert-error {
    background: linear-gradient(180deg, #fff1f0 0%, #fee2e2 100%);
    border-color: #fecaca;
    color: #7f1d1d;
}


/* "Confirmation will be sent to" fact strip on excuse / deferral forms */
.formpage-emailfact {
    background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);
    border: 1px solid #d6e1f5;
    border-radius: 10px;
    padding: .75rem 1rem;
}
.formpage-emailfact-label {
    font-size: .78rem;
    color: #4b5b78;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
    margin-bottom: .15rem;
}
.formpage-emailfact-value {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    word-break: break-all;
}


/* ============================================================
   File upload widget — used on RequestExcuse / RequestDeferral
   ============================================================ */

.filedrop {
    position: relative;
    display: block;
    border: 2px dashed #c8d2e5;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6fc 100%);
    transition: border-color .15s ease, background .15s ease;
    cursor: pointer;
}
.filedrop:hover {
    border-color: #5b6fd6;
    background: #f0f4ff;
}
.filedrop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.filedrop-cue {
    display: flex;
    align-items: center;
    gap: .85rem;
    pointer-events: none;
}
.filedrop-cue-icon {
    font-size: 1.85rem;
    line-height: 1;
}
.filedrop-cue-text {
    flex: 1;
    color: #1f2937;
    font-size: .95rem;
}

/* List of selected/scanned files */
.filelist {
    list-style: none;
    margin: .65rem 0 0 0;
    padding: 0;
}
.filelist-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: .4rem;
    font-size: .92rem;
}
.filelist-row-clean    { border-color: #bbf7d0; background: #f0fdf4; }
.filelist-row-infected { border-color: #fecaca; background: #fef2f2; }
.filelist-row-error    { border-color: #fed7aa; background: #fffbeb; }

.filelist-icon {
    font-size: 1.1rem;
    line-height: 1;
}
.filelist-name {
    flex: 1;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filelist-size {
    color: #6b7280;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}
.filelist-status {
    color: #4b5563;
    font-size: .85rem;
    font-style: italic;
}
.filelist-row-clean    .filelist-status { color: #166534; font-style: normal; font-weight: 600; }
.filelist-row-infected .filelist-status { color: #991b1b; font-style: normal; font-weight: 600; }
.filelist-row-error    .filelist-status { color: #b45309; font-style: normal; font-weight: 600; }

.filelist-remove {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.35rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.filelist-remove:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Result block on the success page */
.filelist-result {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}
.filelist-result-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: .5rem;
    font-size: .95rem;
}


/* ============================================================
   First-time visitor CTA on Login page
   Primary card above the email/password form
   ============================================================ */
.first-time-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem;
    margin: 0 0 1rem;
    text-decoration: none;
    border-radius: 12px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--brand-color) 92%, black) 0%,
        var(--brand-color) 60%,
        color-mix(in srgb, var(--brand-color) 88%, white) 100%);
    color: var(--header-text-color, #fff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    border: 2px solid transparent;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    position: relative;
    overflow: hidden;
}

.first-time-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right,
        rgba(255, 255, 255, 0.18) 0%,
        transparent 60%);
    pointer-events: none;
}

.first-time-cta:hover,
.first-time-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
    border-color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    color: var(--header-text-color, #fff);
    outline: none;
}

.first-time-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.first-time-cta-text {
    flex: 1 1 auto;
    min-width: 0;
}

.first-time-cta-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.15rem;
}

.first-time-cta-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.first-time-cta-sub {
    font-size: 0.85rem;
    opacity: 0.92;
    line-height: 1.4;
}

.first-time-cta-arrow {
    flex: 0 0 auto;
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: transform .15s ease, background .15s ease;
}

.first-time-cta:hover .first-time-cta-arrow,
.first-time-cta:focus-visible .first-time-cta-arrow {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.28);
}

/* Make the "or" divider on login more like a section break now */
.login-divider {
    margin: 1.25rem 0 1rem;
}
.login-divider span {
    font-size: 0.78rem;
    color: var(--color-muted, #777);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


/* ============================================================================
   Reporting instruction card (dashboard)

   This REPLACES the summons card when staff have published an instruction, so
   it has to carry the whole message on its own. Designed for a stressed person
   reading once, on a phone:
     - the verdict (report / do not report) is the largest thing on screen
     - one date, stated in full, no relative "in 2 days" wording to misread
     - no address or directions on a DO NOT REPORT card -- nothing that hints
       at travelling
   Colour is never the only signal; the wording says it too, for colour-blind
   users and anyone printing in mono.
   ============================================================================ */
.ri-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: var(--space-4);
    border: 2px solid var(--ri-accent);
}

.ri-card-report {
    --ri-accent: #1a7f37;
    --ri-tint: rgba(26, 127, 55, 0.06);
}

.ri-card-dnr {
    --ri-accent: #b3261e;
    --ri-tint: rgba(179, 38, 30, 0.06);
}

html[data-theme="dark"] .ri-card-report {
    --ri-accent: #2f9e4f;
    --ri-tint: rgba(74, 222, 128, 0.10);
}

html[data-theme="dark"] .ri-card-dnr {
    --ri-accent: #c0392f;
    --ri-tint: rgba(248, 113, 113, 0.10);
}

/* The verdict. Deliberately the loudest element on the page. */
.ri-card-banner {
    background: var(--ri-accent);
    color: #fff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.85rem 1rem;
}

.ri-card-body { padding: var(--space-4); }

.ri-card-verdict {
    text-align: center;
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.ri-card-block {
    background: var(--ri-tint);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    text-align: center;
}

.ri-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-muted);
    margin-bottom: var(--space-1);
}

.ri-card-date {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
}

.ri-card-time {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ri-accent);
}

.ri-card-place {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.ri-card-addr { color: var(--color-text); }

.ri-card-phone {
    margin-top: var(--space-2);
    color: var(--color-text);
}

/* Tap target sized for a thumb, not a mouse. */
.ri-card-directions {
    display: inline-block;
    margin-top: var(--space-3);
    padding: 0.7rem 1.4rem;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    min-height: 44px;
    line-height: 1.6;
}

.ri-card-directions:hover,
.ri-card-directions:focus { filter: brightness(0.92); color: #fff; }

.ri-card-message {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    background: var(--color-surface);
    color: var(--color-text);
}

.ri-card-foot {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: center;
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

@media (max-width: 30rem) {
    .ri-card-banner { font-size: 1rem; letter-spacing: 0.04em; }
    .ri-card-date   { font-size: 1.3rem; }
    .ri-card-time   { font-size: 1.9rem; }
}

/* ============================================================================
   Print

   Jurors get asked by employers to prove what the court told them. Without this
   the browser prints the nav, the action cards and the footer, and drops the
   colour that carries the whole message -- producing something that proves
   nothing. This makes the instruction card the printed page.
   ============================================================================ */
@media print {
    /* Chrome the juror doesn't need on paper. */
    header, nav, footer,
    .dashboard-hero,
    .dashboard-section-title,
    .dashboard-grid,
    .ri-noprint {
        display: none !important;
    }

    /* Browsers strip backgrounds by default -- but the red/green banner IS the
       message here, so force it. Without this a DO NOT REPORT prints as plain
       text and loses its urgency entirely. */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }

    /* Keep the card whole -- a verdict split across two sheets is worse than
       useless. */
    #ri-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        margin: 0 !important;
    }

    /* A URL after every link is noise on a printed instruction. */
    a[href]::after { content: "" !important; }

    @page { margin: 1.5cm; }
}

/* ============================================================================
   Reduced motion — respect the OS setting.
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ════════════════════════════════════════════════════════════════════
   PORTAL REFRESH — "single card over a muted photograph"
   Matches the EmpanelJMS staff login so the two products read as one.
   Three principles: one accent colour, the photograph pushed behind the
   content, and the card carrying the hierarchy.
   ════════════════════════════════════════════════════════════════════ */

/* The Home page's Log In button was --color-primary (#005fcc) while every other
   piece of chrome was maroon. Two accent colours is the single most jarring
   thing on the page. */
.primary-action {
    background-color: var(--brand-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(127, 21, 23, .28);
}
.primary-action:hover {
    background-color: color-mix(in srgb, var(--brand-color) 88%, black) !important;
}

/* ── Login: card floats ON the photograph, not beside it ──────────── */
.login-shell {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    grid-template-columns: 1fr !important;
}

.login-visual {
    position: absolute !important;
    inset: 0;
    z-index: 0;
    border-left: none !important;
    /* Was blur(2px). Desaturating and darkening does more: text sits on it
       comfortably and the building still reads. */
    filter: saturate(.62) brightness(.82) !important;
    /* With a Branding "Background tint" set, the sign-in pages drop this extra
       dimming (--login-filter: none) so they match the home page. */
    filter: var(--login-filter, saturate(.62) brightness(.82)) !important;
}

.login-visual .visual-overlay {
    position: absolute;
    inset: 0;
    /* Branding "Background tint": --bg-dim darkens (1 = standard, 0 = none),
       --bg-light washes the photo with white (0 = none). Both unset = standard. */
    background:
        linear-gradient(rgba(255, 255, 255, var(--bg-light, 0)), rgba(255, 255, 255, var(--bg-light, 0))),
        linear-gradient(180deg, rgba(26, 20, 20, calc(.34 * var(--bg-dim, 1))) 0%, rgba(26, 20, 20, calc(.52 * var(--bg-dim, 1))) 100%);
}

.login-panel {
    position: relative;
    z-index: 1;
    background: transparent !important;
    padding: 2.25rem 1rem 3rem !important;
}

.login-card {
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, .6) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 48px rgba(16, 18, 27, .30) !important;
    padding: 1.75rem !important;
    max-width: 460px !important;
}

.login-header .county-name {
    color: var(--brand-color);
    font-weight: 700;
    letter-spacing: -.01em;
}

/* A short brand rule under the heading — the one decorative element, and it
   ties the card to the county's colour without another block of maroon. */
.login-header::after {
    content: "";
    display: block;
    width: 38px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-color);
    margin: .85rem auto .25rem;
}

/* ── Home: same treatment, one column, generous air ───────────────── */
/* Belt and braces: :has() covers the container, and the negative-margin break-out
   covers browsers or wrappers where it does not apply. Either alone leaves the
   photograph as a strip around the card. */
.home-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    background-size: cover;
    background-position: center 60%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem 1rem 3.5rem;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(rgba(255, 255, 255, var(--bg-light, 0)), rgba(255, 255, 255, var(--bg-light, 0))),
        linear-gradient(180deg, rgba(26, 20, 20, calc(.38 * var(--bg-dim, 1))) 0%, rgba(26, 20, 20, calc(.58 * var(--bg-dim, 1))) 100%);
}

.home-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(16, 18, 27, .30);
    padding: 2rem 2.25rem 2.25rem;
    text-align: center;
}

.home-card .home-seal {
    width: 84px;
    height: auto;
    margin: 0 auto .75rem;
    display: block;
}

.home-card h1 {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    color: var(--brand-color);
    margin: 0 0 .2rem;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.home-card .home-sub {
    margin: 0;
    color: var(--color-muted);
    font-size: .92rem;
}

.home-rule {
    width: 38px;
    height: 3px;
    background: var(--brand-color);
    border-radius: 2px;
    margin: 1rem auto 1.25rem;
}

/* Body copy left-aligned inside a centred card: centred paragraphs are hard to
   read, and this is the paragraph a juror actually has to take in. */
.home-card .home-body {
    text-align: left;
    color: #3f4652;
    font-size: .93rem;
    line-height: 1.65;
}
.home-card .home-body p { margin: 0 0 .75rem; }

.home-commission {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: .9rem 1.1rem;
    margin: 0 0 1.25rem;
    font-size: .86rem;
    line-height: 1.55;
}
.home-commission .home-commission-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: .35rem;
}
.home-commission ul { list-style: none; margin: 0; padding: 0; color: #3f4652; }
.home-commission li { margin: 0 0 .15rem; }

.home-actions {
    display: flex;
    gap: .6rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.home-actions .primary-action {
    margin-top: 0 !important;   /* .primary-action carries a margin-top that offsets it here */
    min-width: 150px;
}
.home-actions .home-secondary { min-width: 150px; justify-content: center; }

.home-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: #3f4652;
    text-decoration: none;
    font-weight: 600;
}
.home-secondary:hover { border-color: var(--brand-color); color: var(--brand-color); }

.home-contact {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: .82rem;
    color: var(--color-muted);
}

@media (max-width: 640px) {
    .home-card { padding: 1.5rem 1.25rem 1.75rem; }
    .home-hero { padding: 1.5rem .75rem 2.5rem; }
}

/* Dark mode: the card stays light — it is a document on a photograph. Only the
   surrounding tone shifts. */
html[data-theme="dark"] .home-hero::before,
html[data-theme="dark"] .login-visual .visual-overlay {
    background: linear-gradient(rgba(255, 255, 255, var(--bg-light, 0)), rgba(255, 255, 255, var(--bg-light, 0))),
        linear-gradient(180deg, rgba(10, 8, 8, calc(.55 * var(--bg-dim, 1))) 0%, rgba(10, 8, 8, calc(.72 * var(--bg-dim, 1))) 100%);
}


/* ════════════════════════════════════════════════════════════════════
   HEADER — light bar with a thin brand rule
   Replaces the gradient maroon bar. Four things were dating it: a
   left-to-right gradient, a filled white pill for the active page,
   everything bold at one size, and no county seal. A white bar also sits
   over the courthouse photograph far better than a solid red one.
   Written as explicit overrides so it does not depend on the earlier
   rules it is replacing.
   ════════════════════════════════════════════════════════════════════ */

.site-header {
    background: #ffffff !important;
    color: #1f2933 !important;
    border-bottom: 1px solid #e4e7ec !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}

/* The county colour survives as a 3px rule rather than a full bar. */
.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 3px;
    background: linear-gradient(to right, var(--brand-color), color-mix(in srgb, var(--brand-color) 72%, white));
}

.site-header a,
.site-footer a { color: inherit; }

.site-title {
    color: #1f2933 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: -.005em;
}

/* Nav links were 1.5rem and bold — at that size everything shouts and nothing
   leads. */
.site-header .nav-menu a,
.site-header .nav-menu button {
    color: #4b5563 !important;
    font-size: .95rem !important;
    font-weight: 500 !important;
    min-height: 0 !important;
    padding: .45rem .1rem !important;
    border-radius: 0 !important;
    background: none !important;
    position: relative;
}

.site-header .nav-menu li { margin: 0 .55rem; }

.site-header .nav-menu a:hover { color: var(--brand-color) !important; }

/* Active page: an underline, not a filled block. */
.site-header .nav-menu a.active {
    color: var(--brand-color) !important;
    font-weight: 600 !important;
    background: none !important;
}
.site-header .nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -.35rem;
    height: 2px;
    background: var(--brand-color);
    border-radius: 2px;
}

/* Sign In is the one filled element in the header. */
.site-header .nav-menu a.nav-login-link {
    background: var(--brand-color) !important;
    color: #fff !important;
    padding: .45rem 1rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    margin-left: .35rem;
}
.site-header .nav-menu a.nav-login-link::after { display: none; }
.site-header .nav-menu a.nav-login-link:hover {
    background: color-mix(in srgb, var(--brand-color) 86%, black) !important;
    color: #fff !important;
}

/* The toggle was built for a dark bar. */
.site-header .theme-switch-track {
    background-color: #e4e7ec !important;
    border: 1px solid #d0d5dd !important;
}
.site-header .nav-toggle { color: #1f2933 !important; }

/* On mobile the menu opens as a panel, so it needs its own surface now that the
   bar is no longer coloured. */
@media (max-width: 900px) {
    .site-header .nav-menu.is-open {
        background: #fff;
        border-bottom: 1px solid #e4e7ec;
        box-shadow: 0 8px 20px rgba(16, 24, 40, .10);
    }
    .site-header .nav-menu li { margin: 0; }
    .site-header .nav-menu a { padding: .7rem 1rem !important; }
    .site-header .nav-menu a.active::after { display: none; }
    .site-header .nav-menu a.active {
        border-left: 3px solid var(--brand-color);
        padding-left: calc(1rem - 3px) !important;
    }
}

html[data-theme="dark"] .site-header {
    background: #161b22 !important;
    color: #e6e8ec !important;
    border-bottom-color: #2b313b !important;
}
html[data-theme="dark"] .site-title { color: #e6e8ec !important; }
html[data-theme="dark"] .site-header .nav-menu a { color: #b8bfca !important; }
html[data-theme="dark"] .site-header .nav-toggle { color: #e6e8ec !important; }


/* ── Theme toggle ────────────────────────────────────────────────────
   Was a 62x32 track with a 26px black thumb and two 32px icons — a control
   sized like a form field sitting in a header. Shrunk to something closer to
   an icon button: smaller track, lighter colours, icons scaled to match the
   nav text rather than dwarfing it.
   ──────────────────────────────────────────────────────────────────── */

.site-header .theme-switch-track {
    width: 42px !important;
    height: 22px !important;
    padding: 2px !important;
    border: 1px solid #d0d5dd !important;
    background: #f2f4f7 !important;
}

.site-header .theme-switch-thumb {
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}

/* The icons were 32px inside a 32px track, so they filled it completely. */
.site-header .theme-switch-track svg {
    width: 12px !important;
    height: 12px !important;
    color: #98a2b3;
}

.site-header .theme-switch:hover .theme-switch-track {
    border-color: var(--brand-color) !important;
}

.site-header .theme-switch:hover .theme-switch-track svg { color: var(--brand-color); }

html[data-theme="dark"] .site-header .theme-switch-track {
    background: #2b313b !important;
    border-color: #3d4552 !important;
}
html[data-theme="dark"] .site-header .theme-switch-thumb {
    background: #e6e8ec !important;
    border-color: #3d4552;
}


/* ── Login cards: fit the viewport ───────────────────────────────────
   The summons login ran off the bottom of the screen. The height was spread
   across a 150px seal, three stacked heading lines, a full-sentence
   instruction paragraph, a bordered date-of-birth fieldset and generous
   field gaps — none individually large, but they add up past a laptop's
   fold, and the Login button was below it.
   ──────────────────────────────────────────────────────────────────── */

.login-panel {
    align-items: flex-start !important;
    padding-top: 1.5rem !important;
    padding-bottom: 2.5rem !important;
}

.login-card {
    padding: 1.4rem 1.6rem !important;
}

/* The seal is identification, not decoration — it does not need to be the
   largest thing on the card. */
.login-logo {
    max-width: 76px !important;
    margin-bottom: .4rem !important;
}

.login-header .county-name {
    font-size: 1.05rem !important;
    margin-bottom: 0 !important;
    line-height: 1.25;
}
.login-header .county-info,
.login-header .county-title p {
    font-size: .88rem !important;
    margin: 0 !important;
    line-height: 1.35;
}

.login-instructions {
    font-size: .86rem !important;
    line-height: 1.5 !important;
    margin-top: .55rem !important;
}

/* The brand rule added earlier was costing a full line of height here. */
.login-header::after {
    margin: .6rem auto .1rem !important;
}

.login-card-body { margin-top: .35rem; }

.login-page .login-form { gap: .55rem !important; }
.login-page .field { gap: .25rem !important; }

.login-page label {
    font-size: .82rem !important;
    margin-bottom: 0 !important;
}

.login-page .input {
    padding: .55rem .7rem !important;
    font-size: .95rem;
}

.login-page .help-text {
    font-size: .76rem !important;
    margin-top: .1rem !important;
}

/* A bordered fieldset with a legend around three small selects is a lot of
   frame for very little content. */
.login-page .dob-selects {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: .5rem !important;
}
.login-page .dob-selects legend { display: none; }
.login-page .dob-group label { font-size: .68rem !important; }

.login-page .primary-action,
.login-page .btn-primary {
    margin-top: .5rem !important;
}

@media (max-height: 820px) {
    .login-logo { max-width: 62px !important; }
    .login-card { padding: 1.15rem 1.4rem !important; }
    .login-panel { padding-top: 1rem !important; }
}



/* 10DLC consent language beneath the SMS checkbox. Indented to line up with the
   checkbox text so it reads as belonging to that option rather than to the group. */
.consent-sms-disclosure {
    margin: .35rem 0 .75rem 1.9rem;
    padding: .65rem .8rem;
    background: var(--color-surface);
    border-left: 3px solid var(--brand-color);
    border-radius: 0 6px 6px 0;
    font-size: .82rem;
    line-height: 1.55;
    color: #4b5563;
}
.consent-sms-disclosure a {
    color: var(--brand-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 560px) {
    .consent-sms-disclosure { margin-left: 0; }
}


/* ── Home card refinements ───────────────────────────────────────────
   The body text was #3f4652 — a BLUE-tinted slate, which reads as navy next
   to maroon and made the card look like two brands. Warm greys sit with the
   county's colour instead of competing with it.
   ──────────────────────────────────────────────────────────────────── */

.home-card .home-body,
.home-card .home-body p {
    color: #4a4543 !important;
    font-size: .95rem;
    line-height: 1.7;
}

/* Balanced wrapping: the title was breaking into an awkward long line. */
.home-card h1 {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
    font-size: clamp(1.15rem, 2vw, 1.35rem) !important;
}

.home-card .home-sub {
    color: #7a736f;
    font-size: .86rem;
    letter-spacing: .01em;
}

.home-card .home-seal {
    width: 72px;
    margin-bottom: .9rem;
}

/* A filled grey box for the commissioners was the heaviest element on a card
   whose job is to be quiet. A rule and a lighter tint carry the same grouping
   with far less weight. */
.home-commission {
    background: #faf8f7 !important;
    border: 1px solid #eee9e7 !important;
    border-left: 3px solid var(--brand-color) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: .85rem 1.1rem !important;
    margin-bottom: 1.5rem !important;
}

.home-commission .home-commission-label {
    font-size: .64rem !important;
    letter-spacing: .09em !important;
    color: #96605f !important;
    margin-bottom: .45rem !important;
}

.home-commission li {
    color: #4a4543;
    font-size: .85rem;
    padding-left: 0;
}

/* Hairline above the actions so the buttons read as a step, not another
   paragraph. */
.home-actions {
    border-top: 1px solid #f0ecea;
    padding-top: 1.4rem !important;
    margin-top: 1.6rem !important;
}

.home-actions .primary-action {
    box-shadow: 0 1px 2px rgba(127, 21, 23, .25) !important;
    letter-spacing: .01em;
}

.home-contact {
    border-top: none !important;
    margin-top: 1rem !important;
    padding-top: 0 !important;
    color: #8c8482 !important;
    font-size: .8rem !important;
}

.home-card {
    padding: 2.25rem 2.5rem 1.9rem !important;
    border: 1px solid rgba(255,255,255,.55);
}

.home-rule {
    height: 2px !important;
    width: 30px !important;
    margin: .9rem auto 1.4rem !important;
    opacity: .85;
}

@media (max-width: 640px) {
    .home-card { padding: 1.6rem 1.3rem 1.5rem !important; }
    .home-commission { border-radius: 0 6px 6px 0 !important; }
}


/* ── Commissioners: centred, no box ──────────────────────────────────
   A left-ruled panel pulled the eye left while everything above it — seal,
   title, subtitle, rule — is centred. It is a roster, not a callout, so it
   does not need a container at all: centred text with a hairline above and
   below groups it just as clearly and keeps the card's axis intact.
   ──────────────────────────────────────────────────────────────────── */

.home-commission {
    background: none !important;
    border: none !important;
    border-top: 1px solid #f0ecea !important;
    border-bottom: 1px solid #f0ecea !important;
    border-radius: 0 !important;
    text-align: center !important;
    padding: 1rem 0 .95rem !important;
    margin: 0 0 1.5rem !important;
}

.home-commission .home-commission-label {
    text-align: center;
    margin-bottom: .55rem !important;
}

.home-commission ul {
    display: inline-block;
    text-align: center;
}

.home-commission li {
    margin-bottom: .25rem;
    line-height: 1.45;
}


/* ── Home card: fit a laptop viewport ────────────────────────────────
   The card ran past the fold on a 1366x768 screen. No single element was
   oversized; the height came from generous line-height, paragraph margins,
   seal size and card padding all together. Trimmed proportionally rather
   than shrinking one thing dramatically.
   ──────────────────────────────────────────────────────────────────── */

.home-hero {
    padding-top: 1.25rem !important;
    padding-bottom: 1.75rem !important;
    align-items: center !important;
}

.home-card {
    padding: 1.6rem 2.25rem 1.5rem !important;
}

.home-card .home-seal {
    width: 56px !important;
    margin-bottom: .6rem !important;
}

.home-card h1 {
    font-size: clamp(1.05rem, 1.7vw, 1.2rem) !important;
    line-height: 1.3 !important;
}

.home-card .home-sub { font-size: .82rem !important; }

.home-rule { margin: .7rem auto .85rem !important; }

.home-commission {
    padding: .7rem 0 .65rem !important;
    margin-bottom: 1rem !important;
}
.home-commission .home-commission-label { margin-bottom: .35rem !important; }
.home-commission li { font-size: .82rem; margin-bottom: .1rem; }

.home-card .home-body,
.home-card .home-body p {
    font-size: .89rem !important;
    line-height: 1.55 !important;
}
.home-card .home-body p { margin-bottom: .6rem !important; }
.home-card .home-body p:last-child { margin-bottom: 0 !important; }

.home-actions {
    padding-top: 1rem !important;
    margin-top: 1.1rem !important;
}

.home-actions .primary-action,
.home-actions .home-secondary {
    min-height: 40px !important;
    padding: .55rem 1.1rem !important;
    font-size: .9rem;
}

.home-contact {
    margin-top: .8rem !important;
    font-size: .77rem !important;
}

/* Short screens — 1366x768 and the like — get a further pass. */
@media (max-height: 800px) {
    .home-hero { padding-top: .75rem !important; padding-bottom: 1rem !important; }
    .home-card { padding: 1.2rem 2rem 1.15rem !important; }
    .home-card .home-seal { width: 46px !important; margin-bottom: .45rem !important; }
    .home-rule { margin: .55rem auto .7rem !important; }
    .home-commission { padding: .55rem 0 .5rem !important; margin-bottom: .8rem !important; }
    .home-card .home-body, .home-card .home-body p {
        font-size: .85rem !important;
        line-height: 1.5 !important;
    }
    .home-card .home-body p { margin-bottom: .5rem !important; }
    .home-actions { padding-top: .8rem !important; margin-top: .85rem !important; }
    .home-contact { margin-top: .6rem !important; }
}

/* ── Password show/hide toggle (PasswordField.razor) ───────────────────────── */

.pw-wrap {
    position: relative;
    display: block;
}

/* Room on the right for the button. Extra generous because password manager
   extensions (Keeper, 1Password, LastPass) inject their own icon into the same
   corner — leaving too little room stacks them on top of each other. */
.pw-input {
    width: 100%;
    padding-right: 4.25rem;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 2.25rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
}

    .pw-toggle:hover {
        color: var(--color-text);
        background: rgba(127, 127, 127, 0.14);
    }

    .pw-toggle:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring-light-surface);
    }

    .pw-toggle svg {
        width: 1.15rem;
        height: 1.15rem;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none;
        pointer-events: none;
    }

/* Edge and IE render their own reveal control, which would sit beside ours. */
.pw-input::-ms-reveal,
.pw-input::-ms-clear {
    display: none;
}

/* ── Account security actions (MfaSetup.razor) ─────────────────────────────── */

.mfa-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
}

/* The one obvious way out of this page. */
.btn-lg {
    padding: .9rem 2.25rem;
    font-size: 1.05rem;
}

/* Turning 2FA off is destructive and rare. Given the same weight as Done it
   invites a misclick from someone who only came to look. */
.mfa-danger-row {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.btn-linkish {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: .9rem;
    color: var(--color-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

    .btn-linkish:hover:not(:disabled) { color: #b32b1f; }

    .btn-linkish:disabled { opacity: .5; cursor: not-allowed; }

    .btn-linkish:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring-light-surface);
        border-radius: 4px;
    }

/* ── Questionnaire reminder banner (Dashboard.razor) ───────────────────────── */

.qbanner {
    display: flex;
    align-items: center;
    gap: .85rem;
    border-radius: 10px;
    padding: .8rem .95rem;
    margin: 0 0 1.25rem;
    border: 2px solid;
    /* One brief entrance, then still. A banner that animates continuously
       becomes wallpaper within seconds and causes real problems for people
       with vestibular disorders. Motion is disabled entirely below for
       anyone who has asked their OS for less of it. */
    animation: qbanner-in .45s ease-out both;
}

@keyframes qbanner-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.qbanner-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.qbanner-text { flex: 1 1 auto; min-width: 0; }

.qbanner-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.qbanner-sub {
    font-size: .875rem;
    margin-top: .15rem;
    line-height: 1.4;
}

.qbanner-action {
    flex: 0 0 auto;
    display: inline-block;
    padding: .55rem 1.15rem;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
}

    .qbanner-action:hover { filter: brightness(1.08); }

    .qbanner-action:focus-visible {
        outline: none;
        box-shadow: var(--focus-ring-light-surface);
    }

/* ---- Not started ---- */
.qbanner-todo {
    background: #FCEBEB;
    border-color: #b32b1f;
}

    .qbanner-todo .qbanner-icon { background: #b32b1f; color: #fff; }
    .qbanner-todo .qbanner-title { color: #791F1F; }
    .qbanner-todo .qbanner-sub { color: #501313; }
    .qbanner-todo .qbanner-action { background: #b32b1f; }

/* ---- Started, not submitted ---- */
.qbanner-progress {
    background: #FAEEDA;
    border-color: #BA7517;
}

    .qbanner-progress .qbanner-icon { background: #854F0B; color: #fff; }
    .qbanner-progress .qbanner-title { color: #633806; }
    .qbanner-progress .qbanner-sub { color: #412402; }
    .qbanner-progress .qbanner-action { background: #854F0B; }

/* ---- Three days or fewer: the only state that keeps moving ----
   Motion is reserved for genuine urgency, so it still means something
   when it shows up. The pulse is on the button, not the whole banner. */
.qbanner-urgent .qbanner-action {
    animation: qbanner-pulse 2.4s ease-in-out infinite;
}

@keyframes qbanner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(179, 43, 31, 0.45); }
    50%      { box-shadow: 0 0 0 7px rgba(179, 43, 31, 0); }
}

/* ---- Dark mode ---- */
html[data-theme="dark"] .qbanner-todo {
    background: #2e1a19;
    border-color: #b32b1f;
}

    html[data-theme="dark"] .qbanner-todo .qbanner-title { color: #F7C1C1; }
    html[data-theme="dark"] .qbanner-todo .qbanner-sub { color: #e0b3b0; }

html[data-theme="dark"] .qbanner-progress {
    background: #2e2517;
    border-color: #BA7517;
}

    html[data-theme="dark"] .qbanner-progress .qbanner-title { color: #FAC775; }
    html[data-theme="dark"] .qbanner-progress .qbanner-sub { color: #ddc9a8; }

/* ---- Narrow screens: stack, full-width button ---- */
@media (max-width: 640px) {
    .qbanner {
        flex-wrap: wrap;
        gap: .6rem;
    }

    .qbanner-action {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qbanner,
    .qbanner-urgent .qbanner-action {
        animation: none;
    }
}

/* ---- Questionnaire received ----
   No action button: there is nothing for the juror to do, and a button here
   would only invite a second submission. */
.qbanner-done {
    background: #E1F5EE;
    border-color: #0F6E56;
}

    .qbanner-done .qbanner-icon { background: #0F6E56; color: #fff; }
    .qbanner-done .qbanner-title { color: #085041; }
    .qbanner-done .qbanner-sub { color: #04342C; }

html[data-theme="dark"] .qbanner-done {
    background: #17302a;
    border-color: #1D9E75;
}

    html[data-theme="dark"] .qbanner-done .qbanner-title { color: #9FE1CB; }
    html[data-theme="dark"] .qbanner-done .qbanner-sub { color: #b8d9cd; }

/* A request tile that isn't available right now (another request is pending): readable, not clickable */
.dashboard-card-locked {
    opacity: .7;
    cursor: default;
    background: var(--color-surface-muted, #f5f5f5);
}
.dashboard-card-locked h3 { color: var(--color-muted, #555); }

/* The juror portal is light-only: browser form controls and scrollbars stay light too,
   even on a device set to dark mode. */
:root { color-scheme: light; }
