:root {
    --ims-dark: #0a0500;
    --ims-panel: #fffaf2;
    --ims-fire: #E76F00;
    --ims-glow: #FF8C00;
    --ims-gold: #FFC940;
    --ims-blue: #1a5c8a;
    --ims-ink: #24180f;
}

body {
    background: #f5f1eb;
    color: var(--ims-ink);
    font-family: 'Inter', sans-serif;
}

#hero {
    background:
        linear-gradient(135deg, rgba(10,5,0,0.90) 0%, rgba(60,28,4,0.72) 100%),
        url('../images/aiRobotMentoringHuman.jpg') center / cover no-repeat;
    color: #fff;
    min-height: 230px;
    padding: 3.4rem 1rem;
}

.back-bar {
    align-items: center;
    background: var(--ims-dark);
    border-bottom: 2px solid var(--ims-fire);
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: space-between;
    padding: 0.6rem 1.2rem;
}
.back-bar-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.back-bar a { color: var(--ims-gold); font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.back-bar a:hover { color: #fff; text-decoration: underline; }
.back-bar span { color: rgba(255,255,255,0.38); font-size: 0.8rem; }

.hero-eyebrow {
    color: rgba(255,255,255,0.58);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}
.hero-title {
    color: var(--ims-gold);
    font-family: 'Boogaloo', cursive;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.08;
    margin-bottom: 0.75rem;
}
.hero-subtitle { color: rgba(255,255,255,0.72); font-size: clamp(0.92rem, 2vw, 1.05rem); line-height: 1.65; margin: 0; }
.log-container { margin: 0 auto; max-width: 900px; padding: 0 1rem 4rem; }

.log-divider {
    color: #8d6a43;
    font-size: 0.78rem;
    letter-spacing: 2px;
    margin: 2.2rem 0 0.7rem;
    text-align: center;
    text-transform: uppercase;
}
.log-divider::before,
.log-divider::after { background: rgba(141,106,67,0.35); content: ''; display: inline-block; height: 1px; margin: 0 0.7rem; vertical-align: middle; width: 52px; }

.aside-box,
.decision-box,
.critique-box {
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 1rem 0;
    padding: 0.95rem 1.15rem;
}
.aside-box { background: #fff; border: 1px solid rgba(80,40,16,0.12); border-left: 5px solid var(--ims-blue); }
.decision-box { background: var(--ims-panel); border-left: 5px solid var(--ims-gold); }
.critique-box { background: rgba(231,111,0,0.08); border-left: 5px solid var(--ims-fire); }
.box-label,
.decision-label,
.critique-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 0.35rem; text-transform: uppercase; }
.box-label { color: var(--ims-blue); }
.decision-label { color: #8a6010; }
.critique-label { color: #9a3e00; }

.spark-banner {
    align-items: flex-start;
    border-radius: 10px;
    display: flex;
    font-size: 0.9rem;
    gap: 0.9rem;
    margin: 1.6rem 0 0.7rem;
    padding: 0.9rem 1.1rem;
}
.spark-banner .spark-icon { flex-shrink: 0; font-size: 1.55rem; line-height: 1.2; }
.spark-banner strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.spark-s { background: #fff3e3; border-left: 5px solid var(--ims-fire); }
.spark-p { background: #eafaf1; border-left: 5px solid #2f8f5b; }
.spark-a { background: #eef7ff; border-left: 5px solid #4db6e8; }
.spark-r { background: #fffaf2; border-left: 5px solid var(--ims-gold); }
.spark-k { background: rgba(216,117,22,0.10); border-left: 5px solid var(--ims-fire); }

.chat-turn { margin: 0.5rem 0 1.2rem; }
.chat-speaker { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 0.3rem; text-transform: uppercase; }
.chat-speaker.user { color: #8a3d08; text-align: right; }
.bubble-user-wrap { text-align: right; }
.chat-bubble { border-radius: 12px; display: inline-block; font-size: 0.92rem; line-height: 1.6; max-width: 92%; padding: 0.75rem 1rem; text-align: left; }
.bubble-user { background: #fff4df; border: 1px solid #efd2a3; border-bottom-right-radius: 3px; color: #2b1b10; }

code { background: rgba(0,0,0,0.06); border-radius: 3px; color: #8a3d08; font-size: 0.88em; padding: 1px 5px; }
.aside-box p:last-child,
.decision-box p:last-child,
.critique-box p:last-child,
.spark-banner p:last-child,
.chat-bubble p:last-child { margin-bottom: 0; }
