/* styles.css — Dog Behavior Assessment Tool v2.0
   Clean, readable layout optimized for shelter use:
   - High contrast for varied lighting conditions
   - Clear visual hierarchy between input and output
   - Tier-colored result blocks for at-a-glance reading
   - Mobile-friendly (tablet use in shelter environment)
*/

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────── */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f4f4f0;
    padding-bottom: 3rem;
}

h1, h2, h3, h4 {
    line-height: 1.3;
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}


/* ─────────────────────────────────────────────────────────────
   UTILITY
───────────────────────────────────────────────────────────── */

.hidden {
    display: none !important;
}


/* ─────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────── */

header {
    background: #2c5f2e;
    color: white;
    padding: 1.25rem 1.5rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    max-width: 600px;
}


/* ─────────────────────────────────────────────────────────────
   MAIN LAYOUT
───────────────────────────────────────────────────────────── */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

section {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5f2e;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #2c5f2e;
}

.section-hint {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 1rem;
}


/* ─────────────────────────────────────────────────────────────
   CUE SECTION HEADER ROW
───────────────────────────────────────────────────────────── */

.cue-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #2c5f2e;
}

.cue-section-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.back-to-questions-button {
    background: none;
    border: none;
    color: #2c5f2e;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.back-to-questions-button:hover {
    color: #1a3d1c;
    text-decoration: underline;
}


/* ─────────────────────────────────────────────────────────────
   CUE CONTAINER — two-column grid
───────────────────────────────────────────────────────────── */

#cue-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    align-items: start;  /* each card is as tall as its own content */
}

@media (max-width: 640px) {
    #cue-container {
        grid-template-columns: 1fr;
    }
}


/* ─────────────────────────────────────────────────────────────
   CUE CATEGORIES
───────────────────────────────────────────────────────────── */

.cue-category {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0;   /* grid gap handles spacing now */
}

.cue-category h3 {
    font-weight: 600;
    color: #2c5f2e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}


/* ─────────────────────────────────────────────────────────────
   RADIO GROUPS
───────────────────────────────────────────────────────────── */

.radio-group {
    background: #f8f8f4;
    border: 1px solid #e0e0d8;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.radio-group:last-child {
    margin-bottom: 0;
}

.radio-group-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}


/* ─────────────────────────────────────────────────────────────
   CUE ITEMS (shared by radio + checkbox)
───────────────────────────────────────────────────────────── */

.cue-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}

.cue-item:hover {
    background: #f0f7f0;
}

.cue-item input[type="checkbox"],
.cue-item input[type="radio"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: #2c5f2e;
    cursor: pointer;
}

.cue-item span {
    flex: 1;
    font-size: 0.88rem;
    color: #1a1a1a;
    line-height: 1.3;
}


/* ─────────────────────────────────────────────────────────────
   INFO BUTTON (?)
───────────────────────────────────────────────────────────── */

.cue-info-button {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #999;
    background: white;
    color: #666;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cue-info-button:hover {
    background: #2c5f2e;
    color: white;
    border-color: #2c5f2e;
}


/* ─────────────────────────────────────────────────────────────
   CONTROLS
───────────────────────────────────────────────────────────── */

#controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: #2c5f2e;
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #234d25;
}

.btn-secondary {
    background: white;
    color: #444;
    border: 1.5px solid #ccc;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
    border-color: #888;
    color: #1a1a1a;
}

.debug-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    margin-left: auto;
}

.debug-control input {
    accent-color: #888;
}


/* ─────────────────────────────────────────────────────────────
   RESULTS SECTION
───────────────────────────────────────────────────────────── */

/* results-section visibility controlled by .hidden utility class */

.insufficient-message {
    background: #fff8e6;
    border: 1.5px solid #f0c040;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.insufficient-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.insufficient-message p {
    font-size: 0.95rem;
    color: #5a4000;
    line-height: 1.5;
}

.no-results {
    color: #888;
    font-style: italic;
    padding: 0.5rem 0;
}


/* ─────────────────────────────────────────────────────────────
   TIER HEADERS
───────────────────────────────────────────────────────────── */

.tier-header {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    display: inline-block;
}

.tier-header:first-child {
    margin-top: 0;
}

