:root {
    --llm-bg: #f3f7fb;
    --llm-surface: #ffffff;
    --llm-ink: #0f172a;
    --llm-muted: #526070;
    --llm-line: #dbe5f0;
    --llm-brand: #1d4ed8;
    --llm-brand-soft: #dbeafe;
    --llm-accent: #0f766e;
    --llm-warning: #b45309;
    --llm-warning-soft: #fff7ed;
    --llm-q: #ef4444;
    --llm-k: #3b82f6;
    --llm-v: #10b981;
    --llm-out: #8b5cf6;
    --llm-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body.llm-course-body {
    background: var(--llm-bg);
    color: var(--llm-ink);
}

.llm-page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 12px 48px;
}

.llm-hero {
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 56%, #f1fffb 100%);
    border: 1px solid #d8e6f4;
    border-radius: 22px;
    padding: 32px;
    box-shadow: var(--llm-shadow);
}

.llm-eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--llm-brand-soft);
    color: var(--llm-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.llm-hero h1 {
    margin: 14px 0 12px;
    font-size: 2.2rem;
    line-height: 1.18;
}

.llm-hero p {
    margin: 0;
    color: var(--llm-muted);
    line-height: 1.9;
    font-size: 16px;
}

.llm-hero-actions,
.llm-chip-row,
.llm-link-row,
.llm-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.llm-hero-actions {
    margin-top: 22px;
}

.llm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--llm-brand);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.llm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.22);
}

.llm-btn.secondary {
    background: #ffffff;
    border-color: var(--llm-line);
    color: var(--llm-ink);
}

.llm-chip-row {
    margin-top: 18px;
}

.llm-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbeafe;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 600;
}

.llm-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.llm-stat-tile {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbeafe;
}

.llm-stat-tile strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    color: #0f172a;
    margin-bottom: 8px;
}

.llm-stat-tile span {
    color: #526070;
    font-size: 14px;
}

.llm-section {
    margin-top: 22px;
    background: var(--llm-surface);
    border: 1px solid var(--llm-line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.llm-section h2 {
    margin: 0 0 14px;
    font-size: 1.7rem;
    scroll-margin-top: 92px;
}

.llm-course-compass {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f5fffb 100%);
}

.llm-compass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.llm-compass-card {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 16px;
    padding: 18px;
}

.llm-compass-card h3 {
    margin: 10px 0 8px;
}

.llm-compass-card p {
    margin: 0;
    color: var(--llm-muted);
    line-height: 1.8;
}

.llm-progress-track {
    margin-top: 14px;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.llm-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8 0%, #0f766e 100%);
}

.llm-phase-jump-list,
.llm-outline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.llm-phase-link,
.llm-outline-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--llm-line);
    text-decoration: none;
    color: var(--llm-ink);
    font-size: 13px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.llm-phase-link:hover,
.llm-outline-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}

.llm-phase-link.is-current {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.llm-phase-link.is-disabled {
    background: #f8fafc;
    color: #94a3b8;
}

.llm-section p {
    color: var(--llm-muted);
    line-height: 1.9;
}

.llm-grid-2,
.llm-grid-3,
.llm-grid-4 {
    display: grid;
    gap: 16px;
}

.llm-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.llm-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.llm-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.llm-card {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 18px;
    padding: 20px;
}

.llm-card h3,
.llm-card h4 {
    margin: 0 0 10px;
}

.llm-card p,
.llm-card li {
    color: var(--llm-muted);
    line-height: 1.85;
}

.llm-note,
.llm-warning,
.llm-summary {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    line-height: 1.85;
}

.llm-note {
    background: #f8fbff;
    border-left: 4px solid var(--llm-brand);
    color: var(--llm-muted);
}

.llm-warning {
    background: var(--llm-warning-soft);
    border-left: 4px solid #f59e0b;
    color: var(--llm-warning);
}

.llm-summary {
    background: #f5f3ff;
    border-left: 4px solid var(--llm-out);
    color: #5b21b6;
}

.llm-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.llm-badge.live {
    background: #dcfce7;
    color: #166534;
}

.llm-badge.planned {
    background: #e5e7eb;
    color: #4b5563;
}

.llm-badge.legacy {
    background: #ede9fe;
    color: #6d28d9;
}

.llm-roadmap-phase {
    margin-top: 18px;
}

.llm-roadmap-phase h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.llm-roadmap-phase > p {
    margin: 0 0 14px;
}

.llm-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.llm-roadmap-card {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.llm-roadmap-card.is-link {
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.llm-roadmap-card.is-link:hover {
    transform: translateY(-2px);
    border-color: #bdd3f5;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.llm-roadmap-card.is-disabled {
    opacity: .84;
}

.llm-roadmap-card h4 {
    margin: 0;
    font-size: 18px;
}

.llm-roadmap-card p {
    margin: 0;
    color: var(--llm-muted);
}

.llm-meta {
    font-size: 13px;
    color: #64748b;
}

.llm-link-row a,
.llm-inline-link {
    color: var(--llm-brand);
    text-decoration: none;
    font-weight: 600;
}

.llm-link-row a:hover,
.llm-inline-link:hover {
    text-decoration: underline;
}

.llm-stack-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.llm-stack-list {
    display: grid;
    gap: 12px;
}

.llm-stack-item {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.llm-stack-item:hover,
.llm-stack-item.active {
    border-color: #b9cff4;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.llm-stack-item .llm-mini-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #eff6ff;
    color: var(--llm-brand);
}

.llm-detail-panel {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border: 1px solid var(--llm-line);
    border-radius: 18px;
    padding: 22px;
    min-height: 300px;
}

.llm-detail-panel h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.llm-list {
    margin: 12px 0 0;
    padding-left: 18px;
}

.llm-list li {
    margin: 8px 0;
}

.llm-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.llm-timeline-step {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 16px;
    padding: 16px;
}

.llm-timeline-step .step-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--llm-brand);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
}

.llm-pager {
    margin-top: 16px;
}

.llm-pager a,
.llm-pager span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--llm-line);
    text-decoration: none;
    color: var(--llm-ink);
    font-weight: 600;
}

