:root { font-family: -apple-system, system-ui, sans-serif; }
body { margin: 0; background: #fafafa; color: #222; }
header { background: #2c3e50; color: #fff; padding: 8px 24px; }
.header-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 32px; }
.header-brand { font-size: 15px; font-weight: 800; letter-spacing: .12em;
color: #1abc9c; text-transform: uppercase; white-space: nowrap; margin-right: 4px;
text-decoration: none; }
a.header-brand:hover { text-decoration: underline; }
.header-title { font-size: 18px; font-weight: 500; white-space: nowrap; color: #d7e0ea;
display: inline-block; max-width: 340px; overflow: hidden;
text-overflow: ellipsis; vertical-align: middle; }
.header-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
font-size: 13px; color: #b8c5d2; }
header code { color: #1abc9c; }
.meta-info code { display: inline-block; max-width: 200px; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ml { color: #b8c5d2; }
.mc { color: #8ba6c0; font-size: 13px; }
.meta-info { color: #8ba6c0; font-size: 13px; }
.meta-mode { font: inherit; font-size: 13px; color: #ecf0f1; white-space: nowrap;
text-transform: lowercase; margin: 0 4px; order: 2; user-select: none;
background: #455a73; border: 0; border-radius: 4px; padding: 6px 14px;
cursor: pointer; transition: background .15s; }
.meta-mode:hover:not(:disabled) { background: #5d7593; }
.meta-mode:disabled { cursor: default; background: #3a4a5e; color: #8ba6c0; }
.snap-group[data-snap="baseline"] { order: 1; }
.snap-group[data-snap="current"] { order: 3; }
body.mode-review #meta-mode { order: 4; }
.snap-group { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 6px 11px;
transition: border-color .15s, box-shadow .15s; }
body.mode-review .snap-group { cursor: default; }
.snap-group.snap-active { border-color: #1abc9c; background: rgba(26,188,156,.20);
box-shadow: 0 0 0 1px rgba(26,188,156,.5) inset; }
.snap-edit { background: none; border: 0; color: #8ba6c0; cursor: pointer;
font-size: 18px; line-height: 1; padding: 1px 4px; border-radius: 4px; }
.snap-edit:hover { color: #fff; background: rgba(255,255,255,.18); }
#nav-prompt-btn { background: #455a73; color: #ecf0f1; border: 0; font-family: inherit;
padding: 3px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
border-radius: 4px; white-space: nowrap; }
#nav-prompt-btn:hover { background: #5d7593; }
.nav-ai-letters { color: #fff; font-weight: 700; display: inline-block;
animation: ai-pulse 2s ease-in-out infinite; }
@keyframes ai-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.nav-warn-count { margin-left: 6px; font-weight: 400; }
.nav-warn-count:empty { display: none; }
.custom-indicator { color: #f39c12; font-size: 12px; font-style: italic; order: 5; }
main { padding: 16px 24px 40px; }
.stats-bar {
display: flex; flex-wrap: wrap; gap: 2px 18px;
padding: 6px 14px; margin-bottom: 10px;
background: #fff; border: 1px solid #ddd; border-radius: 6px;
font-size: 12px; font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
}
.stats-bar:empty { display: none; }
.sg { display: flex; align-items: baseline; gap: 5px; }
.sg-label { font-weight: 600; color: #444; min-width: 84px; }
.sg-n { color: #aaa; font-size: 10px; }
.sg-n::before { content: '('; }
.sg-n::after { content: ' nodes)'; }
.sg-cell { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.sg-p { color: #999; font-size: 10px; min-width: 20px; text-align: right; }
.view { display: none; }
.view.active { display: block; }
.control-panel { background: #fff; border: 1px solid #ddd; padding: 10px 14px;
border-radius: 6px; margin-bottom: 12px; max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; align-items: center; }
.chips-label { font-weight: 600; min-width: 64px; font-size: 13px; color: #555; }
.chip { display: inline-block; padding: 3px 10px; font-size: 12px; line-height: 1.6;
border: 1px solid #bbb; border-radius: 14px; cursor: pointer;
user-select: none; background: #f4f4f4; color: #555; transition: .1s;
min-width: 108px; text-align: center; box-sizing: border-box; }
.chip:hover:not(.disabled) { background: #e8e8e8; }
.chip.active { color: #fff; background: #999; border-color: #777; }
.chip.disabled { opacity: 0.35; cursor: not-allowed; }
.chip[data-status="added"].active { background: #2a7a30; border-color: #1d5e22; }
.chip[data-status="removed"].active { background: #b45309; border-color: #78350f; }
.chip[data-status="unchanged"].active { background: #4d6f9c; border-color: #2c4768; }
.chip[data-status="affected"].active { background: #6b7280; border-color: #4b5563; }
.chip[data-cycle="baseline-only"].active { background: #e57373; border-color: #b35454; }
.chip[data-cycle="current-only"].active { background: #c00; border-color: #900; }
.chip[data-cycle="both"].active { background: #7a0000; border-color: #500000; }