.tier-primary    { color: #1a3d1c; background: #d4edda; border-left: 4px solid #2c5f2e; }
.tier-contributing { color: #3d3000; background: #fff3cd; border-left: 4px solid #e6a817; }
.tier-weak       { color: #3a3a3a; background: #f0f0f0; border-left: 4px solid #aaa; }

.tier-header.tier-primary      { background: #2c5f2e; color: white; border-left: none; }
.tier-header.tier-contributing { background: #e6a817; color: white; border-left: none; }
.tier-header.tier-weak         { background: #888;    color: white; border-left: none; }


/* ─────────────────────────────────────────────────────────────
   RESULT BLOCKS
───────────────────────────────────────────────────────────── */

.result-block {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border: 1.5px solid transparent;
}

.result-block.tier-primary      { border-color: #2c5f2e; }
.result-block.tier-contributing { border-color: #e6a817; }
.result-block.tier-weak         { border-color: #ccc; }

.result-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.result-state-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
}

.confidence-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.confidence-high   { background: #d4edda; color: #1a3d1c; }
.confidence-medium { background: #fff3cd; color: #3d3000; }
.confidence-low    { background: #f0f0f0; color: #555; }
.confidence-none   { background: #f0f0f0; color: #999; }


/* ─────────────────────────────────────────────────────────────
   SCORE BAR
───────────────────────────────────────────────────────────── */

.score-bar-wrapper {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.score-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 4px;
}

.tier-primary-bar      { background: #2c5f2e; }
.tier-contributing-bar { background: #e6a817; }
.tier-weak-bar         { background: #aaa; }


/* ─────────────────────────────────────────────────────────────
   STATE DESCRIPTION
───────────────────────────────────────────────────────────── */

.result-state-description {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.55;
}


/* ─────────────────────────────────────────────────────────────
   INTERPRETATION BOX ("What This Means")
───────────────────────────────────────────────────────────── */

.interpretation-box {
    background: #eef6ee;
    border: 1.5px solid #2c5f2e;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.interpretation-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #2c5f2e;
    margin-bottom: 0.6rem;
}

.interpretation-text {
    font-size: 0.92rem;
    color: #1a3d1c;
    line-height: 1.6;
    margin-bottom: 0;
}

.interpretation-caution {
    font-size: 0.88rem;
    color: #5a3a00;
    background: #fff8e6;
    border-left: 3px solid #e6a817;
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    line-height: 1.55;
}

.interpretation-low-confidence {
    font-size: 0.82rem;
    color: #666;
    font-style: italic;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #b5d4b5;
    line-height: 1.5;
}


/* ─────────────────────────────────────────────────────────────
   CUE SUMMARY
───────────────────────────────────────────────────────────── */

.cue-summary {
    text-align: right;
    font-size: 0.82rem;
    color: #999;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}


/* ─────────────────────────────────────────────────────────────
   DEBUG PANEL
───────────────────────────────────────────────────────────── */

.debug-panel {
    margin-top: 0.75rem;
    border-top: 1px dashed #ddd;
    padding-top: 0.5rem;
}

.debug-panel summary {
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    user-select: none;
}

.debug-output {
    font-size: 0.75rem;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    white-space: pre-wrap;
    color: #444;
    max-height: 300px;
    overflow-y: auto;
}


/* ─────────────────────────────────────────────────────────────
   MODAL
───────────────────────────────────────────────────────────── */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    position: relative;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c5f2e;
    margin-bottom: 0.75rem;
    padding-right: 2rem;
    border-bottom: none;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    background: white;
    color: #666;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s;
}

.modal-close:hover {
    background: #eee;
}

.modal-scroll {
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #333;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    header h1 { font-size: 1.25rem; }
    main { padding: 1rem 0.75rem; }
    #controls { gap: 0.75rem; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    .debug-control { margin-left: 0; }
    .result-title-row { flex-direction: column; align-items: flex-start; }
}


/* ─────────────────────────────────────────────────────────────
   PRE-ASSESSMENT GATE SCREEN
───────────────────────────────────────────────────────────── */

#pre-assessment-screen h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5f2e;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #2c5f2e;
}

.gate-question-block {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.gate-question-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.gate-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gate-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    border: 1.5px solid #e0e0d8;
    background: #fafaf8;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.4;
}

.gate-option:hover {
    border-color: #2c5f2e;
    background: #f0f7f0;
}

.gate-option.selected {
    border-color: #2c5f2e;
    background: #e8f4e8;
}

.gate-option input[type="radio"] {
    margin-top: 0.15rem;
    accent-color: #2c5f2e;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.gate-option span {
    font-size: 0.95rem;
    color: #1a1a1a;
}

.gate-proceed-button {
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1rem;
}

.gate-bypass-link {
    display: block;
    background: none;
    border: none;
    color: #888;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
    text-align: left;
    transition: color 0.15s;
}

.gate-bypass-link:hover {
    color: #444;
}


/* ─────────────────────────────────────────────────────────────
   EXPAND / COLLAPSE BUTTON
───────────────────────────────────────────────────────────── */

.expand-collapse-button {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    background: none;
    border: 1.5px dashed #bbb;
    border-radius: 6px;
    color: #666;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.expand-collapse-button:hover {
    border-color: #2c5f2e;
    color: #2c5f2e;
    background: #f0f7f0;
}

.expand-collapse-button.hidden {
    display: none;
}


/* ─────────────────────────────────────────────────────────────
   SPLASH SCREEN
───────────────────────────────────────────────────────────── */

#splash-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

#splash-screen.hidden {
    display: none !important;
}

.splash-content {
    background: white;
    border-radius: 10px;
    padding: 2rem 2.25rem;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.splash-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c5f2e;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2c5f2e;
}

.splash-paragraph {
    font-size: 0.95rem;
    color: #1a1a1a;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.splash-paragraph:last-of-type {
    font-style: italic;
    font-weight: 600;
    color: #2c5f2e;
    margin-bottom: 1.5rem;
}

.splash-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}


/* ─────────────────────────────────────────────────────────────
   DATA ERROR SCREEN
───────────────────────────────────────────────────────────── */

#data-error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

#data-error-screen.hidden {
    display: none !important;
}

.data-error-content {
    background: #fff8f6;
    border: 2px solid #c0392b;
    border-radius: 8px;
    padding: 1.75rem 2rem;
    max-width: 560px;
    text-align: center;
}

.data-error-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #c0392b;
}

.data-error-content h2 {
    color: #c0392b;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.data-error-detail {
    font-size: 0.85rem;
    color: #555;
    white-space: pre-wrap;
    text-align: left;
    background: #f9f0ef;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}


/* ─────────────────────────────────────────────────────────────
   DOG ID ROW
───────────────────────────────────────────────────────────── */

.dog-id-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dog-id-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

.dog-id-input {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.4rem 0.65rem;
    border: 1.5px solid #ccc;
    border-radius: 5px;
    color: #1a1a1a;
    max-width: 320px;
}

.dog-id-input:focus {
    outline: none;
    border-color: #2c5f2e;
    box-shadow: 0 0 0 2px rgba(44,95,46,0.15);
}


/* ─────────────────────────────────────────────────────────────
   EXPORT BAR
───────────────────────────────────────────────────────────── */

.export-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.btn-export {
    background: white;
    border: 1.5px solid #aaa;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    color: #333;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn-export:hover {
    border-color: #2c5f2e;
    background: #f0f7f0;
    color: #2c5f2e;
}


/* ─────────────────────────────────────────────────────────────
   PRINT STYLES
───────────────────────────────────────────────────────────── */

.print-only {
    display: none;
}

@media print {

    @page {
        size: letter portrait;
        margin: 0.85in 1in;
    }

    /* Hide all interactive / screen-only elements */
    .no-print,
    #splash-screen,
    #data-error-screen,
    #pre-assessment-screen,
    #controls,
    #cue-section,
    .export-bar,
    .modal,
    .debug-panel,
    .debug-control,
    .cue-summary {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white;
        color: black;
        font-size: 11pt;
        font-family: Georgia, serif;
        margin: 0;
        padding: 0;
    }

    .print-header {
        border-bottom: 2pt solid #2c5f2e;
        padding-bottom: 6pt;
        margin-bottom: 12pt;
    }

    .print-header h1 {
        font-size: 16pt;
        color: #2c5f2e;
        margin: 0 0 2pt 0;
    }

    .dog-id-row {
        display: flex !important;
        margin-bottom: 8pt;
    }

    .dog-id-label {
        font-weight: bold;
    }

    #results-section {
        display: block !important;
    }

    #results-section h2 {
        font-size: 13pt;
        color: #2c5f2e;
        border-bottom: 1pt solid #2c5f2e;
        padding-bottom: 3pt;
        margin-bottom: 10pt;
    }

    .tier-header {
        font-size: 9pt;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #555;
        margin: 12pt 0 4pt 0;
        padding: 0;
        border: none;
        background: none;
    }

    .result-block {
        border: 1pt solid #ccc;
        border-radius: 4pt;
        padding: 6pt 8pt;
        margin-bottom: 6pt;
        page-break-inside: avoid;
    }

    .result-title-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
    }

    .result-state-name {
        font-size: 12pt;
        font-weight: bold;
        margin: 0 0 2pt 0;
    }

    .confidence-badge {
        font-size: 8pt;
        color: #666;
        border: none;
        background: none;
        padding: 0;
    }

    .score-bar-wrapper {
        display: block;
        background: #e8e8e8;
        border-radius: 2pt;
        height: 7pt;
        margin: 3pt 0 4pt 0;
        width: 100%;
        overflow: hidden;
    }

    .score-bar {
        height: 100%;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .tier-primary-bar    { background: #2c5f2e !important; }
    .tier-contributing-bar { background: #7a9e3b !important; }
    .tier-weak-bar       { background: #aaa !important; }

    .result-state-description {
        font-size: 9.5pt;
        color: #333;
        margin: 3pt 0 0 0;
        line-height: 1.4;
    }

    .interpretation-box {
        border: 1.5pt solid #2c5f2e;
        border-radius: 4pt;
        padding: 8pt 10pt;
        margin-top: 14pt;
        page-break-inside: avoid;
    }

    .interpretation-title {
        font-size: 10pt;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #2c5f2e;
        margin: 0 0 5pt 0;
    }

    .interpretation-text {
        font-size: 10pt;
        line-height: 1.5;
        margin: 0 0 4pt 0;
    }

    .interpretation-caution {
        font-size: 9.5pt;
        border-left: 2pt solid #c0392b;
        padding-left: 6pt;
        color: #333;
        margin: 6pt 0 0 0;
    }

    .interpretation-low-confidence {
        font-size: 9pt;
        font-style: italic;
        color: #666;
        margin: 6pt 0 0 0;
    }

    /* Print footer */
    main::after {
        content: "Generated by Dog Behavior Assessment Tool. Results should be considered alongside the judgment of a qualified shelter professional.";
        display: block;
        font-size: 8pt;
        color: #888;
        border-top: 1pt solid #ccc;
        padding-top: 6pt;
        margin-top: 18pt;
    }
}


/* ─────────────────────────────────────────────────────────────
   SITE FOOTER
───────────────────────────────────────────────────────────── */

.site-footer {
    margin-top: 3rem;
    border-top: 1px solid #ddd;
    background: #f5f5f0;
    padding: 1.25rem 1rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-appname {
    font-size: 0.88rem;
    font-weight: 700;
    color: #2c5f2e;
    margin-bottom: 0.3rem;
}

.footer-attribution {
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.footer-contact {
    font-size: 0.82rem;
    color: #555;
    margin: 0;
}

.footer-contact-link {
    background: none;
    border: none;
    color: #2c5f2e;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.footer-contact-link:hover {
    color: #1a3d1c;
}


/* ─────────────────────────────────────────────────────────────
   CONTACT MODAL
───────────────────────────────────────────────────────────── */

.contact-notice {
    font-size: 0.88rem;
    color: #888;
    font-style: italic;
    background: #f8f8f4;
    border: 1px solid #e0e0d8;
    border-radius: 5px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-form-inactive {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.contact-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-top: 0.4rem;
}

.contact-input,
.contact-textarea {
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem;
    border: 1.5px solid #ccc;
    border-radius: 5px;
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.contact-input:focus,
.contact-textarea:focus {
    outline: none;
    border-color: #2c5f2e;
    box-shadow: 0 0 0 2px rgba(44,95,46,0.15);
}

.contact-textarea {
    resize: vertical;
    min-height: 90px;
}

.contact-submit {
    margin-top: 0.5rem;
    align-self: flex-start;
    padding: 0.55rem 1.4rem;
}


/* ─────────────────────────────────────────────────────────────
   RESULTS LEGEND
───────────────────────────────────────────────────────────── */

.results-legend {
    background: #f8f8f4;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}

.legend-row {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.legend-row + .legend-row {
    margin-top: 0.2rem;
}

.legend-label {
    font-weight: 700;
    color: #333;
}

.legend-text {
    font-weight: normal;
}