.llm-pager .llm-pager-meta {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.llm-pager span.is-disabled {
    color: #94a3b8;
    background: #f8fafc;
}

.llm-token-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.llm-token {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--llm-line);
    color: #334155;
    font-size: 14px;
}

.llm-token-index {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.llm-probability-bars {
    display: grid;
    gap: 12px;
}

.llm-probability-bar {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 70px;
    gap: 12px;
    align-items: center;
}

.llm-probability-bar .bar-track {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.llm-probability-bar .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0%, #1d4ed8 100%);
}

.llm-matrix {
    display: inline-grid;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--llm-line);
}

.llm-matrix-cell {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe5ee;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
}

.llm-matrix-cell.is-row {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
}

.llm-matrix-cell.is-col {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.32);
}

.llm-matrix-cell.is-focus {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.4);
    font-weight: 700;
}

.llm-demo-toolbar,
.llm-pill-group,
.llm-token-line,
.llm-progress-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.llm-demo-toolbar {
    margin-top: 16px;
    align-items: center;
}

.llm-pill-btn {
    border: 1px solid var(--llm-line);
    background: #ffffff;
    color: var(--llm-ink);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.llm-pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}

.llm-pill-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.llm-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--llm-brand);
    font-size: 12px;
    font-weight: 700;
}

.llm-matrix-layout,
.llm-split-panel,
.llm-callout-grid,
.llm-kv-grid {
    display: grid;
    gap: 16px;
}

.llm-matrix-layout,
.llm-split-panel {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: start;
}

.llm-callout-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.llm-kv-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 14px;
}

.llm-formula-card,
.llm-callout-card,
.llm-kv-item,
.llm-rel-item,
.llm-bpe-row {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 16px;
    padding: 18px;
}

.llm-formula-card {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.llm-formula-card h3,
.llm-callout-card h3,
.llm-kv-item h4 {
    margin: 0 0 10px;
}

.llm-formula,
.llm-mono {
    font-family: "Consolas", "Monaco", monospace;
}

.llm-stage-rail,
.llm-slider-grid,
.llm-stat-grid,
.llm-compare-grid,
.llm-source-grid,
.llm-trace-grid {
    display: grid;
    gap: 14px;
}

.llm-stage-rail {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 16px;
}

.llm-slider-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 16px;
}

.llm-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-top: 14px;
}

.llm-compare-grid,
.llm-source-grid,
.llm-trace-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 16px;
}

.llm-stage-card,
.llm-slider-card,
.llm-stat-card,
.llm-compare-card,
.llm-source-card,
.llm-trace-card {
    background: #ffffff;
    border: 1px solid var(--llm-line);
    border-radius: 16px;
    padding: 16px;
}

.llm-stage-card {
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.llm-stage-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.llm-stage-card.active {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.08);
}

.llm-stage-index {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.llm-stage-card.active .llm-stage-index {
    background: #1d4ed8;
    color: #ffffff;
}

.llm-stage-card h3,
.llm-slider-card h3,
.llm-stat-card h3,
.llm-compare-card h3,
.llm-source-card h3,
.llm-trace-card h3 {
    margin: 10px 0 8px;
}

.llm-stage-card p,
.llm-slider-card p,
.llm-stat-card p,
.llm-compare-card p,
.llm-source-card p,
.llm-trace-card p {
    margin: 0;
    color: var(--llm-muted);
    line-height: 1.8;
}

.llm-formula {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    line-height: 1.8;
    word-break: break-word;
}

.llm-token-line,
.llm-sentence-strip {
    margin-top: 16px;
}

.llm-sentence-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.llm-sentence-token {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--llm-line);
    color: #334155;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.llm-sentence-token.is-focus {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.llm-sentence-token.is-target {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.llm-sentence-token.is-secondary {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.llm-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.llm-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.llm-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.swatch-row {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
}

.swatch-col {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.32);
}

.swatch-focus {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.4);
}

.llm-bar-list,
.llm-rank-list,
.llm-rel-list,
.llm-bpe-stack {
    display: grid;
    gap: 10px;
}

