:root {
    --primary: #222222;
    --accent: #1e87f0;
    --bg: #ffffff;
    --text: #333333;
    --light-gray: #f8f8f8;
    --border: #e5e5e5;
    --success: #32d296;
    --danger: #f0506e;
    --warning: #f9c513;
    --headings-font: 'Saira', sans-serif;
    --body-font: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* WiseReach Header & Logo */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.logo-link { text-decoration: none; }

.wisereach-logo {
    font-family: var(--headings-font);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent); /* Updated to WiseReach Blue per latest requirement */
    letter-spacing: -0.02em;
    text-transform: none;
}

.header-social {
    display: flex;
    gap: 1.25rem;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #666;
    transition: fill 0.2s;
}

.social-icon:hover {
    fill: var(--accent);
}

h1, h2, h3, .wisereach-logo {
    font-family: var(--headings-font);
}

.branded-title {
    color: var(--accent) !important; /* Forces WiseReach Blue for all titles */
    text-transform: uppercase;
    font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 1rem; }

.screen { display: none; }
.screen.active { display: flex; flex-direction: column; animation: fadeIn 0.4s ease-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    text-align: center;
    margin: auto 0;
}

.subtitle { font-size: 1.25rem; color: #666; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 2rem;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(30, 135, 240, 0.3);
    animation: slideUp 0.3s ease-out;
}

.btn-secondary:hover { 
    background: #0077e6; 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 135, 240, 0.4);
}

.btn-secondary:active { transform: translateY(0); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-container { margin-bottom: 3rem; }
.progress-bar {
    height: 4px;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}
#progress-text { font-size: 0.875rem; color: #999; margin-top: 0.5rem; display: block; }

.options-grid { display: grid; gap: 1rem; margin-top: 2rem; }

.option-btn {
    text-align: left;
    padding: 1.5rem;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-label-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.option-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.example-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #868e96;
    text-transform: uppercase;
    margin-right: 0.25rem;
}

.example-chip {
    font-size: 0.75rem;
    background: #f1f3f5;
    color: #495057;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    border: 1px solid #dee2e6;
}

.example-chip::before {
    content: "e.g. ";
    font-weight: 700;
    color: #868e96;
}

.option-btn:hover { border-color: var(--accent); background: #f0f7ff; }
.option-btn.selected { border-color: var(--accent); background: #eef4ff; outline: 2px solid var(--accent); }

/* Implication Alert */
.alert-hidden { display: none; }
.alert-visible {
    display: block;
    margin-top: 2rem;
    background: var(--light-gray);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-label { font-size: 0.75rem; font-weight: 800; color: var(--accent); letter-spacing: 0.05em; }
.next-step-label { font-size: 0.75rem; font-weight: 800; color: var(--success); letter-spacing: 0.05em; display: block; margin-top: 1rem; }
#next-step-text { font-weight: 600; color: var(--primary); margin-bottom: 0.5rem; }
.citation { font-size: 0.875rem; color: #777; font-style: italic; display: block; margin-top: 0.5rem; }

.hidden { display: none; }

/* Summary */
.summary-header { text-align: center; margin-bottom: 2rem; }

.status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.status-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-red { background-color: #fef4f6; border: 1px solid #fecaca; }
.status-red .status-indicator { background-color: var(--danger); box-shadow: 0 0 10px rgba(240, 80, 110, 0.4); }

.status-amber { background-color: #fffcf0; border: 1px solid #ffe082; }
.status-amber .status-indicator { background-color: var(--warning); box-shadow: 0 0 10px rgba(249, 197, 19, 0.4); }

.status-green { background-color: #f2fbf7; border: 1px solid #acf2bd; }
.status-green .status-indicator { background-color: var(--success); box-shadow: 0 0 10px rgba(50, 210, 150, 0.4); }

#risk-level-display { font-size: 2rem; color: var(--primary); margin: 0; }

.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.pill-red { background: #fef4f6; color: var(--danger); border: 1px solid #fecaca; }
.pill-amber { background: #fffcf0; color: #856404; border: 1px solid #ffe082; }
.pill-green { background: #f2fbf7; color: var(--success); border: 1px solid #acf2bd; }

.summary-question {
    display: block;
    font-size: 0.75rem;
    color: #888;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.answer-text {
    font-weight: 600;
    color: var(--primary);
}

table { width: 100%; border-collapse: collapse; margin-top: 1rem; margin-bottom: 2rem; }
th, td { text-align: left; padding: 1rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: #888; text-transform: uppercase; font-size: 0.75rem; }

.mitigation-box {
    background: #fffcf0;
    border: 1px solid #ffe082;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.mitigation-box h3 { margin-bottom: 1rem; color: #856404; }
.mitigation-box ul { padding-left: 1.5rem; }

.actions { display: flex; gap: 1rem; margin-top: 2rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); padding: 1rem 2rem; cursor: pointer; border-radius: 4px; font-weight: 600; }

/* Admin Editor */
.admin-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.admin-actions { display: flex; gap: 1rem; margin-top: 1rem; }

.admin-editor { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 5rem; }
.admin-question-block { background: #f8f9fa; border: 1px solid var(--border); padding: 1.5rem; border-radius: 8px; }
.admin-field-group { margin-bottom: 1rem; }
.admin-field-group label { display: block; font-size: 0.75rem; font-weight: 700; color: #666; text-transform: uppercase; margin-bottom: 0.25rem; }
.admin-input { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; font-size: 1rem; }
.admin-textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; font-size: 1rem; min-height: 80px; resize: vertical; }

.admin-options-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.admin-option-block { background: white; border: 1px solid var(--border); padding: 1rem; border-radius: 6px; }
.admin-option-title { font-weight: 700; margin-bottom: 1rem; color: var(--accent); }

@media (max-width: 600px) {
    .container { padding: 1rem; }
    h1 { font-size: 1.75rem; }
    .actions { flex-direction: column; }
    .admin-options-container { grid-template-columns: 1fr; }
}

@media print {
    .progress-container, #next-btn, .actions, #restart-btn, .main-header, .main-footer { display: none !important; }
    .screen { display: block !important; }
    #landing, #questionnaire { display: none !important; }
    body { background: white; }
    .container { max-width: 100%; padding: 0; }
}

.main-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    font-size: 0.875rem;
    color: #666;
}
