/* Activation marks on the transit timeline (ledger #177). Drawn by
   js/activation-marks-layer.js; white for Personality, the Design red for
   Design; a filled disc amplifies, a hollow ring completes a channel. */

.am-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.am-glyph {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
}
/* The halo: opaque black, 2 px (ActivationMarksCore.HALO). The Design red is
   1.6:1 over HD Color 2 segments; the halo reaches 3:1 there. */
.am-glyph.am-amplifies { box-shadow: 0 0 0 2px #000000; }
.am-glyph.am-amplifies.am-personality { background-color: #ffffff; }
.am-glyph.am-amplifies.am-design { background-color: var(--design-red, #E0564D); }
.am-glyph.am-amplifies.am-mixed {
  background-image: linear-gradient(90deg, #ffffff 50%, var(--design-red, #E0564D) 50%);
}
.am-glyph.am-completes,
.am-glyph.am-both {
  background-color: transparent;
  border: 2.2px solid #ffffff;
  box-shadow: 0 0 0 2px #000000, inset 0 0 0 1.2px #000000;
}
.am-glyph.am-completes.am-design,
.am-glyph.am-both.am-design { border-color: var(--design-red, #E0564D); }
.am-glyph.am-completes.am-mixed,
.am-glyph.am-both.am-mixed {
  border-left-color: #ffffff;
  border-top-color: #ffffff;
  border-right-color: var(--design-red, #E0564D);
  border-bottom-color: var(--design-red, #E0564D);
}
.am-glyph .am-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #ffffff;
}
.am-glyph.am-design .am-dot { background: var(--design-red, #E0564D); }
.am-glyph .am-count {
  position: absolute;
  top: -8px;
  left: 7px;
  padding: 0 2.5px;
  font: 700 8px/11px Inter, system-ui, sans-serif;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 6px;
}

.am-bar {
  position: absolute;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  opacity: 0.85;
  pointer-events: none;
}
.am-bar.am-personality { background: #ffffff; }
.am-bar.am-design { background: var(--design-red, #E0564D); }

/* The 44 px target: exactly its row tall, never reaching another row. */
.am-hit {
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
}

.am-count-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border, #2a2a38);
  border-radius: 22px;
  background: rgba(10, 10, 15, 0.6);
  color: var(--text-primary, #e8e6e1);
  font: 600 0.75rem Inter, system-ui, sans-serif;
  cursor: pointer;
}
.am-count-btn[hidden] { display: none; }
.am-count-btn .am-glyph { position: static; margin: 0; width: 8px; height: 8px; }

.am-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  font-size: 0.7rem;
  color: var(--text-secondary, #9a9690);
}
.am-legend[hidden] { display: none; }
.am-legend-title { font-weight: 600; }
.am-legend-chip { display: inline-flex; align-items: center; gap: 4px; }
.am-legend-chip .am-glyph { position: static; margin: 0; width: 9px; height: 9px; }
.am-swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.am-swatch.am-personality { background: #ffffff; }
.am-swatch.am-design { background: var(--design-red, #E0564D); }

.am-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  width: min(420px, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, #2a2a38);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  color: var(--text-primary, #e8e6e1);
  font-family: Inter, system-ui, sans-serif;
}
.am-panel[hidden] { display: none; }
.am-panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.am-panel-bar .am-close { margin-left: auto; }
.am-back,
.am-close {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--accent, #c49a6c);
  font: 600 0.8rem Inter, system-ui, sans-serif;
  cursor: pointer;
}
.am-close { color: var(--text-secondary, #9a9690); font-size: 1.2rem; }
.am-panel-body { padding: 4px 16px 16px; }
.am-card-head { display: flex; align-items: center; gap: 10px; }
.am-card-head .am-glyph { position: static; margin: 0; width: 16px; height: 16px; }
.am-card-body { font-weight: 600; }
.am-card-when,
.am-timing,
.am-caption { color: var(--text-secondary, #9a9690); font-size: 0.8rem; }
.am-headline { font-size: 0.95rem; margin: 12px 0 6px; }
.am-headline:focus { outline: 2px solid var(--accent, #c49a6c); outline-offset: 2px; }
.am-gate { border-top: 1px solid var(--border, #2a2a38); margin-top: 12px; padding-top: 10px; }
.am-gate-link {
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #c49a6c);
  font: 600 0.9rem Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.am-keynote,
.am-line-title,
.am-line-text,
.am-channel { font-size: 0.85rem; margin: 6px 0; }
.am-line-title { font-weight: 600; }
.am-line-text { color: var(--text-secondary, #9a9690); }
.am-list-title { font-size: 0.95rem; margin: 6px 0 10px; }
.am-list { list-style: none; margin: 0; padding: 0; }
.am-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 0;
  border: none;
  border-bottom: 1px solid var(--border, #2a2a38);
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.am-list-item .am-glyph { position: static; margin: 0; flex-shrink: 0; }
.am-list-words { display: flex; flex-direction: column; gap: 2px; }
.am-list-when { font-weight: 600; font-size: 0.8rem; }
.am-list-text { color: var(--text-secondary, #9a9690); font-size: 0.8rem; }
.am-empty { color: var(--text-secondary, #9a9690); font-size: 0.8rem; }