.llm-bar-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 60px;
    gap: 12px;
    align-items: center;
}

.llm-bar-row .bar-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.llm-bar-row .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #1d4ed8 100%);
}

.llm-bar-row.is-focus .bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.llm-table-wrap {
    overflow-x: auto;
    margin-top: 16px;
}

.llm-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.llm-table th,
.llm-table td {
    border: 1px solid var(--llm-line);
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
}

.llm-table thead th {
    background: #f8fafc;
    font-weight: 700;
}

.llm-table tbody tr.is-active th,
.llm-table tbody tr.is-active td {
    background: #f8fbff;
}

.llm-table td.is-best {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
}

.llm-rank-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 84px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--llm-line);
    border-radius: 14px;
    background: #ffffff;
}

.llm-rank-item.is-top {
    background: #eff6ff;
    border-color: #93c5fd;
}

.rank-no {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.llm-rank-item.is-top .rank-no {
    background: #1d4ed8;
    color: #ffffff;
}

.llm-bpe-row-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.llm-bpe-tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.llm-bpe-token,
.llm-progress-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #dbe5f0;
    color: #334155;
    font-size: 13px;
}

.llm-bpe-token.is-new {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
    font-weight: 700;
}

.llm-bpe-token.is-picked {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 700;
}

.llm-progress-chip.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.llm-mini-note {
    font-size: 13px;
    color: #64748b;
    line-height: 1.75;
}

.llm-range-control {
    margin-top: 12px;
}

.llm-range-control input[type="range"] {
    width: 100%;
}

.llm-range-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    color: #475569;
}

.llm-range-value {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.llm-output-box {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f5fffb 100%);
    border: 1px solid #dbe5f0;
}

.llm-output-box h3 {
    margin: 0 0 10px;
}

.llm-output-box p {
    margin: 0;
    line-height: 1.85;
}

.llm-kpi {
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
    margin-top: 8px;
}

.llm-answer-box {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--llm-line);
    background: #ffffff;
}

.llm-answer-box h3 {
    margin: 0 0 10px;
}

.llm-answer-box p {
    margin: 0;
    line-height: 1.85;
}

.llm-answer-box.is-grounded {
    background: linear-gradient(135deg, #f5fffb 0%, #ffffff 60%, #f8fbff 100%);
    border-color: #b7e4d7;
}

.llm-answer-box.is-ungrounded {
    background: linear-gradient(135deg, #fffaf5 0%, #ffffff 60%, #fff7ed 100%);
    border-color: #fdba74;
}

.llm-citation-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.llm-citation-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.llm-source-card.is-picked {
    border-color: #93c5fd;
    background: #f8fbff;
}

.llm-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.llm-source-score {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.llm-json-box,
.llm-trace-box {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    line-height: 1.75;
    overflow-x: auto;
}

.llm-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.llm-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #dbe5f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.llm-status-pill.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.llm-status-pill.warn {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

body.llm-course-body > footer {
    margin-top: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #eef4fb 100%);
    border-top: 1px solid #d7e3f0;
}

body.llm-course-body > footer .footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 28px;
}

body.llm-course-body > footer .simlabs-footer-links {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding: 0 0 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid #dbe5f0;
}

body.llm-course-body > footer .simlabs-footer-links > div {
    min-width: 180px;
}

body.llm-course-body > footer .simlabs-footer-links h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #0f172a;
}

body.llm-course-body > footer .simlabs-footer-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.llm-course-body > footer .simlabs-footer-links li {
    margin: 8px 0;
}

body.llm-course-body > footer .simlabs-footer-links a {
    color: #475569;
    text-decoration: none;
    transition: color .18s ease;
}

body.llm-course-body > footer .simlabs-footer-links a:hover {
    color: var(--llm-brand);
}

body.llm-course-body > footer .copyright {
    width: 100%;
    text-align: center;
    color: #64748b;
    padding: 12px 0 0;
    font-size: 14px;
    line-height: 1.8;
}

body.llm-course-body > footer .copyright a {
    color: inherit;
    text-decoration: none;
}

body.llm-course-body > footer .copyright a:hover {
    color: var(--llm-brand);
}

@media (max-width: 768px) {
    .llm-page-shell {
        padding: 16px 6px 36px;
    }

    .llm-hero,
    .llm-section {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .llm-hero h1 {
        font-size: 1.75rem;
    }

    .llm-stack-grid {
        grid-template-columns: 1fr;
    }

    .llm-probability-bar {
        grid-template-columns: 70px minmax(0, 1fr) 56px;
        gap: 8px;
    }

    .llm-bar-row {
        grid-template-columns: 70px minmax(0, 1fr) 52px;
        gap: 8px;
    }

    .llm-table {
        min-width: 560px;
    }

    body.llm-course-body > footer .footer-content {
        padding: 20px 16px 24px;
    }

    body.llm-course-body > footer .simlabs-footer-links {
        gap: 24px;
        justify-content: flex-start;
    }

    body.llm-course-body > footer .simlabs-footer-links > div {
        min-width: 0;
        width: 100%;
    }
}
