:root {
    --bg: #edf4f8;
    --panel: #ffffff;
    --panel-soft: #f7fafc;
    --primary: #0f4c75;
    --accent: #1b8f8a;
    --text: #17324a;
    --muted: #62798d;
    --border: #d7e2ea;
    --danger: #b23b2f;
    --danger-bg: #fceceb;
    --success: #1d7b55;
    --success-bg: #e8f7ef;
    --warning: #d49014;
    --warning-bg: #fff6df;
    --shadow: 0 14px 34px rgba(17, 53, 84, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(27, 143, 138, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(15, 76, 117, 0.08), transparent 220px),
        var(--bg);
}

.sim-shell {
    width: 100%;
    padding: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.topbar,
.hero,
.sim-main,
.sim-sidebar {
    padding: 22px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

.eyebrow,
.section-kicker {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand h1,
.hero h2,
.sim-main h2,
.sim-sidebar h3 {
    margin: 0;
}

.meta,
.hero-copy,
.narrative,
.focus-list,
.timeline,
.timeline li,
.feedback,
.progress-chip {
    color: var(--muted);
}

.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 11px 15px;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button.ghost,
.button.secondary {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary);
}

.button.primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #0f4c75, #1b8f8a);
    color: #fff;
    border-color: transparent;
}

.hero .eyebrow,
.hero h2,
.hero-copy {
    color: #fff;
}

.hero-copy {
    margin: 12px 0 0;
    line-height: 1.6;
    max-width: 900px;
    color: rgba(255,255,255,0.88);
}

.hero-stats {
    display: grid;
    gap: 10px;
}

.stat {
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.08);
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.stat-value {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.progress-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 12px;
    white-space: nowrap;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #e7edf2;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0 20px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.narrative {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-line;
}

.feedback {
    margin-top: 14px;
    border-radius: 16px;
    padding: 14px 16px;
    line-height: 1.55;
}

.feedback.safe {
    background: var(--success-bg);
    color: var(--success);
}

.feedback.warning {
    background: var(--warning-bg);
    color: #8a650f;
}

.feedback.critical {
    background: var(--danger-bg);
    color: var(--danger);
}

.choices {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.choice-btn {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-btn:hover {
    transform: translateY(-1px);
    border-color: #b4c9d7;
    box-shadow: 0 10px 24px rgba(17, 53, 84, 0.08);
}

.choice-title {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.choice-note {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.sim-footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.score-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.score-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.score-card strong {
    font-size: 1.3rem;
}

.focus-list,
.timeline {
    margin: 10px 0 20px 20px;
    padding: 0;
    line-height: 1.6;
}

.timeline li.active {
    color: var(--primary);
    font-weight: 700;
}

.timeline li.done {
    color: var(--accent);
}

@media (max-width: 960px) {
    .hero,
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sim-shell {
        padding: 12px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions {
        width: 100%;
    }

    .top-actions .button {
        flex: 1 1 calc(50% - 5px);
    }

    .sim-header {
        flex-direction: column;
    }

    .score-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .top-actions .button {
        flex-basis: 100%;
    }
}
