/* ARM conditional execution — Sophie Wilson's ruthless efficiency, made visible.
   To keep the larger of two numbers an ordinary CPU compares, then *branches*; a
   taken branch can flush the pipeline and waste cycles. The ARM instruction set
   Wilson designed lets almost every instruction carry its own condition, so the
   same job runs branch-free: both candidate MOVs are decoded, the condition decides
   which one writes, and the pipeline never stalls. Doing more with simpler, smaller
   hardware is the whole bet. Vanilla JS, no deps, no build.
   Palette shared with siblings: cyan = active/executed, green = the value that wins
   (the win), dim = decoded-but-discarded. No red. */

#arm-conditional {
  --ac-active: #5ac8fa;
  --ac-win: #30d158;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  background: var(--color-bg-elevated, #111111);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-radius: 16px; padding: clamp(16px, 3vw, 26px); margin: 2.5rem 0;
  color: var(--color-text-primary, #ffffff);
}
.ac-title { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.ac-explain { font-size: 0.9rem; line-height: 1.55; margin: 8px 0 16px; color: var(--color-text-secondary, rgba(255,255,255,0.7)); }

.ac-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.ac-vals { font-family: var(--font-mono, monospace); font-size: 0.95rem; }
.ac-vals b { color: var(--ac-active); }
.ac-shuffle { appearance: none; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--color-border, rgba(255,255,255,0.16)); background: var(--color-bg-surface, #1a1a1a); color: var(--color-text-secondary, rgba(255,255,255,0.8)); padding: 6px 12px; border-radius: 8px; transition: border-color 0.18s, color 0.18s; }
.ac-shuffle:hover { color: #fff; border-color: var(--ac-active); }

.ac-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--color-bg-surface, #1a1a1a); margin-bottom: 16px; }
.ac-mode { appearance: none; cursor: pointer; font: inherit; font-size: 0.84rem; font-weight: 600; border: 0; background: transparent; color: var(--color-text-secondary, rgba(255,255,255,0.55)); padding: 7px 14px; border-radius: 7px; transition: color 0.18s, background 0.18s; }
.ac-mode:hover { color: var(--color-text-primary, #fff); }
.ac-mode.is-on { color: #0b0b0b; background: var(--color-accent, #fff); }

.ac-code { font-family: var(--font-mono, monospace); font-size: 0.84rem; line-height: 1.05; background: #0c0c0f; border: 1px solid var(--color-border-subtle, rgba(255,255,255,0.08)); border-radius: 10px; padding: 8px; }
.ac-line { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--color-text-tertiary, rgba(255,255,255,0.40)); border-left: 2px solid transparent; }
.ac-line .ac-mn { white-space: pre; }
.ac-line.exec { color: var(--color-text-primary, #fff); background: rgba(90,200,250,0.08); border-left-color: var(--ac-active); }
.ac-line.win { color: var(--ac-win); background: rgba(48,209,88,0.10); border-left-color: var(--ac-win); }
.ac-line.discard { color: var(--color-text-tertiary, rgba(255,255,255,0.32)); }
.ac-tag { margin-left: auto; font-family: var(--font-family, sans-serif); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; }
.ac-tag.flush { color: var(--ac-active); background: rgba(90,200,250,0.14); }
.ac-tag.wins { color: var(--ac-win); background: rgba(48,209,88,0.14); }
.ac-tag.skip { color: var(--color-text-tertiary, rgba(255,255,255,0.4)); }

.ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; }
.ac-stat { background: var(--color-bg-surface, #1a1a1a); border: 1px solid var(--color-border-subtle, rgba(255,255,255,0.08)); border-radius: 10px; padding: 10px 12px; }
.ac-stat .ac-k { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-tertiary, rgba(255,255,255,0.45)); margin-bottom: 4px; }
.ac-stat .ac-v { font-family: var(--font-mono, monospace); font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.ac-stat.good .ac-v { color: var(--ac-win); }

.ac-caption { margin-top: 14px; font-size: 0.9rem; line-height: 1.55; color: var(--color-text-secondary, rgba(255,255,255,0.78)); min-height: 2.6em; }
.ac-caption b { color: #fff; }
.ac-caption .ac-hl { color: var(--ac-win); font-weight: 650; }
.ac-noscript { font-size: 0.9rem; color: var(--color-text-secondary, rgba(255,255,255,0.65)); line-height: 1.6; }
