/* Kimi K3 course — Attention Residuals depth explorer. Pairs with attnres-sim.js.
   Uses the depth axis colour, per the course palette. */

.ares {
  background: #fbfaf4;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.1rem 1.3rem 1rem;
  margin: 2rem 0;
}

.ar-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ar-mode {
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.ar-mode:hover { border-color: var(--depth); color: var(--depth); }
.ar-mode.is-on {
  border-color: var(--depth);
  background: var(--depth-bg);
  color: var(--depth);
  font-weight: 600;
}

.ar-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--depth);
  color: var(--paper);
  border-radius: 2px;
  padding: 0.05rem 0.28rem;
  margin-left: 0.35rem;
  vertical-align: 1px;
}

.ar-ctl {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.ar-ctl label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.ar-ctl input[type="range"] { flex: 1; accent-color: var(--depth); cursor: grab; }
.ar-ctl input[type="range"]:active { cursor: grabbing; }
.ar-ctl output {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--depth);
  white-space: nowrap;
  min-width: 5.5rem;
  text-align: right;
}

/* The source strip */
.ar-viz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.7rem;
  min-height: 3.4rem;
}

.ar-cell {
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.34rem 0.36rem;
  border-radius: 2px;
  min-width: 1.5rem;
  text-align: center;
  border: 1px solid transparent;
  cursor: help;
}

.ar-viz.is-dense .ar-cell { font-size: 0.6rem; padding: 0.28rem 0.24rem; min-width: 1.2rem; }

.ar-emb     { background: var(--vision-bg); color: var(--vision); border-color: var(--vision); font-weight: 600; }
.ar-block   { background: var(--depth-bg);  color: var(--depth);  border-color: var(--depth);  font-weight: 600; }
.ar-partial { background: var(--seq-bg);    color: var(--seq);    border-color: var(--seq);    font-weight: 600; }
.ar-layer   { background: #f2f0e8;          color: var(--ink-soft); }
.ar-sum     { background: var(--rule-soft); color: var(--ink-soft); min-width: 3rem; }
.ar-gap     { background: none; color: var(--ink-faint); cursor: default; }

.ar-arrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--depth);
  margin-left: 0.4rem;
  white-space: nowrap;
}

.ar-stats {
  display: flex;
  gap: 2rem;
  margin: 0.85rem 0 0;
  flex-wrap: wrap;
}
.ar-sk {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}
.ar-stats b {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--depth);
}
.ar-stats b.ar-warn { color: var(--warn); }

.ar-explain {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0.8rem 0 0;
  min-height: 3.6em;
}
.ar-explain q { font-style: italic; }

@media (max-width: 34rem) {
  .ar-ctl { flex-wrap: wrap; }
  .ar-ctl input[type="range"] { flex-basis: 100%; order: 3; }
}

@media print {
  .ares { background: #fff; page-break-inside: avoid; }
  .ar-modes, .ar-ctl input { display: none; }
  .ar-explain { min-height: 0; }
}
