/* Attention Explorer — styles. Self-contained. */
* { box-sizing: border-box; }
:root { --ink:#202124; --muted:#5f6368; --line:#e0e0e0; --bg:#f7f8fa; --panel:#fff; --accent:#c2185b; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; }

.topbar { display:flex; align-items:center; gap:12px; padding:14px 24px; background:#3b0d24; color:#fff; }
.brand-mark { font-size:32px; }
.topbar h1 { margin:0; font-size:21px; font-weight:600; }
.tagline { margin:2px 0 0; font-size:13px; color:#e3b9cd; max-width:760px; }

.controls { display:flex; align-items:center; gap:20px; flex-wrap:wrap; padding:14px 24px; background:#fff; border-bottom:1px solid var(--line); }
.ctrl-label { font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); }
.ctrl-tokens { display:flex; align-items:center; gap:10px; }
.tokens { display:flex; gap:8px; flex-wrap:wrap; }
.tok-ctrl { display:flex; flex-direction:column; gap:2px; }
.tok-num { font-size:10px; color:var(--muted); }
.tok-ctrl select, .ctrl-inline select { padding:5px 8px; border:1px solid var(--line); border-radius:6px; font-size:13px; background:#fff; }
.ctrl-inline { display:inline-flex; flex-direction:column; gap:2px; }
.ghost-btn { padding:9px 14px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); cursor:pointer; font-size:13px; }
.ghost-btn:hover { background:#eef1f6; }

.pipeline { max-width:900px; margin:0 auto; padding:20px 24px 40px; }
.stage { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:16px; }
.stage h2 { margin:0 0 10px; font-size:16px; display:flex; align-items:center; gap:10px; }
.num { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--accent); color:#fff; font-size:13px; }
.stage-sub { font-size:13px; color:var(--muted); margin:0 0 10px; line-height:1.5; }

.row { display:flex; align-items:center; gap:10px; margin:5px 0; flex-wrap:wrap; }
.wlab { width:64px; font-size:13px; font-weight:600; color:var(--ink); text-align:right; }

/* vectors */
.vec { display:inline-flex; gap:2px; margin-right:12px; }
.cell { display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:24px; border-radius:4px; font-size:11px; font-variant-numeric:tabular-nums; color:#1a1a1a; }
.out-vec .cell { height:28px; min-width:46px; font-weight:600; }

/* matrices */
.mats { display:flex; gap:18px; flex-wrap:wrap; margin-bottom:12px; }
.mat-block { }
.mat-title { font-size:12px; font-weight:700; color:var(--accent); margin-bottom:4px; }
.mat-row { display:flex; gap:2px; margin-bottom:2px; }
.mcell { display:inline-flex; align-items:center; justify-content:center; width:30px; height:22px; border-radius:3px; font-size:10px; color:#1a1a1a; }

.qkv-head { display:flex; align-items:center; gap:10px; margin:6px 0 2px; }
.qkv-head .wlab { width:64px; }
.qkv-col { min-width:132px; font-size:11px; text-transform:uppercase; letter-spacing:.3px; color:var(--muted); }
.qkv-row.is-query { background:#fdeaf1; border-radius:8px; padding:3px 4px; }

/* scores table */
.score-tbl { border-collapse:collapse; font-size:13px; margin-bottom:10px; }
.score-tbl th, .score-tbl td { border:1px solid var(--line); padding:5px 12px; text-align:center; }
.score-tbl th { background:#faf0f4; font-weight:600; color:var(--muted); }
.score-tbl tr.top td { background:#fdeaf1; font-weight:700; }
.expand { font-size:13px; background:#f7f8fa; border:1px dashed var(--line); border-radius:8px; padding:10px 12px; font-variant-numeric:tabular-nums; }

/* softmax bars */
.bar-row { display:flex; align-items:center; gap:10px; margin:5px 0; }
.bar-track { flex:1; max-width:420px; height:20px; background:#f3e6ee; border-radius:5px; overflow:hidden; }
.bar-fill { display:block; height:100%; background:#e991b8; }
.bar-row.top .bar-fill { background:var(--accent); }
.bar-pct { width:44px; font-variant-numeric:tabular-nums; font-size:13px; }
.bar-row.top .bar-pct { font-weight:700; }

.footnote { font-size:12px; color:var(--muted); line-height:1.5; margin-top:6px; }
.footnote a { color:var(--accent); }
