:root {
    --cct-log-dark: #09070d;
    --cct-log-panel: #fffaf2;
    --cct-log-ember: #E69F4D;
    --cct-log-fire: #d87516;
    --cct-log-blue: #1a5c8a;
    --cct-log-cyan: #4db6e8;
    --cct-log-green: #2f8f5b;
    --cct-log-ink: #24180f;
}

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

#hero {
    background:
        linear-gradient(135deg, rgba(9,7,13,0.90) 0%, rgba(65,30,8,0.76) 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(--cct-log-dark);
    border-bottom: 2px solid var(--cct-log-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(--cct-log-ember);
    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;
}

.log-container {
    margin: 0 auto;
    max-width: 900px;
    padding: 0 1rem 4rem;
}

.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(--cct-log-ember);
    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-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(--cct-log-blue);
}

.decision-box {
    background: var(--cct-log-panel);
    border-left: 5px solid var(--cct-log-ember);
}

.critique-box {
    background: rgba(77,182,232,0.08);
    border: 1px solid rgba(77,182,232,0.18);
    border-left: 5px solid var(--cct-log-cyan);
}

.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(--cct-log-blue); }
.decision-label { color: #8a6010; }
.critique-label { color: #1a5c8a; }

.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(--cct-log-fire); }
.spark-p { background: #eafaf1; border-left: 5px solid var(--cct-log-green); }
.spark-a { background: #eef7ff; border-left: 5px solid var(--cct-log-cyan); }
.spark-r { background: #fffaf2; border-left: 5px solid var(--cct-log-ember); }
.spark-k { background: rgba(216,117,22,0.10); border-left: 5px solid var(--cct-log-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;
}

.chat-speaker.copilot {
    color: #145A32;
}

.chat-bubble {
    border-radius: 12px;
    display: inline-block;
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 92%;
    padding: 0.75rem 1rem;
}

.bubble-user-wrap {
    text-align: right;
}

.bubble-user-wrap .chat-bubble {
    text-align: left;
}

.bubble-user {
    background: #fff4df;
    border: 1px solid #efd2a3;
    border-bottom-right-radius: 3px;
    color: #2b1b10;
}

.bubble-copilot {
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-bottom-left-radius: 3px;
    color: #1a2a1a;
}

.chat-bubble p:last-child,
.spark-banner p:last-child,
.aside-box p:last-child,
.decision-box p:last-child,
.critique-box p:last-child {
    margin-bottom: 0;
}

code {
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    color: #8a3d08;
    font-size: 0.88em;
    padding: 1px 5px;
}

.file-table {
    font-size: 0.85rem;
}

.file-table td:first-child {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
}

@media (max-width: 575px) {
    .back-bar,
    .back-bar-links {
        justify-content: center;
        text-align: center;
    }

    .log-divider::before,
    .log-divider::after {
        width: 26px;
    }
}
